summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio')
-rw-r--r--3rdparty/asio/.gitignore22
-rw-r--r--3rdparty/asio/COPYING2
-rw-r--r--3rdparty/asio/INSTALL2
-rw-r--r--3rdparty/asio/Makefile.am3
-rw-r--r--3rdparty/asio/Makefile.in845
-rw-r--r--3rdparty/asio/README4
-rw-r--r--3rdparty/asio/aclocal.m41462
-rw-r--r--3rdparty/asio/asio.manifest5055
-rw-r--r--3rdparty/asio/asio.pc.in11
-rw-r--r--3rdparty/asio/autogen.sh55
-rw-r--r--3rdparty/asio/boost_asio.manifest4640
-rw-r--r--3rdparty/asio/boostify.pl583
-rwxr-xr-x3rdparty/asio/compile348
-rwxr-xr-x3rdparty/asio/config.guess1748
-rwxr-xr-x3rdparty/asio/config.sub1884
-rwxr-xr-x3rdparty/asio/configure7133
-rw-r--r--3rdparty/asio/configure.ac276
-rw-r--r--3rdparty/asio/depcomp791
-rw-r--r--3rdparty/asio/include/.gitignore2
-rw-r--r--3rdparty/asio/include/Makefile.am230
-rw-r--r--3rdparty/asio/include/Makefile.in1164
-rw-r--r--3rdparty/asio/include/asio.hpp91
-rw-r--r--3rdparty/asio/include/asio/any_completion_executor.hpp336
-rw-r--r--3rdparty/asio/include/asio/any_completion_handler.hpp822
-rw-r--r--3rdparty/asio/include/asio/any_io_executor.hpp351
-rw-r--r--3rdparty/asio/include/asio/append.hpp65
-rw-r--r--3rdparty/asio/include/asio/as_tuple.hpp126
-rw-r--r--3rdparty/asio/include/asio/associated_allocator.hpp147
-rw-r--r--3rdparty/asio/include/asio/associated_cancellation_slot.hpp221
-rw-r--r--3rdparty/asio/include/asio/associated_executor.hpp153
-rw-r--r--3rdparty/asio/include/asio/associated_immediate_executor.hpp280
-rw-r--r--3rdparty/asio/include/asio/associator.hpp35
-rw-r--r--3rdparty/asio/include/asio/async_result.hpp933
-rw-r--r--3rdparty/asio/include/asio/awaitable.hpp142
-rw-r--r--3rdparty/asio/include/asio/basic_datagram_socket.hpp976
-rw-r--r--3rdparty/asio/include/asio/basic_deadline_timer.hpp328
-rw-r--r--3rdparty/asio/include/asio/basic_file.hpp824
-rw-r--r--3rdparty/asio/include/asio/basic_io_object.hpp27
-rw-r--r--3rdparty/asio/include/asio/basic_random_access_file.hpp689
-rw-r--r--3rdparty/asio/include/asio/basic_raw_socket.hpp984
-rw-r--r--3rdparty/asio/include/asio/basic_readable_pipe.hpp626
-rw-r--r--3rdparty/asio/include/asio/basic_seq_packet_socket.hpp547
-rw-r--r--3rdparty/asio/include/asio/basic_serial_port.hpp527
-rw-r--r--3rdparty/asio/include/asio/basic_signal_set.hpp393
-rw-r--r--3rdparty/asio/include/asio/basic_socket.hpp722
-rw-r--r--3rdparty/asio/include/asio/basic_socket_acceptor.hpp1808
-rw-r--r--3rdparty/asio/include/asio/basic_socket_iostream.hpp157
-rw-r--r--3rdparty/asio/include/asio/basic_socket_streambuf.hpp129
-rw-r--r--3rdparty/asio/include/asio/basic_stream_file.hpp744
-rw-r--r--3rdparty/asio/include/asio/basic_stream_socket.hpp746
-rw-r--r--3rdparty/asio/include/asio/basic_streambuf.hpp31
-rw-r--r--3rdparty/asio/include/asio/basic_streambuf_fwd.hpp6
-rw-r--r--3rdparty/asio/include/asio/basic_waitable_timer.hpp381
-rw-r--r--3rdparty/asio/include/asio/basic_writable_pipe.hpp622
-rw-r--r--3rdparty/asio/include/asio/bind_allocator.hpp530
-rw-r--r--3rdparty/asio/include/asio/bind_cancellation_slot.hpp544
-rw-r--r--3rdparty/asio/include/asio/bind_executor.hpp343
-rw-r--r--3rdparty/asio/include/asio/bind_immediate_executor.hpp549
-rw-r--r--3rdparty/asio/include/asio/buffer.hpp1336
-rw-r--r--3rdparty/asio/include/asio/buffer_registration.hpp318
-rw-r--r--3rdparty/asio/include/asio/buffered_read_stream.hpp94
-rw-r--r--3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/buffered_stream.hpp108
-rw-r--r--3rdparty/asio/include/asio/buffered_stream_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/buffered_write_stream.hpp94
-rw-r--r--3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/buffers_iterator.hpp8
-rw-r--r--3rdparty/asio/include/asio/cancellation_signal.hpp245
-rw-r--r--3rdparty/asio/include/asio/cancellation_state.hpp235
-rw-r--r--3rdparty/asio/include/asio/cancellation_type.hpp157
-rw-r--r--3rdparty/asio/include/asio/co_spawn.hpp523
-rw-r--r--3rdparty/asio/include/asio/completion_condition.hpp2
-rw-r--r--3rdparty/asio/include/asio/compose.hpp319
-rw-r--r--3rdparty/asio/include/asio/connect.hpp451
-rw-r--r--3rdparty/asio/include/asio/connect_pipe.hpp83
-rw-r--r--3rdparty/asio/include/asio/consign.hpp75
-rw-r--r--3rdparty/asio/include/asio/coroutine.hpp15
-rw-r--r--3rdparty/asio/include/asio/datagram_socket_service.hpp455
-rw-r--r--3rdparty/asio/include/asio/deadline_timer.hpp2
-rw-r--r--3rdparty/asio/include/asio/deadline_timer_service.hpp173
-rw-r--r--3rdparty/asio/include/asio/defer.hpp197
-rw-r--r--3rdparty/asio/include/asio/deferred.hpp715
-rw-r--r--3rdparty/asio/include/asio/detached.hpp105
-rw-r--r--3rdparty/asio/include/asio/detail/array.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/array_fwd.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/assert.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/atomic_count.hpp34
-rw-r--r--3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp164
-rw-r--r--3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/bind_handler.hpp652
-rw-r--r--3rdparty/asio/include/asio/detail/blocking_executor_op.hpp107
-rw-r--r--3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp307
-rw-r--r--3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/call_stack.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/chrono.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/chrono_time_traits.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/completion_handler.hpp19
-rw-r--r--3rdparty/asio/include/asio/detail/composed_work.hpp252
-rw-r--r--3rdparty/asio/include/asio/detail/concurrency_hint.hpp16
-rw-r--r--3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/config.hpp1385
-rw-r--r--3rdparty/asio/include/asio/detail/consuming_buffers.hpp83
-rw-r--r--3rdparty/asio/include/asio/detail/cstddef.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/cstdint.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/date_time_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/deadline_timer_service.hpp81
-rw-r--r--3rdparty/asio/include/asio/detail/dependent_type.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/descriptor_ops.hpp72
-rw-r--r--3rdparty/asio/include/asio/detail/descriptor_read_op.hpp92
-rw-r--r--3rdparty/asio/include/asio/detail/descriptor_write_op.hpp91
-rw-r--r--3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp57
-rw-r--r--3rdparty/asio/include/asio/detail/epoll_reactor.hpp60
-rw-r--r--3rdparty/asio/include/asio/detail/event.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/exception.hpp29
-rw-r--r--3rdparty/asio/include/asio/detail/executor_function.hpp152
-rw-r--r--3rdparty/asio/include/asio/detail/executor_op.hpp18
-rw-r--r--3rdparty/asio/include/asio/detail/fd_set_adapter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/fenced_block.hpp42
-rw-r--r--3rdparty/asio/include/asio/detail/functional.hpp15
-rw-r--r--3rdparty/asio/include/asio/detail/future.hpp32
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp91
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp68
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp65
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp99
-rw-r--r--3rdparty/asio/include/asio/detail/global.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp158
-rw-r--r--3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp57
-rw-r--r--3rdparty/asio/include/asio/detail/handler_tracking.hpp28
-rw-r--r--3rdparty/asio/include/asio/detail/handler_type_requirements.hpp71
-rw-r--r--3rdparty/asio/include/asio/detail/handler_work.hpp488
-rw-r--r--3rdparty/asio/include/asio/detail/hash_map.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp685
-rw-r--r--3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp22
-rw-r--r--3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp41
-rw-r--r--3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp22
-rw-r--r--3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp100
-rw-r--r--3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp34
-rw-r--r--3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp54
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp205
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp140
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp112
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp914
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp249
-rw-r--r--3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp22
-rw-r--r--3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp89
-rw-r--r--3rdparty/asio/include/asio/detail/impl/null_event.ipp4
-rw-r--r--3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp17
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_event.ipp17
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_serial_port_service.ipp (renamed from 3rdparty/asio/include/asio/detail/impl/reactive_serial_port_service.ipp)90
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_thread.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp51
-rw-r--r--3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp87
-rw-r--r--3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp74
-rw-r--r--3rdparty/asio/include/asio/detail/impl/scheduler.ipp120
-rw-r--r--3rdparty/asio/include/asio/detail/impl/select_reactor.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/impl/select_reactor.ipp86
-rw-r--r--3rdparty/asio/include/asio/detail/impl/service_registry.hpp5
-rw-r--r--3rdparty/asio/include/asio/detail/impl/service_registry.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp219
-rw-r--r--3rdparty/asio/include/asio/detail/impl/socket_ops.ipp1212
-rw-r--r--3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp27
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp285
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp38
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_service.hpp48
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_service.ipp43
-rw-r--r--3rdparty/asio/include/asio/detail/impl/thread_context.ipp35
-rw-r--r--3rdparty/asio/include/asio/detail/impl/throw_error.ipp31
-rw-r--r--3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp28
-rw-r--r--3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_event.ipp7
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp280
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp106
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp20
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp80
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp31
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp156
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_mutex.ipp8
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp39
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp10
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_thread.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp6
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp62
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp15
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winsock_init.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/initiate_defer.hpp207
-rw-r--r--3rdparty/asio/include/asio/detail/initiate_dispatch.hpp193
-rw-r--r--3rdparty/asio/include/asio/detail/initiate_post.hpp207
-rw-r--r--3rdparty/asio/include/asio/detail/io_control.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/io_object_impl.hpp177
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp195
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp190
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp687
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp189
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp185
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_file_service.hpp261
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp114
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_operation.hpp84
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_service.hpp319
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp280
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp140
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp205
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp206
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp192
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp191
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp194
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp629
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp663
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp112
-rw-r--r--3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp123
-rw-r--r--3rdparty/asio/include/asio/detail/is_executor.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/kqueue_reactor.hpp57
-rw-r--r--3rdparty/asio/include/asio/detail/limits.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/macos_fenced_block.hpp62
-rw-r--r--3rdparty/asio/include/asio/detail/memory.hpp110
-rw-r--r--3rdparty/asio/include/asio/detail/mutex.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/non_const_lvalue.hpp43
-rw-r--r--3rdparty/asio/include/asio/detail/noncopyable.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_event.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/null_fenced_block.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_global.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_mutex.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/null_reactor.hpp23
-rw-r--r--3rdparty/asio/include/asio/detail/null_signal_blocker.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_socket_service.hpp124
-rw-r--r--3rdparty/asio/include/asio/detail/null_static_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/object_pool.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/op_queue.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/operation.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/pop_options.hpp36
-rw-r--r--3rdparty/asio/include/asio/detail/posix_event.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_global.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_serial_port_service.hpp (renamed from 3rdparty/asio/include/asio/detail/reactive_serial_port_service.hpp)71
-rw-r--r--3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_static_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/push_options.hpp70
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp288
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp57
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp172
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp69
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp102
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp97
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp78
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp107
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp98
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_service.hpp290
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp393
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_wait_op.hpp57
-rw-r--r--3rdparty/asio/include/asio/detail/reactor.hpp32
-rw-r--r--3rdparty/asio/include/asio/detail/reactor_fwd.hpp40
-rw-r--r--3rdparty/asio/include/asio/detail/reactor_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/reactor_op_queue.hpp46
-rw-r--r--3rdparty/asio/include/asio/detail/recycling_allocator.hpp37
-rw-r--r--3rdparty/asio/include/asio/detail/regex_fwd.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp50
-rw-r--r--3rdparty/asio/include/asio/detail/resolve_op.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/resolve_query_op.hpp50
-rw-r--r--3rdparty/asio/include/asio/detail/resolver_service.hpp46
-rw-r--r--3rdparty/asio/include/asio/detail/resolver_service_base.hpp56
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler.hpp44
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler_operation.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler_task.hpp49
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scoped_lock.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scoped_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/select_interrupter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/select_reactor.hpp78
-rw-r--r--3rdparty/asio/include/asio/detail/service_registry.hpp5
-rw-r--r--3rdparty/asio/include/asio/detail/signal_blocker.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/signal_handler.hpp18
-rw-r--r--3rdparty/asio/include/asio/detail/signal_init.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/signal_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/signal_set_service.hpp105
-rw-r--r--3rdparty/asio/include/asio/detail/socket_holder.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/socket_ops.hpp104
-rw-r--r--3rdparty/asio/include/asio/detail/socket_option.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/socket_types.hpp20
-rw-r--r--3rdparty/asio/include/asio/detail/source_location.hpp45
-rw-r--r--3rdparty/asio/include/asio/detail/static_mutex.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/std_event.hpp19
-rw-r--r--3rdparty/asio/include/asio/detail/std_fenced_block.hpp (renamed from 3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp)31
-rw-r--r--3rdparty/asio/include/asio/detail/std_global.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_mutex.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_static_mutex.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_thread.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/strand_executor_service.hpp45
-rw-r--r--3rdparty/asio/include/asio/detail/strand_service.hpp14
-rw-r--r--3rdparty/asio/include/asio/detail/string_view.hpp28
-rw-r--r--3rdparty/asio/include/asio/detail/thread.hpp16
-rw-r--r--3rdparty/asio/include/asio/detail/thread_context.hpp11
-rw-r--r--3rdparty/asio/include/asio/detail/thread_group.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/thread_info_base.hpp209
-rw-r--r--3rdparty/asio/include/asio/detail/throw_error.hpp27
-rw-r--r--3rdparty/asio/include/asio/detail/throw_exception.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue.hpp35
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue_set.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/timer_scheduler.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/type_traits.hpp178
-rw-r--r--3rdparty/asio/include/asio/detail/utility.hpp83
-rw-r--r--3rdparty/asio/include/asio/detail/variadic_templates.hpp119
-rw-r--r--3rdparty/asio/include/asio/detail/wait_handler.hpp21
-rw-r--r--3rdparty/asio/include/asio/detail/wait_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/win_event.hpp15
-rw-r--r--3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_fenced_block.hpp90
-rw-r--r--3rdparty/asio/include/asio/detail/win_global.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp287
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp176
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp29
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp33
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_operation.hpp22
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp28
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp54
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp92
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp27
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp23
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp24
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp23
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp274
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp386
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/win_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_object_handle_service.hpp36
-rw-r--r--3rdparty/asio/include/asio/detail/win_static_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winapp_thread.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/wince_thread.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_async_manager.hpp39
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_async_op.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp21
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp54
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp20
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp21
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp21
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp34
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp73
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_utils.hpp5
-rw-r--r--3rdparty/asio/include/asio/detail/winsock_init.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/work_dispatcher.hpp101
-rw-r--r--3rdparty/asio/include/asio/detail/wrapped_handler.hpp88
-rw-r--r--3rdparty/asio/include/asio/dispatch.hpp183
-rw-r--r--3rdparty/asio/include/asio/error.hpp53
-rw-r--r--3rdparty/asio/include/asio/error_code.hpp155
-rw-r--r--3rdparty/asio/include/asio/execution.hpp33
-rw-r--r--3rdparty/asio/include/asio/execution/allocator.hpp278
-rw-r--r--3rdparty/asio/include/asio/execution/any_executor.hpp1933
-rw-r--r--3rdparty/asio/include/asio/execution/bad_executor.hpp46
-rw-r--r--3rdparty/asio/include/asio/execution/blocking.hpp1360
-rw-r--r--3rdparty/asio/include/asio/execution/blocking_adaptation.hpp1080
-rw-r--r--3rdparty/asio/include/asio/execution/context.hpp191
-rw-r--r--3rdparty/asio/include/asio/execution/context_as.hpp190
-rw-r--r--3rdparty/asio/include/asio/execution/executor.hpp116
-rw-r--r--3rdparty/asio/include/asio/execution/impl/bad_executor.ipp40
-rw-r--r--3rdparty/asio/include/asio/execution/invocable_archetype.hpp43
-rw-r--r--3rdparty/asio/include/asio/execution/mapping.hpp1002
-rw-r--r--3rdparty/asio/include/asio/execution/occupancy.hpp184
-rw-r--r--3rdparty/asio/include/asio/execution/outstanding_work.hpp753
-rw-r--r--3rdparty/asio/include/asio/execution/prefer_only.hpp328
-rw-r--r--3rdparty/asio/include/asio/execution/relationship.hpp751
-rw-r--r--3rdparty/asio/include/asio/execution_context.hpp29
-rw-r--r--3rdparty/asio/include/asio/executor.hpp110
-rw-r--r--3rdparty/asio/include/asio/executor_work_guard.hpp285
-rw-r--r--3rdparty/asio/include/asio/experimental/append.hpp36
-rw-r--r--3rdparty/asio/include/asio/experimental/as_single.hpp132
-rw-r--r--3rdparty/asio/include/asio/experimental/as_tuple.hpp36
-rw-r--r--3rdparty/asio/include/asio/experimental/awaitable_operators.hpp536
-rw-r--r--3rdparty/asio/include/asio/experimental/basic_channel.hpp513
-rw-r--r--3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp513
-rw-r--r--3rdparty/asio/include/asio/experimental/cancellation_condition.hpp152
-rw-r--r--3rdparty/asio/include/asio/experimental/channel.hpp70
-rw-r--r--3rdparty/asio/include/asio/experimental/channel_error.hpp82
-rw-r--r--3rdparty/asio/include/asio/experimental/channel_traits.hpp301
-rw-r--r--3rdparty/asio/include/asio/experimental/co_composed.hpp145
-rw-r--r--3rdparty/asio/include/asio/experimental/co_spawn.hpp187
-rw-r--r--3rdparty/asio/include/asio/experimental/concurrent_channel.hpp70
-rw-r--r--3rdparty/asio/include/asio/experimental/coro.hpp293
-rw-r--r--3rdparty/asio/include/asio/experimental/coro_traits.hpp228
-rw-r--r--3rdparty/asio/include/asio/experimental/deferred.hpp36
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp77
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_message.hpp129
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp361
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp222
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp127
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp192
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp148
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_service.hpp677
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp169
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp141
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/has_signature.hpp54
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp621
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp197
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/as_single.hpp176
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/channel_error.ipp61
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/co_composed.hpp1174
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/coro.hpp1222
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp788
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/promise.hpp255
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/use_coro.hpp214
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/use_promise.hpp66
-rw-r--r--3rdparty/asio/include/asio/experimental/parallel_group.hpp457
-rw-r--r--3rdparty/asio/include/asio/experimental/prepend.hpp36
-rw-r--r--3rdparty/asio/include/asio/experimental/promise.hpp224
-rw-r--r--3rdparty/asio/include/asio/experimental/use_coro.hpp189
-rw-r--r--3rdparty/asio/include/asio/experimental/use_promise.hpp111
-rw-r--r--3rdparty/asio/include/asio/file_base.hpp166
-rw-r--r--3rdparty/asio/include/asio/generic/basic_endpoint.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/datagram_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/detail/endpoint.hpp2
-rw-r--r--3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp5
-rw-r--r--3rdparty/asio/include/asio/generic/raw_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/stream_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/handler_alloc_hook.hpp81
-rw-r--r--3rdparty/asio/include/asio/handler_continuation_hook.hpp2
-rw-r--r--3rdparty/asio/include/asio/handler_invoke_hook.hpp85
-rw-r--r--3rdparty/asio/include/asio/handler_type.hpp50
-rw-r--r--3rdparty/asio/include/asio/high_resolution_timer.hpp7
-rw-r--r--3rdparty/asio/include/asio/impl/any_completion_executor.ipp126
-rw-r--r--3rdparty/asio/include/asio/impl/any_io_executor.ipp134
-rw-r--r--3rdparty/asio/include/asio/impl/append.hpp162
-rw-r--r--3rdparty/asio/include/asio/impl/as_tuple.hpp245
-rw-r--r--3rdparty/asio/include/asio/impl/awaitable.hpp1196
-rw-r--r--3rdparty/asio/include/asio/impl/buffered_read_stream.hpp350
-rw-r--r--3rdparty/asio/include/asio/impl/buffered_write_stream.hpp346
-rw-r--r--3rdparty/asio/include/asio/impl/cancellation_signal.ipp96
-rw-r--r--3rdparty/asio/include/asio/impl/co_spawn.hpp449
-rw-r--r--3rdparty/asio/include/asio/impl/connect.hpp789
-rw-r--r--3rdparty/asio/include/asio/impl/connect_pipe.hpp73
-rw-r--r--3rdparty/asio/include/asio/impl/connect_pipe.ipp149
-rw-r--r--3rdparty/asio/include/asio/impl/consign.hpp137
-rw-r--r--3rdparty/asio/include/asio/impl/defer.hpp79
-rw-r--r--3rdparty/asio/include/asio/impl/deferred.hpp147
-rw-r--r--3rdparty/asio/include/asio/impl/detached.hpp77
-rw-r--r--3rdparty/asio/include/asio/impl/dispatch.hpp80
-rw-r--r--3rdparty/asio/include/asio/impl/error.ipp8
-rw-r--r--3rdparty/asio/include/asio/impl/error_code.ipp6
-rw-r--r--3rdparty/asio/include/asio/impl/execution_context.hpp44
-rw-r--r--3rdparty/asio/include/asio/impl/execution_context.ipp2
-rw-r--r--3rdparty/asio/include/asio/impl/executor.hpp220
-rw-r--r--3rdparty/asio/include/asio/impl/executor.ipp11
-rw-r--r--3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp52
-rw-r--r--3rdparty/asio/include/asio/impl/io_context.hpp374
-rw-r--r--3rdparty/asio/include/asio/impl/io_context.ipp8
-rw-r--r--3rdparty/asio/include/asio/impl/multiple_exceptions.ipp45
-rw-r--r--3rdparty/asio/include/asio/impl/post.hpp79
-rw-r--r--3rdparty/asio/include/asio/impl/prepend.hpp163
-rw-r--r--3rdparty/asio/include/asio/impl/read.hpp988
-rw-r--r--3rdparty/asio/include/asio/impl/read_at.hpp508
-rw-r--r--3rdparty/asio/include/asio/impl/read_until.hpp2595
-rw-r--r--3rdparty/asio/include/asio/impl/redirect_error.hpp250
-rw-r--r--3rdparty/asio/include/asio/impl/serial_port_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/impl/serial_port_base.ipp12
-rw-r--r--3rdparty/asio/include/asio/impl/spawn.hpp1499
-rw-r--r--3rdparty/asio/include/asio/impl/src.cpp25
-rw-r--r--3rdparty/asio/include/asio/impl/src.hpp20
-rw-r--r--3rdparty/asio/include/asio/impl/system_context.hpp34
-rw-r--r--3rdparty/asio/include/asio/impl/system_context.ipp92
-rw-r--r--3rdparty/asio/include/asio/impl/system_executor.hpp160
-rw-r--r--3rdparty/asio/include/asio/impl/system_executor.ipp57
-rw-r--r--3rdparty/asio/include/asio/impl/thread_pool.hpp272
-rw-r--r--3rdparty/asio/include/asio/impl/thread_pool.ipp82
-rw-r--r--3rdparty/asio/include/asio/impl/use_awaitable.hpp301
-rw-r--r--3rdparty/asio/include/asio/impl/use_future.hpp581
-rw-r--r--3rdparty/asio/include/asio/impl/write.hpp907
-rw-r--r--3rdparty/asio/include/asio/impl/write_at.hpp463
-rw-r--r--3rdparty/asio/include/asio/io_context.hpp865
-rw-r--r--3rdparty/asio/include/asio/io_context_strand.hpp156
-rw-r--r--3rdparty/asio/include/asio/io_service.hpp2
-rw-r--r--3rdparty/asio/include/asio/io_service_strand.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/address.hpp87
-rw-r--r--3rdparty/asio/include/asio/ip/address_v4.hpp160
-rw-r--r--3rdparty/asio/include/asio/ip/address_v4_iterator.hpp32
-rw-r--r--3rdparty/asio/include/asio/ip/address_v4_range.hpp38
-rw-r--r--3rdparty/asio/include/asio/ip/address_v6.hpp161
-rw-r--r--3rdparty/asio/include/asio/ip/address_v6_iterator.hpp31
-rw-r--r--3rdparty/asio/include/asio/ip/address_v6_range.hpp35
-rw-r--r--3rdparty/asio/include/asio/ip/bad_address_cast.hpp23
-rw-r--r--3rdparty/asio/include/asio/ip/basic_endpoint.hpp73
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver.hpp580
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp12
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_query.hpp18
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_results.hpp30
-rw-r--r--3rdparty/asio/include/asio/ip/detail/endpoint.hpp40
-rw-r--r--3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp38
-rw-r--r--3rdparty/asio/include/asio/ip/detail/socket_option.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/host_name.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/icmp.hpp14
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address.ipp49
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v4.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v4.ipp30
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v6.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v6.ipp66
-rw-r--r--3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/host_name.ipp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v4.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v4.ipp29
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v6.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v6.ipp29
-rw-r--r--3rdparty/asio/include/asio/ip/multicast.hpp16
-rw-r--r--3rdparty/asio/include/asio/ip/network_v4.hpp42
-rw-r--r--3rdparty/asio/include/asio/ip/network_v6.hpp36
-rw-r--r--3rdparty/asio/include/asio/ip/resolver_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/resolver_query_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/resolver_service.hpp200
-rw-r--r--3rdparty/asio/include/asio/ip/tcp.hpp18
-rw-r--r--3rdparty/asio/include/asio/ip/udp.hpp14
-rw-r--r--3rdparty/asio/include/asio/ip/unicast.hpp6
-rw-r--r--3rdparty/asio/include/asio/ip/v6_only.hpp8
-rw-r--r--3rdparty/asio/include/asio/is_applicable_property.hpp61
-rw-r--r--3rdparty/asio/include/asio/is_contiguous_iterator.hpp45
-rw-r--r--3rdparty/asio/include/asio/is_executor.hpp2
-rw-r--r--3rdparty/asio/include/asio/is_read_buffered.hpp2
-rw-r--r--3rdparty/asio/include/asio/is_write_buffered.hpp2
-rw-r--r--3rdparty/asio/include/asio/local/basic_endpoint.hpp16
-rw-r--r--3rdparty/asio/include/asio/local/connect_pair.hpp33
-rw-r--r--3rdparty/asio/include/asio/local/datagram_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/local/detail/endpoint.hpp8
-rw-r--r--3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp21
-rw-r--r--3rdparty/asio/include/asio/local/seq_packet_protocol.hpp84
-rw-r--r--3rdparty/asio/include/asio/local/stream_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/multiple_exceptions.hpp52
-rw-r--r--3rdparty/asio/include/asio/packaged_task.hpp68
-rw-r--r--3rdparty/asio/include/asio/placeholders.hpp134
-rw-r--r--3rdparty/asio/include/asio/posix/basic_descriptor.hpp355
-rw-r--r--3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp369
-rw-r--r--3rdparty/asio/include/asio/posix/descriptor.hpp617
-rw-r--r--3rdparty/asio/include/asio/posix/descriptor_base.hpp4
-rw-r--r--3rdparty/asio/include/asio/posix/stream_descriptor.hpp329
-rw-r--r--3rdparty/asio/include/asio/posix/stream_descriptor_service.hpp279
-rw-r--r--3rdparty/asio/include/asio/post.hpp192
-rw-r--r--3rdparty/asio/include/asio/prefer.hpp577
-rw-r--r--3rdparty/asio/include/asio/prepend.hpp66
-rw-r--r--3rdparty/asio/include/asio/query.hpp311
-rw-r--r--3rdparty/asio/include/asio/random_access_file.hpp35
-rw-r--r--3rdparty/asio/include/asio/raw_socket_service.hpp455
-rw-r--r--3rdparty/asio/include/asio/read.hpp851
-rw-r--r--3rdparty/asio/include/asio/read_at.hpp247
-rw-r--r--3rdparty/asio/include/asio/read_until.hpp1702
-rw-r--r--3rdparty/asio/include/asio/readable_pipe.hpp35
-rw-r--r--3rdparty/asio/include/asio/recycling_allocator.hpp138
-rw-r--r--3rdparty/asio/include/asio/redirect_error.hpp64
-rw-r--r--3rdparty/asio/include/asio/registered_buffer.hpp344
-rw-r--r--3rdparty/asio/include/asio/require.hpp433
-rw-r--r--3rdparty/asio/include/asio/require_concept.hpp343
-rw-r--r--3rdparty/asio/include/asio/seq_packet_socket_service.hpp405
-rw-r--r--3rdparty/asio/include/asio/serial_port.hpp739
-rw-r--r--3rdparty/asio/include/asio/serial_port_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/serial_port_service.hpp249
-rw-r--r--3rdparty/asio/include/asio/signal_set.hpp425
-rw-r--r--3rdparty/asio/include/asio/signal_set_base.hpp171
-rw-r--r--3rdparty/asio/include/asio/signal_set_service.hpp142
-rw-r--r--3rdparty/asio/include/asio/socket_acceptor_service.hpp361
-rw-r--r--3rdparty/asio/include/asio/socket_base.hpp82
-rw-r--r--3rdparty/asio/include/asio/spawn.hpp746
-rw-r--r--3rdparty/asio/include/asio/ssl.hpp3
-rw-r--r--3rdparty/asio/include/asio/ssl/context.hpp10
-rw-r--r--3rdparty/asio/include/asio/ssl/context_base.hpp70
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp9
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/engine.hpp11
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp9
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp77
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp16
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/io.hpp146
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp8
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/password_callback.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/read_op.hpp9
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp19
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/stream_core.hpp95
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp4
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/write_op.hpp15
-rw-r--r--3rdparty/asio/include/asio/ssl/error.hpp37
-rw-r--r--3rdparty/asio/include/asio/ssl/host_name_verification.hpp90
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/context.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/context.ipp503
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/error.ipp34
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp73
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp6
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/src.hpp3
-rw-r--r--3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp10
-rw-r--r--3rdparty/asio/include/asio/ssl/stream.hpp565
-rw-r--r--3rdparty/asio/include/asio/ssl/stream_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/verify_context.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/verify_mode.hpp2
-rw-r--r--3rdparty/asio/include/asio/static_thread_pool.hpp31
-rw-r--r--3rdparty/asio/include/asio/steady_timer.hpp7
-rw-r--r--3rdparty/asio/include/asio/strand.hpp351
-rw-r--r--3rdparty/asio/include/asio/stream_file.hpp35
-rw-r--r--3rdparty/asio/include/asio/stream_socket_service.hpp401
-rw-r--r--3rdparty/asio/include/asio/streambuf.hpp2
-rw-r--r--3rdparty/asio/include/asio/system_context.hpp90
-rw-r--r--3rdparty/asio/include/asio/system_error.hpp104
-rw-r--r--3rdparty/asio/include/asio/system_executor.hpp616
-rw-r--r--3rdparty/asio/include/asio/system_timer.hpp7
-rw-r--r--3rdparty/asio/include/asio/this_coro.hpp267
-rw-r--r--3rdparty/asio/include/asio/thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/thread_pool.hpp843
-rw-r--r--3rdparty/asio/include/asio/time_traits.hpp2
-rw-r--r--3rdparty/asio/include/asio/traits/equality_comparable.hpp100
-rw-r--r--3rdparty/asio/include/asio/traits/execute_member.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/prefer_free.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/prefer_member.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/query_free.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/query_member.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp101
-rw-r--r--3rdparty/asio/include/asio/traits/require_concept_free.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/require_concept_member.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/require_free.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/require_member.hpp104
-rw-r--r--3rdparty/asio/include/asio/traits/static_query.hpp102
-rw-r--r--3rdparty/asio/include/asio/traits/static_require.hpp115
-rw-r--r--3rdparty/asio/include/asio/traits/static_require_concept.hpp116
-rw-r--r--3rdparty/asio/include/asio/ts/buffer.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/executor.hpp4
-rw-r--r--3rdparty/asio/include/asio/ts/internet.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/io_context.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/net.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/netfwd.hpp125
-rw-r--r--3rdparty/asio/include/asio/ts/socket.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/timer.hpp4
-rw-r--r--3rdparty/asio/include/asio/unyield.hpp2
-rw-r--r--3rdparty/asio/include/asio/use_awaitable.hpp161
-rw-r--r--3rdparty/asio/include/asio/use_future.hpp52
-rw-r--r--3rdparty/asio/include/asio/uses_executor.hpp8
-rw-r--r--3rdparty/asio/include/asio/version.hpp4
-rw-r--r--3rdparty/asio/include/asio/wait_traits.hpp2
-rw-r--r--3rdparty/asio/include/asio/waitable_timer_service.hpp210
-rw-r--r--3rdparty/asio/include/asio/windows/basic_handle.hpp273
-rw-r--r--3rdparty/asio/include/asio/windows/basic_object_handle.hpp401
-rw-r--r--3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp455
-rw-r--r--3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp375
-rw-r--r--3rdparty/asio/include/asio/windows/basic_stream_handle.hpp374
-rw-r--r--3rdparty/asio/include/asio/windows/object_handle.hpp349
-rw-r--r--3rdparty/asio/include/asio/windows/object_handle_service.hpp183
-rw-r--r--3rdparty/asio/include/asio/windows/overlapped_handle.hpp300
-rw-r--r--3rdparty/asio/include/asio/windows/overlapped_ptr.hpp47
-rw-r--r--3rdparty/asio/include/asio/windows/random_access_handle.hpp347
-rw-r--r--3rdparty/asio/include/asio/windows/random_access_handle_service.hpp214
-rw-r--r--3rdparty/asio/include/asio/windows/stream_handle.hpp331
-rw-r--r--3rdparty/asio/include/asio/windows/stream_handle_service.hpp210
-rw-r--r--3rdparty/asio/include/asio/writable_pipe.hpp35
-rw-r--r--3rdparty/asio/include/asio/write.hpp833
-rw-r--r--3rdparty/asio/include/asio/write_at.hpp246
-rw-r--r--3rdparty/asio/include/asio/yield.hpp2
-rwxr-xr-x3rdparty/asio/install-sh541
-rwxr-xr-x3rdparty/asio/missing215
-rw-r--r--3rdparty/asio/release.pl439
-rw-r--r--3rdparty/asio/src/.gitignore11
-rw-r--r--3rdparty/asio/src/Makefile.am34
-rw-r--r--3rdparty/asio/src/Makefile.in619
-rw-r--r--3rdparty/asio/src/Makefile.mgw286
-rw-r--r--3rdparty/asio/src/Makefile.msc390
-rw-r--r--3rdparty/asio/src/asio.cpp2
-rw-r--r--3rdparty/asio/src/asio_ssl.cpp2
-rw-r--r--3rdparty/asio/src/doc/.gitignore5
-rw-r--r--3rdparty/asio/src/doc/Jamfile.v262
-rw-r--r--3rdparty/asio/src/doc/asio.pngbin3164 -> 0 bytes
-rw-r--r--3rdparty/asio/src/doc/asio.qbk116
-rw-r--r--3rdparty/asio/src/doc/asioref.sty90
-rw-r--r--3rdparty/asio/src/doc/asioref.xsl94
-rw-r--r--3rdparty/asio/src/doc/boost_bind_dox.txt5
-rw-r--r--3rdparty/asio/src/doc/doxy2qbk.pl22
-rw-r--r--3rdparty/asio/src/doc/examples.qbk419
-rw-r--r--3rdparty/asio/src/doc/history.qbk1214
-rw-r--r--3rdparty/asio/src/doc/index.xml13
-rw-r--r--3rdparty/asio/src/doc/makepdf.pl26
-rw-r--r--3rdparty/asio/src/doc/noncopyable_dox.txt3
-rw-r--r--3rdparty/asio/src/doc/overview.qbk97
-rw-r--r--3rdparty/asio/src/doc/overview/allocation.qbk58
-rw-r--r--3rdparty/asio/src/doc/overview/async.qbk185
-rw-r--r--3rdparty/asio/src/doc/overview/async_op1.dot78
-rw-r--r--3rdparty/asio/src/doc/overview/async_op1.pngbin24260 -> 0 bytes
-rw-r--r--3rdparty/asio/src/doc/overview/async_op2.dot78
-rw-r--r--3rdparty/asio/src/doc/overview/async_op2.pngbin24542 -> 0 bytes
-rw-r--r--3rdparty/asio/src/doc/overview/basics.qbk106
-rw-r--r--3rdparty/asio/src/doc/overview/bsd_sockets.qbk270
-rw-r--r--3rdparty/asio/src/doc/overview/buffers.qbk163
-rw-r--r--3rdparty/asio/src/doc/overview/coroutine.qbk51
-rw-r--r--3rdparty/asio/src/doc/overview/cpp2011.qbk275
-rw-r--r--3rdparty/asio/src/doc/overview/handler_tracking.qbk102
-rw-r--r--3rdparty/asio/src/doc/overview/implementation.qbk305
-rw-r--r--3rdparty/asio/src/doc/overview/iostreams.qbk72
-rw-r--r--3rdparty/asio/src/doc/overview/line_based.qbk118
-rw-r--r--3rdparty/asio/src/doc/overview/other_protocols.qbk94
-rw-r--r--3rdparty/asio/src/doc/overview/posix.qbk152
-rw-r--r--3rdparty/asio/src/doc/overview/proactor.dot100
-rw-r--r--3rdparty/asio/src/doc/overview/proactor.pngbin30877 -> 0 bytes
-rw-r--r--3rdparty/asio/src/doc/overview/protocols.qbk149
-rw-r--r--3rdparty/asio/src/doc/overview/rationale.qbk54
-rw-r--r--3rdparty/asio/src/doc/overview/reactor.qbk44
-rw-r--r--3rdparty/asio/src/doc/overview/serial_ports.qbk45
-rw-r--r--3rdparty/asio/src/doc/overview/signals.qbk44
-rw-r--r--3rdparty/asio/src/doc/overview/spawn.qbk102
-rw-r--r--3rdparty/asio/src/doc/overview/ssl.qbk123
-rw-r--r--3rdparty/asio/src/doc/overview/strands.qbk85
-rw-r--r--3rdparty/asio/src/doc/overview/streams.qbk62
-rw-r--r--3rdparty/asio/src/doc/overview/sync_op.dot67
-rw-r--r--3rdparty/asio/src/doc/overview/sync_op.pngbin20243 -> 0 bytes
-rw-r--r--3rdparty/asio/src/doc/overview/threads.qbk66
-rw-r--r--3rdparty/asio/src/doc/overview/timers.qbk52
-rw-r--r--3rdparty/asio/src/doc/overview/windows.qbk126
-rw-r--r--3rdparty/asio/src/doc/project-root.jam1
-rw-r--r--3rdparty/asio/src/doc/quickref.xml514
-rw-r--r--3rdparty/asio/src/doc/reference.dox256
-rw-r--r--3rdparty/asio/src/doc/reference.qbk112844
-rw-r--r--3rdparty/asio/src/doc/reference.xsl1779
-rw-r--r--3rdparty/asio/src/doc/release_checklist.htm68
-rw-r--r--3rdparty/asio/src/doc/requirements/AcceptHandler.qbk72
-rw-r--r--3rdparty/asio/src/doc/requirements/AcceptableProtocol.qbk25
-rw-r--r--3rdparty/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk56
-rw-r--r--3rdparty/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk57
-rw-r--r--3rdparty/asio/src/doc/requirements/AsyncReadStream.qbk50
-rw-r--r--3rdparty/asio/src/doc/requirements/AsyncWriteStream.qbk48
-rw-r--r--3rdparty/asio/src/doc/requirements/BufferedHandshakeHandler.qbk55
-rw-r--r--3rdparty/asio/src/doc/requirements/CompletionCondition.qbk42
-rw-r--r--3rdparty/asio/src/doc/requirements/CompletionHandler.qbk63
-rw-r--r--3rdparty/asio/src/doc/requirements/ConnectCondition.qbk34
-rw-r--r--3rdparty/asio/src/doc/requirements/ConnectHandler.qbk72
-rw-r--r--3rdparty/asio/src/doc/requirements/ConstBufferSequence.qbk55
-rw-r--r--3rdparty/asio/src/doc/requirements/DynamicBuffer.qbk93
-rw-r--r--3rdparty/asio/src/doc/requirements/Endpoint.qbk94
-rw-r--r--3rdparty/asio/src/doc/requirements/EndpointSequence.qbk30
-rw-r--r--3rdparty/asio/src/doc/requirements/ExecutionContext.qbk36
-rw-r--r--3rdparty/asio/src/doc/requirements/Executor.qbk141
-rw-r--r--3rdparty/asio/src/doc/requirements/GettableSerialPortOption.qbk33
-rw-r--r--3rdparty/asio/src/doc/requirements/GettableSocketOption.qbk67
-rw-r--r--3rdparty/asio/src/doc/requirements/Handler.qbk64
-rw-r--r--3rdparty/asio/src/doc/requirements/HandshakeHandler.qbk72
-rw-r--r--3rdparty/asio/src/doc/requirements/InternetProtocol.qbk47
-rw-r--r--3rdparty/asio/src/doc/requirements/IoControlCommand.qbk34
-rw-r--r--3rdparty/asio/src/doc/requirements/IoObjectService.qbk62
-rw-r--r--3rdparty/asio/src/doc/requirements/IteratorConnectHandler.qbk81
-rw-r--r--3rdparty/asio/src/doc/requirements/MoveAcceptHandler.qbk61
-rw-r--r--3rdparty/asio/src/doc/requirements/MutableBufferSequence.qbk56
-rw-r--r--3rdparty/asio/src/doc/requirements/ProtoAllocator.qbk19
-rw-r--r--3rdparty/asio/src/doc/requirements/Protocol.qbk54
-rw-r--r--3rdparty/asio/src/doc/requirements/RangeConnectHandler.qbk82
-rw-r--r--3rdparty/asio/src/doc/requirements/ReadHandler.qbk79
-rw-r--r--3rdparty/asio/src/doc/requirements/ResolveHandler.qbk82
-rw-r--r--3rdparty/asio/src/doc/requirements/Service.qbk40
-rw-r--r--3rdparty/asio/src/doc/requirements/SettableSerialPortOption.qbk33
-rw-r--r--3rdparty/asio/src/doc/requirements/SettableSocketOption.qbk54
-rw-r--r--3rdparty/asio/src/doc/requirements/ShutdownHandler.qbk72
-rw-r--r--3rdparty/asio/src/doc/requirements/SignalHandler.qbk79
-rw-r--r--3rdparty/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk49
-rw-r--r--3rdparty/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk49
-rw-r--r--3rdparty/asio/src/doc/requirements/SyncReadStream.qbk41
-rw-r--r--3rdparty/asio/src/doc/requirements/SyncWriteStream.qbk39
-rw-r--r--3rdparty/asio/src/doc/requirements/TimeTraits.qbk72
-rw-r--r--3rdparty/asio/src/doc/requirements/WaitHandler.qbk72
-rw-r--r--3rdparty/asio/src/doc/requirements/WaitTraits.qbk52
-rw-r--r--3rdparty/asio/src/doc/requirements/WriteHandler.qbk79
-rw-r--r--3rdparty/asio/src/doc/requirements/asynchronous_operations.qbk281
-rw-r--r--3rdparty/asio/src/doc/requirements/asynchronous_socket_operations.qbk39
-rw-r--r--3rdparty/asio/src/doc/requirements/read_write_operations.qbk34
-rw-r--r--3rdparty/asio/src/doc/requirements/synchronous_socket_operations.qbk37
-rw-r--r--3rdparty/asio/src/doc/std_exception_dox.txt7
-rw-r--r--3rdparty/asio/src/doc/tutorial.dox226
-rw-r--r--3rdparty/asio/src/doc/tutorial.qbk2227
-rw-r--r--3rdparty/asio/src/doc/tutorial.xsl437
-rw-r--r--3rdparty/asio/src/doc/using.qbk316
-rw-r--r--3rdparty/asio/src/examples/cpp03/Makefile.am250
-rw-r--r--3rdparty/asio/src/examples/cpp03/allocation/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/allocation/server.cpp238
-rw-r--r--3rdparty/asio/src/examples/cpp03/buffers/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp131
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp177
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp93
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp247
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp204
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp137
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp92
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp59
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp79
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp59
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp53
-rw-r--r--3rdparty/asio/src/examples/cpp03/fork/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp160
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/client/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/doc_root/data_1K.html28
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/doc_root/data_2K.html49
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/doc_root/data_4K.html91
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/doc_root/data_8K.html175
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection.cpp99
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection.hpp83
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp38
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp44
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/header.hpp28
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/main.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp46
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp27
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/reply.cpp256
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/reply.hpp64
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp122
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp46
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/server.cpp94
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/server.hpp69
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server2/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp93
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server3/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp98
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/request.hpp46
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp226
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp78
-rw-r--r--3rdparty/asio/src/examples/cpp03/icmp/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/invocation/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp162
-rw-r--r--3rdparty/asio/src/examples/cpp03/iostreams/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp91
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/.gitignore13
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp141
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/stream_server.cpp141
-rw-r--r--3rdparty/asio/src/examples/cpp03/multicast/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/nonblocking/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp240
-rw-r--r--3rdparty/asio/src/examples/cpp03/porthopper/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/serialization/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/services/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/socks4/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/spawn/.gitignore12
-rw-r--r--3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp122
-rw-r--r--3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp89
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/ca.pem49
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/client.cpp156
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem8
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/server.cpp170
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/server.pem71
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp242
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp182
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/server.cpp427
-rw-r--r--3rdparty/asio/src/examples/cpp03/timers/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/timers/tick_count_timer.cpp123
-rw-r--r--3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp93
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime1/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime2/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime3/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime4/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime5/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime6/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime7/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/daytime_dox.txt502
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/index_dox.txt48
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/timer1/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/timer2/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/timer3/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/timer4/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/timer5/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp03/tutorial/timer_dox.txt383
-rw-r--r--3rdparty/asio/src/examples/cpp03/windows/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp11/Makefile.am240
-rw-r--r--3rdparty/asio/src/examples/cpp11/Makefile.in2975
-rw-r--r--3rdparty/asio/src/examples/cpp11/allocation/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp11/allocation/server.cpp76
-rw-r--r--3rdparty/asio/src/examples/cpp11/buffers/.gitignore10
-rw-r--r--3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp198
-rw-r--r--3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp35
-rw-r--r--3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/.gitignore5
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/actor.cpp12
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp41
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp34
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp80
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/pipeline.cpp36
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/priority_scheduler.cpp42
-rw-r--r--3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp101
-rw-r--r--3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp65
-rw-r--r--3rdparty/asio/src/examples/cpp11/fork/daemon.cpp (renamed from 3rdparty/asio/src/examples/cpp03/fork/daemon.cpp)50
-rw-r--r--3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp162
-rw-r--r--3rdparty/asio/src/examples/cpp11/futures/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp135
-rw-r--r--3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp20
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/client/async_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/client/async_client.cpp)30
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/client/sync_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/client/sync_client.cpp)6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection.hpp4
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/header.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/main.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/reply.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/reply.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/server.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp89
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/connection.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/connection.hpp)34
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.cpp)15
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.hpp)14
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/main.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/main.cpp)6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/mime_types.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/mime_types.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/mime_types.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/mime_types.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/reply.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/reply.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/reply.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/reply.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_handler.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_handler.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_handler.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_handler.hpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_parser.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_parser.cpp)104
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_parser.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_parser.hpp)29
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/server.cpp)53
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/server.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/server.hpp)24
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp89
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/connection.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/connection.hpp)37
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/main.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/main.cpp)6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/mime_types.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/mime_types.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/mime_types.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/mime_types.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/reply.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/reply.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/reply.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/reply.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_handler.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_handler.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_handler.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_handler.hpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_parser.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_parser.cpp)104
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_parser.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_parser.hpp)29
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/server.cpp)66
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/server.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/server.hpp)24
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/file_handler.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/file_handler.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/file_handler.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/file_handler.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/main.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/main.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/mime_types.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/mime_types.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/mime_types.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/mime_types.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/reply.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/reply.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/reply.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/reply.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/request.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server/request.hpp)12
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/request_parser.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server/request_parser.cpp)108
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/request_parser.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server/request_parser.hpp)39
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/server.cpp)16
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/server.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/server.hpp)26
-rw-r--r--3rdparty/asio/src/examples/cpp11/icmp/icmp_header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/icmp/icmp_header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/icmp/ipv4_header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/icmp/ipv4_header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/icmp/ping.cpp (renamed from 3rdparty/asio/src/examples/cpp03/icmp/ping.cpp)29
-rw-r--r--3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp202
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/daytime_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/iostreams/daytime_client.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/daytime_server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/iostreams/daytime_server.cpp)4
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp129
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp102
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp160
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/stream_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/local/stream_client.cpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/stream_server.cpp121
-rw-r--r--3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp (renamed from 3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp)41
-rw-r--r--3rdparty/asio/src/examples/cpp11/multicast/sender.cpp (renamed from 3rdparty/asio/src/examples/cpp03/multicast/sender.cpp)54
-rw-r--r--3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp212
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp159
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp229
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp238
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp252
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp289
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp349
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp268
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp263
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp70
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/porthopper/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/porthopper/client.cpp)76
-rw-r--r--3rdparty/asio/src/examples/cpp11/porthopper/protocol.hpp (renamed from 3rdparty/asio/src/examples/cpp03/porthopper/protocol.hpp)12
-rw-r--r--3rdparty/asio/src/examples/cpp11/porthopper/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/porthopper/server.cpp)50
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/client.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/connection.hpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/connection.hpp)62
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/server.cpp)21
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/stock.hpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/stock.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/basic_logger.hpp (renamed from 3rdparty/asio/src/examples/cpp03/services/basic_logger.hpp)19
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/daytime_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/services/daytime_client.cpp)18
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/logger.hpp (renamed from 3rdparty/asio/src/examples/cpp03/services/logger.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/logger_service.cpp (renamed from 3rdparty/asio/src/examples/cpp03/services/logger_service.cpp)8
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/logger_service.hpp (renamed from 3rdparty/asio/src/examples/cpp03/services/logger_service.hpp)42
-rw-r--r--3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp (renamed from 3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp)19
-rw-r--r--3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp)14
-rw-r--r--3rdparty/asio/src/examples/cpp11/spawn/.gitignore12
-rw-r--r--3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp33
-rw-r--r--3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/README (renamed from 3rdparty/asio/src/examples/cpp03/ssl/README)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/ca.pem50
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/client.cpp165
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem25
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/server.cpp145
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/server.pem99
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp)83
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp192
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp171
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp155
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/server.cpp433
-rw-r--r--3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp106
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime1/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime1/client.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime2/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime2/server.cpp)4
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime3/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime3/server.cpp)25
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime4/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime4/client.cpp)8
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime5/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime5/server.cpp)15
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime6/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime6/server.cpp)24
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime7/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime7/server.cpp)39
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer1/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer1/timer.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer2/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer2/timer.cpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer3/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer3/timer.cpp)17
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer4/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer4/timer.cpp)15
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer5/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer5/timer.cpp)32
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp48
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp60
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp22
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp35
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp30
-rw-r--r--3rdparty/asio/src/examples/cpp11/windows/transmit_file.cpp (renamed from 3rdparty/asio/src/examples/cpp03/windows/transmit_file.cpp)41
-rw-r--r--3rdparty/asio/src/examples/cpp14/Makefile.am49
-rw-r--r--3rdparty/asio/src/examples/cpp14/Makefile.in1378
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp35
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp51
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp59
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp66
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp75
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/.gitignore6
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/actor.cpp18
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/async_1.cpp39
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/async_2.cpp59
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp41
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp34
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp79
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp85
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp102
-rw-r--r--3rdparty/asio/src/examples/cpp14/iostreams/.gitignore11
-rw-r--r--3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp230
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp152
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp155
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp219
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp228
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp242
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp280
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp340
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp261
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp254
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp133
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp70
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp17/Makefile.am37
-rw-r--r--3rdparty/asio/src/examples/cpp17/Makefile.in738
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp222
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp76
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp73
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp102
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp80
-rw-r--r--3rdparty/asio/src/examples/cpp20/Makefile.am79
-rw-r--r--3rdparty/asio/src/examples/cpp20/Makefile.in1173
-rw-r--r--3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp182
-rw-r--r--3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp192
-rw-r--r--3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp135
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp222
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp76
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp73
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp72
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp74
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp80
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp66
-rw-r--r--3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp83
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp232
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp154
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp157
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp225
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp232
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp247
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp284
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp345
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp262
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp255
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp39
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp35
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp22
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp32
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp30
-rw-r--r--3rdparty/asio/src/tests/.gitignore11
-rw-r--r--3rdparty/asio/src/tests/Makefile.am344
-rw-r--r--3rdparty/asio/src/tests/Makefile.in6367
-rw-r--r--3rdparty/asio/src/tests/latency/.gitignore11
-rw-r--r--3rdparty/asio/src/tests/latency/allocator.hpp2
-rw-r--r--3rdparty/asio/src/tests/latency/coroutine.hpp87
-rw-r--r--3rdparty/asio/src/tests/latency/high_res_clock.hpp2
-rw-r--r--3rdparty/asio/src/tests/latency/tcp_client.cpp2
-rw-r--r--3rdparty/asio/src/tests/latency/tcp_server.cpp10
-rw-r--r--3rdparty/asio/src/tests/latency/udp_client.cpp2
-rw-r--r--3rdparty/asio/src/tests/latency/udp_server.cpp8
-rw-r--r--3rdparty/asio/src/tests/latency/unyield.hpp21
-rw-r--r--3rdparty/asio/src/tests/latency/yield.hpp23
-rw-r--r--3rdparty/asio/src/tests/performance/.gitignore11
-rw-r--r--3rdparty/asio/src/tests/performance/client.cpp12
-rw-r--r--3rdparty/asio/src/tests/performance/handler_allocator.hpp2
-rw-r--r--3rdparty/asio/src/tests/performance/server.cpp8
-rw-r--r--3rdparty/asio/src/tests/properties/Makefile.am367
-rw-r--r--3rdparty/asio/src/tests/properties/Makefile.in5585
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp45
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp33
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp41
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp41
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp41
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp26
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp36
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp41
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp28
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp45
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp32
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp42
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp61
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp46
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/query_free.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/query_member.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/query_static.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp60
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp60
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_free.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_member.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_static.cpp61
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp45
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp33
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp37
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp37
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp27
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp27
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp41
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp26
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp36
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp44
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp44
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp34
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp34
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp41
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp28
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp48
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp45
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp32
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp42
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp64
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp64
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp64
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp64
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp59
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/query_free.cpp49
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/query_member.cpp49
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/query_static.cpp60
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp58
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_free.cpp64
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_member.cpp64
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_static.cpp68
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp35
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp32
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp34
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp34
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp36
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp42
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp28
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp28
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp27
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp27
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp27
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp26
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp28
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp27
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp35
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp35
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp34
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp34
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp31
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp28
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp32
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp39
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp38
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp35
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp32
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp36
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp42
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp50
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/query_free.cpp40
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/query_member.cpp40
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/query_static.cpp40
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp43
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp42
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_free.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_member.cpp55
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_static.cpp52
-rw-r--r--3rdparty/asio/src/tests/unit/.gitignore74
-rw-r--r--3rdparty/asio/src/tests/unit/any_completion_executor.cpp463
-rw-r--r--3rdparty/asio/src/tests/unit/any_completion_handler.cpp260
-rw-r--r--3rdparty/asio/src/tests/unit/any_io_executor.cpp515
-rw-r--r--3rdparty/asio/src/tests/unit/append.cpp58
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp132
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/async_result.hpp100
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp345
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/deprecated_async_result.hpp82
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/as_tuple.cpp122
-rw-r--r--3rdparty/asio/src/tests/unit/associated_allocator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp (renamed from 3rdparty/asio/src/tests/unit/seq_packet_socket_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/associated_executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/associator.cpp (renamed from 3rdparty/asio/src/tests/unit/raw_socket_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/async_result.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/awaitable.cpp (renamed from 3rdparty/asio/src/tests/unit/stream_socket_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_file.cpp (renamed from 3rdparty/asio/src/tests/unit/deadline_timer_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/basic_random_access_file.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_raw_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_serial_port.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_signal_set.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_socket.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_stream_file.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_stream_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_streambuf.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/bind_allocator.cpp237
-rw-r--r--3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp202
-rw-r--r--3rdparty/asio/src/tests/unit/bind_executor.cpp168
-rw-r--r--3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp199
-rw-r--r--3rdparty/asio/src/tests/unit/buffer.cpp382
-rw-r--r--3rdparty/asio/src/tests/unit/buffer_registration.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/buffered_read_stream.cpp27
-rw-r--r--3rdparty/asio/src/tests/unit/buffered_stream.cpp27
-rw-r--r--3rdparty/asio/src/tests/unit/buffered_write_stream.cpp27
-rw-r--r--3rdparty/asio/src/tests/unit/buffers_iterator.cpp17
-rw-r--r--3rdparty/asio/src/tests/unit/cancellation_signal.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/cancellation_state.cpp (renamed from 3rdparty/asio/src/tests/unit/signal_set_service.cpp)8
-rw-r--r--3rdparty/asio/src/tests/unit/cancellation_type.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/co_spawn.cpp133
-rw-r--r--3rdparty/asio/src/tests/unit/completion_condition.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/compose.cpp528
-rw-r--r--3rdparty/asio/src/tests/unit/connect.cpp1159
-rw-r--r--3rdparty/asio/src/tests/unit/connect_pipe.cpp154
-rw-r--r--3rdparty/asio/src/tests/unit/consign.cpp56
-rw-r--r--3rdparty/asio/src/tests/unit/coroutine.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/deadline_timer.cpp92
-rw-r--r--3rdparty/asio/src/tests/unit/defer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/deferred.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/detached.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/dispatch.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/error.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/execution/any_executor.cpp1202
-rw-r--r--3rdparty/asio/src/tests/unit/execution/blocking.cpp1921
-rw-r--r--3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp1323
-rw-r--r--3rdparty/asio/src/tests/unit/execution/context_as.cpp147
-rw-r--r--3rdparty/asio/src/tests/unit/execution/executor.cpp106
-rw-r--r--3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp (renamed from 3rdparty/asio/src/tests/unit/windows/basic_handle.cpp)11
-rw-r--r--3rdparty/asio/src/tests/unit/execution/mapping.cpp1985
-rw-r--r--3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp1252
-rw-r--r--3rdparty/asio/src/tests/unit/execution/prefer_only.cpp533
-rw-r--r--3rdparty/asio/src/tests/unit/execution/relationship.cpp1252
-rw-r--r--3rdparty/asio/src/tests/unit/execution_context.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/executor_work_guard.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp297
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp (renamed from 3rdparty/asio/src/tests/unit/posix/stream_descriptor_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/channel.cpp888
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp (renamed from 3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp)11
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/co_composed.cpp518
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp165
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp113
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp179
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp67
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp172
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp116
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp45
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp264
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp83
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp77
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/promise.cpp226
-rw-r--r--3rdparty/asio/src/tests/unit/file_base.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/generic/.gitignore14
-rw-r--r--3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp53
-rw-r--r--3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp54
-rw-r--r--3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp31
-rw-r--r--3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp39
-rw-r--r--3rdparty/asio/src/tests/unit/high_resolution_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/io_context.cpp230
-rw-r--r--3rdparty/asio/src/tests/unit/io_context_strand.cpp316
-rw-r--r--3rdparty/asio/src/tests/unit/ip/.gitignore28
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address.cpp17
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v4.cpp19
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v6.cpp19
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/host_name.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/icmp.cpp238
-rw-r--r--3rdparty/asio/src/tests/unit/ip/multicast.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/network_v4.cpp27
-rw-r--r--3rdparty/asio/src/tests/unit/ip/network_v6.cpp27
-rw-r--r--3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/tcp.cpp424
-rw-r--r--3rdparty/asio/src/tests/unit/ip/udp.cpp259
-rw-r--r--3rdparty/asio/src/tests/unit/ip/unicast.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/v6_only.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/is_read_buffered.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/is_write_buffered.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/local/.gitignore13
-rw-r--r--3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/local/connect_pair.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp209
-rw-r--r--3rdparty/asio/src/tests/unit/local/stream_protocol.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/packaged_task.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/placeholders.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/.gitignore15
-rw-r--r--3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/descriptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp35
-rw-r--r--3rdparty/asio/src/tests/unit/post.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/prepend.cpp58
-rw-r--r--3rdparty/asio/src/tests/unit/random_access_file.cpp171
-rw-r--r--3rdparty/asio/src/tests/unit/read.cpp1258
-rw-r--r--3rdparty/asio/src/tests/unit/read_at.cpp259
-rw-r--r--3rdparty/asio/src/tests/unit/read_until.cpp820
-rw-r--r--3rdparty/asio/src/tests/unit/readable_pipe.cpp131
-rw-r--r--3rdparty/asio/src/tests/unit/recycling_allocator.cpp80
-rw-r--r--3rdparty/asio/src/tests/unit/redirect_error.cpp121
-rw-r--r--3rdparty/asio/src/tests/unit/registered_buffer.cpp111
-rw-r--r--3rdparty/asio/src/tests/unit/serial_port.cpp50
-rw-r--r--3rdparty/asio/src/tests/unit/serial_port_base.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/serial_port_service.cpp26
-rw-r--r--3rdparty/asio/src/tests/unit/signal_set.cpp21
-rw-r--r--3rdparty/asio/src/tests/unit/signal_set_base.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/socket_acceptor_service.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/socket_base.cpp15
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/.gitignore14
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/context.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/context_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/error.cpp (renamed from 3rdparty/asio/src/tests/unit/ip/resolver_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp (renamed from 3rdparty/asio/src/tests/unit/waitable_timer_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/stream.cpp24
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/stream_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/static_thread_pool.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/steady_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/strand.cpp270
-rw-r--r--3rdparty/asio/src/tests/unit/stream_file.cpp173
-rw-r--r--3rdparty/asio/src/tests/unit/streambuf.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/system_context.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/system_executor.cpp147
-rw-r--r--3rdparty/asio/src/tests/unit/system_timer.cpp192
-rw-r--r--3rdparty/asio/src/tests/unit/this_coro.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/thread.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/thread_pool.cpp283
-rw-r--r--3rdparty/asio/src/tests/unit/time_traits.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/buffer.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/ts/executor.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/ts/internet.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/ts/io_context.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/ts/net.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/ts/netfwd.cpp33
-rw-r--r--3rdparty/asio/src/tests/unit/ts/socket.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/ts/timer.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/unit_test.hpp21
-rw-r--r--3rdparty/asio/src/tests/unit/use_awaitable.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/use_future.cpp684
-rw-r--r--3rdparty/asio/src/tests/unit/uses_executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/wait_traits.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/.gitignore21
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp5
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp (renamed from 3rdparty/asio/src/tests/unit/datagram_socket_service.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp5
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp5
-rw-r--r--3rdparty/asio/src/tests/unit/windows/object_handle.cpp44
-rw-r--r--3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp32
-rw-r--r--3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp53
-rw-r--r--3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp26
-rw-r--r--3rdparty/asio/src/tests/unit/windows/stream_handle.cpp53
-rw-r--r--3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp26
-rw-r--r--3rdparty/asio/src/tests/unit/writable_pipe.cpp136
-rw-r--r--3rdparty/asio/src/tests/unit/write.cpp1194
-rw-r--r--3rdparty/asio/src/tests/unit/write_at.cpp289
-rwxr-xr-x3rdparty/asio/src/tools/handlerlive.pl89
-rwxr-xr-x3rdparty/asio/src/tools/handlertree.pl140
-rwxr-xr-x[-rw-r--r--]3rdparty/asio/src/tools/handlerviz.pl100
-rwxr-xr-x3rdparty/asio/test-driver153
-rw-r--r--3rdparty/asio/tsify.pl551
1549 files changed, 170064 insertions, 175047 deletions
diff --git a/3rdparty/asio/.gitignore b/3rdparty/asio/.gitignore
deleted file mode 100644
index 5ef5e3ac3ea..00000000000
--- a/3rdparty/asio/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-compile
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-missing
-test-driver
-/doc
-/lib
-/boostified
-*.gz
-*.bz2
-*.zip
-/*.cpp
-/*.hpp
diff --git a/3rdparty/asio/COPYING b/3rdparty/asio/COPYING
index 5a0dd10d837..da1a2db4d7b 100644
--- a/3rdparty/asio/COPYING
+++ b/3rdparty/asio/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/INSTALL b/3rdparty/asio/INSTALL
index f045678c43f..1dd78db1878 100644
--- a/3rdparty/asio/INSTALL
+++ b/3rdparty/asio/INSTALL
@@ -1,5 +1,5 @@
See doc/index.html for information on:
- External dependencies
- - Using asio
+ - Using, building, and configuring Asio
- Supported platforms
- How to build the tests and examples
diff --git a/3rdparty/asio/Makefile.am b/3rdparty/asio/Makefile.am
index 0acdc02d9a1..bc4f75b3553 100644
--- a/3rdparty/asio/Makefile.am
+++ b/3rdparty/asio/Makefile.am
@@ -1,5 +1,8 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip
+pkgconfig_DATA = asio.pc
+pkgconfigdir = $(libdir)/pkgconfig
+
SUBDIRS = include src
MAINTAINERCLEANFILES = \
diff --git a/3rdparty/asio/Makefile.in b/3rdparty/asio/Makefile.in
new file mode 100644
index 00000000000..e3f325123c4
--- /dev/null
+++ b/3rdparty/asio/Makefile.in
@@ -0,0 +1,845 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = asio.pc
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/asio.pc.in COPYING \
+ INSTALL README compile config.guess config.sub depcomp \
+ install-sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip
+GZIP_ENV = --best
+DIST_TARGETS = dist-bzip2 dist-gzip dist-zip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = $(libdir)/pkgconfig
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip
+pkgconfig_DATA = asio.pc
+SUBDIRS = include src
+MAINTAINERCLEANFILES = \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/configure \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.sub \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ $(srcdir)/Makefile.in \
+ asio-*.tar.gz
+
+EXTRA_DIST = \
+ LICENSE_1_0.txt \
+ doc
+
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+asio.pc: $(top_builddir)/config.status $(srcdir)/asio.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pkgconfigDATA
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
+ dist-zstd distcheck distclean distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-pkgconfigDATA install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/README b/3rdparty/asio/README
index a7f2a3da81d..7c7d49dd49e 100644
--- a/3rdparty/asio/README
+++ b/3rdparty/asio/README
@@ -1,4 +1,4 @@
-asio version 1.11.0
-Released Monday, 16 February 2015.
+asio version 1.30.2
+Released Tuesday, 16 April 2024.
See doc/index.html for API documentation and a tutorial.
diff --git a/3rdparty/asio/aclocal.m4 b/3rdparty/asio/aclocal.m4
new file mode 100644
index 00000000000..00ffbd53c14
--- /dev/null
+++ b/3rdparty/asio/aclocal.m4
@@ -0,0 +1,1462 @@
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $2])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.16'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.16.5], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/3rdparty/asio/asio.manifest b/3rdparty/asio/asio.manifest
deleted file mode 100644
index cc113eb15a3..00000000000
--- a/3rdparty/asio/asio.manifest
+++ /dev/null
@@ -1,5055 +0,0 @@
-/
-/aclocal.m4
-/compile
-/config.guess
-/config.sub
-/configure
-/configure.ac
-/COPYING
-/depcomp
-/doc/
-/doc/asio/
-/doc/asio/examples/
-/doc/asio/examples/cpp03_examples.html
-/doc/asio/examples/cpp11_examples.html
-/doc/asio/examples.html
-/doc/asio/history.html
-/doc/asio/index.html
-/doc/asio/overview/
-/doc/asio/overview/core/
-/doc/asio/overview/core/allocation.html
-/doc/asio/overview/core/async.html
-/doc/asio/overview/core/basics.html
-/doc/asio/overview/core/buffers.html
-/doc/asio/overview/core/coroutine.html
-/doc/asio/overview/core/handler_tracking.html
-/doc/asio/overview/core.html
-/doc/asio/overview/core/line_based.html
-/doc/asio/overview/core/reactor.html
-/doc/asio/overview/core/spawn.html
-/doc/asio/overview/core/strands.html
-/doc/asio/overview/core/streams.html
-/doc/asio/overview/core/threads.html
-/doc/asio/overview/cpp2011/
-/doc/asio/overview/cpp2011/array.html
-/doc/asio/overview/cpp2011/atomic.html
-/doc/asio/overview/cpp2011/chrono.html
-/doc/asio/overview/cpp2011/futures.html
-/doc/asio/overview/cpp2011.html
-/doc/asio/overview/cpp2011/move_handlers.html
-/doc/asio/overview/cpp2011/move_objects.html
-/doc/asio/overview/cpp2011/shared_ptr.html
-/doc/asio/overview/cpp2011/system_error.html
-/doc/asio/overview/cpp2011/variadic.html
-/doc/asio/overview.html
-/doc/asio/overview/implementation.html
-/doc/asio/overview/networking/
-/doc/asio/overview/networking/bsd_sockets.html
-/doc/asio/overview/networking.html
-/doc/asio/overview/networking/iostreams.html
-/doc/asio/overview/networking/other_protocols.html
-/doc/asio/overview/networking/protocols.html
-/doc/asio/overview/posix/
-/doc/asio/overview/posix/fork.html
-/doc/asio/overview/posix.html
-/doc/asio/overview/posix/local.html
-/doc/asio/overview/posix/stream_descriptor.html
-/doc/asio/overview/rationale.html
-/doc/asio/overview/serial_ports.html
-/doc/asio/overview/signals.html
-/doc/asio/overview/ssl.html
-/doc/asio/overview/timers.html
-/doc/asio/overview/windows/
-/doc/asio/overview/windows.html
-/doc/asio/overview/windows/object_handle.html
-/doc/asio/overview/windows/random_access_handle.html
-/doc/asio/overview/windows/stream_handle.html
-/doc/asio.png
-/doc/asio/reference/
-/doc/asio/reference/AcceptHandler.html
-/doc/asio/reference/add_service.html
-/doc/asio/reference/asio_handler_allocate.html
-/doc/asio/reference/asio_handler_deallocate.html
-/doc/asio/reference/asio_handler_invoke/
-/doc/asio/reference/asio_handler_invoke.html
-/doc/asio/reference/asio_handler_invoke/overload1.html
-/doc/asio/reference/asio_handler_invoke/overload2.html
-/doc/asio/reference/asio_handler_is_continuation.html
-/doc/asio/reference/associated_allocator/
-/doc/asio/reference/associated_allocator/get.html
-/doc/asio/reference/associated_allocator.html
-/doc/asio/reference/associated_allocator/type.html
-/doc/asio/reference/associated_executor/
-/doc/asio/reference/associated_executor/get.html
-/doc/asio/reference/associated_executor.html
-/doc/asio/reference/associated_executor/type.html
-/doc/asio/reference/async_completion/
-/doc/asio/reference/async_completion/async_completion.html
-/doc/asio/reference/async_completion/handler.html
-/doc/asio/reference/async_completion/handler_type.html
-/doc/asio/reference/async_completion.html
-/doc/asio/reference/async_completion/result.html
-/doc/asio/reference/async_connect/
-/doc/asio/reference/async_connect.html
-/doc/asio/reference/async_connect/overload1.html
-/doc/asio/reference/async_connect/overload2.html
-/doc/asio/reference/async_connect/overload3.html
-/doc/asio/reference/async_connect/overload4.html
-/doc/asio/reference/asynchronous_operations.html
-/doc/asio/reference/AsyncRandomAccessReadDevice.html
-/doc/asio/reference/AsyncRandomAccessWriteDevice.html
-/doc/asio/reference/async_read/
-/doc/asio/reference/async_read_at/
-/doc/asio/reference/async_read_at.html
-/doc/asio/reference/async_read_at/overload1.html
-/doc/asio/reference/async_read_at/overload2.html
-/doc/asio/reference/async_read_at/overload3.html
-/doc/asio/reference/async_read_at/overload4.html
-/doc/asio/reference/async_read.html
-/doc/asio/reference/async_read/overload1.html
-/doc/asio/reference/async_read/overload2.html
-/doc/asio/reference/async_read/overload3.html
-/doc/asio/reference/async_read/overload4.html
-/doc/asio/reference/async_read/overload5.html
-/doc/asio/reference/async_read/overload6.html
-/doc/asio/reference/AsyncReadStream.html
-/doc/asio/reference/async_read_until/
-/doc/asio/reference/async_read_until.html
-/doc/asio/reference/async_read_until/overload1.html
-/doc/asio/reference/async_read_until/overload2.html
-/doc/asio/reference/async_read_until/overload3.html
-/doc/asio/reference/async_read_until/overload4.html
-/doc/asio/reference/async_read_until/overload5.html
-/doc/asio/reference/async_read_until/overload6.html
-/doc/asio/reference/async_read_until/overload7.html
-/doc/asio/reference/async_read_until/overload8.html
-/doc/asio/reference/async_result/
-/doc/asio/reference/async_result/async_result.html
-/doc/asio/reference/async_result/get.html
-/doc/asio/reference/async_result.html
-/doc/asio/reference/async_result/type.html
-/doc/asio/reference/async_write/
-/doc/asio/reference/async_write_at/
-/doc/asio/reference/async_write_at.html
-/doc/asio/reference/async_write_at/overload1.html
-/doc/asio/reference/async_write_at/overload2.html
-/doc/asio/reference/async_write_at/overload3.html
-/doc/asio/reference/async_write_at/overload4.html
-/doc/asio/reference/async_write.html
-/doc/asio/reference/async_write/overload1.html
-/doc/asio/reference/async_write/overload2.html
-/doc/asio/reference/async_write/overload3.html
-/doc/asio/reference/async_write/overload4.html
-/doc/asio/reference/async_write/overload5.html
-/doc/asio/reference/async_write/overload6.html
-/doc/asio/reference/AsyncWriteStream.html
-/doc/asio/reference/bad_executor/
-/doc/asio/reference/bad_executor/bad_executor.html
-/doc/asio/reference/bad_executor.html
-/doc/asio/reference/bad_executor/what.html
-/doc/asio/reference/basic_datagram_socket/
-/doc/asio/reference/basic_datagram_socket/assign/
-/doc/asio/reference/basic_datagram_socket/assign.html
-/doc/asio/reference/basic_datagram_socket/assign/overload1.html
-/doc/asio/reference/basic_datagram_socket/assign/overload2.html
-/doc/asio/reference/basic_datagram_socket/async_connect.html
-/doc/asio/reference/basic_datagram_socket/async_receive/
-/doc/asio/reference/basic_datagram_socket/async_receive_from/
-/doc/asio/reference/basic_datagram_socket/async_receive_from.html
-/doc/asio/reference/basic_datagram_socket/async_receive_from/overload1.html
-/doc/asio/reference/basic_datagram_socket/async_receive_from/overload2.html
-/doc/asio/reference/basic_datagram_socket/async_receive.html
-/doc/asio/reference/basic_datagram_socket/async_receive/overload1.html
-/doc/asio/reference/basic_datagram_socket/async_receive/overload2.html
-/doc/asio/reference/basic_datagram_socket/async_send/
-/doc/asio/reference/basic_datagram_socket/async_send.html
-/doc/asio/reference/basic_datagram_socket/async_send/overload1.html
-/doc/asio/reference/basic_datagram_socket/async_send/overload2.html
-/doc/asio/reference/basic_datagram_socket/async_send_to/
-/doc/asio/reference/basic_datagram_socket/async_send_to.html
-/doc/asio/reference/basic_datagram_socket/async_send_to/overload1.html
-/doc/asio/reference/basic_datagram_socket/async_send_to/overload2.html
-/doc/asio/reference/basic_datagram_socket/async_wait.html
-/doc/asio/reference/basic_datagram_socket/at_mark/
-/doc/asio/reference/basic_datagram_socket/at_mark.html
-/doc/asio/reference/basic_datagram_socket/at_mark/overload1.html
-/doc/asio/reference/basic_datagram_socket/at_mark/overload2.html
-/doc/asio/reference/basic_datagram_socket/available/
-/doc/asio/reference/basic_datagram_socket/available.html
-/doc/asio/reference/basic_datagram_socket/available/overload1.html
-/doc/asio/reference/basic_datagram_socket/available/overload2.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/overload1.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/overload2.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/overload3.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/overload4.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/overload5.html
-/doc/asio/reference/basic_datagram_socket/basic_datagram_socket/overload6.html
-/doc/asio/reference/basic_datagram_socket/bind/
-/doc/asio/reference/basic_datagram_socket/bind.html
-/doc/asio/reference/basic_datagram_socket/bind/overload1.html
-/doc/asio/reference/basic_datagram_socket/bind/overload2.html
-/doc/asio/reference/basic_datagram_socket/broadcast.html
-/doc/asio/reference/basic_datagram_socket/bytes_readable.html
-/doc/asio/reference/basic_datagram_socket/cancel/
-/doc/asio/reference/basic_datagram_socket/cancel.html
-/doc/asio/reference/basic_datagram_socket/cancel/overload1.html
-/doc/asio/reference/basic_datagram_socket/cancel/overload2.html
-/doc/asio/reference/basic_datagram_socket/close/
-/doc/asio/reference/basic_datagram_socket/close.html
-/doc/asio/reference/basic_datagram_socket/close/overload1.html
-/doc/asio/reference/basic_datagram_socket/close/overload2.html
-/doc/asio/reference/basic_datagram_socket/connect/
-/doc/asio/reference/basic_datagram_socket/connect.html
-/doc/asio/reference/basic_datagram_socket/connect/overload1.html
-/doc/asio/reference/basic_datagram_socket/connect/overload2.html
-/doc/asio/reference/basic_datagram_socket/debug.html
-/doc/asio/reference/basic_datagram_socket/do_not_route.html
-/doc/asio/reference/basic_datagram_socket/enable_connection_aborted.html
-/doc/asio/reference/basic_datagram_socket/endpoint_type.html
-/doc/asio/reference/basic_datagram_socket/executor_type.html
-/doc/asio/reference/basic_datagram_socket/get_executor.html
-/doc/asio/reference/basic_datagram_socket/get_implementation/
-/doc/asio/reference/basic_datagram_socket/get_implementation.html
-/doc/asio/reference/basic_datagram_socket/get_implementation/overload1.html
-/doc/asio/reference/basic_datagram_socket/get_implementation/overload2.html
-/doc/asio/reference/basic_datagram_socket/get_io_service.html
-/doc/asio/reference/basic_datagram_socket/get_option/
-/doc/asio/reference/basic_datagram_socket/get_option.html
-/doc/asio/reference/basic_datagram_socket/get_option/overload1.html
-/doc/asio/reference/basic_datagram_socket/get_option/overload2.html
-/doc/asio/reference/basic_datagram_socket/get_service/
-/doc/asio/reference/basic_datagram_socket/get_service.html
-/doc/asio/reference/basic_datagram_socket/get_service/overload1.html
-/doc/asio/reference/basic_datagram_socket/get_service/overload2.html
-/doc/asio/reference/basic_datagram_socket.html
-/doc/asio/reference/basic_datagram_socket/implementation_type.html
-/doc/asio/reference/basic_datagram_socket/io_control/
-/doc/asio/reference/basic_datagram_socket/io_control.html
-/doc/asio/reference/basic_datagram_socket/io_control/overload1.html
-/doc/asio/reference/basic_datagram_socket/io_control/overload2.html
-/doc/asio/reference/basic_datagram_socket/is_open.html
-/doc/asio/reference/basic_datagram_socket/keep_alive.html
-/doc/asio/reference/basic_datagram_socket/linger.html
-/doc/asio/reference/basic_datagram_socket/local_endpoint/
-/doc/asio/reference/basic_datagram_socket/local_endpoint.html
-/doc/asio/reference/basic_datagram_socket/local_endpoint/overload1.html
-/doc/asio/reference/basic_datagram_socket/local_endpoint/overload2.html
-/doc/asio/reference/basic_datagram_socket/lowest_layer/
-/doc/asio/reference/basic_datagram_socket/lowest_layer.html
-/doc/asio/reference/basic_datagram_socket/lowest_layer/overload1.html
-/doc/asio/reference/basic_datagram_socket/lowest_layer/overload2.html
-/doc/asio/reference/basic_datagram_socket/lowest_layer_type.html
-/doc/asio/reference/basic_datagram_socket/max_connections.html
-/doc/asio/reference/basic_datagram_socket/message_do_not_route.html
-/doc/asio/reference/basic_datagram_socket/message_end_of_record.html
-/doc/asio/reference/basic_datagram_socket/message_flags.html
-/doc/asio/reference/basic_datagram_socket/message_out_of_band.html
-/doc/asio/reference/basic_datagram_socket/message_peek.html
-/doc/asio/reference/basic_datagram_socket/native_handle.html
-/doc/asio/reference/basic_datagram_socket/native_handle_type.html
-/doc/asio/reference/basic_datagram_socket/native_non_blocking/
-/doc/asio/reference/basic_datagram_socket/native_non_blocking.html
-/doc/asio/reference/basic_datagram_socket/native_non_blocking/overload1.html
-/doc/asio/reference/basic_datagram_socket/native_non_blocking/overload2.html
-/doc/asio/reference/basic_datagram_socket/native_non_blocking/overload3.html
-/doc/asio/reference/basic_datagram_socket/non_blocking/
-/doc/asio/reference/basic_datagram_socket/non_blocking.html
-/doc/asio/reference/basic_datagram_socket/non_blocking/overload1.html
-/doc/asio/reference/basic_datagram_socket/non_blocking/overload2.html
-/doc/asio/reference/basic_datagram_socket/non_blocking/overload3.html
-/doc/asio/reference/basic_datagram_socket/open/
-/doc/asio/reference/basic_datagram_socket/open.html
-/doc/asio/reference/basic_datagram_socket/open/overload1.html
-/doc/asio/reference/basic_datagram_socket/open/overload2.html
-/doc/asio/reference/basic_datagram_socket/operator_eq_/
-/doc/asio/reference/basic_datagram_socket/operator_eq_.html
-/doc/asio/reference/basic_datagram_socket/operator_eq_/overload1.html
-/doc/asio/reference/basic_datagram_socket/operator_eq_/overload2.html
-/doc/asio/reference/basic_datagram_socket/protocol_type.html
-/doc/asio/reference/basic_datagram_socket/receive/
-/doc/asio/reference/basic_datagram_socket/receive_buffer_size.html
-/doc/asio/reference/basic_datagram_socket/receive_from/
-/doc/asio/reference/basic_datagram_socket/receive_from.html
-/doc/asio/reference/basic_datagram_socket/receive_from/overload1.html
-/doc/asio/reference/basic_datagram_socket/receive_from/overload2.html
-/doc/asio/reference/basic_datagram_socket/receive_from/overload3.html
-/doc/asio/reference/basic_datagram_socket/receive.html
-/doc/asio/reference/basic_datagram_socket/receive_low_watermark.html
-/doc/asio/reference/basic_datagram_socket/receive/overload1.html
-/doc/asio/reference/basic_datagram_socket/receive/overload2.html
-/doc/asio/reference/basic_datagram_socket/receive/overload3.html
-/doc/asio/reference/basic_datagram_socket/remote_endpoint/
-/doc/asio/reference/basic_datagram_socket/remote_endpoint.html
-/doc/asio/reference/basic_datagram_socket/remote_endpoint/overload1.html
-/doc/asio/reference/basic_datagram_socket/remote_endpoint/overload2.html
-/doc/asio/reference/basic_datagram_socket/reuse_address.html
-/doc/asio/reference/basic_datagram_socket/send/
-/doc/asio/reference/basic_datagram_socket/send_buffer_size.html
-/doc/asio/reference/basic_datagram_socket/send.html
-/doc/asio/reference/basic_datagram_socket/send_low_watermark.html
-/doc/asio/reference/basic_datagram_socket/send/overload1.html
-/doc/asio/reference/basic_datagram_socket/send/overload2.html
-/doc/asio/reference/basic_datagram_socket/send/overload3.html
-/doc/asio/reference/basic_datagram_socket/send_to/
-/doc/asio/reference/basic_datagram_socket/send_to.html
-/doc/asio/reference/basic_datagram_socket/send_to/overload1.html
-/doc/asio/reference/basic_datagram_socket/send_to/overload2.html
-/doc/asio/reference/basic_datagram_socket/send_to/overload3.html
-/doc/asio/reference/basic_datagram_socket/service_type.html
-/doc/asio/reference/basic_datagram_socket/set_option/
-/doc/asio/reference/basic_datagram_socket/set_option.html
-/doc/asio/reference/basic_datagram_socket/set_option/overload1.html
-/doc/asio/reference/basic_datagram_socket/set_option/overload2.html
-/doc/asio/reference/basic_datagram_socket/shutdown/
-/doc/asio/reference/basic_datagram_socket/shutdown.html
-/doc/asio/reference/basic_datagram_socket/shutdown/overload1.html
-/doc/asio/reference/basic_datagram_socket/shutdown/overload2.html
-/doc/asio/reference/basic_datagram_socket/shutdown_type.html
-/doc/asio/reference/basic_datagram_socket/wait/
-/doc/asio/reference/basic_datagram_socket/wait.html
-/doc/asio/reference/basic_datagram_socket/wait/overload1.html
-/doc/asio/reference/basic_datagram_socket/wait/overload2.html
-/doc/asio/reference/basic_datagram_socket/wait_type.html
-/doc/asio/reference/basic_deadline_timer/
-/doc/asio/reference/basic_deadline_timer/async_wait.html
-/doc/asio/reference/basic_deadline_timer/basic_deadline_timer/
-/doc/asio/reference/basic_deadline_timer/basic_deadline_timer.html
-/doc/asio/reference/basic_deadline_timer/basic_deadline_timer/overload1.html
-/doc/asio/reference/basic_deadline_timer/basic_deadline_timer/overload2.html
-/doc/asio/reference/basic_deadline_timer/basic_deadline_timer/overload3.html
-/doc/asio/reference/basic_deadline_timer/cancel/
-/doc/asio/reference/basic_deadline_timer/cancel.html
-/doc/asio/reference/basic_deadline_timer/cancel_one/
-/doc/asio/reference/basic_deadline_timer/cancel_one.html
-/doc/asio/reference/basic_deadline_timer/cancel_one/overload1.html
-/doc/asio/reference/basic_deadline_timer/cancel_one/overload2.html
-/doc/asio/reference/basic_deadline_timer/cancel/overload1.html
-/doc/asio/reference/basic_deadline_timer/cancel/overload2.html
-/doc/asio/reference/basic_deadline_timer/duration_type.html
-/doc/asio/reference/basic_deadline_timer/executor_type.html
-/doc/asio/reference/basic_deadline_timer/expires_at/
-/doc/asio/reference/basic_deadline_timer/expires_at.html
-/doc/asio/reference/basic_deadline_timer/expires_at/overload1.html
-/doc/asio/reference/basic_deadline_timer/expires_at/overload2.html
-/doc/asio/reference/basic_deadline_timer/expires_at/overload3.html
-/doc/asio/reference/basic_deadline_timer/expires_from_now/
-/doc/asio/reference/basic_deadline_timer/expires_from_now.html
-/doc/asio/reference/basic_deadline_timer/expires_from_now/overload1.html
-/doc/asio/reference/basic_deadline_timer/expires_from_now/overload2.html
-/doc/asio/reference/basic_deadline_timer/expires_from_now/overload3.html
-/doc/asio/reference/basic_deadline_timer/get_executor.html
-/doc/asio/reference/basic_deadline_timer/get_implementation/
-/doc/asio/reference/basic_deadline_timer/get_implementation.html
-/doc/asio/reference/basic_deadline_timer/get_implementation/overload1.html
-/doc/asio/reference/basic_deadline_timer/get_implementation/overload2.html
-/doc/asio/reference/basic_deadline_timer/get_io_service.html
-/doc/asio/reference/basic_deadline_timer/get_service/
-/doc/asio/reference/basic_deadline_timer/get_service.html
-/doc/asio/reference/basic_deadline_timer/get_service/overload1.html
-/doc/asio/reference/basic_deadline_timer/get_service/overload2.html
-/doc/asio/reference/basic_deadline_timer.html
-/doc/asio/reference/basic_deadline_timer/implementation_type.html
-/doc/asio/reference/basic_deadline_timer/service_type.html
-/doc/asio/reference/basic_deadline_timer/time_type.html
-/doc/asio/reference/basic_deadline_timer/traits_type.html
-/doc/asio/reference/basic_deadline_timer/wait/
-/doc/asio/reference/basic_deadline_timer/wait.html
-/doc/asio/reference/basic_deadline_timer/wait/overload1.html
-/doc/asio/reference/basic_deadline_timer/wait/overload2.html
-/doc/asio/reference/basic_io_object/
-/doc/asio/reference/basic_io_object/basic_io_object/
-/doc/asio/reference/basic_io_object/_basic_io_object.html
-/doc/asio/reference/basic_io_object/basic_io_object.html
-/doc/asio/reference/basic_io_object/basic_io_object/overload1.html
-/doc/asio/reference/basic_io_object/basic_io_object/overload2.html
-/doc/asio/reference/basic_io_object/executor_type.html
-/doc/asio/reference/basic_io_object/get_executor.html
-/doc/asio/reference/basic_io_object/get_implementation/
-/doc/asio/reference/basic_io_object/get_implementation.html
-/doc/asio/reference/basic_io_object/get_implementation/overload1.html
-/doc/asio/reference/basic_io_object/get_implementation/overload2.html
-/doc/asio/reference/basic_io_object/get_io_service.html
-/doc/asio/reference/basic_io_object/get_service/
-/doc/asio/reference/basic_io_object/get_service.html
-/doc/asio/reference/basic_io_object/get_service/overload1.html
-/doc/asio/reference/basic_io_object/get_service/overload2.html
-/doc/asio/reference/basic_io_object.html
-/doc/asio/reference/basic_io_object/implementation_type.html
-/doc/asio/reference/basic_io_object/operator_eq_.html
-/doc/asio/reference/basic_io_object/service_type.html
-/doc/asio/reference/basic_raw_socket/
-/doc/asio/reference/basic_raw_socket/assign/
-/doc/asio/reference/basic_raw_socket/assign.html
-/doc/asio/reference/basic_raw_socket/assign/overload1.html
-/doc/asio/reference/basic_raw_socket/assign/overload2.html
-/doc/asio/reference/basic_raw_socket/async_connect.html
-/doc/asio/reference/basic_raw_socket/async_receive/
-/doc/asio/reference/basic_raw_socket/async_receive_from/
-/doc/asio/reference/basic_raw_socket/async_receive_from.html
-/doc/asio/reference/basic_raw_socket/async_receive_from/overload1.html
-/doc/asio/reference/basic_raw_socket/async_receive_from/overload2.html
-/doc/asio/reference/basic_raw_socket/async_receive.html
-/doc/asio/reference/basic_raw_socket/async_receive/overload1.html
-/doc/asio/reference/basic_raw_socket/async_receive/overload2.html
-/doc/asio/reference/basic_raw_socket/async_send/
-/doc/asio/reference/basic_raw_socket/async_send.html
-/doc/asio/reference/basic_raw_socket/async_send/overload1.html
-/doc/asio/reference/basic_raw_socket/async_send/overload2.html
-/doc/asio/reference/basic_raw_socket/async_send_to/
-/doc/asio/reference/basic_raw_socket/async_send_to.html
-/doc/asio/reference/basic_raw_socket/async_send_to/overload1.html
-/doc/asio/reference/basic_raw_socket/async_send_to/overload2.html
-/doc/asio/reference/basic_raw_socket/async_wait.html
-/doc/asio/reference/basic_raw_socket/at_mark/
-/doc/asio/reference/basic_raw_socket/at_mark.html
-/doc/asio/reference/basic_raw_socket/at_mark/overload1.html
-/doc/asio/reference/basic_raw_socket/at_mark/overload2.html
-/doc/asio/reference/basic_raw_socket/available/
-/doc/asio/reference/basic_raw_socket/available.html
-/doc/asio/reference/basic_raw_socket/available/overload1.html
-/doc/asio/reference/basic_raw_socket/available/overload2.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/
-/doc/asio/reference/basic_raw_socket/basic_raw_socket.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/overload1.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/overload2.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/overload3.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/overload4.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/overload5.html
-/doc/asio/reference/basic_raw_socket/basic_raw_socket/overload6.html
-/doc/asio/reference/basic_raw_socket/bind/
-/doc/asio/reference/basic_raw_socket/bind.html
-/doc/asio/reference/basic_raw_socket/bind/overload1.html
-/doc/asio/reference/basic_raw_socket/bind/overload2.html
-/doc/asio/reference/basic_raw_socket/broadcast.html
-/doc/asio/reference/basic_raw_socket/bytes_readable.html
-/doc/asio/reference/basic_raw_socket/cancel/
-/doc/asio/reference/basic_raw_socket/cancel.html
-/doc/asio/reference/basic_raw_socket/cancel/overload1.html
-/doc/asio/reference/basic_raw_socket/cancel/overload2.html
-/doc/asio/reference/basic_raw_socket/close/
-/doc/asio/reference/basic_raw_socket/close.html
-/doc/asio/reference/basic_raw_socket/close/overload1.html
-/doc/asio/reference/basic_raw_socket/close/overload2.html
-/doc/asio/reference/basic_raw_socket/connect/
-/doc/asio/reference/basic_raw_socket/connect.html
-/doc/asio/reference/basic_raw_socket/connect/overload1.html
-/doc/asio/reference/basic_raw_socket/connect/overload2.html
-/doc/asio/reference/basic_raw_socket/debug.html
-/doc/asio/reference/basic_raw_socket/do_not_route.html
-/doc/asio/reference/basic_raw_socket/enable_connection_aborted.html
-/doc/asio/reference/basic_raw_socket/endpoint_type.html
-/doc/asio/reference/basic_raw_socket/executor_type.html
-/doc/asio/reference/basic_raw_socket/get_executor.html
-/doc/asio/reference/basic_raw_socket/get_implementation/
-/doc/asio/reference/basic_raw_socket/get_implementation.html
-/doc/asio/reference/basic_raw_socket/get_implementation/overload1.html
-/doc/asio/reference/basic_raw_socket/get_implementation/overload2.html
-/doc/asio/reference/basic_raw_socket/get_io_service.html
-/doc/asio/reference/basic_raw_socket/get_option/
-/doc/asio/reference/basic_raw_socket/get_option.html
-/doc/asio/reference/basic_raw_socket/get_option/overload1.html
-/doc/asio/reference/basic_raw_socket/get_option/overload2.html
-/doc/asio/reference/basic_raw_socket/get_service/
-/doc/asio/reference/basic_raw_socket/get_service.html
-/doc/asio/reference/basic_raw_socket/get_service/overload1.html
-/doc/asio/reference/basic_raw_socket/get_service/overload2.html
-/doc/asio/reference/basic_raw_socket.html
-/doc/asio/reference/basic_raw_socket/implementation_type.html
-/doc/asio/reference/basic_raw_socket/io_control/
-/doc/asio/reference/basic_raw_socket/io_control.html
-/doc/asio/reference/basic_raw_socket/io_control/overload1.html
-/doc/asio/reference/basic_raw_socket/io_control/overload2.html
-/doc/asio/reference/basic_raw_socket/is_open.html
-/doc/asio/reference/basic_raw_socket/keep_alive.html
-/doc/asio/reference/basic_raw_socket/linger.html
-/doc/asio/reference/basic_raw_socket/local_endpoint/
-/doc/asio/reference/basic_raw_socket/local_endpoint.html
-/doc/asio/reference/basic_raw_socket/local_endpoint/overload1.html
-/doc/asio/reference/basic_raw_socket/local_endpoint/overload2.html
-/doc/asio/reference/basic_raw_socket/lowest_layer/
-/doc/asio/reference/basic_raw_socket/lowest_layer.html
-/doc/asio/reference/basic_raw_socket/lowest_layer/overload1.html
-/doc/asio/reference/basic_raw_socket/lowest_layer/overload2.html
-/doc/asio/reference/basic_raw_socket/lowest_layer_type.html
-/doc/asio/reference/basic_raw_socket/max_connections.html
-/doc/asio/reference/basic_raw_socket/message_do_not_route.html
-/doc/asio/reference/basic_raw_socket/message_end_of_record.html
-/doc/asio/reference/basic_raw_socket/message_flags.html
-/doc/asio/reference/basic_raw_socket/message_out_of_band.html
-/doc/asio/reference/basic_raw_socket/message_peek.html
-/doc/asio/reference/basic_raw_socket/native_handle.html
-/doc/asio/reference/basic_raw_socket/native_handle_type.html
-/doc/asio/reference/basic_raw_socket/native_non_blocking/
-/doc/asio/reference/basic_raw_socket/native_non_blocking.html
-/doc/asio/reference/basic_raw_socket/native_non_blocking/overload1.html
-/doc/asio/reference/basic_raw_socket/native_non_blocking/overload2.html
-/doc/asio/reference/basic_raw_socket/native_non_blocking/overload3.html
-/doc/asio/reference/basic_raw_socket/non_blocking/
-/doc/asio/reference/basic_raw_socket/non_blocking.html
-/doc/asio/reference/basic_raw_socket/non_blocking/overload1.html
-/doc/asio/reference/basic_raw_socket/non_blocking/overload2.html
-/doc/asio/reference/basic_raw_socket/non_blocking/overload3.html
-/doc/asio/reference/basic_raw_socket/open/
-/doc/asio/reference/basic_raw_socket/open.html
-/doc/asio/reference/basic_raw_socket/open/overload1.html
-/doc/asio/reference/basic_raw_socket/open/overload2.html
-/doc/asio/reference/basic_raw_socket/operator_eq_/
-/doc/asio/reference/basic_raw_socket/operator_eq_.html
-/doc/asio/reference/basic_raw_socket/operator_eq_/overload1.html
-/doc/asio/reference/basic_raw_socket/operator_eq_/overload2.html
-/doc/asio/reference/basic_raw_socket/protocol_type.html
-/doc/asio/reference/basic_raw_socket/receive/
-/doc/asio/reference/basic_raw_socket/receive_buffer_size.html
-/doc/asio/reference/basic_raw_socket/receive_from/
-/doc/asio/reference/basic_raw_socket/receive_from.html
-/doc/asio/reference/basic_raw_socket/receive_from/overload1.html
-/doc/asio/reference/basic_raw_socket/receive_from/overload2.html
-/doc/asio/reference/basic_raw_socket/receive_from/overload3.html
-/doc/asio/reference/basic_raw_socket/receive.html
-/doc/asio/reference/basic_raw_socket/receive_low_watermark.html
-/doc/asio/reference/basic_raw_socket/receive/overload1.html
-/doc/asio/reference/basic_raw_socket/receive/overload2.html
-/doc/asio/reference/basic_raw_socket/receive/overload3.html
-/doc/asio/reference/basic_raw_socket/remote_endpoint/
-/doc/asio/reference/basic_raw_socket/remote_endpoint.html
-/doc/asio/reference/basic_raw_socket/remote_endpoint/overload1.html
-/doc/asio/reference/basic_raw_socket/remote_endpoint/overload2.html
-/doc/asio/reference/basic_raw_socket/reuse_address.html
-/doc/asio/reference/basic_raw_socket/send/
-/doc/asio/reference/basic_raw_socket/send_buffer_size.html
-/doc/asio/reference/basic_raw_socket/send.html
-/doc/asio/reference/basic_raw_socket/send_low_watermark.html
-/doc/asio/reference/basic_raw_socket/send/overload1.html
-/doc/asio/reference/basic_raw_socket/send/overload2.html
-/doc/asio/reference/basic_raw_socket/send/overload3.html
-/doc/asio/reference/basic_raw_socket/send_to/
-/doc/asio/reference/basic_raw_socket/send_to.html
-/doc/asio/reference/basic_raw_socket/send_to/overload1.html
-/doc/asio/reference/basic_raw_socket/send_to/overload2.html
-/doc/asio/reference/basic_raw_socket/send_to/overload3.html
-/doc/asio/reference/basic_raw_socket/service_type.html
-/doc/asio/reference/basic_raw_socket/set_option/
-/doc/asio/reference/basic_raw_socket/set_option.html
-/doc/asio/reference/basic_raw_socket/set_option/overload1.html
-/doc/asio/reference/basic_raw_socket/set_option/overload2.html
-/doc/asio/reference/basic_raw_socket/shutdown/
-/doc/asio/reference/basic_raw_socket/shutdown.html
-/doc/asio/reference/basic_raw_socket/shutdown/overload1.html
-/doc/asio/reference/basic_raw_socket/shutdown/overload2.html
-/doc/asio/reference/basic_raw_socket/shutdown_type.html
-/doc/asio/reference/basic_raw_socket/wait/
-/doc/asio/reference/basic_raw_socket/wait.html
-/doc/asio/reference/basic_raw_socket/wait/overload1.html
-/doc/asio/reference/basic_raw_socket/wait/overload2.html
-/doc/asio/reference/basic_raw_socket/wait_type.html
-/doc/asio/reference/basic_seq_packet_socket/
-/doc/asio/reference/basic_seq_packet_socket/assign/
-/doc/asio/reference/basic_seq_packet_socket/assign.html
-/doc/asio/reference/basic_seq_packet_socket/assign/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/assign/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/async_connect.html
-/doc/asio/reference/basic_seq_packet_socket/async_receive/
-/doc/asio/reference/basic_seq_packet_socket/async_receive.html
-/doc/asio/reference/basic_seq_packet_socket/async_receive/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/async_receive/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/async_send.html
-/doc/asio/reference/basic_seq_packet_socket/async_wait.html
-/doc/asio/reference/basic_seq_packet_socket/at_mark/
-/doc/asio/reference/basic_seq_packet_socket/at_mark.html
-/doc/asio/reference/basic_seq_packet_socket/at_mark/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/at_mark/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/available/
-/doc/asio/reference/basic_seq_packet_socket/available.html
-/doc/asio/reference/basic_seq_packet_socket/available/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/available/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload3.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload4.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload5.html
-/doc/asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload6.html
-/doc/asio/reference/basic_seq_packet_socket/bind/
-/doc/asio/reference/basic_seq_packet_socket/bind.html
-/doc/asio/reference/basic_seq_packet_socket/bind/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/bind/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/broadcast.html
-/doc/asio/reference/basic_seq_packet_socket/bytes_readable.html
-/doc/asio/reference/basic_seq_packet_socket/cancel/
-/doc/asio/reference/basic_seq_packet_socket/cancel.html
-/doc/asio/reference/basic_seq_packet_socket/cancel/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/cancel/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/close/
-/doc/asio/reference/basic_seq_packet_socket/close.html
-/doc/asio/reference/basic_seq_packet_socket/close/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/close/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/connect/
-/doc/asio/reference/basic_seq_packet_socket/connect.html
-/doc/asio/reference/basic_seq_packet_socket/connect/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/connect/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/debug.html
-/doc/asio/reference/basic_seq_packet_socket/do_not_route.html
-/doc/asio/reference/basic_seq_packet_socket/enable_connection_aborted.html
-/doc/asio/reference/basic_seq_packet_socket/endpoint_type.html
-/doc/asio/reference/basic_seq_packet_socket/executor_type.html
-/doc/asio/reference/basic_seq_packet_socket/get_executor.html
-/doc/asio/reference/basic_seq_packet_socket/get_implementation/
-/doc/asio/reference/basic_seq_packet_socket/get_implementation.html
-/doc/asio/reference/basic_seq_packet_socket/get_implementation/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/get_implementation/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/get_io_service.html
-/doc/asio/reference/basic_seq_packet_socket/get_option/
-/doc/asio/reference/basic_seq_packet_socket/get_option.html
-/doc/asio/reference/basic_seq_packet_socket/get_option/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/get_option/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/get_service/
-/doc/asio/reference/basic_seq_packet_socket/get_service.html
-/doc/asio/reference/basic_seq_packet_socket/get_service/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/get_service/overload2.html
-/doc/asio/reference/basic_seq_packet_socket.html
-/doc/asio/reference/basic_seq_packet_socket/implementation_type.html
-/doc/asio/reference/basic_seq_packet_socket/io_control/
-/doc/asio/reference/basic_seq_packet_socket/io_control.html
-/doc/asio/reference/basic_seq_packet_socket/io_control/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/io_control/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/is_open.html
-/doc/asio/reference/basic_seq_packet_socket/keep_alive.html
-/doc/asio/reference/basic_seq_packet_socket/linger.html
-/doc/asio/reference/basic_seq_packet_socket/local_endpoint/
-/doc/asio/reference/basic_seq_packet_socket/local_endpoint.html
-/doc/asio/reference/basic_seq_packet_socket/local_endpoint/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/local_endpoint/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/lowest_layer/
-/doc/asio/reference/basic_seq_packet_socket/lowest_layer.html
-/doc/asio/reference/basic_seq_packet_socket/lowest_layer/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/lowest_layer/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/lowest_layer_type.html
-/doc/asio/reference/basic_seq_packet_socket/max_connections.html
-/doc/asio/reference/basic_seq_packet_socket/message_do_not_route.html
-/doc/asio/reference/basic_seq_packet_socket/message_end_of_record.html
-/doc/asio/reference/basic_seq_packet_socket/message_flags.html
-/doc/asio/reference/basic_seq_packet_socket/message_out_of_band.html
-/doc/asio/reference/basic_seq_packet_socket/message_peek.html
-/doc/asio/reference/basic_seq_packet_socket/native_handle.html
-/doc/asio/reference/basic_seq_packet_socket/native_handle_type.html
-/doc/asio/reference/basic_seq_packet_socket/native_non_blocking/
-/doc/asio/reference/basic_seq_packet_socket/native_non_blocking.html
-/doc/asio/reference/basic_seq_packet_socket/native_non_blocking/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/native_non_blocking/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/native_non_blocking/overload3.html
-/doc/asio/reference/basic_seq_packet_socket/non_blocking/
-/doc/asio/reference/basic_seq_packet_socket/non_blocking.html
-/doc/asio/reference/basic_seq_packet_socket/non_blocking/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/non_blocking/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/non_blocking/overload3.html
-/doc/asio/reference/basic_seq_packet_socket/open/
-/doc/asio/reference/basic_seq_packet_socket/open.html
-/doc/asio/reference/basic_seq_packet_socket/open/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/open/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/operator_eq_/
-/doc/asio/reference/basic_seq_packet_socket/operator_eq_.html
-/doc/asio/reference/basic_seq_packet_socket/operator_eq_/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/operator_eq_/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/protocol_type.html
-/doc/asio/reference/basic_seq_packet_socket/receive/
-/doc/asio/reference/basic_seq_packet_socket/receive_buffer_size.html
-/doc/asio/reference/basic_seq_packet_socket/receive.html
-/doc/asio/reference/basic_seq_packet_socket/receive_low_watermark.html
-/doc/asio/reference/basic_seq_packet_socket/receive/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/receive/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/receive/overload3.html
-/doc/asio/reference/basic_seq_packet_socket/remote_endpoint/
-/doc/asio/reference/basic_seq_packet_socket/remote_endpoint.html
-/doc/asio/reference/basic_seq_packet_socket/remote_endpoint/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/remote_endpoint/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/reuse_address.html
-/doc/asio/reference/basic_seq_packet_socket/send/
-/doc/asio/reference/basic_seq_packet_socket/send_buffer_size.html
-/doc/asio/reference/basic_seq_packet_socket/send.html
-/doc/asio/reference/basic_seq_packet_socket/send_low_watermark.html
-/doc/asio/reference/basic_seq_packet_socket/send/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/send/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/service_type.html
-/doc/asio/reference/basic_seq_packet_socket/set_option/
-/doc/asio/reference/basic_seq_packet_socket/set_option.html
-/doc/asio/reference/basic_seq_packet_socket/set_option/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/set_option/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/shutdown/
-/doc/asio/reference/basic_seq_packet_socket/shutdown.html
-/doc/asio/reference/basic_seq_packet_socket/shutdown/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/shutdown/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/shutdown_type.html
-/doc/asio/reference/basic_seq_packet_socket/wait/
-/doc/asio/reference/basic_seq_packet_socket/wait.html
-/doc/asio/reference/basic_seq_packet_socket/wait/overload1.html
-/doc/asio/reference/basic_seq_packet_socket/wait/overload2.html
-/doc/asio/reference/basic_seq_packet_socket/wait_type.html
-/doc/asio/reference/basic_serial_port/
-/doc/asio/reference/basic_serial_port/assign/
-/doc/asio/reference/basic_serial_port/assign.html
-/doc/asio/reference/basic_serial_port/assign/overload1.html
-/doc/asio/reference/basic_serial_port/assign/overload2.html
-/doc/asio/reference/basic_serial_port/async_read_some.html
-/doc/asio/reference/basic_serial_port/async_write_some.html
-/doc/asio/reference/basic_serial_port/basic_serial_port/
-/doc/asio/reference/basic_serial_port/basic_serial_port.html
-/doc/asio/reference/basic_serial_port/basic_serial_port/overload1.html
-/doc/asio/reference/basic_serial_port/basic_serial_port/overload2.html
-/doc/asio/reference/basic_serial_port/basic_serial_port/overload3.html
-/doc/asio/reference/basic_serial_port/basic_serial_port/overload4.html
-/doc/asio/reference/basic_serial_port/basic_serial_port/overload5.html
-/doc/asio/reference/basic_serial_port/cancel/
-/doc/asio/reference/basic_serial_port/cancel.html
-/doc/asio/reference/basic_serial_port/cancel/overload1.html
-/doc/asio/reference/basic_serial_port/cancel/overload2.html
-/doc/asio/reference/basic_serial_port/close/
-/doc/asio/reference/basic_serial_port/close.html
-/doc/asio/reference/basic_serial_port/close/overload1.html
-/doc/asio/reference/basic_serial_port/close/overload2.html
-/doc/asio/reference/basic_serial_port/executor_type.html
-/doc/asio/reference/basic_serial_port/get_executor.html
-/doc/asio/reference/basic_serial_port/get_implementation/
-/doc/asio/reference/basic_serial_port/get_implementation.html
-/doc/asio/reference/basic_serial_port/get_implementation/overload1.html
-/doc/asio/reference/basic_serial_port/get_implementation/overload2.html
-/doc/asio/reference/basic_serial_port/get_io_service.html
-/doc/asio/reference/basic_serial_port/get_option/
-/doc/asio/reference/basic_serial_port/get_option.html
-/doc/asio/reference/basic_serial_port/get_option/overload1.html
-/doc/asio/reference/basic_serial_port/get_option/overload2.html
-/doc/asio/reference/basic_serial_port/get_service/
-/doc/asio/reference/basic_serial_port/get_service.html
-/doc/asio/reference/basic_serial_port/get_service/overload1.html
-/doc/asio/reference/basic_serial_port/get_service/overload2.html
-/doc/asio/reference/basic_serial_port.html
-/doc/asio/reference/basic_serial_port/implementation_type.html
-/doc/asio/reference/basic_serial_port/is_open.html
-/doc/asio/reference/basic_serial_port/lowest_layer/
-/doc/asio/reference/basic_serial_port/lowest_layer.html
-/doc/asio/reference/basic_serial_port/lowest_layer/overload1.html
-/doc/asio/reference/basic_serial_port/lowest_layer/overload2.html
-/doc/asio/reference/basic_serial_port/lowest_layer_type.html
-/doc/asio/reference/basic_serial_port/native_handle.html
-/doc/asio/reference/basic_serial_port/native_handle_type.html
-/doc/asio/reference/basic_serial_port/open/
-/doc/asio/reference/basic_serial_port/open.html
-/doc/asio/reference/basic_serial_port/open/overload1.html
-/doc/asio/reference/basic_serial_port/open/overload2.html
-/doc/asio/reference/basic_serial_port/operator_eq_.html
-/doc/asio/reference/basic_serial_port/read_some/
-/doc/asio/reference/basic_serial_port/read_some.html
-/doc/asio/reference/basic_serial_port/read_some/overload1.html
-/doc/asio/reference/basic_serial_port/read_some/overload2.html
-/doc/asio/reference/basic_serial_port/send_break/
-/doc/asio/reference/basic_serial_port/send_break.html
-/doc/asio/reference/basic_serial_port/send_break/overload1.html
-/doc/asio/reference/basic_serial_port/send_break/overload2.html
-/doc/asio/reference/basic_serial_port/service_type.html
-/doc/asio/reference/basic_serial_port/set_option/
-/doc/asio/reference/basic_serial_port/set_option.html
-/doc/asio/reference/basic_serial_port/set_option/overload1.html
-/doc/asio/reference/basic_serial_port/set_option/overload2.html
-/doc/asio/reference/basic_serial_port/write_some/
-/doc/asio/reference/basic_serial_port/write_some.html
-/doc/asio/reference/basic_serial_port/write_some/overload1.html
-/doc/asio/reference/basic_serial_port/write_some/overload2.html
-/doc/asio/reference/basic_signal_set/
-/doc/asio/reference/basic_signal_set/add/
-/doc/asio/reference/basic_signal_set/add.html
-/doc/asio/reference/basic_signal_set/add/overload1.html
-/doc/asio/reference/basic_signal_set/add/overload2.html
-/doc/asio/reference/basic_signal_set/async_wait.html
-/doc/asio/reference/basic_signal_set/basic_signal_set/
-/doc/asio/reference/basic_signal_set/basic_signal_set.html
-/doc/asio/reference/basic_signal_set/basic_signal_set/overload1.html
-/doc/asio/reference/basic_signal_set/basic_signal_set/overload2.html
-/doc/asio/reference/basic_signal_set/basic_signal_set/overload3.html
-/doc/asio/reference/basic_signal_set/basic_signal_set/overload4.html
-/doc/asio/reference/basic_signal_set/cancel/
-/doc/asio/reference/basic_signal_set/cancel.html
-/doc/asio/reference/basic_signal_set/cancel/overload1.html
-/doc/asio/reference/basic_signal_set/cancel/overload2.html
-/doc/asio/reference/basic_signal_set/clear/
-/doc/asio/reference/basic_signal_set/clear.html
-/doc/asio/reference/basic_signal_set/clear/overload1.html
-/doc/asio/reference/basic_signal_set/clear/overload2.html
-/doc/asio/reference/basic_signal_set/executor_type.html
-/doc/asio/reference/basic_signal_set/get_executor.html
-/doc/asio/reference/basic_signal_set/get_implementation/
-/doc/asio/reference/basic_signal_set/get_implementation.html
-/doc/asio/reference/basic_signal_set/get_implementation/overload1.html
-/doc/asio/reference/basic_signal_set/get_implementation/overload2.html
-/doc/asio/reference/basic_signal_set/get_io_service.html
-/doc/asio/reference/basic_signal_set/get_service/
-/doc/asio/reference/basic_signal_set/get_service.html
-/doc/asio/reference/basic_signal_set/get_service/overload1.html
-/doc/asio/reference/basic_signal_set/get_service/overload2.html
-/doc/asio/reference/basic_signal_set.html
-/doc/asio/reference/basic_signal_set/implementation_type.html
-/doc/asio/reference/basic_signal_set/remove/
-/doc/asio/reference/basic_signal_set/remove.html
-/doc/asio/reference/basic_signal_set/remove/overload1.html
-/doc/asio/reference/basic_signal_set/remove/overload2.html
-/doc/asio/reference/basic_signal_set/service_type.html
-/doc/asio/reference/basic_socket/
-/doc/asio/reference/basic_socket_acceptor/
-/doc/asio/reference/basic_socket_acceptor/accept/
-/doc/asio/reference/basic_socket_acceptor/accept.html
-/doc/asio/reference/basic_socket_acceptor/accept/overload1.html
-/doc/asio/reference/basic_socket_acceptor/accept/overload2.html
-/doc/asio/reference/basic_socket_acceptor/accept/overload3.html
-/doc/asio/reference/basic_socket_acceptor/accept/overload4.html
-/doc/asio/reference/basic_socket_acceptor/assign/
-/doc/asio/reference/basic_socket_acceptor/assign.html
-/doc/asio/reference/basic_socket_acceptor/assign/overload1.html
-/doc/asio/reference/basic_socket_acceptor/assign/overload2.html
-/doc/asio/reference/basic_socket_acceptor/async_accept/
-/doc/asio/reference/basic_socket_acceptor/async_accept.html
-/doc/asio/reference/basic_socket_acceptor/async_accept/overload1.html
-/doc/asio/reference/basic_socket_acceptor/async_accept/overload2.html
-/doc/asio/reference/basic_socket_acceptor/async_wait.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload1.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload2.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload3.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload4.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload5.html
-/doc/asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload6.html
-/doc/asio/reference/basic_socket_acceptor/bind/
-/doc/asio/reference/basic_socket_acceptor/bind.html
-/doc/asio/reference/basic_socket_acceptor/bind/overload1.html
-/doc/asio/reference/basic_socket_acceptor/bind/overload2.html
-/doc/asio/reference/basic_socket_acceptor/broadcast.html
-/doc/asio/reference/basic_socket_acceptor/bytes_readable.html
-/doc/asio/reference/basic_socket_acceptor/cancel/
-/doc/asio/reference/basic_socket_acceptor/cancel.html
-/doc/asio/reference/basic_socket_acceptor/cancel/overload1.html
-/doc/asio/reference/basic_socket_acceptor/cancel/overload2.html
-/doc/asio/reference/basic_socket_acceptor/close/
-/doc/asio/reference/basic_socket_acceptor/close.html
-/doc/asio/reference/basic_socket_acceptor/close/overload1.html
-/doc/asio/reference/basic_socket_acceptor/close/overload2.html
-/doc/asio/reference/basic_socket_acceptor/debug.html
-/doc/asio/reference/basic_socket_acceptor/do_not_route.html
-/doc/asio/reference/basic_socket_acceptor/enable_connection_aborted.html
-/doc/asio/reference/basic_socket_acceptor/endpoint_type.html
-/doc/asio/reference/basic_socket_acceptor/executor_type.html
-/doc/asio/reference/basic_socket_acceptor/get_executor.html
-/doc/asio/reference/basic_socket_acceptor/get_implementation/
-/doc/asio/reference/basic_socket_acceptor/get_implementation.html
-/doc/asio/reference/basic_socket_acceptor/get_implementation/overload1.html
-/doc/asio/reference/basic_socket_acceptor/get_implementation/overload2.html
-/doc/asio/reference/basic_socket_acceptor/get_io_service.html
-/doc/asio/reference/basic_socket_acceptor/get_option/
-/doc/asio/reference/basic_socket_acceptor/get_option.html
-/doc/asio/reference/basic_socket_acceptor/get_option/overload1.html
-/doc/asio/reference/basic_socket_acceptor/get_option/overload2.html
-/doc/asio/reference/basic_socket_acceptor/get_service/
-/doc/asio/reference/basic_socket_acceptor/get_service.html
-/doc/asio/reference/basic_socket_acceptor/get_service/overload1.html
-/doc/asio/reference/basic_socket_acceptor/get_service/overload2.html
-/doc/asio/reference/basic_socket_acceptor.html
-/doc/asio/reference/basic_socket_acceptor/implementation_type.html
-/doc/asio/reference/basic_socket_acceptor/io_control/
-/doc/asio/reference/basic_socket_acceptor/io_control.html
-/doc/asio/reference/basic_socket_acceptor/io_control/overload1.html
-/doc/asio/reference/basic_socket_acceptor/io_control/overload2.html
-/doc/asio/reference/basic_socket_acceptor/is_open.html
-/doc/asio/reference/basic_socket_acceptor/keep_alive.html
-/doc/asio/reference/basic_socket_acceptor/linger.html
-/doc/asio/reference/basic_socket_acceptor/listen/
-/doc/asio/reference/basic_socket_acceptor/listen.html
-/doc/asio/reference/basic_socket_acceptor/listen/overload1.html
-/doc/asio/reference/basic_socket_acceptor/listen/overload2.html
-/doc/asio/reference/basic_socket_acceptor/local_endpoint/
-/doc/asio/reference/basic_socket_acceptor/local_endpoint.html
-/doc/asio/reference/basic_socket_acceptor/local_endpoint/overload1.html
-/doc/asio/reference/basic_socket_acceptor/local_endpoint/overload2.html
-/doc/asio/reference/basic_socket_acceptor/max_connections.html
-/doc/asio/reference/basic_socket_acceptor/message_do_not_route.html
-/doc/asio/reference/basic_socket_acceptor/message_end_of_record.html
-/doc/asio/reference/basic_socket_acceptor/message_flags.html
-/doc/asio/reference/basic_socket_acceptor/message_out_of_band.html
-/doc/asio/reference/basic_socket_acceptor/message_peek.html
-/doc/asio/reference/basic_socket_acceptor/native_handle.html
-/doc/asio/reference/basic_socket_acceptor/native_handle_type.html
-/doc/asio/reference/basic_socket_acceptor/native_non_blocking/
-/doc/asio/reference/basic_socket_acceptor/native_non_blocking.html
-/doc/asio/reference/basic_socket_acceptor/native_non_blocking/overload1.html
-/doc/asio/reference/basic_socket_acceptor/native_non_blocking/overload2.html
-/doc/asio/reference/basic_socket_acceptor/native_non_blocking/overload3.html
-/doc/asio/reference/basic_socket_acceptor/non_blocking/
-/doc/asio/reference/basic_socket_acceptor/non_blocking.html
-/doc/asio/reference/basic_socket_acceptor/non_blocking/overload1.html
-/doc/asio/reference/basic_socket_acceptor/non_blocking/overload2.html
-/doc/asio/reference/basic_socket_acceptor/non_blocking/overload3.html
-/doc/asio/reference/basic_socket_acceptor/open/
-/doc/asio/reference/basic_socket_acceptor/open.html
-/doc/asio/reference/basic_socket_acceptor/open/overload1.html
-/doc/asio/reference/basic_socket_acceptor/open/overload2.html
-/doc/asio/reference/basic_socket_acceptor/operator_eq_/
-/doc/asio/reference/basic_socket_acceptor/operator_eq_.html
-/doc/asio/reference/basic_socket_acceptor/operator_eq_/overload1.html
-/doc/asio/reference/basic_socket_acceptor/operator_eq_/overload2.html
-/doc/asio/reference/basic_socket_acceptor/protocol_type.html
-/doc/asio/reference/basic_socket_acceptor/receive_buffer_size.html
-/doc/asio/reference/basic_socket_acceptor/receive_low_watermark.html
-/doc/asio/reference/basic_socket_acceptor/reuse_address.html
-/doc/asio/reference/basic_socket_acceptor/send_buffer_size.html
-/doc/asio/reference/basic_socket_acceptor/send_low_watermark.html
-/doc/asio/reference/basic_socket_acceptor/service_type.html
-/doc/asio/reference/basic_socket_acceptor/set_option/
-/doc/asio/reference/basic_socket_acceptor/set_option.html
-/doc/asio/reference/basic_socket_acceptor/set_option/overload1.html
-/doc/asio/reference/basic_socket_acceptor/set_option/overload2.html
-/doc/asio/reference/basic_socket_acceptor/shutdown_type.html
-/doc/asio/reference/basic_socket_acceptor/wait/
-/doc/asio/reference/basic_socket_acceptor/wait.html
-/doc/asio/reference/basic_socket_acceptor/wait/overload1.html
-/doc/asio/reference/basic_socket_acceptor/wait/overload2.html
-/doc/asio/reference/basic_socket_acceptor/wait_type.html
-/doc/asio/reference/basic_socket/assign/
-/doc/asio/reference/basic_socket/assign.html
-/doc/asio/reference/basic_socket/assign/overload1.html
-/doc/asio/reference/basic_socket/assign/overload2.html
-/doc/asio/reference/basic_socket/async_connect.html
-/doc/asio/reference/basic_socket/async_wait.html
-/doc/asio/reference/basic_socket/at_mark/
-/doc/asio/reference/basic_socket/at_mark.html
-/doc/asio/reference/basic_socket/at_mark/overload1.html
-/doc/asio/reference/basic_socket/at_mark/overload2.html
-/doc/asio/reference/basic_socket/available/
-/doc/asio/reference/basic_socket/available.html
-/doc/asio/reference/basic_socket/available/overload1.html
-/doc/asio/reference/basic_socket/available/overload2.html
-/doc/asio/reference/basic_socket/basic_socket/
-/doc/asio/reference/basic_socket/_basic_socket.html
-/doc/asio/reference/basic_socket/basic_socket.html
-/doc/asio/reference/basic_socket/basic_socket/overload1.html
-/doc/asio/reference/basic_socket/basic_socket/overload2.html
-/doc/asio/reference/basic_socket/basic_socket/overload3.html
-/doc/asio/reference/basic_socket/basic_socket/overload4.html
-/doc/asio/reference/basic_socket/basic_socket/overload5.html
-/doc/asio/reference/basic_socket/basic_socket/overload6.html
-/doc/asio/reference/basic_socket/bind/
-/doc/asio/reference/basic_socket/bind.html
-/doc/asio/reference/basic_socket/bind/overload1.html
-/doc/asio/reference/basic_socket/bind/overload2.html
-/doc/asio/reference/basic_socket/broadcast.html
-/doc/asio/reference/basic_socket/bytes_readable.html
-/doc/asio/reference/basic_socket/cancel/
-/doc/asio/reference/basic_socket/cancel.html
-/doc/asio/reference/basic_socket/cancel/overload1.html
-/doc/asio/reference/basic_socket/cancel/overload2.html
-/doc/asio/reference/basic_socket/close/
-/doc/asio/reference/basic_socket/close.html
-/doc/asio/reference/basic_socket/close/overload1.html
-/doc/asio/reference/basic_socket/close/overload2.html
-/doc/asio/reference/basic_socket/connect/
-/doc/asio/reference/basic_socket/connect.html
-/doc/asio/reference/basic_socket/connect/overload1.html
-/doc/asio/reference/basic_socket/connect/overload2.html
-/doc/asio/reference/basic_socket/debug.html
-/doc/asio/reference/basic_socket/do_not_route.html
-/doc/asio/reference/basic_socket/enable_connection_aborted.html
-/doc/asio/reference/basic_socket/endpoint_type.html
-/doc/asio/reference/basic_socket/executor_type.html
-/doc/asio/reference/basic_socket/get_executor.html
-/doc/asio/reference/basic_socket/get_implementation/
-/doc/asio/reference/basic_socket/get_implementation.html
-/doc/asio/reference/basic_socket/get_implementation/overload1.html
-/doc/asio/reference/basic_socket/get_implementation/overload2.html
-/doc/asio/reference/basic_socket/get_io_service.html
-/doc/asio/reference/basic_socket/get_option/
-/doc/asio/reference/basic_socket/get_option.html
-/doc/asio/reference/basic_socket/get_option/overload1.html
-/doc/asio/reference/basic_socket/get_option/overload2.html
-/doc/asio/reference/basic_socket/get_service/
-/doc/asio/reference/basic_socket/get_service.html
-/doc/asio/reference/basic_socket/get_service/overload1.html
-/doc/asio/reference/basic_socket/get_service/overload2.html
-/doc/asio/reference/basic_socket.html
-/doc/asio/reference/basic_socket/implementation_type.html
-/doc/asio/reference/basic_socket/io_control/
-/doc/asio/reference/basic_socket/io_control.html
-/doc/asio/reference/basic_socket/io_control/overload1.html
-/doc/asio/reference/basic_socket/io_control/overload2.html
-/doc/asio/reference/basic_socket_iostream/
-/doc/asio/reference/basic_socket_iostream/basic_socket_iostream/
-/doc/asio/reference/basic_socket_iostream/basic_socket_iostream.html
-/doc/asio/reference/basic_socket_iostream/basic_socket_iostream/overload1.html
-/doc/asio/reference/basic_socket_iostream/basic_socket_iostream/overload2.html
-/doc/asio/reference/basic_socket_iostream/close.html
-/doc/asio/reference/basic_socket_iostream/connect.html
-/doc/asio/reference/basic_socket_iostream/duration.html
-/doc/asio/reference/basic_socket_iostream/duration_type.html
-/doc/asio/reference/basic_socket_iostream/endpoint_type.html
-/doc/asio/reference/basic_socket_iostream/error.html
-/doc/asio/reference/basic_socket_iostream/expires_after.html
-/doc/asio/reference/basic_socket_iostream/expires_at/
-/doc/asio/reference/basic_socket_iostream/expires_at.html
-/doc/asio/reference/basic_socket_iostream/expires_at/overload1.html
-/doc/asio/reference/basic_socket_iostream/expires_at/overload2.html
-/doc/asio/reference/basic_socket_iostream/expires_from_now/
-/doc/asio/reference/basic_socket_iostream/expires_from_now.html
-/doc/asio/reference/basic_socket_iostream/expires_from_now/overload1.html
-/doc/asio/reference/basic_socket_iostream/expires_from_now/overload2.html
-/doc/asio/reference/basic_socket_iostream/expiry.html
-/doc/asio/reference/basic_socket_iostream.html
-/doc/asio/reference/basic_socket_iostream/rdbuf.html
-/doc/asio/reference/basic_socket_iostream/time_point.html
-/doc/asio/reference/basic_socket_iostream/time_type.html
-/doc/asio/reference/basic_socket/is_open.html
-/doc/asio/reference/basic_socket/keep_alive.html
-/doc/asio/reference/basic_socket/linger.html
-/doc/asio/reference/basic_socket/local_endpoint/
-/doc/asio/reference/basic_socket/local_endpoint.html
-/doc/asio/reference/basic_socket/local_endpoint/overload1.html
-/doc/asio/reference/basic_socket/local_endpoint/overload2.html
-/doc/asio/reference/basic_socket/lowest_layer/
-/doc/asio/reference/basic_socket/lowest_layer.html
-/doc/asio/reference/basic_socket/lowest_layer/overload1.html
-/doc/asio/reference/basic_socket/lowest_layer/overload2.html
-/doc/asio/reference/basic_socket/lowest_layer_type.html
-/doc/asio/reference/basic_socket/max_connections.html
-/doc/asio/reference/basic_socket/message_do_not_route.html
-/doc/asio/reference/basic_socket/message_end_of_record.html
-/doc/asio/reference/basic_socket/message_flags.html
-/doc/asio/reference/basic_socket/message_out_of_band.html
-/doc/asio/reference/basic_socket/message_peek.html
-/doc/asio/reference/basic_socket/native_handle.html
-/doc/asio/reference/basic_socket/native_handle_type.html
-/doc/asio/reference/basic_socket/native_non_blocking/
-/doc/asio/reference/basic_socket/native_non_blocking.html
-/doc/asio/reference/basic_socket/native_non_blocking/overload1.html
-/doc/asio/reference/basic_socket/native_non_blocking/overload2.html
-/doc/asio/reference/basic_socket/native_non_blocking/overload3.html
-/doc/asio/reference/basic_socket/non_blocking/
-/doc/asio/reference/basic_socket/non_blocking.html
-/doc/asio/reference/basic_socket/non_blocking/overload1.html
-/doc/asio/reference/basic_socket/non_blocking/overload2.html
-/doc/asio/reference/basic_socket/non_blocking/overload3.html
-/doc/asio/reference/basic_socket/open/
-/doc/asio/reference/basic_socket/open.html
-/doc/asio/reference/basic_socket/open/overload1.html
-/doc/asio/reference/basic_socket/open/overload2.html
-/doc/asio/reference/basic_socket/operator_eq_/
-/doc/asio/reference/basic_socket/operator_eq_.html
-/doc/asio/reference/basic_socket/operator_eq_/overload1.html
-/doc/asio/reference/basic_socket/operator_eq_/overload2.html
-/doc/asio/reference/basic_socket/protocol_type.html
-/doc/asio/reference/basic_socket/receive_buffer_size.html
-/doc/asio/reference/basic_socket/receive_low_watermark.html
-/doc/asio/reference/basic_socket/remote_endpoint/
-/doc/asio/reference/basic_socket/remote_endpoint.html
-/doc/asio/reference/basic_socket/remote_endpoint/overload1.html
-/doc/asio/reference/basic_socket/remote_endpoint/overload2.html
-/doc/asio/reference/basic_socket/reuse_address.html
-/doc/asio/reference/basic_socket/send_buffer_size.html
-/doc/asio/reference/basic_socket/send_low_watermark.html
-/doc/asio/reference/basic_socket/service_type.html
-/doc/asio/reference/basic_socket/set_option/
-/doc/asio/reference/basic_socket/set_option.html
-/doc/asio/reference/basic_socket/set_option/overload1.html
-/doc/asio/reference/basic_socket/set_option/overload2.html
-/doc/asio/reference/basic_socket/shutdown/
-/doc/asio/reference/basic_socket/shutdown.html
-/doc/asio/reference/basic_socket/shutdown/overload1.html
-/doc/asio/reference/basic_socket/shutdown/overload2.html
-/doc/asio/reference/basic_socket/shutdown_type.html
-/doc/asio/reference/basic_socket_streambuf/
-/doc/asio/reference/basic_socket_streambuf/assign/
-/doc/asio/reference/basic_socket_streambuf/assign.html
-/doc/asio/reference/basic_socket_streambuf/assign/overload1.html
-/doc/asio/reference/basic_socket_streambuf/assign/overload2.html
-/doc/asio/reference/basic_socket_streambuf/async_connect.html
-/doc/asio/reference/basic_socket_streambuf/async_wait.html
-/doc/asio/reference/basic_socket_streambuf/at_mark/
-/doc/asio/reference/basic_socket_streambuf/at_mark.html
-/doc/asio/reference/basic_socket_streambuf/at_mark/overload1.html
-/doc/asio/reference/basic_socket_streambuf/at_mark/overload2.html
-/doc/asio/reference/basic_socket_streambuf/available/
-/doc/asio/reference/basic_socket_streambuf/available.html
-/doc/asio/reference/basic_socket_streambuf/available/overload1.html
-/doc/asio/reference/basic_socket_streambuf/available/overload2.html
-/doc/asio/reference/basic_socket_streambuf/_basic_socket_streambuf.html
-/doc/asio/reference/basic_socket_streambuf/basic_socket_streambuf.html
-/doc/asio/reference/basic_socket_streambuf/bind/
-/doc/asio/reference/basic_socket_streambuf/bind.html
-/doc/asio/reference/basic_socket_streambuf/bind/overload1.html
-/doc/asio/reference/basic_socket_streambuf/bind/overload2.html
-/doc/asio/reference/basic_socket_streambuf/broadcast.html
-/doc/asio/reference/basic_socket_streambuf/bytes_readable.html
-/doc/asio/reference/basic_socket_streambuf/cancel/
-/doc/asio/reference/basic_socket_streambuf/cancel.html
-/doc/asio/reference/basic_socket_streambuf/cancel/overload1.html
-/doc/asio/reference/basic_socket_streambuf/cancel/overload2.html
-/doc/asio/reference/basic_socket_streambuf/close/
-/doc/asio/reference/basic_socket_streambuf/close.html
-/doc/asio/reference/basic_socket_streambuf/close/overload1.html
-/doc/asio/reference/basic_socket_streambuf/close/overload2.html
-/doc/asio/reference/basic_socket_streambuf/connect/
-/doc/asio/reference/basic_socket_streambuf/connect.html
-/doc/asio/reference/basic_socket_streambuf/connect/overload1.html
-/doc/asio/reference/basic_socket_streambuf/connect/overload2.html
-/doc/asio/reference/basic_socket_streambuf/connect/overload3.html
-/doc/asio/reference/basic_socket_streambuf/debug.html
-/doc/asio/reference/basic_socket_streambuf/do_not_route.html
-/doc/asio/reference/basic_socket_streambuf/duration.html
-/doc/asio/reference/basic_socket_streambuf/duration_type.html
-/doc/asio/reference/basic_socket_streambuf/enable_connection_aborted.html
-/doc/asio/reference/basic_socket_streambuf/endpoint_type.html
-/doc/asio/reference/basic_socket_streambuf/error.html
-/doc/asio/reference/basic_socket_streambuf/executor_type.html
-/doc/asio/reference/basic_socket_streambuf/expires_after.html
-/doc/asio/reference/basic_socket_streambuf/expires_at/
-/doc/asio/reference/basic_socket_streambuf/expires_at.html
-/doc/asio/reference/basic_socket_streambuf/expires_at/overload1.html
-/doc/asio/reference/basic_socket_streambuf/expires_at/overload2.html
-/doc/asio/reference/basic_socket_streambuf/expires_at/overload3.html
-/doc/asio/reference/basic_socket_streambuf/expires_from_now/
-/doc/asio/reference/basic_socket_streambuf/expires_from_now.html
-/doc/asio/reference/basic_socket_streambuf/expires_from_now/overload1.html
-/doc/asio/reference/basic_socket_streambuf/expires_from_now/overload2.html
-/doc/asio/reference/basic_socket_streambuf/expiry.html
-/doc/asio/reference/basic_socket_streambuf/get_executor.html
-/doc/asio/reference/basic_socket_streambuf/get_implementation/
-/doc/asio/reference/basic_socket_streambuf/get_implementation.html
-/doc/asio/reference/basic_socket_streambuf/get_implementation/overload1.html
-/doc/asio/reference/basic_socket_streambuf/get_implementation/overload2.html
-/doc/asio/reference/basic_socket_streambuf/get_io_service.html
-/doc/asio/reference/basic_socket_streambuf/get_option/
-/doc/asio/reference/basic_socket_streambuf/get_option.html
-/doc/asio/reference/basic_socket_streambuf/get_option/overload1.html
-/doc/asio/reference/basic_socket_streambuf/get_option/overload2.html
-/doc/asio/reference/basic_socket_streambuf/get_service/
-/doc/asio/reference/basic_socket_streambuf/get_service.html
-/doc/asio/reference/basic_socket_streambuf/get_service/overload1.html
-/doc/asio/reference/basic_socket_streambuf/get_service/overload2.html
-/doc/asio/reference/basic_socket_streambuf.html
-/doc/asio/reference/basic_socket_streambuf/implementation_type.html
-/doc/asio/reference/basic_socket_streambuf/io_control/
-/doc/asio/reference/basic_socket_streambuf/io_control.html
-/doc/asio/reference/basic_socket_streambuf/io_control/overload1.html
-/doc/asio/reference/basic_socket_streambuf/io_control/overload2.html
-/doc/asio/reference/basic_socket_streambuf/io_handler.html
-/doc/asio/reference/basic_socket_streambuf/is_open.html
-/doc/asio/reference/basic_socket_streambuf/keep_alive.html
-/doc/asio/reference/basic_socket_streambuf/linger.html
-/doc/asio/reference/basic_socket_streambuf/local_endpoint/
-/doc/asio/reference/basic_socket_streambuf/local_endpoint.html
-/doc/asio/reference/basic_socket_streambuf/local_endpoint/overload1.html
-/doc/asio/reference/basic_socket_streambuf/local_endpoint/overload2.html
-/doc/asio/reference/basic_socket_streambuf/lowest_layer/
-/doc/asio/reference/basic_socket_streambuf/lowest_layer.html
-/doc/asio/reference/basic_socket_streambuf/lowest_layer/overload1.html
-/doc/asio/reference/basic_socket_streambuf/lowest_layer/overload2.html
-/doc/asio/reference/basic_socket_streambuf/lowest_layer_type.html
-/doc/asio/reference/basic_socket_streambuf/max_connections.html
-/doc/asio/reference/basic_socket_streambuf/message_do_not_route.html
-/doc/asio/reference/basic_socket_streambuf/message_end_of_record.html
-/doc/asio/reference/basic_socket_streambuf/message_flags.html
-/doc/asio/reference/basic_socket_streambuf/message_out_of_band.html
-/doc/asio/reference/basic_socket_streambuf/message_peek.html
-/doc/asio/reference/basic_socket_streambuf/native_handle.html
-/doc/asio/reference/basic_socket_streambuf/native_handle_type.html
-/doc/asio/reference/basic_socket_streambuf/native_non_blocking/
-/doc/asio/reference/basic_socket_streambuf/native_non_blocking.html
-/doc/asio/reference/basic_socket_streambuf/native_non_blocking/overload1.html
-/doc/asio/reference/basic_socket_streambuf/native_non_blocking/overload2.html
-/doc/asio/reference/basic_socket_streambuf/native_non_blocking/overload3.html
-/doc/asio/reference/basic_socket_streambuf/non_blocking/
-/doc/asio/reference/basic_socket_streambuf/non_blocking.html
-/doc/asio/reference/basic_socket_streambuf/non_blocking/overload1.html
-/doc/asio/reference/basic_socket_streambuf/non_blocking/overload2.html
-/doc/asio/reference/basic_socket_streambuf/non_blocking/overload3.html
-/doc/asio/reference/basic_socket_streambuf/open/
-/doc/asio/reference/basic_socket_streambuf/open.html
-/doc/asio/reference/basic_socket_streambuf/open/overload1.html
-/doc/asio/reference/basic_socket_streambuf/open/overload2.html
-/doc/asio/reference/basic_socket_streambuf/overflow.html
-/doc/asio/reference/basic_socket_streambuf/protocol_type.html
-/doc/asio/reference/basic_socket_streambuf/puberror.html
-/doc/asio/reference/basic_socket_streambuf/receive_buffer_size.html
-/doc/asio/reference/basic_socket_streambuf/receive_low_watermark.html
-/doc/asio/reference/basic_socket_streambuf/remote_endpoint/
-/doc/asio/reference/basic_socket_streambuf/remote_endpoint.html
-/doc/asio/reference/basic_socket_streambuf/remote_endpoint/overload1.html
-/doc/asio/reference/basic_socket_streambuf/remote_endpoint/overload2.html
-/doc/asio/reference/basic_socket_streambuf/reuse_address.html
-/doc/asio/reference/basic_socket_streambuf/send_buffer_size.html
-/doc/asio/reference/basic_socket_streambuf/send_low_watermark.html
-/doc/asio/reference/basic_socket_streambuf/service_type.html
-/doc/asio/reference/basic_socket_streambuf/setbuf.html
-/doc/asio/reference/basic_socket_streambuf/set_option/
-/doc/asio/reference/basic_socket_streambuf/set_option.html
-/doc/asio/reference/basic_socket_streambuf/set_option/overload1.html
-/doc/asio/reference/basic_socket_streambuf/set_option/overload2.html
-/doc/asio/reference/basic_socket_streambuf/shutdown/
-/doc/asio/reference/basic_socket_streambuf/shutdown.html
-/doc/asio/reference/basic_socket_streambuf/shutdown/overload1.html
-/doc/asio/reference/basic_socket_streambuf/shutdown/overload2.html
-/doc/asio/reference/basic_socket_streambuf/shutdown_type.html
-/doc/asio/reference/basic_socket_streambuf/sync.html
-/doc/asio/reference/basic_socket_streambuf/time_point.html
-/doc/asio/reference/basic_socket_streambuf/timer_handler.html
-/doc/asio/reference/basic_socket_streambuf/time_type.html
-/doc/asio/reference/basic_socket_streambuf/underflow.html
-/doc/asio/reference/basic_socket_streambuf/wait/
-/doc/asio/reference/basic_socket_streambuf/wait.html
-/doc/asio/reference/basic_socket_streambuf/wait/overload1.html
-/doc/asio/reference/basic_socket_streambuf/wait/overload2.html
-/doc/asio/reference/basic_socket_streambuf/wait_type.html
-/doc/asio/reference/basic_socket/wait/
-/doc/asio/reference/basic_socket/wait.html
-/doc/asio/reference/basic_socket/wait/overload1.html
-/doc/asio/reference/basic_socket/wait/overload2.html
-/doc/asio/reference/basic_socket/wait_type.html
-/doc/asio/reference/basic_streambuf/
-/doc/asio/reference/basic_streambuf/basic_streambuf.html
-/doc/asio/reference/basic_streambuf/capacity.html
-/doc/asio/reference/basic_streambuf/commit.html
-/doc/asio/reference/basic_streambuf/const_buffers_type.html
-/doc/asio/reference/basic_streambuf/consume.html
-/doc/asio/reference/basic_streambuf/data.html
-/doc/asio/reference/basic_streambuf.html
-/doc/asio/reference/basic_streambuf/max_size.html
-/doc/asio/reference/basic_streambuf/mutable_buffers_type.html
-/doc/asio/reference/basic_streambuf/overflow.html
-/doc/asio/reference/basic_streambuf/prepare.html
-/doc/asio/reference/basic_streambuf_ref/
-/doc/asio/reference/basic_streambuf_ref/basic_streambuf_ref/
-/doc/asio/reference/basic_streambuf_ref/basic_streambuf_ref.html
-/doc/asio/reference/basic_streambuf_ref/basic_streambuf_ref/overload1.html
-/doc/asio/reference/basic_streambuf_ref/basic_streambuf_ref/overload2.html
-/doc/asio/reference/basic_streambuf_ref/basic_streambuf_ref/overload3.html
-/doc/asio/reference/basic_streambuf_ref/capacity.html
-/doc/asio/reference/basic_streambuf_ref/commit.html
-/doc/asio/reference/basic_streambuf_ref/const_buffers_type.html
-/doc/asio/reference/basic_streambuf_ref/consume.html
-/doc/asio/reference/basic_streambuf_ref/data.html
-/doc/asio/reference/basic_streambuf_ref.html
-/doc/asio/reference/basic_streambuf_ref/max_size.html
-/doc/asio/reference/basic_streambuf_ref/mutable_buffers_type.html
-/doc/asio/reference/basic_streambuf_ref/prepare.html
-/doc/asio/reference/basic_streambuf_ref/size.html
-/doc/asio/reference/basic_streambuf/reserve.html
-/doc/asio/reference/basic_streambuf/size.html
-/doc/asio/reference/basic_streambuf/underflow.html
-/doc/asio/reference/basic_stream_socket/
-/doc/asio/reference/basic_stream_socket/assign/
-/doc/asio/reference/basic_stream_socket/assign.html
-/doc/asio/reference/basic_stream_socket/assign/overload1.html
-/doc/asio/reference/basic_stream_socket/assign/overload2.html
-/doc/asio/reference/basic_stream_socket/async_connect.html
-/doc/asio/reference/basic_stream_socket/async_read_some.html
-/doc/asio/reference/basic_stream_socket/async_receive/
-/doc/asio/reference/basic_stream_socket/async_receive.html
-/doc/asio/reference/basic_stream_socket/async_receive/overload1.html
-/doc/asio/reference/basic_stream_socket/async_receive/overload2.html
-/doc/asio/reference/basic_stream_socket/async_send/
-/doc/asio/reference/basic_stream_socket/async_send.html
-/doc/asio/reference/basic_stream_socket/async_send/overload1.html
-/doc/asio/reference/basic_stream_socket/async_send/overload2.html
-/doc/asio/reference/basic_stream_socket/async_wait.html
-/doc/asio/reference/basic_stream_socket/async_write_some.html
-/doc/asio/reference/basic_stream_socket/at_mark/
-/doc/asio/reference/basic_stream_socket/at_mark.html
-/doc/asio/reference/basic_stream_socket/at_mark/overload1.html
-/doc/asio/reference/basic_stream_socket/at_mark/overload2.html
-/doc/asio/reference/basic_stream_socket/available/
-/doc/asio/reference/basic_stream_socket/available.html
-/doc/asio/reference/basic_stream_socket/available/overload1.html
-/doc/asio/reference/basic_stream_socket/available/overload2.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/
-/doc/asio/reference/basic_stream_socket/basic_stream_socket.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/overload1.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/overload2.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/overload3.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/overload4.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/overload5.html
-/doc/asio/reference/basic_stream_socket/basic_stream_socket/overload6.html
-/doc/asio/reference/basic_stream_socket/bind/
-/doc/asio/reference/basic_stream_socket/bind.html
-/doc/asio/reference/basic_stream_socket/bind/overload1.html
-/doc/asio/reference/basic_stream_socket/bind/overload2.html
-/doc/asio/reference/basic_stream_socket/broadcast.html
-/doc/asio/reference/basic_stream_socket/bytes_readable.html
-/doc/asio/reference/basic_stream_socket/cancel/
-/doc/asio/reference/basic_stream_socket/cancel.html
-/doc/asio/reference/basic_stream_socket/cancel/overload1.html
-/doc/asio/reference/basic_stream_socket/cancel/overload2.html
-/doc/asio/reference/basic_stream_socket/close/
-/doc/asio/reference/basic_stream_socket/close.html
-/doc/asio/reference/basic_stream_socket/close/overload1.html
-/doc/asio/reference/basic_stream_socket/close/overload2.html
-/doc/asio/reference/basic_stream_socket/connect/
-/doc/asio/reference/basic_stream_socket/connect.html
-/doc/asio/reference/basic_stream_socket/connect/overload1.html
-/doc/asio/reference/basic_stream_socket/connect/overload2.html
-/doc/asio/reference/basic_stream_socket/debug.html
-/doc/asio/reference/basic_stream_socket/do_not_route.html
-/doc/asio/reference/basic_stream_socket/enable_connection_aborted.html
-/doc/asio/reference/basic_stream_socket/endpoint_type.html
-/doc/asio/reference/basic_stream_socket/executor_type.html
-/doc/asio/reference/basic_stream_socket/get_executor.html
-/doc/asio/reference/basic_stream_socket/get_implementation/
-/doc/asio/reference/basic_stream_socket/get_implementation.html
-/doc/asio/reference/basic_stream_socket/get_implementation/overload1.html
-/doc/asio/reference/basic_stream_socket/get_implementation/overload2.html
-/doc/asio/reference/basic_stream_socket/get_io_service.html
-/doc/asio/reference/basic_stream_socket/get_option/
-/doc/asio/reference/basic_stream_socket/get_option.html
-/doc/asio/reference/basic_stream_socket/get_option/overload1.html
-/doc/asio/reference/basic_stream_socket/get_option/overload2.html
-/doc/asio/reference/basic_stream_socket/get_service/
-/doc/asio/reference/basic_stream_socket/get_service.html
-/doc/asio/reference/basic_stream_socket/get_service/overload1.html
-/doc/asio/reference/basic_stream_socket/get_service/overload2.html
-/doc/asio/reference/basic_stream_socket.html
-/doc/asio/reference/basic_stream_socket/implementation_type.html
-/doc/asio/reference/basic_stream_socket/io_control/
-/doc/asio/reference/basic_stream_socket/io_control.html
-/doc/asio/reference/basic_stream_socket/io_control/overload1.html
-/doc/asio/reference/basic_stream_socket/io_control/overload2.html
-/doc/asio/reference/basic_stream_socket/is_open.html
-/doc/asio/reference/basic_stream_socket/keep_alive.html
-/doc/asio/reference/basic_stream_socket/linger.html
-/doc/asio/reference/basic_stream_socket/local_endpoint/
-/doc/asio/reference/basic_stream_socket/local_endpoint.html
-/doc/asio/reference/basic_stream_socket/local_endpoint/overload1.html
-/doc/asio/reference/basic_stream_socket/local_endpoint/overload2.html
-/doc/asio/reference/basic_stream_socket/lowest_layer/
-/doc/asio/reference/basic_stream_socket/lowest_layer.html
-/doc/asio/reference/basic_stream_socket/lowest_layer/overload1.html
-/doc/asio/reference/basic_stream_socket/lowest_layer/overload2.html
-/doc/asio/reference/basic_stream_socket/lowest_layer_type.html
-/doc/asio/reference/basic_stream_socket/max_connections.html
-/doc/asio/reference/basic_stream_socket/message_do_not_route.html
-/doc/asio/reference/basic_stream_socket/message_end_of_record.html
-/doc/asio/reference/basic_stream_socket/message_flags.html
-/doc/asio/reference/basic_stream_socket/message_out_of_band.html
-/doc/asio/reference/basic_stream_socket/message_peek.html
-/doc/asio/reference/basic_stream_socket/native_handle.html
-/doc/asio/reference/basic_stream_socket/native_handle_type.html
-/doc/asio/reference/basic_stream_socket/native_non_blocking/
-/doc/asio/reference/basic_stream_socket/native_non_blocking.html
-/doc/asio/reference/basic_stream_socket/native_non_blocking/overload1.html
-/doc/asio/reference/basic_stream_socket/native_non_blocking/overload2.html
-/doc/asio/reference/basic_stream_socket/native_non_blocking/overload3.html
-/doc/asio/reference/basic_stream_socket/non_blocking/
-/doc/asio/reference/basic_stream_socket/non_blocking.html
-/doc/asio/reference/basic_stream_socket/non_blocking/overload1.html
-/doc/asio/reference/basic_stream_socket/non_blocking/overload2.html
-/doc/asio/reference/basic_stream_socket/non_blocking/overload3.html
-/doc/asio/reference/basic_stream_socket/open/
-/doc/asio/reference/basic_stream_socket/open.html
-/doc/asio/reference/basic_stream_socket/open/overload1.html
-/doc/asio/reference/basic_stream_socket/open/overload2.html
-/doc/asio/reference/basic_stream_socket/operator_eq_/
-/doc/asio/reference/basic_stream_socket/operator_eq_.html
-/doc/asio/reference/basic_stream_socket/operator_eq_/overload1.html
-/doc/asio/reference/basic_stream_socket/operator_eq_/overload2.html
-/doc/asio/reference/basic_stream_socket/protocol_type.html
-/doc/asio/reference/basic_stream_socket/read_some/
-/doc/asio/reference/basic_stream_socket/read_some.html
-/doc/asio/reference/basic_stream_socket/read_some/overload1.html
-/doc/asio/reference/basic_stream_socket/read_some/overload2.html
-/doc/asio/reference/basic_stream_socket/receive/
-/doc/asio/reference/basic_stream_socket/receive_buffer_size.html
-/doc/asio/reference/basic_stream_socket/receive.html
-/doc/asio/reference/basic_stream_socket/receive_low_watermark.html
-/doc/asio/reference/basic_stream_socket/receive/overload1.html
-/doc/asio/reference/basic_stream_socket/receive/overload2.html
-/doc/asio/reference/basic_stream_socket/receive/overload3.html
-/doc/asio/reference/basic_stream_socket/remote_endpoint/
-/doc/asio/reference/basic_stream_socket/remote_endpoint.html
-/doc/asio/reference/basic_stream_socket/remote_endpoint/overload1.html
-/doc/asio/reference/basic_stream_socket/remote_endpoint/overload2.html
-/doc/asio/reference/basic_stream_socket/reuse_address.html
-/doc/asio/reference/basic_stream_socket/send/
-/doc/asio/reference/basic_stream_socket/send_buffer_size.html
-/doc/asio/reference/basic_stream_socket/send.html
-/doc/asio/reference/basic_stream_socket/send_low_watermark.html
-/doc/asio/reference/basic_stream_socket/send/overload1.html
-/doc/asio/reference/basic_stream_socket/send/overload2.html
-/doc/asio/reference/basic_stream_socket/send/overload3.html
-/doc/asio/reference/basic_stream_socket/service_type.html
-/doc/asio/reference/basic_stream_socket/set_option/
-/doc/asio/reference/basic_stream_socket/set_option.html
-/doc/asio/reference/basic_stream_socket/set_option/overload1.html
-/doc/asio/reference/basic_stream_socket/set_option/overload2.html
-/doc/asio/reference/basic_stream_socket/shutdown/
-/doc/asio/reference/basic_stream_socket/shutdown.html
-/doc/asio/reference/basic_stream_socket/shutdown/overload1.html
-/doc/asio/reference/basic_stream_socket/shutdown/overload2.html
-/doc/asio/reference/basic_stream_socket/shutdown_type.html
-/doc/asio/reference/basic_stream_socket/wait/
-/doc/asio/reference/basic_stream_socket/wait.html
-/doc/asio/reference/basic_stream_socket/wait/overload1.html
-/doc/asio/reference/basic_stream_socket/wait/overload2.html
-/doc/asio/reference/basic_stream_socket/wait_type.html
-/doc/asio/reference/basic_stream_socket/write_some/
-/doc/asio/reference/basic_stream_socket/write_some.html
-/doc/asio/reference/basic_stream_socket/write_some/overload1.html
-/doc/asio/reference/basic_stream_socket/write_some/overload2.html
-/doc/asio/reference/basic_waitable_timer/
-/doc/asio/reference/basic_waitable_timer/async_wait.html
-/doc/asio/reference/basic_waitable_timer/basic_waitable_timer/
-/doc/asio/reference/basic_waitable_timer/basic_waitable_timer.html
-/doc/asio/reference/basic_waitable_timer/basic_waitable_timer/overload1.html
-/doc/asio/reference/basic_waitable_timer/basic_waitable_timer/overload2.html
-/doc/asio/reference/basic_waitable_timer/basic_waitable_timer/overload3.html
-/doc/asio/reference/basic_waitable_timer/basic_waitable_timer/overload4.html
-/doc/asio/reference/basic_waitable_timer/cancel/
-/doc/asio/reference/basic_waitable_timer/cancel.html
-/doc/asio/reference/basic_waitable_timer/cancel_one/
-/doc/asio/reference/basic_waitable_timer/cancel_one.html
-/doc/asio/reference/basic_waitable_timer/cancel_one/overload1.html
-/doc/asio/reference/basic_waitable_timer/cancel_one/overload2.html
-/doc/asio/reference/basic_waitable_timer/cancel/overload1.html
-/doc/asio/reference/basic_waitable_timer/cancel/overload2.html
-/doc/asio/reference/basic_waitable_timer/clock_type.html
-/doc/asio/reference/basic_waitable_timer/duration.html
-/doc/asio/reference/basic_waitable_timer/executor_type.html
-/doc/asio/reference/basic_waitable_timer/expires_after/
-/doc/asio/reference/basic_waitable_timer/expires_after.html
-/doc/asio/reference/basic_waitable_timer/expires_after/overload1.html
-/doc/asio/reference/basic_waitable_timer/expires_after/overload2.html
-/doc/asio/reference/basic_waitable_timer/expires_at/
-/doc/asio/reference/basic_waitable_timer/expires_at.html
-/doc/asio/reference/basic_waitable_timer/expires_at/overload1.html
-/doc/asio/reference/basic_waitable_timer/expires_at/overload2.html
-/doc/asio/reference/basic_waitable_timer/expires_at/overload3.html
-/doc/asio/reference/basic_waitable_timer/expires_from_now/
-/doc/asio/reference/basic_waitable_timer/expires_from_now.html
-/doc/asio/reference/basic_waitable_timer/expires_from_now/overload1.html
-/doc/asio/reference/basic_waitable_timer/expires_from_now/overload2.html
-/doc/asio/reference/basic_waitable_timer/expires_from_now/overload3.html
-/doc/asio/reference/basic_waitable_timer/expiry.html
-/doc/asio/reference/basic_waitable_timer/get_executor.html
-/doc/asio/reference/basic_waitable_timer/get_implementation/
-/doc/asio/reference/basic_waitable_timer/get_implementation.html
-/doc/asio/reference/basic_waitable_timer/get_implementation/overload1.html
-/doc/asio/reference/basic_waitable_timer/get_implementation/overload2.html
-/doc/asio/reference/basic_waitable_timer/get_io_service.html
-/doc/asio/reference/basic_waitable_timer/get_service/
-/doc/asio/reference/basic_waitable_timer/get_service.html
-/doc/asio/reference/basic_waitable_timer/get_service/overload1.html
-/doc/asio/reference/basic_waitable_timer/get_service/overload2.html
-/doc/asio/reference/basic_waitable_timer.html
-/doc/asio/reference/basic_waitable_timer/implementation_type.html
-/doc/asio/reference/basic_waitable_timer/operator_eq_.html
-/doc/asio/reference/basic_waitable_timer/service_type.html
-/doc/asio/reference/basic_waitable_timer/time_point.html
-/doc/asio/reference/basic_waitable_timer/traits_type.html
-/doc/asio/reference/basic_waitable_timer/wait/
-/doc/asio/reference/basic_waitable_timer/wait.html
-/doc/asio/reference/basic_waitable_timer/wait/overload1.html
-/doc/asio/reference/basic_waitable_timer/wait/overload2.html
-/doc/asio/reference/basic_yield_context/
-/doc/asio/reference/basic_yield_context/basic_yield_context/
-/doc/asio/reference/basic_yield_context/basic_yield_context.html
-/doc/asio/reference/basic_yield_context/basic_yield_context/overload1.html
-/doc/asio/reference/basic_yield_context/basic_yield_context/overload2.html
-/doc/asio/reference/basic_yield_context/callee_type.html
-/doc/asio/reference/basic_yield_context/caller_type.html
-/doc/asio/reference/basic_yield_context.html
-/doc/asio/reference/basic_yield_context/operator_lb__rb_.html
-/doc/asio/reference/buffer/
-/doc/asio/reference/buffer_cast/
-/doc/asio/reference/buffer_cast.html
-/doc/asio/reference/buffer_cast/overload1.html
-/doc/asio/reference/buffer_cast/overload2.html
-/doc/asio/reference/buffer_copy/
-/doc/asio/reference/buffer_copy.html
-/doc/asio/reference/buffer_copy/overload10.html
-/doc/asio/reference/buffer_copy/overload11.html
-/doc/asio/reference/buffer_copy/overload12.html
-/doc/asio/reference/buffer_copy/overload13.html
-/doc/asio/reference/buffer_copy/overload14.html
-/doc/asio/reference/buffer_copy/overload15.html
-/doc/asio/reference/buffer_copy/overload16.html
-/doc/asio/reference/buffer_copy/overload17.html
-/doc/asio/reference/buffer_copy/overload18.html
-/doc/asio/reference/buffer_copy/overload19.html
-/doc/asio/reference/buffer_copy/overload1.html
-/doc/asio/reference/buffer_copy/overload20.html
-/doc/asio/reference/buffer_copy/overload21.html
-/doc/asio/reference/buffer_copy/overload22.html
-/doc/asio/reference/buffer_copy/overload23.html
-/doc/asio/reference/buffer_copy/overload24.html
-/doc/asio/reference/buffer_copy/overload25.html
-/doc/asio/reference/buffer_copy/overload26.html
-/doc/asio/reference/buffer_copy/overload27.html
-/doc/asio/reference/buffer_copy/overload28.html
-/doc/asio/reference/buffer_copy/overload29.html
-/doc/asio/reference/buffer_copy/overload2.html
-/doc/asio/reference/buffer_copy/overload30.html
-/doc/asio/reference/buffer_copy/overload3.html
-/doc/asio/reference/buffer_copy/overload4.html
-/doc/asio/reference/buffer_copy/overload5.html
-/doc/asio/reference/buffer_copy/overload6.html
-/doc/asio/reference/buffer_copy/overload7.html
-/doc/asio/reference/buffer_copy/overload8.html
-/doc/asio/reference/buffer_copy/overload9.html
-/doc/asio/reference/BufferedHandshakeHandler.html
-/doc/asio/reference/buffered_read_stream/
-/doc/asio/reference/buffered_read_stream/async_fill.html
-/doc/asio/reference/buffered_read_stream/async_read_some.html
-/doc/asio/reference/buffered_read_stream/async_write_some.html
-/doc/asio/reference/buffered_read_stream/buffered_read_stream/
-/doc/asio/reference/buffered_read_stream/buffered_read_stream.html
-/doc/asio/reference/buffered_read_stream/buffered_read_stream/overload1.html
-/doc/asio/reference/buffered_read_stream/buffered_read_stream/overload2.html
-/doc/asio/reference/buffered_read_stream/close/
-/doc/asio/reference/buffered_read_stream/close.html
-/doc/asio/reference/buffered_read_stream/close/overload1.html
-/doc/asio/reference/buffered_read_stream/close/overload2.html
-/doc/asio/reference/buffered_read_stream/default_buffer_size.html
-/doc/asio/reference/buffered_read_stream/fill/
-/doc/asio/reference/buffered_read_stream/fill.html
-/doc/asio/reference/buffered_read_stream/fill/overload1.html
-/doc/asio/reference/buffered_read_stream/fill/overload2.html
-/doc/asio/reference/buffered_read_stream/get_io_service.html
-/doc/asio/reference/buffered_read_stream.html
-/doc/asio/reference/buffered_read_stream/in_avail/
-/doc/asio/reference/buffered_read_stream/in_avail.html
-/doc/asio/reference/buffered_read_stream/in_avail/overload1.html
-/doc/asio/reference/buffered_read_stream/in_avail/overload2.html
-/doc/asio/reference/buffered_read_stream/lowest_layer/
-/doc/asio/reference/buffered_read_stream/lowest_layer.html
-/doc/asio/reference/buffered_read_stream/lowest_layer/overload1.html
-/doc/asio/reference/buffered_read_stream/lowest_layer/overload2.html
-/doc/asio/reference/buffered_read_stream/lowest_layer_type.html
-/doc/asio/reference/buffered_read_stream/next_layer.html
-/doc/asio/reference/buffered_read_stream/next_layer_type.html
-/doc/asio/reference/buffered_read_stream/peek/
-/doc/asio/reference/buffered_read_stream/peek.html
-/doc/asio/reference/buffered_read_stream/peek/overload1.html
-/doc/asio/reference/buffered_read_stream/peek/overload2.html
-/doc/asio/reference/buffered_read_stream/read_some/
-/doc/asio/reference/buffered_read_stream/read_some.html
-/doc/asio/reference/buffered_read_stream/read_some/overload1.html
-/doc/asio/reference/buffered_read_stream/read_some/overload2.html
-/doc/asio/reference/buffered_read_stream/write_some/
-/doc/asio/reference/buffered_read_stream/write_some.html
-/doc/asio/reference/buffered_read_stream/write_some/overload1.html
-/doc/asio/reference/buffered_read_stream/write_some/overload2.html
-/doc/asio/reference/buffered_stream/
-/doc/asio/reference/buffered_stream/async_fill.html
-/doc/asio/reference/buffered_stream/async_flush.html
-/doc/asio/reference/buffered_stream/async_read_some.html
-/doc/asio/reference/buffered_stream/async_write_some.html
-/doc/asio/reference/buffered_stream/buffered_stream/
-/doc/asio/reference/buffered_stream/buffered_stream.html
-/doc/asio/reference/buffered_stream/buffered_stream/overload1.html
-/doc/asio/reference/buffered_stream/buffered_stream/overload2.html
-/doc/asio/reference/buffered_stream/close/
-/doc/asio/reference/buffered_stream/close.html
-/doc/asio/reference/buffered_stream/close/overload1.html
-/doc/asio/reference/buffered_stream/close/overload2.html
-/doc/asio/reference/buffered_stream/fill/
-/doc/asio/reference/buffered_stream/fill.html
-/doc/asio/reference/buffered_stream/fill/overload1.html
-/doc/asio/reference/buffered_stream/fill/overload2.html
-/doc/asio/reference/buffered_stream/flush/
-/doc/asio/reference/buffered_stream/flush.html
-/doc/asio/reference/buffered_stream/flush/overload1.html
-/doc/asio/reference/buffered_stream/flush/overload2.html
-/doc/asio/reference/buffered_stream/get_io_service.html
-/doc/asio/reference/buffered_stream.html
-/doc/asio/reference/buffered_stream/in_avail/
-/doc/asio/reference/buffered_stream/in_avail.html
-/doc/asio/reference/buffered_stream/in_avail/overload1.html
-/doc/asio/reference/buffered_stream/in_avail/overload2.html
-/doc/asio/reference/buffered_stream/lowest_layer/
-/doc/asio/reference/buffered_stream/lowest_layer.html
-/doc/asio/reference/buffered_stream/lowest_layer/overload1.html
-/doc/asio/reference/buffered_stream/lowest_layer/overload2.html
-/doc/asio/reference/buffered_stream/lowest_layer_type.html
-/doc/asio/reference/buffered_stream/next_layer.html
-/doc/asio/reference/buffered_stream/next_layer_type.html
-/doc/asio/reference/buffered_stream/peek/
-/doc/asio/reference/buffered_stream/peek.html
-/doc/asio/reference/buffered_stream/peek/overload1.html
-/doc/asio/reference/buffered_stream/peek/overload2.html
-/doc/asio/reference/buffered_stream/read_some/
-/doc/asio/reference/buffered_stream/read_some.html
-/doc/asio/reference/buffered_stream/read_some/overload1.html
-/doc/asio/reference/buffered_stream/read_some/overload2.html
-/doc/asio/reference/buffered_stream/write_some/
-/doc/asio/reference/buffered_stream/write_some.html
-/doc/asio/reference/buffered_stream/write_some/overload1.html
-/doc/asio/reference/buffered_stream/write_some/overload2.html
-/doc/asio/reference/buffered_write_stream/
-/doc/asio/reference/buffered_write_stream/async_flush.html
-/doc/asio/reference/buffered_write_stream/async_read_some.html
-/doc/asio/reference/buffered_write_stream/async_write_some.html
-/doc/asio/reference/buffered_write_stream/buffered_write_stream/
-/doc/asio/reference/buffered_write_stream/buffered_write_stream.html
-/doc/asio/reference/buffered_write_stream/buffered_write_stream/overload1.html
-/doc/asio/reference/buffered_write_stream/buffered_write_stream/overload2.html
-/doc/asio/reference/buffered_write_stream/close/
-/doc/asio/reference/buffered_write_stream/close.html
-/doc/asio/reference/buffered_write_stream/close/overload1.html
-/doc/asio/reference/buffered_write_stream/close/overload2.html
-/doc/asio/reference/buffered_write_stream/default_buffer_size.html
-/doc/asio/reference/buffered_write_stream/flush/
-/doc/asio/reference/buffered_write_stream/flush.html
-/doc/asio/reference/buffered_write_stream/flush/overload1.html
-/doc/asio/reference/buffered_write_stream/flush/overload2.html
-/doc/asio/reference/buffered_write_stream/get_io_service.html
-/doc/asio/reference/buffered_write_stream.html
-/doc/asio/reference/buffered_write_stream/in_avail/
-/doc/asio/reference/buffered_write_stream/in_avail.html
-/doc/asio/reference/buffered_write_stream/in_avail/overload1.html
-/doc/asio/reference/buffered_write_stream/in_avail/overload2.html
-/doc/asio/reference/buffered_write_stream/lowest_layer/
-/doc/asio/reference/buffered_write_stream/lowest_layer.html
-/doc/asio/reference/buffered_write_stream/lowest_layer/overload1.html
-/doc/asio/reference/buffered_write_stream/lowest_layer/overload2.html
-/doc/asio/reference/buffered_write_stream/lowest_layer_type.html
-/doc/asio/reference/buffered_write_stream/next_layer.html
-/doc/asio/reference/buffered_write_stream/next_layer_type.html
-/doc/asio/reference/buffered_write_stream/peek/
-/doc/asio/reference/buffered_write_stream/peek.html
-/doc/asio/reference/buffered_write_stream/peek/overload1.html
-/doc/asio/reference/buffered_write_stream/peek/overload2.html
-/doc/asio/reference/buffered_write_stream/read_some/
-/doc/asio/reference/buffered_write_stream/read_some.html
-/doc/asio/reference/buffered_write_stream/read_some/overload1.html
-/doc/asio/reference/buffered_write_stream/read_some/overload2.html
-/doc/asio/reference/buffered_write_stream/write_some/
-/doc/asio/reference/buffered_write_stream/write_some.html
-/doc/asio/reference/buffered_write_stream/write_some/overload1.html
-/doc/asio/reference/buffered_write_stream/write_some/overload2.html
-/doc/asio/reference/buffer.html
-/doc/asio/reference/buffer/overload10.html
-/doc/asio/reference/buffer/overload11.html
-/doc/asio/reference/buffer/overload12.html
-/doc/asio/reference/buffer/overload13.html
-/doc/asio/reference/buffer/overload14.html
-/doc/asio/reference/buffer/overload15.html
-/doc/asio/reference/buffer/overload16.html
-/doc/asio/reference/buffer/overload17.html
-/doc/asio/reference/buffer/overload18.html
-/doc/asio/reference/buffer/overload19.html
-/doc/asio/reference/buffer/overload1.html
-/doc/asio/reference/buffer/overload20.html
-/doc/asio/reference/buffer/overload21.html
-/doc/asio/reference/buffer/overload22.html
-/doc/asio/reference/buffer/overload23.html
-/doc/asio/reference/buffer/overload24.html
-/doc/asio/reference/buffer/overload25.html
-/doc/asio/reference/buffer/overload26.html
-/doc/asio/reference/buffer/overload27.html
-/doc/asio/reference/buffer/overload28.html
-/doc/asio/reference/buffer/overload29.html
-/doc/asio/reference/buffer/overload2.html
-/doc/asio/reference/buffer/overload30.html
-/doc/asio/reference/buffer/overload3.html
-/doc/asio/reference/buffer/overload4.html
-/doc/asio/reference/buffer/overload5.html
-/doc/asio/reference/buffer/overload6.html
-/doc/asio/reference/buffer/overload7.html
-/doc/asio/reference/buffer/overload8.html
-/doc/asio/reference/buffer/overload9.html
-/doc/asio/reference/buffers_begin.html
-/doc/asio/reference/buffers_end.html
-/doc/asio/reference/buffers_iterator/
-/doc/asio/reference/buffers_iterator/begin.html
-/doc/asio/reference/buffers_iterator/buffers_iterator.html
-/doc/asio/reference/buffers_iterator/difference_type.html
-/doc/asio/reference/buffers_iterator/end.html
-/doc/asio/reference/buffers_iterator.html
-/doc/asio/reference/buffers_iterator/iterator_category.html
-/doc/asio/reference/buffers_iterator/operator_arrow_.html
-/doc/asio/reference/buffers_iterator/operator_eq__eq_.html
-/doc/asio/reference/buffers_iterator/operator_gt__eq_.html
-/doc/asio/reference/buffers_iterator/operator_gt_.html
-/doc/asio/reference/buffers_iterator/operator_lb__rb_.html
-/doc/asio/reference/buffers_iterator/operator_lt__eq_.html
-/doc/asio/reference/buffers_iterator/operator_lt_.html
-/doc/asio/reference/buffers_iterator/operator_minus_/
-/doc/asio/reference/buffers_iterator/operator_minus__eq_.html
-/doc/asio/reference/buffers_iterator/operator_minus_.html
-/doc/asio/reference/buffers_iterator/operator_minus__minus_/
-/doc/asio/reference/buffers_iterator/operator_minus__minus_.html
-/doc/asio/reference/buffers_iterator/operator_minus__minus_/overload1.html
-/doc/asio/reference/buffers_iterator/operator_minus__minus_/overload2.html
-/doc/asio/reference/buffers_iterator/operator_minus_/overload1.html
-/doc/asio/reference/buffers_iterator/operator_minus_/overload2.html
-/doc/asio/reference/buffers_iterator/operator_not__eq_.html
-/doc/asio/reference/buffers_iterator/operator_plus_/
-/doc/asio/reference/buffers_iterator/operator_plus__eq_.html
-/doc/asio/reference/buffers_iterator/operator_plus_.html
-/doc/asio/reference/buffers_iterator/operator_plus_/overload1.html
-/doc/asio/reference/buffers_iterator/operator_plus_/overload2.html
-/doc/asio/reference/buffers_iterator/operator_plus__plus_/
-/doc/asio/reference/buffers_iterator/operator_plus__plus_.html
-/doc/asio/reference/buffers_iterator/operator_plus__plus_/overload1.html
-/doc/asio/reference/buffers_iterator/operator_plus__plus_/overload2.html
-/doc/asio/reference/buffers_iterator/operator__star_.html
-/doc/asio/reference/buffers_iterator/pointer.html
-/doc/asio/reference/buffers_iterator/reference.html
-/doc/asio/reference/buffers_iterator/value_type.html
-/doc/asio/reference/buffer_size/
-/doc/asio/reference/buffer_size.html
-/doc/asio/reference/buffer_size/overload1.html
-/doc/asio/reference/buffer_size/overload2.html
-/doc/asio/reference/buffer_size/overload3.html
-/doc/asio/reference/buffer_size/overload4.html
-/doc/asio/reference/buffer_size/overload5.html
-/doc/asio/reference/CompletionHandler.html
-/doc/asio/reference/ComposedConnectHandler.html
-/doc/asio/reference/connect/
-/doc/asio/reference/ConnectHandler.html
-/doc/asio/reference/connect.html
-/doc/asio/reference/connect/overload1.html
-/doc/asio/reference/connect/overload2.html
-/doc/asio/reference/connect/overload3.html
-/doc/asio/reference/connect/overload4.html
-/doc/asio/reference/connect/overload5.html
-/doc/asio/reference/connect/overload6.html
-/doc/asio/reference/connect/overload7.html
-/doc/asio/reference/connect/overload8.html
-/doc/asio/reference/const_buffer/
-/doc/asio/reference/const_buffer/const_buffer/
-/doc/asio/reference/const_buffer/const_buffer.html
-/doc/asio/reference/const_buffer/const_buffer/overload1.html
-/doc/asio/reference/const_buffer/const_buffer/overload2.html
-/doc/asio/reference/const_buffer/const_buffer/overload3.html
-/doc/asio/reference/const_buffer.html
-/doc/asio/reference/const_buffer/operator_plus_/
-/doc/asio/reference/const_buffer/operator_plus_.html
-/doc/asio/reference/const_buffer/operator_plus_/overload1.html
-/doc/asio/reference/const_buffer/operator_plus_/overload2.html
-/doc/asio/reference/const_buffers_1/
-/doc/asio/reference/const_buffers_1/begin.html
-/doc/asio/reference/const_buffers_1/const_buffers_1/
-/doc/asio/reference/const_buffers_1/const_buffers_1.html
-/doc/asio/reference/const_buffers_1/const_buffers_1/overload1.html
-/doc/asio/reference/const_buffers_1/const_buffers_1/overload2.html
-/doc/asio/reference/const_buffers_1/const_iterator.html
-/doc/asio/reference/const_buffers_1/end.html
-/doc/asio/reference/const_buffers_1.html
-/doc/asio/reference/const_buffers_1/operator_plus_/
-/doc/asio/reference/const_buffers_1/operator_plus_.html
-/doc/asio/reference/const_buffers_1/operator_plus_/overload1.html
-/doc/asio/reference/const_buffers_1/operator_plus_/overload2.html
-/doc/asio/reference/const_buffers_1/value_type.html
-/doc/asio/reference/ConstBufferSequence.html
-/doc/asio/reference/ConvertibleToConstBuffer.html
-/doc/asio/reference/ConvertibleToMutableBuffer.html
-/doc/asio/reference/coroutine/
-/doc/asio/reference/coroutine/coroutine.html
-/doc/asio/reference/coroutine.html
-/doc/asio/reference/coroutine/is_child.html
-/doc/asio/reference/coroutine/is_complete.html
-/doc/asio/reference/coroutine/is_parent.html
-/doc/asio/reference/datagram_socket_service/
-/doc/asio/reference/datagram_socket_service/assign.html
-/doc/asio/reference/datagram_socket_service/async_connect.html
-/doc/asio/reference/datagram_socket_service/async_receive_from.html
-/doc/asio/reference/datagram_socket_service/async_receive.html
-/doc/asio/reference/datagram_socket_service/async_send.html
-/doc/asio/reference/datagram_socket_service/async_send_to.html
-/doc/asio/reference/datagram_socket_service/async_wait.html
-/doc/asio/reference/datagram_socket_service/at_mark.html
-/doc/asio/reference/datagram_socket_service/available.html
-/doc/asio/reference/datagram_socket_service/bind.html
-/doc/asio/reference/datagram_socket_service/cancel.html
-/doc/asio/reference/datagram_socket_service/close.html
-/doc/asio/reference/datagram_socket_service/connect.html
-/doc/asio/reference/datagram_socket_service/construct.html
-/doc/asio/reference/datagram_socket_service/converting_move_construct.html
-/doc/asio/reference/datagram_socket_service/datagram_socket_service.html
-/doc/asio/reference/datagram_socket_service/destroy.html
-/doc/asio/reference/datagram_socket_service/endpoint_type.html
-/doc/asio/reference/datagram_socket_service/get_io_service.html
-/doc/asio/reference/datagram_socket_service/get_option.html
-/doc/asio/reference/datagram_socket_service.html
-/doc/asio/reference/DatagramSocketService.html
-/doc/asio/reference/datagram_socket_service/id.html
-/doc/asio/reference/datagram_socket_service/implementation_type.html
-/doc/asio/reference/datagram_socket_service/io_control.html
-/doc/asio/reference/datagram_socket_service/is_open.html
-/doc/asio/reference/datagram_socket_service/local_endpoint.html
-/doc/asio/reference/datagram_socket_service/move_assign.html
-/doc/asio/reference/datagram_socket_service/move_construct.html
-/doc/asio/reference/datagram_socket_service/native_handle.html
-/doc/asio/reference/datagram_socket_service/native_handle_type.html
-/doc/asio/reference/datagram_socket_service/native_non_blocking/
-/doc/asio/reference/datagram_socket_service/native_non_blocking.html
-/doc/asio/reference/datagram_socket_service/native_non_blocking/overload1.html
-/doc/asio/reference/datagram_socket_service/native_non_blocking/overload2.html
-/doc/asio/reference/datagram_socket_service/non_blocking/
-/doc/asio/reference/datagram_socket_service/non_blocking.html
-/doc/asio/reference/datagram_socket_service/non_blocking/overload1.html
-/doc/asio/reference/datagram_socket_service/non_blocking/overload2.html
-/doc/asio/reference/datagram_socket_service/open.html
-/doc/asio/reference/datagram_socket_service/protocol_type.html
-/doc/asio/reference/datagram_socket_service/receive_from.html
-/doc/asio/reference/datagram_socket_service/receive.html
-/doc/asio/reference/datagram_socket_service/remote_endpoint.html
-/doc/asio/reference/datagram_socket_service/send.html
-/doc/asio/reference/datagram_socket_service/send_to.html
-/doc/asio/reference/datagram_socket_service/set_option.html
-/doc/asio/reference/datagram_socket_service/shutdown.html
-/doc/asio/reference/datagram_socket_service/wait.html
-/doc/asio/reference/deadline_timer.html
-/doc/asio/reference/deadline_timer_service/
-/doc/asio/reference/deadline_timer_service/async_wait.html
-/doc/asio/reference/deadline_timer_service/cancel.html
-/doc/asio/reference/deadline_timer_service/cancel_one.html
-/doc/asio/reference/deadline_timer_service/construct.html
-/doc/asio/reference/deadline_timer_service/deadline_timer_service.html
-/doc/asio/reference/deadline_timer_service/destroy.html
-/doc/asio/reference/deadline_timer_service/duration_type.html
-/doc/asio/reference/deadline_timer_service/expires_at/
-/doc/asio/reference/deadline_timer_service/expires_at.html
-/doc/asio/reference/deadline_timer_service/expires_at/overload1.html
-/doc/asio/reference/deadline_timer_service/expires_at/overload2.html
-/doc/asio/reference/deadline_timer_service/expires_from_now/
-/doc/asio/reference/deadline_timer_service/expires_from_now.html
-/doc/asio/reference/deadline_timer_service/expires_from_now/overload1.html
-/doc/asio/reference/deadline_timer_service/expires_from_now/overload2.html
-/doc/asio/reference/deadline_timer_service/get_io_service.html
-/doc/asio/reference/deadline_timer_service.html
-/doc/asio/reference/deadline_timer_service/id.html
-/doc/asio/reference/deadline_timer_service/implementation_type.html
-/doc/asio/reference/deadline_timer_service/time_type.html
-/doc/asio/reference/deadline_timer_service/traits_type.html
-/doc/asio/reference/deadline_timer_service/wait.html
-/doc/asio/reference/defer/
-/doc/asio/reference/defer.html
-/doc/asio/reference/defer/overload1.html
-/doc/asio/reference/defer/overload2.html
-/doc/asio/reference/defer/overload3.html
-/doc/asio/reference/DescriptorService.html
-/doc/asio/reference/dispatch/
-/doc/asio/reference/dispatch.html
-/doc/asio/reference/dispatch/overload1.html
-/doc/asio/reference/dispatch/overload2.html
-/doc/asio/reference/dispatch/overload3.html
-/doc/asio/reference/dynamic_buffer/
-/doc/asio/reference/dynamic_buffer.html
-/doc/asio/reference/dynamic_buffer/overload1.html
-/doc/asio/reference/dynamic_buffer/overload2.html
-/doc/asio/reference/dynamic_buffer/overload3.html
-/doc/asio/reference/dynamic_buffer/overload4.html
-/doc/asio/reference/DynamicBufferSequence.html
-/doc/asio/reference/dynamic_string_buffer/
-/doc/asio/reference/dynamic_string_buffer/capacity.html
-/doc/asio/reference/dynamic_string_buffer/commit.html
-/doc/asio/reference/dynamic_string_buffer/const_buffers_type.html
-/doc/asio/reference/dynamic_string_buffer/consume.html
-/doc/asio/reference/dynamic_string_buffer/data.html
-/doc/asio/reference/dynamic_string_buffer/dynamic_string_buffer/
-/doc/asio/reference/dynamic_string_buffer/dynamic_string_buffer.html
-/doc/asio/reference/dynamic_string_buffer/dynamic_string_buffer/overload1.html
-/doc/asio/reference/dynamic_string_buffer/dynamic_string_buffer/overload2.html
-/doc/asio/reference/dynamic_string_buffer.html
-/doc/asio/reference/dynamic_string_buffer/max_size.html
-/doc/asio/reference/dynamic_string_buffer/mutable_buffers_type.html
-/doc/asio/reference/dynamic_string_buffer/prepare.html
-/doc/asio/reference/dynamic_string_buffer/size.html
-/doc/asio/reference/dynamic_vector_buffer/
-/doc/asio/reference/dynamic_vector_buffer/capacity.html
-/doc/asio/reference/dynamic_vector_buffer/commit.html
-/doc/asio/reference/dynamic_vector_buffer/const_buffers_type.html
-/doc/asio/reference/dynamic_vector_buffer/consume.html
-/doc/asio/reference/dynamic_vector_buffer/data.html
-/doc/asio/reference/dynamic_vector_buffer/dynamic_vector_buffer/
-/doc/asio/reference/dynamic_vector_buffer/dynamic_vector_buffer.html
-/doc/asio/reference/dynamic_vector_buffer/dynamic_vector_buffer/overload1.html
-/doc/asio/reference/dynamic_vector_buffer/dynamic_vector_buffer/overload2.html
-/doc/asio/reference/dynamic_vector_buffer.html
-/doc/asio/reference/dynamic_vector_buffer/max_size.html
-/doc/asio/reference/dynamic_vector_buffer/mutable_buffers_type.html
-/doc/asio/reference/dynamic_vector_buffer/prepare.html
-/doc/asio/reference/dynamic_vector_buffer/size.html
-/doc/asio/reference/Endpoint.html
-/doc/asio/reference/error__addrinfo_category.html
-/doc/asio/reference/error__addrinfo_errors.html
-/doc/asio/reference/error__basic_errors.html
-/doc/asio/reference/error_category/
-/doc/asio/reference/error_category/_error_category.html
-/doc/asio/reference/error_category.html
-/doc/asio/reference/error_category/message.html
-/doc/asio/reference/error_category/name.html
-/doc/asio/reference/error_category/operator_eq__eq_.html
-/doc/asio/reference/error_category/operator_not__eq_.html
-/doc/asio/reference/error_code/
-/doc/asio/reference/error_code/category.html
-/doc/asio/reference/error_code/error_code/
-/doc/asio/reference/error_code/error_code.html
-/doc/asio/reference/error_code/error_code/overload1.html
-/doc/asio/reference/error_code/error_code/overload2.html
-/doc/asio/reference/error_code/error_code/overload3.html
-/doc/asio/reference/error_code.html
-/doc/asio/reference/error_code/message.html
-/doc/asio/reference/error_code/operator_eq__eq_.html
-/doc/asio/reference/error_code/operator_not__eq_.html
-/doc/asio/reference/error_code/operator_not_.html
-/doc/asio/reference/error_code/operator_unspecified_bool_type.html
-/doc/asio/reference/error_code/unspecified_bool_true.html
-/doc/asio/reference/error_code/unspecified_bool_type.html
-/doc/asio/reference/error_code__unspecified_bool_type_t.html
-/doc/asio/reference/error_code/value.html
-/doc/asio/reference/error__get_addrinfo_category.html
-/doc/asio/reference/error__get_misc_category.html
-/doc/asio/reference/error__get_netdb_category.html
-/doc/asio/reference/error__get_ssl_category.html
-/doc/asio/reference/error__get_system_category.html
-/doc/asio/reference/error__make_error_code/
-/doc/asio/reference/error__make_error_code.html
-/doc/asio/reference/error__make_error_code/overload1.html
-/doc/asio/reference/error__make_error_code/overload2.html
-/doc/asio/reference/error__make_error_code/overload3.html
-/doc/asio/reference/error__make_error_code/overload4.html
-/doc/asio/reference/error__make_error_code/overload5.html
-/doc/asio/reference/error__misc_category.html
-/doc/asio/reference/error__misc_errors.html
-/doc/asio/reference/error__netdb_category.html
-/doc/asio/reference/error__netdb_errors.html
-/doc/asio/reference/error__ssl_category.html
-/doc/asio/reference/error__ssl_errors.html
-/doc/asio/reference/error__system_category.html
-/doc/asio/reference/execution_context/
-/doc/asio/reference/execution_context/add_service.html
-/doc/asio/reference/execution_context/destroy_context.html
-/doc/asio/reference/execution_context/_execution_context.html
-/doc/asio/reference/execution_context/execution_context.html
-/doc/asio/reference/execution_context/fork_event.html
-/doc/asio/reference/execution_context/has_service.html
-/doc/asio/reference/execution_context.html
-/doc/asio/reference/execution_context__id/
-/doc/asio/reference/execution_context__id.html
-/doc/asio/reference/execution_context__id/id.html
-/doc/asio/reference/execution_context/make_service.html
-/doc/asio/reference/execution_context/notify_fork.html
-/doc/asio/reference/execution_context__service/
-/doc/asio/reference/execution_context__service/context.html
-/doc/asio/reference/execution_context__service/fork_service.html
-/doc/asio/reference/execution_context__service.html
-/doc/asio/reference/execution_context__service/_service.html
-/doc/asio/reference/execution_context__service/service.html
-/doc/asio/reference/execution_context__service/shutdown_service.html
-/doc/asio/reference/execution_context/shutdown_context.html
-/doc/asio/reference/execution_context/use_service/
-/doc/asio/reference/execution_context/use_service.html
-/doc/asio/reference/execution_context/use_service/overload1.html
-/doc/asio/reference/execution_context/use_service/overload2.html
-/doc/asio/reference/executor/
-/doc/asio/reference/Executor1.html
-/doc/asio/reference/executor_arg.html
-/doc/asio/reference/executor_arg_t/
-/doc/asio/reference/executor_arg_t/executor_arg_t.html
-/doc/asio/reference/executor_arg_t.html
-/doc/asio/reference/executor/context.html
-/doc/asio/reference/executor/defer.html
-/doc/asio/reference/executor/dispatch.html
-/doc/asio/reference/executor/executor/
-/doc/asio/reference/executor/_executor.html
-/doc/asio/reference/executor/executor.html
-/doc/asio/reference/executor/executor/overload1.html
-/doc/asio/reference/executor/executor/overload2.html
-/doc/asio/reference/executor/executor/overload3.html
-/doc/asio/reference/executor/executor/overload4.html
-/doc/asio/reference/executor/executor/overload5.html
-/doc/asio/reference/executor/executor/overload6.html
-/doc/asio/reference/executor.html
-/doc/asio/reference/executor/on_work_finished.html
-/doc/asio/reference/executor/on_work_started.html
-/doc/asio/reference/executor/operator_eq_/
-/doc/asio/reference/executor/operator_eq__eq_.html
-/doc/asio/reference/executor/operator_eq_.html
-/doc/asio/reference/executor/operator_eq_/overload1.html
-/doc/asio/reference/executor/operator_eq_/overload2.html
-/doc/asio/reference/executor/operator_eq_/overload3.html
-/doc/asio/reference/executor/operator_eq_/overload4.html
-/doc/asio/reference/executor/operator_not__eq_.html
-/doc/asio/reference/executor/operator_unspecified_bool_type.html
-/doc/asio/reference/executor/post.html
-/doc/asio/reference/executor/target/
-/doc/asio/reference/executor/target.html
-/doc/asio/reference/executor/target/overload1.html
-/doc/asio/reference/executor/target/overload2.html
-/doc/asio/reference/executor/target_type.html
-/doc/asio/reference/executor/unspecified_bool_true.html
-/doc/asio/reference/executor/unspecified_bool_type.html
-/doc/asio/reference/executor__unspecified_bool_type_t.html
-/doc/asio/reference/executor_work/
-/doc/asio/reference/executor_work/executor_type.html
-/doc/asio/reference/executor_work/executor_work/
-/doc/asio/reference/executor_work/_executor_work.html
-/doc/asio/reference/executor_work/executor_work.html
-/doc/asio/reference/executor_work/executor_work/overload1.html
-/doc/asio/reference/executor_work/executor_work/overload2.html
-/doc/asio/reference/executor_work/executor_work/overload3.html
-/doc/asio/reference/executor_work/get_executor.html
-/doc/asio/reference/executor_work.html
-/doc/asio/reference/executor_work/owns_work.html
-/doc/asio/reference/executor_work/reset.html
-/doc/asio/reference/executor_wrapper/
-/doc/asio/reference/executor_wrapper/argument_type.html
-/doc/asio/reference/executor_wrapper/executor_type.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/
-/doc/asio/reference/executor_wrapper/_executor_wrapper.html
-/doc/asio/reference/executor_wrapper/executor_wrapper.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload1.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload2.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload3.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload4.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload5.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload6.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload7.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload8.html
-/doc/asio/reference/executor_wrapper/executor_wrapper/overload9.html
-/doc/asio/reference/executor_wrapper/first_argument_type.html
-/doc/asio/reference/executor_wrapper/get_executor.html
-/doc/asio/reference/executor_wrapper.html
-/doc/asio/reference/executor_wrapper/operator_lp__rp_/
-/doc/asio/reference/executor_wrapper/operator_lp__rp_.html
-/doc/asio/reference/executor_wrapper/operator_lp__rp_/overload1.html
-/doc/asio/reference/executor_wrapper/operator_lp__rp_/overload2.html
-/doc/asio/reference/executor_wrapper/result_type.html
-/doc/asio/reference/executor_wrapper/second_argument_type.html
-/doc/asio/reference/executor_wrapper/unwrap/
-/doc/asio/reference/executor_wrapper/unwrap.html
-/doc/asio/reference/executor_wrapper/unwrap/overload1.html
-/doc/asio/reference/executor_wrapper/unwrap/overload2.html
-/doc/asio/reference/executor_wrapper/wrapped_type.html
-/doc/asio/reference/generic__basic_endpoint/
-/doc/asio/reference/generic__basic_endpoint/basic_endpoint/
-/doc/asio/reference/generic__basic_endpoint/basic_endpoint.html
-/doc/asio/reference/generic__basic_endpoint/basic_endpoint/overload1.html
-/doc/asio/reference/generic__basic_endpoint/basic_endpoint/overload2.html
-/doc/asio/reference/generic__basic_endpoint/basic_endpoint/overload3.html
-/doc/asio/reference/generic__basic_endpoint/basic_endpoint/overload4.html
-/doc/asio/reference/generic__basic_endpoint/capacity.html
-/doc/asio/reference/generic__basic_endpoint/data/
-/doc/asio/reference/generic__basic_endpoint/data.html
-/doc/asio/reference/generic__basic_endpoint/data/overload1.html
-/doc/asio/reference/generic__basic_endpoint/data/overload2.html
-/doc/asio/reference/generic__basic_endpoint/data_type.html
-/doc/asio/reference/generic__basic_endpoint.html
-/doc/asio/reference/generic__basic_endpoint/operator_eq__eq_.html
-/doc/asio/reference/generic__basic_endpoint/operator_eq_.html
-/doc/asio/reference/generic__basic_endpoint/operator_gt__eq_.html
-/doc/asio/reference/generic__basic_endpoint/operator_gt_.html
-/doc/asio/reference/generic__basic_endpoint/operator_lt__eq_.html
-/doc/asio/reference/generic__basic_endpoint/operator_lt_.html
-/doc/asio/reference/generic__basic_endpoint/operator_not__eq_.html
-/doc/asio/reference/generic__basic_endpoint/protocol.html
-/doc/asio/reference/generic__basic_endpoint/protocol_type.html
-/doc/asio/reference/generic__basic_endpoint/resize.html
-/doc/asio/reference/generic__basic_endpoint/size.html
-/doc/asio/reference/generic__datagram_protocol/
-/doc/asio/reference/generic__datagram_protocol/datagram_protocol/
-/doc/asio/reference/generic__datagram_protocol/datagram_protocol.html
-/doc/asio/reference/generic__datagram_protocol/datagram_protocol/overload1.html
-/doc/asio/reference/generic__datagram_protocol/datagram_protocol/overload2.html
-/doc/asio/reference/generic__datagram_protocol/endpoint.html
-/doc/asio/reference/generic__datagram_protocol/family.html
-/doc/asio/reference/generic__datagram_protocol.html
-/doc/asio/reference/generic__datagram_protocol/operator_eq__eq_.html
-/doc/asio/reference/generic__datagram_protocol/operator_not__eq_.html
-/doc/asio/reference/generic__datagram_protocol/protocol.html
-/doc/asio/reference/generic__datagram_protocol/socket.html
-/doc/asio/reference/generic__datagram_protocol/type.html
-/doc/asio/reference/generic__raw_protocol/
-/doc/asio/reference/generic__raw_protocol/endpoint.html
-/doc/asio/reference/generic__raw_protocol/family.html
-/doc/asio/reference/generic__raw_protocol.html
-/doc/asio/reference/generic__raw_protocol/operator_eq__eq_.html
-/doc/asio/reference/generic__raw_protocol/operator_not__eq_.html
-/doc/asio/reference/generic__raw_protocol/protocol.html
-/doc/asio/reference/generic__raw_protocol/raw_protocol/
-/doc/asio/reference/generic__raw_protocol/raw_protocol.html
-/doc/asio/reference/generic__raw_protocol/raw_protocol/overload1.html
-/doc/asio/reference/generic__raw_protocol/raw_protocol/overload2.html
-/doc/asio/reference/generic__raw_protocol/socket.html
-/doc/asio/reference/generic__raw_protocol/type.html
-/doc/asio/reference/generic__seq_packet_protocol/
-/doc/asio/reference/generic__seq_packet_protocol/endpoint.html
-/doc/asio/reference/generic__seq_packet_protocol/family.html
-/doc/asio/reference/generic__seq_packet_protocol.html
-/doc/asio/reference/generic__seq_packet_protocol/operator_eq__eq_.html
-/doc/asio/reference/generic__seq_packet_protocol/operator_not__eq_.html
-/doc/asio/reference/generic__seq_packet_protocol/protocol.html
-/doc/asio/reference/generic__seq_packet_protocol/seq_packet_protocol/
-/doc/asio/reference/generic__seq_packet_protocol/seq_packet_protocol.html
-/doc/asio/reference/generic__seq_packet_protocol/seq_packet_protocol/overload1.html
-/doc/asio/reference/generic__seq_packet_protocol/seq_packet_protocol/overload2.html
-/doc/asio/reference/generic__seq_packet_protocol/socket.html
-/doc/asio/reference/generic__seq_packet_protocol/type.html
-/doc/asio/reference/generic__stream_protocol/
-/doc/asio/reference/generic__stream_protocol/endpoint.html
-/doc/asio/reference/generic__stream_protocol/family.html
-/doc/asio/reference/generic__stream_protocol.html
-/doc/asio/reference/generic__stream_protocol/iostream.html
-/doc/asio/reference/generic__stream_protocol/operator_eq__eq_.html
-/doc/asio/reference/generic__stream_protocol/operator_not__eq_.html
-/doc/asio/reference/generic__stream_protocol/protocol.html
-/doc/asio/reference/generic__stream_protocol/socket.html
-/doc/asio/reference/generic__stream_protocol/stream_protocol/
-/doc/asio/reference/generic__stream_protocol/stream_protocol.html
-/doc/asio/reference/generic__stream_protocol/stream_protocol/overload1.html
-/doc/asio/reference/generic__stream_protocol/stream_protocol/overload2.html
-/doc/asio/reference/generic__stream_protocol/type.html
-/doc/asio/reference/get_associated_allocator/
-/doc/asio/reference/get_associated_allocator.html
-/doc/asio/reference/get_associated_allocator/overload1.html
-/doc/asio/reference/get_associated_allocator/overload2.html
-/doc/asio/reference/get_associated_executor/
-/doc/asio/reference/get_associated_executor.html
-/doc/asio/reference/get_associated_executor/overload1.html
-/doc/asio/reference/get_associated_executor/overload2.html
-/doc/asio/reference/get_associated_executor/overload3.html
-/doc/asio/reference/GettableSerialPortOption.html
-/doc/asio/reference/GettableSocketOption.html
-/doc/asio/reference/Handler.html
-/doc/asio/reference/handler_type/
-/doc/asio/reference/handler_type.html
-/doc/asio/reference/handler_type/type.html
-/doc/asio/reference/HandleService.html
-/doc/asio/reference/HandshakeHandler.html
-/doc/asio/reference/has_service.html
-/doc/asio/reference/high_resolution_timer.html
-/doc/asio/reference.html
-/doc/asio/reference/InternetProtocol.html
-/doc/asio/reference/invalid_service_owner/
-/doc/asio/reference/invalid_service_owner.html
-/doc/asio/reference/invalid_service_owner/invalid_service_owner.html
-/doc/asio/reference/IoControlCommand.html
-/doc/asio/reference/IoObjectService.html
-/doc/asio/reference/io_service/
-/doc/asio/reference/io_service/add_service.html
-/doc/asio/reference/io_service/destroy_context.html
-/doc/asio/reference/io_service/dispatch.html
-/doc/asio/reference/io_service__executor_type/
-/doc/asio/reference/io_service__executor_type/context.html
-/doc/asio/reference/io_service__executor_type/defer.html
-/doc/asio/reference/io_service__executor_type/dispatch.html
-/doc/asio/reference/io_service__executor_type.html
-/doc/asio/reference/io_service__executor_type/on_work_finished.html
-/doc/asio/reference/io_service__executor_type/on_work_started.html
-/doc/asio/reference/io_service__executor_type/operator_eq__eq_.html
-/doc/asio/reference/io_service__executor_type/operator_not__eq_.html
-/doc/asio/reference/io_service__executor_type/post.html
-/doc/asio/reference/io_service__executor_type/running_in_this_thread.html
-/doc/asio/reference/io_service/fork_event.html
-/doc/asio/reference/io_service/get_executor.html
-/doc/asio/reference/io_service/has_service.html
-/doc/asio/reference/io_service.html
-/doc/asio/reference/io_service/io_service/
-/doc/asio/reference/io_service/_io_service.html
-/doc/asio/reference/io_service/io_service.html
-/doc/asio/reference/io_service/io_service/overload1.html
-/doc/asio/reference/io_service/io_service/overload2.html
-/doc/asio/reference/io_service/make_service.html
-/doc/asio/reference/io_service/notify_fork.html
-/doc/asio/reference/io_service/poll/
-/doc/asio/reference/io_service/poll.html
-/doc/asio/reference/io_service/poll_one/
-/doc/asio/reference/io_service/poll_one.html
-/doc/asio/reference/io_service/poll_one/overload1.html
-/doc/asio/reference/io_service/poll_one/overload2.html
-/doc/asio/reference/io_service/poll/overload1.html
-/doc/asio/reference/io_service/poll/overload2.html
-/doc/asio/reference/io_service/post.html
-/doc/asio/reference/io_service/reset.html
-/doc/asio/reference/io_service/restart.html
-/doc/asio/reference/io_service/run/
-/doc/asio/reference/io_service/run.html
-/doc/asio/reference/io_service/run_one/
-/doc/asio/reference/io_service/run_one.html
-/doc/asio/reference/io_service/run_one/overload1.html
-/doc/asio/reference/io_service/run_one/overload2.html
-/doc/asio/reference/io_service/run/overload1.html
-/doc/asio/reference/io_service/run/overload2.html
-/doc/asio/reference/io_service__service/
-/doc/asio/reference/io_service__service/get_io_service.html
-/doc/asio/reference/io_service__service.html
-/doc/asio/reference/io_service__service/_service.html
-/doc/asio/reference/io_service__service/service.html
-/doc/asio/reference/io_service/shutdown_context.html
-/doc/asio/reference/io_service/stop.html
-/doc/asio/reference/io_service/stopped.html
-/doc/asio/reference/io_service__strand/
-/doc/asio/reference/io_service__strand/context.html
-/doc/asio/reference/io_service__strand/defer.html
-/doc/asio/reference/io_service__strand/dispatch/
-/doc/asio/reference/io_service__strand/dispatch.html
-/doc/asio/reference/io_service__strand/dispatch/overload1.html
-/doc/asio/reference/io_service__strand/dispatch/overload2.html
-/doc/asio/reference/io_service__strand/get_io_service.html
-/doc/asio/reference/io_service__strand.html
-/doc/asio/reference/io_service__strand/on_work_finished.html
-/doc/asio/reference/io_service__strand/on_work_started.html
-/doc/asio/reference/io_service__strand/operator_eq__eq_.html
-/doc/asio/reference/io_service__strand/operator_not__eq_.html
-/doc/asio/reference/io_service__strand/post/
-/doc/asio/reference/io_service__strand/post.html
-/doc/asio/reference/io_service__strand/post/overload1.html
-/doc/asio/reference/io_service__strand/post/overload2.html
-/doc/asio/reference/io_service__strand/running_in_this_thread.html
-/doc/asio/reference/io_service__strand/_strand.html
-/doc/asio/reference/io_service__strand/strand.html
-/doc/asio/reference/io_service__strand/wrap.html
-/doc/asio/reference/io_service/use_service/
-/doc/asio/reference/io_service/use_service.html
-/doc/asio/reference/io_service/use_service/overload1.html
-/doc/asio/reference/io_service/use_service/overload2.html
-/doc/asio/reference/io_service__work/
-/doc/asio/reference/io_service__work/get_io_service.html
-/doc/asio/reference/io_service__work.html
-/doc/asio/reference/io_service__work/work/
-/doc/asio/reference/io_service__work/_work.html
-/doc/asio/reference/io_service__work/work.html
-/doc/asio/reference/io_service__work/work/overload1.html
-/doc/asio/reference/io_service__work/work/overload2.html
-/doc/asio/reference/io_service/wrap.html
-/doc/asio/reference/ip__address/
-/doc/asio/reference/ip__address/address/
-/doc/asio/reference/ip__address/address.html
-/doc/asio/reference/ip__address/address/overload1.html
-/doc/asio/reference/ip__address/address/overload2.html
-/doc/asio/reference/ip__address/address/overload3.html
-/doc/asio/reference/ip__address/address/overload4.html
-/doc/asio/reference/ip__address_cast/
-/doc/asio/reference/ip__address_cast.html
-/doc/asio/reference/ip__address_cast/overload1.html
-/doc/asio/reference/ip__address_cast/overload2.html
-/doc/asio/reference/ip__address_cast/overload3.html
-/doc/asio/reference/ip__address_cast/overload4.html
-/doc/asio/reference/ip__address_cast/overload5.html
-/doc/asio/reference/ip__address_cast/overload6.html
-/doc/asio/reference/ip__address_cast/overload7.html
-/doc/asio/reference/ip__address_cast/overload8.html
-/doc/asio/reference/ip__address_cast/overload9.html
-/doc/asio/reference/ip__address/from_string/
-/doc/asio/reference/ip__address/from_string.html
-/doc/asio/reference/ip__address/from_string/overload1.html
-/doc/asio/reference/ip__address/from_string/overload2.html
-/doc/asio/reference/ip__address/from_string/overload3.html
-/doc/asio/reference/ip__address/from_string/overload4.html
-/doc/asio/reference/ip__address.html
-/doc/asio/reference/ip__address/is_loopback.html
-/doc/asio/reference/ip__address/is_multicast.html
-/doc/asio/reference/ip__address/is_unspecified.html
-/doc/asio/reference/ip__address/is_v4.html
-/doc/asio/reference/ip__address/is_v6.html
-/doc/asio/reference/ip__address_iterator_v4/
-/doc/asio/reference/ip__address_iterator_v4/address_iterator_v4/
-/doc/asio/reference/ip__address_iterator_v4/address_iterator_v4.html
-/doc/asio/reference/ip__address_iterator_v4/address_iterator_v4/overload1.html
-/doc/asio/reference/ip__address_iterator_v4/address_iterator_v4/overload2.html
-/doc/asio/reference/ip__address_iterator_v4/difference_type.html
-/doc/asio/reference/ip__address_iterator_v4.html
-/doc/asio/reference/ip__address_iterator_v4/iterator_category.html
-/doc/asio/reference/ip__address_iterator_v4/operator_arrow_.html
-/doc/asio/reference/ip__address_iterator_v4/operator_eq__eq_.html
-/doc/asio/reference/ip__address_iterator_v4/operator_eq_.html
-/doc/asio/reference/ip__address_iterator_v4/operator_minus__minus_/
-/doc/asio/reference/ip__address_iterator_v4/operator_minus__minus_.html
-/doc/asio/reference/ip__address_iterator_v4/operator_minus__minus_/overload1.html
-/doc/asio/reference/ip__address_iterator_v4/operator_minus__minus_/overload2.html
-/doc/asio/reference/ip__address_iterator_v4/operator_not__eq_.html
-/doc/asio/reference/ip__address_iterator_v4/operator_plus__plus_/
-/doc/asio/reference/ip__address_iterator_v4/operator_plus__plus_.html
-/doc/asio/reference/ip__address_iterator_v4/operator_plus__plus_/overload1.html
-/doc/asio/reference/ip__address_iterator_v4/operator_plus__plus_/overload2.html
-/doc/asio/reference/ip__address_iterator_v4/operator__star_.html
-/doc/asio/reference/ip__address_iterator_v4/pointer.html
-/doc/asio/reference/ip__address_iterator_v4/reference.html
-/doc/asio/reference/ip__address_iterator_v4/value_type.html
-/doc/asio/reference/ip__address_iterator_v6/
-/doc/asio/reference/ip__address_iterator_v6/address_iterator_v6/
-/doc/asio/reference/ip__address_iterator_v6/address_iterator_v6.html
-/doc/asio/reference/ip__address_iterator_v6/address_iterator_v6/overload1.html
-/doc/asio/reference/ip__address_iterator_v6/address_iterator_v6/overload2.html
-/doc/asio/reference/ip__address_iterator_v6/difference_type.html
-/doc/asio/reference/ip__address_iterator_v6.html
-/doc/asio/reference/ip__address_iterator_v6/iterator_category.html
-/doc/asio/reference/ip__address_iterator_v6/operator_arrow_.html
-/doc/asio/reference/ip__address_iterator_v6/operator_eq__eq_.html
-/doc/asio/reference/ip__address_iterator_v6/operator_eq_.html
-/doc/asio/reference/ip__address_iterator_v6/operator_minus__minus_/
-/doc/asio/reference/ip__address_iterator_v6/operator_minus__minus_.html
-/doc/asio/reference/ip__address_iterator_v6/operator_minus__minus_/overload1.html
-/doc/asio/reference/ip__address_iterator_v6/operator_minus__minus_/overload2.html
-/doc/asio/reference/ip__address_iterator_v6/operator_not__eq_.html
-/doc/asio/reference/ip__address_iterator_v6/operator_plus__plus_/
-/doc/asio/reference/ip__address_iterator_v6/operator_plus__plus_.html
-/doc/asio/reference/ip__address_iterator_v6/operator_plus__plus_/overload1.html
-/doc/asio/reference/ip__address_iterator_v6/operator_plus__plus_/overload2.html
-/doc/asio/reference/ip__address_iterator_v6/operator__star_.html
-/doc/asio/reference/ip__address_iterator_v6/pointer.html
-/doc/asio/reference/ip__address_iterator_v6/reference.html
-/doc/asio/reference/ip__address_iterator_v6/value_type.html
-/doc/asio/reference/ip__address/make_address/
-/doc/asio/reference/ip__address/make_address.html
-/doc/asio/reference/ip__address/make_address/overload1.html
-/doc/asio/reference/ip__address/make_address/overload2.html
-/doc/asio/reference/ip__address/make_address/overload3.html
-/doc/asio/reference/ip__address/make_address/overload4.html
-/doc/asio/reference/ip__address/operator_eq_/
-/doc/asio/reference/ip__address/operator_eq__eq_.html
-/doc/asio/reference/ip__address/operator_eq_.html
-/doc/asio/reference/ip__address/operator_eq_/overload1.html
-/doc/asio/reference/ip__address/operator_eq_/overload2.html
-/doc/asio/reference/ip__address/operator_eq_/overload3.html
-/doc/asio/reference/ip__address/operator_gt__eq_.html
-/doc/asio/reference/ip__address/operator_gt_.html
-/doc/asio/reference/ip__address/operator_lt__eq_.html
-/doc/asio/reference/ip__address/operator_lt_.html
-/doc/asio/reference/ip__address/operator_lt__lt_.html
-/doc/asio/reference/ip__address/operator_not__eq_.html
-/doc/asio/reference/ip__address_range_v4/
-/doc/asio/reference/ip__address_range_v4/address_range_v4/
-/doc/asio/reference/ip__address_range_v4/address_range_v4.html
-/doc/asio/reference/ip__address_range_v4/address_range_v4/overload1.html
-/doc/asio/reference/ip__address_range_v4/address_range_v4/overload2.html
-/doc/asio/reference/ip__address_range_v4/address_range_v4/overload3.html
-/doc/asio/reference/ip__address_range_v4/begin.html
-/doc/asio/reference/ip__address_range_v4/empty.html
-/doc/asio/reference/ip__address_range_v4/end.html
-/doc/asio/reference/ip__address_range_v4/find.html
-/doc/asio/reference/ip__address_range_v4.html
-/doc/asio/reference/ip__address_range_v4/iterator.html
-/doc/asio/reference/ip__address_range_v4/operator_eq_.html
-/doc/asio/reference/ip__address_range_v4/size.html
-/doc/asio/reference/ip__address_range_v6/
-/doc/asio/reference/ip__address_range_v6/address_range_v6/
-/doc/asio/reference/ip__address_range_v6/address_range_v6.html
-/doc/asio/reference/ip__address_range_v6/address_range_v6/overload1.html
-/doc/asio/reference/ip__address_range_v6/address_range_v6/overload2.html
-/doc/asio/reference/ip__address_range_v6/address_range_v6/overload3.html
-/doc/asio/reference/ip__address_range_v6/begin.html
-/doc/asio/reference/ip__address_range_v6/empty.html
-/doc/asio/reference/ip__address_range_v6/end.html
-/doc/asio/reference/ip__address_range_v6/find.html
-/doc/asio/reference/ip__address_range_v6.html
-/doc/asio/reference/ip__address_range_v6/iterator.html
-/doc/asio/reference/ip__address_range_v6/operator_eq_.html
-/doc/asio/reference/ip__address/to_string/
-/doc/asio/reference/ip__address/to_string.html
-/doc/asio/reference/ip__address/to_string/overload1.html
-/doc/asio/reference/ip__address/to_string/overload2.html
-/doc/asio/reference/ip__address/to_v4.html
-/doc/asio/reference/ip__address/to_v6.html
-/doc/asio/reference/ip__address_v4/
-/doc/asio/reference/ip__address_v4/address_v4/
-/doc/asio/reference/ip__address_v4/address_v4.html
-/doc/asio/reference/ip__address_v4/address_v4/overload1.html
-/doc/asio/reference/ip__address_v4/address_v4/overload2.html
-/doc/asio/reference/ip__address_v4/address_v4/overload3.html
-/doc/asio/reference/ip__address_v4/address_v4/overload4.html
-/doc/asio/reference/ip__address_v4/any.html
-/doc/asio/reference/ip__address_v4/broadcast/
-/doc/asio/reference/ip__address_v4/broadcast.html
-/doc/asio/reference/ip__address_v4/broadcast/overload1.html
-/doc/asio/reference/ip__address_v4/broadcast/overload2.html
-/doc/asio/reference/ip__address_v4/bytes_type.html
-/doc/asio/reference/ip__address_v4/from_string/
-/doc/asio/reference/ip__address_v4/from_string.html
-/doc/asio/reference/ip__address_v4/from_string/overload1.html
-/doc/asio/reference/ip__address_v4/from_string/overload2.html
-/doc/asio/reference/ip__address_v4/from_string/overload3.html
-/doc/asio/reference/ip__address_v4/from_string/overload4.html
-/doc/asio/reference/ip__address_v4.html
-/doc/asio/reference/ip__address_v4/is_class_a.html
-/doc/asio/reference/ip__address_v4/is_class_b.html
-/doc/asio/reference/ip__address_v4/is_class_c.html
-/doc/asio/reference/ip__address_v4/is_loopback.html
-/doc/asio/reference/ip__address_v4/is_multicast.html
-/doc/asio/reference/ip__address_v4/is_unspecified.html
-/doc/asio/reference/ip__address_v4/loopback.html
-/doc/asio/reference/ip__address_v4/make_address_v4/
-/doc/asio/reference/ip__address_v4/make_address_v4.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload1.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload2.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload3.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload4.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload5.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload6.html
-/doc/asio/reference/ip__address_v4/make_address_v4/overload7.html
-/doc/asio/reference/ip__address_v4/make_network_v4/
-/doc/asio/reference/ip__address_v4/make_network_v4.html
-/doc/asio/reference/ip__address_v4/make_network_v4/overload1.html
-/doc/asio/reference/ip__address_v4/make_network_v4/overload2.html
-/doc/asio/reference/ip__address_v4/netmask.html
-/doc/asio/reference/ip__address_v4/operator_eq__eq_.html
-/doc/asio/reference/ip__address_v4/operator_eq_.html
-/doc/asio/reference/ip__address_v4/operator_gt__eq_.html
-/doc/asio/reference/ip__address_v4/operator_gt_.html
-/doc/asio/reference/ip__address_v4/operator_lt__eq_.html
-/doc/asio/reference/ip__address_v4/operator_lt_.html
-/doc/asio/reference/ip__address_v4/operator_lt__lt_/
-/doc/asio/reference/ip__address_v4/operator_lt__lt_.html
-/doc/asio/reference/ip__address_v4/operator_lt__lt_/overload1.html
-/doc/asio/reference/ip__address_v4/operator_lt__lt_/overload2.html
-/doc/asio/reference/ip__address_v4/operator_not__eq_.html
-/doc/asio/reference/ip__address_v4/to_bytes.html
-/doc/asio/reference/ip__address_v4/to_string/
-/doc/asio/reference/ip__address_v4/to_string.html
-/doc/asio/reference/ip__address_v4/to_string/overload1.html
-/doc/asio/reference/ip__address_v4/to_string/overload2.html
-/doc/asio/reference/ip__address_v4/to_ulong.html
-/doc/asio/reference/ip__address_v6/
-/doc/asio/reference/ip__address_v6/address_v6/
-/doc/asio/reference/ip__address_v6/address_v6.html
-/doc/asio/reference/ip__address_v6/address_v6/overload1.html
-/doc/asio/reference/ip__address_v6/address_v6/overload2.html
-/doc/asio/reference/ip__address_v6/address_v6/overload3.html
-/doc/asio/reference/ip__address_v6/any.html
-/doc/asio/reference/ip__address_v6/bytes_type.html
-/doc/asio/reference/ip__address_v6/from_string/
-/doc/asio/reference/ip__address_v6/from_string.html
-/doc/asio/reference/ip__address_v6/from_string/overload1.html
-/doc/asio/reference/ip__address_v6/from_string/overload2.html
-/doc/asio/reference/ip__address_v6/from_string/overload3.html
-/doc/asio/reference/ip__address_v6/from_string/overload4.html
-/doc/asio/reference/ip__address_v6.html
-/doc/asio/reference/ip__address_v6/is_link_local.html
-/doc/asio/reference/ip__address_v6/is_loopback.html
-/doc/asio/reference/ip__address_v6/is_multicast_global.html
-/doc/asio/reference/ip__address_v6/is_multicast.html
-/doc/asio/reference/ip__address_v6/is_multicast_link_local.html
-/doc/asio/reference/ip__address_v6/is_multicast_node_local.html
-/doc/asio/reference/ip__address_v6/is_multicast_org_local.html
-/doc/asio/reference/ip__address_v6/is_multicast_site_local.html
-/doc/asio/reference/ip__address_v6/is_site_local.html
-/doc/asio/reference/ip__address_v6/is_unspecified.html
-/doc/asio/reference/ip__address_v6/is_v4_compatible.html
-/doc/asio/reference/ip__address_v6/is_v4_mapped.html
-/doc/asio/reference/ip__address_v6/loopback.html
-/doc/asio/reference/ip__address_v6/make_address_v6/
-/doc/asio/reference/ip__address_v6/make_address_v6.html
-/doc/asio/reference/ip__address_v6/make_address_v6/overload1.html
-/doc/asio/reference/ip__address_v6/make_address_v6/overload2.html
-/doc/asio/reference/ip__address_v6/make_address_v6/overload3.html
-/doc/asio/reference/ip__address_v6/make_address_v6/overload4.html
-/doc/asio/reference/ip__address_v6/make_address_v6/overload5.html
-/doc/asio/reference/ip__address_v6/make_address_v6/overload6.html
-/doc/asio/reference/ip__address_v6/make_network_v6.html
-/doc/asio/reference/ip__address_v6/operator_eq__eq_.html
-/doc/asio/reference/ip__address_v6/operator_eq_.html
-/doc/asio/reference/ip__address_v6/operator_gt__eq_.html
-/doc/asio/reference/ip__address_v6/operator_gt_.html
-/doc/asio/reference/ip__address_v6/operator_lt__eq_.html
-/doc/asio/reference/ip__address_v6/operator_lt_.html
-/doc/asio/reference/ip__address_v6/operator_lt__lt_/
-/doc/asio/reference/ip__address_v6/operator_lt__lt_.html
-/doc/asio/reference/ip__address_v6/operator_lt__lt_/overload1.html
-/doc/asio/reference/ip__address_v6/operator_lt__lt_/overload2.html
-/doc/asio/reference/ip__address_v6/operator_not__eq_.html
-/doc/asio/reference/ip__address_v6/scope_id/
-/doc/asio/reference/ip__address_v6/scope_id.html
-/doc/asio/reference/ip__address_v6/scope_id/overload1.html
-/doc/asio/reference/ip__address_v6/scope_id/overload2.html
-/doc/asio/reference/ip__address_v6/to_bytes.html
-/doc/asio/reference/ip__address_v6/to_string/
-/doc/asio/reference/ip__address_v6/to_string.html
-/doc/asio/reference/ip__address_v6/to_string/overload1.html
-/doc/asio/reference/ip__address_v6/to_string/overload2.html
-/doc/asio/reference/ip__address_v6/to_v4.html
-/doc/asio/reference/ip__address_v6/v4_compatible.html
-/doc/asio/reference/ip__address_v6/v4_mapped.html
-/doc/asio/reference/ip__bad_address_cast/
-/doc/asio/reference/ip__bad_address_cast/_bad_address_cast.html
-/doc/asio/reference/ip__bad_address_cast/bad_address_cast.html
-/doc/asio/reference/ip__bad_address_cast.html
-/doc/asio/reference/ip__bad_address_cast/what.html
-/doc/asio/reference/ip__basic_endpoint/
-/doc/asio/reference/ip__basic_endpoint/address/
-/doc/asio/reference/ip__basic_endpoint/address.html
-/doc/asio/reference/ip__basic_endpoint/address/overload1.html
-/doc/asio/reference/ip__basic_endpoint/address/overload2.html
-/doc/asio/reference/ip__basic_endpoint/basic_endpoint/
-/doc/asio/reference/ip__basic_endpoint/basic_endpoint.html
-/doc/asio/reference/ip__basic_endpoint/basic_endpoint/overload1.html
-/doc/asio/reference/ip__basic_endpoint/basic_endpoint/overload2.html
-/doc/asio/reference/ip__basic_endpoint/basic_endpoint/overload3.html
-/doc/asio/reference/ip__basic_endpoint/basic_endpoint/overload4.html
-/doc/asio/reference/ip__basic_endpoint/capacity.html
-/doc/asio/reference/ip__basic_endpoint/data/
-/doc/asio/reference/ip__basic_endpoint/data.html
-/doc/asio/reference/ip__basic_endpoint/data/overload1.html
-/doc/asio/reference/ip__basic_endpoint/data/overload2.html
-/doc/asio/reference/ip__basic_endpoint/data_type.html
-/doc/asio/reference/ip__basic_endpoint.html
-/doc/asio/reference/ip__basic_endpoint/operator_eq__eq_.html
-/doc/asio/reference/ip__basic_endpoint/operator_eq_.html
-/doc/asio/reference/ip__basic_endpoint/operator_gt__eq_.html
-/doc/asio/reference/ip__basic_endpoint/operator_gt_.html
-/doc/asio/reference/ip__basic_endpoint/operator_lt__eq_.html
-/doc/asio/reference/ip__basic_endpoint/operator_lt_.html
-/doc/asio/reference/ip__basic_endpoint/operator_lt__lt_.html
-/doc/asio/reference/ip__basic_endpoint/operator_not__eq_.html
-/doc/asio/reference/ip__basic_endpoint/port/
-/doc/asio/reference/ip__basic_endpoint/port.html
-/doc/asio/reference/ip__basic_endpoint/port/overload1.html
-/doc/asio/reference/ip__basic_endpoint/port/overload2.html
-/doc/asio/reference/ip__basic_endpoint/protocol.html
-/doc/asio/reference/ip__basic_endpoint/protocol_type.html
-/doc/asio/reference/ip__basic_endpoint/resize.html
-/doc/asio/reference/ip__basic_endpoint/size.html
-/doc/asio/reference/ip__basic_resolver/
-/doc/asio/reference/ip__basic_resolver/async_resolve/
-/doc/asio/reference/ip__basic_resolver/async_resolve.html
-/doc/asio/reference/ip__basic_resolver/async_resolve/overload1.html
-/doc/asio/reference/ip__basic_resolver/async_resolve/overload2.html
-/doc/asio/reference/ip__basic_resolver/basic_resolver.html
-/doc/asio/reference/ip__basic_resolver/cancel.html
-/doc/asio/reference/ip__basic_resolver/endpoint_type.html
-/doc/asio/reference/ip__basic_resolver_entry/
-/doc/asio/reference/ip__basic_resolver_entry/basic_resolver_entry/
-/doc/asio/reference/ip__basic_resolver_entry/basic_resolver_entry.html
-/doc/asio/reference/ip__basic_resolver_entry/basic_resolver_entry/overload1.html
-/doc/asio/reference/ip__basic_resolver_entry/basic_resolver_entry/overload2.html
-/doc/asio/reference/ip__basic_resolver_entry/endpoint.html
-/doc/asio/reference/ip__basic_resolver_entry/endpoint_type.html
-/doc/asio/reference/ip__basic_resolver_entry/host_name.html
-/doc/asio/reference/ip__basic_resolver_entry.html
-/doc/asio/reference/ip__basic_resolver_entry/operator_endpoint_type.html
-/doc/asio/reference/ip__basic_resolver_entry/protocol_type.html
-/doc/asio/reference/ip__basic_resolver_entry/service_name.html
-/doc/asio/reference/ip__basic_resolver/executor_type.html
-/doc/asio/reference/ip__basic_resolver/get_executor.html
-/doc/asio/reference/ip__basic_resolver/get_implementation/
-/doc/asio/reference/ip__basic_resolver/get_implementation.html
-/doc/asio/reference/ip__basic_resolver/get_implementation/overload1.html
-/doc/asio/reference/ip__basic_resolver/get_implementation/overload2.html
-/doc/asio/reference/ip__basic_resolver/get_io_service.html
-/doc/asio/reference/ip__basic_resolver/get_service/
-/doc/asio/reference/ip__basic_resolver/get_service.html
-/doc/asio/reference/ip__basic_resolver/get_service/overload1.html
-/doc/asio/reference/ip__basic_resolver/get_service/overload2.html
-/doc/asio/reference/ip__basic_resolver.html
-/doc/asio/reference/ip__basic_resolver/implementation_type.html
-/doc/asio/reference/ip__basic_resolver_iterator/
-/doc/asio/reference/ip__basic_resolver_iterator/basic_resolver_iterator.html
-/doc/asio/reference/ip__basic_resolver_iterator/create/
-/doc/asio/reference/ip__basic_resolver_iterator/create.html
-/doc/asio/reference/ip__basic_resolver_iterator/create/overload1.html
-/doc/asio/reference/ip__basic_resolver_iterator/create/overload2.html
-/doc/asio/reference/ip__basic_resolver_iterator/create/overload3.html
-/doc/asio/reference/ip__basic_resolver_iterator/difference_type.html
-/doc/asio/reference/ip__basic_resolver_iterator.html
-/doc/asio/reference/ip__basic_resolver/iterator.html
-/doc/asio/reference/ip__basic_resolver_iterator/iterator_category.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator_arrow_.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator_eq__eq_.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator_not__eq_.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator_plus__plus_/
-/doc/asio/reference/ip__basic_resolver_iterator/operator_plus__plus_.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator_plus__plus_/overload1.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator_plus__plus_/overload2.html
-/doc/asio/reference/ip__basic_resolver_iterator/operator__star_.html
-/doc/asio/reference/ip__basic_resolver_iterator/pointer.html
-/doc/asio/reference/ip__basic_resolver_iterator/reference.html
-/doc/asio/reference/ip__basic_resolver_iterator/value_type.html
-/doc/asio/reference/ip__basic_resolver/protocol_type.html
-/doc/asio/reference/ip__basic_resolver_query/
-/doc/asio/reference/ip__basic_resolver_query/address_configured.html
-/doc/asio/reference/ip__basic_resolver_query/all_matching.html
-/doc/asio/reference/ip__basic_resolver_query/basic_resolver_query/
-/doc/asio/reference/ip__basic_resolver_query/basic_resolver_query.html
-/doc/asio/reference/ip__basic_resolver_query/basic_resolver_query/overload1.html
-/doc/asio/reference/ip__basic_resolver_query/basic_resolver_query/overload2.html
-/doc/asio/reference/ip__basic_resolver_query/basic_resolver_query/overload3.html
-/doc/asio/reference/ip__basic_resolver_query/basic_resolver_query/overload4.html
-/doc/asio/reference/ip__basic_resolver_query/canonical_name.html
-/doc/asio/reference/ip__basic_resolver_query/flags.html
-/doc/asio/reference/ip__basic_resolver_query/hints.html
-/doc/asio/reference/ip__basic_resolver_query/host_name.html
-/doc/asio/reference/ip__basic_resolver_query.html
-/doc/asio/reference/ip__basic_resolver/query.html
-/doc/asio/reference/ip__basic_resolver_query/numeric_host.html
-/doc/asio/reference/ip__basic_resolver_query/numeric_service.html
-/doc/asio/reference/ip__basic_resolver_query/passive.html
-/doc/asio/reference/ip__basic_resolver_query/protocol_type.html
-/doc/asio/reference/ip__basic_resolver_query/service_name.html
-/doc/asio/reference/ip__basic_resolver_query/v4_mapped.html
-/doc/asio/reference/ip__basic_resolver/resolve/
-/doc/asio/reference/ip__basic_resolver/resolve.html
-/doc/asio/reference/ip__basic_resolver/resolve/overload1.html
-/doc/asio/reference/ip__basic_resolver/resolve/overload2.html
-/doc/asio/reference/ip__basic_resolver/resolve/overload3.html
-/doc/asio/reference/ip__basic_resolver/resolve/overload4.html
-/doc/asio/reference/ip__basic_resolver/service_type.html
-/doc/asio/reference/ip__host_name/
-/doc/asio/reference/ip__host_name.html
-/doc/asio/reference/ip__host_name/overload1.html
-/doc/asio/reference/ip__host_name/overload2.html
-/doc/asio/reference/ip__icmp/
-/doc/asio/reference/ip__icmp/endpoint.html
-/doc/asio/reference/ip__icmp/family.html
-/doc/asio/reference/ip__icmp.html
-/doc/asio/reference/ip__icmp/operator_eq__eq_.html
-/doc/asio/reference/ip__icmp/operator_not__eq_.html
-/doc/asio/reference/ip__icmp/protocol.html
-/doc/asio/reference/ip__icmp/resolver.html
-/doc/asio/reference/ip__icmp/socket.html
-/doc/asio/reference/ip__icmp/type.html
-/doc/asio/reference/ip__icmp/v4.html
-/doc/asio/reference/ip__icmp/v6.html
-/doc/asio/reference/ip__multicast__enable_loopback.html
-/doc/asio/reference/ip__multicast__hops.html
-/doc/asio/reference/ip__multicast__join_group.html
-/doc/asio/reference/ip__multicast__leave_group.html
-/doc/asio/reference/ip__multicast__outbound_interface.html
-/doc/asio/reference/ip__network_v4/
-/doc/asio/reference/ip__network_v4/address.html
-/doc/asio/reference/ip__network_v4/broadcast.html
-/doc/asio/reference/ip__network_v4/canonical.html
-/doc/asio/reference/ip__network_v4/hosts.html
-/doc/asio/reference/ip__network_v4.html
-/doc/asio/reference/ip__network_v4/is_host.html
-/doc/asio/reference/ip__network_v4/is_subnet_of.html
-/doc/asio/reference/ip__network_v4/make_network_v4/
-/doc/asio/reference/ip__network_v4/make_network_v4.html
-/doc/asio/reference/ip__network_v4/make_network_v4/overload1.html
-/doc/asio/reference/ip__network_v4/make_network_v4/overload2.html
-/doc/asio/reference/ip__network_v4/make_network_v4/overload3.html
-/doc/asio/reference/ip__network_v4/make_network_v4/overload4.html
-/doc/asio/reference/ip__network_v4/netmask.html
-/doc/asio/reference/ip__network_v4/network.html
-/doc/asio/reference/ip__network_v4/network_v4/
-/doc/asio/reference/ip__network_v4/network_v4.html
-/doc/asio/reference/ip__network_v4/network_v4/overload1.html
-/doc/asio/reference/ip__network_v4/network_v4/overload2.html
-/doc/asio/reference/ip__network_v4/network_v4/overload3.html
-/doc/asio/reference/ip__network_v4/network_v4/overload4.html
-/doc/asio/reference/ip__network_v4/operator_eq__eq_.html
-/doc/asio/reference/ip__network_v4/operator_eq_.html
-/doc/asio/reference/ip__network_v4/operator_not__eq_.html
-/doc/asio/reference/ip__network_v4/prefix_length.html
-/doc/asio/reference/ip__network_v4/to_string/
-/doc/asio/reference/ip__network_v4/to_string.html
-/doc/asio/reference/ip__network_v4/to_string/overload1.html
-/doc/asio/reference/ip__network_v4/to_string/overload2.html
-/doc/asio/reference/ip__network_v6/
-/doc/asio/reference/ip__network_v6/address.html
-/doc/asio/reference/ip__network_v6/canonical.html
-/doc/asio/reference/ip__network_v6/hosts.html
-/doc/asio/reference/ip__network_v6.html
-/doc/asio/reference/ip__network_v6/is_host.html
-/doc/asio/reference/ip__network_v6/is_subnet_of.html
-/doc/asio/reference/ip__network_v6/make_network_v6/
-/doc/asio/reference/ip__network_v6/make_network_v6.html
-/doc/asio/reference/ip__network_v6/make_network_v6/overload1.html
-/doc/asio/reference/ip__network_v6/make_network_v6/overload2.html
-/doc/asio/reference/ip__network_v6/make_network_v6/overload3.html
-/doc/asio/reference/ip__network_v6/make_network_v6/overload4.html
-/doc/asio/reference/ip__network_v6/network.html
-/doc/asio/reference/ip__network_v6/network_v6/
-/doc/asio/reference/ip__network_v6/network_v6.html
-/doc/asio/reference/ip__network_v6/network_v6/overload1.html
-/doc/asio/reference/ip__network_v6/network_v6/overload2.html
-/doc/asio/reference/ip__network_v6/network_v6/overload3.html
-/doc/asio/reference/ip__network_v6/operator_eq__eq_.html
-/doc/asio/reference/ip__network_v6/operator_eq_.html
-/doc/asio/reference/ip__network_v6/operator_not__eq_.html
-/doc/asio/reference/ip__network_v6/prefix_length.html
-/doc/asio/reference/ip__network_v6/to_string/
-/doc/asio/reference/ip__network_v6/to_string.html
-/doc/asio/reference/ip__network_v6/to_string/overload1.html
-/doc/asio/reference/ip__network_v6/to_string/overload2.html
-/doc/asio/reference/ip__resolver_query_base/
-/doc/asio/reference/ip__resolver_query_base/address_configured.html
-/doc/asio/reference/ip__resolver_query_base/all_matching.html
-/doc/asio/reference/ip__resolver_query_base/canonical_name.html
-/doc/asio/reference/ip__resolver_query_base/flags.html
-/doc/asio/reference/ip__resolver_query_base.html
-/doc/asio/reference/ip__resolver_query_base/numeric_host.html
-/doc/asio/reference/ip__resolver_query_base/numeric_service.html
-/doc/asio/reference/ip__resolver_query_base/passive.html
-/doc/asio/reference/ip__resolver_query_base/_resolver_query_base.html
-/doc/asio/reference/ip__resolver_query_base/v4_mapped.html
-/doc/asio/reference/ip__resolver_service/
-/doc/asio/reference/ip__resolver_service/async_resolve/
-/doc/asio/reference/ip__resolver_service/async_resolve.html
-/doc/asio/reference/ip__resolver_service/async_resolve/overload1.html
-/doc/asio/reference/ip__resolver_service/async_resolve/overload2.html
-/doc/asio/reference/ip__resolver_service/cancel.html
-/doc/asio/reference/ip__resolver_service/construct.html
-/doc/asio/reference/ip__resolver_service/destroy.html
-/doc/asio/reference/ip__resolver_service/endpoint_type.html
-/doc/asio/reference/ip__resolver_service/get_io_service.html
-/doc/asio/reference/ip__resolver_service.html
-/doc/asio/reference/ip__resolver_service/id.html
-/doc/asio/reference/ip__resolver_service/implementation_type.html
-/doc/asio/reference/ip__resolver_service/iterator_type.html
-/doc/asio/reference/ip__resolver_service/protocol_type.html
-/doc/asio/reference/ip__resolver_service/query_type.html
-/doc/asio/reference/ip__resolver_service/resolve/
-/doc/asio/reference/ip__resolver_service/resolve.html
-/doc/asio/reference/ip__resolver_service/resolve/overload1.html
-/doc/asio/reference/ip__resolver_service/resolve/overload2.html
-/doc/asio/reference/ip__resolver_service/resolver_service.html
-/doc/asio/reference/ip__tcp/
-/doc/asio/reference/ip__tcp/acceptor.html
-/doc/asio/reference/ip__tcp/endpoint.html
-/doc/asio/reference/ip__tcp/family.html
-/doc/asio/reference/ip__tcp.html
-/doc/asio/reference/ip__tcp/iostream.html
-/doc/asio/reference/ip__tcp/no_delay.html
-/doc/asio/reference/ip__tcp/operator_eq__eq_.html
-/doc/asio/reference/ip__tcp/operator_not__eq_.html
-/doc/asio/reference/ip__tcp/protocol.html
-/doc/asio/reference/ip__tcp/resolver.html
-/doc/asio/reference/ip__tcp/socket.html
-/doc/asio/reference/ip__tcp/type.html
-/doc/asio/reference/ip__tcp/v4.html
-/doc/asio/reference/ip__tcp/v6.html
-/doc/asio/reference/ip__udp/
-/doc/asio/reference/ip__udp/endpoint.html
-/doc/asio/reference/ip__udp/family.html
-/doc/asio/reference/ip__udp.html
-/doc/asio/reference/ip__udp/operator_eq__eq_.html
-/doc/asio/reference/ip__udp/operator_not__eq_.html
-/doc/asio/reference/ip__udp/protocol.html
-/doc/asio/reference/ip__udp/resolver.html
-/doc/asio/reference/ip__udp/socket.html
-/doc/asio/reference/ip__udp/type.html
-/doc/asio/reference/ip__udp/v4.html
-/doc/asio/reference/ip__udp/v6.html
-/doc/asio/reference/ip__unicast__hops.html
-/doc/asio/reference/ip__v4_mapped_t.html
-/doc/asio/reference/ip__v6_only.html
-/doc/asio/reference/is_const_buffer_sequence.html
-/doc/asio/reference/is_dynamic_buffer_sequence.html
-/doc/asio/reference/is_executor.html
-/doc/asio/reference/is_match_condition/
-/doc/asio/reference/is_match_condition.html
-/doc/asio/reference/is_match_condition/value.html
-/doc/asio/reference/is_mutable_buffer_sequence.html
-/doc/asio/reference/is_read_buffered/
-/doc/asio/reference/is_read_buffered.html
-/doc/asio/reference/is_read_buffered/value.html
-/doc/asio/reference/is_write_buffered/
-/doc/asio/reference/is_write_buffered.html
-/doc/asio/reference/is_write_buffered/value.html
-/doc/asio/reference/local__basic_endpoint/
-/doc/asio/reference/local__basic_endpoint/basic_endpoint/
-/doc/asio/reference/local__basic_endpoint/basic_endpoint.html
-/doc/asio/reference/local__basic_endpoint/basic_endpoint/overload1.html
-/doc/asio/reference/local__basic_endpoint/basic_endpoint/overload2.html
-/doc/asio/reference/local__basic_endpoint/basic_endpoint/overload3.html
-/doc/asio/reference/local__basic_endpoint/basic_endpoint/overload4.html
-/doc/asio/reference/local__basic_endpoint/capacity.html
-/doc/asio/reference/local__basic_endpoint/data/
-/doc/asio/reference/local__basic_endpoint/data.html
-/doc/asio/reference/local__basic_endpoint/data/overload1.html
-/doc/asio/reference/local__basic_endpoint/data/overload2.html
-/doc/asio/reference/local__basic_endpoint/data_type.html
-/doc/asio/reference/local__basic_endpoint.html
-/doc/asio/reference/local__basic_endpoint/operator_eq__eq_.html
-/doc/asio/reference/local__basic_endpoint/operator_eq_.html
-/doc/asio/reference/local__basic_endpoint/operator_gt__eq_.html
-/doc/asio/reference/local__basic_endpoint/operator_gt_.html
-/doc/asio/reference/local__basic_endpoint/operator_lt__eq_.html
-/doc/asio/reference/local__basic_endpoint/operator_lt_.html
-/doc/asio/reference/local__basic_endpoint/operator_lt__lt_.html
-/doc/asio/reference/local__basic_endpoint/operator_not__eq_.html
-/doc/asio/reference/local__basic_endpoint/path/
-/doc/asio/reference/local__basic_endpoint/path.html
-/doc/asio/reference/local__basic_endpoint/path/overload1.html
-/doc/asio/reference/local__basic_endpoint/path/overload2.html
-/doc/asio/reference/local__basic_endpoint/path/overload3.html
-/doc/asio/reference/local__basic_endpoint/protocol.html
-/doc/asio/reference/local__basic_endpoint/protocol_type.html
-/doc/asio/reference/local__basic_endpoint/resize.html
-/doc/asio/reference/local__basic_endpoint/size.html
-/doc/asio/reference/local__connect_pair/
-/doc/asio/reference/local__connect_pair.html
-/doc/asio/reference/local__connect_pair/overload1.html
-/doc/asio/reference/local__connect_pair/overload2.html
-/doc/asio/reference/local__datagram_protocol/
-/doc/asio/reference/local__datagram_protocol/endpoint.html
-/doc/asio/reference/local__datagram_protocol/family.html
-/doc/asio/reference/local__datagram_protocol.html
-/doc/asio/reference/local__datagram_protocol/protocol.html
-/doc/asio/reference/local__datagram_protocol/socket.html
-/doc/asio/reference/local__datagram_protocol/type.html
-/doc/asio/reference/local__stream_protocol/
-/doc/asio/reference/local__stream_protocol/acceptor.html
-/doc/asio/reference/local__stream_protocol/endpoint.html
-/doc/asio/reference/local__stream_protocol/family.html
-/doc/asio/reference/local__stream_protocol.html
-/doc/asio/reference/local__stream_protocol/iostream.html
-/doc/asio/reference/local__stream_protocol/protocol.html
-/doc/asio/reference/local__stream_protocol/socket.html
-/doc/asio/reference/local__stream_protocol/type.html
-/doc/asio/reference/make_work/
-/doc/asio/reference/make_work.html
-/doc/asio/reference/make_work/overload1.html
-/doc/asio/reference/make_work/overload2.html
-/doc/asio/reference/make_work/overload3.html
-/doc/asio/reference/make_work/overload4.html
-/doc/asio/reference/make_work/overload5.html
-/doc/asio/reference/mutable_buffer/
-/doc/asio/reference/mutable_buffer.html
-/doc/asio/reference/mutable_buffer/mutable_buffer/
-/doc/asio/reference/mutable_buffer/mutable_buffer.html
-/doc/asio/reference/mutable_buffer/mutable_buffer/overload1.html
-/doc/asio/reference/mutable_buffer/mutable_buffer/overload2.html
-/doc/asio/reference/mutable_buffer/operator_plus_/
-/doc/asio/reference/mutable_buffer/operator_plus_.html
-/doc/asio/reference/mutable_buffer/operator_plus_/overload1.html
-/doc/asio/reference/mutable_buffer/operator_plus_/overload2.html
-/doc/asio/reference/mutable_buffers_1/
-/doc/asio/reference/mutable_buffers_1/begin.html
-/doc/asio/reference/mutable_buffers_1/const_iterator.html
-/doc/asio/reference/mutable_buffers_1/end.html
-/doc/asio/reference/mutable_buffers_1.html
-/doc/asio/reference/mutable_buffers_1/mutable_buffers_1/
-/doc/asio/reference/mutable_buffers_1/mutable_buffers_1.html
-/doc/asio/reference/mutable_buffers_1/mutable_buffers_1/overload1.html
-/doc/asio/reference/mutable_buffers_1/mutable_buffers_1/overload2.html
-/doc/asio/reference/mutable_buffers_1/operator_plus_/
-/doc/asio/reference/mutable_buffers_1/operator_plus_.html
-/doc/asio/reference/mutable_buffers_1/operator_plus_/overload1.html
-/doc/asio/reference/mutable_buffers_1/operator_plus_/overload2.html
-/doc/asio/reference/mutable_buffers_1/value_type.html
-/doc/asio/reference/MutableBufferSequence.html
-/doc/asio/reference/null_buffers/
-/doc/asio/reference/null_buffers/begin.html
-/doc/asio/reference/null_buffers/const_iterator.html
-/doc/asio/reference/null_buffers/end.html
-/doc/asio/reference/null_buffers.html
-/doc/asio/reference/null_buffers/value_type.html
-/doc/asio/reference/ObjectHandleService.html
-/doc/asio/reference/operator_lt__lt_.html
-/doc/asio/reference/package/
-/doc/asio/reference/packaged_handler/
-/doc/asio/reference/packaged_handler/allocator_type.html
-/doc/asio/reference/packaged_handler/get_allocator.html
-/doc/asio/reference/packaged_handler.html
-/doc/asio/reference/packaged_handler/packaged_handler/
-/doc/asio/reference/packaged_handler/packaged_handler.html
-/doc/asio/reference/packaged_handler/packaged_handler/overload1.html
-/doc/asio/reference/packaged_handler/packaged_handler/overload2.html
-/doc/asio/reference/packaged_token/
-/doc/asio/reference/packaged_token/allocator_type.html
-/doc/asio/reference/packaged_token/get_allocator.html
-/doc/asio/reference/packaged_token.html
-/doc/asio/reference/packaged_token/packaged_token/
-/doc/asio/reference/packaged_token/packaged_token.html
-/doc/asio/reference/packaged_token/packaged_token/overload1.html
-/doc/asio/reference/packaged_token/packaged_token/overload2.html
-/doc/asio/reference/package.html
-/doc/asio/reference/package/overload1.html
-/doc/asio/reference/package/overload2.html
-/doc/asio/reference/placeholders__bytes_transferred.html
-/doc/asio/reference/placeholders__error.html
-/doc/asio/reference/placeholders__iterator.html
-/doc/asio/reference/placeholders__signal_number.html
-/doc/asio/reference/posix__basic_descriptor/
-/doc/asio/reference/posix__basic_descriptor/assign/
-/doc/asio/reference/posix__basic_descriptor/assign.html
-/doc/asio/reference/posix__basic_descriptor/assign/overload1.html
-/doc/asio/reference/posix__basic_descriptor/assign/overload2.html
-/doc/asio/reference/posix__basic_descriptor/async_wait.html
-/doc/asio/reference/posix__basic_descriptor/basic_descriptor/
-/doc/asio/reference/posix__basic_descriptor/_basic_descriptor.html
-/doc/asio/reference/posix__basic_descriptor/basic_descriptor.html
-/doc/asio/reference/posix__basic_descriptor/basic_descriptor/overload1.html
-/doc/asio/reference/posix__basic_descriptor/basic_descriptor/overload2.html
-/doc/asio/reference/posix__basic_descriptor/basic_descriptor/overload3.html
-/doc/asio/reference/posix__basic_descriptor/bytes_readable.html
-/doc/asio/reference/posix__basic_descriptor/cancel/
-/doc/asio/reference/posix__basic_descriptor/cancel.html
-/doc/asio/reference/posix__basic_descriptor/cancel/overload1.html
-/doc/asio/reference/posix__basic_descriptor/cancel/overload2.html
-/doc/asio/reference/posix__basic_descriptor/close/
-/doc/asio/reference/posix__basic_descriptor/close.html
-/doc/asio/reference/posix__basic_descriptor/close/overload1.html
-/doc/asio/reference/posix__basic_descriptor/close/overload2.html
-/doc/asio/reference/posix__basic_descriptor/executor_type.html
-/doc/asio/reference/posix__basic_descriptor/get_executor.html
-/doc/asio/reference/posix__basic_descriptor/get_implementation/
-/doc/asio/reference/posix__basic_descriptor/get_implementation.html
-/doc/asio/reference/posix__basic_descriptor/get_implementation/overload1.html
-/doc/asio/reference/posix__basic_descriptor/get_implementation/overload2.html
-/doc/asio/reference/posix__basic_descriptor/get_io_service.html
-/doc/asio/reference/posix__basic_descriptor/get_service/
-/doc/asio/reference/posix__basic_descriptor/get_service.html
-/doc/asio/reference/posix__basic_descriptor/get_service/overload1.html
-/doc/asio/reference/posix__basic_descriptor/get_service/overload2.html
-/doc/asio/reference/posix__basic_descriptor.html
-/doc/asio/reference/posix__basic_descriptor/implementation_type.html
-/doc/asio/reference/posix__basic_descriptor/io_control/
-/doc/asio/reference/posix__basic_descriptor/io_control.html
-/doc/asio/reference/posix__basic_descriptor/io_control/overload1.html
-/doc/asio/reference/posix__basic_descriptor/io_control/overload2.html
-/doc/asio/reference/posix__basic_descriptor/is_open.html
-/doc/asio/reference/posix__basic_descriptor/lowest_layer/
-/doc/asio/reference/posix__basic_descriptor/lowest_layer.html
-/doc/asio/reference/posix__basic_descriptor/lowest_layer/overload1.html
-/doc/asio/reference/posix__basic_descriptor/lowest_layer/overload2.html
-/doc/asio/reference/posix__basic_descriptor/lowest_layer_type.html
-/doc/asio/reference/posix__basic_descriptor/native_handle.html
-/doc/asio/reference/posix__basic_descriptor/native_handle_type.html
-/doc/asio/reference/posix__basic_descriptor/native_non_blocking/
-/doc/asio/reference/posix__basic_descriptor/native_non_blocking.html
-/doc/asio/reference/posix__basic_descriptor/native_non_blocking/overload1.html
-/doc/asio/reference/posix__basic_descriptor/native_non_blocking/overload2.html
-/doc/asio/reference/posix__basic_descriptor/native_non_blocking/overload3.html
-/doc/asio/reference/posix__basic_descriptor/non_blocking/
-/doc/asio/reference/posix__basic_descriptor/non_blocking.html
-/doc/asio/reference/posix__basic_descriptor/non_blocking/overload1.html
-/doc/asio/reference/posix__basic_descriptor/non_blocking/overload2.html
-/doc/asio/reference/posix__basic_descriptor/non_blocking/overload3.html
-/doc/asio/reference/posix__basic_descriptor/operator_eq_.html
-/doc/asio/reference/posix__basic_descriptor/release.html
-/doc/asio/reference/posix__basic_descriptor/service_type.html
-/doc/asio/reference/posix__basic_descriptor/wait/
-/doc/asio/reference/posix__basic_descriptor/wait.html
-/doc/asio/reference/posix__basic_descriptor/wait/overload1.html
-/doc/asio/reference/posix__basic_descriptor/wait/overload2.html
-/doc/asio/reference/posix__basic_descriptor/wait_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/
-/doc/asio/reference/posix__basic_stream_descriptor/assign/
-/doc/asio/reference/posix__basic_stream_descriptor/assign.html
-/doc/asio/reference/posix__basic_stream_descriptor/assign/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/assign/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/async_read_some.html
-/doc/asio/reference/posix__basic_stream_descriptor/async_wait.html
-/doc/asio/reference/posix__basic_stream_descriptor/async_write_some.html
-/doc/asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/
-/doc/asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor.html
-/doc/asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/overload3.html
-/doc/asio/reference/posix__basic_stream_descriptor/bytes_readable.html
-/doc/asio/reference/posix__basic_stream_descriptor/cancel/
-/doc/asio/reference/posix__basic_stream_descriptor/cancel.html
-/doc/asio/reference/posix__basic_stream_descriptor/cancel/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/cancel/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/close/
-/doc/asio/reference/posix__basic_stream_descriptor/close.html
-/doc/asio/reference/posix__basic_stream_descriptor/close/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/close/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/executor_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_executor.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_implementation/
-/doc/asio/reference/posix__basic_stream_descriptor/get_implementation.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_implementation/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_implementation/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_io_service.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_service/
-/doc/asio/reference/posix__basic_stream_descriptor/get_service.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_service/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/get_service/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor.html
-/doc/asio/reference/posix__basic_stream_descriptor/implementation_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/io_control/
-/doc/asio/reference/posix__basic_stream_descriptor/io_control.html
-/doc/asio/reference/posix__basic_stream_descriptor/io_control/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/io_control/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/is_open.html
-/doc/asio/reference/posix__basic_stream_descriptor/lowest_layer/
-/doc/asio/reference/posix__basic_stream_descriptor/lowest_layer.html
-/doc/asio/reference/posix__basic_stream_descriptor/lowest_layer/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/lowest_layer/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/lowest_layer_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/native_handle.html
-/doc/asio/reference/posix__basic_stream_descriptor/native_handle_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/native_non_blocking/
-/doc/asio/reference/posix__basic_stream_descriptor/native_non_blocking.html
-/doc/asio/reference/posix__basic_stream_descriptor/native_non_blocking/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/native_non_blocking/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/native_non_blocking/overload3.html
-/doc/asio/reference/posix__basic_stream_descriptor/non_blocking/
-/doc/asio/reference/posix__basic_stream_descriptor/non_blocking.html
-/doc/asio/reference/posix__basic_stream_descriptor/non_blocking/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/non_blocking/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/non_blocking/overload3.html
-/doc/asio/reference/posix__basic_stream_descriptor/operator_eq_.html
-/doc/asio/reference/posix__basic_stream_descriptor/read_some/
-/doc/asio/reference/posix__basic_stream_descriptor/read_some.html
-/doc/asio/reference/posix__basic_stream_descriptor/read_some/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/read_some/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/release.html
-/doc/asio/reference/posix__basic_stream_descriptor/service_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/wait/
-/doc/asio/reference/posix__basic_stream_descriptor/wait.html
-/doc/asio/reference/posix__basic_stream_descriptor/wait/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/wait/overload2.html
-/doc/asio/reference/posix__basic_stream_descriptor/wait_type.html
-/doc/asio/reference/posix__basic_stream_descriptor/write_some/
-/doc/asio/reference/posix__basic_stream_descriptor/write_some.html
-/doc/asio/reference/posix__basic_stream_descriptor/write_some/overload1.html
-/doc/asio/reference/posix__basic_stream_descriptor/write_some/overload2.html
-/doc/asio/reference/posix__descriptor_base/
-/doc/asio/reference/posix__descriptor_base/bytes_readable.html
-/doc/asio/reference/posix__descriptor_base/_descriptor_base.html
-/doc/asio/reference/posix__descriptor_base.html
-/doc/asio/reference/posix__descriptor_base/wait_type.html
-/doc/asio/reference/posix__stream_descriptor.html
-/doc/asio/reference/posix__stream_descriptor_service/
-/doc/asio/reference/posix__stream_descriptor_service/assign.html
-/doc/asio/reference/posix__stream_descriptor_service/async_read_some.html
-/doc/asio/reference/posix__stream_descriptor_service/async_wait.html
-/doc/asio/reference/posix__stream_descriptor_service/async_write_some.html
-/doc/asio/reference/posix__stream_descriptor_service/cancel.html
-/doc/asio/reference/posix__stream_descriptor_service/close.html
-/doc/asio/reference/posix__stream_descriptor_service/construct.html
-/doc/asio/reference/posix__stream_descriptor_service/destroy.html
-/doc/asio/reference/posix__stream_descriptor_service/get_io_service.html
-/doc/asio/reference/posix__stream_descriptor_service.html
-/doc/asio/reference/posix__stream_descriptor_service/id.html
-/doc/asio/reference/posix__stream_descriptor_service/implementation_type.html
-/doc/asio/reference/posix__stream_descriptor_service/io_control.html
-/doc/asio/reference/posix__stream_descriptor_service/is_open.html
-/doc/asio/reference/posix__stream_descriptor_service/move_assign.html
-/doc/asio/reference/posix__stream_descriptor_service/move_construct.html
-/doc/asio/reference/posix__stream_descriptor_service/native_handle.html
-/doc/asio/reference/posix__stream_descriptor_service/native_handle_type.html
-/doc/asio/reference/posix__stream_descriptor_service/native_non_blocking/
-/doc/asio/reference/posix__stream_descriptor_service/native_non_blocking.html
-/doc/asio/reference/posix__stream_descriptor_service/native_non_blocking/overload1.html
-/doc/asio/reference/posix__stream_descriptor_service/native_non_blocking/overload2.html
-/doc/asio/reference/posix__stream_descriptor_service/non_blocking/
-/doc/asio/reference/posix__stream_descriptor_service/non_blocking.html
-/doc/asio/reference/posix__stream_descriptor_service/non_blocking/overload1.html
-/doc/asio/reference/posix__stream_descriptor_service/non_blocking/overload2.html
-/doc/asio/reference/posix__stream_descriptor_service/read_some.html
-/doc/asio/reference/posix__stream_descriptor_service/release.html
-/doc/asio/reference/posix__stream_descriptor_service/stream_descriptor_service.html
-/doc/asio/reference/posix__stream_descriptor_service/wait.html
-/doc/asio/reference/posix__stream_descriptor_service/write_some.html
-/doc/asio/reference/post/
-/doc/asio/reference/post.html
-/doc/asio/reference/post/overload1.html
-/doc/asio/reference/post/overload2.html
-/doc/asio/reference/post/overload3.html
-/doc/asio/reference/Protocol.html
-/doc/asio/reference/RandomAccessHandleService.html
-/doc/asio/reference/raw_socket_service/
-/doc/asio/reference/raw_socket_service/assign.html
-/doc/asio/reference/raw_socket_service/async_connect.html
-/doc/asio/reference/raw_socket_service/async_receive_from.html
-/doc/asio/reference/raw_socket_service/async_receive.html
-/doc/asio/reference/raw_socket_service/async_send.html
-/doc/asio/reference/raw_socket_service/async_send_to.html
-/doc/asio/reference/raw_socket_service/async_wait.html
-/doc/asio/reference/raw_socket_service/at_mark.html
-/doc/asio/reference/raw_socket_service/available.html
-/doc/asio/reference/raw_socket_service/bind.html
-/doc/asio/reference/raw_socket_service/cancel.html
-/doc/asio/reference/raw_socket_service/close.html
-/doc/asio/reference/raw_socket_service/connect.html
-/doc/asio/reference/raw_socket_service/construct.html
-/doc/asio/reference/raw_socket_service/converting_move_construct.html
-/doc/asio/reference/raw_socket_service/destroy.html
-/doc/asio/reference/raw_socket_service/endpoint_type.html
-/doc/asio/reference/raw_socket_service/get_io_service.html
-/doc/asio/reference/raw_socket_service/get_option.html
-/doc/asio/reference/raw_socket_service.html
-/doc/asio/reference/RawSocketService.html
-/doc/asio/reference/raw_socket_service/id.html
-/doc/asio/reference/raw_socket_service/implementation_type.html
-/doc/asio/reference/raw_socket_service/io_control.html
-/doc/asio/reference/raw_socket_service/is_open.html
-/doc/asio/reference/raw_socket_service/local_endpoint.html
-/doc/asio/reference/raw_socket_service/move_assign.html
-/doc/asio/reference/raw_socket_service/move_construct.html
-/doc/asio/reference/raw_socket_service/native_handle.html
-/doc/asio/reference/raw_socket_service/native_handle_type.html
-/doc/asio/reference/raw_socket_service/native_non_blocking/
-/doc/asio/reference/raw_socket_service/native_non_blocking.html
-/doc/asio/reference/raw_socket_service/native_non_blocking/overload1.html
-/doc/asio/reference/raw_socket_service/native_non_blocking/overload2.html
-/doc/asio/reference/raw_socket_service/non_blocking/
-/doc/asio/reference/raw_socket_service/non_blocking.html
-/doc/asio/reference/raw_socket_service/non_blocking/overload1.html
-/doc/asio/reference/raw_socket_service/non_blocking/overload2.html
-/doc/asio/reference/raw_socket_service/open.html
-/doc/asio/reference/raw_socket_service/protocol_type.html
-/doc/asio/reference/raw_socket_service/raw_socket_service.html
-/doc/asio/reference/raw_socket_service/receive_from.html
-/doc/asio/reference/raw_socket_service/receive.html
-/doc/asio/reference/raw_socket_service/remote_endpoint.html
-/doc/asio/reference/raw_socket_service/send.html
-/doc/asio/reference/raw_socket_service/send_to.html
-/doc/asio/reference/raw_socket_service/set_option.html
-/doc/asio/reference/raw_socket_service/shutdown.html
-/doc/asio/reference/raw_socket_service/wait.html
-/doc/asio/reference/read/
-/doc/asio/reference/read_at/
-/doc/asio/reference/read_at.html
-/doc/asio/reference/read_at/overload1.html
-/doc/asio/reference/read_at/overload2.html
-/doc/asio/reference/read_at/overload3.html
-/doc/asio/reference/read_at/overload4.html
-/doc/asio/reference/read_at/overload5.html
-/doc/asio/reference/read_at/overload6.html
-/doc/asio/reference/read_at/overload7.html
-/doc/asio/reference/read_at/overload8.html
-/doc/asio/reference/ReadHandler.html
-/doc/asio/reference/read.html
-/doc/asio/reference/read/overload10.html
-/doc/asio/reference/read/overload11.html
-/doc/asio/reference/read/overload12.html
-/doc/asio/reference/read/overload1.html
-/doc/asio/reference/read/overload2.html
-/doc/asio/reference/read/overload3.html
-/doc/asio/reference/read/overload4.html
-/doc/asio/reference/read/overload5.html
-/doc/asio/reference/read/overload6.html
-/doc/asio/reference/read/overload7.html
-/doc/asio/reference/read/overload8.html
-/doc/asio/reference/read/overload9.html
-/doc/asio/reference/read_until/
-/doc/asio/reference/read_until.html
-/doc/asio/reference/read_until/overload10.html
-/doc/asio/reference/read_until/overload11.html
-/doc/asio/reference/read_until/overload12.html
-/doc/asio/reference/read_until/overload13.html
-/doc/asio/reference/read_until/overload14.html
-/doc/asio/reference/read_until/overload15.html
-/doc/asio/reference/read_until/overload16.html
-/doc/asio/reference/read_until/overload17.html
-/doc/asio/reference/read_until/overload18.html
-/doc/asio/reference/read_until/overload1.html
-/doc/asio/reference/read_until/overload2.html
-/doc/asio/reference/read_until/overload3.html
-/doc/asio/reference/read_until/overload4.html
-/doc/asio/reference/read_until/overload5.html
-/doc/asio/reference/read_until/overload6.html
-/doc/asio/reference/read_until/overload7.html
-/doc/asio/reference/read_until/overload8.html
-/doc/asio/reference/read_until/overload9.html
-/doc/asio/reference/ResolveHandler.html
-/doc/asio/reference/ResolverService.html
-/doc/asio/reference/seq_packet_socket_service/
-/doc/asio/reference/seq_packet_socket_service/assign.html
-/doc/asio/reference/seq_packet_socket_service/async_connect.html
-/doc/asio/reference/seq_packet_socket_service/async_receive.html
-/doc/asio/reference/seq_packet_socket_service/async_send.html
-/doc/asio/reference/seq_packet_socket_service/async_wait.html
-/doc/asio/reference/seq_packet_socket_service/at_mark.html
-/doc/asio/reference/seq_packet_socket_service/available.html
-/doc/asio/reference/seq_packet_socket_service/bind.html
-/doc/asio/reference/seq_packet_socket_service/cancel.html
-/doc/asio/reference/seq_packet_socket_service/close.html
-/doc/asio/reference/seq_packet_socket_service/connect.html
-/doc/asio/reference/seq_packet_socket_service/construct.html
-/doc/asio/reference/seq_packet_socket_service/converting_move_construct.html
-/doc/asio/reference/seq_packet_socket_service/destroy.html
-/doc/asio/reference/seq_packet_socket_service/endpoint_type.html
-/doc/asio/reference/seq_packet_socket_service/get_io_service.html
-/doc/asio/reference/seq_packet_socket_service/get_option.html
-/doc/asio/reference/seq_packet_socket_service.html
-/doc/asio/reference/SeqPacketSocketService.html
-/doc/asio/reference/seq_packet_socket_service/id.html
-/doc/asio/reference/seq_packet_socket_service/implementation_type.html
-/doc/asio/reference/seq_packet_socket_service/io_control.html
-/doc/asio/reference/seq_packet_socket_service/is_open.html
-/doc/asio/reference/seq_packet_socket_service/local_endpoint.html
-/doc/asio/reference/seq_packet_socket_service/move_assign.html
-/doc/asio/reference/seq_packet_socket_service/move_construct.html
-/doc/asio/reference/seq_packet_socket_service/native_handle.html
-/doc/asio/reference/seq_packet_socket_service/native_handle_type.html
-/doc/asio/reference/seq_packet_socket_service/native_non_blocking/
-/doc/asio/reference/seq_packet_socket_service/native_non_blocking.html
-/doc/asio/reference/seq_packet_socket_service/native_non_blocking/overload1.html
-/doc/asio/reference/seq_packet_socket_service/native_non_blocking/overload2.html
-/doc/asio/reference/seq_packet_socket_service/non_blocking/
-/doc/asio/reference/seq_packet_socket_service/non_blocking.html
-/doc/asio/reference/seq_packet_socket_service/non_blocking/overload1.html
-/doc/asio/reference/seq_packet_socket_service/non_blocking/overload2.html
-/doc/asio/reference/seq_packet_socket_service/open.html
-/doc/asio/reference/seq_packet_socket_service/protocol_type.html
-/doc/asio/reference/seq_packet_socket_service/receive.html
-/doc/asio/reference/seq_packet_socket_service/remote_endpoint.html
-/doc/asio/reference/seq_packet_socket_service/send.html
-/doc/asio/reference/seq_packet_socket_service/seq_packet_socket_service.html
-/doc/asio/reference/seq_packet_socket_service/set_option.html
-/doc/asio/reference/seq_packet_socket_service/shutdown.html
-/doc/asio/reference/seq_packet_socket_service/wait.html
-/doc/asio/reference/serial_port_base/
-/doc/asio/reference/serial_port_base__baud_rate/
-/doc/asio/reference/serial_port_base__baud_rate/baud_rate.html
-/doc/asio/reference/serial_port_base__baud_rate.html
-/doc/asio/reference/serial_port_base__baud_rate/load.html
-/doc/asio/reference/serial_port_base__baud_rate/store.html
-/doc/asio/reference/serial_port_base__baud_rate/value.html
-/doc/asio/reference/serial_port_base__character_size/
-/doc/asio/reference/serial_port_base__character_size/character_size.html
-/doc/asio/reference/serial_port_base__character_size.html
-/doc/asio/reference/serial_port_base__character_size/load.html
-/doc/asio/reference/serial_port_base__character_size/store.html
-/doc/asio/reference/serial_port_base__character_size/value.html
-/doc/asio/reference/serial_port_base__flow_control/
-/doc/asio/reference/serial_port_base__flow_control/flow_control.html
-/doc/asio/reference/serial_port_base__flow_control.html
-/doc/asio/reference/serial_port_base__flow_control/load.html
-/doc/asio/reference/serial_port_base__flow_control/store.html
-/doc/asio/reference/serial_port_base__flow_control/type.html
-/doc/asio/reference/serial_port_base__flow_control/value.html
-/doc/asio/reference/serial_port_base.html
-/doc/asio/reference/serial_port_base__parity/
-/doc/asio/reference/serial_port_base__parity.html
-/doc/asio/reference/serial_port_base__parity/load.html
-/doc/asio/reference/serial_port_base__parity/parity.html
-/doc/asio/reference/serial_port_base__parity/store.html
-/doc/asio/reference/serial_port_base__parity/type.html
-/doc/asio/reference/serial_port_base__parity/value.html
-/doc/asio/reference/serial_port_base/_serial_port_base.html
-/doc/asio/reference/serial_port_base__stop_bits/
-/doc/asio/reference/serial_port_base__stop_bits.html
-/doc/asio/reference/serial_port_base__stop_bits/load.html
-/doc/asio/reference/serial_port_base__stop_bits/stop_bits.html
-/doc/asio/reference/serial_port_base__stop_bits/store.html
-/doc/asio/reference/serial_port_base__stop_bits/type.html
-/doc/asio/reference/serial_port_base__stop_bits/value.html
-/doc/asio/reference/serial_port.html
-/doc/asio/reference/serial_port_service/
-/doc/asio/reference/serial_port_service/assign.html
-/doc/asio/reference/serial_port_service/async_read_some.html
-/doc/asio/reference/serial_port_service/async_write_some.html
-/doc/asio/reference/serial_port_service/cancel.html
-/doc/asio/reference/serial_port_service/close.html
-/doc/asio/reference/serial_port_service/construct.html
-/doc/asio/reference/serial_port_service/destroy.html
-/doc/asio/reference/serial_port_service/get_io_service.html
-/doc/asio/reference/serial_port_service/get_option.html
-/doc/asio/reference/serial_port_service.html
-/doc/asio/reference/SerialPortService.html
-/doc/asio/reference/serial_port_service/id.html
-/doc/asio/reference/serial_port_service/implementation_type.html
-/doc/asio/reference/serial_port_service/is_open.html
-/doc/asio/reference/serial_port_service/move_assign.html
-/doc/asio/reference/serial_port_service/move_construct.html
-/doc/asio/reference/serial_port_service/native_handle.html
-/doc/asio/reference/serial_port_service/native_handle_type.html
-/doc/asio/reference/serial_port_service/open.html
-/doc/asio/reference/serial_port_service/read_some.html
-/doc/asio/reference/serial_port_service/send_break.html
-/doc/asio/reference/serial_port_service/serial_port_service.html
-/doc/asio/reference/serial_port_service/set_option.html
-/doc/asio/reference/serial_port_service/write_some.html
-/doc/asio/reference/service_already_exists/
-/doc/asio/reference/service_already_exists.html
-/doc/asio/reference/service_already_exists/service_already_exists.html
-/doc/asio/reference/Service.html
-/doc/asio/reference/SettableSerialPortOption.html
-/doc/asio/reference/SettableSocketOption.html
-/doc/asio/reference/ShutdownHandler.html
-/doc/asio/reference/SignalHandler.html
-/doc/asio/reference/signal_set.html
-/doc/asio/reference/signal_set_service/
-/doc/asio/reference/signal_set_service/add.html
-/doc/asio/reference/signal_set_service/async_wait.html
-/doc/asio/reference/signal_set_service/cancel.html
-/doc/asio/reference/signal_set_service/clear.html
-/doc/asio/reference/signal_set_service/construct.html
-/doc/asio/reference/signal_set_service/destroy.html
-/doc/asio/reference/signal_set_service/get_io_service.html
-/doc/asio/reference/signal_set_service.html
-/doc/asio/reference/SignalSetService.html
-/doc/asio/reference/signal_set_service/id.html
-/doc/asio/reference/signal_set_service/implementation_type.html
-/doc/asio/reference/signal_set_service/remove.html
-/doc/asio/reference/signal_set_service/signal_set_service.html
-/doc/asio/reference/socket_acceptor_service/
-/doc/asio/reference/socket_acceptor_service/accept.html
-/doc/asio/reference/socket_acceptor_service/assign.html
-/doc/asio/reference/socket_acceptor_service/async_accept.html
-/doc/asio/reference/socket_acceptor_service/async_wait.html
-/doc/asio/reference/socket_acceptor_service/bind.html
-/doc/asio/reference/socket_acceptor_service/cancel.html
-/doc/asio/reference/socket_acceptor_service/close.html
-/doc/asio/reference/socket_acceptor_service/construct.html
-/doc/asio/reference/socket_acceptor_service/converting_move_construct.html
-/doc/asio/reference/socket_acceptor_service/destroy.html
-/doc/asio/reference/socket_acceptor_service/endpoint_type.html
-/doc/asio/reference/socket_acceptor_service/get_io_service.html
-/doc/asio/reference/socket_acceptor_service/get_option.html
-/doc/asio/reference/socket_acceptor_service.html
-/doc/asio/reference/SocketAcceptorService.html
-/doc/asio/reference/socket_acceptor_service/id.html
-/doc/asio/reference/socket_acceptor_service/implementation_type.html
-/doc/asio/reference/socket_acceptor_service/io_control.html
-/doc/asio/reference/socket_acceptor_service/is_open.html
-/doc/asio/reference/socket_acceptor_service/listen.html
-/doc/asio/reference/socket_acceptor_service/local_endpoint.html
-/doc/asio/reference/socket_acceptor_service/move_assign.html
-/doc/asio/reference/socket_acceptor_service/move_construct.html
-/doc/asio/reference/socket_acceptor_service/native_handle.html
-/doc/asio/reference/socket_acceptor_service/native_handle_type.html
-/doc/asio/reference/socket_acceptor_service/native_non_blocking/
-/doc/asio/reference/socket_acceptor_service/native_non_blocking.html
-/doc/asio/reference/socket_acceptor_service/native_non_blocking/overload1.html
-/doc/asio/reference/socket_acceptor_service/native_non_blocking/overload2.html
-/doc/asio/reference/socket_acceptor_service/non_blocking/
-/doc/asio/reference/socket_acceptor_service/non_blocking.html
-/doc/asio/reference/socket_acceptor_service/non_blocking/overload1.html
-/doc/asio/reference/socket_acceptor_service/non_blocking/overload2.html
-/doc/asio/reference/socket_acceptor_service/open.html
-/doc/asio/reference/socket_acceptor_service/protocol_type.html
-/doc/asio/reference/socket_acceptor_service/set_option.html
-/doc/asio/reference/socket_acceptor_service/socket_acceptor_service.html
-/doc/asio/reference/socket_acceptor_service/wait.html
-/doc/asio/reference/socket_base/
-/doc/asio/reference/socket_base/broadcast.html
-/doc/asio/reference/socket_base/bytes_readable.html
-/doc/asio/reference/socket_base/debug.html
-/doc/asio/reference/socket_base/do_not_route.html
-/doc/asio/reference/socket_base/enable_connection_aborted.html
-/doc/asio/reference/socket_base.html
-/doc/asio/reference/socket_base/keep_alive.html
-/doc/asio/reference/socket_base/linger.html
-/doc/asio/reference/socket_base/max_connections.html
-/doc/asio/reference/socket_base/message_do_not_route.html
-/doc/asio/reference/socket_base/message_end_of_record.html
-/doc/asio/reference/socket_base/message_flags.html
-/doc/asio/reference/socket_base/message_out_of_band.html
-/doc/asio/reference/socket_base/message_peek.html
-/doc/asio/reference/socket_base/receive_buffer_size.html
-/doc/asio/reference/socket_base/receive_low_watermark.html
-/doc/asio/reference/socket_base/reuse_address.html
-/doc/asio/reference/socket_base/send_buffer_size.html
-/doc/asio/reference/socket_base/send_low_watermark.html
-/doc/asio/reference/socket_base/shutdown_type.html
-/doc/asio/reference/socket_base/_socket_base.html
-/doc/asio/reference/socket_base/wait_type.html
-/doc/asio/reference/SocketService.html
-/doc/asio/reference/spawn/
-/doc/asio/reference/spawn.html
-/doc/asio/reference/spawn/overload1.html
-/doc/asio/reference/spawn/overload2.html
-/doc/asio/reference/spawn/overload3.html
-/doc/asio/reference/spawn/overload4.html
-/doc/asio/reference/spawn/overload5.html
-/doc/asio/reference/spawn/overload6.html
-/doc/asio/reference/spawn/overload7.html
-/doc/asio/reference/ssl__context/
-/doc/asio/reference/ssl__context/add_certificate_authority/
-/doc/asio/reference/ssl__context/add_certificate_authority.html
-/doc/asio/reference/ssl__context/add_certificate_authority/overload1.html
-/doc/asio/reference/ssl__context/add_certificate_authority/overload2.html
-/doc/asio/reference/ssl__context/add_verify_path/
-/doc/asio/reference/ssl__context/add_verify_path.html
-/doc/asio/reference/ssl__context/add_verify_path/overload1.html
-/doc/asio/reference/ssl__context/add_verify_path/overload2.html
-/doc/asio/reference/ssl__context_base/
-/doc/asio/reference/ssl__context_base/_context_base.html
-/doc/asio/reference/ssl__context_base/default_workarounds.html
-/doc/asio/reference/ssl__context_base/file_format.html
-/doc/asio/reference/ssl__context_base.html
-/doc/asio/reference/ssl__context_base/method.html
-/doc/asio/reference/ssl__context_base/no_compression.html
-/doc/asio/reference/ssl__context_base/no_sslv2.html
-/doc/asio/reference/ssl__context_base/no_sslv3.html
-/doc/asio/reference/ssl__context_base/no_tlsv1_1.html
-/doc/asio/reference/ssl__context_base/no_tlsv1_2.html
-/doc/asio/reference/ssl__context_base/no_tlsv1.html
-/doc/asio/reference/ssl__context_base/options.html
-/doc/asio/reference/ssl__context_base/password_purpose.html
-/doc/asio/reference/ssl__context_base/single_dh_use.html
-/doc/asio/reference/ssl__context/clear_options/
-/doc/asio/reference/ssl__context/clear_options.html
-/doc/asio/reference/ssl__context/clear_options/overload1.html
-/doc/asio/reference/ssl__context/clear_options/overload2.html
-/doc/asio/reference/ssl__context/context/
-/doc/asio/reference/ssl__context/_context.html
-/doc/asio/reference/ssl__context/context.html
-/doc/asio/reference/ssl__context/context/overload1.html
-/doc/asio/reference/ssl__context/context/overload2.html
-/doc/asio/reference/ssl__context/default_workarounds.html
-/doc/asio/reference/ssl__context/file_format.html
-/doc/asio/reference/ssl__context.html
-/doc/asio/reference/ssl__context/load_verify_file/
-/doc/asio/reference/ssl__context/load_verify_file.html
-/doc/asio/reference/ssl__context/load_verify_file/overload1.html
-/doc/asio/reference/ssl__context/load_verify_file/overload2.html
-/doc/asio/reference/ssl__context/method.html
-/doc/asio/reference/ssl__context/native_handle.html
-/doc/asio/reference/ssl__context/native_handle_type.html
-/doc/asio/reference/ssl__context/no_compression.html
-/doc/asio/reference/ssl__context/no_sslv2.html
-/doc/asio/reference/ssl__context/no_sslv3.html
-/doc/asio/reference/ssl__context/no_tlsv1_1.html
-/doc/asio/reference/ssl__context/no_tlsv1_2.html
-/doc/asio/reference/ssl__context/no_tlsv1.html
-/doc/asio/reference/ssl__context/operator_eq_.html
-/doc/asio/reference/ssl__context/options.html
-/doc/asio/reference/ssl__context/password_purpose.html
-/doc/asio/reference/ssl__context/set_default_verify_paths/
-/doc/asio/reference/ssl__context/set_default_verify_paths.html
-/doc/asio/reference/ssl__context/set_default_verify_paths/overload1.html
-/doc/asio/reference/ssl__context/set_default_verify_paths/overload2.html
-/doc/asio/reference/ssl__context/set_options/
-/doc/asio/reference/ssl__context/set_options.html
-/doc/asio/reference/ssl__context/set_options/overload1.html
-/doc/asio/reference/ssl__context/set_options/overload2.html
-/doc/asio/reference/ssl__context/set_password_callback/
-/doc/asio/reference/ssl__context/set_password_callback.html
-/doc/asio/reference/ssl__context/set_password_callback/overload1.html
-/doc/asio/reference/ssl__context/set_password_callback/overload2.html
-/doc/asio/reference/ssl__context/set_verify_callback/
-/doc/asio/reference/ssl__context/set_verify_callback.html
-/doc/asio/reference/ssl__context/set_verify_callback/overload1.html
-/doc/asio/reference/ssl__context/set_verify_callback/overload2.html
-/doc/asio/reference/ssl__context/set_verify_depth/
-/doc/asio/reference/ssl__context/set_verify_depth.html
-/doc/asio/reference/ssl__context/set_verify_depth/overload1.html
-/doc/asio/reference/ssl__context/set_verify_depth/overload2.html
-/doc/asio/reference/ssl__context/set_verify_mode/
-/doc/asio/reference/ssl__context/set_verify_mode.html
-/doc/asio/reference/ssl__context/set_verify_mode/overload1.html
-/doc/asio/reference/ssl__context/set_verify_mode/overload2.html
-/doc/asio/reference/ssl__context/single_dh_use.html
-/doc/asio/reference/ssl__context/use_certificate/
-/doc/asio/reference/ssl__context/use_certificate_chain/
-/doc/asio/reference/ssl__context/use_certificate_chain_file/
-/doc/asio/reference/ssl__context/use_certificate_chain_file.html
-/doc/asio/reference/ssl__context/use_certificate_chain_file/overload1.html
-/doc/asio/reference/ssl__context/use_certificate_chain_file/overload2.html
-/doc/asio/reference/ssl__context/use_certificate_chain.html
-/doc/asio/reference/ssl__context/use_certificate_chain/overload1.html
-/doc/asio/reference/ssl__context/use_certificate_chain/overload2.html
-/doc/asio/reference/ssl__context/use_certificate_file/
-/doc/asio/reference/ssl__context/use_certificate_file.html
-/doc/asio/reference/ssl__context/use_certificate_file/overload1.html
-/doc/asio/reference/ssl__context/use_certificate_file/overload2.html
-/doc/asio/reference/ssl__context/use_certificate.html
-/doc/asio/reference/ssl__context/use_certificate/overload1.html
-/doc/asio/reference/ssl__context/use_certificate/overload2.html
-/doc/asio/reference/ssl__context/use_private_key/
-/doc/asio/reference/ssl__context/use_private_key_file/
-/doc/asio/reference/ssl__context/use_private_key_file.html
-/doc/asio/reference/ssl__context/use_private_key_file/overload1.html
-/doc/asio/reference/ssl__context/use_private_key_file/overload2.html
-/doc/asio/reference/ssl__context/use_private_key.html
-/doc/asio/reference/ssl__context/use_private_key/overload1.html
-/doc/asio/reference/ssl__context/use_private_key/overload2.html
-/doc/asio/reference/ssl__context/use_rsa_private_key/
-/doc/asio/reference/ssl__context/use_rsa_private_key_file/
-/doc/asio/reference/ssl__context/use_rsa_private_key_file.html
-/doc/asio/reference/ssl__context/use_rsa_private_key_file/overload1.html
-/doc/asio/reference/ssl__context/use_rsa_private_key_file/overload2.html
-/doc/asio/reference/ssl__context/use_rsa_private_key.html
-/doc/asio/reference/ssl__context/use_rsa_private_key/overload1.html
-/doc/asio/reference/ssl__context/use_rsa_private_key/overload2.html
-/doc/asio/reference/ssl__context/use_tmp_dh/
-/doc/asio/reference/ssl__context/use_tmp_dh_file/
-/doc/asio/reference/ssl__context/use_tmp_dh_file.html
-/doc/asio/reference/ssl__context/use_tmp_dh_file/overload1.html
-/doc/asio/reference/ssl__context/use_tmp_dh_file/overload2.html
-/doc/asio/reference/ssl__context/use_tmp_dh.html
-/doc/asio/reference/ssl__context/use_tmp_dh/overload1.html
-/doc/asio/reference/ssl__context/use_tmp_dh/overload2.html
-/doc/asio/reference/ssl__rfc2818_verification/
-/doc/asio/reference/ssl__rfc2818_verification.html
-/doc/asio/reference/ssl__rfc2818_verification/operator_lp__rp_.html
-/doc/asio/reference/ssl__rfc2818_verification/result_type.html
-/doc/asio/reference/ssl__rfc2818_verification/rfc2818_verification.html
-/doc/asio/reference/ssl__stream/
-/doc/asio/reference/ssl__stream/async_handshake/
-/doc/asio/reference/ssl__stream/async_handshake.html
-/doc/asio/reference/ssl__stream/async_handshake/overload1.html
-/doc/asio/reference/ssl__stream/async_handshake/overload2.html
-/doc/asio/reference/ssl__stream/async_read_some.html
-/doc/asio/reference/ssl__stream/async_shutdown.html
-/doc/asio/reference/ssl__stream/async_write_some.html
-/doc/asio/reference/ssl__stream_base/
-/doc/asio/reference/ssl__stream_base/handshake_type.html
-/doc/asio/reference/ssl__stream_base.html
-/doc/asio/reference/ssl__stream_base/_stream_base.html
-/doc/asio/reference/ssl__stream/get_io_service.html
-/doc/asio/reference/ssl__stream/handshake/
-/doc/asio/reference/ssl__stream/handshake.html
-/doc/asio/reference/ssl__stream/handshake/overload1.html
-/doc/asio/reference/ssl__stream/handshake/overload2.html
-/doc/asio/reference/ssl__stream/handshake/overload3.html
-/doc/asio/reference/ssl__stream/handshake/overload4.html
-/doc/asio/reference/ssl__stream/handshake_type.html
-/doc/asio/reference/ssl__stream.html
-/doc/asio/reference/ssl__stream__impl_struct/
-/doc/asio/reference/ssl__stream__impl_struct.html
-/doc/asio/reference/ssl__stream__impl_struct/ssl.html
-/doc/asio/reference/ssl__stream/lowest_layer/
-/doc/asio/reference/ssl__stream/lowest_layer.html
-/doc/asio/reference/ssl__stream/lowest_layer/overload1.html
-/doc/asio/reference/ssl__stream/lowest_layer/overload2.html
-/doc/asio/reference/ssl__stream/lowest_layer_type.html
-/doc/asio/reference/ssl__stream/native_handle.html
-/doc/asio/reference/ssl__stream/native_handle_type.html
-/doc/asio/reference/ssl__stream/next_layer/
-/doc/asio/reference/ssl__stream/next_layer.html
-/doc/asio/reference/ssl__stream/next_layer/overload1.html
-/doc/asio/reference/ssl__stream/next_layer/overload2.html
-/doc/asio/reference/ssl__stream/next_layer_type.html
-/doc/asio/reference/ssl__stream/read_some/
-/doc/asio/reference/ssl__stream/read_some.html
-/doc/asio/reference/ssl__stream/read_some/overload1.html
-/doc/asio/reference/ssl__stream/read_some/overload2.html
-/doc/asio/reference/ssl__stream/set_verify_callback/
-/doc/asio/reference/ssl__stream/set_verify_callback.html
-/doc/asio/reference/ssl__stream/set_verify_callback/overload1.html
-/doc/asio/reference/ssl__stream/set_verify_callback/overload2.html
-/doc/asio/reference/ssl__stream/set_verify_depth/
-/doc/asio/reference/ssl__stream/set_verify_depth.html
-/doc/asio/reference/ssl__stream/set_verify_depth/overload1.html
-/doc/asio/reference/ssl__stream/set_verify_depth/overload2.html
-/doc/asio/reference/ssl__stream/set_verify_mode/
-/doc/asio/reference/ssl__stream/set_verify_mode.html
-/doc/asio/reference/ssl__stream/set_verify_mode/overload1.html
-/doc/asio/reference/ssl__stream/set_verify_mode/overload2.html
-/doc/asio/reference/ssl__stream/shutdown/
-/doc/asio/reference/ssl__stream/shutdown.html
-/doc/asio/reference/ssl__stream/shutdown/overload1.html
-/doc/asio/reference/ssl__stream/shutdown/overload2.html
-/doc/asio/reference/ssl__stream/_stream.html
-/doc/asio/reference/ssl__stream/stream.html
-/doc/asio/reference/ssl__stream/write_some/
-/doc/asio/reference/ssl__stream/write_some.html
-/doc/asio/reference/ssl__stream/write_some/overload1.html
-/doc/asio/reference/ssl__stream/write_some/overload2.html
-/doc/asio/reference/ssl__verify_client_once.html
-/doc/asio/reference/ssl__verify_context/
-/doc/asio/reference/ssl__verify_context.html
-/doc/asio/reference/ssl__verify_context/native_handle.html
-/doc/asio/reference/ssl__verify_context/native_handle_type.html
-/doc/asio/reference/ssl__verify_context/verify_context.html
-/doc/asio/reference/ssl__verify_fail_if_no_peer_cert.html
-/doc/asio/reference/ssl__verify_mode.html
-/doc/asio/reference/ssl__verify_none.html
-/doc/asio/reference/ssl__verify_peer.html
-/doc/asio/reference/steady_timer.html
-/doc/asio/reference/strand/
-/doc/asio/reference/strand/context.html
-/doc/asio/reference/strand/defer.html
-/doc/asio/reference/strand/dispatch.html
-/doc/asio/reference/strand/get_inner_executor.html
-/doc/asio/reference/strand.html
-/doc/asio/reference/strand/inner_executor_type.html
-/doc/asio/reference/strand/on_work_finished.html
-/doc/asio/reference/strand/on_work_started.html
-/doc/asio/reference/strand/operator_eq_/
-/doc/asio/reference/strand/operator_eq__eq_.html
-/doc/asio/reference/strand/operator_eq_.html
-/doc/asio/reference/strand/operator_eq_/overload1.html
-/doc/asio/reference/strand/operator_eq_/overload2.html
-/doc/asio/reference/strand/operator_eq_/overload3.html
-/doc/asio/reference/strand/operator_eq_/overload4.html
-/doc/asio/reference/strand/operator_not__eq_.html
-/doc/asio/reference/strand/post.html
-/doc/asio/reference/strand/running_in_this_thread.html
-/doc/asio/reference/strand/strand/
-/doc/asio/reference/strand/_strand.html
-/doc/asio/reference/strand/strand.html
-/doc/asio/reference/strand/strand/overload1.html
-/doc/asio/reference/strand/strand/overload2.html
-/doc/asio/reference/strand/strand/overload3.html
-/doc/asio/reference/strand/strand/overload4.html
-/doc/asio/reference/strand/strand/overload5.html
-/doc/asio/reference/strand/strand/overload6.html
-/doc/asio/reference/streambuf.html
-/doc/asio/reference/StreamDescriptorService.html
-/doc/asio/reference/StreamHandleService.html
-/doc/asio/reference/stream_socket_service/
-/doc/asio/reference/stream_socket_service/assign.html
-/doc/asio/reference/stream_socket_service/async_connect.html
-/doc/asio/reference/stream_socket_service/async_receive.html
-/doc/asio/reference/stream_socket_service/async_send.html
-/doc/asio/reference/stream_socket_service/async_wait.html
-/doc/asio/reference/stream_socket_service/at_mark.html
-/doc/asio/reference/stream_socket_service/available.html
-/doc/asio/reference/stream_socket_service/bind.html
-/doc/asio/reference/stream_socket_service/cancel.html
-/doc/asio/reference/stream_socket_service/close.html
-/doc/asio/reference/stream_socket_service/connect.html
-/doc/asio/reference/stream_socket_service/construct.html
-/doc/asio/reference/stream_socket_service/converting_move_construct.html
-/doc/asio/reference/stream_socket_service/destroy.html
-/doc/asio/reference/stream_socket_service/endpoint_type.html
-/doc/asio/reference/stream_socket_service/get_io_service.html
-/doc/asio/reference/stream_socket_service/get_option.html
-/doc/asio/reference/stream_socket_service.html
-/doc/asio/reference/StreamSocketService.html
-/doc/asio/reference/stream_socket_service/id.html
-/doc/asio/reference/stream_socket_service/implementation_type.html
-/doc/asio/reference/stream_socket_service/io_control.html
-/doc/asio/reference/stream_socket_service/is_open.html
-/doc/asio/reference/stream_socket_service/local_endpoint.html
-/doc/asio/reference/stream_socket_service/move_assign.html
-/doc/asio/reference/stream_socket_service/move_construct.html
-/doc/asio/reference/stream_socket_service/native_handle.html
-/doc/asio/reference/stream_socket_service/native_handle_type.html
-/doc/asio/reference/stream_socket_service/native_non_blocking/
-/doc/asio/reference/stream_socket_service/native_non_blocking.html
-/doc/asio/reference/stream_socket_service/native_non_blocking/overload1.html
-/doc/asio/reference/stream_socket_service/native_non_blocking/overload2.html
-/doc/asio/reference/stream_socket_service/non_blocking/
-/doc/asio/reference/stream_socket_service/non_blocking.html
-/doc/asio/reference/stream_socket_service/non_blocking/overload1.html
-/doc/asio/reference/stream_socket_service/non_blocking/overload2.html
-/doc/asio/reference/stream_socket_service/open.html
-/doc/asio/reference/stream_socket_service/protocol_type.html
-/doc/asio/reference/stream_socket_service/receive.html
-/doc/asio/reference/stream_socket_service/remote_endpoint.html
-/doc/asio/reference/stream_socket_service/send.html
-/doc/asio/reference/stream_socket_service/set_option.html
-/doc/asio/reference/stream_socket_service/shutdown.html
-/doc/asio/reference/stream_socket_service/stream_socket_service.html
-/doc/asio/reference/stream_socket_service/wait.html
-/doc/asio/reference/SyncRandomAccessReadDevice.html
-/doc/asio/reference/SyncRandomAccessWriteDevice.html
-/doc/asio/reference/SyncReadStream.html
-/doc/asio/reference/SyncWriteStream.html
-/doc/asio/reference/system_category.html
-/doc/asio/reference/system_error/
-/doc/asio/reference/system_error/code.html
-/doc/asio/reference/system_error.html
-/doc/asio/reference/system_error/operator_eq_.html
-/doc/asio/reference/system_error/system_error/
-/doc/asio/reference/system_error/_system_error.html
-/doc/asio/reference/system_error/system_error.html
-/doc/asio/reference/system_error/system_error/overload1.html
-/doc/asio/reference/system_error/system_error/overload2.html
-/doc/asio/reference/system_error/system_error/overload3.html
-/doc/asio/reference/system_error/what.html
-/doc/asio/reference/system_executor/
-/doc/asio/reference/system_executor/context.html
-/doc/asio/reference/system_executor__context_impl/
-/doc/asio/reference/system_executor__context_impl/add_service.html
-/doc/asio/reference/system_executor__context_impl/_context_impl.html
-/doc/asio/reference/system_executor__context_impl/context_impl.html
-/doc/asio/reference/system_executor__context_impl/destroy_context.html
-/doc/asio/reference/system_executor__context_impl/fork_event.html
-/doc/asio/reference/system_executor__context_impl/has_service.html
-/doc/asio/reference/system_executor__context_impl.html
-/doc/asio/reference/system_executor__context_impl/make_service.html
-/doc/asio/reference/system_executor__context_impl/notify_fork.html
-/doc/asio/reference/system_executor__context_impl/scheduler_.html
-/doc/asio/reference/system_executor__context_impl/shutdown_context.html
-/doc/asio/reference/system_executor__context_impl/threads_.html
-/doc/asio/reference/system_executor__context_impl/use_service/
-/doc/asio/reference/system_executor__context_impl/use_service.html
-/doc/asio/reference/system_executor__context_impl/use_service/overload1.html
-/doc/asio/reference/system_executor__context_impl/use_service/overload2.html
-/doc/asio/reference/system_executor/defer.html
-/doc/asio/reference/system_executor/dispatch.html
-/doc/asio/reference/system_executor.html
-/doc/asio/reference/system_executor/on_work_finished.html
-/doc/asio/reference/system_executor/on_work_started.html
-/doc/asio/reference/system_executor/operator_eq__eq_.html
-/doc/asio/reference/system_executor/operator_not__eq_.html
-/doc/asio/reference/system_executor/post.html
-/doc/asio/reference/system_executor__thread_function/
-/doc/asio/reference/system_executor__thread_function.html
-/doc/asio/reference/system_executor__thread_function/operator_lp__rp_.html
-/doc/asio/reference/system_executor__thread_function/scheduler_.html
-/doc/asio/reference/system_timer.html
-/doc/asio/reference/thread/
-/doc/asio/reference/thread.html
-/doc/asio/reference/thread/join.html
-/doc/asio/reference/thread_pool/
-/doc/asio/reference/thread_pool/add_service.html
-/doc/asio/reference/thread_pool/destroy_context.html
-/doc/asio/reference/thread_pool__executor_type/
-/doc/asio/reference/thread_pool__executor_type/context.html
-/doc/asio/reference/thread_pool__executor_type/defer.html
-/doc/asio/reference/thread_pool__executor_type/dispatch.html
-/doc/asio/reference/thread_pool__executor_type.html
-/doc/asio/reference/thread_pool__executor_type/on_work_finished.html
-/doc/asio/reference/thread_pool__executor_type/on_work_started.html
-/doc/asio/reference/thread_pool__executor_type/operator_eq__eq_.html
-/doc/asio/reference/thread_pool__executor_type/operator_not__eq_.html
-/doc/asio/reference/thread_pool__executor_type/post.html
-/doc/asio/reference/thread_pool__executor_type/running_in_this_thread.html
-/doc/asio/reference/thread_pool/fork_event.html
-/doc/asio/reference/thread_pool/get_executor.html
-/doc/asio/reference/thread_pool/has_service.html
-/doc/asio/reference/thread_pool.html
-/doc/asio/reference/thread_pool/join.html
-/doc/asio/reference/thread_pool/make_service.html
-/doc/asio/reference/thread_pool/notify_fork.html
-/doc/asio/reference/thread_pool/shutdown_context.html
-/doc/asio/reference/thread_pool/stop.html
-/doc/asio/reference/thread_pool__thread_function/
-/doc/asio/reference/thread_pool__thread_function.html
-/doc/asio/reference/thread_pool__thread_function/operator_lp__rp_.html
-/doc/asio/reference/thread_pool__thread_function/scheduler_.html
-/doc/asio/reference/thread_pool/thread_pool/
-/doc/asio/reference/thread_pool/_thread_pool.html
-/doc/asio/reference/thread_pool/thread_pool.html
-/doc/asio/reference/thread_pool/thread_pool/overload1.html
-/doc/asio/reference/thread_pool/thread_pool/overload2.html
-/doc/asio/reference/thread_pool/use_service/
-/doc/asio/reference/thread_pool/use_service.html
-/doc/asio/reference/thread_pool/use_service/overload1.html
-/doc/asio/reference/thread_pool/use_service/overload2.html
-/doc/asio/reference/thread/_thread.html
-/doc/asio/reference/thread/thread.html
-/doc/asio/reference/TimerService.html
-/doc/asio/reference/TimeTraits.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/
-/doc/asio/reference/time_traits_lt__ptime__gt_/add.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/duration_type.html
-/doc/asio/reference/time_traits_lt__ptime__gt_.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/less_than.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/now.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/subtract.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/time_type.html
-/doc/asio/reference/time_traits_lt__ptime__gt_/to_posix_duration.html
-/doc/asio/reference/transfer_all.html
-/doc/asio/reference/transfer_at_least.html
-/doc/asio/reference/transfer_exactly.html
-/doc/asio/reference/use_future.html
-/doc/asio/reference/use_future_t/
-/doc/asio/reference/use_future_t/allocator_type.html
-/doc/asio/reference/use_future_t/get_allocator.html
-/doc/asio/reference/use_future_t.html
-/doc/asio/reference/use_future_t/operator_lb__rb_.html
-/doc/asio/reference/use_future_t/use_future_t/
-/doc/asio/reference/use_future_t/use_future_t.html
-/doc/asio/reference/use_future_t/use_future_t/overload1.html
-/doc/asio/reference/use_future_t/use_future_t/overload2.html
-/doc/asio/reference/use_service/
-/doc/asio/reference/use_service.html
-/doc/asio/reference/use_service/overload1.html
-/doc/asio/reference/use_service/overload2.html
-/doc/asio/reference/uses_executor.html
-/doc/asio/reference/waitable_timer_service/
-/doc/asio/reference/waitable_timer_service/async_wait.html
-/doc/asio/reference/waitable_timer_service/cancel.html
-/doc/asio/reference/waitable_timer_service/cancel_one.html
-/doc/asio/reference/waitable_timer_service/clock_type.html
-/doc/asio/reference/waitable_timer_service/construct.html
-/doc/asio/reference/waitable_timer_service/destroy.html
-/doc/asio/reference/waitable_timer_service/duration.html
-/doc/asio/reference/waitable_timer_service/expires_after.html
-/doc/asio/reference/waitable_timer_service/expires_at/
-/doc/asio/reference/waitable_timer_service/expires_at.html
-/doc/asio/reference/waitable_timer_service/expires_at/overload1.html
-/doc/asio/reference/waitable_timer_service/expires_at/overload2.html
-/doc/asio/reference/waitable_timer_service/expires_from_now/
-/doc/asio/reference/waitable_timer_service/expires_from_now.html
-/doc/asio/reference/waitable_timer_service/expires_from_now/overload1.html
-/doc/asio/reference/waitable_timer_service/expires_from_now/overload2.html
-/doc/asio/reference/waitable_timer_service/expiry.html
-/doc/asio/reference/waitable_timer_service/get_io_service.html
-/doc/asio/reference/waitable_timer_service.html
-/doc/asio/reference/WaitableTimerService.html
-/doc/asio/reference/waitable_timer_service/id.html
-/doc/asio/reference/waitable_timer_service/implementation_type.html
-/doc/asio/reference/waitable_timer_service/move_assign.html
-/doc/asio/reference/waitable_timer_service/move_construct.html
-/doc/asio/reference/waitable_timer_service/time_point.html
-/doc/asio/reference/waitable_timer_service/traits_type.html
-/doc/asio/reference/waitable_timer_service/waitable_timer_service.html
-/doc/asio/reference/waitable_timer_service/wait.html
-/doc/asio/reference/WaitHandler.html
-/doc/asio/reference/wait_traits/
-/doc/asio/reference/wait_traits.html
-/doc/asio/reference/WaitTraits.html
-/doc/asio/reference/wait_traits/to_wait_duration/
-/doc/asio/reference/wait_traits/to_wait_duration.html
-/doc/asio/reference/wait_traits/to_wait_duration/overload1.html
-/doc/asio/reference/wait_traits/to_wait_duration/overload2.html
-/doc/asio/reference/windows__basic_handle/
-/doc/asio/reference/windows__basic_handle/assign/
-/doc/asio/reference/windows__basic_handle/assign.html
-/doc/asio/reference/windows__basic_handle/assign/overload1.html
-/doc/asio/reference/windows__basic_handle/assign/overload2.html
-/doc/asio/reference/windows__basic_handle/basic_handle/
-/doc/asio/reference/windows__basic_handle/_basic_handle.html
-/doc/asio/reference/windows__basic_handle/basic_handle.html
-/doc/asio/reference/windows__basic_handle/basic_handle/overload1.html
-/doc/asio/reference/windows__basic_handle/basic_handle/overload2.html
-/doc/asio/reference/windows__basic_handle/basic_handle/overload3.html
-/doc/asio/reference/windows__basic_handle/cancel/
-/doc/asio/reference/windows__basic_handle/cancel.html
-/doc/asio/reference/windows__basic_handle/cancel/overload1.html
-/doc/asio/reference/windows__basic_handle/cancel/overload2.html
-/doc/asio/reference/windows__basic_handle/close/
-/doc/asio/reference/windows__basic_handle/close.html
-/doc/asio/reference/windows__basic_handle/close/overload1.html
-/doc/asio/reference/windows__basic_handle/close/overload2.html
-/doc/asio/reference/windows__basic_handle/executor_type.html
-/doc/asio/reference/windows__basic_handle/get_executor.html
-/doc/asio/reference/windows__basic_handle/get_implementation/
-/doc/asio/reference/windows__basic_handle/get_implementation.html
-/doc/asio/reference/windows__basic_handle/get_implementation/overload1.html
-/doc/asio/reference/windows__basic_handle/get_implementation/overload2.html
-/doc/asio/reference/windows__basic_handle/get_io_service.html
-/doc/asio/reference/windows__basic_handle/get_service/
-/doc/asio/reference/windows__basic_handle/get_service.html
-/doc/asio/reference/windows__basic_handle/get_service/overload1.html
-/doc/asio/reference/windows__basic_handle/get_service/overload2.html
-/doc/asio/reference/windows__basic_handle.html
-/doc/asio/reference/windows__basic_handle/implementation_type.html
-/doc/asio/reference/windows__basic_handle/is_open.html
-/doc/asio/reference/windows__basic_handle/lowest_layer/
-/doc/asio/reference/windows__basic_handle/lowest_layer.html
-/doc/asio/reference/windows__basic_handle/lowest_layer/overload1.html
-/doc/asio/reference/windows__basic_handle/lowest_layer/overload2.html
-/doc/asio/reference/windows__basic_handle/lowest_layer_type.html
-/doc/asio/reference/windows__basic_handle/native_handle.html
-/doc/asio/reference/windows__basic_handle/native_handle_type.html
-/doc/asio/reference/windows__basic_handle/operator_eq_.html
-/doc/asio/reference/windows__basic_handle/service_type.html
-/doc/asio/reference/windows__basic_object_handle/
-/doc/asio/reference/windows__basic_object_handle/assign/
-/doc/asio/reference/windows__basic_object_handle/assign.html
-/doc/asio/reference/windows__basic_object_handle/assign/overload1.html
-/doc/asio/reference/windows__basic_object_handle/assign/overload2.html
-/doc/asio/reference/windows__basic_object_handle/async_wait.html
-/doc/asio/reference/windows__basic_object_handle/basic_object_handle/
-/doc/asio/reference/windows__basic_object_handle/basic_object_handle.html
-/doc/asio/reference/windows__basic_object_handle/basic_object_handle/overload1.html
-/doc/asio/reference/windows__basic_object_handle/basic_object_handle/overload2.html
-/doc/asio/reference/windows__basic_object_handle/basic_object_handle/overload3.html
-/doc/asio/reference/windows__basic_object_handle/cancel/
-/doc/asio/reference/windows__basic_object_handle/cancel.html
-/doc/asio/reference/windows__basic_object_handle/cancel/overload1.html
-/doc/asio/reference/windows__basic_object_handle/cancel/overload2.html
-/doc/asio/reference/windows__basic_object_handle/close/
-/doc/asio/reference/windows__basic_object_handle/close.html
-/doc/asio/reference/windows__basic_object_handle/close/overload1.html
-/doc/asio/reference/windows__basic_object_handle/close/overload2.html
-/doc/asio/reference/windows__basic_object_handle/executor_type.html
-/doc/asio/reference/windows__basic_object_handle/get_executor.html
-/doc/asio/reference/windows__basic_object_handle/get_implementation/
-/doc/asio/reference/windows__basic_object_handle/get_implementation.html
-/doc/asio/reference/windows__basic_object_handle/get_implementation/overload1.html
-/doc/asio/reference/windows__basic_object_handle/get_implementation/overload2.html
-/doc/asio/reference/windows__basic_object_handle/get_io_service.html
-/doc/asio/reference/windows__basic_object_handle/get_service/
-/doc/asio/reference/windows__basic_object_handle/get_service.html
-/doc/asio/reference/windows__basic_object_handle/get_service/overload1.html
-/doc/asio/reference/windows__basic_object_handle/get_service/overload2.html
-/doc/asio/reference/windows__basic_object_handle.html
-/doc/asio/reference/windows__basic_object_handle/implementation_type.html
-/doc/asio/reference/windows__basic_object_handle/is_open.html
-/doc/asio/reference/windows__basic_object_handle/lowest_layer/
-/doc/asio/reference/windows__basic_object_handle/lowest_layer.html
-/doc/asio/reference/windows__basic_object_handle/lowest_layer/overload1.html
-/doc/asio/reference/windows__basic_object_handle/lowest_layer/overload2.html
-/doc/asio/reference/windows__basic_object_handle/lowest_layer_type.html
-/doc/asio/reference/windows__basic_object_handle/native_handle.html
-/doc/asio/reference/windows__basic_object_handle/native_handle_type.html
-/doc/asio/reference/windows__basic_object_handle/operator_eq_.html
-/doc/asio/reference/windows__basic_object_handle/service_type.html
-/doc/asio/reference/windows__basic_object_handle/wait/
-/doc/asio/reference/windows__basic_object_handle/wait.html
-/doc/asio/reference/windows__basic_object_handle/wait/overload1.html
-/doc/asio/reference/windows__basic_object_handle/wait/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/
-/doc/asio/reference/windows__basic_random_access_handle/assign/
-/doc/asio/reference/windows__basic_random_access_handle/assign.html
-/doc/asio/reference/windows__basic_random_access_handle/assign/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/assign/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/async_read_some_at.html
-/doc/asio/reference/windows__basic_random_access_handle/async_write_some_at.html
-/doc/asio/reference/windows__basic_random_access_handle/basic_random_access_handle/
-/doc/asio/reference/windows__basic_random_access_handle/basic_random_access_handle.html
-/doc/asio/reference/windows__basic_random_access_handle/basic_random_access_handle/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/basic_random_access_handle/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/basic_random_access_handle/overload3.html
-/doc/asio/reference/windows__basic_random_access_handle/cancel/
-/doc/asio/reference/windows__basic_random_access_handle/cancel.html
-/doc/asio/reference/windows__basic_random_access_handle/cancel/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/cancel/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/close/
-/doc/asio/reference/windows__basic_random_access_handle/close.html
-/doc/asio/reference/windows__basic_random_access_handle/close/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/close/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/executor_type.html
-/doc/asio/reference/windows__basic_random_access_handle/get_executor.html
-/doc/asio/reference/windows__basic_random_access_handle/get_implementation/
-/doc/asio/reference/windows__basic_random_access_handle/get_implementation.html
-/doc/asio/reference/windows__basic_random_access_handle/get_implementation/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/get_implementation/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/get_io_service.html
-/doc/asio/reference/windows__basic_random_access_handle/get_service/
-/doc/asio/reference/windows__basic_random_access_handle/get_service.html
-/doc/asio/reference/windows__basic_random_access_handle/get_service/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/get_service/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle.html
-/doc/asio/reference/windows__basic_random_access_handle/implementation_type.html
-/doc/asio/reference/windows__basic_random_access_handle/is_open.html
-/doc/asio/reference/windows__basic_random_access_handle/lowest_layer/
-/doc/asio/reference/windows__basic_random_access_handle/lowest_layer.html
-/doc/asio/reference/windows__basic_random_access_handle/lowest_layer/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/lowest_layer/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/lowest_layer_type.html
-/doc/asio/reference/windows__basic_random_access_handle/native_handle.html
-/doc/asio/reference/windows__basic_random_access_handle/native_handle_type.html
-/doc/asio/reference/windows__basic_random_access_handle/operator_eq_.html
-/doc/asio/reference/windows__basic_random_access_handle/read_some_at/
-/doc/asio/reference/windows__basic_random_access_handle/read_some_at.html
-/doc/asio/reference/windows__basic_random_access_handle/read_some_at/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/read_some_at/overload2.html
-/doc/asio/reference/windows__basic_random_access_handle/service_type.html
-/doc/asio/reference/windows__basic_random_access_handle/write_some_at/
-/doc/asio/reference/windows__basic_random_access_handle/write_some_at.html
-/doc/asio/reference/windows__basic_random_access_handle/write_some_at/overload1.html
-/doc/asio/reference/windows__basic_random_access_handle/write_some_at/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/
-/doc/asio/reference/windows__basic_stream_handle/assign/
-/doc/asio/reference/windows__basic_stream_handle/assign.html
-/doc/asio/reference/windows__basic_stream_handle/assign/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/assign/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/async_read_some.html
-/doc/asio/reference/windows__basic_stream_handle/async_write_some.html
-/doc/asio/reference/windows__basic_stream_handle/basic_stream_handle/
-/doc/asio/reference/windows__basic_stream_handle/basic_stream_handle.html
-/doc/asio/reference/windows__basic_stream_handle/basic_stream_handle/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/basic_stream_handle/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/basic_stream_handle/overload3.html
-/doc/asio/reference/windows__basic_stream_handle/cancel/
-/doc/asio/reference/windows__basic_stream_handle/cancel.html
-/doc/asio/reference/windows__basic_stream_handle/cancel/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/cancel/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/close/
-/doc/asio/reference/windows__basic_stream_handle/close.html
-/doc/asio/reference/windows__basic_stream_handle/close/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/close/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/executor_type.html
-/doc/asio/reference/windows__basic_stream_handle/get_executor.html
-/doc/asio/reference/windows__basic_stream_handle/get_implementation/
-/doc/asio/reference/windows__basic_stream_handle/get_implementation.html
-/doc/asio/reference/windows__basic_stream_handle/get_implementation/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/get_implementation/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/get_io_service.html
-/doc/asio/reference/windows__basic_stream_handle/get_service/
-/doc/asio/reference/windows__basic_stream_handle/get_service.html
-/doc/asio/reference/windows__basic_stream_handle/get_service/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/get_service/overload2.html
-/doc/asio/reference/windows__basic_stream_handle.html
-/doc/asio/reference/windows__basic_stream_handle/implementation_type.html
-/doc/asio/reference/windows__basic_stream_handle/is_open.html
-/doc/asio/reference/windows__basic_stream_handle/lowest_layer/
-/doc/asio/reference/windows__basic_stream_handle/lowest_layer.html
-/doc/asio/reference/windows__basic_stream_handle/lowest_layer/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/lowest_layer/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/lowest_layer_type.html
-/doc/asio/reference/windows__basic_stream_handle/native_handle.html
-/doc/asio/reference/windows__basic_stream_handle/native_handle_type.html
-/doc/asio/reference/windows__basic_stream_handle/operator_eq_.html
-/doc/asio/reference/windows__basic_stream_handle/read_some/
-/doc/asio/reference/windows__basic_stream_handle/read_some.html
-/doc/asio/reference/windows__basic_stream_handle/read_some/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/read_some/overload2.html
-/doc/asio/reference/windows__basic_stream_handle/service_type.html
-/doc/asio/reference/windows__basic_stream_handle/write_some/
-/doc/asio/reference/windows__basic_stream_handle/write_some.html
-/doc/asio/reference/windows__basic_stream_handle/write_some/overload1.html
-/doc/asio/reference/windows__basic_stream_handle/write_some/overload2.html
-/doc/asio/reference/windows__object_handle.html
-/doc/asio/reference/windows__object_handle_service/
-/doc/asio/reference/windows__object_handle_service/assign.html
-/doc/asio/reference/windows__object_handle_service/async_wait.html
-/doc/asio/reference/windows__object_handle_service/cancel.html
-/doc/asio/reference/windows__object_handle_service/close.html
-/doc/asio/reference/windows__object_handle_service/construct.html
-/doc/asio/reference/windows__object_handle_service/destroy.html
-/doc/asio/reference/windows__object_handle_service/get_io_service.html
-/doc/asio/reference/windows__object_handle_service.html
-/doc/asio/reference/windows__object_handle_service/id.html
-/doc/asio/reference/windows__object_handle_service/implementation_type.html
-/doc/asio/reference/windows__object_handle_service/is_open.html
-/doc/asio/reference/windows__object_handle_service/move_assign.html
-/doc/asio/reference/windows__object_handle_service/move_construct.html
-/doc/asio/reference/windows__object_handle_service/native_handle.html
-/doc/asio/reference/windows__object_handle_service/native_handle_type.html
-/doc/asio/reference/windows__object_handle_service/object_handle_service.html
-/doc/asio/reference/windows__object_handle_service/wait.html
-/doc/asio/reference/windows__overlapped_ptr/
-/doc/asio/reference/windows__overlapped_ptr/complete.html
-/doc/asio/reference/windows__overlapped_ptr/get/
-/doc/asio/reference/windows__overlapped_ptr/get.html
-/doc/asio/reference/windows__overlapped_ptr/get/overload1.html
-/doc/asio/reference/windows__overlapped_ptr/get/overload2.html
-/doc/asio/reference/windows__overlapped_ptr.html
-/doc/asio/reference/windows__overlapped_ptr/overlapped_ptr/
-/doc/asio/reference/windows__overlapped_ptr/_overlapped_ptr.html
-/doc/asio/reference/windows__overlapped_ptr/overlapped_ptr.html
-/doc/asio/reference/windows__overlapped_ptr/overlapped_ptr/overload1.html
-/doc/asio/reference/windows__overlapped_ptr/overlapped_ptr/overload2.html
-/doc/asio/reference/windows__overlapped_ptr/release.html
-/doc/asio/reference/windows__overlapped_ptr/reset/
-/doc/asio/reference/windows__overlapped_ptr/reset.html
-/doc/asio/reference/windows__overlapped_ptr/reset/overload1.html
-/doc/asio/reference/windows__overlapped_ptr/reset/overload2.html
-/doc/asio/reference/windows__random_access_handle.html
-/doc/asio/reference/windows__random_access_handle_service/
-/doc/asio/reference/windows__random_access_handle_service/assign.html
-/doc/asio/reference/windows__random_access_handle_service/async_read_some_at.html
-/doc/asio/reference/windows__random_access_handle_service/async_write_some_at.html
-/doc/asio/reference/windows__random_access_handle_service/cancel.html
-/doc/asio/reference/windows__random_access_handle_service/close.html
-/doc/asio/reference/windows__random_access_handle_service/construct.html
-/doc/asio/reference/windows__random_access_handle_service/destroy.html
-/doc/asio/reference/windows__random_access_handle_service/get_io_service.html
-/doc/asio/reference/windows__random_access_handle_service.html
-/doc/asio/reference/windows__random_access_handle_service/id.html
-/doc/asio/reference/windows__random_access_handle_service/implementation_type.html
-/doc/asio/reference/windows__random_access_handle_service/is_open.html
-/doc/asio/reference/windows__random_access_handle_service/move_assign.html
-/doc/asio/reference/windows__random_access_handle_service/move_construct.html
-/doc/asio/reference/windows__random_access_handle_service/native_handle.html
-/doc/asio/reference/windows__random_access_handle_service/native_handle_type.html
-/doc/asio/reference/windows__random_access_handle_service/random_access_handle_service.html
-/doc/asio/reference/windows__random_access_handle_service/read_some_at.html
-/doc/asio/reference/windows__random_access_handle_service/write_some_at.html
-/doc/asio/reference/windows__stream_handle.html
-/doc/asio/reference/windows__stream_handle_service/
-/doc/asio/reference/windows__stream_handle_service/assign.html
-/doc/asio/reference/windows__stream_handle_service/async_read_some.html
-/doc/asio/reference/windows__stream_handle_service/async_write_some.html
-/doc/asio/reference/windows__stream_handle_service/cancel.html
-/doc/asio/reference/windows__stream_handle_service/close.html
-/doc/asio/reference/windows__stream_handle_service/construct.html
-/doc/asio/reference/windows__stream_handle_service/destroy.html
-/doc/asio/reference/windows__stream_handle_service/get_io_service.html
-/doc/asio/reference/windows__stream_handle_service.html
-/doc/asio/reference/windows__stream_handle_service/id.html
-/doc/asio/reference/windows__stream_handle_service/implementation_type.html
-/doc/asio/reference/windows__stream_handle_service/is_open.html
-/doc/asio/reference/windows__stream_handle_service/move_assign.html
-/doc/asio/reference/windows__stream_handle_service/move_construct.html
-/doc/asio/reference/windows__stream_handle_service/native_handle.html
-/doc/asio/reference/windows__stream_handle_service/native_handle_type.html
-/doc/asio/reference/windows__stream_handle_service/read_some.html
-/doc/asio/reference/windows__stream_handle_service/stream_handle_service.html
-/doc/asio/reference/windows__stream_handle_service/write_some.html
-/doc/asio/reference/wrap/
-/doc/asio/reference/wrap.html
-/doc/asio/reference/wrap/overload1.html
-/doc/asio/reference/wrap/overload2.html
-/doc/asio/reference/write/
-/doc/asio/reference/write_at/
-/doc/asio/reference/write_at.html
-/doc/asio/reference/write_at/overload1.html
-/doc/asio/reference/write_at/overload2.html
-/doc/asio/reference/write_at/overload3.html
-/doc/asio/reference/write_at/overload4.html
-/doc/asio/reference/write_at/overload5.html
-/doc/asio/reference/write_at/overload6.html
-/doc/asio/reference/write_at/overload7.html
-/doc/asio/reference/write_at/overload8.html
-/doc/asio/reference/WriteHandler.html
-/doc/asio/reference/write.html
-/doc/asio/reference/write/overload10.html
-/doc/asio/reference/write/overload11.html
-/doc/asio/reference/write/overload12.html
-/doc/asio/reference/write/overload1.html
-/doc/asio/reference/write/overload2.html
-/doc/asio/reference/write/overload3.html
-/doc/asio/reference/write/overload4.html
-/doc/asio/reference/write/overload5.html
-/doc/asio/reference/write/overload6.html
-/doc/asio/reference/write/overload7.html
-/doc/asio/reference/write/overload8.html
-/doc/asio/reference/write/overload9.html
-/doc/asio/reference/yield_context.html
-/doc/asio/tutorial/
-/doc/asio/tutorial/boost_bind.html
-/doc/asio/tutorial.html
-/doc/asio/tutorial/tutdaytime1/
-/doc/asio/tutorial/tutdaytime1.html
-/doc/asio/tutorial/tutdaytime1/src.html
-/doc/asio/tutorial/tutdaytime2/
-/doc/asio/tutorial/tutdaytime2.html
-/doc/asio/tutorial/tutdaytime2/src.html
-/doc/asio/tutorial/tutdaytime3/
-/doc/asio/tutorial/tutdaytime3.html
-/doc/asio/tutorial/tutdaytime3/src.html
-/doc/asio/tutorial/tutdaytime4/
-/doc/asio/tutorial/tutdaytime4.html
-/doc/asio/tutorial/tutdaytime4/src.html
-/doc/asio/tutorial/tutdaytime5/
-/doc/asio/tutorial/tutdaytime5.html
-/doc/asio/tutorial/tutdaytime5/src.html
-/doc/asio/tutorial/tutdaytime6/
-/doc/asio/tutorial/tutdaytime6.html
-/doc/asio/tutorial/tutdaytime6/src.html
-/doc/asio/tutorial/tutdaytime7/
-/doc/asio/tutorial/tutdaytime7.html
-/doc/asio/tutorial/tutdaytime7/src.html
-/doc/asio/tutorial/tuttimer1/
-/doc/asio/tutorial/tuttimer1.html
-/doc/asio/tutorial/tuttimer1/src.html
-/doc/asio/tutorial/tuttimer2/
-/doc/asio/tutorial/tuttimer2.html
-/doc/asio/tutorial/tuttimer2/src.html
-/doc/asio/tutorial/tuttimer3/
-/doc/asio/tutorial/tuttimer3.html
-/doc/asio/tutorial/tuttimer3/src.html
-/doc/asio/tutorial/tuttimer4/
-/doc/asio/tutorial/tuttimer4.html
-/doc/asio/tutorial/tuttimer4/src.html
-/doc/asio/tutorial/tuttimer5/
-/doc/asio/tutorial/tuttimer5.html
-/doc/asio/tutorial/tuttimer5/src.html
-/doc/asio/using.html
-/doc/async_op1.png
-/doc/async_op2.png
-/doc/blank.png
-/doc/boostbook.css
-/doc/caution.png
-/doc/draft.png
-/doc/examples/
-/doc/examples/diffs/
-/doc/examples/diffs/allocation/
-/doc/examples/diffs/allocation/server.cpp.html
-/doc/examples/diffs/buffers/
-/doc/examples/diffs/buffers/reference_counted.cpp.html
-/doc/examples/diffs/chat/
-/doc/examples/diffs/chat/chat_client.cpp.html
-/doc/examples/diffs/chat/chat_message.hpp.html
-/doc/examples/diffs/chat/chat_server.cpp.html
-/doc/examples/diffs/echo/
-/doc/examples/diffs/echo/async_tcp_echo_server.cpp.html
-/doc/examples/diffs/echo/async_udp_echo_server.cpp.html
-/doc/examples/diffs/echo/blocking_tcp_echo_client.cpp.html
-/doc/examples/diffs/echo/blocking_tcp_echo_server.cpp.html
-/doc/examples/diffs/echo/blocking_udp_echo_client.cpp.html
-/doc/examples/diffs/echo/blocking_udp_echo_server.cpp.html
-/doc/examples/diffs/executors/
-/doc/examples/diffs/executors/actor.cpp.html
-/doc/examples/diffs/executors/bank_account_1.cpp.html
-/doc/examples/diffs/executors/bank_account_2.cpp.html
-/doc/examples/diffs/executors/fork_join.cpp.html
-/doc/examples/diffs/executors/pipeline.cpp.html
-/doc/examples/diffs/executors/priority_scheduler.cpp.html
-/doc/examples/diffs/futures/
-/doc/examples/diffs/futures/daytime_client.cpp.html
-/doc/examples/diffs/http/
-/doc/examples/diffs/http/server/
-/doc/examples/diffs/http/server/connection.cpp.html
-/doc/examples/diffs/http/server/connection.hpp.html
-/doc/examples/diffs/http/server/connection_manager.cpp.html
-/doc/examples/diffs/http/server/connection_manager.hpp.html
-/doc/examples/diffs/http/server/header.hpp.html
-/doc/examples/diffs/http/server/main.cpp.html
-/doc/examples/diffs/http/server/mime_types.cpp.html
-/doc/examples/diffs/http/server/mime_types.hpp.html
-/doc/examples/diffs/http/server/reply.cpp.html
-/doc/examples/diffs/http/server/reply.hpp.html
-/doc/examples/diffs/http/server/request_handler.cpp.html
-/doc/examples/diffs/http/server/request_handler.hpp.html
-/doc/examples/diffs/http/server/request.hpp.html
-/doc/examples/diffs/http/server/request_parser.cpp.html
-/doc/examples/diffs/http/server/request_parser.hpp.html
-/doc/examples/diffs/http/server/server.cpp.html
-/doc/examples/diffs/http/server/server.hpp.html
-/doc/examples/diffs/iostreams/
-/doc/examples/diffs/iostreams/http_client.cpp.html
-/doc/examples/diffs/spawn/
-/doc/examples/diffs/spawn/echo_server.cpp.html
-/doc/examples/diffs/spawn/parallel_grep.cpp.html
-/doc/home.png
-/doc/important.png
-/doc/index.html
-/doc/next_disabled.png
-/doc/next.png
-/doc/note.png
-/doc/prev_disabled.png
-/doc/prev.png
-/doc/proactor.png
-/doc/standalone_HTML.manifest
-/doc/sync_op.png
-/doc/tip.png
-/doc/up_disabled.png
-/doc/up.png
-/doc/warning.png
-/include/
-/include/asio/
-/include/asio/associated_allocator.hpp
-/include/asio/associated_executor.hpp
-/include/asio/async_result.hpp
-/include/asio/basic_datagram_socket.hpp
-/include/asio/basic_deadline_timer.hpp
-/include/asio/basic_io_object.hpp
-/include/asio/basic_raw_socket.hpp
-/include/asio/basic_seq_packet_socket.hpp
-/include/asio/basic_serial_port.hpp
-/include/asio/basic_signal_set.hpp
-/include/asio/basic_socket_acceptor.hpp
-/include/asio/basic_socket.hpp
-/include/asio/basic_socket_iostream.hpp
-/include/asio/basic_socket_streambuf.hpp
-/include/asio/basic_streambuf_fwd.hpp
-/include/asio/basic_streambuf.hpp
-/include/asio/basic_stream_socket.hpp
-/include/asio/basic_waitable_timer.hpp
-/include/asio/buffered_read_stream_fwd.hpp
-/include/asio/buffered_read_stream.hpp
-/include/asio/buffered_stream_fwd.hpp
-/include/asio/buffered_stream.hpp
-/include/asio/buffered_write_stream_fwd.hpp
-/include/asio/buffered_write_stream.hpp
-/include/asio/buffer.hpp
-/include/asio/buffers_iterator.hpp
-/include/asio/completion_condition.hpp
-/include/asio/connect.hpp
-/include/asio/coroutine.hpp
-/include/asio/datagram_socket_service.hpp
-/include/asio/deadline_timer.hpp
-/include/asio/deadline_timer_service.hpp
-/include/asio/defer.hpp
-/include/asio/detail/
-/include/asio/detail/array_fwd.hpp
-/include/asio/detail/array.hpp
-/include/asio/detail/assert.hpp
-/include/asio/detail/atomic_count.hpp
-/include/asio/detail/base_from_completion_cond.hpp
-/include/asio/detail/bind_handler.hpp
-/include/asio/detail/buffered_stream_storage.hpp
-/include/asio/detail/buffer_resize_guard.hpp
-/include/asio/detail/buffer_sequence_adapter.hpp
-/include/asio/detail/call_stack.hpp
-/include/asio/detail/chrono_time_traits.hpp
-/include/asio/detail/completion_handler.hpp
-/include/asio/detail/config.hpp
-/include/asio/detail/consuming_buffers.hpp
-/include/asio/detail/cstddef.hpp
-/include/asio/detail/cstdint.hpp
-/include/asio/detail/date_time_fwd.hpp
-/include/asio/detail/deadline_timer_service.hpp
-/include/asio/detail/dependent_type.hpp
-/include/asio/detail/descriptor_ops.hpp
-/include/asio/detail/descriptor_read_op.hpp
-/include/asio/detail/descriptor_write_op.hpp
-/include/asio/detail/dev_poll_reactor.hpp
-/include/asio/detail/epoll_reactor.hpp
-/include/asio/detail/eventfd_select_interrupter.hpp
-/include/asio/detail/event.hpp
-/include/asio/detail/executor_op.hpp
-/include/asio/detail/fd_set_adapter.hpp
-/include/asio/detail/fenced_block.hpp
-/include/asio/detail/functional.hpp
-/include/asio/detail/gcc_arm_fenced_block.hpp
-/include/asio/detail/gcc_hppa_fenced_block.hpp
-/include/asio/detail/gcc_sync_fenced_block.hpp
-/include/asio/detail/gcc_x86_fenced_block.hpp
-/include/asio/detail/global.hpp
-/include/asio/detail/handler_alloc_helpers.hpp
-/include/asio/detail/handler_cont_helpers.hpp
-/include/asio/detail/handler_invoke_helpers.hpp
-/include/asio/detail/handler_tracking.hpp
-/include/asio/detail/handler_type_requirements.hpp
-/include/asio/detail/handler_work.hpp
-/include/asio/detail/hash_map.hpp
-/include/asio/detail/impl/
-/include/asio/detail/impl/buffer_sequence_adapter.ipp
-/include/asio/detail/impl/descriptor_ops.ipp
-/include/asio/detail/impl/dev_poll_reactor.hpp
-/include/asio/detail/impl/dev_poll_reactor.ipp
-/include/asio/detail/impl/epoll_reactor.hpp
-/include/asio/detail/impl/epoll_reactor.ipp
-/include/asio/detail/impl/eventfd_select_interrupter.ipp
-/include/asio/detail/impl/handler_tracking.ipp
-/include/asio/detail/impl/kqueue_reactor.hpp
-/include/asio/detail/impl/kqueue_reactor.ipp
-/include/asio/detail/impl/pipe_select_interrupter.ipp
-/include/asio/detail/impl/posix_event.ipp
-/include/asio/detail/impl/posix_mutex.ipp
-/include/asio/detail/impl/posix_thread.ipp
-/include/asio/detail/impl/posix_tss_ptr.ipp
-/include/asio/detail/impl/reactive_descriptor_service.ipp
-/include/asio/detail/impl/reactive_serial_port_service.ipp
-/include/asio/detail/impl/reactive_socket_service_base.ipp
-/include/asio/detail/impl/resolver_service_base.ipp
-/include/asio/detail/impl/scheduler.ipp
-/include/asio/detail/impl/select_reactor.hpp
-/include/asio/detail/impl/select_reactor.ipp
-/include/asio/detail/impl/service_registry.hpp
-/include/asio/detail/impl/service_registry.ipp
-/include/asio/detail/impl/signal_set_service.ipp
-/include/asio/detail/impl/socket_ops.ipp
-/include/asio/detail/impl/socket_select_interrupter.ipp
-/include/asio/detail/impl/strand_executor_service.hpp
-/include/asio/detail/impl/strand_executor_service.ipp
-/include/asio/detail/impl/strand_service.hpp
-/include/asio/detail/impl/strand_service.ipp
-/include/asio/detail/impl/throw_error.ipp
-/include/asio/detail/impl/timer_queue_ptime.ipp
-/include/asio/detail/impl/timer_queue_set.ipp
-/include/asio/detail/impl/win_event.ipp
-/include/asio/detail/impl/win_iocp_handle_service.ipp
-/include/asio/detail/impl/win_iocp_io_service.hpp
-/include/asio/detail/impl/win_iocp_io_service.ipp
-/include/asio/detail/impl/win_iocp_serial_port_service.ipp
-/include/asio/detail/impl/win_iocp_socket_service_base.ipp
-/include/asio/detail/impl/win_mutex.ipp
-/include/asio/detail/impl/win_object_handle_service.ipp
-/include/asio/detail/impl/winrt_ssocket_service_base.ipp
-/include/asio/detail/impl/winrt_timer_scheduler.hpp
-/include/asio/detail/impl/winrt_timer_scheduler.ipp
-/include/asio/detail/impl/winsock_init.ipp
-/include/asio/detail/impl/win_static_mutex.ipp
-/include/asio/detail/impl/win_thread.ipp
-/include/asio/detail/impl/win_tss_ptr.ipp
-/include/asio/detail/io_control.hpp
-/include/asio/detail/is_buffer_sequence.hpp
-/include/asio/detail/keyword_tss_ptr.hpp
-/include/asio/detail/kqueue_reactor.hpp
-/include/asio/detail/limits.hpp
-/include/asio/detail/local_free_on_block_exit.hpp
-/include/asio/detail/macos_fenced_block.hpp
-/include/asio/detail/memory.hpp
-/include/asio/detail/mutex.hpp
-/include/asio/detail/noncopyable.hpp
-/include/asio/detail/null_event.hpp
-/include/asio/detail/null_fenced_block.hpp
-/include/asio/detail/null_global.hpp
-/include/asio/detail/null_mutex.hpp
-/include/asio/detail/null_reactor.hpp
-/include/asio/detail/null_signal_blocker.hpp
-/include/asio/detail/null_socket_service.hpp
-/include/asio/detail/null_static_mutex.hpp
-/include/asio/detail/null_thread.hpp
-/include/asio/detail/null_tss_ptr.hpp
-/include/asio/detail/object_pool.hpp
-/include/asio/detail/old_win_sdk_compat.hpp
-/include/asio/detail/operation.hpp
-/include/asio/detail/op_queue.hpp
-/include/asio/detail/pipe_select_interrupter.hpp
-/include/asio/detail/pop_options.hpp
-/include/asio/detail/posix_event.hpp
-/include/asio/detail/posix_fd_set_adapter.hpp
-/include/asio/detail/posix_global.hpp
-/include/asio/detail/posix_mutex.hpp
-/include/asio/detail/posix_signal_blocker.hpp
-/include/asio/detail/posix_static_mutex.hpp
-/include/asio/detail/posix_thread.hpp
-/include/asio/detail/posix_tss_ptr.hpp
-/include/asio/detail/push_options.hpp
-/include/asio/detail/reactive_descriptor_service.hpp
-/include/asio/detail/reactive_null_buffers_op.hpp
-/include/asio/detail/reactive_serial_port_service.hpp
-/include/asio/detail/reactive_socket_accept_op.hpp
-/include/asio/detail/reactive_socket_connect_op.hpp
-/include/asio/detail/reactive_socket_recvfrom_op.hpp
-/include/asio/detail/reactive_socket_recvmsg_op.hpp
-/include/asio/detail/reactive_socket_recv_op.hpp
-/include/asio/detail/reactive_socket_send_op.hpp
-/include/asio/detail/reactive_socket_sendto_op.hpp
-/include/asio/detail/reactive_socket_service_base.hpp
-/include/asio/detail/reactive_socket_service.hpp
-/include/asio/detail/reactive_wait_op.hpp
-/include/asio/detail/reactor_fwd.hpp
-/include/asio/detail/reactor.hpp
-/include/asio/detail/reactor_op.hpp
-/include/asio/detail/reactor_op_queue.hpp
-/include/asio/detail/recycling_allocator.hpp
-/include/asio/detail/regex_fwd.hpp
-/include/asio/detail/resolve_endpoint_op.hpp
-/include/asio/detail/resolve_op.hpp
-/include/asio/detail/resolver_service_base.hpp
-/include/asio/detail/resolver_service.hpp
-/include/asio/detail/scheduler.hpp
-/include/asio/detail/scheduler_operation.hpp
-/include/asio/detail/scheduler_thread_info.hpp
-/include/asio/detail/scoped_lock.hpp
-/include/asio/detail/scoped_ptr.hpp
-/include/asio/detail/select_interrupter.hpp
-/include/asio/detail/select_reactor.hpp
-/include/asio/detail/service_registry.hpp
-/include/asio/detail/signal_blocker.hpp
-/include/asio/detail/signal_handler.hpp
-/include/asio/detail/signal_init.hpp
-/include/asio/detail/signal_op.hpp
-/include/asio/detail/signal_set_service.hpp
-/include/asio/detail/socket_holder.hpp
-/include/asio/detail/socket_ops.hpp
-/include/asio/detail/socket_option.hpp
-/include/asio/detail/socket_select_interrupter.hpp
-/include/asio/detail/socket_types.hpp
-/include/asio/detail/solaris_fenced_block.hpp
-/include/asio/detail/static_mutex.hpp
-/include/asio/detail/std_event.hpp
-/include/asio/detail/std_global.hpp
-/include/asio/detail/std_mutex.hpp
-/include/asio/detail/std_static_mutex.hpp
-/include/asio/detail/std_thread.hpp
-/include/asio/detail/strand_executor_service.hpp
-/include/asio/detail/strand_service.hpp
-/include/asio/detail/thread_context.hpp
-/include/asio/detail/thread_group.hpp
-/include/asio/detail/thread.hpp
-/include/asio/detail/thread_info_base.hpp
-/include/asio/detail/throw_error.hpp
-/include/asio/detail/throw_exception.hpp
-/include/asio/detail/timer_queue_base.hpp
-/include/asio/detail/timer_queue.hpp
-/include/asio/detail/timer_queue_ptime.hpp
-/include/asio/detail/timer_queue_set.hpp
-/include/asio/detail/timer_scheduler_fwd.hpp
-/include/asio/detail/timer_scheduler.hpp
-/include/asio/detail/tss_ptr.hpp
-/include/asio/detail/type_traits.hpp
-/include/asio/detail/variadic_templates.hpp
-/include/asio/detail/wait_handler.hpp
-/include/asio/detail/wait_op.hpp
-/include/asio/detail/wince_thread.hpp
-/include/asio/detail/win_event.hpp
-/include/asio/detail/win_fd_set_adapter.hpp
-/include/asio/detail/win_fenced_block.hpp
-/include/asio/detail/win_global.hpp
-/include/asio/detail/win_iocp_handle_read_op.hpp
-/include/asio/detail/win_iocp_handle_service.hpp
-/include/asio/detail/win_iocp_handle_write_op.hpp
-/include/asio/detail/win_iocp_io_service.hpp
-/include/asio/detail/win_iocp_null_buffers_op.hpp
-/include/asio/detail/win_iocp_operation.hpp
-/include/asio/detail/win_iocp_overlapped_op.hpp
-/include/asio/detail/win_iocp_overlapped_ptr.hpp
-/include/asio/detail/win_iocp_serial_port_service.hpp
-/include/asio/detail/win_iocp_socket_accept_op.hpp
-/include/asio/detail/win_iocp_socket_connect_op.hpp
-/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
-/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
-/include/asio/detail/win_iocp_socket_recv_op.hpp
-/include/asio/detail/win_iocp_socket_send_op.hpp
-/include/asio/detail/win_iocp_socket_service_base.hpp
-/include/asio/detail/win_iocp_socket_service.hpp
-/include/asio/detail/win_iocp_thread_info.hpp
-/include/asio/detail/win_iocp_wait_op.hpp
-/include/asio/detail/win_mutex.hpp
-/include/asio/detail/win_object_handle_service.hpp
-/include/asio/detail/winrt_async_manager.hpp
-/include/asio/detail/winrt_async_op.hpp
-/include/asio/detail/winrt_resolve_op.hpp
-/include/asio/detail/winrt_resolver_service.hpp
-/include/asio/detail/winrt_socket_connect_op.hpp
-/include/asio/detail/winrt_socket_recv_op.hpp
-/include/asio/detail/winrt_socket_send_op.hpp
-/include/asio/detail/winrt_ssocket_service_base.hpp
-/include/asio/detail/winrt_ssocket_service.hpp
-/include/asio/detail/winrt_timer_scheduler.hpp
-/include/asio/detail/winrt_utils.hpp
-/include/asio/detail/winsock_init.hpp
-/include/asio/detail/win_static_mutex.hpp
-/include/asio/detail/win_thread.hpp
-/include/asio/detail/win_tss_ptr.hpp
-/include/asio/detail/work_dispatcher.hpp
-/include/asio/detail/wrapped_handler.hpp
-/include/asio/dispatch.hpp
-/include/asio/error_code.hpp
-/include/asio/error.hpp
-/include/asio/execution_context.hpp
-/include/asio/executor.hpp
-/include/asio/executor_work.hpp
-/include/asio/generic/
-/include/asio/generic/basic_endpoint.hpp
-/include/asio/generic/datagram_protocol.hpp
-/include/asio/generic/detail/
-/include/asio/generic/detail/endpoint.hpp
-/include/asio/generic/detail/impl/
-/include/asio/generic/detail/impl/endpoint.ipp
-/include/asio/generic/raw_protocol.hpp
-/include/asio/generic/seq_packet_protocol.hpp
-/include/asio/generic/stream_protocol.hpp
-/include/asio/handler_alloc_hook.hpp
-/include/asio/handler_continuation_hook.hpp
-/include/asio/handler_invoke_hook.hpp
-/include/asio/handler_type.hpp
-/include/asio/high_resolution_timer.hpp
-/include/asio.hpp
-/include/asio/impl/
-/include/asio/impl/buffered_read_stream.hpp
-/include/asio/impl/buffered_write_stream.hpp
-/include/asio/impl/connect.hpp
-/include/asio/impl/defer.hpp
-/include/asio/impl/dispatch.hpp
-/include/asio/impl/error_code.ipp
-/include/asio/impl/error.ipp
-/include/asio/impl/execution_context.hpp
-/include/asio/impl/execution_context.ipp
-/include/asio/impl/executor.hpp
-/include/asio/impl/executor.ipp
-/include/asio/impl/handler_alloc_hook.ipp
-/include/asio/impl/io_service.hpp
-/include/asio/impl/io_service.ipp
-/include/asio/impl/post.hpp
-/include/asio/impl/read_at.hpp
-/include/asio/impl/read.hpp
-/include/asio/impl/read_until.hpp
-/include/asio/impl/serial_port_base.hpp
-/include/asio/impl/serial_port_base.ipp
-/include/asio/impl/spawn.hpp
-/include/asio/impl/src.cpp
-/include/asio/impl/src.hpp
-/include/asio/impl/system_executor.hpp
-/include/asio/impl/system_executor.ipp
-/include/asio/impl/thread_pool.hpp
-/include/asio/impl/thread_pool.ipp
-/include/asio/impl/use_future.hpp
-/include/asio/impl/write_at.hpp
-/include/asio/impl/write.hpp
-/include/asio/io_service.hpp
-/include/asio/io_service_strand.hpp
-/include/asio/ip/
-/include/asio/ip/address.hpp
-/include/asio/ip/address_iterator_v4.hpp
-/include/asio/ip/address_iterator_v6.hpp
-/include/asio/ip/address_range_v4.hpp
-/include/asio/ip/address_range_v6.hpp
-/include/asio/ip/address_v4.hpp
-/include/asio/ip/address_v6.hpp
-/include/asio/ip/bad_address_cast.hpp
-/include/asio/ip/basic_endpoint.hpp
-/include/asio/ip/basic_resolver_entry.hpp
-/include/asio/ip/basic_resolver.hpp
-/include/asio/ip/basic_resolver_iterator.hpp
-/include/asio/ip/basic_resolver_query.hpp
-/include/asio/ip/detail/
-/include/asio/ip/detail/endpoint.hpp
-/include/asio/ip/detail/impl/
-/include/asio/ip/detail/impl/endpoint.ipp
-/include/asio/ip/detail/socket_option.hpp
-/include/asio/ip/host_name.hpp
-/include/asio/ip/icmp.hpp
-/include/asio/ip/impl/
-/include/asio/ip/impl/address.hpp
-/include/asio/ip/impl/address.ipp
-/include/asio/ip/impl/address_v4.hpp
-/include/asio/ip/impl/address_v4.ipp
-/include/asio/ip/impl/address_v6.hpp
-/include/asio/ip/impl/address_v6.ipp
-/include/asio/ip/impl/basic_endpoint.hpp
-/include/asio/ip/impl/host_name.ipp
-/include/asio/ip/impl/network_v4.hpp
-/include/asio/ip/impl/network_v4.ipp
-/include/asio/ip/impl/network_v6.hpp
-/include/asio/ip/impl/network_v6.ipp
-/include/asio/ip/multicast.hpp
-/include/asio/ip/network_v4.hpp
-/include/asio/ip/network_v6.hpp
-/include/asio/ip/resolver_query_base.hpp
-/include/asio/ip/resolver_service.hpp
-/include/asio/ip/tcp.hpp
-/include/asio/ip/udp.hpp
-/include/asio/ip/unicast.hpp
-/include/asio/ip/v6_only.hpp
-/include/asio/is_executor.hpp
-/include/asio/is_read_buffered.hpp
-/include/asio/is_write_buffered.hpp
-/include/asio/local/
-/include/asio/local/basic_endpoint.hpp
-/include/asio/local/connect_pair.hpp
-/include/asio/local/datagram_protocol.hpp
-/include/asio/local/detail/
-/include/asio/local/detail/endpoint.hpp
-/include/asio/local/detail/impl/
-/include/asio/local/detail/impl/endpoint.ipp
-/include/asio/local/stream_protocol.hpp
-/include/asio/package.hpp
-/include/asio/placeholders.hpp
-/include/asio/posix/
-/include/asio/posix/basic_descriptor.hpp
-/include/asio/posix/basic_stream_descriptor.hpp
-/include/asio/posix/descriptor_base.hpp
-/include/asio/posix/stream_descriptor.hpp
-/include/asio/posix/stream_descriptor_service.hpp
-/include/asio/post.hpp
-/include/asio/raw_socket_service.hpp
-/include/asio/read_at.hpp
-/include/asio/read.hpp
-/include/asio/read_until.hpp
-/include/asio/seq_packet_socket_service.hpp
-/include/asio/serial_port_base.hpp
-/include/asio/serial_port.hpp
-/include/asio/serial_port_service.hpp
-/include/asio/signal_set.hpp
-/include/asio/signal_set_service.hpp
-/include/asio/socket_acceptor_service.hpp
-/include/asio/socket_base.hpp
-/include/asio/spawn.hpp
-/include/asio/ssl/
-/include/asio/ssl/context_base.hpp
-/include/asio/ssl/context.hpp
-/include/asio/ssl/detail/
-/include/asio/ssl/detail/buffered_handshake_op.hpp
-/include/asio/ssl/detail/engine.hpp
-/include/asio/ssl/detail/handshake_op.hpp
-/include/asio/ssl/detail/impl/
-/include/asio/ssl/detail/impl/engine.ipp
-/include/asio/ssl/detail/impl/openssl_init.ipp
-/include/asio/ssl/detail/io.hpp
-/include/asio/ssl/detail/openssl_init.hpp
-/include/asio/ssl/detail/openssl_types.hpp
-/include/asio/ssl/detail/password_callback.hpp
-/include/asio/ssl/detail/read_op.hpp
-/include/asio/ssl/detail/shutdown_op.hpp
-/include/asio/ssl/detail/stream_core.hpp
-/include/asio/ssl/detail/verify_callback.hpp
-/include/asio/ssl/detail/write_op.hpp
-/include/asio/ssl/error.hpp
-/include/asio/ssl.hpp
-/include/asio/ssl/impl/
-/include/asio/ssl/impl/context.hpp
-/include/asio/ssl/impl/context.ipp
-/include/asio/ssl/impl/error.ipp
-/include/asio/ssl/impl/rfc2818_verification.ipp
-/include/asio/ssl/impl/src.hpp
-/include/asio/ssl/rfc2818_verification.hpp
-/include/asio/ssl/stream_base.hpp
-/include/asio/ssl/stream.hpp
-/include/asio/ssl/verify_context.hpp
-/include/asio/ssl/verify_mode.hpp
-/include/asio/steady_timer.hpp
-/include/asio/strand.hpp
-/include/asio/streambuf.hpp
-/include/asio/stream_socket_service.hpp
-/include/asio/system_error.hpp
-/include/asio/system_executor.hpp
-/include/asio/system_timer.hpp
-/include/asio/thread.hpp
-/include/asio/thread_pool.hpp
-/include/asio/time_traits.hpp
-/include/asio/ts/
-/include/asio/ts/buffer.hpp
-/include/asio/ts/executor.hpp
-/include/asio/ts/internet.hpp
-/include/asio/ts/io_service.hpp
-/include/asio/ts/networking.hpp
-/include/asio/ts/socket.hpp
-/include/asio/ts/thread_pool.hpp
-/include/asio/ts/timer.hpp
-/include/asio/unyield.hpp
-/include/asio/use_future.hpp
-/include/asio/uses_executor.hpp
-/include/asio/version.hpp
-/include/asio/waitable_timer_service.hpp
-/include/asio/wait_traits.hpp
-/include/asio/windows/
-/include/asio/windows/basic_handle.hpp
-/include/asio/windows/basic_object_handle.hpp
-/include/asio/windows/basic_random_access_handle.hpp
-/include/asio/windows/basic_stream_handle.hpp
-/include/asio/windows/object_handle.hpp
-/include/asio/windows/object_handle_service.hpp
-/include/asio/windows/overlapped_ptr.hpp
-/include/asio/windows/random_access_handle.hpp
-/include/asio/windows/random_access_handle_service.hpp
-/include/asio/windows/stream_handle.hpp
-/include/asio/windows/stream_handle_service.hpp
-/include/asio/wrap.hpp
-/include/asio/write_at.hpp
-/include/asio/write.hpp
-/include/asio/yield.hpp
-/include/Makefile.am
-/include/Makefile.in
-/INSTALL
-/install-sh
-/LICENSE_1_0.txt
-/Makefile.am
-/Makefile.in
-/missing
-/README
-/src/
-/src/asio.cpp
-/src/asio_ssl.cpp
-/src/examples/
-/src/examples/cpp03/
-/src/examples/cpp03/allocation/
-/src/examples/cpp03/allocation/server.cpp
-/src/examples/cpp03/buffers/
-/src/examples/cpp03/buffers/reference_counted.cpp
-/src/examples/cpp03/chat/
-/src/examples/cpp03/chat/chat_client.cpp
-/src/examples/cpp03/chat/chat_message.hpp
-/src/examples/cpp03/chat/chat_server.cpp
-/src/examples/cpp03/chat/posix_chat_client.cpp
-/src/examples/cpp03/echo/
-/src/examples/cpp03/echo/async_tcp_echo_server.cpp
-/src/examples/cpp03/echo/async_udp_echo_server.cpp
-/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
-/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
-/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
-/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
-/src/examples/cpp03/fork/
-/src/examples/cpp03/fork/daemon.cpp
-/src/examples/cpp03/fork/process_per_connection.cpp
-/src/examples/cpp03/http/
-/src/examples/cpp03/http/client/
-/src/examples/cpp03/http/client/async_client.cpp
-/src/examples/cpp03/http/client/sync_client.cpp
-/src/examples/cpp03/http/server/
-/src/examples/cpp03/http/server2/
-/src/examples/cpp03/http/server2/connection.cpp
-/src/examples/cpp03/http/server2/connection.hpp
-/src/examples/cpp03/http/server2/header.hpp
-/src/examples/cpp03/http/server2/io_service_pool.cpp
-/src/examples/cpp03/http/server2/io_service_pool.hpp
-/src/examples/cpp03/http/server2/main.cpp
-/src/examples/cpp03/http/server2/mime_types.cpp
-/src/examples/cpp03/http/server2/mime_types.hpp
-/src/examples/cpp03/http/server2/reply.cpp
-/src/examples/cpp03/http/server2/reply.hpp
-/src/examples/cpp03/http/server2/request_handler.cpp
-/src/examples/cpp03/http/server2/request_handler.hpp
-/src/examples/cpp03/http/server2/request.hpp
-/src/examples/cpp03/http/server2/request_parser.cpp
-/src/examples/cpp03/http/server2/request_parser.hpp
-/src/examples/cpp03/http/server2/server.cpp
-/src/examples/cpp03/http/server2/server.hpp
-/src/examples/cpp03/http/server3/
-/src/examples/cpp03/http/server3/connection.cpp
-/src/examples/cpp03/http/server3/connection.hpp
-/src/examples/cpp03/http/server3/header.hpp
-/src/examples/cpp03/http/server3/main.cpp
-/src/examples/cpp03/http/server3/mime_types.cpp
-/src/examples/cpp03/http/server3/mime_types.hpp
-/src/examples/cpp03/http/server3/reply.cpp
-/src/examples/cpp03/http/server3/reply.hpp
-/src/examples/cpp03/http/server3/request_handler.cpp
-/src/examples/cpp03/http/server3/request_handler.hpp
-/src/examples/cpp03/http/server3/request.hpp
-/src/examples/cpp03/http/server3/request_parser.cpp
-/src/examples/cpp03/http/server3/request_parser.hpp
-/src/examples/cpp03/http/server3/server.cpp
-/src/examples/cpp03/http/server3/server.hpp
-/src/examples/cpp03/http/server4/
-/src/examples/cpp03/http/server4/file_handler.cpp
-/src/examples/cpp03/http/server4/file_handler.hpp
-/src/examples/cpp03/http/server4/header.hpp
-/src/examples/cpp03/http/server4/main.cpp
-/src/examples/cpp03/http/server4/mime_types.cpp
-/src/examples/cpp03/http/server4/mime_types.hpp
-/src/examples/cpp03/http/server4/reply.cpp
-/src/examples/cpp03/http/server4/reply.hpp
-/src/examples/cpp03/http/server4/request.hpp
-/src/examples/cpp03/http/server4/request_parser.cpp
-/src/examples/cpp03/http/server4/request_parser.hpp
-/src/examples/cpp03/http/server4/server.cpp
-/src/examples/cpp03/http/server4/server.hpp
-/src/examples/cpp03/http/server/connection.cpp
-/src/examples/cpp03/http/server/connection.hpp
-/src/examples/cpp03/http/server/connection_manager.cpp
-/src/examples/cpp03/http/server/connection_manager.hpp
-/src/examples/cpp03/http/server/header.hpp
-/src/examples/cpp03/http/server/main.cpp
-/src/examples/cpp03/http/server/mime_types.cpp
-/src/examples/cpp03/http/server/mime_types.hpp
-/src/examples/cpp03/http/server/reply.cpp
-/src/examples/cpp03/http/server/reply.hpp
-/src/examples/cpp03/http/server/request_handler.cpp
-/src/examples/cpp03/http/server/request_handler.hpp
-/src/examples/cpp03/http/server/request.hpp
-/src/examples/cpp03/http/server/request_parser.cpp
-/src/examples/cpp03/http/server/request_parser.hpp
-/src/examples/cpp03/http/server/server.cpp
-/src/examples/cpp03/http/server/server.hpp
-/src/examples/cpp03/icmp/
-/src/examples/cpp03/icmp/icmp_header.hpp
-/src/examples/cpp03/icmp/ipv4_header.hpp
-/src/examples/cpp03/icmp/ping.cpp
-/src/examples/cpp03/invocation/
-/src/examples/cpp03/invocation/prioritised_handlers.cpp
-/src/examples/cpp03/iostreams/
-/src/examples/cpp03/iostreams/daytime_client.cpp
-/src/examples/cpp03/iostreams/daytime_server.cpp
-/src/examples/cpp03/iostreams/http_client.cpp
-/src/examples/cpp03/local/
-/src/examples/cpp03/local/connect_pair.cpp
-/src/examples/cpp03/local/iostream_client.cpp
-/src/examples/cpp03/local/stream_client.cpp
-/src/examples/cpp03/local/stream_server.cpp
-/src/examples/cpp03/Makefile.am
-/src/examples/cpp03/Makefile.in
-/src/examples/cpp03/multicast/
-/src/examples/cpp03/multicast/receiver.cpp
-/src/examples/cpp03/multicast/sender.cpp
-/src/examples/cpp03/nonblocking/
-/src/examples/cpp03/nonblocking/third_party_lib.cpp
-/src/examples/cpp03/porthopper/
-/src/examples/cpp03/porthopper/client.cpp
-/src/examples/cpp03/porthopper/protocol.hpp
-/src/examples/cpp03/porthopper/server.cpp
-/src/examples/cpp03/serialization/
-/src/examples/cpp03/serialization/client.cpp
-/src/examples/cpp03/serialization/connection.hpp
-/src/examples/cpp03/serialization/server.cpp
-/src/examples/cpp03/serialization/stock.hpp
-/src/examples/cpp03/services/
-/src/examples/cpp03/services/basic_logger.hpp
-/src/examples/cpp03/services/daytime_client.cpp
-/src/examples/cpp03/services/logger.hpp
-/src/examples/cpp03/services/logger_service.cpp
-/src/examples/cpp03/services/logger_service.hpp
-/src/examples/cpp03/services/stream_socket_service.hpp
-/src/examples/cpp03/socks4/
-/src/examples/cpp03/socks4/socks4.hpp
-/src/examples/cpp03/socks4/sync_client.cpp
-/src/examples/cpp03/spawn/
-/src/examples/cpp03/spawn/echo_server.cpp
-/src/examples/cpp03/spawn/parallel_grep.cpp
-/src/examples/cpp03/ssl/
-/src/examples/cpp03/ssl/ca.pem
-/src/examples/cpp03/ssl/client.cpp
-/src/examples/cpp03/ssl/dh512.pem
-/src/examples/cpp03/ssl/README
-/src/examples/cpp03/ssl/server.cpp
-/src/examples/cpp03/ssl/server.pem
-/src/examples/cpp03/timeouts/
-/src/examples/cpp03/timeouts/async_tcp_client.cpp
-/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
-/src/examples/cpp03/timeouts/blocking_udp_client.cpp
-/src/examples/cpp03/timeouts/server.cpp
-/src/examples/cpp03/timers/
-/src/examples/cpp03/timers/tick_count_timer.cpp
-/src/examples/cpp03/timers/time_t_timer.cpp
-/src/examples/cpp03/tutorial/
-/src/examples/cpp03/tutorial/daytime1/
-/src/examples/cpp03/tutorial/daytime1/client.cpp
-/src/examples/cpp03/tutorial/daytime2/
-/src/examples/cpp03/tutorial/daytime2/server.cpp
-/src/examples/cpp03/tutorial/daytime3/
-/src/examples/cpp03/tutorial/daytime3/server.cpp
-/src/examples/cpp03/tutorial/daytime4/
-/src/examples/cpp03/tutorial/daytime4/client.cpp
-/src/examples/cpp03/tutorial/daytime5/
-/src/examples/cpp03/tutorial/daytime5/server.cpp
-/src/examples/cpp03/tutorial/daytime6/
-/src/examples/cpp03/tutorial/daytime6/server.cpp
-/src/examples/cpp03/tutorial/daytime7/
-/src/examples/cpp03/tutorial/daytime7/server.cpp
-/src/examples/cpp03/tutorial/timer1/
-/src/examples/cpp03/tutorial/timer1/timer.cpp
-/src/examples/cpp03/tutorial/timer2/
-/src/examples/cpp03/tutorial/timer2/timer.cpp
-/src/examples/cpp03/tutorial/timer3/
-/src/examples/cpp03/tutorial/timer3/timer.cpp
-/src/examples/cpp03/tutorial/timer4/
-/src/examples/cpp03/tutorial/timer4/timer.cpp
-/src/examples/cpp03/tutorial/timer5/
-/src/examples/cpp03/tutorial/timer5/timer.cpp
-/src/examples/cpp03/windows/
-/src/examples/cpp03/windows/transmit_file.cpp
-/src/examples/cpp11/
-/src/examples/cpp11/allocation/
-/src/examples/cpp11/allocation/server.cpp
-/src/examples/cpp11/buffers/
-/src/examples/cpp11/buffers/reference_counted.cpp
-/src/examples/cpp11/chat/
-/src/examples/cpp11/chat/chat_client.cpp
-/src/examples/cpp11/chat/chat_message.hpp
-/src/examples/cpp11/chat/chat_server.cpp
-/src/examples/cpp11/echo/
-/src/examples/cpp11/echo/async_tcp_echo_server.cpp
-/src/examples/cpp11/echo/async_udp_echo_server.cpp
-/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
-/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
-/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
-/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
-/src/examples/cpp11/executors/
-/src/examples/cpp11/executors/actor.cpp
-/src/examples/cpp11/executors/bank_account_1.cpp
-/src/examples/cpp11/executors/bank_account_2.cpp
-/src/examples/cpp11/executors/fork_join.cpp
-/src/examples/cpp11/executors/pipeline.cpp
-/src/examples/cpp11/executors/priority_scheduler.cpp
-/src/examples/cpp11/futures/
-/src/examples/cpp11/futures/daytime_client.cpp
-/src/examples/cpp11/http/
-/src/examples/cpp11/http/server/
-/src/examples/cpp11/http/server/connection.cpp
-/src/examples/cpp11/http/server/connection.hpp
-/src/examples/cpp11/http/server/connection_manager.cpp
-/src/examples/cpp11/http/server/connection_manager.hpp
-/src/examples/cpp11/http/server/header.hpp
-/src/examples/cpp11/http/server/main.cpp
-/src/examples/cpp11/http/server/mime_types.cpp
-/src/examples/cpp11/http/server/mime_types.hpp
-/src/examples/cpp11/http/server/reply.cpp
-/src/examples/cpp11/http/server/reply.hpp
-/src/examples/cpp11/http/server/request_handler.cpp
-/src/examples/cpp11/http/server/request_handler.hpp
-/src/examples/cpp11/http/server/request.hpp
-/src/examples/cpp11/http/server/request_parser.cpp
-/src/examples/cpp11/http/server/request_parser.hpp
-/src/examples/cpp11/http/server/server.cpp
-/src/examples/cpp11/http/server/server.hpp
-/src/examples/cpp11/iostreams/
-/src/examples/cpp11/iostreams/http_client.cpp
-/src/examples/cpp11/Makefile.am
-/src/examples/cpp11/Makefile.in
-/src/examples/cpp11/spawn/
-/src/examples/cpp11/spawn/echo_server.cpp
-/src/examples/cpp11/spawn/parallel_grep.cpp
-/src/examples/cpp14/
-/src/examples/cpp14/echo/
-/src/examples/cpp14/echo/async_tcp_echo_server.cpp
-/src/examples/cpp14/echo/async_udp_echo_server.cpp
-/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
-/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
-/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
-/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
-/src/examples/cpp14/executors/
-/src/examples/cpp14/executors/actor.cpp
-/src/examples/cpp14/executors/async_1.cpp
-/src/examples/cpp14/executors/async_2.cpp
-/src/examples/cpp14/executors/bank_account_1.cpp
-/src/examples/cpp14/executors/bank_account_2.cpp
-/src/examples/cpp14/executors/fork_join.cpp
-/src/examples/cpp14/executors/pipeline.cpp
-/src/examples/cpp14/executors/priority_scheduler.cpp
-/src/examples/cpp14/iostreams/
-/src/examples/cpp14/iostreams/http_client.cpp
-/src/examples/cpp14/Makefile.am
-/src/examples/cpp14/Makefile.in
-/src/Makefile.am
-/src/Makefile.in
-/src/Makefile.mgw
-/src/Makefile.msc
-/src/tests/
-/src/tests/latency/
-/src/tests/latency/allocator.hpp
-/src/tests/latency/coroutine.hpp
-/src/tests/latency/high_res_clock.hpp
-/src/tests/latency/tcp_client.cpp
-/src/tests/latency/tcp_server.cpp
-/src/tests/latency/udp_client.cpp
-/src/tests/latency/udp_server.cpp
-/src/tests/latency/unyield.hpp
-/src/tests/latency/yield.hpp
-/src/tests/Makefile.am
-/src/tests/Makefile.in
-/src/tests/performance/
-/src/tests/performance/client.cpp
-/src/tests/performance/handler_allocator.hpp
-/src/tests/performance/server.cpp
-/src/tests/unit/
-/src/tests/unit/archetypes/
-/src/tests/unit/archetypes/async_result.hpp
-/src/tests/unit/archetypes/gettable_socket_option.hpp
-/src/tests/unit/archetypes/io_control_command.hpp
-/src/tests/unit/archetypes/settable_socket_option.hpp
-/src/tests/unit/basic_datagram_socket.cpp
-/src/tests/unit/basic_deadline_timer.cpp
-/src/tests/unit/basic_raw_socket.cpp
-/src/tests/unit/basic_seq_packet_socket.cpp
-/src/tests/unit/basic_serial_port.cpp
-/src/tests/unit/basic_signal_set.cpp
-/src/tests/unit/basic_socket_acceptor.cpp
-/src/tests/unit/basic_streambuf.cpp
-/src/tests/unit/basic_stream_socket.cpp
-/src/tests/unit/basic_waitable_timer.cpp
-/src/tests/unit/buffer.cpp
-/src/tests/unit/buffered_read_stream.cpp
-/src/tests/unit/buffered_stream.cpp
-/src/tests/unit/buffered_write_stream.cpp
-/src/tests/unit/buffers_iterator.cpp
-/src/tests/unit/completion_condition.cpp
-/src/tests/unit/connect.cpp
-/src/tests/unit/coroutine.cpp
-/src/tests/unit/datagram_socket_service.cpp
-/src/tests/unit/deadline_timer.cpp
-/src/tests/unit/deadline_timer_service.cpp
-/src/tests/unit/error.cpp
-/src/tests/unit/generic/
-/src/tests/unit/generic/basic_endpoint.cpp
-/src/tests/unit/generic/datagram_protocol.cpp
-/src/tests/unit/generic/raw_protocol.cpp
-/src/tests/unit/generic/seq_packet_protocol.cpp
-/src/tests/unit/generic/stream_protocol.cpp
-/src/tests/unit/high_resolution_timer.cpp
-/src/tests/unit/io_service.cpp
-/src/tests/unit/ip/
-/src/tests/unit/ip/address.cpp
-/src/tests/unit/ip/address_iterator_v4.cpp
-/src/tests/unit/ip/address_iterator_v6.cpp
-/src/tests/unit/ip/address_range_v4.cpp
-/src/tests/unit/ip/address_range_v6.cpp
-/src/tests/unit/ip/address_v4.cpp
-/src/tests/unit/ip/address_v6.cpp
-/src/tests/unit/ip/basic_endpoint.cpp
-/src/tests/unit/ip/basic_resolver.cpp
-/src/tests/unit/ip/basic_resolver_entry.cpp
-/src/tests/unit/ip/basic_resolver_iterator.cpp
-/src/tests/unit/ip/basic_resolver_query.cpp
-/src/tests/unit/ip/host_name.cpp
-/src/tests/unit/ip/icmp.cpp
-/src/tests/unit/ip/multicast.cpp
-/src/tests/unit/ip/network_v4.cpp
-/src/tests/unit/ip/network_v6.cpp
-/src/tests/unit/ip/resolver_query_base.cpp
-/src/tests/unit/ip/resolver_service.cpp
-/src/tests/unit/ip/tcp.cpp
-/src/tests/unit/ip/udp.cpp
-/src/tests/unit/ip/unicast.cpp
-/src/tests/unit/ip/v6_only.cpp
-/src/tests/unit/is_read_buffered.cpp
-/src/tests/unit/is_write_buffered.cpp
-/src/tests/unit/local/
-/src/tests/unit/local/basic_endpoint.cpp
-/src/tests/unit/local/connect_pair.cpp
-/src/tests/unit/local/datagram_protocol.cpp
-/src/tests/unit/local/stream_protocol.cpp
-/src/tests/unit/placeholders.cpp
-/src/tests/unit/posix/
-/src/tests/unit/posix/basic_descriptor.cpp
-/src/tests/unit/posix/basic_stream_descriptor.cpp
-/src/tests/unit/posix/descriptor_base.cpp
-/src/tests/unit/posix/stream_descriptor.cpp
-/src/tests/unit/posix/stream_descriptor_service.cpp
-/src/tests/unit/raw_socket_service.cpp
-/src/tests/unit/read_at.cpp
-/src/tests/unit/read.cpp
-/src/tests/unit/read_until.cpp
-/src/tests/unit/seq_packet_socket_service.cpp
-/src/tests/unit/serial_port_base.cpp
-/src/tests/unit/serial_port.cpp
-/src/tests/unit/serial_port_service.cpp
-/src/tests/unit/signal_set.cpp
-/src/tests/unit/signal_set_service.cpp
-/src/tests/unit/socket_acceptor_service.cpp
-/src/tests/unit/socket_base.cpp
-/src/tests/unit/ssl/
-/src/tests/unit/ssl/context_base.cpp
-/src/tests/unit/ssl/context.cpp
-/src/tests/unit/ssl/rfc2818_verification.cpp
-/src/tests/unit/ssl/stream_base.cpp
-/src/tests/unit/ssl/stream.cpp
-/src/tests/unit/steady_timer.cpp
-/src/tests/unit/strand.cpp
-/src/tests/unit/streambuf.cpp
-/src/tests/unit/stream_socket_service.cpp
-/src/tests/unit/system_timer.cpp
-/src/tests/unit/thread.cpp
-/src/tests/unit/time_traits.cpp
-/src/tests/unit/unit_test.cpp
-/src/tests/unit/unit_test.hpp
-/src/tests/unit/waitable_timer_service.cpp
-/src/tests/unit/wait_traits.cpp
-/src/tests/unit/windows/
-/src/tests/unit/windows/basic_handle.cpp
-/src/tests/unit/windows/basic_object_handle.cpp
-/src/tests/unit/windows/basic_random_access_handle.cpp
-/src/tests/unit/windows/basic_stream_handle.cpp
-/src/tests/unit/windows/object_handle.cpp
-/src/tests/unit/windows/object_handle_service.cpp
-/src/tests/unit/windows/overlapped_ptr.cpp
-/src/tests/unit/windows/random_access_handle.cpp
-/src/tests/unit/windows/random_access_handle_service.cpp
-/src/tests/unit/windows/stream_handle.cpp
-/src/tests/unit/windows/stream_handle_service.cpp
-/src/tests/unit/write_at.cpp
-/src/tests/unit/write.cpp
-/src/tools/
-/src/tools/handlerviz.pl
-/test-driver
diff --git a/3rdparty/asio/asio.pc.in b/3rdparty/asio/asio.pc.in
new file mode 100644
index 00000000000..b93eb673dac
--- /dev/null
+++ b/3rdparty/asio/asio.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: A cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Lflags:
+Requires:
+Requires.private:
diff --git a/3rdparty/asio/autogen.sh b/3rdparty/asio/autogen.sh
deleted file mode 100644
index 42075e32bc3..00000000000
--- a/3rdparty/asio/autogen.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-# Helps bootstrapping the application when checked out from CVS.
-# Requires GNU autoconf, GNU automake and GNU which.
-#
-# Copyright (C) 2004, by
-#
-# Carlo Wood, Run on IRC <carlo@alinoe.com>
-# RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
-# Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
-#
-
-# Do sanity checks.
-# Directory check.
-if [ ! -f autogen.sh ]; then
- echo "Run ./autogen.sh from the directory it exists in."
- exit 1
-fi
-
-AUTOMAKE=${AUTOMAKE:-automake}
-ACLOCAL=${ACLOCAL:-aclocal}
-AUTOCONF=${AUTOCONF:-autoconf}
-
-($AUTOCONF --version) >/dev/null 2>/dev/null || (echo "You need GNU autoconf to install from CVS (ftp://ftp.gnu.org/gnu/autoconf/)"; exit 1) || exit 1
-($AUTOMAKE --version) >/dev/null 2>/dev/null || (echo "You need GNU automake 1.7 or higher to install from CVS (ftp://ftp.gnu.org/gnu/automake/)"; exit 1) || exit 1
-
-# Determine the version of automake.
-automake_version=`$AUTOMAKE --version | head -n 1 | sed -e 's/[^12]*\([12]\.[0-9][^ ]*\).*/\1/'`
-automake_major=`echo $automake_version | cut -f1 -d.`
-automake_minor=`echo $automake_version | cut -f2 -d.`
-automake_version_number=`expr "$automake_major" \* 1000 \+ "$automake_minor"`
-
-# Require automake 1.7.
-if expr "1007" \> "$automake_version_number" >/dev/null; then
- $AUTOMAKE --version | head -n 1
- echo ""
- echo "Fatal error: automake 1.7 or higher is required. Please set \$AUTOMAKE"
- echo "to point to a newer automake, or upgrade."
- echo ""
- exit 1
-fi
-
-run()
-{
- echo "Running $1 ..."
- $1
-}
-
-# This is needed when someone just upgraded automake and this cache is still generated by an old version.
-rm -rf autom4te.cache config.cache
-
-run "$ACLOCAL"
-run "$AUTOCONF"
-run "$AUTOMAKE --add-missing --foreign"
-
diff --git a/3rdparty/asio/boost_asio.manifest b/3rdparty/asio/boost_asio.manifest
deleted file mode 100644
index 29b3f360c39..00000000000
--- a/3rdparty/asio/boost_asio.manifest
+++ /dev/null
@@ -1,4640 +0,0 @@
-/
-/boost/
-/boost/asio/
-/boost/asio/async_result.hpp
-/boost/asio/basic_datagram_socket.hpp
-/boost/asio/basic_deadline_timer.hpp
-/boost/asio/basic_io_object.hpp
-/boost/asio/basic_raw_socket.hpp
-/boost/asio/basic_seq_packet_socket.hpp
-/boost/asio/basic_serial_port.hpp
-/boost/asio/basic_signal_set.hpp
-/boost/asio/basic_socket_acceptor.hpp
-/boost/asio/basic_socket.hpp
-/boost/asio/basic_socket_iostream.hpp
-/boost/asio/basic_socket_streambuf.hpp
-/boost/asio/basic_streambuf_fwd.hpp
-/boost/asio/basic_streambuf.hpp
-/boost/asio/basic_stream_socket.hpp
-/boost/asio/basic_waitable_timer.hpp
-/boost/asio/buffered_read_stream_fwd.hpp
-/boost/asio/buffered_read_stream.hpp
-/boost/asio/buffered_stream_fwd.hpp
-/boost/asio/buffered_stream.hpp
-/boost/asio/buffered_write_stream_fwd.hpp
-/boost/asio/buffered_write_stream.hpp
-/boost/asio/buffer.hpp
-/boost/asio/buffers_iterator.hpp
-/boost/asio/completion_condition.hpp
-/boost/asio/connect.hpp
-/boost/asio/coroutine.hpp
-/boost/asio/datagram_socket_service.hpp
-/boost/asio/deadline_timer.hpp
-/boost/asio/deadline_timer_service.hpp
-/boost/asio/detail/
-/boost/asio/detail/addressof.hpp
-/boost/asio/detail/array_fwd.hpp
-/boost/asio/detail/array.hpp
-/boost/asio/detail/assert.hpp
-/boost/asio/detail/atomic_count.hpp
-/boost/asio/detail/base_from_completion_cond.hpp
-/boost/asio/detail/bind_handler.hpp
-/boost/asio/detail/buffered_stream_storage.hpp
-/boost/asio/detail/buffer_resize_guard.hpp
-/boost/asio/detail/buffer_sequence_adapter.hpp
-/boost/asio/detail/call_stack.hpp
-/boost/asio/detail/chrono_time_traits.hpp
-/boost/asio/detail/completion_handler.hpp
-/boost/asio/detail/config.hpp
-/boost/asio/detail/consuming_buffers.hpp
-/boost/asio/detail/cstdint.hpp
-/boost/asio/detail/date_time_fwd.hpp
-/boost/asio/detail/deadline_timer_service.hpp
-/boost/asio/detail/dependent_type.hpp
-/boost/asio/detail/descriptor_ops.hpp
-/boost/asio/detail/descriptor_read_op.hpp
-/boost/asio/detail/descriptor_write_op.hpp
-/boost/asio/detail/dev_poll_reactor.hpp
-/boost/asio/detail/epoll_reactor.hpp
-/boost/asio/detail/eventfd_select_interrupter.hpp
-/boost/asio/detail/event.hpp
-/boost/asio/detail/fd_set_adapter.hpp
-/boost/asio/detail/fenced_block.hpp
-/boost/asio/detail/function.hpp
-/boost/asio/detail/gcc_arm_fenced_block.hpp
-/boost/asio/detail/gcc_hppa_fenced_block.hpp
-/boost/asio/detail/gcc_sync_fenced_block.hpp
-/boost/asio/detail/gcc_x86_fenced_block.hpp
-/boost/asio/detail/handler_alloc_helpers.hpp
-/boost/asio/detail/handler_cont_helpers.hpp
-/boost/asio/detail/handler_invoke_helpers.hpp
-/boost/asio/detail/handler_tracking.hpp
-/boost/asio/detail/handler_type_requirements.hpp
-/boost/asio/detail/hash_map.hpp
-/boost/asio/detail/impl/
-/boost/asio/detail/impl/buffer_sequence_adapter.ipp
-/boost/asio/detail/impl/descriptor_ops.ipp
-/boost/asio/detail/impl/dev_poll_reactor.hpp
-/boost/asio/detail/impl/dev_poll_reactor.ipp
-/boost/asio/detail/impl/epoll_reactor.hpp
-/boost/asio/detail/impl/epoll_reactor.ipp
-/boost/asio/detail/impl/eventfd_select_interrupter.ipp
-/boost/asio/detail/impl/handler_tracking.ipp
-/boost/asio/detail/impl/kqueue_reactor.hpp
-/boost/asio/detail/impl/kqueue_reactor.ipp
-/boost/asio/detail/impl/pipe_select_interrupter.ipp
-/boost/asio/detail/impl/posix_event.ipp
-/boost/asio/detail/impl/posix_mutex.ipp
-/boost/asio/detail/impl/posix_thread.ipp
-/boost/asio/detail/impl/posix_tss_ptr.ipp
-/boost/asio/detail/impl/reactive_descriptor_service.ipp
-/boost/asio/detail/impl/reactive_serial_port_service.ipp
-/boost/asio/detail/impl/reactive_socket_service_base.ipp
-/boost/asio/detail/impl/resolver_service_base.ipp
-/boost/asio/detail/impl/select_reactor.hpp
-/boost/asio/detail/impl/select_reactor.ipp
-/boost/asio/detail/impl/service_registry.hpp
-/boost/asio/detail/impl/service_registry.ipp
-/boost/asio/detail/impl/signal_set_service.ipp
-/boost/asio/detail/impl/socket_ops.ipp
-/boost/asio/detail/impl/socket_select_interrupter.ipp
-/boost/asio/detail/impl/strand_service.hpp
-/boost/asio/detail/impl/strand_service.ipp
-/boost/asio/detail/impl/task_io_service.hpp
-/boost/asio/detail/impl/task_io_service.ipp
-/boost/asio/detail/impl/throw_error.ipp
-/boost/asio/detail/impl/timer_queue_ptime.ipp
-/boost/asio/detail/impl/timer_queue_set.ipp
-/boost/asio/detail/impl/win_event.ipp
-/boost/asio/detail/impl/win_iocp_handle_service.ipp
-/boost/asio/detail/impl/win_iocp_io_service.hpp
-/boost/asio/detail/impl/win_iocp_io_service.ipp
-/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
-/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
-/boost/asio/detail/impl/win_mutex.ipp
-/boost/asio/detail/impl/win_object_handle_service.ipp
-/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
-/boost/asio/detail/impl/winrt_timer_scheduler.hpp
-/boost/asio/detail/impl/winrt_timer_scheduler.ipp
-/boost/asio/detail/impl/winsock_init.ipp
-/boost/asio/detail/impl/win_static_mutex.ipp
-/boost/asio/detail/impl/win_thread.ipp
-/boost/asio/detail/impl/win_tss_ptr.ipp
-/boost/asio/detail/io_control.hpp
-/boost/asio/detail/keyword_tss_ptr.hpp
-/boost/asio/detail/kqueue_reactor.hpp
-/boost/asio/detail/limits.hpp
-/boost/asio/detail/local_free_on_block_exit.hpp
-/boost/asio/detail/macos_fenced_block.hpp
-/boost/asio/detail/mutex.hpp
-/boost/asio/detail/noncopyable.hpp
-/boost/asio/detail/null_event.hpp
-/boost/asio/detail/null_fenced_block.hpp
-/boost/asio/detail/null_mutex.hpp
-/boost/asio/detail/null_reactor.hpp
-/boost/asio/detail/null_signal_blocker.hpp
-/boost/asio/detail/null_socket_service.hpp
-/boost/asio/detail/null_static_mutex.hpp
-/boost/asio/detail/null_thread.hpp
-/boost/asio/detail/null_tss_ptr.hpp
-/boost/asio/detail/object_pool.hpp
-/boost/asio/detail/old_win_sdk_compat.hpp
-/boost/asio/detail/operation.hpp
-/boost/asio/detail/op_queue.hpp
-/boost/asio/detail/pipe_select_interrupter.hpp
-/boost/asio/detail/pop_options.hpp
-/boost/asio/detail/posix_event.hpp
-/boost/asio/detail/posix_fd_set_adapter.hpp
-/boost/asio/detail/posix_mutex.hpp
-/boost/asio/detail/posix_signal_blocker.hpp
-/boost/asio/detail/posix_static_mutex.hpp
-/boost/asio/detail/posix_thread.hpp
-/boost/asio/detail/posix_tss_ptr.hpp
-/boost/asio/detail/push_options.hpp
-/boost/asio/detail/reactive_descriptor_service.hpp
-/boost/asio/detail/reactive_null_buffers_op.hpp
-/boost/asio/detail/reactive_serial_port_service.hpp
-/boost/asio/detail/reactive_socket_accept_op.hpp
-/boost/asio/detail/reactive_socket_connect_op.hpp
-/boost/asio/detail/reactive_socket_recvfrom_op.hpp
-/boost/asio/detail/reactive_socket_recvmsg_op.hpp
-/boost/asio/detail/reactive_socket_recv_op.hpp
-/boost/asio/detail/reactive_socket_send_op.hpp
-/boost/asio/detail/reactive_socket_sendto_op.hpp
-/boost/asio/detail/reactive_socket_service_base.hpp
-/boost/asio/detail/reactive_socket_service.hpp
-/boost/asio/detail/reactor_fwd.hpp
-/boost/asio/detail/reactor.hpp
-/boost/asio/detail/reactor_op.hpp
-/boost/asio/detail/reactor_op_queue.hpp
-/boost/asio/detail/regex_fwd.hpp
-/boost/asio/detail/resolve_endpoint_op.hpp
-/boost/asio/detail/resolve_op.hpp
-/boost/asio/detail/resolver_service_base.hpp
-/boost/asio/detail/resolver_service.hpp
-/boost/asio/detail/scoped_lock.hpp
-/boost/asio/detail/scoped_ptr.hpp
-/boost/asio/detail/select_interrupter.hpp
-/boost/asio/detail/select_reactor.hpp
-/boost/asio/detail/service_registry.hpp
-/boost/asio/detail/shared_ptr.hpp
-/boost/asio/detail/signal_blocker.hpp
-/boost/asio/detail/signal_handler.hpp
-/boost/asio/detail/signal_init.hpp
-/boost/asio/detail/signal_op.hpp
-/boost/asio/detail/signal_set_service.hpp
-/boost/asio/detail/socket_holder.hpp
-/boost/asio/detail/socket_ops.hpp
-/boost/asio/detail/socket_option.hpp
-/boost/asio/detail/socket_select_interrupter.hpp
-/boost/asio/detail/socket_types.hpp
-/boost/asio/detail/solaris_fenced_block.hpp
-/boost/asio/detail/static_mutex.hpp
-/boost/asio/detail/std_event.hpp
-/boost/asio/detail/std_mutex.hpp
-/boost/asio/detail/std_static_mutex.hpp
-/boost/asio/detail/std_thread.hpp
-/boost/asio/detail/strand_service.hpp
-/boost/asio/detail/task_io_service.hpp
-/boost/asio/detail/task_io_service_operation.hpp
-/boost/asio/detail/task_io_service_thread_info.hpp
-/boost/asio/detail/thread.hpp
-/boost/asio/detail/thread_info_base.hpp
-/boost/asio/detail/throw_error.hpp
-/boost/asio/detail/throw_exception.hpp
-/boost/asio/detail/timer_queue_base.hpp
-/boost/asio/detail/timer_queue.hpp
-/boost/asio/detail/timer_queue_ptime.hpp
-/boost/asio/detail/timer_queue_set.hpp
-/boost/asio/detail/timer_scheduler_fwd.hpp
-/boost/asio/detail/timer_scheduler.hpp
-/boost/asio/detail/tss_ptr.hpp
-/boost/asio/detail/type_traits.hpp
-/boost/asio/detail/variadic_templates.hpp
-/boost/asio/detail/wait_handler.hpp
-/boost/asio/detail/wait_op.hpp
-/boost/asio/detail/weak_ptr.hpp
-/boost/asio/detail/wince_thread.hpp
-/boost/asio/detail/win_event.hpp
-/boost/asio/detail/win_fd_set_adapter.hpp
-/boost/asio/detail/win_fenced_block.hpp
-/boost/asio/detail/win_iocp_handle_read_op.hpp
-/boost/asio/detail/win_iocp_handle_service.hpp
-/boost/asio/detail/win_iocp_handle_write_op.hpp
-/boost/asio/detail/win_iocp_io_service.hpp
-/boost/asio/detail/win_iocp_null_buffers_op.hpp
-/boost/asio/detail/win_iocp_operation.hpp
-/boost/asio/detail/win_iocp_overlapped_op.hpp
-/boost/asio/detail/win_iocp_overlapped_ptr.hpp
-/boost/asio/detail/win_iocp_serial_port_service.hpp
-/boost/asio/detail/win_iocp_socket_accept_op.hpp
-/boost/asio/detail/win_iocp_socket_connect_op.hpp
-/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
-/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
-/boost/asio/detail/win_iocp_socket_recv_op.hpp
-/boost/asio/detail/win_iocp_socket_send_op.hpp
-/boost/asio/detail/win_iocp_socket_service_base.hpp
-/boost/asio/detail/win_iocp_socket_service.hpp
-/boost/asio/detail/win_iocp_thread_info.hpp
-/boost/asio/detail/win_mutex.hpp
-/boost/asio/detail/win_object_handle_service.hpp
-/boost/asio/detail/winrt_async_manager.hpp
-/boost/asio/detail/winrt_async_op.hpp
-/boost/asio/detail/winrt_resolve_op.hpp
-/boost/asio/detail/winrt_resolver_service.hpp
-/boost/asio/detail/winrt_socket_connect_op.hpp
-/boost/asio/detail/winrt_socket_recv_op.hpp
-/boost/asio/detail/winrt_socket_send_op.hpp
-/boost/asio/detail/winrt_ssocket_service_base.hpp
-/boost/asio/detail/winrt_ssocket_service.hpp
-/boost/asio/detail/winrt_timer_scheduler.hpp
-/boost/asio/detail/winrt_utils.hpp
-/boost/asio/detail/winsock_init.hpp
-/boost/asio/detail/win_static_mutex.hpp
-/boost/asio/detail/win_thread.hpp
-/boost/asio/detail/win_tss_ptr.hpp
-/boost/asio/detail/wrapped_handler.hpp
-/boost/asio/error.hpp
-/boost/asio/generic/
-/boost/asio/generic/basic_endpoint.hpp
-/boost/asio/generic/datagram_protocol.hpp
-/boost/asio/generic/detail/
-/boost/asio/generic/detail/endpoint.hpp
-/boost/asio/generic/detail/impl/
-/boost/asio/generic/detail/impl/endpoint.ipp
-/boost/asio/generic/raw_protocol.hpp
-/boost/asio/generic/seq_packet_protocol.hpp
-/boost/asio/generic/stream_protocol.hpp
-/boost/asio/handler_alloc_hook.hpp
-/boost/asio/handler_continuation_hook.hpp
-/boost/asio/handler_invoke_hook.hpp
-/boost/asio/handler_type.hpp
-/boost/asio/high_resolution_timer.hpp
-/boost/asio.hpp
-/boost/asio/impl/
-/boost/asio/impl/buffered_read_stream.hpp
-/boost/asio/impl/buffered_write_stream.hpp
-/boost/asio/impl/connect.hpp
-/boost/asio/impl/error.ipp
-/boost/asio/impl/handler_alloc_hook.ipp
-/boost/asio/impl/io_service.hpp
-/boost/asio/impl/io_service.ipp
-/boost/asio/impl/read_at.hpp
-/boost/asio/impl/read.hpp
-/boost/asio/impl/read_until.hpp
-/boost/asio/impl/serial_port_base.hpp
-/boost/asio/impl/serial_port_base.ipp
-/boost/asio/impl/spawn.hpp
-/boost/asio/impl/src.cpp
-/boost/asio/impl/src.hpp
-/boost/asio/impl/use_future.hpp
-/boost/asio/impl/write_at.hpp
-/boost/asio/impl/write.hpp
-/boost/asio/io_service.hpp
-/boost/asio/ip/
-/boost/asio/ip/address.hpp
-/boost/asio/ip/address_v4.hpp
-/boost/asio/ip/address_v6.hpp
-/boost/asio/ip/basic_endpoint.hpp
-/boost/asio/ip/basic_resolver_entry.hpp
-/boost/asio/ip/basic_resolver.hpp
-/boost/asio/ip/basic_resolver_iterator.hpp
-/boost/asio/ip/basic_resolver_query.hpp
-/boost/asio/ip/detail/
-/boost/asio/ip/detail/endpoint.hpp
-/boost/asio/ip/detail/impl/
-/boost/asio/ip/detail/impl/endpoint.ipp
-/boost/asio/ip/detail/socket_option.hpp
-/boost/asio/ip/host_name.hpp
-/boost/asio/ip/icmp.hpp
-/boost/asio/ip/impl/
-/boost/asio/ip/impl/address.hpp
-/boost/asio/ip/impl/address.ipp
-/boost/asio/ip/impl/address_v4.hpp
-/boost/asio/ip/impl/address_v4.ipp
-/boost/asio/ip/impl/address_v6.hpp
-/boost/asio/ip/impl/address_v6.ipp
-/boost/asio/ip/impl/basic_endpoint.hpp
-/boost/asio/ip/impl/host_name.ipp
-/boost/asio/ip/multicast.hpp
-/boost/asio/ip/resolver_query_base.hpp
-/boost/asio/ip/resolver_service.hpp
-/boost/asio/ip/tcp.hpp
-/boost/asio/ip/udp.hpp
-/boost/asio/ip/unicast.hpp
-/boost/asio/ip/v6_only.hpp
-/boost/asio/is_read_buffered.hpp
-/boost/asio/is_write_buffered.hpp
-/boost/asio/local/
-/boost/asio/local/basic_endpoint.hpp
-/boost/asio/local/connect_pair.hpp
-/boost/asio/local/datagram_protocol.hpp
-/boost/asio/local/detail/
-/boost/asio/local/detail/endpoint.hpp
-/boost/asio/local/detail/impl/
-/boost/asio/local/detail/impl/endpoint.ipp
-/boost/asio/local/stream_protocol.hpp
-/boost/asio/placeholders.hpp
-/boost/asio/posix/
-/boost/asio/posix/basic_descriptor.hpp
-/boost/asio/posix/basic_stream_descriptor.hpp
-/boost/asio/posix/descriptor_base.hpp
-/boost/asio/posix/stream_descriptor.hpp
-/boost/asio/posix/stream_descriptor_service.hpp
-/boost/asio/raw_socket_service.hpp
-/boost/asio/read_at.hpp
-/boost/asio/read.hpp
-/boost/asio/read_until.hpp
-/boost/asio/seq_packet_socket_service.hpp
-/boost/asio/serial_port_base.hpp
-/boost/asio/serial_port.hpp
-/boost/asio/serial_port_service.hpp
-/boost/asio/signal_set.hpp
-/boost/asio/signal_set_service.hpp
-/boost/asio/socket_acceptor_service.hpp
-/boost/asio/socket_base.hpp
-/boost/asio/spawn.hpp
-/boost/asio/ssl/
-/boost/asio/ssl/basic_context.hpp
-/boost/asio/ssl/context_base.hpp
-/boost/asio/ssl/context.hpp
-/boost/asio/ssl/context_service.hpp
-/boost/asio/ssl/detail/
-/boost/asio/ssl/detail/buffered_handshake_op.hpp
-/boost/asio/ssl/detail/engine.hpp
-/boost/asio/ssl/detail/handshake_op.hpp
-/boost/asio/ssl/detail/impl/
-/boost/asio/ssl/detail/impl/engine.ipp
-/boost/asio/ssl/detail/impl/openssl_init.ipp
-/boost/asio/ssl/detail/io.hpp
-/boost/asio/ssl/detail/openssl_init.hpp
-/boost/asio/ssl/detail/openssl_types.hpp
-/boost/asio/ssl/detail/password_callback.hpp
-/boost/asio/ssl/detail/read_op.hpp
-/boost/asio/ssl/detail/shutdown_op.hpp
-/boost/asio/ssl/detail/stream_core.hpp
-/boost/asio/ssl/detail/verify_callback.hpp
-/boost/asio/ssl/detail/write_op.hpp
-/boost/asio/ssl/error.hpp
-/boost/asio/ssl.hpp
-/boost/asio/ssl/impl/
-/boost/asio/ssl/impl/context.hpp
-/boost/asio/ssl/impl/context.ipp
-/boost/asio/ssl/impl/error.ipp
-/boost/asio/ssl/impl/rfc2818_verification.ipp
-/boost/asio/ssl/impl/src.hpp
-/boost/asio/ssl/old/
-/boost/asio/ssl/old/basic_context.hpp
-/boost/asio/ssl/old/context_service.hpp
-/boost/asio/ssl/old/detail/
-/boost/asio/ssl/old/detail/openssl_context_service.hpp
-/boost/asio/ssl/old/detail/openssl_operation.hpp
-/boost/asio/ssl/old/detail/openssl_stream_service.hpp
-/boost/asio/ssl/old/stream.hpp
-/boost/asio/ssl/old/stream_service.hpp
-/boost/asio/ssl/rfc2818_verification.hpp
-/boost/asio/ssl/stream_base.hpp
-/boost/asio/ssl/stream.hpp
-/boost/asio/ssl/stream_service.hpp
-/boost/asio/ssl/verify_context.hpp
-/boost/asio/ssl/verify_mode.hpp
-/boost/asio/steady_timer.hpp
-/boost/asio/strand.hpp
-/boost/asio/streambuf.hpp
-/boost/asio/stream_socket_service.hpp
-/boost/asio/system_timer.hpp
-/boost/asio/time_traits.hpp
-/boost/asio/unyield.hpp
-/boost/asio/use_future.hpp
-/boost/asio/version.hpp
-/boost/asio/waitable_timer_service.hpp
-/boost/asio/wait_traits.hpp
-/boost/asio/windows/
-/boost/asio/windows/basic_handle.hpp
-/boost/asio/windows/basic_object_handle.hpp
-/boost/asio/windows/basic_random_access_handle.hpp
-/boost/asio/windows/basic_stream_handle.hpp
-/boost/asio/windows/object_handle.hpp
-/boost/asio/windows/object_handle_service.hpp
-/boost/asio/windows/overlapped_ptr.hpp
-/boost/asio/windows/random_access_handle.hpp
-/boost/asio/windows/random_access_handle_service.hpp
-/boost/asio/windows/stream_handle.hpp
-/boost/asio/windows/stream_handle_service.hpp
-/boost/asio/write_at.hpp
-/boost/asio/write.hpp
-/boost/asio/yield.hpp
-/boost/cerrno.hpp
-/boost/config/
-/boost/config/warning_disable.hpp
-/boost/system/
-/boost/system/api_config.hpp
-/boost/system/config.hpp
-/boost/system/cygwin_error.hpp
-/boost/system/detail/
-/boost/system/detail/error_code.ipp
-/boost/system/detail/local_free_on_destruction.hpp
-/boost/system/error_code.hpp
-/boost/system/linux_error.hpp
-/boost/system/system_error.hpp
-/boost/system/windows_error.hpp
-/doc/
-/doc/html/
-/doc/html/boost_asio/
-/doc/html/boost_asio/async_op1.png
-/doc/html/boost_asio/async_op2.png
-/doc/html/boost_asio/example/
-/doc/html/boost_asio/example/cpp03/
-/doc/html/boost_asio/example/cpp03/allocation/
-/doc/html/boost_asio/example/cpp03/allocation/server.cpp
-/doc/html/boost_asio/example/cpp03/buffers/
-/doc/html/boost_asio/example/cpp03/buffers/reference_counted.cpp
-/doc/html/boost_asio/example/cpp03/chat/
-/doc/html/boost_asio/example/cpp03/chat/chat_client.cpp
-/doc/html/boost_asio/example/cpp03/chat/chat_message.hpp
-/doc/html/boost_asio/example/cpp03/chat/chat_server.cpp
-/doc/html/boost_asio/example/cpp03/chat/posix_chat_client.cpp
-/doc/html/boost_asio/example/cpp03/echo/
-/doc/html/boost_asio/example/cpp03/echo/async_tcp_echo_server.cpp
-/doc/html/boost_asio/example/cpp03/echo/async_udp_echo_server.cpp
-/doc/html/boost_asio/example/cpp03/echo/blocking_tcp_echo_client.cpp
-/doc/html/boost_asio/example/cpp03/echo/blocking_tcp_echo_server.cpp
-/doc/html/boost_asio/example/cpp03/echo/blocking_udp_echo_client.cpp
-/doc/html/boost_asio/example/cpp03/echo/blocking_udp_echo_server.cpp
-/doc/html/boost_asio/example/cpp03/fork/
-/doc/html/boost_asio/example/cpp03/fork/daemon.cpp
-/doc/html/boost_asio/example/cpp03/fork/process_per_connection.cpp
-/doc/html/boost_asio/example/cpp03/http/
-/doc/html/boost_asio/example/cpp03/http/client/
-/doc/html/boost_asio/example/cpp03/http/client/async_client.cpp
-/doc/html/boost_asio/example/cpp03/http/client/sync_client.cpp
-/doc/html/boost_asio/example/cpp03/http/server/
-/doc/html/boost_asio/example/cpp03/http/server2/
-/doc/html/boost_asio/example/cpp03/http/server2/connection.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/connection.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/header.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/io_service_pool.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/io_service_pool.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/main.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/mime_types.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/mime_types.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/reply.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/reply.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/request_handler.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/request_handler.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/request.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/request_parser.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/request_parser.hpp
-/doc/html/boost_asio/example/cpp03/http/server2/server.cpp
-/doc/html/boost_asio/example/cpp03/http/server2/server.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/
-/doc/html/boost_asio/example/cpp03/http/server3/connection.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/connection.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/header.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/main.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/mime_types.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/mime_types.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/reply.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/reply.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/request_handler.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/request_handler.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/request.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/request_parser.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/request_parser.hpp
-/doc/html/boost_asio/example/cpp03/http/server3/server.cpp
-/doc/html/boost_asio/example/cpp03/http/server3/server.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/
-/doc/html/boost_asio/example/cpp03/http/server4/file_handler.cpp
-/doc/html/boost_asio/example/cpp03/http/server4/file_handler.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/header.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/main.cpp
-/doc/html/boost_asio/example/cpp03/http/server4/mime_types.cpp
-/doc/html/boost_asio/example/cpp03/http/server4/mime_types.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/reply.cpp
-/doc/html/boost_asio/example/cpp03/http/server4/reply.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/request.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/request_parser.cpp
-/doc/html/boost_asio/example/cpp03/http/server4/request_parser.hpp
-/doc/html/boost_asio/example/cpp03/http/server4/server.cpp
-/doc/html/boost_asio/example/cpp03/http/server4/server.hpp
-/doc/html/boost_asio/example/cpp03/http/server/connection.cpp
-/doc/html/boost_asio/example/cpp03/http/server/connection.hpp
-/doc/html/boost_asio/example/cpp03/http/server/connection_manager.cpp
-/doc/html/boost_asio/example/cpp03/http/server/connection_manager.hpp
-/doc/html/boost_asio/example/cpp03/http/server/header.hpp
-/doc/html/boost_asio/example/cpp03/http/server/main.cpp
-/doc/html/boost_asio/example/cpp03/http/server/mime_types.cpp
-/doc/html/boost_asio/example/cpp03/http/server/mime_types.hpp
-/doc/html/boost_asio/example/cpp03/http/server/reply.cpp
-/doc/html/boost_asio/example/cpp03/http/server/reply.hpp
-/doc/html/boost_asio/example/cpp03/http/server/request_handler.cpp
-/doc/html/boost_asio/example/cpp03/http/server/request_handler.hpp
-/doc/html/boost_asio/example/cpp03/http/server/request.hpp
-/doc/html/boost_asio/example/cpp03/http/server/request_parser.cpp
-/doc/html/boost_asio/example/cpp03/http/server/request_parser.hpp
-/doc/html/boost_asio/example/cpp03/http/server/server.cpp
-/doc/html/boost_asio/example/cpp03/http/server/server.hpp
-/doc/html/boost_asio/example/cpp03/icmp/
-/doc/html/boost_asio/example/cpp03/icmp/icmp_header.hpp
-/doc/html/boost_asio/example/cpp03/icmp/ipv4_header.hpp
-/doc/html/boost_asio/example/cpp03/icmp/ping.cpp
-/doc/html/boost_asio/example/cpp03/invocation/
-/doc/html/boost_asio/example/cpp03/invocation/prioritised_handlers.cpp
-/doc/html/boost_asio/example/cpp03/iostreams/
-/doc/html/boost_asio/example/cpp03/iostreams/daytime_client.cpp
-/doc/html/boost_asio/example/cpp03/iostreams/daytime_server.cpp
-/doc/html/boost_asio/example/cpp03/iostreams/http_client.cpp
-/doc/html/boost_asio/example/cpp03/local/
-/doc/html/boost_asio/example/cpp03/local/connect_pair.cpp
-/doc/html/boost_asio/example/cpp03/local/iostream_client.cpp
-/doc/html/boost_asio/example/cpp03/local/stream_client.cpp
-/doc/html/boost_asio/example/cpp03/local/stream_server.cpp
-/doc/html/boost_asio/example/cpp03/multicast/
-/doc/html/boost_asio/example/cpp03/multicast/receiver.cpp
-/doc/html/boost_asio/example/cpp03/multicast/sender.cpp
-/doc/html/boost_asio/example/cpp03/nonblocking/
-/doc/html/boost_asio/example/cpp03/nonblocking/third_party_lib.cpp
-/doc/html/boost_asio/example/cpp03/porthopper/
-/doc/html/boost_asio/example/cpp03/porthopper/client.cpp
-/doc/html/boost_asio/example/cpp03/porthopper/protocol.hpp
-/doc/html/boost_asio/example/cpp03/porthopper/server.cpp
-/doc/html/boost_asio/example/cpp03/serialization/
-/doc/html/boost_asio/example/cpp03/serialization/client.cpp
-/doc/html/boost_asio/example/cpp03/serialization/connection.hpp
-/doc/html/boost_asio/example/cpp03/serialization/server.cpp
-/doc/html/boost_asio/example/cpp03/serialization/stock.hpp
-/doc/html/boost_asio/example/cpp03/services/
-/doc/html/boost_asio/example/cpp03/services/basic_logger.hpp
-/doc/html/boost_asio/example/cpp03/services/daytime_client.cpp
-/doc/html/boost_asio/example/cpp03/services/logger.hpp
-/doc/html/boost_asio/example/cpp03/services/logger_service.cpp
-/doc/html/boost_asio/example/cpp03/services/logger_service.hpp
-/doc/html/boost_asio/example/cpp03/services/stream_socket_service.hpp
-/doc/html/boost_asio/example/cpp03/socks4/
-/doc/html/boost_asio/example/cpp03/socks4/socks4.hpp
-/doc/html/boost_asio/example/cpp03/socks4/sync_client.cpp
-/doc/html/boost_asio/example/cpp03/spawn/
-/doc/html/boost_asio/example/cpp03/spawn/echo_server.cpp
-/doc/html/boost_asio/example/cpp03/ssl/
-/doc/html/boost_asio/example/cpp03/ssl/client.cpp
-/doc/html/boost_asio/example/cpp03/ssl/server.cpp
-/doc/html/boost_asio/example/cpp03/timeouts/
-/doc/html/boost_asio/example/cpp03/timeouts/async_tcp_client.cpp
-/doc/html/boost_asio/example/cpp03/timeouts/blocking_tcp_client.cpp
-/doc/html/boost_asio/example/cpp03/timeouts/blocking_udp_client.cpp
-/doc/html/boost_asio/example/cpp03/timeouts/server.cpp
-/doc/html/boost_asio/example/cpp03/timers/
-/doc/html/boost_asio/example/cpp03/timers/tick_count_timer.cpp
-/doc/html/boost_asio/example/cpp03/timers/time_t_timer.cpp
-/doc/html/boost_asio/example/cpp03/windows/
-/doc/html/boost_asio/example/cpp03/windows/transmit_file.cpp
-/doc/html/boost_asio/example/cpp11/
-/doc/html/boost_asio/example/cpp11/allocation/
-/doc/html/boost_asio/example/cpp11/allocation/server.cpp
-/doc/html/boost_asio/example/cpp11/buffers/
-/doc/html/boost_asio/example/cpp11/buffers/reference_counted.cpp
-/doc/html/boost_asio/example/cpp11/chat/
-/doc/html/boost_asio/example/cpp11/chat/chat_client.cpp
-/doc/html/boost_asio/example/cpp11/chat/chat_message.hpp
-/doc/html/boost_asio/example/cpp11/chat/chat_server.cpp
-/doc/html/boost_asio/example/cpp11/echo/
-/doc/html/boost_asio/example/cpp11/echo/async_tcp_echo_server.cpp
-/doc/html/boost_asio/example/cpp11/echo/async_udp_echo_server.cpp
-/doc/html/boost_asio/example/cpp11/echo/blocking_tcp_echo_client.cpp
-/doc/html/boost_asio/example/cpp11/echo/blocking_tcp_echo_server.cpp
-/doc/html/boost_asio/example/cpp11/echo/blocking_udp_echo_client.cpp
-/doc/html/boost_asio/example/cpp11/echo/blocking_udp_echo_server.cpp
-/doc/html/boost_asio/example/cpp11/futures/
-/doc/html/boost_asio/example/cpp11/futures/daytime_client.cpp
-/doc/html/boost_asio/example/cpp11/http/
-/doc/html/boost_asio/example/cpp11/http/server/
-/doc/html/boost_asio/example/cpp11/http/server/connection.cpp
-/doc/html/boost_asio/example/cpp11/http/server/connection.hpp
-/doc/html/boost_asio/example/cpp11/http/server/connection_manager.cpp
-/doc/html/boost_asio/example/cpp11/http/server/connection_manager.hpp
-/doc/html/boost_asio/example/cpp11/http/server/header.hpp
-/doc/html/boost_asio/example/cpp11/http/server/main.cpp
-/doc/html/boost_asio/example/cpp11/http/server/mime_types.cpp
-/doc/html/boost_asio/example/cpp11/http/server/mime_types.hpp
-/doc/html/boost_asio/example/cpp11/http/server/reply.cpp
-/doc/html/boost_asio/example/cpp11/http/server/reply.hpp
-/doc/html/boost_asio/example/cpp11/http/server/request_handler.cpp
-/doc/html/boost_asio/example/cpp11/http/server/request_handler.hpp
-/doc/html/boost_asio/example/cpp11/http/server/request.hpp
-/doc/html/boost_asio/example/cpp11/http/server/request_parser.cpp
-/doc/html/boost_asio/example/cpp11/http/server/request_parser.hpp
-/doc/html/boost_asio/example/cpp11/http/server/server.cpp
-/doc/html/boost_asio/example/cpp11/http/server/server.hpp
-/doc/html/boost_asio/example/cpp11/spawn/
-/doc/html/boost_asio/example/cpp11/spawn/echo_server.cpp
-/doc/html/boost_asio/examples/
-/doc/html/boost_asio/examples/cpp03_examples.html
-/doc/html/boost_asio/examples/cpp11_examples.html
-/doc/html/boost_asio/examples.html
-/doc/html/boost_asio/history.html
-/doc/html/boost_asio.html
-/doc/html/boost_asio/index.html
-/doc/html/boost_asio/overview/
-/doc/html/boost_asio/overview/core/
-/doc/html/boost_asio/overview/core/allocation.html
-/doc/html/boost_asio/overview/core/async.html
-/doc/html/boost_asio/overview/core/basics.html
-/doc/html/boost_asio/overview/core/buffers.html
-/doc/html/boost_asio/overview/core/coroutine.html
-/doc/html/boost_asio/overview/core/handler_tracking.html
-/doc/html/boost_asio/overview/core.html
-/doc/html/boost_asio/overview/core/line_based.html
-/doc/html/boost_asio/overview/core/reactor.html
-/doc/html/boost_asio/overview/core/spawn.html
-/doc/html/boost_asio/overview/core/strands.html
-/doc/html/boost_asio/overview/core/streams.html
-/doc/html/boost_asio/overview/core/threads.html
-/doc/html/boost_asio/overview/cpp2011/
-/doc/html/boost_asio/overview/cpp2011/array.html
-/doc/html/boost_asio/overview/cpp2011/atomic.html
-/doc/html/boost_asio/overview/cpp2011/chrono.html
-/doc/html/boost_asio/overview/cpp2011/futures.html
-/doc/html/boost_asio/overview/cpp2011.html
-/doc/html/boost_asio/overview/cpp2011/move_handlers.html
-/doc/html/boost_asio/overview/cpp2011/move_objects.html
-/doc/html/boost_asio/overview/cpp2011/shared_ptr.html
-/doc/html/boost_asio/overview/cpp2011/variadic.html
-/doc/html/boost_asio/overview.html
-/doc/html/boost_asio/overview/implementation.html
-/doc/html/boost_asio/overview/networking/
-/doc/html/boost_asio/overview/networking/bsd_sockets.html
-/doc/html/boost_asio/overview/networking.html
-/doc/html/boost_asio/overview/networking/iostreams.html
-/doc/html/boost_asio/overview/networking/other_protocols.html
-/doc/html/boost_asio/overview/networking/protocols.html
-/doc/html/boost_asio/overview/posix/
-/doc/html/boost_asio/overview/posix/fork.html
-/doc/html/boost_asio/overview/posix.html
-/doc/html/boost_asio/overview/posix/local.html
-/doc/html/boost_asio/overview/posix/stream_descriptor.html
-/doc/html/boost_asio/overview/rationale.html
-/doc/html/boost_asio/overview/serial_ports.html
-/doc/html/boost_asio/overview/signals.html
-/doc/html/boost_asio/overview/ssl.html
-/doc/html/boost_asio/overview/timers.html
-/doc/html/boost_asio/overview/windows/
-/doc/html/boost_asio/overview/windows.html
-/doc/html/boost_asio/overview/windows/object_handle.html
-/doc/html/boost_asio/overview/windows/random_access_handle.html
-/doc/html/boost_asio/overview/windows/stream_handle.html
-/doc/html/boost_asio/proactor.png
-/doc/html/boost_asio/reference/
-/doc/html/boost_asio/reference/AcceptHandler.html
-/doc/html/boost_asio/reference/add_service.html
-/doc/html/boost_asio/reference/asio_handler_allocate.html
-/doc/html/boost_asio/reference/asio_handler_deallocate.html
-/doc/html/boost_asio/reference/asio_handler_invoke/
-/doc/html/boost_asio/reference/asio_handler_invoke.html
-/doc/html/boost_asio/reference/asio_handler_invoke/overload1.html
-/doc/html/boost_asio/reference/asio_handler_invoke/overload2.html
-/doc/html/boost_asio/reference/asio_handler_is_continuation.html
-/doc/html/boost_asio/reference/async_connect/
-/doc/html/boost_asio/reference/async_connect.html
-/doc/html/boost_asio/reference/async_connect/overload1.html
-/doc/html/boost_asio/reference/async_connect/overload2.html
-/doc/html/boost_asio/reference/async_connect/overload3.html
-/doc/html/boost_asio/reference/async_connect/overload4.html
-/doc/html/boost_asio/reference/asynchronous_operations.html
-/doc/html/boost_asio/reference/AsyncRandomAccessReadDevice.html
-/doc/html/boost_asio/reference/AsyncRandomAccessWriteDevice.html
-/doc/html/boost_asio/reference/async_read/
-/doc/html/boost_asio/reference/async_read_at/
-/doc/html/boost_asio/reference/async_read_at.html
-/doc/html/boost_asio/reference/async_read_at/overload1.html
-/doc/html/boost_asio/reference/async_read_at/overload2.html
-/doc/html/boost_asio/reference/async_read_at/overload3.html
-/doc/html/boost_asio/reference/async_read_at/overload4.html
-/doc/html/boost_asio/reference/async_read.html
-/doc/html/boost_asio/reference/async_read/overload1.html
-/doc/html/boost_asio/reference/async_read/overload2.html
-/doc/html/boost_asio/reference/async_read/overload3.html
-/doc/html/boost_asio/reference/async_read/overload4.html
-/doc/html/boost_asio/reference/AsyncReadStream.html
-/doc/html/boost_asio/reference/async_read_until/
-/doc/html/boost_asio/reference/async_read_until.html
-/doc/html/boost_asio/reference/async_read_until/overload1.html
-/doc/html/boost_asio/reference/async_read_until/overload2.html
-/doc/html/boost_asio/reference/async_read_until/overload3.html
-/doc/html/boost_asio/reference/async_read_until/overload4.html
-/doc/html/boost_asio/reference/async_result/
-/doc/html/boost_asio/reference/async_result/async_result.html
-/doc/html/boost_asio/reference/async_result/get.html
-/doc/html/boost_asio/reference/async_result.html
-/doc/html/boost_asio/reference/async_result/type.html
-/doc/html/boost_asio/reference/async_write/
-/doc/html/boost_asio/reference/async_write_at/
-/doc/html/boost_asio/reference/async_write_at.html
-/doc/html/boost_asio/reference/async_write_at/overload1.html
-/doc/html/boost_asio/reference/async_write_at/overload2.html
-/doc/html/boost_asio/reference/async_write_at/overload3.html
-/doc/html/boost_asio/reference/async_write_at/overload4.html
-/doc/html/boost_asio/reference/async_write.html
-/doc/html/boost_asio/reference/async_write/overload1.html
-/doc/html/boost_asio/reference/async_write/overload2.html
-/doc/html/boost_asio/reference/async_write/overload3.html
-/doc/html/boost_asio/reference/async_write/overload4.html
-/doc/html/boost_asio/reference/AsyncWriteStream.html
-/doc/html/boost_asio/reference/basic_datagram_socket/
-/doc/html/boost_asio/reference/basic_datagram_socket/assign/
-/doc/html/boost_asio/reference/basic_datagram_socket/assign.html
-/doc/html/boost_asio/reference/basic_datagram_socket/assign/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/assign/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_connect.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive/
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive_from/
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive_from.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive_from/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive_from/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_receive/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send/
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send_to/
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send_to.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send_to/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/async_send_to/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/at_mark/
-/doc/html/boost_asio/reference/basic_datagram_socket/at_mark.html
-/doc/html/boost_asio/reference/basic_datagram_socket/at_mark/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/at_mark/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/available/
-/doc/html/boost_asio/reference/basic_datagram_socket/available.html
-/doc/html/boost_asio/reference/basic_datagram_socket/available/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/available/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/overload4.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/overload5.html
-/doc/html/boost_asio/reference/basic_datagram_socket/basic_datagram_socket/overload6.html
-/doc/html/boost_asio/reference/basic_datagram_socket/bind/
-/doc/html/boost_asio/reference/basic_datagram_socket/bind.html
-/doc/html/boost_asio/reference/basic_datagram_socket/bind/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/bind/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/broadcast.html
-/doc/html/boost_asio/reference/basic_datagram_socket/bytes_readable.html
-/doc/html/boost_asio/reference/basic_datagram_socket/cancel/
-/doc/html/boost_asio/reference/basic_datagram_socket/cancel.html
-/doc/html/boost_asio/reference/basic_datagram_socket/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/close/
-/doc/html/boost_asio/reference/basic_datagram_socket/close.html
-/doc/html/boost_asio/reference/basic_datagram_socket/close/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/close/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/connect/
-/doc/html/boost_asio/reference/basic_datagram_socket/connect.html
-/doc/html/boost_asio/reference/basic_datagram_socket/connect/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/connect/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/debug.html
-/doc/html/boost_asio/reference/basic_datagram_socket/do_not_route.html
-/doc/html/boost_asio/reference/basic_datagram_socket/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_datagram_socket/endpoint_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_implementation/
-/doc/html/boost_asio/reference/basic_datagram_socket/get_implementation.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_io_service.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_option/
-/doc/html/boost_asio/reference/basic_datagram_socket/get_option.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_service/
-/doc/html/boost_asio/reference/basic_datagram_socket/get_service.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket.html
-/doc/html/boost_asio/reference/basic_datagram_socket/implementation.html
-/doc/html/boost_asio/reference/basic_datagram_socket/implementation_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/io_control/
-/doc/html/boost_asio/reference/basic_datagram_socket/io_control.html
-/doc/html/boost_asio/reference/basic_datagram_socket/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/is_open.html
-/doc/html/boost_asio/reference/basic_datagram_socket/keep_alive.html
-/doc/html/boost_asio/reference/basic_datagram_socket/linger.html
-/doc/html/boost_asio/reference/basic_datagram_socket/local_endpoint/
-/doc/html/boost_asio/reference/basic_datagram_socket/local_endpoint.html
-/doc/html/boost_asio/reference/basic_datagram_socket/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/lowest_layer/
-/doc/html/boost_asio/reference/basic_datagram_socket/lowest_layer.html
-/doc/html/boost_asio/reference/basic_datagram_socket/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/max_connections.html
-/doc/html/boost_asio/reference/basic_datagram_socket/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_datagram_socket/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_datagram_socket/message_flags.html
-/doc/html/boost_asio/reference/basic_datagram_socket/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_datagram_socket/message_peek.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_handle.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_handle_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_non_blocking/
-/doc/html/boost_asio/reference/basic_datagram_socket/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/native_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/non_blocking/
-/doc/html/boost_asio/reference/basic_datagram_socket/non_blocking.html
-/doc/html/boost_asio/reference/basic_datagram_socket/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_datagram_socket/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/open/
-/doc/html/boost_asio/reference/basic_datagram_socket/open.html
-/doc/html/boost_asio/reference/basic_datagram_socket/open/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/open/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/operator_eq_/
-/doc/html/boost_asio/reference/basic_datagram_socket/operator_eq_.html
-/doc/html/boost_asio/reference/basic_datagram_socket/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/protocol_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive/
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_from/
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_from.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_from/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_from/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_from/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/receive/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/remote_endpoint/
-/doc/html/boost_asio/reference/basic_datagram_socket/remote_endpoint.html
-/doc/html/boost_asio/reference/basic_datagram_socket/remote_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/remote_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/reuse_address.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send/
-/doc/html/boost_asio/reference/basic_datagram_socket/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send_to/
-/doc/html/boost_asio/reference/basic_datagram_socket/send_to.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send_to/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send_to/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/send_to/overload3.html
-/doc/html/boost_asio/reference/basic_datagram_socket/service.html
-/doc/html/boost_asio/reference/basic_datagram_socket/service_type.html
-/doc/html/boost_asio/reference/basic_datagram_socket/set_option/
-/doc/html/boost_asio/reference/basic_datagram_socket/set_option.html
-/doc/html/boost_asio/reference/basic_datagram_socket/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/shutdown/
-/doc/html/boost_asio/reference/basic_datagram_socket/shutdown.html
-/doc/html/boost_asio/reference/basic_datagram_socket/shutdown/overload1.html
-/doc/html/boost_asio/reference/basic_datagram_socket/shutdown/overload2.html
-/doc/html/boost_asio/reference/basic_datagram_socket/shutdown_type.html
-/doc/html/boost_asio/reference/basic_deadline_timer/
-/doc/html/boost_asio/reference/basic_deadline_timer/async_wait.html
-/doc/html/boost_asio/reference/basic_deadline_timer/basic_deadline_timer/
-/doc/html/boost_asio/reference/basic_deadline_timer/basic_deadline_timer.html
-/doc/html/boost_asio/reference/basic_deadline_timer/basic_deadline_timer/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/basic_deadline_timer/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer/basic_deadline_timer/overload3.html
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel/
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel.html
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel_one/
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel_one.html
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel_one/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel_one/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer/duration_type.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_at/
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_at.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_at/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_at/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_at/overload3.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_from_now/
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_from_now.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_from_now/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_from_now/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer/expires_from_now/overload3.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_implementation/
-/doc/html/boost_asio/reference/basic_deadline_timer/get_implementation.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_io_service.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_service/
-/doc/html/boost_asio/reference/basic_deadline_timer/get_service.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_deadline_timer.html
-/doc/html/boost_asio/reference/basic_deadline_timer/implementation.html
-/doc/html/boost_asio/reference/basic_deadline_timer/implementation_type.html
-/doc/html/boost_asio/reference/basic_deadline_timer/service.html
-/doc/html/boost_asio/reference/basic_deadline_timer/service_type.html
-/doc/html/boost_asio/reference/basic_deadline_timer/time_type.html
-/doc/html/boost_asio/reference/basic_deadline_timer/traits_type.html
-/doc/html/boost_asio/reference/basic_deadline_timer/wait/
-/doc/html/boost_asio/reference/basic_deadline_timer/wait.html
-/doc/html/boost_asio/reference/basic_deadline_timer/wait/overload1.html
-/doc/html/boost_asio/reference/basic_deadline_timer/wait/overload2.html
-/doc/html/boost_asio/reference/basic_io_object/
-/doc/html/boost_asio/reference/basic_io_object/basic_io_object/
-/doc/html/boost_asio/reference/basic_io_object/_basic_io_object.html
-/doc/html/boost_asio/reference/basic_io_object/basic_io_object.html
-/doc/html/boost_asio/reference/basic_io_object/basic_io_object/overload1.html
-/doc/html/boost_asio/reference/basic_io_object/basic_io_object/overload2.html
-/doc/html/boost_asio/reference/basic_io_object/get_implementation/
-/doc/html/boost_asio/reference/basic_io_object/get_implementation.html
-/doc/html/boost_asio/reference/basic_io_object/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_io_object/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_io_object/get_io_service.html
-/doc/html/boost_asio/reference/basic_io_object/get_service/
-/doc/html/boost_asio/reference/basic_io_object/get_service.html
-/doc/html/boost_asio/reference/basic_io_object/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_io_object/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_io_object.html
-/doc/html/boost_asio/reference/basic_io_object/implementation.html
-/doc/html/boost_asio/reference/basic_io_object/implementation_type.html
-/doc/html/boost_asio/reference/basic_io_object/operator_eq_.html
-/doc/html/boost_asio/reference/basic_io_object/service.html
-/doc/html/boost_asio/reference/basic_io_object/service_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/
-/doc/html/boost_asio/reference/basic_raw_socket/assign/
-/doc/html/boost_asio/reference/basic_raw_socket/assign.html
-/doc/html/boost_asio/reference/basic_raw_socket/assign/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/assign/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_connect.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive/
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive_from/
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive_from.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive_from/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive_from/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_receive/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_send/
-/doc/html/boost_asio/reference/basic_raw_socket/async_send.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_send/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_send/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_send_to/
-/doc/html/boost_asio/reference/basic_raw_socket/async_send_to.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_send_to/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/async_send_to/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/at_mark/
-/doc/html/boost_asio/reference/basic_raw_socket/at_mark.html
-/doc/html/boost_asio/reference/basic_raw_socket/at_mark/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/at_mark/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/available/
-/doc/html/boost_asio/reference/basic_raw_socket/available.html
-/doc/html/boost_asio/reference/basic_raw_socket/available/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/available/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/overload4.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/overload5.html
-/doc/html/boost_asio/reference/basic_raw_socket/basic_raw_socket/overload6.html
-/doc/html/boost_asio/reference/basic_raw_socket/bind/
-/doc/html/boost_asio/reference/basic_raw_socket/bind.html
-/doc/html/boost_asio/reference/basic_raw_socket/bind/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/bind/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/broadcast.html
-/doc/html/boost_asio/reference/basic_raw_socket/bytes_readable.html
-/doc/html/boost_asio/reference/basic_raw_socket/cancel/
-/doc/html/boost_asio/reference/basic_raw_socket/cancel.html
-/doc/html/boost_asio/reference/basic_raw_socket/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/close/
-/doc/html/boost_asio/reference/basic_raw_socket/close.html
-/doc/html/boost_asio/reference/basic_raw_socket/close/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/close/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/connect/
-/doc/html/boost_asio/reference/basic_raw_socket/connect.html
-/doc/html/boost_asio/reference/basic_raw_socket/connect/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/connect/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/debug.html
-/doc/html/boost_asio/reference/basic_raw_socket/do_not_route.html
-/doc/html/boost_asio/reference/basic_raw_socket/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_raw_socket/endpoint_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_implementation/
-/doc/html/boost_asio/reference/basic_raw_socket/get_implementation.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_io_service.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_option/
-/doc/html/boost_asio/reference/basic_raw_socket/get_option.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_service/
-/doc/html/boost_asio/reference/basic_raw_socket/get_service.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket.html
-/doc/html/boost_asio/reference/basic_raw_socket/implementation.html
-/doc/html/boost_asio/reference/basic_raw_socket/implementation_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/io_control/
-/doc/html/boost_asio/reference/basic_raw_socket/io_control.html
-/doc/html/boost_asio/reference/basic_raw_socket/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/is_open.html
-/doc/html/boost_asio/reference/basic_raw_socket/keep_alive.html
-/doc/html/boost_asio/reference/basic_raw_socket/linger.html
-/doc/html/boost_asio/reference/basic_raw_socket/local_endpoint/
-/doc/html/boost_asio/reference/basic_raw_socket/local_endpoint.html
-/doc/html/boost_asio/reference/basic_raw_socket/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/lowest_layer/
-/doc/html/boost_asio/reference/basic_raw_socket/lowest_layer.html
-/doc/html/boost_asio/reference/basic_raw_socket/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/max_connections.html
-/doc/html/boost_asio/reference/basic_raw_socket/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_raw_socket/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_raw_socket/message_flags.html
-/doc/html/boost_asio/reference/basic_raw_socket/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_raw_socket/message_peek.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_handle.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_handle_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/native.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_non_blocking/
-/doc/html/boost_asio/reference/basic_raw_socket/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/native_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/non_blocking/
-/doc/html/boost_asio/reference/basic_raw_socket/non_blocking.html
-/doc/html/boost_asio/reference/basic_raw_socket/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_raw_socket/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/open/
-/doc/html/boost_asio/reference/basic_raw_socket/open.html
-/doc/html/boost_asio/reference/basic_raw_socket/open/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/open/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/operator_eq_/
-/doc/html/boost_asio/reference/basic_raw_socket/operator_eq_.html
-/doc/html/boost_asio/reference/basic_raw_socket/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/protocol_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive/
-/doc/html/boost_asio/reference/basic_raw_socket/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive_from/
-/doc/html/boost_asio/reference/basic_raw_socket/receive_from.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive_from/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive_from/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive_from/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/receive/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/remote_endpoint/
-/doc/html/boost_asio/reference/basic_raw_socket/remote_endpoint.html
-/doc/html/boost_asio/reference/basic_raw_socket/remote_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/remote_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/reuse_address.html
-/doc/html/boost_asio/reference/basic_raw_socket/send/
-/doc/html/boost_asio/reference/basic_raw_socket/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_raw_socket/send.html
-/doc/html/boost_asio/reference/basic_raw_socket/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_raw_socket/send/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/send/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/send/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/send_to/
-/doc/html/boost_asio/reference/basic_raw_socket/send_to.html
-/doc/html/boost_asio/reference/basic_raw_socket/send_to/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/send_to/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/send_to/overload3.html
-/doc/html/boost_asio/reference/basic_raw_socket/service.html
-/doc/html/boost_asio/reference/basic_raw_socket/service_type.html
-/doc/html/boost_asio/reference/basic_raw_socket/set_option/
-/doc/html/boost_asio/reference/basic_raw_socket/set_option.html
-/doc/html/boost_asio/reference/basic_raw_socket/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/shutdown/
-/doc/html/boost_asio/reference/basic_raw_socket/shutdown.html
-/doc/html/boost_asio/reference/basic_raw_socket/shutdown/overload1.html
-/doc/html/boost_asio/reference/basic_raw_socket/shutdown/overload2.html
-/doc/html/boost_asio/reference/basic_raw_socket/shutdown_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/assign/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/assign.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/assign/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/assign/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/async_connect.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/async_receive/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/async_receive.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/async_receive/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/async_receive/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/async_send.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/at_mark/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/at_mark.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/at_mark/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/at_mark/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/available/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/available.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/available/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/available/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload3.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload4.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload5.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/basic_seq_packet_socket/overload6.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/bind/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/bind.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/bind/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/bind/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/broadcast.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/bytes_readable.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/cancel/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/cancel.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/close/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/close.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/close/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/close/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/connect/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/connect.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/connect/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/connect/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/debug.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/do_not_route.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/endpoint_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_implementation/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_implementation.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_io_service.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_option/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_option.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_service/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_service.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/implementation.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/implementation_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/io_control/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/io_control.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/is_open.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/keep_alive.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/linger.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/local_endpoint/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/local_endpoint.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/lowest_layer/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/lowest_layer.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/max_connections.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/message_flags.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/message_peek.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_handle.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_handle_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_non_blocking/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/native_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/non_blocking/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/non_blocking.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/open/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/open.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/open/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/open/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/operator_eq_/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/operator_eq_.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/protocol_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload3.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/remote_endpoint/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/remote_endpoint.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/remote_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/remote_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/reuse_address.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/send/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/send.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/send/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/send/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/service.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/service_type.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/set_option/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/set_option.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/shutdown/
-/doc/html/boost_asio/reference/basic_seq_packet_socket/shutdown.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/shutdown/overload1.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/shutdown/overload2.html
-/doc/html/boost_asio/reference/basic_seq_packet_socket/shutdown_type.html
-/doc/html/boost_asio/reference/basic_serial_port/
-/doc/html/boost_asio/reference/basic_serial_port/assign/
-/doc/html/boost_asio/reference/basic_serial_port/assign.html
-/doc/html/boost_asio/reference/basic_serial_port/assign/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/assign/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/async_read_some.html
-/doc/html/boost_asio/reference/basic_serial_port/async_write_some.html
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port/
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port.html
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port/overload3.html
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port/overload4.html
-/doc/html/boost_asio/reference/basic_serial_port/basic_serial_port/overload5.html
-/doc/html/boost_asio/reference/basic_serial_port/cancel/
-/doc/html/boost_asio/reference/basic_serial_port/cancel.html
-/doc/html/boost_asio/reference/basic_serial_port/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/close/
-/doc/html/boost_asio/reference/basic_serial_port/close.html
-/doc/html/boost_asio/reference/basic_serial_port/close/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/close/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/get_implementation/
-/doc/html/boost_asio/reference/basic_serial_port/get_implementation.html
-/doc/html/boost_asio/reference/basic_serial_port/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/get_io_service.html
-/doc/html/boost_asio/reference/basic_serial_port/get_option/
-/doc/html/boost_asio/reference/basic_serial_port/get_option.html
-/doc/html/boost_asio/reference/basic_serial_port/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/get_service/
-/doc/html/boost_asio/reference/basic_serial_port/get_service.html
-/doc/html/boost_asio/reference/basic_serial_port/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port.html
-/doc/html/boost_asio/reference/basic_serial_port/implementation.html
-/doc/html/boost_asio/reference/basic_serial_port/implementation_type.html
-/doc/html/boost_asio/reference/basic_serial_port/is_open.html
-/doc/html/boost_asio/reference/basic_serial_port/lowest_layer/
-/doc/html/boost_asio/reference/basic_serial_port/lowest_layer.html
-/doc/html/boost_asio/reference/basic_serial_port/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_serial_port/native_handle.html
-/doc/html/boost_asio/reference/basic_serial_port/native_handle_type.html
-/doc/html/boost_asio/reference/basic_serial_port/native.html
-/doc/html/boost_asio/reference/basic_serial_port/native_type.html
-/doc/html/boost_asio/reference/basic_serial_port/open/
-/doc/html/boost_asio/reference/basic_serial_port/open.html
-/doc/html/boost_asio/reference/basic_serial_port/open/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/open/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/operator_eq_.html
-/doc/html/boost_asio/reference/basic_serial_port/read_some/
-/doc/html/boost_asio/reference/basic_serial_port/read_some.html
-/doc/html/boost_asio/reference/basic_serial_port/read_some/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/read_some/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/send_break/
-/doc/html/boost_asio/reference/basic_serial_port/send_break.html
-/doc/html/boost_asio/reference/basic_serial_port/send_break/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/send_break/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/service.html
-/doc/html/boost_asio/reference/basic_serial_port/service_type.html
-/doc/html/boost_asio/reference/basic_serial_port/set_option/
-/doc/html/boost_asio/reference/basic_serial_port/set_option.html
-/doc/html/boost_asio/reference/basic_serial_port/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_serial_port/write_some/
-/doc/html/boost_asio/reference/basic_serial_port/write_some.html
-/doc/html/boost_asio/reference/basic_serial_port/write_some/overload1.html
-/doc/html/boost_asio/reference/basic_serial_port/write_some/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/
-/doc/html/boost_asio/reference/basic_signal_set/add/
-/doc/html/boost_asio/reference/basic_signal_set/add.html
-/doc/html/boost_asio/reference/basic_signal_set/add/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/add/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/async_wait.html
-/doc/html/boost_asio/reference/basic_signal_set/basic_signal_set/
-/doc/html/boost_asio/reference/basic_signal_set/basic_signal_set.html
-/doc/html/boost_asio/reference/basic_signal_set/basic_signal_set/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/basic_signal_set/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/basic_signal_set/overload3.html
-/doc/html/boost_asio/reference/basic_signal_set/basic_signal_set/overload4.html
-/doc/html/boost_asio/reference/basic_signal_set/cancel/
-/doc/html/boost_asio/reference/basic_signal_set/cancel.html
-/doc/html/boost_asio/reference/basic_signal_set/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/clear/
-/doc/html/boost_asio/reference/basic_signal_set/clear.html
-/doc/html/boost_asio/reference/basic_signal_set/clear/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/clear/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/get_implementation/
-/doc/html/boost_asio/reference/basic_signal_set/get_implementation.html
-/doc/html/boost_asio/reference/basic_signal_set/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/get_io_service.html
-/doc/html/boost_asio/reference/basic_signal_set/get_service/
-/doc/html/boost_asio/reference/basic_signal_set/get_service.html
-/doc/html/boost_asio/reference/basic_signal_set/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set.html
-/doc/html/boost_asio/reference/basic_signal_set/implementation.html
-/doc/html/boost_asio/reference/basic_signal_set/implementation_type.html
-/doc/html/boost_asio/reference/basic_signal_set/remove/
-/doc/html/boost_asio/reference/basic_signal_set/remove.html
-/doc/html/boost_asio/reference/basic_signal_set/remove/overload1.html
-/doc/html/boost_asio/reference/basic_signal_set/remove/overload2.html
-/doc/html/boost_asio/reference/basic_signal_set/service.html
-/doc/html/boost_asio/reference/basic_signal_set/service_type.html
-/doc/html/boost_asio/reference/basic_socket/
-/doc/html/boost_asio/reference/basic_socket_acceptor/
-/doc/html/boost_asio/reference/basic_socket_acceptor/accept/
-/doc/html/boost_asio/reference/basic_socket_acceptor/accept.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/accept/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/accept/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/accept/overload3.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/accept/overload4.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/assign/
-/doc/html/boost_asio/reference/basic_socket_acceptor/assign.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/assign/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/assign/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/
-/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload3.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload4.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload5.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/basic_socket_acceptor/overload6.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/bind/
-/doc/html/boost_asio/reference/basic_socket_acceptor/bind.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/bind/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/bind/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/broadcast.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/bytes_readable.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/cancel/
-/doc/html/boost_asio/reference/basic_socket_acceptor/cancel.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/close/
-/doc/html/boost_asio/reference/basic_socket_acceptor/close.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/close/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/close/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/debug.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/do_not_route.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/endpoint_type.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_implementation/
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_implementation.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_io_service.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_option/
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_option.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_service/
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_service.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/implementation.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/implementation_type.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/io_control/
-/doc/html/boost_asio/reference/basic_socket_acceptor/io_control.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/is_open.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/keep_alive.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/linger.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/listen/
-/doc/html/boost_asio/reference/basic_socket_acceptor/listen.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/listen/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/listen/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/local_endpoint/
-/doc/html/boost_asio/reference/basic_socket_acceptor/local_endpoint.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/max_connections.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/message_flags.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/message_peek.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_handle.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_handle_type.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_non_blocking/
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/native_type.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/non_blocking/
-/doc/html/boost_asio/reference/basic_socket_acceptor/non_blocking.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/open/
-/doc/html/boost_asio/reference/basic_socket_acceptor/open.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/open/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/open/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/operator_eq_/
-/doc/html/boost_asio/reference/basic_socket_acceptor/operator_eq_.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/protocol_type.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/reuse_address.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/service.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/service_type.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/set_option/
-/doc/html/boost_asio/reference/basic_socket_acceptor/set_option.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_socket_acceptor/shutdown_type.html
-/doc/html/boost_asio/reference/basic_socket/assign/
-/doc/html/boost_asio/reference/basic_socket/assign.html
-/doc/html/boost_asio/reference/basic_socket/assign/overload1.html
-/doc/html/boost_asio/reference/basic_socket/assign/overload2.html
-/doc/html/boost_asio/reference/basic_socket/async_connect.html
-/doc/html/boost_asio/reference/basic_socket/at_mark/
-/doc/html/boost_asio/reference/basic_socket/at_mark.html
-/doc/html/boost_asio/reference/basic_socket/at_mark/overload1.html
-/doc/html/boost_asio/reference/basic_socket/at_mark/overload2.html
-/doc/html/boost_asio/reference/basic_socket/available/
-/doc/html/boost_asio/reference/basic_socket/available.html
-/doc/html/boost_asio/reference/basic_socket/available/overload1.html
-/doc/html/boost_asio/reference/basic_socket/available/overload2.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/
-/doc/html/boost_asio/reference/basic_socket/_basic_socket.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/overload1.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/overload2.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/overload3.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/overload4.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/overload5.html
-/doc/html/boost_asio/reference/basic_socket/basic_socket/overload6.html
-/doc/html/boost_asio/reference/basic_socket/bind/
-/doc/html/boost_asio/reference/basic_socket/bind.html
-/doc/html/boost_asio/reference/basic_socket/bind/overload1.html
-/doc/html/boost_asio/reference/basic_socket/bind/overload2.html
-/doc/html/boost_asio/reference/basic_socket/broadcast.html
-/doc/html/boost_asio/reference/basic_socket/bytes_readable.html
-/doc/html/boost_asio/reference/basic_socket/cancel/
-/doc/html/boost_asio/reference/basic_socket/cancel.html
-/doc/html/boost_asio/reference/basic_socket/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_socket/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_socket/close/
-/doc/html/boost_asio/reference/basic_socket/close.html
-/doc/html/boost_asio/reference/basic_socket/close/overload1.html
-/doc/html/boost_asio/reference/basic_socket/close/overload2.html
-/doc/html/boost_asio/reference/basic_socket/connect/
-/doc/html/boost_asio/reference/basic_socket/connect.html
-/doc/html/boost_asio/reference/basic_socket/connect/overload1.html
-/doc/html/boost_asio/reference/basic_socket/connect/overload2.html
-/doc/html/boost_asio/reference/basic_socket/debug.html
-/doc/html/boost_asio/reference/basic_socket/do_not_route.html
-/doc/html/boost_asio/reference/basic_socket/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_socket/endpoint_type.html
-/doc/html/boost_asio/reference/basic_socket/get_implementation/
-/doc/html/boost_asio/reference/basic_socket/get_implementation.html
-/doc/html/boost_asio/reference/basic_socket/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_socket/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_socket/get_io_service.html
-/doc/html/boost_asio/reference/basic_socket/get_option/
-/doc/html/boost_asio/reference/basic_socket/get_option.html
-/doc/html/boost_asio/reference/basic_socket/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_socket/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_socket/get_service/
-/doc/html/boost_asio/reference/basic_socket/get_service.html
-/doc/html/boost_asio/reference/basic_socket/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_socket/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_socket.html
-/doc/html/boost_asio/reference/basic_socket/implementation.html
-/doc/html/boost_asio/reference/basic_socket/implementation_type.html
-/doc/html/boost_asio/reference/basic_socket/io_control/
-/doc/html/boost_asio/reference/basic_socket/io_control.html
-/doc/html/boost_asio/reference/basic_socket/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_socket/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_socket_iostream/
-/doc/html/boost_asio/reference/basic_socket_iostream/basic_socket_iostream/
-/doc/html/boost_asio/reference/basic_socket_iostream/basic_socket_iostream.html
-/doc/html/boost_asio/reference/basic_socket_iostream/basic_socket_iostream/overload1.html
-/doc/html/boost_asio/reference/basic_socket_iostream/basic_socket_iostream/overload2.html
-/doc/html/boost_asio/reference/basic_socket_iostream/close.html
-/doc/html/boost_asio/reference/basic_socket_iostream/connect.html
-/doc/html/boost_asio/reference/basic_socket_iostream/duration_type.html
-/doc/html/boost_asio/reference/basic_socket_iostream/endpoint_type.html
-/doc/html/boost_asio/reference/basic_socket_iostream/error.html
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_at/
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_at.html
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_at/overload1.html
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_at/overload2.html
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_from_now/
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_from_now.html
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_from_now/overload1.html
-/doc/html/boost_asio/reference/basic_socket_iostream/expires_from_now/overload2.html
-/doc/html/boost_asio/reference/basic_socket_iostream.html
-/doc/html/boost_asio/reference/basic_socket_iostream/rdbuf.html
-/doc/html/boost_asio/reference/basic_socket_iostream/time_type.html
-/doc/html/boost_asio/reference/basic_socket/is_open.html
-/doc/html/boost_asio/reference/basic_socket/keep_alive.html
-/doc/html/boost_asio/reference/basic_socket/linger.html
-/doc/html/boost_asio/reference/basic_socket/local_endpoint/
-/doc/html/boost_asio/reference/basic_socket/local_endpoint.html
-/doc/html/boost_asio/reference/basic_socket/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_socket/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_socket/lowest_layer/
-/doc/html/boost_asio/reference/basic_socket/lowest_layer.html
-/doc/html/boost_asio/reference/basic_socket/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_socket/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_socket/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_socket/max_connections.html
-/doc/html/boost_asio/reference/basic_socket/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_socket/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_socket/message_flags.html
-/doc/html/boost_asio/reference/basic_socket/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_socket/message_peek.html
-/doc/html/boost_asio/reference/basic_socket/native_handle.html
-/doc/html/boost_asio/reference/basic_socket/native_handle_type.html
-/doc/html/boost_asio/reference/basic_socket/native.html
-/doc/html/boost_asio/reference/basic_socket/native_non_blocking/
-/doc/html/boost_asio/reference/basic_socket/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_socket/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_socket/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_socket/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_socket/native_type.html
-/doc/html/boost_asio/reference/basic_socket/non_blocking/
-/doc/html/boost_asio/reference/basic_socket/non_blocking.html
-/doc/html/boost_asio/reference/basic_socket/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_socket/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_socket/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_socket/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_socket/open/
-/doc/html/boost_asio/reference/basic_socket/open.html
-/doc/html/boost_asio/reference/basic_socket/open/overload1.html
-/doc/html/boost_asio/reference/basic_socket/open/overload2.html
-/doc/html/boost_asio/reference/basic_socket/operator_eq_/
-/doc/html/boost_asio/reference/basic_socket/operator_eq_.html
-/doc/html/boost_asio/reference/basic_socket/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/basic_socket/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/basic_socket/protocol_type.html
-/doc/html/boost_asio/reference/basic_socket/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_socket/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_socket/remote_endpoint/
-/doc/html/boost_asio/reference/basic_socket/remote_endpoint.html
-/doc/html/boost_asio/reference/basic_socket/remote_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_socket/remote_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_socket/reuse_address.html
-/doc/html/boost_asio/reference/basic_socket/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_socket/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_socket/service.html
-/doc/html/boost_asio/reference/basic_socket/service_type.html
-/doc/html/boost_asio/reference/basic_socket/set_option/
-/doc/html/boost_asio/reference/basic_socket/set_option.html
-/doc/html/boost_asio/reference/basic_socket/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_socket/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_socket/shutdown/
-/doc/html/boost_asio/reference/basic_socket/shutdown.html
-/doc/html/boost_asio/reference/basic_socket/shutdown/overload1.html
-/doc/html/boost_asio/reference/basic_socket/shutdown/overload2.html
-/doc/html/boost_asio/reference/basic_socket/shutdown_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/
-/doc/html/boost_asio/reference/basic_socket_streambuf/assign/
-/doc/html/boost_asio/reference/basic_socket_streambuf/assign.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/assign/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/assign/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/async_connect.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/at_mark/
-/doc/html/boost_asio/reference/basic_socket_streambuf/at_mark.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/at_mark/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/at_mark/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/available/
-/doc/html/boost_asio/reference/basic_socket_streambuf/available.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/available/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/available/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/_basic_socket_streambuf.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/basic_socket_streambuf.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/bind/
-/doc/html/boost_asio/reference/basic_socket_streambuf/bind.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/bind/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/bind/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/broadcast.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/bytes_readable.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/cancel/
-/doc/html/boost_asio/reference/basic_socket_streambuf/cancel.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/close/
-/doc/html/boost_asio/reference/basic_socket_streambuf/close.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/close/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/close/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/connect/
-/doc/html/boost_asio/reference/basic_socket_streambuf/connect.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/connect/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/connect/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/connect/overload3.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/debug.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/do_not_route.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/duration_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/endpoint_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/error.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_at/
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_at.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_at/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_at/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_from_now/
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_from_now.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_from_now/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/expires_from_now/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_implementation/
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_implementation.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_io_service.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_option/
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_option.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_service/
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_service.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/implementation.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/implementation_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/io_control/
-/doc/html/boost_asio/reference/basic_socket_streambuf/io_control.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/io_handler.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/is_open.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/keep_alive.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/linger.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/local_endpoint/
-/doc/html/boost_asio/reference/basic_socket_streambuf/local_endpoint.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/lowest_layer/
-/doc/html/boost_asio/reference/basic_socket_streambuf/lowest_layer.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/max_connections.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/message_flags.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/message_peek.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_handle.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_handle_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_non_blocking/
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/native_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/non_blocking/
-/doc/html/boost_asio/reference/basic_socket_streambuf/non_blocking.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/open/
-/doc/html/boost_asio/reference/basic_socket_streambuf/open.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/open/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/open/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/overflow.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/protocol_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/puberror.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/remote_endpoint/
-/doc/html/boost_asio/reference/basic_socket_streambuf/remote_endpoint.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/remote_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/remote_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/reuse_address.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/service.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/service_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/setbuf.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/set_option/
-/doc/html/boost_asio/reference/basic_socket_streambuf/set_option.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/shutdown/
-/doc/html/boost_asio/reference/basic_socket_streambuf/shutdown.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/shutdown/overload1.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/shutdown/overload2.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/shutdown_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/sync.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/timer_handler.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/time_type.html
-/doc/html/boost_asio/reference/basic_socket_streambuf/underflow.html
-/doc/html/boost_asio/reference/basic_streambuf/
-/doc/html/boost_asio/reference/basic_streambuf/basic_streambuf.html
-/doc/html/boost_asio/reference/basic_streambuf/commit.html
-/doc/html/boost_asio/reference/basic_streambuf/const_buffers_type.html
-/doc/html/boost_asio/reference/basic_streambuf/consume.html
-/doc/html/boost_asio/reference/basic_streambuf/data.html
-/doc/html/boost_asio/reference/basic_streambuf.html
-/doc/html/boost_asio/reference/basic_streambuf/max_size.html
-/doc/html/boost_asio/reference/basic_streambuf/mutable_buffers_type.html
-/doc/html/boost_asio/reference/basic_streambuf/overflow.html
-/doc/html/boost_asio/reference/basic_streambuf/prepare.html
-/doc/html/boost_asio/reference/basic_streambuf/reserve.html
-/doc/html/boost_asio/reference/basic_streambuf/size.html
-/doc/html/boost_asio/reference/basic_streambuf/underflow.html
-/doc/html/boost_asio/reference/basic_stream_socket/
-/doc/html/boost_asio/reference/basic_stream_socket/assign/
-/doc/html/boost_asio/reference/basic_stream_socket/assign.html
-/doc/html/boost_asio/reference/basic_stream_socket/assign/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/assign/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_connect.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_read_some.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_receive/
-/doc/html/boost_asio/reference/basic_stream_socket/async_receive.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_receive/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_receive/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_send/
-/doc/html/boost_asio/reference/basic_stream_socket/async_send.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_send/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_send/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/async_write_some.html
-/doc/html/boost_asio/reference/basic_stream_socket/at_mark/
-/doc/html/boost_asio/reference/basic_stream_socket/at_mark.html
-/doc/html/boost_asio/reference/basic_stream_socket/at_mark/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/at_mark/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/available/
-/doc/html/boost_asio/reference/basic_stream_socket/available.html
-/doc/html/boost_asio/reference/basic_stream_socket/available/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/available/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload3.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload4.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload5.html
-/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload6.html
-/doc/html/boost_asio/reference/basic_stream_socket/bind/
-/doc/html/boost_asio/reference/basic_stream_socket/bind.html
-/doc/html/boost_asio/reference/basic_stream_socket/bind/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/bind/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/broadcast.html
-/doc/html/boost_asio/reference/basic_stream_socket/bytes_readable.html
-/doc/html/boost_asio/reference/basic_stream_socket/cancel/
-/doc/html/boost_asio/reference/basic_stream_socket/cancel.html
-/doc/html/boost_asio/reference/basic_stream_socket/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/close/
-/doc/html/boost_asio/reference/basic_stream_socket/close.html
-/doc/html/boost_asio/reference/basic_stream_socket/close/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/close/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/connect/
-/doc/html/boost_asio/reference/basic_stream_socket/connect.html
-/doc/html/boost_asio/reference/basic_stream_socket/connect/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/connect/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/debug.html
-/doc/html/boost_asio/reference/basic_stream_socket/do_not_route.html
-/doc/html/boost_asio/reference/basic_stream_socket/enable_connection_aborted.html
-/doc/html/boost_asio/reference/basic_stream_socket/endpoint_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_implementation/
-/doc/html/boost_asio/reference/basic_stream_socket/get_implementation.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_io_service.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_option/
-/doc/html/boost_asio/reference/basic_stream_socket/get_option.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_option/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_option/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_service/
-/doc/html/boost_asio/reference/basic_stream_socket/get_service.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket.html
-/doc/html/boost_asio/reference/basic_stream_socket/implementation.html
-/doc/html/boost_asio/reference/basic_stream_socket/implementation_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/io_control/
-/doc/html/boost_asio/reference/basic_stream_socket/io_control.html
-/doc/html/boost_asio/reference/basic_stream_socket/io_control/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/io_control/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/is_open.html
-/doc/html/boost_asio/reference/basic_stream_socket/keep_alive.html
-/doc/html/boost_asio/reference/basic_stream_socket/linger.html
-/doc/html/boost_asio/reference/basic_stream_socket/local_endpoint/
-/doc/html/boost_asio/reference/basic_stream_socket/local_endpoint.html
-/doc/html/boost_asio/reference/basic_stream_socket/local_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/local_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/lowest_layer/
-/doc/html/boost_asio/reference/basic_stream_socket/lowest_layer.html
-/doc/html/boost_asio/reference/basic_stream_socket/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/lowest_layer_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/max_connections.html
-/doc/html/boost_asio/reference/basic_stream_socket/message_do_not_route.html
-/doc/html/boost_asio/reference/basic_stream_socket/message_end_of_record.html
-/doc/html/boost_asio/reference/basic_stream_socket/message_flags.html
-/doc/html/boost_asio/reference/basic_stream_socket/message_out_of_band.html
-/doc/html/boost_asio/reference/basic_stream_socket/message_peek.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_handle.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_handle_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/native.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_non_blocking/
-/doc/html/boost_asio/reference/basic_stream_socket/native_non_blocking.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_stream_socket/native_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/non_blocking/
-/doc/html/boost_asio/reference/basic_stream_socket/non_blocking.html
-/doc/html/boost_asio/reference/basic_stream_socket/non_blocking_io.html
-/doc/html/boost_asio/reference/basic_stream_socket/non_blocking/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/non_blocking/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/non_blocking/overload3.html
-/doc/html/boost_asio/reference/basic_stream_socket/open/
-/doc/html/boost_asio/reference/basic_stream_socket/open.html
-/doc/html/boost_asio/reference/basic_stream_socket/open/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/open/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/operator_eq_/
-/doc/html/boost_asio/reference/basic_stream_socket/operator_eq_.html
-/doc/html/boost_asio/reference/basic_stream_socket/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/protocol_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/read_some/
-/doc/html/boost_asio/reference/basic_stream_socket/read_some.html
-/doc/html/boost_asio/reference/basic_stream_socket/read_some/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/read_some/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/receive/
-/doc/html/boost_asio/reference/basic_stream_socket/receive_buffer_size.html
-/doc/html/boost_asio/reference/basic_stream_socket/receive.html
-/doc/html/boost_asio/reference/basic_stream_socket/receive_low_watermark.html
-/doc/html/boost_asio/reference/basic_stream_socket/receive/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/receive/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/receive/overload3.html
-/doc/html/boost_asio/reference/basic_stream_socket/remote_endpoint/
-/doc/html/boost_asio/reference/basic_stream_socket/remote_endpoint.html
-/doc/html/boost_asio/reference/basic_stream_socket/remote_endpoint/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/remote_endpoint/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/reuse_address.html
-/doc/html/boost_asio/reference/basic_stream_socket/send/
-/doc/html/boost_asio/reference/basic_stream_socket/send_buffer_size.html
-/doc/html/boost_asio/reference/basic_stream_socket/send.html
-/doc/html/boost_asio/reference/basic_stream_socket/send_low_watermark.html
-/doc/html/boost_asio/reference/basic_stream_socket/send/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/send/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/send/overload3.html
-/doc/html/boost_asio/reference/basic_stream_socket/service.html
-/doc/html/boost_asio/reference/basic_stream_socket/service_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/set_option/
-/doc/html/boost_asio/reference/basic_stream_socket/set_option.html
-/doc/html/boost_asio/reference/basic_stream_socket/set_option/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/set_option/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/shutdown/
-/doc/html/boost_asio/reference/basic_stream_socket/shutdown.html
-/doc/html/boost_asio/reference/basic_stream_socket/shutdown/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/shutdown/overload2.html
-/doc/html/boost_asio/reference/basic_stream_socket/shutdown_type.html
-/doc/html/boost_asio/reference/basic_stream_socket/write_some/
-/doc/html/boost_asio/reference/basic_stream_socket/write_some.html
-/doc/html/boost_asio/reference/basic_stream_socket/write_some/overload1.html
-/doc/html/boost_asio/reference/basic_stream_socket/write_some/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/
-/doc/html/boost_asio/reference/basic_waitable_timer/async_wait.html
-/doc/html/boost_asio/reference/basic_waitable_timer/basic_waitable_timer/
-/doc/html/boost_asio/reference/basic_waitable_timer/basic_waitable_timer.html
-/doc/html/boost_asio/reference/basic_waitable_timer/basic_waitable_timer/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/basic_waitable_timer/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/basic_waitable_timer/overload3.html
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel/
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel.html
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel_one/
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel_one.html
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel_one/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel_one/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/cancel/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/clock_type.html
-/doc/html/boost_asio/reference/basic_waitable_timer/duration.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_at/
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_at.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_at/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_at/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_at/overload3.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_from_now/
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_from_now.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_from_now/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_from_now/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/expires_from_now/overload3.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_implementation/
-/doc/html/boost_asio/reference/basic_waitable_timer/get_implementation.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_implementation/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_implementation/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_io_service.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_service/
-/doc/html/boost_asio/reference/basic_waitable_timer/get_service.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_service/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/get_service/overload2.html
-/doc/html/boost_asio/reference/basic_waitable_timer.html
-/doc/html/boost_asio/reference/basic_waitable_timer/implementation.html
-/doc/html/boost_asio/reference/basic_waitable_timer/implementation_type.html
-/doc/html/boost_asio/reference/basic_waitable_timer/service.html
-/doc/html/boost_asio/reference/basic_waitable_timer/service_type.html
-/doc/html/boost_asio/reference/basic_waitable_timer/time_point.html
-/doc/html/boost_asio/reference/basic_waitable_timer/traits_type.html
-/doc/html/boost_asio/reference/basic_waitable_timer/wait/
-/doc/html/boost_asio/reference/basic_waitable_timer/wait.html
-/doc/html/boost_asio/reference/basic_waitable_timer/wait/overload1.html
-/doc/html/boost_asio/reference/basic_waitable_timer/wait/overload2.html
-/doc/html/boost_asio/reference/basic_yield_context/
-/doc/html/boost_asio/reference/basic_yield_context/basic_yield_context.html
-/doc/html/boost_asio/reference/basic_yield_context/callee_type.html
-/doc/html/boost_asio/reference/basic_yield_context/caller_type.html
-/doc/html/boost_asio/reference/basic_yield_context.html
-/doc/html/boost_asio/reference/basic_yield_context/operator_lb__rb_.html
-/doc/html/boost_asio/reference/buffer/
-/doc/html/boost_asio/reference/buffer_cast/
-/doc/html/boost_asio/reference/buffer_cast.html
-/doc/html/boost_asio/reference/buffer_cast/overload1.html
-/doc/html/boost_asio/reference/buffer_cast/overload2.html
-/doc/html/boost_asio/reference/buffer_copy/
-/doc/html/boost_asio/reference/buffer_copy.html
-/doc/html/boost_asio/reference/buffer_copy/overload10.html
-/doc/html/boost_asio/reference/buffer_copy/overload11.html
-/doc/html/boost_asio/reference/buffer_copy/overload12.html
-/doc/html/boost_asio/reference/buffer_copy/overload13.html
-/doc/html/boost_asio/reference/buffer_copy/overload14.html
-/doc/html/boost_asio/reference/buffer_copy/overload15.html
-/doc/html/boost_asio/reference/buffer_copy/overload16.html
-/doc/html/boost_asio/reference/buffer_copy/overload17.html
-/doc/html/boost_asio/reference/buffer_copy/overload18.html
-/doc/html/boost_asio/reference/buffer_copy/overload19.html
-/doc/html/boost_asio/reference/buffer_copy/overload1.html
-/doc/html/boost_asio/reference/buffer_copy/overload20.html
-/doc/html/boost_asio/reference/buffer_copy/overload21.html
-/doc/html/boost_asio/reference/buffer_copy/overload22.html
-/doc/html/boost_asio/reference/buffer_copy/overload23.html
-/doc/html/boost_asio/reference/buffer_copy/overload24.html
-/doc/html/boost_asio/reference/buffer_copy/overload25.html
-/doc/html/boost_asio/reference/buffer_copy/overload26.html
-/doc/html/boost_asio/reference/buffer_copy/overload27.html
-/doc/html/boost_asio/reference/buffer_copy/overload28.html
-/doc/html/boost_asio/reference/buffer_copy/overload29.html
-/doc/html/boost_asio/reference/buffer_copy/overload2.html
-/doc/html/boost_asio/reference/buffer_copy/overload30.html
-/doc/html/boost_asio/reference/buffer_copy/overload3.html
-/doc/html/boost_asio/reference/buffer_copy/overload4.html
-/doc/html/boost_asio/reference/buffer_copy/overload5.html
-/doc/html/boost_asio/reference/buffer_copy/overload6.html
-/doc/html/boost_asio/reference/buffer_copy/overload7.html
-/doc/html/boost_asio/reference/buffer_copy/overload8.html
-/doc/html/boost_asio/reference/buffer_copy/overload9.html
-/doc/html/boost_asio/reference/BufferedHandshakeHandler.html
-/doc/html/boost_asio/reference/buffered_read_stream/
-/doc/html/boost_asio/reference/buffered_read_stream/async_fill.html
-/doc/html/boost_asio/reference/buffered_read_stream/async_read_some.html
-/doc/html/boost_asio/reference/buffered_read_stream/async_write_some.html
-/doc/html/boost_asio/reference/buffered_read_stream/buffered_read_stream/
-/doc/html/boost_asio/reference/buffered_read_stream/buffered_read_stream.html
-/doc/html/boost_asio/reference/buffered_read_stream/buffered_read_stream/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/buffered_read_stream/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/close/
-/doc/html/boost_asio/reference/buffered_read_stream/close.html
-/doc/html/boost_asio/reference/buffered_read_stream/close/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/close/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/default_buffer_size.html
-/doc/html/boost_asio/reference/buffered_read_stream/fill/
-/doc/html/boost_asio/reference/buffered_read_stream/fill.html
-/doc/html/boost_asio/reference/buffered_read_stream/fill/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/fill/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/get_io_service.html
-/doc/html/boost_asio/reference/buffered_read_stream.html
-/doc/html/boost_asio/reference/buffered_read_stream/in_avail/
-/doc/html/boost_asio/reference/buffered_read_stream/in_avail.html
-/doc/html/boost_asio/reference/buffered_read_stream/in_avail/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/in_avail/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/lowest_layer/
-/doc/html/boost_asio/reference/buffered_read_stream/lowest_layer.html
-/doc/html/boost_asio/reference/buffered_read_stream/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/lowest_layer_type.html
-/doc/html/boost_asio/reference/buffered_read_stream/next_layer.html
-/doc/html/boost_asio/reference/buffered_read_stream/next_layer_type.html
-/doc/html/boost_asio/reference/buffered_read_stream/peek/
-/doc/html/boost_asio/reference/buffered_read_stream/peek.html
-/doc/html/boost_asio/reference/buffered_read_stream/peek/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/peek/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/read_some/
-/doc/html/boost_asio/reference/buffered_read_stream/read_some.html
-/doc/html/boost_asio/reference/buffered_read_stream/read_some/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/read_some/overload2.html
-/doc/html/boost_asio/reference/buffered_read_stream/write_some/
-/doc/html/boost_asio/reference/buffered_read_stream/write_some.html
-/doc/html/boost_asio/reference/buffered_read_stream/write_some/overload1.html
-/doc/html/boost_asio/reference/buffered_read_stream/write_some/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/
-/doc/html/boost_asio/reference/buffered_stream/async_fill.html
-/doc/html/boost_asio/reference/buffered_stream/async_flush.html
-/doc/html/boost_asio/reference/buffered_stream/async_read_some.html
-/doc/html/boost_asio/reference/buffered_stream/async_write_some.html
-/doc/html/boost_asio/reference/buffered_stream/buffered_stream/
-/doc/html/boost_asio/reference/buffered_stream/buffered_stream.html
-/doc/html/boost_asio/reference/buffered_stream/buffered_stream/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/buffered_stream/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/close/
-/doc/html/boost_asio/reference/buffered_stream/close.html
-/doc/html/boost_asio/reference/buffered_stream/close/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/close/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/fill/
-/doc/html/boost_asio/reference/buffered_stream/fill.html
-/doc/html/boost_asio/reference/buffered_stream/fill/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/fill/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/flush/
-/doc/html/boost_asio/reference/buffered_stream/flush.html
-/doc/html/boost_asio/reference/buffered_stream/flush/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/flush/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/get_io_service.html
-/doc/html/boost_asio/reference/buffered_stream.html
-/doc/html/boost_asio/reference/buffered_stream/in_avail/
-/doc/html/boost_asio/reference/buffered_stream/in_avail.html
-/doc/html/boost_asio/reference/buffered_stream/in_avail/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/in_avail/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/lowest_layer/
-/doc/html/boost_asio/reference/buffered_stream/lowest_layer.html
-/doc/html/boost_asio/reference/buffered_stream/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/lowest_layer_type.html
-/doc/html/boost_asio/reference/buffered_stream/next_layer.html
-/doc/html/boost_asio/reference/buffered_stream/next_layer_type.html
-/doc/html/boost_asio/reference/buffered_stream/peek/
-/doc/html/boost_asio/reference/buffered_stream/peek.html
-/doc/html/boost_asio/reference/buffered_stream/peek/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/peek/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/read_some/
-/doc/html/boost_asio/reference/buffered_stream/read_some.html
-/doc/html/boost_asio/reference/buffered_stream/read_some/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/read_some/overload2.html
-/doc/html/boost_asio/reference/buffered_stream/write_some/
-/doc/html/boost_asio/reference/buffered_stream/write_some.html
-/doc/html/boost_asio/reference/buffered_stream/write_some/overload1.html
-/doc/html/boost_asio/reference/buffered_stream/write_some/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/
-/doc/html/boost_asio/reference/buffered_write_stream/async_flush.html
-/doc/html/boost_asio/reference/buffered_write_stream/async_read_some.html
-/doc/html/boost_asio/reference/buffered_write_stream/async_write_some.html
-/doc/html/boost_asio/reference/buffered_write_stream/buffered_write_stream/
-/doc/html/boost_asio/reference/buffered_write_stream/buffered_write_stream.html
-/doc/html/boost_asio/reference/buffered_write_stream/buffered_write_stream/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/buffered_write_stream/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/close/
-/doc/html/boost_asio/reference/buffered_write_stream/close.html
-/doc/html/boost_asio/reference/buffered_write_stream/close/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/close/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/default_buffer_size.html
-/doc/html/boost_asio/reference/buffered_write_stream/flush/
-/doc/html/boost_asio/reference/buffered_write_stream/flush.html
-/doc/html/boost_asio/reference/buffered_write_stream/flush/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/flush/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/get_io_service.html
-/doc/html/boost_asio/reference/buffered_write_stream.html
-/doc/html/boost_asio/reference/buffered_write_stream/in_avail/
-/doc/html/boost_asio/reference/buffered_write_stream/in_avail.html
-/doc/html/boost_asio/reference/buffered_write_stream/in_avail/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/in_avail/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/lowest_layer/
-/doc/html/boost_asio/reference/buffered_write_stream/lowest_layer.html
-/doc/html/boost_asio/reference/buffered_write_stream/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/lowest_layer_type.html
-/doc/html/boost_asio/reference/buffered_write_stream/next_layer.html
-/doc/html/boost_asio/reference/buffered_write_stream/next_layer_type.html
-/doc/html/boost_asio/reference/buffered_write_stream/peek/
-/doc/html/boost_asio/reference/buffered_write_stream/peek.html
-/doc/html/boost_asio/reference/buffered_write_stream/peek/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/peek/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/read_some/
-/doc/html/boost_asio/reference/buffered_write_stream/read_some.html
-/doc/html/boost_asio/reference/buffered_write_stream/read_some/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/read_some/overload2.html
-/doc/html/boost_asio/reference/buffered_write_stream/write_some/
-/doc/html/boost_asio/reference/buffered_write_stream/write_some.html
-/doc/html/boost_asio/reference/buffered_write_stream/write_some/overload1.html
-/doc/html/boost_asio/reference/buffered_write_stream/write_some/overload2.html
-/doc/html/boost_asio/reference/buffer.html
-/doc/html/boost_asio/reference/buffer/overload10.html
-/doc/html/boost_asio/reference/buffer/overload11.html
-/doc/html/boost_asio/reference/buffer/overload12.html
-/doc/html/boost_asio/reference/buffer/overload13.html
-/doc/html/boost_asio/reference/buffer/overload14.html
-/doc/html/boost_asio/reference/buffer/overload15.html
-/doc/html/boost_asio/reference/buffer/overload16.html
-/doc/html/boost_asio/reference/buffer/overload17.html
-/doc/html/boost_asio/reference/buffer/overload18.html
-/doc/html/boost_asio/reference/buffer/overload19.html
-/doc/html/boost_asio/reference/buffer/overload1.html
-/doc/html/boost_asio/reference/buffer/overload20.html
-/doc/html/boost_asio/reference/buffer/overload21.html
-/doc/html/boost_asio/reference/buffer/overload22.html
-/doc/html/boost_asio/reference/buffer/overload23.html
-/doc/html/boost_asio/reference/buffer/overload24.html
-/doc/html/boost_asio/reference/buffer/overload25.html
-/doc/html/boost_asio/reference/buffer/overload26.html
-/doc/html/boost_asio/reference/buffer/overload27.html
-/doc/html/boost_asio/reference/buffer/overload28.html
-/doc/html/boost_asio/reference/buffer/overload2.html
-/doc/html/boost_asio/reference/buffer/overload3.html
-/doc/html/boost_asio/reference/buffer/overload4.html
-/doc/html/boost_asio/reference/buffer/overload5.html
-/doc/html/boost_asio/reference/buffer/overload6.html
-/doc/html/boost_asio/reference/buffer/overload7.html
-/doc/html/boost_asio/reference/buffer/overload8.html
-/doc/html/boost_asio/reference/buffer/overload9.html
-/doc/html/boost_asio/reference/buffers_begin.html
-/doc/html/boost_asio/reference/buffers_end.html
-/doc/html/boost_asio/reference/buffers_iterator/
-/doc/html/boost_asio/reference/buffers_iterator/begin.html
-/doc/html/boost_asio/reference/buffers_iterator/buffers_iterator.html
-/doc/html/boost_asio/reference/buffers_iterator/difference_type.html
-/doc/html/boost_asio/reference/buffers_iterator/end.html
-/doc/html/boost_asio/reference/buffers_iterator.html
-/doc/html/boost_asio/reference/buffers_iterator/iterator_category.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_arrow_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_eq__eq_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_gt__eq_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_gt_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_lb__rb_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_lt__eq_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_lt_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus_/
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus__eq_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus__minus_/
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus__minus_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus__minus_/overload1.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus__minus_/overload2.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus_/overload1.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_minus_/overload2.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_not__eq_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus_/
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus__eq_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus_/overload1.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus_/overload2.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus__plus_/
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus__plus_.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus__plus_/overload1.html
-/doc/html/boost_asio/reference/buffers_iterator/operator_plus__plus_/overload2.html
-/doc/html/boost_asio/reference/buffers_iterator/operator__star_.html
-/doc/html/boost_asio/reference/buffers_iterator/pointer.html
-/doc/html/boost_asio/reference/buffers_iterator/reference.html
-/doc/html/boost_asio/reference/buffers_iterator/value_type.html
-/doc/html/boost_asio/reference/buffer_size/
-/doc/html/boost_asio/reference/buffer_size.html
-/doc/html/boost_asio/reference/buffer_size/overload1.html
-/doc/html/boost_asio/reference/buffer_size/overload2.html
-/doc/html/boost_asio/reference/buffer_size/overload3.html
-/doc/html/boost_asio/reference/buffer_size/overload4.html
-/doc/html/boost_asio/reference/buffer_size/overload5.html
-/doc/html/boost_asio/reference/CompletionHandler.html
-/doc/html/boost_asio/reference/ComposedConnectHandler.html
-/doc/html/boost_asio/reference/connect/
-/doc/html/boost_asio/reference/ConnectHandler.html
-/doc/html/boost_asio/reference/connect.html
-/doc/html/boost_asio/reference/connect/overload1.html
-/doc/html/boost_asio/reference/connect/overload2.html
-/doc/html/boost_asio/reference/connect/overload3.html
-/doc/html/boost_asio/reference/connect/overload4.html
-/doc/html/boost_asio/reference/connect/overload5.html
-/doc/html/boost_asio/reference/connect/overload6.html
-/doc/html/boost_asio/reference/connect/overload7.html
-/doc/html/boost_asio/reference/connect/overload8.html
-/doc/html/boost_asio/reference/const_buffer/
-/doc/html/boost_asio/reference/const_buffer/const_buffer/
-/doc/html/boost_asio/reference/const_buffer/const_buffer.html
-/doc/html/boost_asio/reference/const_buffer/const_buffer/overload1.html
-/doc/html/boost_asio/reference/const_buffer/const_buffer/overload2.html
-/doc/html/boost_asio/reference/const_buffer/const_buffer/overload3.html
-/doc/html/boost_asio/reference/const_buffer.html
-/doc/html/boost_asio/reference/const_buffer/operator_plus_/
-/doc/html/boost_asio/reference/const_buffer/operator_plus_.html
-/doc/html/boost_asio/reference/const_buffer/operator_plus_/overload1.html
-/doc/html/boost_asio/reference/const_buffer/operator_plus_/overload2.html
-/doc/html/boost_asio/reference/const_buffers_1/
-/doc/html/boost_asio/reference/const_buffers_1/begin.html
-/doc/html/boost_asio/reference/const_buffers_1/const_buffers_1/
-/doc/html/boost_asio/reference/const_buffers_1/const_buffers_1.html
-/doc/html/boost_asio/reference/const_buffers_1/const_buffers_1/overload1.html
-/doc/html/boost_asio/reference/const_buffers_1/const_buffers_1/overload2.html
-/doc/html/boost_asio/reference/const_buffers_1/const_iterator.html
-/doc/html/boost_asio/reference/const_buffers_1/end.html
-/doc/html/boost_asio/reference/const_buffers_1.html
-/doc/html/boost_asio/reference/const_buffers_1/operator_plus_/
-/doc/html/boost_asio/reference/const_buffers_1/operator_plus_.html
-/doc/html/boost_asio/reference/const_buffers_1/operator_plus_/overload1.html
-/doc/html/boost_asio/reference/const_buffers_1/operator_plus_/overload2.html
-/doc/html/boost_asio/reference/const_buffers_1/value_type.html
-/doc/html/boost_asio/reference/ConstBufferSequence.html
-/doc/html/boost_asio/reference/ConvertibleToConstBuffer.html
-/doc/html/boost_asio/reference/ConvertibleToMutableBuffer.html
-/doc/html/boost_asio/reference/coroutine/
-/doc/html/boost_asio/reference/coroutine/coroutine.html
-/doc/html/boost_asio/reference/coroutine.html
-/doc/html/boost_asio/reference/coroutine/is_child.html
-/doc/html/boost_asio/reference/coroutine/is_complete.html
-/doc/html/boost_asio/reference/coroutine/is_parent.html
-/doc/html/boost_asio/reference/datagram_socket_service/
-/doc/html/boost_asio/reference/datagram_socket_service/assign.html
-/doc/html/boost_asio/reference/datagram_socket_service/async_connect.html
-/doc/html/boost_asio/reference/datagram_socket_service/async_receive_from.html
-/doc/html/boost_asio/reference/datagram_socket_service/async_receive.html
-/doc/html/boost_asio/reference/datagram_socket_service/async_send.html
-/doc/html/boost_asio/reference/datagram_socket_service/async_send_to.html
-/doc/html/boost_asio/reference/datagram_socket_service/at_mark.html
-/doc/html/boost_asio/reference/datagram_socket_service/available.html
-/doc/html/boost_asio/reference/datagram_socket_service/bind.html
-/doc/html/boost_asio/reference/datagram_socket_service/cancel.html
-/doc/html/boost_asio/reference/datagram_socket_service/close.html
-/doc/html/boost_asio/reference/datagram_socket_service/connect.html
-/doc/html/boost_asio/reference/datagram_socket_service/construct.html
-/doc/html/boost_asio/reference/datagram_socket_service/converting_move_construct.html
-/doc/html/boost_asio/reference/datagram_socket_service/datagram_socket_service.html
-/doc/html/boost_asio/reference/datagram_socket_service/destroy.html
-/doc/html/boost_asio/reference/datagram_socket_service/endpoint_type.html
-/doc/html/boost_asio/reference/datagram_socket_service/get_io_service.html
-/doc/html/boost_asio/reference/datagram_socket_service/get_option.html
-/doc/html/boost_asio/reference/datagram_socket_service.html
-/doc/html/boost_asio/reference/DatagramSocketService.html
-/doc/html/boost_asio/reference/datagram_socket_service/id.html
-/doc/html/boost_asio/reference/datagram_socket_service/implementation_type.html
-/doc/html/boost_asio/reference/datagram_socket_service/io_control.html
-/doc/html/boost_asio/reference/datagram_socket_service/is_open.html
-/doc/html/boost_asio/reference/datagram_socket_service/local_endpoint.html
-/doc/html/boost_asio/reference/datagram_socket_service/move_assign.html
-/doc/html/boost_asio/reference/datagram_socket_service/move_construct.html
-/doc/html/boost_asio/reference/datagram_socket_service/native_handle.html
-/doc/html/boost_asio/reference/datagram_socket_service/native_handle_type.html
-/doc/html/boost_asio/reference/datagram_socket_service/native.html
-/doc/html/boost_asio/reference/datagram_socket_service/native_non_blocking/
-/doc/html/boost_asio/reference/datagram_socket_service/native_non_blocking.html
-/doc/html/boost_asio/reference/datagram_socket_service/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/datagram_socket_service/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/datagram_socket_service/native_type.html
-/doc/html/boost_asio/reference/datagram_socket_service/non_blocking/
-/doc/html/boost_asio/reference/datagram_socket_service/non_blocking.html
-/doc/html/boost_asio/reference/datagram_socket_service/non_blocking/overload1.html
-/doc/html/boost_asio/reference/datagram_socket_service/non_blocking/overload2.html
-/doc/html/boost_asio/reference/datagram_socket_service/open.html
-/doc/html/boost_asio/reference/datagram_socket_service/protocol_type.html
-/doc/html/boost_asio/reference/datagram_socket_service/receive_from.html
-/doc/html/boost_asio/reference/datagram_socket_service/receive.html
-/doc/html/boost_asio/reference/datagram_socket_service/remote_endpoint.html
-/doc/html/boost_asio/reference/datagram_socket_service/send.html
-/doc/html/boost_asio/reference/datagram_socket_service/send_to.html
-/doc/html/boost_asio/reference/datagram_socket_service/set_option.html
-/doc/html/boost_asio/reference/datagram_socket_service/shutdown.html
-/doc/html/boost_asio/reference/deadline_timer.html
-/doc/html/boost_asio/reference/deadline_timer_service/
-/doc/html/boost_asio/reference/deadline_timer_service/async_wait.html
-/doc/html/boost_asio/reference/deadline_timer_service/cancel.html
-/doc/html/boost_asio/reference/deadline_timer_service/cancel_one.html
-/doc/html/boost_asio/reference/deadline_timer_service/construct.html
-/doc/html/boost_asio/reference/deadline_timer_service/deadline_timer_service.html
-/doc/html/boost_asio/reference/deadline_timer_service/destroy.html
-/doc/html/boost_asio/reference/deadline_timer_service/duration_type.html
-/doc/html/boost_asio/reference/deadline_timer_service/expires_at/
-/doc/html/boost_asio/reference/deadline_timer_service/expires_at.html
-/doc/html/boost_asio/reference/deadline_timer_service/expires_at/overload1.html
-/doc/html/boost_asio/reference/deadline_timer_service/expires_at/overload2.html
-/doc/html/boost_asio/reference/deadline_timer_service/expires_from_now/
-/doc/html/boost_asio/reference/deadline_timer_service/expires_from_now.html
-/doc/html/boost_asio/reference/deadline_timer_service/expires_from_now/overload1.html
-/doc/html/boost_asio/reference/deadline_timer_service/expires_from_now/overload2.html
-/doc/html/boost_asio/reference/deadline_timer_service/get_io_service.html
-/doc/html/boost_asio/reference/deadline_timer_service.html
-/doc/html/boost_asio/reference/deadline_timer_service/id.html
-/doc/html/boost_asio/reference/deadline_timer_service/implementation_type.html
-/doc/html/boost_asio/reference/deadline_timer_service/time_type.html
-/doc/html/boost_asio/reference/deadline_timer_service/traits_type.html
-/doc/html/boost_asio/reference/deadline_timer_service/wait.html
-/doc/html/boost_asio/reference/DescriptorService.html
-/doc/html/boost_asio/reference/Endpoint.html
-/doc/html/boost_asio/reference/error__addrinfo_category.html
-/doc/html/boost_asio/reference/error__addrinfo_errors.html
-/doc/html/boost_asio/reference/error__basic_errors.html
-/doc/html/boost_asio/reference/error__get_addrinfo_category.html
-/doc/html/boost_asio/reference/error__get_misc_category.html
-/doc/html/boost_asio/reference/error__get_netdb_category.html
-/doc/html/boost_asio/reference/error__get_ssl_category.html
-/doc/html/boost_asio/reference/error__get_system_category.html
-/doc/html/boost_asio/reference/error__make_error_code/
-/doc/html/boost_asio/reference/error__make_error_code.html
-/doc/html/boost_asio/reference/error__make_error_code/overload1.html
-/doc/html/boost_asio/reference/error__make_error_code/overload2.html
-/doc/html/boost_asio/reference/error__make_error_code/overload3.html
-/doc/html/boost_asio/reference/error__make_error_code/overload4.html
-/doc/html/boost_asio/reference/error__make_error_code/overload5.html
-/doc/html/boost_asio/reference/error__misc_category.html
-/doc/html/boost_asio/reference/error__misc_errors.html
-/doc/html/boost_asio/reference/error__netdb_category.html
-/doc/html/boost_asio/reference/error__netdb_errors.html
-/doc/html/boost_asio/reference/error__ssl_category.html
-/doc/html/boost_asio/reference/error__ssl_errors.html
-/doc/html/boost_asio/reference/error__system_category.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/
-/doc/html/boost_asio/reference/generic__basic_endpoint/basic_endpoint/
-/doc/html/boost_asio/reference/generic__basic_endpoint/basic_endpoint.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/basic_endpoint/overload1.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/basic_endpoint/overload2.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/basic_endpoint/overload3.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/basic_endpoint/overload4.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/capacity.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/data/
-/doc/html/boost_asio/reference/generic__basic_endpoint/data.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/data/overload1.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/data/overload2.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/data_type.html
-/doc/html/boost_asio/reference/generic__basic_endpoint.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_eq__eq_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_eq_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_gt__eq_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_gt_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_lt__eq_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_lt_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/operator_not__eq_.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/protocol.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/protocol_type.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/resize.html
-/doc/html/boost_asio/reference/generic__basic_endpoint/size.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/
-/doc/html/boost_asio/reference/generic__datagram_protocol/datagram_protocol/
-/doc/html/boost_asio/reference/generic__datagram_protocol/datagram_protocol.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/datagram_protocol/overload1.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/datagram_protocol/overload2.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/endpoint.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/family.html
-/doc/html/boost_asio/reference/generic__datagram_protocol.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/operator_eq__eq_.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/operator_not__eq_.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/protocol.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/socket.html
-/doc/html/boost_asio/reference/generic__datagram_protocol/type.html
-/doc/html/boost_asio/reference/generic__raw_protocol/
-/doc/html/boost_asio/reference/generic__raw_protocol/endpoint.html
-/doc/html/boost_asio/reference/generic__raw_protocol/family.html
-/doc/html/boost_asio/reference/generic__raw_protocol.html
-/doc/html/boost_asio/reference/generic__raw_protocol/operator_eq__eq_.html
-/doc/html/boost_asio/reference/generic__raw_protocol/operator_not__eq_.html
-/doc/html/boost_asio/reference/generic__raw_protocol/protocol.html
-/doc/html/boost_asio/reference/generic__raw_protocol/raw_protocol/
-/doc/html/boost_asio/reference/generic__raw_protocol/raw_protocol.html
-/doc/html/boost_asio/reference/generic__raw_protocol/raw_protocol/overload1.html
-/doc/html/boost_asio/reference/generic__raw_protocol/raw_protocol/overload2.html
-/doc/html/boost_asio/reference/generic__raw_protocol/socket.html
-/doc/html/boost_asio/reference/generic__raw_protocol/type.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/endpoint.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/family.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/operator_eq__eq_.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/operator_not__eq_.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/protocol.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/seq_packet_protocol/
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/seq_packet_protocol.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/seq_packet_protocol/overload1.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/seq_packet_protocol/overload2.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/socket.html
-/doc/html/boost_asio/reference/generic__seq_packet_protocol/type.html
-/doc/html/boost_asio/reference/generic__stream_protocol/
-/doc/html/boost_asio/reference/generic__stream_protocol/endpoint.html
-/doc/html/boost_asio/reference/generic__stream_protocol/family.html
-/doc/html/boost_asio/reference/generic__stream_protocol.html
-/doc/html/boost_asio/reference/generic__stream_protocol/iostream.html
-/doc/html/boost_asio/reference/generic__stream_protocol/operator_eq__eq_.html
-/doc/html/boost_asio/reference/generic__stream_protocol/operator_not__eq_.html
-/doc/html/boost_asio/reference/generic__stream_protocol/protocol.html
-/doc/html/boost_asio/reference/generic__stream_protocol/socket.html
-/doc/html/boost_asio/reference/generic__stream_protocol/stream_protocol/
-/doc/html/boost_asio/reference/generic__stream_protocol/stream_protocol.html
-/doc/html/boost_asio/reference/generic__stream_protocol/stream_protocol/overload1.html
-/doc/html/boost_asio/reference/generic__stream_protocol/stream_protocol/overload2.html
-/doc/html/boost_asio/reference/generic__stream_protocol/type.html
-/doc/html/boost_asio/reference/GettableSerialPortOption.html
-/doc/html/boost_asio/reference/GettableSocketOption.html
-/doc/html/boost_asio/reference/Handler.html
-/doc/html/boost_asio/reference/handler_type/
-/doc/html/boost_asio/reference/handler_type.html
-/doc/html/boost_asio/reference/handler_type/type.html
-/doc/html/boost_asio/reference/HandleService.html
-/doc/html/boost_asio/reference/HandshakeHandler.html
-/doc/html/boost_asio/reference/has_service.html
-/doc/html/boost_asio/reference/high_resolution_timer.html
-/doc/html/boost_asio/reference.html
-/doc/html/boost_asio/reference/InternetProtocol.html
-/doc/html/boost_asio/reference/invalid_service_owner/
-/doc/html/boost_asio/reference/invalid_service_owner.html
-/doc/html/boost_asio/reference/invalid_service_owner/invalid_service_owner.html
-/doc/html/boost_asio/reference/IoControlCommand.html
-/doc/html/boost_asio/reference/IoObjectService.html
-/doc/html/boost_asio/reference/io_service/
-/doc/html/boost_asio/reference/io_service/add_service.html
-/doc/html/boost_asio/reference/io_service/dispatch.html
-/doc/html/boost_asio/reference/io_service/fork_event.html
-/doc/html/boost_asio/reference/io_service/has_service.html
-/doc/html/boost_asio/reference/io_service.html
-/doc/html/boost_asio/reference/io_service__id/
-/doc/html/boost_asio/reference/io_service__id.html
-/doc/html/boost_asio/reference/io_service__id/id.html
-/doc/html/boost_asio/reference/io_service/io_service/
-/doc/html/boost_asio/reference/io_service/_io_service.html
-/doc/html/boost_asio/reference/io_service/io_service.html
-/doc/html/boost_asio/reference/io_service/io_service/overload1.html
-/doc/html/boost_asio/reference/io_service/io_service/overload2.html
-/doc/html/boost_asio/reference/io_service/notify_fork.html
-/doc/html/boost_asio/reference/io_service/poll/
-/doc/html/boost_asio/reference/io_service/poll.html
-/doc/html/boost_asio/reference/io_service/poll_one/
-/doc/html/boost_asio/reference/io_service/poll_one.html
-/doc/html/boost_asio/reference/io_service/poll_one/overload1.html
-/doc/html/boost_asio/reference/io_service/poll_one/overload2.html
-/doc/html/boost_asio/reference/io_service/poll/overload1.html
-/doc/html/boost_asio/reference/io_service/poll/overload2.html
-/doc/html/boost_asio/reference/io_service/post.html
-/doc/html/boost_asio/reference/io_service/reset.html
-/doc/html/boost_asio/reference/io_service/run/
-/doc/html/boost_asio/reference/io_service/run.html
-/doc/html/boost_asio/reference/io_service/run_one/
-/doc/html/boost_asio/reference/io_service/run_one.html
-/doc/html/boost_asio/reference/io_service/run_one/overload1.html
-/doc/html/boost_asio/reference/io_service/run_one/overload2.html
-/doc/html/boost_asio/reference/io_service/run/overload1.html
-/doc/html/boost_asio/reference/io_service/run/overload2.html
-/doc/html/boost_asio/reference/io_service__service/
-/doc/html/boost_asio/reference/io_service__service/fork_service.html
-/doc/html/boost_asio/reference/io_service__service/get_io_service.html
-/doc/html/boost_asio/reference/io_service__service.html
-/doc/html/boost_asio/reference/io_service__service/_service.html
-/doc/html/boost_asio/reference/io_service__service/service.html
-/doc/html/boost_asio/reference/io_service__service/shutdown_service.html
-/doc/html/boost_asio/reference/io_service/stop.html
-/doc/html/boost_asio/reference/io_service/stopped.html
-/doc/html/boost_asio/reference/io_service__strand/
-/doc/html/boost_asio/reference/io_service__strand/dispatch.html
-/doc/html/boost_asio/reference/io_service__strand/get_io_service.html
-/doc/html/boost_asio/reference/io_service__strand.html
-/doc/html/boost_asio/reference/io_service__strand/post.html
-/doc/html/boost_asio/reference/io_service__strand/running_in_this_thread.html
-/doc/html/boost_asio/reference/io_service__strand/_strand.html
-/doc/html/boost_asio/reference/io_service__strand/strand.html
-/doc/html/boost_asio/reference/io_service__strand/wrap.html
-/doc/html/boost_asio/reference/io_service/use_service.html
-/doc/html/boost_asio/reference/io_service__work/
-/doc/html/boost_asio/reference/io_service__work/get_io_service.html
-/doc/html/boost_asio/reference/io_service__work.html
-/doc/html/boost_asio/reference/io_service__work/work/
-/doc/html/boost_asio/reference/io_service__work/_work.html
-/doc/html/boost_asio/reference/io_service__work/work.html
-/doc/html/boost_asio/reference/io_service__work/work/overload1.html
-/doc/html/boost_asio/reference/io_service__work/work/overload2.html
-/doc/html/boost_asio/reference/io_service/wrap.html
-/doc/html/boost_asio/reference/ip__address/
-/doc/html/boost_asio/reference/ip__address/address/
-/doc/html/boost_asio/reference/ip__address/address.html
-/doc/html/boost_asio/reference/ip__address/address/overload1.html
-/doc/html/boost_asio/reference/ip__address/address/overload2.html
-/doc/html/boost_asio/reference/ip__address/address/overload3.html
-/doc/html/boost_asio/reference/ip__address/address/overload4.html
-/doc/html/boost_asio/reference/ip__address/from_string/
-/doc/html/boost_asio/reference/ip__address/from_string.html
-/doc/html/boost_asio/reference/ip__address/from_string/overload1.html
-/doc/html/boost_asio/reference/ip__address/from_string/overload2.html
-/doc/html/boost_asio/reference/ip__address/from_string/overload3.html
-/doc/html/boost_asio/reference/ip__address/from_string/overload4.html
-/doc/html/boost_asio/reference/ip__address.html
-/doc/html/boost_asio/reference/ip__address/is_loopback.html
-/doc/html/boost_asio/reference/ip__address/is_multicast.html
-/doc/html/boost_asio/reference/ip__address/is_unspecified.html
-/doc/html/boost_asio/reference/ip__address/is_v4.html
-/doc/html/boost_asio/reference/ip__address/is_v6.html
-/doc/html/boost_asio/reference/ip__address/operator_eq_/
-/doc/html/boost_asio/reference/ip__address/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__address/operator_eq_.html
-/doc/html/boost_asio/reference/ip__address/operator_eq_/overload1.html
-/doc/html/boost_asio/reference/ip__address/operator_eq_/overload2.html
-/doc/html/boost_asio/reference/ip__address/operator_eq_/overload3.html
-/doc/html/boost_asio/reference/ip__address/operator_gt__eq_.html
-/doc/html/boost_asio/reference/ip__address/operator_gt_.html
-/doc/html/boost_asio/reference/ip__address/operator_lt__eq_.html
-/doc/html/boost_asio/reference/ip__address/operator_lt_.html
-/doc/html/boost_asio/reference/ip__address/operator_lt__lt_.html
-/doc/html/boost_asio/reference/ip__address/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__address/to_string/
-/doc/html/boost_asio/reference/ip__address/to_string.html
-/doc/html/boost_asio/reference/ip__address/to_string/overload1.html
-/doc/html/boost_asio/reference/ip__address/to_string/overload2.html
-/doc/html/boost_asio/reference/ip__address/to_v4.html
-/doc/html/boost_asio/reference/ip__address/to_v6.html
-/doc/html/boost_asio/reference/ip__address_v4/
-/doc/html/boost_asio/reference/ip__address_v4/address_v4/
-/doc/html/boost_asio/reference/ip__address_v4/address_v4.html
-/doc/html/boost_asio/reference/ip__address_v4/address_v4/overload1.html
-/doc/html/boost_asio/reference/ip__address_v4/address_v4/overload2.html
-/doc/html/boost_asio/reference/ip__address_v4/address_v4/overload3.html
-/doc/html/boost_asio/reference/ip__address_v4/address_v4/overload4.html
-/doc/html/boost_asio/reference/ip__address_v4/any.html
-/doc/html/boost_asio/reference/ip__address_v4/broadcast/
-/doc/html/boost_asio/reference/ip__address_v4/broadcast.html
-/doc/html/boost_asio/reference/ip__address_v4/broadcast/overload1.html
-/doc/html/boost_asio/reference/ip__address_v4/broadcast/overload2.html
-/doc/html/boost_asio/reference/ip__address_v4/bytes_type.html
-/doc/html/boost_asio/reference/ip__address_v4/from_string/
-/doc/html/boost_asio/reference/ip__address_v4/from_string.html
-/doc/html/boost_asio/reference/ip__address_v4/from_string/overload1.html
-/doc/html/boost_asio/reference/ip__address_v4/from_string/overload2.html
-/doc/html/boost_asio/reference/ip__address_v4/from_string/overload3.html
-/doc/html/boost_asio/reference/ip__address_v4/from_string/overload4.html
-/doc/html/boost_asio/reference/ip__address_v4.html
-/doc/html/boost_asio/reference/ip__address_v4/is_class_a.html
-/doc/html/boost_asio/reference/ip__address_v4/is_class_b.html
-/doc/html/boost_asio/reference/ip__address_v4/is_class_c.html
-/doc/html/boost_asio/reference/ip__address_v4/is_loopback.html
-/doc/html/boost_asio/reference/ip__address_v4/is_multicast.html
-/doc/html/boost_asio/reference/ip__address_v4/is_unspecified.html
-/doc/html/boost_asio/reference/ip__address_v4/loopback.html
-/doc/html/boost_asio/reference/ip__address_v4/netmask.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_eq_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_gt__eq_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_gt_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_lt__eq_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_lt_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_lt__lt_.html
-/doc/html/boost_asio/reference/ip__address_v4/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__address_v4/to_bytes.html
-/doc/html/boost_asio/reference/ip__address_v4/to_string/
-/doc/html/boost_asio/reference/ip__address_v4/to_string.html
-/doc/html/boost_asio/reference/ip__address_v4/to_string/overload1.html
-/doc/html/boost_asio/reference/ip__address_v4/to_string/overload2.html
-/doc/html/boost_asio/reference/ip__address_v4/to_ulong.html
-/doc/html/boost_asio/reference/ip__address_v6/
-/doc/html/boost_asio/reference/ip__address_v6/address_v6/
-/doc/html/boost_asio/reference/ip__address_v6/address_v6.html
-/doc/html/boost_asio/reference/ip__address_v6/address_v6/overload1.html
-/doc/html/boost_asio/reference/ip__address_v6/address_v6/overload2.html
-/doc/html/boost_asio/reference/ip__address_v6/address_v6/overload3.html
-/doc/html/boost_asio/reference/ip__address_v6/any.html
-/doc/html/boost_asio/reference/ip__address_v6/bytes_type.html
-/doc/html/boost_asio/reference/ip__address_v6/from_string/
-/doc/html/boost_asio/reference/ip__address_v6/from_string.html
-/doc/html/boost_asio/reference/ip__address_v6/from_string/overload1.html
-/doc/html/boost_asio/reference/ip__address_v6/from_string/overload2.html
-/doc/html/boost_asio/reference/ip__address_v6/from_string/overload3.html
-/doc/html/boost_asio/reference/ip__address_v6/from_string/overload4.html
-/doc/html/boost_asio/reference/ip__address_v6.html
-/doc/html/boost_asio/reference/ip__address_v6/is_link_local.html
-/doc/html/boost_asio/reference/ip__address_v6/is_loopback.html
-/doc/html/boost_asio/reference/ip__address_v6/is_multicast_global.html
-/doc/html/boost_asio/reference/ip__address_v6/is_multicast.html
-/doc/html/boost_asio/reference/ip__address_v6/is_multicast_link_local.html
-/doc/html/boost_asio/reference/ip__address_v6/is_multicast_node_local.html
-/doc/html/boost_asio/reference/ip__address_v6/is_multicast_org_local.html
-/doc/html/boost_asio/reference/ip__address_v6/is_multicast_site_local.html
-/doc/html/boost_asio/reference/ip__address_v6/is_site_local.html
-/doc/html/boost_asio/reference/ip__address_v6/is_unspecified.html
-/doc/html/boost_asio/reference/ip__address_v6/is_v4_compatible.html
-/doc/html/boost_asio/reference/ip__address_v6/is_v4_mapped.html
-/doc/html/boost_asio/reference/ip__address_v6/loopback.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_eq_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_gt__eq_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_gt_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_lt__eq_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_lt_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_lt__lt_.html
-/doc/html/boost_asio/reference/ip__address_v6/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__address_v6/scope_id/
-/doc/html/boost_asio/reference/ip__address_v6/scope_id.html
-/doc/html/boost_asio/reference/ip__address_v6/scope_id/overload1.html
-/doc/html/boost_asio/reference/ip__address_v6/scope_id/overload2.html
-/doc/html/boost_asio/reference/ip__address_v6/to_bytes.html
-/doc/html/boost_asio/reference/ip__address_v6/to_string/
-/doc/html/boost_asio/reference/ip__address_v6/to_string.html
-/doc/html/boost_asio/reference/ip__address_v6/to_string/overload1.html
-/doc/html/boost_asio/reference/ip__address_v6/to_string/overload2.html
-/doc/html/boost_asio/reference/ip__address_v6/to_v4.html
-/doc/html/boost_asio/reference/ip__address_v6/v4_compatible.html
-/doc/html/boost_asio/reference/ip__address_v6/v4_mapped.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/
-/doc/html/boost_asio/reference/ip__basic_endpoint/address/
-/doc/html/boost_asio/reference/ip__basic_endpoint/address.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/address/overload1.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/address/overload2.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/basic_endpoint/
-/doc/html/boost_asio/reference/ip__basic_endpoint/basic_endpoint.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/basic_endpoint/overload1.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/basic_endpoint/overload2.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/basic_endpoint/overload3.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/basic_endpoint/overload4.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/capacity.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/data/
-/doc/html/boost_asio/reference/ip__basic_endpoint/data.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/data/overload1.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/data/overload2.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/data_type.html
-/doc/html/boost_asio/reference/ip__basic_endpoint.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_eq_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_gt__eq_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_gt_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_lt__eq_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_lt_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_lt__lt_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/port/
-/doc/html/boost_asio/reference/ip__basic_endpoint/port.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/port/overload1.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/port/overload2.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/protocol.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/protocol_type.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/resize.html
-/doc/html/boost_asio/reference/ip__basic_endpoint/size.html
-/doc/html/boost_asio/reference/ip__basic_resolver/
-/doc/html/boost_asio/reference/ip__basic_resolver/async_resolve/
-/doc/html/boost_asio/reference/ip__basic_resolver/async_resolve.html
-/doc/html/boost_asio/reference/ip__basic_resolver/async_resolve/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver/async_resolve/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver/basic_resolver.html
-/doc/html/boost_asio/reference/ip__basic_resolver/cancel.html
-/doc/html/boost_asio/reference/ip__basic_resolver/endpoint_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/basic_resolver_entry/
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/basic_resolver_entry.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/basic_resolver_entry/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/basic_resolver_entry/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/endpoint.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/endpoint_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/host_name.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/operator_endpoint_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/protocol_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_entry/service_name.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_implementation/
-/doc/html/boost_asio/reference/ip__basic_resolver/get_implementation.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_implementation/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_implementation/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_io_service.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_service/
-/doc/html/boost_asio/reference/ip__basic_resolver/get_service.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_service/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver/get_service/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver.html
-/doc/html/boost_asio/reference/ip__basic_resolver/implementation.html
-/doc/html/boost_asio/reference/ip__basic_resolver/implementation_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/basic_resolver_iterator.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/create/
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/create.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/create/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/create/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/create/overload3.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/difference_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator.html
-/doc/html/boost_asio/reference/ip__basic_resolver/iterator.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/iterator_category.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_arrow_.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_plus__plus_/
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_plus__plus_.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_plus__plus_/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator_plus__plus_/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/operator__star_.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/pointer.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/reference.html
-/doc/html/boost_asio/reference/ip__basic_resolver_iterator/value_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver/protocol_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/
-/doc/html/boost_asio/reference/ip__basic_resolver_query/address_configured.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/all_matching.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_query/
-/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_query.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_query/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_query/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_query/overload3.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_query/overload4.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/canonical_name.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/flags.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/hints.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/host_name.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query.html
-/doc/html/boost_asio/reference/ip__basic_resolver/query.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/numeric_host.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/numeric_service.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/passive.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/protocol_type.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/service_name.html
-/doc/html/boost_asio/reference/ip__basic_resolver_query/v4_mapped.html
-/doc/html/boost_asio/reference/ip__basic_resolver/resolve/
-/doc/html/boost_asio/reference/ip__basic_resolver/resolve.html
-/doc/html/boost_asio/reference/ip__basic_resolver/resolve/overload1.html
-/doc/html/boost_asio/reference/ip__basic_resolver/resolve/overload2.html
-/doc/html/boost_asio/reference/ip__basic_resolver/resolve/overload3.html
-/doc/html/boost_asio/reference/ip__basic_resolver/resolve/overload4.html
-/doc/html/boost_asio/reference/ip__basic_resolver/service.html
-/doc/html/boost_asio/reference/ip__basic_resolver/service_type.html
-/doc/html/boost_asio/reference/ip__host_name/
-/doc/html/boost_asio/reference/ip__host_name.html
-/doc/html/boost_asio/reference/ip__host_name/overload1.html
-/doc/html/boost_asio/reference/ip__host_name/overload2.html
-/doc/html/boost_asio/reference/ip__icmp/
-/doc/html/boost_asio/reference/ip__icmp/endpoint.html
-/doc/html/boost_asio/reference/ip__icmp/family.html
-/doc/html/boost_asio/reference/ip__icmp.html
-/doc/html/boost_asio/reference/ip__icmp/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__icmp/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__icmp/protocol.html
-/doc/html/boost_asio/reference/ip__icmp/resolver.html
-/doc/html/boost_asio/reference/ip__icmp/socket.html
-/doc/html/boost_asio/reference/ip__icmp/type.html
-/doc/html/boost_asio/reference/ip__icmp/v4.html
-/doc/html/boost_asio/reference/ip__icmp/v6.html
-/doc/html/boost_asio/reference/ip__multicast__enable_loopback.html
-/doc/html/boost_asio/reference/ip__multicast__hops.html
-/doc/html/boost_asio/reference/ip__multicast__join_group.html
-/doc/html/boost_asio/reference/ip__multicast__leave_group.html
-/doc/html/boost_asio/reference/ip__multicast__outbound_interface.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/
-/doc/html/boost_asio/reference/ip__resolver_query_base/address_configured.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/all_matching.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/canonical_name.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/flags.html
-/doc/html/boost_asio/reference/ip__resolver_query_base.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/numeric_host.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/numeric_service.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/passive.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/_resolver_query_base.html
-/doc/html/boost_asio/reference/ip__resolver_query_base/v4_mapped.html
-/doc/html/boost_asio/reference/ip__resolver_service/
-/doc/html/boost_asio/reference/ip__resolver_service/async_resolve/
-/doc/html/boost_asio/reference/ip__resolver_service/async_resolve.html
-/doc/html/boost_asio/reference/ip__resolver_service/async_resolve/overload1.html
-/doc/html/boost_asio/reference/ip__resolver_service/async_resolve/overload2.html
-/doc/html/boost_asio/reference/ip__resolver_service/cancel.html
-/doc/html/boost_asio/reference/ip__resolver_service/construct.html
-/doc/html/boost_asio/reference/ip__resolver_service/destroy.html
-/doc/html/boost_asio/reference/ip__resolver_service/endpoint_type.html
-/doc/html/boost_asio/reference/ip__resolver_service/get_io_service.html
-/doc/html/boost_asio/reference/ip__resolver_service.html
-/doc/html/boost_asio/reference/ip__resolver_service/id.html
-/doc/html/boost_asio/reference/ip__resolver_service/implementation_type.html
-/doc/html/boost_asio/reference/ip__resolver_service/iterator_type.html
-/doc/html/boost_asio/reference/ip__resolver_service/protocol_type.html
-/doc/html/boost_asio/reference/ip__resolver_service/query_type.html
-/doc/html/boost_asio/reference/ip__resolver_service/resolve/
-/doc/html/boost_asio/reference/ip__resolver_service/resolve.html
-/doc/html/boost_asio/reference/ip__resolver_service/resolve/overload1.html
-/doc/html/boost_asio/reference/ip__resolver_service/resolve/overload2.html
-/doc/html/boost_asio/reference/ip__resolver_service/resolver_service.html
-/doc/html/boost_asio/reference/ip__tcp/
-/doc/html/boost_asio/reference/ip__tcp/acceptor.html
-/doc/html/boost_asio/reference/ip__tcp/endpoint.html
-/doc/html/boost_asio/reference/ip__tcp/family.html
-/doc/html/boost_asio/reference/ip__tcp.html
-/doc/html/boost_asio/reference/ip__tcp/iostream.html
-/doc/html/boost_asio/reference/ip__tcp/no_delay.html
-/doc/html/boost_asio/reference/ip__tcp/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__tcp/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__tcp/protocol.html
-/doc/html/boost_asio/reference/ip__tcp/resolver.html
-/doc/html/boost_asio/reference/ip__tcp/socket.html
-/doc/html/boost_asio/reference/ip__tcp/type.html
-/doc/html/boost_asio/reference/ip__tcp/v4.html
-/doc/html/boost_asio/reference/ip__tcp/v6.html
-/doc/html/boost_asio/reference/ip__udp/
-/doc/html/boost_asio/reference/ip__udp/endpoint.html
-/doc/html/boost_asio/reference/ip__udp/family.html
-/doc/html/boost_asio/reference/ip__udp.html
-/doc/html/boost_asio/reference/ip__udp/operator_eq__eq_.html
-/doc/html/boost_asio/reference/ip__udp/operator_not__eq_.html
-/doc/html/boost_asio/reference/ip__udp/protocol.html
-/doc/html/boost_asio/reference/ip__udp/resolver.html
-/doc/html/boost_asio/reference/ip__udp/socket.html
-/doc/html/boost_asio/reference/ip__udp/type.html
-/doc/html/boost_asio/reference/ip__udp/v4.html
-/doc/html/boost_asio/reference/ip__udp/v6.html
-/doc/html/boost_asio/reference/ip__unicast__hops.html
-/doc/html/boost_asio/reference/ip__v6_only.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__addrinfo_errors__gt_/
-/doc/html/boost_asio/reference/is_error_code_enum_lt__addrinfo_errors__gt_.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__addrinfo_errors__gt_/value.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__basic_errors__gt_/
-/doc/html/boost_asio/reference/is_error_code_enum_lt__basic_errors__gt_.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__basic_errors__gt_/value.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__misc_errors__gt_/
-/doc/html/boost_asio/reference/is_error_code_enum_lt__misc_errors__gt_.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__misc_errors__gt_/value.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__netdb_errors__gt_/
-/doc/html/boost_asio/reference/is_error_code_enum_lt__netdb_errors__gt_.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__netdb_errors__gt_/value.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__ssl_errors__gt_/
-/doc/html/boost_asio/reference/is_error_code_enum_lt__ssl_errors__gt_.html
-/doc/html/boost_asio/reference/is_error_code_enum_lt__ssl_errors__gt_/value.html
-/doc/html/boost_asio/reference/is_match_condition/
-/doc/html/boost_asio/reference/is_match_condition.html
-/doc/html/boost_asio/reference/is_match_condition/value.html
-/doc/html/boost_asio/reference/is_read_buffered/
-/doc/html/boost_asio/reference/is_read_buffered.html
-/doc/html/boost_asio/reference/is_read_buffered/value.html
-/doc/html/boost_asio/reference/is_write_buffered/
-/doc/html/boost_asio/reference/is_write_buffered.html
-/doc/html/boost_asio/reference/is_write_buffered/value.html
-/doc/html/boost_asio/reference/local__basic_endpoint/
-/doc/html/boost_asio/reference/local__basic_endpoint/basic_endpoint/
-/doc/html/boost_asio/reference/local__basic_endpoint/basic_endpoint.html
-/doc/html/boost_asio/reference/local__basic_endpoint/basic_endpoint/overload1.html
-/doc/html/boost_asio/reference/local__basic_endpoint/basic_endpoint/overload2.html
-/doc/html/boost_asio/reference/local__basic_endpoint/basic_endpoint/overload3.html
-/doc/html/boost_asio/reference/local__basic_endpoint/basic_endpoint/overload4.html
-/doc/html/boost_asio/reference/local__basic_endpoint/capacity.html
-/doc/html/boost_asio/reference/local__basic_endpoint/data/
-/doc/html/boost_asio/reference/local__basic_endpoint/data.html
-/doc/html/boost_asio/reference/local__basic_endpoint/data/overload1.html
-/doc/html/boost_asio/reference/local__basic_endpoint/data/overload2.html
-/doc/html/boost_asio/reference/local__basic_endpoint/data_type.html
-/doc/html/boost_asio/reference/local__basic_endpoint.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_eq__eq_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_eq_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_gt__eq_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_gt_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_lt__eq_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_lt_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_lt__lt_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/operator_not__eq_.html
-/doc/html/boost_asio/reference/local__basic_endpoint/path/
-/doc/html/boost_asio/reference/local__basic_endpoint/path.html
-/doc/html/boost_asio/reference/local__basic_endpoint/path/overload1.html
-/doc/html/boost_asio/reference/local__basic_endpoint/path/overload2.html
-/doc/html/boost_asio/reference/local__basic_endpoint/path/overload3.html
-/doc/html/boost_asio/reference/local__basic_endpoint/protocol.html
-/doc/html/boost_asio/reference/local__basic_endpoint/protocol_type.html
-/doc/html/boost_asio/reference/local__basic_endpoint/resize.html
-/doc/html/boost_asio/reference/local__basic_endpoint/size.html
-/doc/html/boost_asio/reference/local__connect_pair/
-/doc/html/boost_asio/reference/local__connect_pair.html
-/doc/html/boost_asio/reference/local__connect_pair/overload1.html
-/doc/html/boost_asio/reference/local__connect_pair/overload2.html
-/doc/html/boost_asio/reference/local__datagram_protocol/
-/doc/html/boost_asio/reference/local__datagram_protocol/endpoint.html
-/doc/html/boost_asio/reference/local__datagram_protocol/family.html
-/doc/html/boost_asio/reference/local__datagram_protocol.html
-/doc/html/boost_asio/reference/local__datagram_protocol/protocol.html
-/doc/html/boost_asio/reference/local__datagram_protocol/socket.html
-/doc/html/boost_asio/reference/local__datagram_protocol/type.html
-/doc/html/boost_asio/reference/local__stream_protocol/
-/doc/html/boost_asio/reference/local__stream_protocol/acceptor.html
-/doc/html/boost_asio/reference/local__stream_protocol/endpoint.html
-/doc/html/boost_asio/reference/local__stream_protocol/family.html
-/doc/html/boost_asio/reference/local__stream_protocol.html
-/doc/html/boost_asio/reference/local__stream_protocol/iostream.html
-/doc/html/boost_asio/reference/local__stream_protocol/protocol.html
-/doc/html/boost_asio/reference/local__stream_protocol/socket.html
-/doc/html/boost_asio/reference/local__stream_protocol/type.html
-/doc/html/boost_asio/reference/mutable_buffer/
-/doc/html/boost_asio/reference/mutable_buffer.html
-/doc/html/boost_asio/reference/mutable_buffer/mutable_buffer/
-/doc/html/boost_asio/reference/mutable_buffer/mutable_buffer.html
-/doc/html/boost_asio/reference/mutable_buffer/mutable_buffer/overload1.html
-/doc/html/boost_asio/reference/mutable_buffer/mutable_buffer/overload2.html
-/doc/html/boost_asio/reference/mutable_buffer/operator_plus_/
-/doc/html/boost_asio/reference/mutable_buffer/operator_plus_.html
-/doc/html/boost_asio/reference/mutable_buffer/operator_plus_/overload1.html
-/doc/html/boost_asio/reference/mutable_buffer/operator_plus_/overload2.html
-/doc/html/boost_asio/reference/mutable_buffers_1/
-/doc/html/boost_asio/reference/mutable_buffers_1/begin.html
-/doc/html/boost_asio/reference/mutable_buffers_1/const_iterator.html
-/doc/html/boost_asio/reference/mutable_buffers_1/end.html
-/doc/html/boost_asio/reference/mutable_buffers_1.html
-/doc/html/boost_asio/reference/mutable_buffers_1/mutable_buffers_1/
-/doc/html/boost_asio/reference/mutable_buffers_1/mutable_buffers_1.html
-/doc/html/boost_asio/reference/mutable_buffers_1/mutable_buffers_1/overload1.html
-/doc/html/boost_asio/reference/mutable_buffers_1/mutable_buffers_1/overload2.html
-/doc/html/boost_asio/reference/mutable_buffers_1/operator_plus_/
-/doc/html/boost_asio/reference/mutable_buffers_1/operator_plus_.html
-/doc/html/boost_asio/reference/mutable_buffers_1/operator_plus_/overload1.html
-/doc/html/boost_asio/reference/mutable_buffers_1/operator_plus_/overload2.html
-/doc/html/boost_asio/reference/mutable_buffers_1/value_type.html
-/doc/html/boost_asio/reference/MutableBufferSequence.html
-/doc/html/boost_asio/reference/null_buffers/
-/doc/html/boost_asio/reference/null_buffers/begin.html
-/doc/html/boost_asio/reference/null_buffers/const_iterator.html
-/doc/html/boost_asio/reference/null_buffers/end.html
-/doc/html/boost_asio/reference/null_buffers.html
-/doc/html/boost_asio/reference/null_buffers/value_type.html
-/doc/html/boost_asio/reference/ObjectHandleService.html
-/doc/html/boost_asio/reference/placeholders__bytes_transferred.html
-/doc/html/boost_asio/reference/placeholders__error.html
-/doc/html/boost_asio/reference/placeholders__iterator.html
-/doc/html/boost_asio/reference/placeholders__signal_number.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/
-/doc/html/boost_asio/reference/posix__basic_descriptor/assign/
-/doc/html/boost_asio/reference/posix__basic_descriptor/assign.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/assign/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/assign/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/basic_descriptor/
-/doc/html/boost_asio/reference/posix__basic_descriptor/_basic_descriptor.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/basic_descriptor.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/basic_descriptor/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/basic_descriptor/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/basic_descriptor/overload3.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/bytes_readable.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/cancel/
-/doc/html/boost_asio/reference/posix__basic_descriptor/cancel.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/cancel/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/cancel/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/close/
-/doc/html/boost_asio/reference/posix__basic_descriptor/close.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/close/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/close/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_implementation/
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_implementation.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_implementation/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_implementation/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_io_service.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_service/
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_service.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_service/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/get_service/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/implementation.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/implementation_type.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/io_control/
-/doc/html/boost_asio/reference/posix__basic_descriptor/io_control.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/io_control/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/io_control/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/is_open.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/lowest_layer/
-/doc/html/boost_asio/reference/posix__basic_descriptor/lowest_layer.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/lowest_layer_type.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_handle.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_handle_type.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_non_blocking/
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_non_blocking.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/native_type.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/non_blocking/
-/doc/html/boost_asio/reference/posix__basic_descriptor/non_blocking.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/non_blocking_io.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/non_blocking/overload1.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/non_blocking/overload2.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/non_blocking/overload3.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/operator_eq_.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/release.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/service.html
-/doc/html/boost_asio/reference/posix__basic_descriptor/service_type.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/assign/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/assign.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/assign/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/assign/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/async_read_some.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/async_write_some.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/basic_stream_descriptor/overload3.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/bytes_readable.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/cancel/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/cancel.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/cancel/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/cancel/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/close/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/close.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/close/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/close/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_implementation/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_implementation.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_implementation/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_implementation/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_io_service.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_service/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_service.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_service/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/get_service/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/implementation.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/implementation_type.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/io_control/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/io_control.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/io_control/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/io_control/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/is_open.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/lowest_layer/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/lowest_layer.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/lowest_layer_type.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_handle.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_handle_type.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_non_blocking/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_non_blocking.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_non_blocking/overload3.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/native_type.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/non_blocking/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/non_blocking.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/non_blocking_io.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/non_blocking/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/non_blocking/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/non_blocking/overload3.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/operator_eq_.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/read_some/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/read_some.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/read_some/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/read_some/overload2.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/release.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/service.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/service_type.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/write_some/
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/write_some.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/write_some/overload1.html
-/doc/html/boost_asio/reference/posix__basic_stream_descriptor/write_some/overload2.html
-/doc/html/boost_asio/reference/posix__descriptor_base/
-/doc/html/boost_asio/reference/posix__descriptor_base/bytes_readable.html
-/doc/html/boost_asio/reference/posix__descriptor_base/_descriptor_base.html
-/doc/html/boost_asio/reference/posix__descriptor_base.html
-/doc/html/boost_asio/reference/posix__descriptor_base/non_blocking_io.html
-/doc/html/boost_asio/reference/posix__stream_descriptor.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/assign.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/async_read_some.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/async_write_some.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/cancel.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/close.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/construct.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/destroy.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/get_io_service.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/id.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/implementation_type.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/io_control.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/is_open.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/move_assign.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/move_construct.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_handle.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_handle_type.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_non_blocking/
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_non_blocking.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/native_type.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/non_blocking/
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/non_blocking.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/non_blocking/overload1.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/non_blocking/overload2.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/read_some.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/release.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/stream_descriptor_service.html
-/doc/html/boost_asio/reference/posix__stream_descriptor_service/write_some.html
-/doc/html/boost_asio/reference/Protocol.html
-/doc/html/boost_asio/reference/RandomAccessHandleService.html
-/doc/html/boost_asio/reference/raw_socket_service/
-/doc/html/boost_asio/reference/raw_socket_service/assign.html
-/doc/html/boost_asio/reference/raw_socket_service/async_connect.html
-/doc/html/boost_asio/reference/raw_socket_service/async_receive_from.html
-/doc/html/boost_asio/reference/raw_socket_service/async_receive.html
-/doc/html/boost_asio/reference/raw_socket_service/async_send.html
-/doc/html/boost_asio/reference/raw_socket_service/async_send_to.html
-/doc/html/boost_asio/reference/raw_socket_service/at_mark.html
-/doc/html/boost_asio/reference/raw_socket_service/available.html
-/doc/html/boost_asio/reference/raw_socket_service/bind.html
-/doc/html/boost_asio/reference/raw_socket_service/cancel.html
-/doc/html/boost_asio/reference/raw_socket_service/close.html
-/doc/html/boost_asio/reference/raw_socket_service/connect.html
-/doc/html/boost_asio/reference/raw_socket_service/construct.html
-/doc/html/boost_asio/reference/raw_socket_service/converting_move_construct.html
-/doc/html/boost_asio/reference/raw_socket_service/destroy.html
-/doc/html/boost_asio/reference/raw_socket_service/endpoint_type.html
-/doc/html/boost_asio/reference/raw_socket_service/get_io_service.html
-/doc/html/boost_asio/reference/raw_socket_service/get_option.html
-/doc/html/boost_asio/reference/raw_socket_service.html
-/doc/html/boost_asio/reference/RawSocketService.html
-/doc/html/boost_asio/reference/raw_socket_service/id.html
-/doc/html/boost_asio/reference/raw_socket_service/implementation_type.html
-/doc/html/boost_asio/reference/raw_socket_service/io_control.html
-/doc/html/boost_asio/reference/raw_socket_service/is_open.html
-/doc/html/boost_asio/reference/raw_socket_service/local_endpoint.html
-/doc/html/boost_asio/reference/raw_socket_service/move_assign.html
-/doc/html/boost_asio/reference/raw_socket_service/move_construct.html
-/doc/html/boost_asio/reference/raw_socket_service/native_handle.html
-/doc/html/boost_asio/reference/raw_socket_service/native_handle_type.html
-/doc/html/boost_asio/reference/raw_socket_service/native.html
-/doc/html/boost_asio/reference/raw_socket_service/native_non_blocking/
-/doc/html/boost_asio/reference/raw_socket_service/native_non_blocking.html
-/doc/html/boost_asio/reference/raw_socket_service/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/raw_socket_service/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/raw_socket_service/native_type.html
-/doc/html/boost_asio/reference/raw_socket_service/non_blocking/
-/doc/html/boost_asio/reference/raw_socket_service/non_blocking.html
-/doc/html/boost_asio/reference/raw_socket_service/non_blocking/overload1.html
-/doc/html/boost_asio/reference/raw_socket_service/non_blocking/overload2.html
-/doc/html/boost_asio/reference/raw_socket_service/open.html
-/doc/html/boost_asio/reference/raw_socket_service/protocol_type.html
-/doc/html/boost_asio/reference/raw_socket_service/raw_socket_service.html
-/doc/html/boost_asio/reference/raw_socket_service/receive_from.html
-/doc/html/boost_asio/reference/raw_socket_service/receive.html
-/doc/html/boost_asio/reference/raw_socket_service/remote_endpoint.html
-/doc/html/boost_asio/reference/raw_socket_service/send.html
-/doc/html/boost_asio/reference/raw_socket_service/send_to.html
-/doc/html/boost_asio/reference/raw_socket_service/set_option.html
-/doc/html/boost_asio/reference/raw_socket_service/shutdown.html
-/doc/html/boost_asio/reference/read/
-/doc/html/boost_asio/reference/read_at/
-/doc/html/boost_asio/reference/read_at.html
-/doc/html/boost_asio/reference/read_at/overload1.html
-/doc/html/boost_asio/reference/read_at/overload2.html
-/doc/html/boost_asio/reference/read_at/overload3.html
-/doc/html/boost_asio/reference/read_at/overload4.html
-/doc/html/boost_asio/reference/read_at/overload5.html
-/doc/html/boost_asio/reference/read_at/overload6.html
-/doc/html/boost_asio/reference/read_at/overload7.html
-/doc/html/boost_asio/reference/read_at/overload8.html
-/doc/html/boost_asio/reference/ReadHandler.html
-/doc/html/boost_asio/reference/read.html
-/doc/html/boost_asio/reference/read/overload1.html
-/doc/html/boost_asio/reference/read/overload2.html
-/doc/html/boost_asio/reference/read/overload3.html
-/doc/html/boost_asio/reference/read/overload4.html
-/doc/html/boost_asio/reference/read/overload5.html
-/doc/html/boost_asio/reference/read/overload6.html
-/doc/html/boost_asio/reference/read/overload7.html
-/doc/html/boost_asio/reference/read/overload8.html
-/doc/html/boost_asio/reference/read_until/
-/doc/html/boost_asio/reference/read_until.html
-/doc/html/boost_asio/reference/read_until/overload1.html
-/doc/html/boost_asio/reference/read_until/overload2.html
-/doc/html/boost_asio/reference/read_until/overload3.html
-/doc/html/boost_asio/reference/read_until/overload4.html
-/doc/html/boost_asio/reference/read_until/overload5.html
-/doc/html/boost_asio/reference/read_until/overload6.html
-/doc/html/boost_asio/reference/read_until/overload7.html
-/doc/html/boost_asio/reference/read_until/overload8.html
-/doc/html/boost_asio/reference/ResolveHandler.html
-/doc/html/boost_asio/reference/ResolverService.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/
-/doc/html/boost_asio/reference/seq_packet_socket_service/assign.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/async_connect.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/async_receive.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/async_send.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/at_mark.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/available.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/bind.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/cancel.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/close.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/connect.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/construct.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/converting_move_construct.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/destroy.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/endpoint_type.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/get_io_service.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/get_option.html
-/doc/html/boost_asio/reference/seq_packet_socket_service.html
-/doc/html/boost_asio/reference/SeqPacketSocketService.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/id.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/implementation_type.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/io_control.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/is_open.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/local_endpoint.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/move_assign.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/move_construct.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_handle.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_handle_type.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_non_blocking/
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_non_blocking.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/native_type.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/non_blocking/
-/doc/html/boost_asio/reference/seq_packet_socket_service/non_blocking.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/non_blocking/overload1.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/non_blocking/overload2.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/open.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/protocol_type.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/receive.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/remote_endpoint.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/send.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/seq_packet_socket_service.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/set_option.html
-/doc/html/boost_asio/reference/seq_packet_socket_service/shutdown.html
-/doc/html/boost_asio/reference/serial_port_base/
-/doc/html/boost_asio/reference/serial_port_base__baud_rate/
-/doc/html/boost_asio/reference/serial_port_base__baud_rate/baud_rate.html
-/doc/html/boost_asio/reference/serial_port_base__baud_rate.html
-/doc/html/boost_asio/reference/serial_port_base__baud_rate/load.html
-/doc/html/boost_asio/reference/serial_port_base__baud_rate/store.html
-/doc/html/boost_asio/reference/serial_port_base__baud_rate/value.html
-/doc/html/boost_asio/reference/serial_port_base__character_size/
-/doc/html/boost_asio/reference/serial_port_base__character_size/character_size.html
-/doc/html/boost_asio/reference/serial_port_base__character_size.html
-/doc/html/boost_asio/reference/serial_port_base__character_size/load.html
-/doc/html/boost_asio/reference/serial_port_base__character_size/store.html
-/doc/html/boost_asio/reference/serial_port_base__character_size/value.html
-/doc/html/boost_asio/reference/serial_port_base__flow_control/
-/doc/html/boost_asio/reference/serial_port_base__flow_control/flow_control.html
-/doc/html/boost_asio/reference/serial_port_base__flow_control.html
-/doc/html/boost_asio/reference/serial_port_base__flow_control/load.html
-/doc/html/boost_asio/reference/serial_port_base__flow_control/store.html
-/doc/html/boost_asio/reference/serial_port_base__flow_control/type.html
-/doc/html/boost_asio/reference/serial_port_base__flow_control/value.html
-/doc/html/boost_asio/reference/serial_port_base.html
-/doc/html/boost_asio/reference/serial_port_base__parity/
-/doc/html/boost_asio/reference/serial_port_base__parity.html
-/doc/html/boost_asio/reference/serial_port_base__parity/load.html
-/doc/html/boost_asio/reference/serial_port_base__parity/parity.html
-/doc/html/boost_asio/reference/serial_port_base__parity/store.html
-/doc/html/boost_asio/reference/serial_port_base__parity/type.html
-/doc/html/boost_asio/reference/serial_port_base__parity/value.html
-/doc/html/boost_asio/reference/serial_port_base/_serial_port_base.html
-/doc/html/boost_asio/reference/serial_port_base__stop_bits/
-/doc/html/boost_asio/reference/serial_port_base__stop_bits.html
-/doc/html/boost_asio/reference/serial_port_base__stop_bits/load.html
-/doc/html/boost_asio/reference/serial_port_base__stop_bits/stop_bits.html
-/doc/html/boost_asio/reference/serial_port_base__stop_bits/store.html
-/doc/html/boost_asio/reference/serial_port_base__stop_bits/type.html
-/doc/html/boost_asio/reference/serial_port_base__stop_bits/value.html
-/doc/html/boost_asio/reference/serial_port.html
-/doc/html/boost_asio/reference/serial_port_service/
-/doc/html/boost_asio/reference/serial_port_service/assign.html
-/doc/html/boost_asio/reference/serial_port_service/async_read_some.html
-/doc/html/boost_asio/reference/serial_port_service/async_write_some.html
-/doc/html/boost_asio/reference/serial_port_service/cancel.html
-/doc/html/boost_asio/reference/serial_port_service/close.html
-/doc/html/boost_asio/reference/serial_port_service/construct.html
-/doc/html/boost_asio/reference/serial_port_service/destroy.html
-/doc/html/boost_asio/reference/serial_port_service/get_io_service.html
-/doc/html/boost_asio/reference/serial_port_service/get_option.html
-/doc/html/boost_asio/reference/serial_port_service.html
-/doc/html/boost_asio/reference/SerialPortService.html
-/doc/html/boost_asio/reference/serial_port_service/id.html
-/doc/html/boost_asio/reference/serial_port_service/implementation_type.html
-/doc/html/boost_asio/reference/serial_port_service/is_open.html
-/doc/html/boost_asio/reference/serial_port_service/move_assign.html
-/doc/html/boost_asio/reference/serial_port_service/move_construct.html
-/doc/html/boost_asio/reference/serial_port_service/native_handle.html
-/doc/html/boost_asio/reference/serial_port_service/native_handle_type.html
-/doc/html/boost_asio/reference/serial_port_service/native.html
-/doc/html/boost_asio/reference/serial_port_service/native_type.html
-/doc/html/boost_asio/reference/serial_port_service/open.html
-/doc/html/boost_asio/reference/serial_port_service/read_some.html
-/doc/html/boost_asio/reference/serial_port_service/send_break.html
-/doc/html/boost_asio/reference/serial_port_service/serial_port_service.html
-/doc/html/boost_asio/reference/serial_port_service/set_option.html
-/doc/html/boost_asio/reference/serial_port_service/write_some.html
-/doc/html/boost_asio/reference/service_already_exists/
-/doc/html/boost_asio/reference/service_already_exists.html
-/doc/html/boost_asio/reference/service_already_exists/service_already_exists.html
-/doc/html/boost_asio/reference/Service.html
-/doc/html/boost_asio/reference/SettableSerialPortOption.html
-/doc/html/boost_asio/reference/SettableSocketOption.html
-/doc/html/boost_asio/reference/ShutdownHandler.html
-/doc/html/boost_asio/reference/SignalHandler.html
-/doc/html/boost_asio/reference/signal_set.html
-/doc/html/boost_asio/reference/signal_set_service/
-/doc/html/boost_asio/reference/signal_set_service/add.html
-/doc/html/boost_asio/reference/signal_set_service/async_wait.html
-/doc/html/boost_asio/reference/signal_set_service/cancel.html
-/doc/html/boost_asio/reference/signal_set_service/clear.html
-/doc/html/boost_asio/reference/signal_set_service/construct.html
-/doc/html/boost_asio/reference/signal_set_service/destroy.html
-/doc/html/boost_asio/reference/signal_set_service/get_io_service.html
-/doc/html/boost_asio/reference/signal_set_service.html
-/doc/html/boost_asio/reference/SignalSetService.html
-/doc/html/boost_asio/reference/signal_set_service/id.html
-/doc/html/boost_asio/reference/signal_set_service/implementation_type.html
-/doc/html/boost_asio/reference/signal_set_service/remove.html
-/doc/html/boost_asio/reference/signal_set_service/signal_set_service.html
-/doc/html/boost_asio/reference/socket_acceptor_service/
-/doc/html/boost_asio/reference/socket_acceptor_service/accept.html
-/doc/html/boost_asio/reference/socket_acceptor_service/assign.html
-/doc/html/boost_asio/reference/socket_acceptor_service/async_accept.html
-/doc/html/boost_asio/reference/socket_acceptor_service/bind.html
-/doc/html/boost_asio/reference/socket_acceptor_service/cancel.html
-/doc/html/boost_asio/reference/socket_acceptor_service/close.html
-/doc/html/boost_asio/reference/socket_acceptor_service/construct.html
-/doc/html/boost_asio/reference/socket_acceptor_service/converting_move_construct.html
-/doc/html/boost_asio/reference/socket_acceptor_service/destroy.html
-/doc/html/boost_asio/reference/socket_acceptor_service/endpoint_type.html
-/doc/html/boost_asio/reference/socket_acceptor_service/get_io_service.html
-/doc/html/boost_asio/reference/socket_acceptor_service/get_option.html
-/doc/html/boost_asio/reference/socket_acceptor_service.html
-/doc/html/boost_asio/reference/SocketAcceptorService.html
-/doc/html/boost_asio/reference/socket_acceptor_service/id.html
-/doc/html/boost_asio/reference/socket_acceptor_service/implementation_type.html
-/doc/html/boost_asio/reference/socket_acceptor_service/io_control.html
-/doc/html/boost_asio/reference/socket_acceptor_service/is_open.html
-/doc/html/boost_asio/reference/socket_acceptor_service/listen.html
-/doc/html/boost_asio/reference/socket_acceptor_service/local_endpoint.html
-/doc/html/boost_asio/reference/socket_acceptor_service/move_assign.html
-/doc/html/boost_asio/reference/socket_acceptor_service/move_construct.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native_handle.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native_handle_type.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native_non_blocking/
-/doc/html/boost_asio/reference/socket_acceptor_service/native_non_blocking.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/socket_acceptor_service/native_type.html
-/doc/html/boost_asio/reference/socket_acceptor_service/non_blocking/
-/doc/html/boost_asio/reference/socket_acceptor_service/non_blocking.html
-/doc/html/boost_asio/reference/socket_acceptor_service/non_blocking/overload1.html
-/doc/html/boost_asio/reference/socket_acceptor_service/non_blocking/overload2.html
-/doc/html/boost_asio/reference/socket_acceptor_service/open.html
-/doc/html/boost_asio/reference/socket_acceptor_service/protocol_type.html
-/doc/html/boost_asio/reference/socket_acceptor_service/set_option.html
-/doc/html/boost_asio/reference/socket_acceptor_service/socket_acceptor_service.html
-/doc/html/boost_asio/reference/socket_base/
-/doc/html/boost_asio/reference/socket_base/broadcast.html
-/doc/html/boost_asio/reference/socket_base/bytes_readable.html
-/doc/html/boost_asio/reference/socket_base/debug.html
-/doc/html/boost_asio/reference/socket_base/do_not_route.html
-/doc/html/boost_asio/reference/socket_base/enable_connection_aborted.html
-/doc/html/boost_asio/reference/socket_base.html
-/doc/html/boost_asio/reference/socket_base/keep_alive.html
-/doc/html/boost_asio/reference/socket_base/linger.html
-/doc/html/boost_asio/reference/socket_base/max_connections.html
-/doc/html/boost_asio/reference/socket_base/message_do_not_route.html
-/doc/html/boost_asio/reference/socket_base/message_end_of_record.html
-/doc/html/boost_asio/reference/socket_base/message_flags.html
-/doc/html/boost_asio/reference/socket_base/message_out_of_band.html
-/doc/html/boost_asio/reference/socket_base/message_peek.html
-/doc/html/boost_asio/reference/socket_base/non_blocking_io.html
-/doc/html/boost_asio/reference/socket_base/receive_buffer_size.html
-/doc/html/boost_asio/reference/socket_base/receive_low_watermark.html
-/doc/html/boost_asio/reference/socket_base/reuse_address.html
-/doc/html/boost_asio/reference/socket_base/send_buffer_size.html
-/doc/html/boost_asio/reference/socket_base/send_low_watermark.html
-/doc/html/boost_asio/reference/socket_base/shutdown_type.html
-/doc/html/boost_asio/reference/socket_base/_socket_base.html
-/doc/html/boost_asio/reference/SocketService.html
-/doc/html/boost_asio/reference/spawn/
-/doc/html/boost_asio/reference/spawn.html
-/doc/html/boost_asio/reference/spawn/overload1.html
-/doc/html/boost_asio/reference/spawn/overload2.html
-/doc/html/boost_asio/reference/spawn/overload3.html
-/doc/html/boost_asio/reference/spawn/overload4.html
-/doc/html/boost_asio/reference/ssl__context/
-/doc/html/boost_asio/reference/ssl__context/add_certificate_authority/
-/doc/html/boost_asio/reference/ssl__context/add_certificate_authority.html
-/doc/html/boost_asio/reference/ssl__context/add_certificate_authority/overload1.html
-/doc/html/boost_asio/reference/ssl__context/add_certificate_authority/overload2.html
-/doc/html/boost_asio/reference/ssl__context/add_verify_path/
-/doc/html/boost_asio/reference/ssl__context/add_verify_path.html
-/doc/html/boost_asio/reference/ssl__context/add_verify_path/overload1.html
-/doc/html/boost_asio/reference/ssl__context/add_verify_path/overload2.html
-/doc/html/boost_asio/reference/ssl__context_base/
-/doc/html/boost_asio/reference/ssl__context_base/_context_base.html
-/doc/html/boost_asio/reference/ssl__context_base/default_workarounds.html
-/doc/html/boost_asio/reference/ssl__context_base/file_format.html
-/doc/html/boost_asio/reference/ssl__context_base.html
-/doc/html/boost_asio/reference/ssl__context_base/method.html
-/doc/html/boost_asio/reference/ssl__context_base/no_compression.html
-/doc/html/boost_asio/reference/ssl__context_base/no_sslv2.html
-/doc/html/boost_asio/reference/ssl__context_base/no_sslv3.html
-/doc/html/boost_asio/reference/ssl__context_base/no_tlsv1.html
-/doc/html/boost_asio/reference/ssl__context_base/options.html
-/doc/html/boost_asio/reference/ssl__context_base/password_purpose.html
-/doc/html/boost_asio/reference/ssl__context_base/single_dh_use.html
-/doc/html/boost_asio/reference/ssl__context/clear_options/
-/doc/html/boost_asio/reference/ssl__context/clear_options.html
-/doc/html/boost_asio/reference/ssl__context/clear_options/overload1.html
-/doc/html/boost_asio/reference/ssl__context/clear_options/overload2.html
-/doc/html/boost_asio/reference/ssl__context/context/
-/doc/html/boost_asio/reference/ssl__context/_context.html
-/doc/html/boost_asio/reference/ssl__context/context.html
-/doc/html/boost_asio/reference/ssl__context/context/overload1.html
-/doc/html/boost_asio/reference/ssl__context/context/overload2.html
-/doc/html/boost_asio/reference/ssl__context/context/overload3.html
-/doc/html/boost_asio/reference/ssl__context/default_workarounds.html
-/doc/html/boost_asio/reference/ssl__context/file_format.html
-/doc/html/boost_asio/reference/ssl__context.html
-/doc/html/boost_asio/reference/ssl__context/impl.html
-/doc/html/boost_asio/reference/ssl__context/impl_type.html
-/doc/html/boost_asio/reference/ssl__context/load_verify_file/
-/doc/html/boost_asio/reference/ssl__context/load_verify_file.html
-/doc/html/boost_asio/reference/ssl__context/load_verify_file/overload1.html
-/doc/html/boost_asio/reference/ssl__context/load_verify_file/overload2.html
-/doc/html/boost_asio/reference/ssl__context/method.html
-/doc/html/boost_asio/reference/ssl__context/native_handle.html
-/doc/html/boost_asio/reference/ssl__context/native_handle_type.html
-/doc/html/boost_asio/reference/ssl__context/no_compression.html
-/doc/html/boost_asio/reference/ssl__context/no_sslv2.html
-/doc/html/boost_asio/reference/ssl__context/no_sslv3.html
-/doc/html/boost_asio/reference/ssl__context/no_tlsv1.html
-/doc/html/boost_asio/reference/ssl__context/operator_eq_.html
-/doc/html/boost_asio/reference/ssl__context/options.html
-/doc/html/boost_asio/reference/ssl__context/password_purpose.html
-/doc/html/boost_asio/reference/ssl__context/set_default_verify_paths/
-/doc/html/boost_asio/reference/ssl__context/set_default_verify_paths.html
-/doc/html/boost_asio/reference/ssl__context/set_default_verify_paths/overload1.html
-/doc/html/boost_asio/reference/ssl__context/set_default_verify_paths/overload2.html
-/doc/html/boost_asio/reference/ssl__context/set_options/
-/doc/html/boost_asio/reference/ssl__context/set_options.html
-/doc/html/boost_asio/reference/ssl__context/set_options/overload1.html
-/doc/html/boost_asio/reference/ssl__context/set_options/overload2.html
-/doc/html/boost_asio/reference/ssl__context/set_password_callback/
-/doc/html/boost_asio/reference/ssl__context/set_password_callback.html
-/doc/html/boost_asio/reference/ssl__context/set_password_callback/overload1.html
-/doc/html/boost_asio/reference/ssl__context/set_password_callback/overload2.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_callback/
-/doc/html/boost_asio/reference/ssl__context/set_verify_callback.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_callback/overload1.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_callback/overload2.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_depth/
-/doc/html/boost_asio/reference/ssl__context/set_verify_depth.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_depth/overload1.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_depth/overload2.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_mode/
-/doc/html/boost_asio/reference/ssl__context/set_verify_mode.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_mode/overload1.html
-/doc/html/boost_asio/reference/ssl__context/set_verify_mode/overload2.html
-/doc/html/boost_asio/reference/ssl__context/single_dh_use.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate/
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain/
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain_file/
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain_file.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain_file/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain_file/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_chain/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_file/
-/doc/html/boost_asio/reference/ssl__context/use_certificate_file.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_file/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate_file/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_certificate/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_private_key/
-/doc/html/boost_asio/reference/ssl__context/use_private_key_file/
-/doc/html/boost_asio/reference/ssl__context/use_private_key_file.html
-/doc/html/boost_asio/reference/ssl__context/use_private_key_file/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_private_key_file/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_private_key.html
-/doc/html/boost_asio/reference/ssl__context/use_private_key/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_private_key/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key/
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key_file/
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key_file.html
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key_file/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key_file/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key.html
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_rsa_private_key/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh/
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh_file/
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh_file.html
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh_file/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh_file/overload2.html
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh.html
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh/overload1.html
-/doc/html/boost_asio/reference/ssl__context/use_tmp_dh/overload2.html
-/doc/html/boost_asio/reference/ssl__rfc2818_verification/
-/doc/html/boost_asio/reference/ssl__rfc2818_verification.html
-/doc/html/boost_asio/reference/ssl__rfc2818_verification/operator_lp__rp_.html
-/doc/html/boost_asio/reference/ssl__rfc2818_verification/result_type.html
-/doc/html/boost_asio/reference/ssl__rfc2818_verification/rfc2818_verification.html
-/doc/html/boost_asio/reference/ssl__stream/
-/doc/html/boost_asio/reference/ssl__stream/async_handshake/
-/doc/html/boost_asio/reference/ssl__stream/async_handshake.html
-/doc/html/boost_asio/reference/ssl__stream/async_handshake/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/async_handshake/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/async_read_some.html
-/doc/html/boost_asio/reference/ssl__stream/async_shutdown.html
-/doc/html/boost_asio/reference/ssl__stream/async_write_some.html
-/doc/html/boost_asio/reference/ssl__stream_base/
-/doc/html/boost_asio/reference/ssl__stream_base/handshake_type.html
-/doc/html/boost_asio/reference/ssl__stream_base.html
-/doc/html/boost_asio/reference/ssl__stream_base/_stream_base.html
-/doc/html/boost_asio/reference/ssl__stream/get_io_service.html
-/doc/html/boost_asio/reference/ssl__stream/handshake/
-/doc/html/boost_asio/reference/ssl__stream/handshake.html
-/doc/html/boost_asio/reference/ssl__stream/handshake/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/handshake/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/handshake/overload3.html
-/doc/html/boost_asio/reference/ssl__stream/handshake/overload4.html
-/doc/html/boost_asio/reference/ssl__stream/handshake_type.html
-/doc/html/boost_asio/reference/ssl__stream.html
-/doc/html/boost_asio/reference/ssl__stream/impl.html
-/doc/html/boost_asio/reference/ssl__stream__impl_struct/
-/doc/html/boost_asio/reference/ssl__stream__impl_struct.html
-/doc/html/boost_asio/reference/ssl__stream__impl_struct/ssl.html
-/doc/html/boost_asio/reference/ssl__stream/impl_type.html
-/doc/html/boost_asio/reference/ssl__stream/lowest_layer/
-/doc/html/boost_asio/reference/ssl__stream/lowest_layer.html
-/doc/html/boost_asio/reference/ssl__stream/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/lowest_layer_type.html
-/doc/html/boost_asio/reference/ssl__stream/native_handle.html
-/doc/html/boost_asio/reference/ssl__stream/native_handle_type.html
-/doc/html/boost_asio/reference/ssl__stream/next_layer/
-/doc/html/boost_asio/reference/ssl__stream/next_layer.html
-/doc/html/boost_asio/reference/ssl__stream/next_layer/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/next_layer/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/next_layer_type.html
-/doc/html/boost_asio/reference/ssl__stream/read_some/
-/doc/html/boost_asio/reference/ssl__stream/read_some.html
-/doc/html/boost_asio/reference/ssl__stream/read_some/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/read_some/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_callback/
-/doc/html/boost_asio/reference/ssl__stream/set_verify_callback.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_callback/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_callback/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_depth/
-/doc/html/boost_asio/reference/ssl__stream/set_verify_depth.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_depth/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_depth/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_mode/
-/doc/html/boost_asio/reference/ssl__stream/set_verify_mode.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_mode/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/set_verify_mode/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/shutdown/
-/doc/html/boost_asio/reference/ssl__stream/shutdown.html
-/doc/html/boost_asio/reference/ssl__stream/shutdown/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/shutdown/overload2.html
-/doc/html/boost_asio/reference/ssl__stream/_stream.html
-/doc/html/boost_asio/reference/ssl__stream/stream.html
-/doc/html/boost_asio/reference/ssl__stream/write_some/
-/doc/html/boost_asio/reference/ssl__stream/write_some.html
-/doc/html/boost_asio/reference/ssl__stream/write_some/overload1.html
-/doc/html/boost_asio/reference/ssl__stream/write_some/overload2.html
-/doc/html/boost_asio/reference/ssl__verify_client_once.html
-/doc/html/boost_asio/reference/ssl__verify_context/
-/doc/html/boost_asio/reference/ssl__verify_context.html
-/doc/html/boost_asio/reference/ssl__verify_context/native_handle.html
-/doc/html/boost_asio/reference/ssl__verify_context/native_handle_type.html
-/doc/html/boost_asio/reference/ssl__verify_context/verify_context.html
-/doc/html/boost_asio/reference/ssl__verify_fail_if_no_peer_cert.html
-/doc/html/boost_asio/reference/ssl__verify_mode.html
-/doc/html/boost_asio/reference/ssl__verify_none.html
-/doc/html/boost_asio/reference/ssl__verify_peer.html
-/doc/html/boost_asio/reference/steady_timer.html
-/doc/html/boost_asio/reference/strand.html
-/doc/html/boost_asio/reference/streambuf.html
-/doc/html/boost_asio/reference/StreamDescriptorService.html
-/doc/html/boost_asio/reference/StreamHandleService.html
-/doc/html/boost_asio/reference/stream_socket_service/
-/doc/html/boost_asio/reference/stream_socket_service/assign.html
-/doc/html/boost_asio/reference/stream_socket_service/async_connect.html
-/doc/html/boost_asio/reference/stream_socket_service/async_receive.html
-/doc/html/boost_asio/reference/stream_socket_service/async_send.html
-/doc/html/boost_asio/reference/stream_socket_service/at_mark.html
-/doc/html/boost_asio/reference/stream_socket_service/available.html
-/doc/html/boost_asio/reference/stream_socket_service/bind.html
-/doc/html/boost_asio/reference/stream_socket_service/cancel.html
-/doc/html/boost_asio/reference/stream_socket_service/close.html
-/doc/html/boost_asio/reference/stream_socket_service/connect.html
-/doc/html/boost_asio/reference/stream_socket_service/construct.html
-/doc/html/boost_asio/reference/stream_socket_service/converting_move_construct.html
-/doc/html/boost_asio/reference/stream_socket_service/destroy.html
-/doc/html/boost_asio/reference/stream_socket_service/endpoint_type.html
-/doc/html/boost_asio/reference/stream_socket_service/get_io_service.html
-/doc/html/boost_asio/reference/stream_socket_service/get_option.html
-/doc/html/boost_asio/reference/stream_socket_service.html
-/doc/html/boost_asio/reference/StreamSocketService.html
-/doc/html/boost_asio/reference/stream_socket_service/id.html
-/doc/html/boost_asio/reference/stream_socket_service/implementation_type.html
-/doc/html/boost_asio/reference/stream_socket_service/io_control.html
-/doc/html/boost_asio/reference/stream_socket_service/is_open.html
-/doc/html/boost_asio/reference/stream_socket_service/local_endpoint.html
-/doc/html/boost_asio/reference/stream_socket_service/move_assign.html
-/doc/html/boost_asio/reference/stream_socket_service/move_construct.html
-/doc/html/boost_asio/reference/stream_socket_service/native_handle.html
-/doc/html/boost_asio/reference/stream_socket_service/native_handle_type.html
-/doc/html/boost_asio/reference/stream_socket_service/native.html
-/doc/html/boost_asio/reference/stream_socket_service/native_non_blocking/
-/doc/html/boost_asio/reference/stream_socket_service/native_non_blocking.html
-/doc/html/boost_asio/reference/stream_socket_service/native_non_blocking/overload1.html
-/doc/html/boost_asio/reference/stream_socket_service/native_non_blocking/overload2.html
-/doc/html/boost_asio/reference/stream_socket_service/native_type.html
-/doc/html/boost_asio/reference/stream_socket_service/non_blocking/
-/doc/html/boost_asio/reference/stream_socket_service/non_blocking.html
-/doc/html/boost_asio/reference/stream_socket_service/non_blocking/overload1.html
-/doc/html/boost_asio/reference/stream_socket_service/non_blocking/overload2.html
-/doc/html/boost_asio/reference/stream_socket_service/open.html
-/doc/html/boost_asio/reference/stream_socket_service/protocol_type.html
-/doc/html/boost_asio/reference/stream_socket_service/receive.html
-/doc/html/boost_asio/reference/stream_socket_service/remote_endpoint.html
-/doc/html/boost_asio/reference/stream_socket_service/send.html
-/doc/html/boost_asio/reference/stream_socket_service/set_option.html
-/doc/html/boost_asio/reference/stream_socket_service/shutdown.html
-/doc/html/boost_asio/reference/stream_socket_service/stream_socket_service.html
-/doc/html/boost_asio/reference/SyncRandomAccessReadDevice.html
-/doc/html/boost_asio/reference/SyncRandomAccessWriteDevice.html
-/doc/html/boost_asio/reference/SyncReadStream.html
-/doc/html/boost_asio/reference/SyncWriteStream.html
-/doc/html/boost_asio/reference/system_timer.html
-/doc/html/boost_asio/reference/TimerService.html
-/doc/html/boost_asio/reference/TimeTraits.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/add.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/duration_type.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/less_than.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/now.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/subtract.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/time_type.html
-/doc/html/boost_asio/reference/time_traits_lt__ptime__gt_/to_posix_duration.html
-/doc/html/boost_asio/reference/transfer_all.html
-/doc/html/boost_asio/reference/transfer_at_least.html
-/doc/html/boost_asio/reference/transfer_exactly.html
-/doc/html/boost_asio/reference/use_future.html
-/doc/html/boost_asio/reference/use_future_t/
-/doc/html/boost_asio/reference/use_future_t/allocator_type.html
-/doc/html/boost_asio/reference/use_future_t/get_allocator.html
-/doc/html/boost_asio/reference/use_future_t.html
-/doc/html/boost_asio/reference/use_future_t/operator_lb__rb_.html
-/doc/html/boost_asio/reference/use_future_t/use_future_t/
-/doc/html/boost_asio/reference/use_future_t/use_future_t.html
-/doc/html/boost_asio/reference/use_future_t/use_future_t/overload1.html
-/doc/html/boost_asio/reference/use_future_t/use_future_t/overload2.html
-/doc/html/boost_asio/reference/use_service.html
-/doc/html/boost_asio/reference/waitable_timer_service/
-/doc/html/boost_asio/reference/waitable_timer_service/async_wait.html
-/doc/html/boost_asio/reference/waitable_timer_service/cancel.html
-/doc/html/boost_asio/reference/waitable_timer_service/cancel_one.html
-/doc/html/boost_asio/reference/waitable_timer_service/clock_type.html
-/doc/html/boost_asio/reference/waitable_timer_service/construct.html
-/doc/html/boost_asio/reference/waitable_timer_service/destroy.html
-/doc/html/boost_asio/reference/waitable_timer_service/duration.html
-/doc/html/boost_asio/reference/waitable_timer_service/expires_at/
-/doc/html/boost_asio/reference/waitable_timer_service/expires_at.html
-/doc/html/boost_asio/reference/waitable_timer_service/expires_at/overload1.html
-/doc/html/boost_asio/reference/waitable_timer_service/expires_at/overload2.html
-/doc/html/boost_asio/reference/waitable_timer_service/expires_from_now/
-/doc/html/boost_asio/reference/waitable_timer_service/expires_from_now.html
-/doc/html/boost_asio/reference/waitable_timer_service/expires_from_now/overload1.html
-/doc/html/boost_asio/reference/waitable_timer_service/expires_from_now/overload2.html
-/doc/html/boost_asio/reference/waitable_timer_service/get_io_service.html
-/doc/html/boost_asio/reference/waitable_timer_service.html
-/doc/html/boost_asio/reference/WaitableTimerService.html
-/doc/html/boost_asio/reference/waitable_timer_service/id.html
-/doc/html/boost_asio/reference/waitable_timer_service/implementation_type.html
-/doc/html/boost_asio/reference/waitable_timer_service/time_point.html
-/doc/html/boost_asio/reference/waitable_timer_service/traits_type.html
-/doc/html/boost_asio/reference/waitable_timer_service/waitable_timer_service.html
-/doc/html/boost_asio/reference/waitable_timer_service/wait.html
-/doc/html/boost_asio/reference/WaitHandler.html
-/doc/html/boost_asio/reference/wait_traits/
-/doc/html/boost_asio/reference/wait_traits.html
-/doc/html/boost_asio/reference/WaitTraits.html
-/doc/html/boost_asio/reference/wait_traits/to_wait_duration.html
-/doc/html/boost_asio/reference/windows__basic_handle/
-/doc/html/boost_asio/reference/windows__basic_handle/assign/
-/doc/html/boost_asio/reference/windows__basic_handle/assign.html
-/doc/html/boost_asio/reference/windows__basic_handle/assign/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/assign/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle/basic_handle/
-/doc/html/boost_asio/reference/windows__basic_handle/_basic_handle.html
-/doc/html/boost_asio/reference/windows__basic_handle/basic_handle.html
-/doc/html/boost_asio/reference/windows__basic_handle/basic_handle/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/basic_handle/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle/basic_handle/overload3.html
-/doc/html/boost_asio/reference/windows__basic_handle/cancel/
-/doc/html/boost_asio/reference/windows__basic_handle/cancel.html
-/doc/html/boost_asio/reference/windows__basic_handle/cancel/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/cancel/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle/close/
-/doc/html/boost_asio/reference/windows__basic_handle/close.html
-/doc/html/boost_asio/reference/windows__basic_handle/close/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/close/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_implementation/
-/doc/html/boost_asio/reference/windows__basic_handle/get_implementation.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_implementation/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_implementation/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_io_service.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_service/
-/doc/html/boost_asio/reference/windows__basic_handle/get_service.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_service/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/get_service/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle.html
-/doc/html/boost_asio/reference/windows__basic_handle/implementation.html
-/doc/html/boost_asio/reference/windows__basic_handle/implementation_type.html
-/doc/html/boost_asio/reference/windows__basic_handle/is_open.html
-/doc/html/boost_asio/reference/windows__basic_handle/lowest_layer/
-/doc/html/boost_asio/reference/windows__basic_handle/lowest_layer.html
-/doc/html/boost_asio/reference/windows__basic_handle/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/windows__basic_handle/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/windows__basic_handle/lowest_layer_type.html
-/doc/html/boost_asio/reference/windows__basic_handle/native_handle.html
-/doc/html/boost_asio/reference/windows__basic_handle/native_handle_type.html
-/doc/html/boost_asio/reference/windows__basic_handle/native.html
-/doc/html/boost_asio/reference/windows__basic_handle/native_type.html
-/doc/html/boost_asio/reference/windows__basic_handle/operator_eq_.html
-/doc/html/boost_asio/reference/windows__basic_handle/service.html
-/doc/html/boost_asio/reference/windows__basic_handle/service_type.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/
-/doc/html/boost_asio/reference/windows__basic_object_handle/assign/
-/doc/html/boost_asio/reference/windows__basic_object_handle/assign.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/assign/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/assign/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/async_wait.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/basic_object_handle/
-/doc/html/boost_asio/reference/windows__basic_object_handle/basic_object_handle.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/basic_object_handle/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/basic_object_handle/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/basic_object_handle/overload3.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/cancel/
-/doc/html/boost_asio/reference/windows__basic_object_handle/cancel.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/cancel/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/cancel/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/close/
-/doc/html/boost_asio/reference/windows__basic_object_handle/close.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/close/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/close/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_implementation/
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_implementation.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_implementation/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_implementation/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_io_service.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_service/
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_service.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_service/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/get_service/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/implementation.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/implementation_type.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/is_open.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/lowest_layer/
-/doc/html/boost_asio/reference/windows__basic_object_handle/lowest_layer.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/lowest_layer_type.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/native_handle.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/native_handle_type.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/native.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/native_type.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/operator_eq_.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/service.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/service_type.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/wait/
-/doc/html/boost_asio/reference/windows__basic_object_handle/wait.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/wait/overload1.html
-/doc/html/boost_asio/reference/windows__basic_object_handle/wait/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/assign/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/assign.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/assign/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/assign/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/async_read_some_at.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/async_write_some_at.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/basic_random_access_handle/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/basic_random_access_handle.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/basic_random_access_handle/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/basic_random_access_handle/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/basic_random_access_handle/overload3.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/cancel/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/cancel.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/cancel/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/cancel/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/close/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/close.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/close/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/close/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_implementation/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_implementation.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_implementation/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_implementation/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_io_service.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_service/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_service.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_service/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/get_service/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/implementation.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/implementation_type.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/is_open.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/lowest_layer/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/lowest_layer.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/lowest_layer_type.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/native_handle.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/native_handle_type.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/native.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/native_type.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/operator_eq_.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/read_some_at/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/read_some_at.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/read_some_at/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/read_some_at/overload2.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/service.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/service_type.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/write_some_at/
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/write_some_at.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/write_some_at/overload1.html
-/doc/html/boost_asio/reference/windows__basic_random_access_handle/write_some_at/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/assign/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/assign.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/assign/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/assign/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/async_read_some.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/async_write_some.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/basic_stream_handle/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/basic_stream_handle.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/basic_stream_handle/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/basic_stream_handle/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/basic_stream_handle/overload3.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/cancel/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/cancel.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/cancel/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/cancel/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/close/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/close.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/close/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/close/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_implementation/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_implementation.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_implementation/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_implementation/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_io_service.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_service/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_service.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_service/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/get_service/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/implementation.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/implementation_type.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/is_open.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/lowest_layer/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/lowest_layer.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/lowest_layer/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/lowest_layer/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/lowest_layer_type.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/native_handle.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/native_handle_type.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/native.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/native_type.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/operator_eq_.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/read_some/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/read_some.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/read_some/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/read_some/overload2.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/service.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/service_type.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/write_some/
-/doc/html/boost_asio/reference/windows__basic_stream_handle/write_some.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/write_some/overload1.html
-/doc/html/boost_asio/reference/windows__basic_stream_handle/write_some/overload2.html
-/doc/html/boost_asio/reference/windows__object_handle.html
-/doc/html/boost_asio/reference/windows__object_handle_service/
-/doc/html/boost_asio/reference/windows__object_handle_service/assign.html
-/doc/html/boost_asio/reference/windows__object_handle_service/async_wait.html
-/doc/html/boost_asio/reference/windows__object_handle_service/cancel.html
-/doc/html/boost_asio/reference/windows__object_handle_service/close.html
-/doc/html/boost_asio/reference/windows__object_handle_service/construct.html
-/doc/html/boost_asio/reference/windows__object_handle_service/destroy.html
-/doc/html/boost_asio/reference/windows__object_handle_service/get_io_service.html
-/doc/html/boost_asio/reference/windows__object_handle_service.html
-/doc/html/boost_asio/reference/windows__object_handle_service/id.html
-/doc/html/boost_asio/reference/windows__object_handle_service/implementation_type.html
-/doc/html/boost_asio/reference/windows__object_handle_service/is_open.html
-/doc/html/boost_asio/reference/windows__object_handle_service/move_assign.html
-/doc/html/boost_asio/reference/windows__object_handle_service/move_construct.html
-/doc/html/boost_asio/reference/windows__object_handle_service/native_handle.html
-/doc/html/boost_asio/reference/windows__object_handle_service/native_handle_type.html
-/doc/html/boost_asio/reference/windows__object_handle_service/object_handle_service.html
-/doc/html/boost_asio/reference/windows__object_handle_service/wait.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/
-/doc/html/boost_asio/reference/windows__overlapped_ptr/complete.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/get/
-/doc/html/boost_asio/reference/windows__overlapped_ptr/get.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/get/overload1.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/get/overload2.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/overlapped_ptr/
-/doc/html/boost_asio/reference/windows__overlapped_ptr/_overlapped_ptr.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/overlapped_ptr.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/overlapped_ptr/overload1.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/overlapped_ptr/overload2.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/release.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/reset/
-/doc/html/boost_asio/reference/windows__overlapped_ptr/reset.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/reset/overload1.html
-/doc/html/boost_asio/reference/windows__overlapped_ptr/reset/overload2.html
-/doc/html/boost_asio/reference/windows__random_access_handle.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/
-/doc/html/boost_asio/reference/windows__random_access_handle_service/assign.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/async_read_some_at.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/async_write_some_at.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/cancel.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/close.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/construct.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/destroy.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/get_io_service.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/id.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/implementation_type.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/is_open.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/move_assign.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/move_construct.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/native_handle.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/native_handle_type.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/native.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/native_type.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/random_access_handle_service.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/read_some_at.html
-/doc/html/boost_asio/reference/windows__random_access_handle_service/write_some_at.html
-/doc/html/boost_asio/reference/windows__stream_handle.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/
-/doc/html/boost_asio/reference/windows__stream_handle_service/assign.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/async_read_some.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/async_write_some.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/cancel.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/close.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/construct.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/destroy.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/get_io_service.html
-/doc/html/boost_asio/reference/windows__stream_handle_service.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/id.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/implementation_type.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/is_open.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/move_assign.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/move_construct.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/native_handle.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/native_handle_type.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/native.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/native_type.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/read_some.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/stream_handle_service.html
-/doc/html/boost_asio/reference/windows__stream_handle_service/write_some.html
-/doc/html/boost_asio/reference/write/
-/doc/html/boost_asio/reference/write_at/
-/doc/html/boost_asio/reference/write_at.html
-/doc/html/boost_asio/reference/write_at/overload1.html
-/doc/html/boost_asio/reference/write_at/overload2.html
-/doc/html/boost_asio/reference/write_at/overload3.html
-/doc/html/boost_asio/reference/write_at/overload4.html
-/doc/html/boost_asio/reference/write_at/overload5.html
-/doc/html/boost_asio/reference/write_at/overload6.html
-/doc/html/boost_asio/reference/write_at/overload7.html
-/doc/html/boost_asio/reference/write_at/overload8.html
-/doc/html/boost_asio/reference/WriteHandler.html
-/doc/html/boost_asio/reference/write.html
-/doc/html/boost_asio/reference/write/overload1.html
-/doc/html/boost_asio/reference/write/overload2.html
-/doc/html/boost_asio/reference/write/overload3.html
-/doc/html/boost_asio/reference/write/overload4.html
-/doc/html/boost_asio/reference/write/overload5.html
-/doc/html/boost_asio/reference/write/overload6.html
-/doc/html/boost_asio/reference/write/overload7.html
-/doc/html/boost_asio/reference/write/overload8.html
-/doc/html/boost_asio/reference/yield_context.html
-/doc/html/boost_asio/sync_op.png
-/doc/html/boost_asio/tutorial/
-/doc/html/boost_asio/tutorial.html
-/doc/html/boost_asio/tutorial/tutdaytime1/
-/doc/html/boost_asio/tutorial/tutdaytime1.html
-/doc/html/boost_asio/tutorial/tutdaytime1/src.html
-/doc/html/boost_asio/tutorial/tutdaytime2/
-/doc/html/boost_asio/tutorial/tutdaytime2.html
-/doc/html/boost_asio/tutorial/tutdaytime2/src.html
-/doc/html/boost_asio/tutorial/tutdaytime3/
-/doc/html/boost_asio/tutorial/tutdaytime3.html
-/doc/html/boost_asio/tutorial/tutdaytime3/src.html
-/doc/html/boost_asio/tutorial/tutdaytime4/
-/doc/html/boost_asio/tutorial/tutdaytime4.html
-/doc/html/boost_asio/tutorial/tutdaytime4/src.html
-/doc/html/boost_asio/tutorial/tutdaytime5/
-/doc/html/boost_asio/tutorial/tutdaytime5.html
-/doc/html/boost_asio/tutorial/tutdaytime5/src.html
-/doc/html/boost_asio/tutorial/tutdaytime6/
-/doc/html/boost_asio/tutorial/tutdaytime6.html
-/doc/html/boost_asio/tutorial/tutdaytime6/src.html
-/doc/html/boost_asio/tutorial/tutdaytime7/
-/doc/html/boost_asio/tutorial/tutdaytime7.html
-/doc/html/boost_asio/tutorial/tutdaytime7/src.html
-/doc/html/boost_asio/tutorial/tuttimer1/
-/doc/html/boost_asio/tutorial/tuttimer1.html
-/doc/html/boost_asio/tutorial/tuttimer1/src.html
-/doc/html/boost_asio/tutorial/tuttimer2/
-/doc/html/boost_asio/tutorial/tuttimer2.html
-/doc/html/boost_asio/tutorial/tuttimer2/src.html
-/doc/html/boost_asio/tutorial/tuttimer3/
-/doc/html/boost_asio/tutorial/tuttimer3.html
-/doc/html/boost_asio/tutorial/tuttimer3/src.html
-/doc/html/boost_asio/tutorial/tuttimer4/
-/doc/html/boost_asio/tutorial/tuttimer4.html
-/doc/html/boost_asio/tutorial/tuttimer4/src.html
-/doc/html/boost_asio/tutorial/tuttimer5/
-/doc/html/boost_asio/tutorial/tuttimer5.html
-/doc/html/boost_asio/tutorial/tuttimer5/src.html
-/doc/html/boost_asio/using.html
-/libs/
-/libs/asio/
-/libs/asio/doc/
-/libs/asio/doc/asio.qbk
-/libs/asio/doc/doxy2qbk.pl
-/libs/asio/doc/examples.qbk
-/libs/asio/doc/history.qbk
-/libs/asio/doc/index.xml
-/libs/asio/doc/Jamfile.v2
-/libs/asio/doc/noncopyable_dox.txt
-/libs/asio/doc/overview/
-/libs/asio/doc/overview/allocation.qbk
-/libs/asio/doc/overview/async_op1.dot
-/libs/asio/doc/overview/async_op1.png
-/libs/asio/doc/overview/async_op2.dot
-/libs/asio/doc/overview/async_op2.png
-/libs/asio/doc/overview/async.qbk
-/libs/asio/doc/overview/basics.qbk
-/libs/asio/doc/overview/bsd_sockets.qbk
-/libs/asio/doc/overview/buffers.qbk
-/libs/asio/doc/overview/coroutine.qbk
-/libs/asio/doc/overview/cpp2011.qbk
-/libs/asio/doc/overview/handler_tracking.qbk
-/libs/asio/doc/overview/implementation.qbk
-/libs/asio/doc/overview/iostreams.qbk
-/libs/asio/doc/overview/line_based.qbk
-/libs/asio/doc/overview/other_protocols.qbk
-/libs/asio/doc/overview/posix.qbk
-/libs/asio/doc/overview/proactor.dot
-/libs/asio/doc/overview/proactor.png
-/libs/asio/doc/overview/protocols.qbk
-/libs/asio/doc/overview.qbk
-/libs/asio/doc/overview/rationale.qbk
-/libs/asio/doc/overview/reactor.qbk
-/libs/asio/doc/overview/serial_ports.qbk
-/libs/asio/doc/overview/signals.qbk
-/libs/asio/doc/overview/spawn.qbk
-/libs/asio/doc/overview/ssl.qbk
-/libs/asio/doc/overview/strands.qbk
-/libs/asio/doc/overview/streams.qbk
-/libs/asio/doc/overview/sync_op.dot
-/libs/asio/doc/overview/sync_op.png
-/libs/asio/doc/overview/threads.qbk
-/libs/asio/doc/overview/timers.qbk
-/libs/asio/doc/overview/windows.qbk
-/libs/asio/doc/quickref.xml
-/libs/asio/doc/reference.dox
-/libs/asio/doc/reference.qbk
-/libs/asio/doc/reference.xsl
-/libs/asio/doc/requirements/
-/libs/asio/doc/requirements/AcceptHandler.qbk
-/libs/asio/doc/requirements/asynchronous_operations.qbk
-/libs/asio/doc/requirements/AsyncRandomAccessReadDevice.qbk
-/libs/asio/doc/requirements/AsyncRandomAccessWriteDevice.qbk
-/libs/asio/doc/requirements/AsyncReadStream.qbk
-/libs/asio/doc/requirements/AsyncWriteStream.qbk
-/libs/asio/doc/requirements/BufferedHandshakeHandler.qbk
-/libs/asio/doc/requirements/CompletionHandler.qbk
-/libs/asio/doc/requirements/ComposedConnectHandler.qbk
-/libs/asio/doc/requirements/ConnectHandler.qbk
-/libs/asio/doc/requirements/ConstBufferSequence.qbk
-/libs/asio/doc/requirements/ConvertibleToConstBuffer.qbk
-/libs/asio/doc/requirements/ConvertibleToMutableBuffer.qbk
-/libs/asio/doc/requirements/DatagramSocketService.qbk
-/libs/asio/doc/requirements/DescriptorService.qbk
-/libs/asio/doc/requirements/Endpoint.qbk
-/libs/asio/doc/requirements/GettableSerialPortOption.qbk
-/libs/asio/doc/requirements/GettableSocketOption.qbk
-/libs/asio/doc/requirements/Handler.qbk
-/libs/asio/doc/requirements/HandleService.qbk
-/libs/asio/doc/requirements/HandshakeHandler.qbk
-/libs/asio/doc/requirements/InternetProtocol.qbk
-/libs/asio/doc/requirements/IoControlCommand.qbk
-/libs/asio/doc/requirements/IoObjectService.qbk
-/libs/asio/doc/requirements/MutableBufferSequence.qbk
-/libs/asio/doc/requirements/ObjectHandleService.qbk
-/libs/asio/doc/requirements/Protocol.qbk
-/libs/asio/doc/requirements.qbk
-/libs/asio/doc/requirements/RandomAccessHandleService.qbk
-/libs/asio/doc/requirements/RawSocketService.qbk
-/libs/asio/doc/requirements/ReadHandler.qbk
-/libs/asio/doc/requirements/ResolveHandler.qbk
-/libs/asio/doc/requirements/ResolverService.qbk
-/libs/asio/doc/requirements/SeqPacketSocketService.qbk
-/libs/asio/doc/requirements/SerialPortService.qbk
-/libs/asio/doc/requirements/Service.qbk
-/libs/asio/doc/requirements/SettableSerialPortOption.qbk
-/libs/asio/doc/requirements/SettableSocketOption.qbk
-/libs/asio/doc/requirements/ShutdownHandler.qbk
-/libs/asio/doc/requirements/SignalHandler.qbk
-/libs/asio/doc/requirements/SignalSetService.qbk
-/libs/asio/doc/requirements/SocketAcceptorService.qbk
-/libs/asio/doc/requirements/SocketService.qbk
-/libs/asio/doc/requirements/StreamDescriptorService.qbk
-/libs/asio/doc/requirements/StreamHandleService.qbk
-/libs/asio/doc/requirements/StreamSocketService.qbk
-/libs/asio/doc/requirements/SyncRandomAccessReadDevice.qbk
-/libs/asio/doc/requirements/SyncRandomAccessWriteDevice.qbk
-/libs/asio/doc/requirements/SyncReadStream.qbk
-/libs/asio/doc/requirements/SyncWriteStream.qbk
-/libs/asio/doc/requirements/TimerService.qbk
-/libs/asio/doc/requirements/TimeTraits.qbk
-/libs/asio/doc/requirements/WaitableTimerService.qbk
-/libs/asio/doc/requirements/WaitHandler.qbk
-/libs/asio/doc/requirements/WaitTraits.qbk
-/libs/asio/doc/requirements/WriteHandler.qbk
-/libs/asio/doc/std_exception_dox.txt
-/libs/asio/doc/tutorial.dox
-/libs/asio/doc/tutorial.qbk
-/libs/asio/doc/tutorial.xsl
-/libs/asio/doc/using.qbk
-/libs/asio/example/
-/libs/asio/example/cpp03/
-/libs/asio/example/cpp03/allocation/
-/libs/asio/example/cpp03/allocation/Jamfile
-/libs/asio/example/cpp03/allocation/Jamfile.v2
-/libs/asio/example/cpp03/allocation/server.cpp
-/libs/asio/example/cpp03/buffers/
-/libs/asio/example/cpp03/buffers/Jamfile
-/libs/asio/example/cpp03/buffers/Jamfile.v2
-/libs/asio/example/cpp03/buffers/reference_counted.cpp
-/libs/asio/example/cpp03/chat/
-/libs/asio/example/cpp03/chat/chat_client.cpp
-/libs/asio/example/cpp03/chat/chat_message.hpp
-/libs/asio/example/cpp03/chat/chat_server.cpp
-/libs/asio/example/cpp03/chat/Jamfile
-/libs/asio/example/cpp03/chat/Jamfile.v2
-/libs/asio/example/cpp03/chat/posix_chat_client.cpp
-/libs/asio/example/cpp03/echo/
-/libs/asio/example/cpp03/echo/async_tcp_echo_server.cpp
-/libs/asio/example/cpp03/echo/async_udp_echo_server.cpp
-/libs/asio/example/cpp03/echo/blocking_tcp_echo_client.cpp
-/libs/asio/example/cpp03/echo/blocking_tcp_echo_server.cpp
-/libs/asio/example/cpp03/echo/blocking_udp_echo_client.cpp
-/libs/asio/example/cpp03/echo/blocking_udp_echo_server.cpp
-/libs/asio/example/cpp03/echo/Jamfile
-/libs/asio/example/cpp03/echo/Jamfile.v2
-/libs/asio/example/cpp03/fork/
-/libs/asio/example/cpp03/fork/daemon.cpp
-/libs/asio/example/cpp03/fork/Jamfile
-/libs/asio/example/cpp03/fork/Jamfile.v2
-/libs/asio/example/cpp03/fork/process_per_connection.cpp
-/libs/asio/example/cpp03/http/
-/libs/asio/example/cpp03/http/client/
-/libs/asio/example/cpp03/http/client/async_client.cpp
-/libs/asio/example/cpp03/http/client/Jamfile
-/libs/asio/example/cpp03/http/client/Jamfile.v2
-/libs/asio/example/cpp03/http/client/sync_client.cpp
-/libs/asio/example/cpp03/http/doc_root/
-/libs/asio/example/cpp03/http/doc_root/data_1K.html
-/libs/asio/example/cpp03/http/doc_root/data_2K.html
-/libs/asio/example/cpp03/http/doc_root/data_4K.html
-/libs/asio/example/cpp03/http/doc_root/data_8K.html
-/libs/asio/example/cpp03/http/server/
-/libs/asio/example/cpp03/http/server2/
-/libs/asio/example/cpp03/http/server2/connection.cpp
-/libs/asio/example/cpp03/http/server2/connection.hpp
-/libs/asio/example/cpp03/http/server2/header.hpp
-/libs/asio/example/cpp03/http/server2/io_service_pool.cpp
-/libs/asio/example/cpp03/http/server2/io_service_pool.hpp
-/libs/asio/example/cpp03/http/server2/Jamfile
-/libs/asio/example/cpp03/http/server2/Jamfile.v2
-/libs/asio/example/cpp03/http/server2/main.cpp
-/libs/asio/example/cpp03/http/server2/mime_types.cpp
-/libs/asio/example/cpp03/http/server2/mime_types.hpp
-/libs/asio/example/cpp03/http/server2/reply.cpp
-/libs/asio/example/cpp03/http/server2/reply.hpp
-/libs/asio/example/cpp03/http/server2/request_handler.cpp
-/libs/asio/example/cpp03/http/server2/request_handler.hpp
-/libs/asio/example/cpp03/http/server2/request.hpp
-/libs/asio/example/cpp03/http/server2/request_parser.cpp
-/libs/asio/example/cpp03/http/server2/request_parser.hpp
-/libs/asio/example/cpp03/http/server2/server.cpp
-/libs/asio/example/cpp03/http/server2/server.hpp
-/libs/asio/example/cpp03/http/server3/
-/libs/asio/example/cpp03/http/server3/connection.cpp
-/libs/asio/example/cpp03/http/server3/connection.hpp
-/libs/asio/example/cpp03/http/server3/header.hpp
-/libs/asio/example/cpp03/http/server3/Jamfile
-/libs/asio/example/cpp03/http/server3/Jamfile.v2
-/libs/asio/example/cpp03/http/server3/main.cpp
-/libs/asio/example/cpp03/http/server3/mime_types.cpp
-/libs/asio/example/cpp03/http/server3/mime_types.hpp
-/libs/asio/example/cpp03/http/server3/reply.cpp
-/libs/asio/example/cpp03/http/server3/reply.hpp
-/libs/asio/example/cpp03/http/server3/request_handler.cpp
-/libs/asio/example/cpp03/http/server3/request_handler.hpp
-/libs/asio/example/cpp03/http/server3/request.hpp
-/libs/asio/example/cpp03/http/server3/request_parser.cpp
-/libs/asio/example/cpp03/http/server3/request_parser.hpp
-/libs/asio/example/cpp03/http/server3/server.cpp
-/libs/asio/example/cpp03/http/server3/server.hpp
-/libs/asio/example/cpp03/http/server4/
-/libs/asio/example/cpp03/http/server4/file_handler.cpp
-/libs/asio/example/cpp03/http/server4/file_handler.hpp
-/libs/asio/example/cpp03/http/server4/header.hpp
-/libs/asio/example/cpp03/http/server4/Jamfile
-/libs/asio/example/cpp03/http/server4/Jamfile.v2
-/libs/asio/example/cpp03/http/server4/main.cpp
-/libs/asio/example/cpp03/http/server4/mime_types.cpp
-/libs/asio/example/cpp03/http/server4/mime_types.hpp
-/libs/asio/example/cpp03/http/server4/reply.cpp
-/libs/asio/example/cpp03/http/server4/reply.hpp
-/libs/asio/example/cpp03/http/server4/request.hpp
-/libs/asio/example/cpp03/http/server4/request_parser.cpp
-/libs/asio/example/cpp03/http/server4/request_parser.hpp
-/libs/asio/example/cpp03/http/server4/server.cpp
-/libs/asio/example/cpp03/http/server4/server.hpp
-/libs/asio/example/cpp03/http/server/connection.cpp
-/libs/asio/example/cpp03/http/server/connection.hpp
-/libs/asio/example/cpp03/http/server/connection_manager.cpp
-/libs/asio/example/cpp03/http/server/connection_manager.hpp
-/libs/asio/example/cpp03/http/server/header.hpp
-/libs/asio/example/cpp03/http/server/Jamfile
-/libs/asio/example/cpp03/http/server/Jamfile.v2
-/libs/asio/example/cpp03/http/server/main.cpp
-/libs/asio/example/cpp03/http/server/mime_types.cpp
-/libs/asio/example/cpp03/http/server/mime_types.hpp
-/libs/asio/example/cpp03/http/server/reply.cpp
-/libs/asio/example/cpp03/http/server/reply.hpp
-/libs/asio/example/cpp03/http/server/request_handler.cpp
-/libs/asio/example/cpp03/http/server/request_handler.hpp
-/libs/asio/example/cpp03/http/server/request.hpp
-/libs/asio/example/cpp03/http/server/request_parser.cpp
-/libs/asio/example/cpp03/http/server/request_parser.hpp
-/libs/asio/example/cpp03/http/server/server.cpp
-/libs/asio/example/cpp03/http/server/server.hpp
-/libs/asio/example/cpp03/icmp/
-/libs/asio/example/cpp03/icmp/icmp_header.hpp
-/libs/asio/example/cpp03/icmp/ipv4_header.hpp
-/libs/asio/example/cpp03/icmp/Jamfile
-/libs/asio/example/cpp03/icmp/Jamfile.v2
-/libs/asio/example/cpp03/icmp/ping.cpp
-/libs/asio/example/cpp03/invocation/
-/libs/asio/example/cpp03/invocation/Jamfile
-/libs/asio/example/cpp03/invocation/Jamfile.v2
-/libs/asio/example/cpp03/invocation/prioritised_handlers.cpp
-/libs/asio/example/cpp03/iostreams/
-/libs/asio/example/cpp03/iostreams/daytime_client.cpp
-/libs/asio/example/cpp03/iostreams/daytime_server.cpp
-/libs/asio/example/cpp03/iostreams/http_client.cpp
-/libs/asio/example/cpp03/iostreams/Jamfile
-/libs/asio/example/cpp03/iostreams/Jamfile.v2
-/libs/asio/example/cpp03/local/
-/libs/asio/example/cpp03/local/connect_pair.cpp
-/libs/asio/example/cpp03/local/iostream_client.cpp
-/libs/asio/example/cpp03/local/Jamfile
-/libs/asio/example/cpp03/local/Jamfile.v2
-/libs/asio/example/cpp03/local/stream_client.cpp
-/libs/asio/example/cpp03/local/stream_server.cpp
-/libs/asio/example/cpp03/multicast/
-/libs/asio/example/cpp03/multicast/Jamfile
-/libs/asio/example/cpp03/multicast/Jamfile.v2
-/libs/asio/example/cpp03/multicast/receiver.cpp
-/libs/asio/example/cpp03/multicast/sender.cpp
-/libs/asio/example/cpp03/nonblocking/
-/libs/asio/example/cpp03/nonblocking/Jamfile
-/libs/asio/example/cpp03/nonblocking/Jamfile.v2
-/libs/asio/example/cpp03/nonblocking/third_party_lib.cpp
-/libs/asio/example/cpp03/porthopper/
-/libs/asio/example/cpp03/porthopper/client.cpp
-/libs/asio/example/cpp03/porthopper/Jamfile
-/libs/asio/example/cpp03/porthopper/Jamfile.v2
-/libs/asio/example/cpp03/porthopper/protocol.hpp
-/libs/asio/example/cpp03/porthopper/server.cpp
-/libs/asio/example/cpp03/serialization/
-/libs/asio/example/cpp03/serialization/client.cpp
-/libs/asio/example/cpp03/serialization/connection.hpp
-/libs/asio/example/cpp03/serialization/Jamfile
-/libs/asio/example/cpp03/serialization/Jamfile.v2
-/libs/asio/example/cpp03/serialization/server.cpp
-/libs/asio/example/cpp03/serialization/stock.hpp
-/libs/asio/example/cpp03/services/
-/libs/asio/example/cpp03/services/basic_logger.hpp
-/libs/asio/example/cpp03/services/daytime_client.cpp
-/libs/asio/example/cpp03/services/Jamfile
-/libs/asio/example/cpp03/services/Jamfile.v2
-/libs/asio/example/cpp03/services/logger.hpp
-/libs/asio/example/cpp03/services/logger_service.cpp
-/libs/asio/example/cpp03/services/logger_service.hpp
-/libs/asio/example/cpp03/services/stream_socket_service.hpp
-/libs/asio/example/cpp03/socks4/
-/libs/asio/example/cpp03/socks4/Jamfile
-/libs/asio/example/cpp03/socks4/Jamfile.v2
-/libs/asio/example/cpp03/socks4/socks4.hpp
-/libs/asio/example/cpp03/socks4/sync_client.cpp
-/libs/asio/example/cpp03/spawn/
-/libs/asio/example/cpp03/spawn/echo_server.cpp
-/libs/asio/example/cpp03/spawn/Jamfile.v2
-/libs/asio/example/cpp03/ssl/
-/libs/asio/example/cpp03/ssl/ca.pem
-/libs/asio/example/cpp03/ssl/client.cpp
-/libs/asio/example/cpp03/ssl/dh512.pem
-/libs/asio/example/cpp03/ssl/Jamfile
-/libs/asio/example/cpp03/ssl/Jamfile.v2
-/libs/asio/example/cpp03/ssl/README
-/libs/asio/example/cpp03/ssl/server.cpp
-/libs/asio/example/cpp03/ssl/server.pem
-/libs/asio/example/cpp03/timeouts/
-/libs/asio/example/cpp03/timeouts/async_tcp_client.cpp
-/libs/asio/example/cpp03/timeouts/blocking_tcp_client.cpp
-/libs/asio/example/cpp03/timeouts/blocking_udp_client.cpp
-/libs/asio/example/cpp03/timeouts/Jamfile
-/libs/asio/example/cpp03/timeouts/Jamfile.v2
-/libs/asio/example/cpp03/timeouts/server.cpp
-/libs/asio/example/cpp03/timers/
-/libs/asio/example/cpp03/timers/Jamfile
-/libs/asio/example/cpp03/timers/Jamfile.v2
-/libs/asio/example/cpp03/timers/tick_count_timer.cpp
-/libs/asio/example/cpp03/timers/time_t_timer.cpp
-/libs/asio/example/cpp03/tutorial/
-/libs/asio/example/cpp03/tutorial/daytime1/
-/libs/asio/example/cpp03/tutorial/daytime1/client.cpp
-/libs/asio/example/cpp03/tutorial/daytime2/
-/libs/asio/example/cpp03/tutorial/daytime2/server.cpp
-/libs/asio/example/cpp03/tutorial/daytime3/
-/libs/asio/example/cpp03/tutorial/daytime3/server.cpp
-/libs/asio/example/cpp03/tutorial/daytime4/
-/libs/asio/example/cpp03/tutorial/daytime4/client.cpp
-/libs/asio/example/cpp03/tutorial/daytime5/
-/libs/asio/example/cpp03/tutorial/daytime5/server.cpp
-/libs/asio/example/cpp03/tutorial/daytime6/
-/libs/asio/example/cpp03/tutorial/daytime6/server.cpp
-/libs/asio/example/cpp03/tutorial/daytime7/
-/libs/asio/example/cpp03/tutorial/daytime7/server.cpp
-/libs/asio/example/cpp03/tutorial/daytime_dox.txt
-/libs/asio/example/cpp03/tutorial/index_dox.txt
-/libs/asio/example/cpp03/tutorial/Jamfile
-/libs/asio/example/cpp03/tutorial/Jamfile.v2
-/libs/asio/example/cpp03/tutorial/timer1/
-/libs/asio/example/cpp03/tutorial/timer1/timer.cpp
-/libs/asio/example/cpp03/tutorial/timer2/
-/libs/asio/example/cpp03/tutorial/timer2/timer.cpp
-/libs/asio/example/cpp03/tutorial/timer3/
-/libs/asio/example/cpp03/tutorial/timer3/timer.cpp
-/libs/asio/example/cpp03/tutorial/timer4/
-/libs/asio/example/cpp03/tutorial/timer4/timer.cpp
-/libs/asio/example/cpp03/tutorial/timer5/
-/libs/asio/example/cpp03/tutorial/timer5/timer.cpp
-/libs/asio/example/cpp03/tutorial/timer_dox.txt
-/libs/asio/example/cpp03/windows/
-/libs/asio/example/cpp03/windows/Jamfile
-/libs/asio/example/cpp03/windows/Jamfile.v2
-/libs/asio/example/cpp03/windows/transmit_file.cpp
-/libs/asio/example/cpp11/
-/libs/asio/example/cpp11/allocation/
-/libs/asio/example/cpp11/allocation/Jamfile
-/libs/asio/example/cpp11/allocation/Jamfile.v2
-/libs/asio/example/cpp11/allocation/server.cpp
-/libs/asio/example/cpp11/buffers/
-/libs/asio/example/cpp11/buffers/Jamfile
-/libs/asio/example/cpp11/buffers/Jamfile.v2
-/libs/asio/example/cpp11/buffers/reference_counted.cpp
-/libs/asio/example/cpp11/chat/
-/libs/asio/example/cpp11/chat/chat_client.cpp
-/libs/asio/example/cpp11/chat/chat_message.hpp
-/libs/asio/example/cpp11/chat/chat_server.cpp
-/libs/asio/example/cpp11/chat/Jamfile
-/libs/asio/example/cpp11/chat/Jamfile.v2
-/libs/asio/example/cpp11/echo/
-/libs/asio/example/cpp11/echo/async_tcp_echo_server.cpp
-/libs/asio/example/cpp11/echo/async_udp_echo_server.cpp
-/libs/asio/example/cpp11/echo/blocking_tcp_echo_client.cpp
-/libs/asio/example/cpp11/echo/blocking_tcp_echo_server.cpp
-/libs/asio/example/cpp11/echo/blocking_udp_echo_client.cpp
-/libs/asio/example/cpp11/echo/blocking_udp_echo_server.cpp
-/libs/asio/example/cpp11/echo/Jamfile
-/libs/asio/example/cpp11/echo/Jamfile.v2
-/libs/asio/example/cpp11/futures/
-/libs/asio/example/cpp11/futures/daytime_client.cpp
-/libs/asio/example/cpp11/futures/Jamfile
-/libs/asio/example/cpp11/futures/Jamfile.v2
-/libs/asio/example/cpp11/http/
-/libs/asio/example/cpp11/http/server/
-/libs/asio/example/cpp11/http/server/connection.cpp
-/libs/asio/example/cpp11/http/server/connection.hpp
-/libs/asio/example/cpp11/http/server/connection_manager.cpp
-/libs/asio/example/cpp11/http/server/connection_manager.hpp
-/libs/asio/example/cpp11/http/server/header.hpp
-/libs/asio/example/cpp11/http/server/Jamfile
-/libs/asio/example/cpp11/http/server/Jamfile.v2
-/libs/asio/example/cpp11/http/server/main.cpp
-/libs/asio/example/cpp11/http/server/mime_types.cpp
-/libs/asio/example/cpp11/http/server/mime_types.hpp
-/libs/asio/example/cpp11/http/server/reply.cpp
-/libs/asio/example/cpp11/http/server/reply.hpp
-/libs/asio/example/cpp11/http/server/request_handler.cpp
-/libs/asio/example/cpp11/http/server/request_handler.hpp
-/libs/asio/example/cpp11/http/server/request.hpp
-/libs/asio/example/cpp11/http/server/request_parser.cpp
-/libs/asio/example/cpp11/http/server/request_parser.hpp
-/libs/asio/example/cpp11/http/server/server.cpp
-/libs/asio/example/cpp11/http/server/server.hpp
-/libs/asio/example/cpp11/spawn/
-/libs/asio/example/cpp11/spawn/echo_server.cpp
-/libs/asio/example/cpp11/spawn/Jamfile.v2
-/libs/asio/index.html
-/libs/asio/test/
-/libs/asio/test/archetypes/
-/libs/asio/test/archetypes/async_result.hpp
-/libs/asio/test/archetypes/gettable_socket_option.hpp
-/libs/asio/test/archetypes/io_control_command.hpp
-/libs/asio/test/archetypes/settable_socket_option.hpp
-/libs/asio/test/basic_datagram_socket.cpp
-/libs/asio/test/basic_deadline_timer.cpp
-/libs/asio/test/basic_raw_socket.cpp
-/libs/asio/test/basic_seq_packet_socket.cpp
-/libs/asio/test/basic_serial_port.cpp
-/libs/asio/test/basic_signal_set.cpp
-/libs/asio/test/basic_socket_acceptor.cpp
-/libs/asio/test/basic_streambuf.cpp
-/libs/asio/test/basic_stream_socket.cpp
-/libs/asio/test/basic_waitable_timer.cpp
-/libs/asio/test/buffer.cpp
-/libs/asio/test/buffered_read_stream.cpp
-/libs/asio/test/buffered_stream.cpp
-/libs/asio/test/buffered_write_stream.cpp
-/libs/asio/test/buffers_iterator.cpp
-/libs/asio/test/completion_condition.cpp
-/libs/asio/test/connect.cpp
-/libs/asio/test/coroutine.cpp
-/libs/asio/test/datagram_socket_service.cpp
-/libs/asio/test/deadline_timer.cpp
-/libs/asio/test/deadline_timer_service.cpp
-/libs/asio/test/error.cpp
-/libs/asio/test/generic/
-/libs/asio/test/generic/basic_endpoint.cpp
-/libs/asio/test/generic/datagram_protocol.cpp
-/libs/asio/test/generic/raw_protocol.cpp
-/libs/asio/test/generic/seq_packet_protocol.cpp
-/libs/asio/test/generic/stream_protocol.cpp
-/libs/asio/test/high_resolution_timer.cpp
-/libs/asio/test/io_service.cpp
-/libs/asio/test/ip/
-/libs/asio/test/ip/address.cpp
-/libs/asio/test/ip/address_v4.cpp
-/libs/asio/test/ip/address_v6.cpp
-/libs/asio/test/ip/basic_endpoint.cpp
-/libs/asio/test/ip/basic_resolver.cpp
-/libs/asio/test/ip/basic_resolver_entry.cpp
-/libs/asio/test/ip/basic_resolver_iterator.cpp
-/libs/asio/test/ip/basic_resolver_query.cpp
-/libs/asio/test/ip/host_name.cpp
-/libs/asio/test/ip/icmp.cpp
-/libs/asio/test/ip/multicast.cpp
-/libs/asio/test/ip/resolver_query_base.cpp
-/libs/asio/test/ip/resolver_service.cpp
-/libs/asio/test/ip/tcp.cpp
-/libs/asio/test/ip/udp.cpp
-/libs/asio/test/ip/unicast.cpp
-/libs/asio/test/ip/v6_only.cpp
-/libs/asio/test/is_read_buffered.cpp
-/libs/asio/test/is_write_buffered.cpp
-/libs/asio/test/Jamfile
-/libs/asio/test/Jamfile.v2
-/libs/asio/test/latency/
-/libs/asio/test/latency/allocator.hpp
-/libs/asio/test/latency/coroutine.hpp
-/libs/asio/test/latency/high_res_clock.hpp
-/libs/asio/test/latency/Jamfile.v2
-/libs/asio/test/latency/tcp_client.cpp
-/libs/asio/test/latency/tcp_server.cpp
-/libs/asio/test/latency/udp_client.cpp
-/libs/asio/test/latency/udp_server.cpp
-/libs/asio/test/latency/unyield.hpp
-/libs/asio/test/latency/yield.hpp
-/libs/asio/test/local/
-/libs/asio/test/local/basic_endpoint.cpp
-/libs/asio/test/local/connect_pair.cpp
-/libs/asio/test/local/datagram_protocol.cpp
-/libs/asio/test/local/stream_protocol.cpp
-/libs/asio/test/placeholders.cpp
-/libs/asio/test/posix/
-/libs/asio/test/posix/basic_descriptor.cpp
-/libs/asio/test/posix/basic_stream_descriptor.cpp
-/libs/asio/test/posix/descriptor_base.cpp
-/libs/asio/test/posix/stream_descriptor.cpp
-/libs/asio/test/posix/stream_descriptor_service.cpp
-/libs/asio/test/raw_socket_service.cpp
-/libs/asio/test/read_at.cpp
-/libs/asio/test/read.cpp
-/libs/asio/test/read_until.cpp
-/libs/asio/test/seq_packet_socket_service.cpp
-/libs/asio/test/serial_port_base.cpp
-/libs/asio/test/serial_port.cpp
-/libs/asio/test/serial_port_service.cpp
-/libs/asio/test/signal_set.cpp
-/libs/asio/test/signal_set_service.cpp
-/libs/asio/test/socket_acceptor_service.cpp
-/libs/asio/test/socket_base.cpp
-/libs/asio/test/ssl/
-/libs/asio/test/ssl/basic_context.cpp
-/libs/asio/test/ssl/context_base.cpp
-/libs/asio/test/ssl/context.cpp
-/libs/asio/test/ssl/context_service.cpp
-/libs/asio/test/ssl/Jamfile
-/libs/asio/test/ssl/Jamfile.v2
-/libs/asio/test/ssl/rfc2818_verification.cpp
-/libs/asio/test/ssl/stream_base.cpp
-/libs/asio/test/ssl/stream.cpp
-/libs/asio/test/ssl/stream_service.cpp
-/libs/asio/test/steady_timer.cpp
-/libs/asio/test/strand.cpp
-/libs/asio/test/streambuf.cpp
-/libs/asio/test/stream_socket_service.cpp
-/libs/asio/test/system_timer.cpp
-/libs/asio/test/time_traits.cpp
-/libs/asio/test/unit_test.hpp
-/libs/asio/test/waitable_timer_service.cpp
-/libs/asio/test/wait_traits.cpp
-/libs/asio/test/windows/
-/libs/asio/test/windows/basic_handle.cpp
-/libs/asio/test/windows/basic_object_handle.cpp
-/libs/asio/test/windows/basic_random_access_handle.cpp
-/libs/asio/test/windows/basic_stream_handle.cpp
-/libs/asio/test/windows/object_handle.cpp
-/libs/asio/test/windows/object_handle_service.cpp
-/libs/asio/test/windows/overlapped_ptr.cpp
-/libs/asio/test/windows/random_access_handle.cpp
-/libs/asio/test/windows/random_access_handle_service.cpp
-/libs/asio/test/windows/stream_handle.cpp
-/libs/asio/test/windows/stream_handle_service.cpp
-/libs/asio/test/write_at.cpp
-/libs/asio/test/write.cpp
-/libs/asio/tools/
-/libs/asio/tools/handlerviz.pl
-/libs/system/
-/libs/system/build/
-/libs/system/build/Jamfile
-/libs/system/build/Jamfile.v2
-/libs/system/doc/
-/libs/system/doc/index.html
-/libs/system/doc/reference.html
-/libs/system/index.html
-/libs/system/src/
-/libs/system/src/error_code.cpp
-/libs/system/test/
-/libs/system/test/dynamic_link_test.cpp
-/libs/system/test/error_code_test.cpp
-/libs/system/test/error_code_user_test.cpp
-/libs/system/test/header_only_test.cpp
-/libs/system/test/initialization_test.cpp
-/libs/system/test/Jamfile.v2
-/libs/system/test/system/
-/libs/system/test/system/common.props
-/libs/system/test/system/error_code_test/
-/libs/system/test/system/error_code_test/error_code_test.vcxproj
-/libs/system/test/system_error_test.cpp
-/libs/system/test/system/header_only_test/
-/libs/system/test/system/header_only_test/header_only_test.vcxproj
-/libs/system/test/system/system-dll/
-/libs/system/test/system/system-dll/system-dll.vcxproj
-/libs/system/test/system/system.sln
-/libs/system/test/throw_test.cpp
-/README.txt
diff --git a/3rdparty/asio/boostify.pl b/3rdparty/asio/boostify.pl
deleted file mode 100644
index c29b83b0cce..00000000000
--- a/3rdparty/asio/boostify.pl
+++ /dev/null
@@ -1,583 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use File::Path;
-
-our $boost_dir = "boostified";
-
-sub print_line
-{
- my ($output, $line, $from, $lineno) = @_;
-
- # Warn if the resulting line is >80 characters wide.
- if (length($line) > 80)
- {
- if ($from =~ /\.[chi]pp$/)
- {
- print("Warning: $from:$lineno: output >80 characters wide.\n");
- }
- }
-
- # Write the output.
- print($output $line . "\n");
-}
-
-sub source_contains_asio_thread_usage
-{
- my ($from) = @_;
-
- # Open the input file.
- open(my $input, "<$from") or die("Can't open $from for reading");
-
- # Check file for use of asio::thread.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /asio::thread/)
- {
- close($input);
- return 1;
- }
- elsif ($line =~ /^ *thread /)
- {
- close($input);
- return 1;
- }
- }
-
- close($input);
- return 0;
-}
-
-sub source_contains_asio_include
-{
- my ($from) = @_;
-
- # Open the input file.
- open(my $input, "<$from") or die("Can't open $from for reading");
-
- # Check file for inclusion of asio.hpp.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /# *include [<"]asio\.hpp[>"]/)
- {
- close($input);
- return 1;
- }
- }
-
- close($input);
- return 0;
-}
-
-sub copy_source_file
-{
- my ($from, $to) = @_;
-
- # Ensure the output directory exists.
- my $dir = $to;
- $dir =~ s/[^\/]*$//;
- mkpath($dir);
-
- # First determine whether the file makes any use of asio::thread.
- my $uses_asio_thread = source_contains_asio_thread_usage($from);
-
- my $includes_asio = source_contains_asio_include($from);
-
- my $is_asio_hpp = 0;
- $is_asio_hpp = 1 if ($from =~ /asio\.hpp/);
-
- my $needs_doc_link = 0;
- $needs_doc_link = 1 if ($is_asio_hpp);
-
- my $is_error_hpp = 0;
- $is_error_hpp = 1 if ($from =~ /asio\/error\.hpp/);
-
- my $is_qbk = 0;
- $is_qbk = 1 if ($from =~ /.qbk$/);
-
- my $is_xsl = 0;
- $is_xsl = 1 if ($from =~ /.xsl$/);
-
- my $is_test = 0;
- $is_test = 1 if ($from =~ /tests\/unit/);
-
- # Open the files.
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
-
- # Copy the content.
- my $lineno = 1;
- while (my $line = <$input>)
- {
- chomp($line);
-
- # Unconditional replacements.
- $line =~ s/[\\@]ref boost_bind/boost::bind()/g;
- if ($from =~ /.*\.txt$/)
- {
- $line =~ s/[\\@]ref async_read/boost::asio::async_read()/g;
- $line =~ s/[\\@]ref async_write/boost::asio::async_write()/g;
- }
- if ($line =~ /asio_detail_posix_thread_function/)
- {
- $line =~ s/asio_detail_posix_thread_function/boost_asio_detail_posix_thread_function/g;
- }
- if ($line =~ /asio_signal_handler/)
- {
- $line =~ s/asio_signal_handler/boost_asio_signal_handler/g;
- }
- if ($line =~ /ASIO_/ && !($line =~ /BOOST_ASIO_/))
- {
- $line =~ s/ASIO_/BOOST_ASIO_/g;
- }
-
- # Extra replacements for quickbook and XSL source only.
- if ($is_qbk || $is_xsl)
- {
- $line =~ s/asio\.examples/boost_asio.examples/g;
- $line =~ s/asio\.history/boost_asio.history/g;
- $line =~ s/asio\.index/boost_asio.index/g;
- $line =~ s/asio\.overview/boost_asio.overview/g;
- $line =~ s/asio\.reference/boost_asio.reference/g;
- $line =~ s/asio\.tutorial/boost_asio.tutorial/g;
- $line =~ s/asio\.using/boost_asio.using/g;
- $line =~ s/Asio/Boost.Asio/g;
- $line =~ s/changes made in each release/changes made in each Boost release/g;
- $line =~ s/\[\$/[\$boost_asio\//g;
- $line =~ s/\[@\.\.\/src\/examples/[\@boost_asio\/example/g;
- $line =~ s/include\/asio/boost\/asio/g;
- $line =~ s/\^asio/^boost\/asio/g;
- $line =~ s/namespaceasio/namespaceboost_1_1asio/g;
- $line =~ s/ \(\[\@examples\/diffs.*$//;
- }
-
- # Conditional replacements.
- if ($line =~ /^( *)namespace asio {/)
- {
- if ($is_qbk)
- {
- print_line($output, $1 . "namespace boost { namespace asio {", $from, $lineno);
- }
- else
- {
- print_line($output, $1 . "namespace boost {", $from, $lineno);
- print_line($output, $line, $from, $lineno);
- }
- }
- elsif ($line =~ /^( *)} \/\/ namespace asio$/)
- {
- if ($is_qbk)
- {
- print_line($output, $1 . "} } // namespace boost::asio", $from, $lineno);
- }
- else
- {
- print_line($output, $line, $from, $lineno);
- print_line($output, $1 . "} // namespace boost", $from, $lineno);
- }
- }
- elsif ($line =~ /^(# *include )[<"](asio\.hpp)[>"]$/)
- {
- print_line($output, $1 . "<boost/" . $2 . ">", $from, $lineno);
- if ($uses_asio_thread)
- {
- print_line($output, $1 . "<boost/thread/thread.hpp>", $from, $lineno) if (!$is_test);
- $uses_asio_thread = 0;
- }
- }
- elsif ($line =~ /^(# *include )[<"]boost\/.*[>"].*$/)
- {
- if (!$includes_asio && $uses_asio_thread)
- {
- print_line($output, $1 . "<boost/thread/thread.hpp>", $from, $lineno) if (!$is_test);
- $uses_asio_thread = 0;
- }
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /^(# *include )[<"]asio\/thread\.hpp[>"]/)
- {
- if ($is_test)
- {
- print_line($output, $1 . "<boost/asio/detail/thread.hpp>", $from, $lineno);
- }
- else
- {
- # Line is removed.
- }
- }
- elsif ($line =~ /(# *include )[<"]asio\/error_code\.hpp[>"]/)
- {
- if ($is_asio_hpp)
- {
- # Line is removed.
- }
- else
- {
- print_line($output, $1 . "<boost/cerrno.hpp>", $from, $lineno) if ($is_error_hpp);
- print_line($output, $1 . "<boost/system/error_code.hpp>", $from, $lineno);
- }
- }
- elsif ($line =~ /# *include [<"]asio\/impl\/error_code\.[hi]pp[>"]/)
- {
- # Line is removed.
- }
- elsif ($line =~ /(# *include )[<"]asio\/system_error\.hpp[>"]/)
- {
- if ($is_asio_hpp)
- {
- # Line is removed.
- }
- else
- {
- print_line($output, $1 . "<boost/system/system_error.hpp>", $from, $lineno);
- }
- }
- elsif ($line =~ /(^.*# *include )[<"](asio\/[^>"]*)[>"](.*)$/)
- {
- print_line($output, $1 . "<boost/" . $2 . ">" . $3, $from, $lineno);
- }
- elsif ($line =~ /#.*defined\(.*ASIO_HAS_STD_SYSTEM_ERROR\)$/)
- {
- # Line is removed.
- }
- elsif ($line =~ /asio::thread/)
- {
- if ($is_test)
- {
- $line =~ s/asio::thread/asio::detail::thread/g;
- }
- else
- {
- $line =~ s/asio::thread/boost::thread/g;
- }
- if (!($line =~ /boost::asio::/))
- {
- $line =~ s/asio::/boost::asio::/g;
- }
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /^( *)thread( .*)$/ && !$is_qbk)
- {
- if ($is_test)
- {
- print_line($output, $1 . "boost::asio::detail::thread" . $2, $from, $lineno);
- }
- else
- {
- print_line($output, $1 . "boost::thread" . $2, $from, $lineno);
- }
- }
- elsif ($line =~ /namespace std {/)
- {
- print_line($output, "namespace boost {", $from, $lineno);
- print_line($output, "namespace system {", $from, $lineno);
- }
- elsif ($line =~ /std::error_code/)
- {
- $line =~ s/std::error_code/boost::system::error_code/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /} \/\/ namespace std/)
- {
- print_line($output, "} // namespace system", $from, $lineno);
- print_line($output, "} // namespace boost", $from, $lineno);
- }
- elsif ($line =~ /asio::/ && !($line =~ /boost::asio::/))
- {
- $line =~ s/asio::error_code/boost::system::error_code/g;
- $line =~ s/asio::error_category/boost::system::error_category/g;
- $line =~ s/asio::system_category/boost::system::system_category/g;
- $line =~ s/asio::system_error/boost::system::system_error/g;
- $line =~ s/asio::/boost::asio::/g if !$is_xsl;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /using namespace asio/)
- {
- $line =~ s/using namespace asio/using namespace boost::asio/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /asio_handler_alloc_helpers/)
- {
- $line =~ s/asio_handler_alloc_helpers/boost_asio_handler_alloc_helpers/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /asio_handler_cont_helpers/)
- {
- $line =~ s/asio_handler_cont_helpers/boost_asio_handler_cont_helpers/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /asio_handler_invoke_helpers/)
- {
- $line =~ s/asio_handler_invoke_helpers/boost_asio_handler_invoke_helpers/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /[\\@]ref boost_bind/)
- {
- $line =~ s/[\\@]ref boost_bind/boost::bind()/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /( *)\[category template\]/)
- {
- print_line($output, $1 . "[authors [Kohlhoff, Christopher]]", $from, $lineno);
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /boostify: non-boost docs start here/)
- {
- while ($line = <$input>)
- {
- last if $line =~ /boostify: non-boost docs end here/;
- }
- }
- elsif ($line =~ /boostify: non-boost code starts here/)
- {
- while ($line = <$input>)
- {
- last if $line =~ /boostify: non-boost code ends here/;
- }
- }
- elsif ($line =~ /^$/ && $needs_doc_link)
- {
- $needs_doc_link = 0;
- print_line($output, "// See www.boost.org/libs/asio for documentation.", $from, $lineno);
- print_line($output, "//", $from, $lineno);
- print_line($output, $line, $from, $lineno);
- }
- else
- {
- print_line($output, $line, $from, $lineno);
- }
- ++$lineno;
- }
-
- # Ok, we're done.
- close($input);
- close($output);
-}
-
-sub copy_include_files
-{
- my @dirs = (
- "include",
- "include/asio",
- "include/asio/detail",
- "include/asio/detail/impl",
- "include/asio/generic",
- "include/asio/generic/detail",
- "include/asio/generic/detail/impl",
- "include/asio/impl",
- "include/asio/ip",
- "include/asio/ip/impl",
- "include/asio/ip/detail",
- "include/asio/ip/detail/impl",
- "include/asio/local",
- "include/asio/local/detail",
- "include/asio/local/detail/impl",
- "include/asio/posix",
- "include/asio/ssl",
- "include/asio/ssl/detail",
- "include/asio/ssl/detail/impl",
- "include/asio/ssl/impl",
- "include/asio/ssl/old",
- "include/asio/ssl/old/detail",
- "include/asio/windows");
-
- foreach my $dir (@dirs)
- {
- our $boost_dir;
- my @files = ( glob("$dir/*.hpp"), glob("$dir/*.ipp"), glob("$dir/*cpp") );
- foreach my $file (@files)
- {
- if ($file ne "include/asio/thread.hpp"
- and $file ne "include/asio/error_code.hpp"
- and $file ne "include/asio/system_error.hpp"
- and $file ne "include/asio/impl/error_code.hpp"
- and $file ne "include/asio/impl/error_code.ipp")
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^include\//$boost_dir\/libs\/asio\/include\/boost\//;
- copy_source_file($from, $to);
- }
- }
- }
-}
-
-sub create_lib_directory
-{
- my @dirs = (
- "doc",
- "example",
- "test");
-
- our $boost_dir;
- foreach my $dir (@dirs)
- {
- mkpath("$boost_dir/libs/asio/$dir");
- }
-}
-
-sub copy_unit_tests
-{
- my @dirs = (
- "src/tests/unit",
- "src/tests/unit/archetypes",
- "src/tests/unit/generic",
- "src/tests/unit/ip",
- "src/tests/unit/local",
- "src/tests/unit/posix",
- "src/tests/unit/ssl",
- "src/tests/unit/windows");
-
- our $boost_dir;
- foreach my $dir (@dirs)
- {
- my @files = ( glob("$dir/*.*pp"), glob("$dir/Jamfile*") );
- foreach my $file (@files)
- {
- if ($file ne "src/tests/unit/thread.cpp"
- and $file ne "src/tests/unit/error_handler.cpp"
- and $file ne "src/tests/unit/unit_test.cpp")
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^src\/tests\/unit\//$boost_dir\/libs\/asio\/test\//;
- copy_source_file($from, $to);
- }
- }
- }
-}
-
-sub copy_latency_tests
-{
- my @dirs = (
- "src/tests/latency");
-
- our $boost_dir;
- foreach my $dir (@dirs)
- {
- my @files = ( glob("$dir/*.*pp"), glob("$dir/Jamfile*") );
- foreach my $file (@files)
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^src\/tests\/latency\//$boost_dir\/libs\/asio\/test\/latency\//;
- copy_source_file($from, $to);
- }
- }
-}
-
-sub copy_examples
-{
- my @dirs = (
- "src/examples/cpp03/allocation",
- "src/examples/cpp03/buffers",
- "src/examples/cpp03/chat",
- "src/examples/cpp03/echo",
- "src/examples/cpp03/fork",
- "src/examples/cpp03/http/client",
- "src/examples/cpp03/http/doc_root",
- "src/examples/cpp03/http/server",
- "src/examples/cpp03/http/server2",
- "src/examples/cpp03/http/server3",
- "src/examples/cpp03/http/server4",
- "src/examples/cpp03/icmp",
- "src/examples/cpp03/invocation",
- "src/examples/cpp03/iostreams",
- "src/examples/cpp03/local",
- "src/examples/cpp03/multicast",
- "src/examples/cpp03/nonblocking",
- "src/examples/cpp03/porthopper",
- "src/examples/cpp03/serialization",
- "src/examples/cpp03/services",
- "src/examples/cpp03/socks4",
- "src/examples/cpp03/spawn",
- "src/examples/cpp03/ssl",
- "src/examples/cpp03/timeouts",
- "src/examples/cpp03/timers",
- "src/examples/cpp03/tutorial",
- "src/examples/cpp03/tutorial/daytime1",
- "src/examples/cpp03/tutorial/daytime2",
- "src/examples/cpp03/tutorial/daytime3",
- "src/examples/cpp03/tutorial/daytime4",
- "src/examples/cpp03/tutorial/daytime5",
- "src/examples/cpp03/tutorial/daytime6",
- "src/examples/cpp03/tutorial/daytime7",
- "src/examples/cpp03/tutorial/timer1",
- "src/examples/cpp03/tutorial/timer2",
- "src/examples/cpp03/tutorial/timer3",
- "src/examples/cpp03/tutorial/timer4",
- "src/examples/cpp03/tutorial/timer5",
- "src/examples/cpp03/windows",
- "src/examples/cpp11/allocation",
- "src/examples/cpp11/buffers",
- "src/examples/cpp11/chat",
- "src/examples/cpp11/echo",
- "src/examples/cpp11/executors",
- "src/examples/cpp11/futures",
- "src/examples/cpp11/http/server",
- "src/examples/cpp11/iostreams",
- "src/examples/cpp11/spawn",
- "src/examples/cpp14/executors");
-
- our $boost_dir;
- foreach my $dir (@dirs)
- {
- my @files = (
- glob("$dir/*.*pp"),
- glob("$dir/*.html"),
- glob("$dir/Jamfile*"),
- glob("$dir/*.pem"),
- glob("$dir/README*"),
- glob("$dir/*.txt"));
- foreach my $file (@files)
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^src\/examples\//$boost_dir\/libs\/asio\/example\//;
- copy_source_file($from, $to);
- }
- }
-}
-
-sub copy_doc
-{
- our $boost_dir;
- my @files = (
- "src/doc/asio.qbk",
- "src/doc/examples.qbk",
- "src/doc/reference.xsl",
- "src/doc/tutorial.xsl",
- glob("src/doc/overview/*.qbk"),
- glob("src/doc/requirements/*.qbk"));
- foreach my $file (@files)
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^src\/doc\//$boost_dir\/libs\/asio\/doc\//;
- copy_source_file($from, $to);
- }
-}
-
-sub copy_tools
-{
- our $boost_dir;
- my @files = (
- glob("src/tools/*.pl"));
- foreach my $file (@files)
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^src\/tools\//$boost_dir\/libs\/asio\/tools\//;
- copy_source_file($from, $to);
- }
-}
-
-copy_include_files();
-create_lib_directory();
-copy_unit_tests();
-copy_latency_tests();
-copy_examples();
-copy_doc();
-copy_tools();
diff --git a/3rdparty/asio/compile b/3rdparty/asio/compile
new file mode 100755
index 00000000000..df363c8fbfb
--- /dev/null
+++ b/3rdparty/asio/compile
@@ -0,0 +1,348 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN* | MSYS*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/* | msys/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/3rdparty/asio/config.guess b/3rdparty/asio/config.guess
new file mode 100755
index 00000000000..e81d3ae7c21
--- /dev/null
+++ b/3rdparty/asio/config.guess
@@ -0,0 +1,1748 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2021 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-06-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2021 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ # prevent multiple calls if $tmp is already set
+ test "$tmp" && return 0
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039,SC3028
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD=$driver
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+ LIBC=unknown
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #elif defined(__GLIBC__)
+ LIBC=gnu
+ #else
+ #include <stdarg.h>
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
+ #endif
+ EOF
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "$cc_set_libc"
+
+ # Second heuristic to detect musl libc.
+ if [ "$LIBC" = unknown ] &&
+ command -v ldd >/dev/null &&
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ if [ "$LIBC" = unknown ]; then
+ LIBC=gnu
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ echo unknown)`
+ case $UNAME_MACHINE_ARCH in
+ aarch64eb) machine=aarch64_be-unknown ;;
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case $UNAME_VERSION in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ GUESS=$machine-${os}${release}${abi-}
+ ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+ ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+ ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+ ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+ ;;
+ *:MidnightBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+ ;;
+ *:ekkoBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+ ;;
+ *:SolidBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+ ;;
+ *:OS108:*:*)
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+ ;;
+ macppc:MirBSD:*:*)
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:MirBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:Sortix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-sortix
+ ;;
+ *:Twizzler:*:*)
+ GUESS=$UNAME_MACHINE-unknown-twizzler
+ ;;
+ *:Redox:*:*)
+ GUESS=$UNAME_MACHINE-unknown-redox
+ ;;
+ mips:OSF1:*.*)
+ GUESS=mips-dec-osf1
+ ;;
+ alpha:OSF1:*:*)
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ trap '' 0
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case $ALPHA_CPU_TYPE in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+ ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ GUESS=m68k-unknown-sysv4
+ ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-amigaos
+ ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-morphos
+ ;;
+ *:OS/390:*:*)
+ GUESS=i370-ibm-openedition
+ ;;
+ *:z/VM:*:*)
+ GUESS=s390-ibm-zvmoe
+ ;;
+ *:OS400:*:*)
+ GUESS=powerpc-ibm-os400
+ ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
+ ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ GUESS=arm-unknown-riscos
+ ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ GUESS=hppa1.1-hitachi-hiuxmpp
+ ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ case `(/bin/universe) 2>/dev/null` in
+ att) GUESS=pyramid-pyramid-sysv3 ;;
+ *) GUESS=pyramid-pyramid-bsd ;;
+ esac
+ ;;
+ NILE*:*:*:dcosx)
+ GUESS=pyramid-pyramid-svr4
+ ;;
+ DRS?6000:unix:4.0:6*)
+ GUESS=sparc-icl-nx6
+ ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) GUESS=sparc-icl-nx7 ;;
+ esac
+ ;;
+ s390x:SunOS:*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+ ;;
+ sun4H:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-hal-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris2$SUN_REL
+ ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
+ ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris3$SUN_REL
+ ;;
+ sun4*:SunOS:*:*)
+ case `/usr/bin/arch -k` in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+ GUESS=sparc-sun-sunos$SUN_REL
+ ;;
+ sun3*:SunOS:*:*)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case `/bin/arch` in
+ sun3)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun4)
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
+ ;;
+ esac
+ ;;
+ aushp:SunOS:*:*)
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
+ ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ GUESS=m68k-milan-mint$UNAME_RELEASE
+ ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ GUESS=m68k-hades-mint$UNAME_RELEASE
+ ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
+ ;;
+ m68k:machten:*:*)
+ GUESS=m68k-apple-machten$UNAME_RELEASE
+ ;;
+ powerpc:machten:*:*)
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
+ ;;
+ RISC*:Mach:*:*)
+ GUESS=mips-dec-mach_bsd4.3
+ ;;
+ RISC*:ULTRIX:*:*)
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
+ ;;
+ VAX*:ULTRIX*:*:*)
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
+ ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
+ ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=mips-mips-riscos$UNAME_RELEASE
+ ;;
+ Motorola:PowerMAX_OS:*:*)
+ GUESS=powerpc-motorola-powermax
+ ;;
+ Motorola:*:4.3:PL8-*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:Power_UNIX:*:*)
+ GUESS=powerpc-harris-powerunix
+ ;;
+ m88k:CX/UX:7*:*)
+ GUESS=m88k-harris-cxux7
+ ;;
+ m88k:*:4*:R4*)
+ GUESS=m88k-motorola-sysv4
+ ;;
+ m88k:*:3*:R3*)
+ GUESS=m88k-motorola-sysv3
+ ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+ then
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+ test "$TARGET_BINARY_INTERFACE"x = x
+ then
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
+ else
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+ fi
+ else
+ GUESS=i586-dg-dgux$UNAME_RELEASE
+ fi
+ ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ GUESS=m88k-dolphin-sysv3
+ ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ GUESS=m88k-motorola-sysv3
+ ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ GUESS=m88k-tektronix-sysv3
+ ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ GUESS=m68k-tektronix-bsd
+ ;;
+ *:IRIX*:*:*)
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+ GUESS=mips-sgi-irix$IRIX_REL
+ ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ GUESS=i386-ibm-aix
+ ;;
+ ia64:AIX:*:*)
+ if test -x /usr/bin/oslevel ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+ ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ GUESS=$SYSTEM_NAME
+ else
+ GUESS=rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ GUESS=rs6000-ibm-aix3.2.4
+ else
+ GUESS=rs6000-ibm-aix3.2
+ fi
+ ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if test -x /usr/bin/lslpp ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+ ;;
+ *:AIX:*:*)
+ GUESS=rs6000-ibm-aix
+ ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ GUESS=romp-ibm-bsd4.4
+ ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
+ ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ GUESS=rs6000-bull-bosx
+ ;;
+ DPX/2?00:B.O.S.:*:*)
+ GUESS=m68k-bull-sysv3
+ ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ GUESS=m68k-hp-bsd
+ ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ GUESS=m68k-hp-bsd4.4
+ ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ case $UNAME_MACHINE in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if test -x /usr/bin/getconf; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case $sc_cpu_version in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case $sc_kernel_bits in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if test "$HP_ARCH" = ""; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if test "$HP_ARCH" = hppa2.0w
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+ ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ GUESS=ia64-hp-hpux$HPUX_REV
+ ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=unknown-hitachi-hiuxwe2
+ ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ GUESS=hppa1.1-hp-bsd
+ ;;
+ 9000/8??:4.3bsd:*:*)
+ GUESS=hppa1.0-hp-bsd
+ ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ GUESS=hppa1.0-hp-mpeix
+ ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ GUESS=hppa1.1-hp-osf
+ ;;
+ hp8??:OSF1:*:*)
+ GUESS=hppa1.0-hp-osf
+ ;;
+ i*86:OSF1:*:*)
+ if test -x /usr/sbin/sysversion ; then
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
+ else
+ GUESS=$UNAME_MACHINE-unknown-osf1
+ fi
+ ;;
+ parisc*:Lites*:*:*)
+ GUESS=hppa1.1-hp-lites
+ ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ GUESS=c1-convex-bsd
+ ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ GUESS=c34-convex-bsd
+ ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ GUESS=c38-convex-bsd
+ ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ GUESS=c4-convex-bsd
+ ;;
+ CRAY*Y-MP:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=ymp-cray-unicos$CRAY_REL
+ ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=t90-cray-unicos$CRAY_REL
+ ;;
+ CRAY*T3E:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
+ ;;
+ CRAY*SV1:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=sv1-cray-unicos$CRAY_REL
+ ;;
+ *:UNICOS/mp:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=craynv-cray-unicosmp$CRAY_REL
+ ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+ ;;
+ sparc*:BSD/OS:*:*)
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+ ;;
+ *:BSD/OS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+ ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+ else
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+ fi
+ ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case $UNAME_PROCESSOR in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+ ;;
+ i*:CYGWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-cygwin
+ ;;
+ *:MINGW64*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw64
+ ;;
+ *:MINGW*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw32
+ ;;
+ *:MSYS*:*)
+ GUESS=$UNAME_MACHINE-pc-msys
+ ;;
+ i*:PW*:*)
+ GUESS=$UNAME_MACHINE-pc-pw32
+ ;;
+ *:Interix*:*)
+ case $UNAME_MACHINE in
+ x86)
+ GUESS=i586-pc-interix$UNAME_RELEASE
+ ;;
+ authenticamd | genuineintel | EM64T)
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
+ ;;
+ IA64)
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
+ ;;
+ esac ;;
+ i*:UWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-uwin
+ ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ GUESS=x86_64-pc-cygwin
+ ;;
+ prep*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+ ;;
+ *:GNU:*:*)
+ # the GNU system
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+ ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ *:Minix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-minix
+ ;;
+ aarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+ else
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ ;;
+ avr32*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ cris:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ crisv32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ e2k:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ frv:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ hexagon:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:Linux:*:*)
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+ ;;
+ ia64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ k1om:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m32r*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m68*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+ eval "$cc_set_vars"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ openrisc*:Linux:*:*)
+ GUESS=or1k-unknown-linux-$LIBC
+ ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ padre:Linux:*:*)
+ GUESS=sparc-unknown-linux-$LIBC
+ ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ GUESS=hppa64-unknown-linux-$LIBC
+ ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
+ esac
+ ;;
+ ppc64:Linux:*:*)
+ GUESS=powerpc64-unknown-linux-$LIBC
+ ;;
+ ppc:Linux:*:*)
+ GUESS=powerpc-unknown-linux-$LIBC
+ ;;
+ ppc64le:Linux:*:*)
+ GUESS=powerpc64le-unknown-linux-$LIBC
+ ;;
+ ppcle:Linux:*:*)
+ GUESS=powerpcle-unknown-linux-$LIBC
+ ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+ ;;
+ sh64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sh*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ tile*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ vax:Linux:*:*)
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+ ;;
+ x86_64:Linux:*:*)
+ set_cc_for_build
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_X32 >/dev/null
+ then
+ LIBCABI=${LIBC}x32
+ fi
+ fi
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+ ;;
+ xtensa*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ GUESS=i386-sequent-sysv4
+ ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+ ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ GUESS=$UNAME_MACHINE-pc-os2-emx
+ ;;
+ i*86:XTS-300:*:STOP)
+ GUESS=$UNAME_MACHINE-unknown-stop
+ ;;
+ i*86:atheos:*:*)
+ GUESS=$UNAME_MACHINE-unknown-atheos
+ ;;
+ i*86:syllable:*:*)
+ GUESS=$UNAME_MACHINE-pc-syllable
+ ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
+ ;;
+ i*86:*DOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+ ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+ fi
+ ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv32
+ fi
+ ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ GUESS=i586-pc-msdosdjgpp
+ ;;
+ Intel:Mach:3*:*)
+ GUESS=i386-pc-mach3
+ ;;
+ paragon:*:*:*)
+ GUESS=i860-intel-osf1
+ ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
+ fi
+ ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ GUESS=m68010-convergent-sysv
+ ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ GUESS=m68k-convergent-sysv
+ ;;
+ M680?0:D-NIX:5.3:*)
+ GUESS=m68k-diab-dnix
+ ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+ ;;
+ mc68030:UNIX_System_V:4.*:*)
+ GUESS=m68k-atari-sysv4
+ ;;
+ TSUNAMI:LynxOS:2.*:*)
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ rs6000:LynxOS:2.*:*)
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+ ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ SM[BE]S:UNIX_SV:*:*)
+ GUESS=mips-dde-sysv$UNAME_RELEASE
+ ;;
+ RM*:ReliantUNIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ RM*:SINIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ GUESS=$UNAME_MACHINE-sni-sysv4
+ else
+ GUESS=ns32k-sni-sysv
+ fi
+ ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ GUESS=i586-unisys-sysv4
+ ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ GUESS=hppa1.1-stratus-sysv4
+ ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ GUESS=i860-stratus-sysv4
+ ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=$UNAME_MACHINE-stratus-vos
+ ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=hppa1.1-stratus-vos
+ ;;
+ mc68*:A/UX:*:*)
+ GUESS=m68k-apple-aux$UNAME_RELEASE
+ ;;
+ news*:NEWS-OS:6*:*)
+ GUESS=mips-sony-newsos6
+ ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if test -d /usr/nec; then
+ GUESS=mips-nec-sysv$UNAME_RELEASE
+ else
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
+ fi
+ ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ GUESS=powerpc-be-beos
+ ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ GUESS=powerpc-apple-beos
+ ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ GUESS=i586-pc-beos
+ ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ GUESS=i586-pc-haiku
+ ;;
+ x86_64:Haiku:*:*)
+ GUESS=x86_64-unknown-haiku
+ ;;
+ SX-4:SUPER-UX:*:*)
+ GUESS=sx4-nec-superux$UNAME_RELEASE
+ ;;
+ SX-5:SUPER-UX:*:*)
+ GUESS=sx5-nec-superux$UNAME_RELEASE
+ ;;
+ SX-6:SUPER-UX:*:*)
+ GUESS=sx6-nec-superux$UNAME_RELEASE
+ ;;
+ SX-7:SUPER-UX:*:*)
+ GUESS=sx7-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8:SUPER-UX:*:*)
+ GUESS=sx8-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8R:SUPER-UX:*:*)
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
+ ;;
+ SX-ACE:SUPER-UX:*:*)
+ GUESS=sxace-nec-superux$UNAME_RELEASE
+ ;;
+ Power*:Rhapsody:*:*)
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+ ;;
+ *:Rhapsody:*:*)
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+ ;;
+ arm64:Darwin:*:*)
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
+ fi
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
+ fi
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+ ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+ ;;
+ *:QNX:*:4*)
+ GUESS=i386-pc-qnx
+ ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
+ ;;
+ *:NonStop-UX:*:*)
+ GUESS=mips-compaq-nonstopux
+ ;;
+ BS2000:POSIX*:*:*)
+ GUESS=bs2000-siemens-sysv
+ ;;
+ DS/*:UNIX_System_V:*:*)
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+ ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "${cputype-}" = 386; then
+ UNAME_MACHINE=i386
+ elif test "x${cputype-}" != x; then
+ UNAME_MACHINE=$cputype
+ fi
+ GUESS=$UNAME_MACHINE-unknown-plan9
+ ;;
+ *:TOPS-10:*:*)
+ GUESS=pdp10-unknown-tops10
+ ;;
+ *:TENEX:*:*)
+ GUESS=pdp10-unknown-tenex
+ ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ GUESS=pdp10-dec-tops20
+ ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ GUESS=pdp10-xkl-tops20
+ ;;
+ *:TOPS-20:*:*)
+ GUESS=pdp10-unknown-tops20
+ ;;
+ *:ITS:*:*)
+ GUESS=pdp10-unknown-its
+ ;;
+ SEI:*:*:SEIUX)
+ GUESS=mips-sei-seiux$UNAME_RELEASE
+ ;;
+ *:DragonFly:*:*)
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+ ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case $UNAME_MACHINE in
+ A*) GUESS=alpha-dec-vms ;;
+ I*) GUESS=ia64-dec-vms ;;
+ V*) GUESS=vax-dec-vms ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ GUESS=i386-pc-xenix
+ ;;
+ i*86:skyos:*:*)
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+ ;;
+ i*86:rdos:*:*)
+ GUESS=$UNAME_MACHINE-pc-rdos
+ ;;
+ *:AROS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-aros
+ ;;
+ x86_64:VMkernel:*:*)
+ GUESS=$UNAME_MACHINE-unknown-esx
+ ;;
+ amd64:Isilon\ OneFS:*:*)
+ GUESS=x86_64-unknown-onefs
+ ;;
+ *:Unleashed:*:*)
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+ ;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+ echo "$GUESS"
+ exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+ cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/3rdparty/asio/config.sub b/3rdparty/asio/config.sub
new file mode 100755
index 00000000000..d74fb6deac9
--- /dev/null
+++ b/3rdparty/asio/config.sub
@@ -0,0 +1,1884 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2021 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-08-14'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2021 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ basic_os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ basic_os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ basic_os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ basic_os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ basic_os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ basic_os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ basic_os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ basic_os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ basic_os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ basic_os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ basic_os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ basic_os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ basic_os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ basic_os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ basic_os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ basic_os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ basic_os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ basic_os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ basic_os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ basic_os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ basic_os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ basic_os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ basic_os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ basic_os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ basic_os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ basic_os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ basic_os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ basic_os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ basic_os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ basic_os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ basic_os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ basic_os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ basic_os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ basic_os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ basic_os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ basic_os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ basic_os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ basic_os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ basic_os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ basic_os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ basic_os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ basic_os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ basic_os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ basic_os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ basic_os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ basic_os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ basic_os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ basic_os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ basic_os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ basic_os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ basic_os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ basic_os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ basic_os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ basic_os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ basic_os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ basic_os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ basic_os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ basic_os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ basic_os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ basic_os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ basic_os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ basic_os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ basic_os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ basic_os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ basic_os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ basic_os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ basic_os=linux
+ ;;
+ psp)
+ basic_machine=mipsallegrexel-sony
+ basic_os=psp
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ basic_os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ basic_os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ basic_os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ basic_os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ basic_os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ basic_os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ basic_os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ basic_os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ basic_os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ basic_os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ basic_os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ basic_os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ basic_os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ basic_os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ basic_os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ basic_os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ basic_os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ basic_os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ basic_os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ basic_os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ basic_os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ basic_os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ basic_os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ basic_os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ basic_os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ basic_os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ basic_os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ basic_os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ basic_os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ basic_os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ basic_os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ basic_os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ basic_os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ basic_os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ basic_os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ basic_os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ basic_os=${basic_os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ basic_os=${basic_os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $basic_os in
+ irix*)
+ ;;
+ *)
+ basic_os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ basic_os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ basic_os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
+ ;;
+ ns2*)
+ basic_os=nextstep2
+ ;;
+ *)
+ basic_os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ basic_os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ basic_os=${basic_os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ basic_os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ basic_os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ IFS=$saved_IFS
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
+ ;;
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
+ ;;
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
+ ;;
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
+ ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ basic_os=${basic_os:-unicosmp}
+ ;;
+ c90-unknown | c90-cray)
+ vendor=cray
+ basic_os=${Basic_os:-unicos}
+ ;;
+ fx80-unknown)
+ vendor=alliant
+ ;;
+ romp-unknown)
+ vendor=ibm
+ ;;
+ mmix-unknown)
+ vendor=knuth
+ ;;
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
+ ;;
+ rs6000-unknown)
+ vendor=ibm
+ ;;
+ vax-unknown)
+ vendor=dec
+ ;;
+ pdp11-unknown)
+ vendor=dec
+ ;;
+ we32k-unknown)
+ vendor=att
+ ;;
+ cydra-unknown)
+ vendor=cydrome
+ ;;
+ i370-ibm*)
+ vendor=ibm
+ ;;
+ orion-unknown)
+ vendor=highlevel
+ ;;
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
+ ;;
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ basic_os=${basic_os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ basic_os=linux
+ ;;
+ c54x-*)
+ cpu=tic54x
+ ;;
+ c55x-*)
+ cpu=tic55x
+ ;;
+ c6x-*)
+ cpu=tic6x
+ ;;
+ e500v[12]-*)
+ cpu=powerpc
+ basic_os=${basic_os}"spe"
+ ;;
+ mips3*-*)
+ cpu=mips64
+ ;;
+ ms1-*)
+ cpu=mt
+ ;;
+ m68knommu-*)
+ cpu=m68k
+ basic_os=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ basic_os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ ppc-* | ppcbe-*)
+ cpu=powerpc
+ ;;
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
+ ;;
+ ppc64-*)
+ cpu=powerpc64
+ ;;
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
+ ;;
+ sb1-*)
+ cpu=mipsisa64sb1
+ ;;
+ sb1el-*)
+ cpu=mipsisa64sb1el
+ ;;
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+ ;;
+ spur-*)
+ cpu=spur
+ ;;
+ strongarm-* | thumb-*)
+ cpu=arm
+ ;;
+ tx39-*)
+ cpu=mipstx39
+ ;;
+ tx39el-*)
+ cpu=mipstx39el
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+ ;;
+ arm64-*)
+ cpu=aarch64
+ ;;
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
+ ;;
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
+ ;;
+ crx-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
+ ;;
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
+ ;;
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
+ ;;
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
+ ;;
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
+ ;;
+ mipsallegrexel-sony)
+ cpu=mipsallegrexel
+ vendor=sony
+ ;;
+ tile*-*)
+ basic_os=${basic_os:-linux-gnu}
+ ;;
+
+ *)
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc32 | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 | loongarchx32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+ gnu/linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+ ;;
+ os2-emx)
+ kernel=os2
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+ ;;
+ nto-qnx*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+ IFS=$saved_IFS
+ ;;
+ # Default OS when just kernel was specified
+ nto*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+ ;;
+ linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+ ;;
+ *)
+ kernel=
+ os=$basic_os
+ ;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco*v* | scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ qnx*)
+ os=qnx
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynxos*)
+ # don't get caught up in next wildcard
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac[0-9]*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo "$os" | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ *)
+ # No normalization, but not necessarily accepted, that comes below.
+ ;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ kernel=linux
+ os=gnu
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | relibc* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
+ ;;
+ # This one is extra strict with allowed versions
+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ none)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+ | linux-musl* | linux-relibc* | linux-uclibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+ # These are just libc implementations, not actual OSes, and thus
+ # require a kernel.
+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS is always fine.
+ ;;
+ *-*)
+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $cpu-$os in
+ *-riscix*)
+ vendor=acorn
+ ;;
+ *-sunos*)
+ vendor=sun
+ ;;
+ *-cnk* | *-aix*)
+ vendor=ibm
+ ;;
+ *-beos*)
+ vendor=be
+ ;;
+ *-hpux*)
+ vendor=hp
+ ;;
+ *-mpeix*)
+ vendor=hp
+ ;;
+ *-hiux*)
+ vendor=hitachi
+ ;;
+ *-unos*)
+ vendor=crds
+ ;;
+ *-dgux*)
+ vendor=dg
+ ;;
+ *-luna*)
+ vendor=omron
+ ;;
+ *-genix*)
+ vendor=ns
+ ;;
+ *-clix*)
+ vendor=intergraph
+ ;;
+ *-mvs* | *-opened*)
+ vendor=ibm
+ ;;
+ *-os400*)
+ vendor=ibm
+ ;;
+ s390-* | s390x-*)
+ vendor=ibm
+ ;;
+ *-ptx*)
+ vendor=sequent
+ ;;
+ *-tpf*)
+ vendor=ibm
+ ;;
+ *-vxsim* | *-vxworks* | *-windiss*)
+ vendor=wrs
+ ;;
+ *-aux*)
+ vendor=apple
+ ;;
+ *-hms*)
+ vendor=hitachi
+ ;;
+ *-mpw* | *-macos*)
+ vendor=apple
+ ;;
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+ vendor=atari
+ ;;
+ *-vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/3rdparty/asio/configure b/3rdparty/asio/configure
new file mode 100755
index 00000000000..3f97eb5ce3f
--- /dev/null
+++ b/3rdparty/asio/configure
@@ -0,0 +1,7133 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.71 for asio 1.30.2.
+#
+#
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else \$as_nop
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
+
+else \$as_nop
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
+ as_have_required=yes
+else $as_nop
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
+
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
+
+
+ if test "x$CONFIG_SHELL" != x
+then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='asio'
+PACKAGE_TARNAME='asio'
+PACKAGE_VERSION='1.30.2'
+PACKAGE_STRING='asio 1.30.2'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="include/asio.hpp"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_cxx_list=
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+HAVE_COROUTINES_FALSE
+HAVE_COROUTINES_TRUE
+HAVE_CXX20_FALSE
+HAVE_CXX20_TRUE
+HAVE_CXX17_FALSE
+HAVE_CXX17_TRUE
+HAVE_CXX14_FALSE
+HAVE_CXX14_TRUE
+HAVE_CXX11_FALSE
+HAVE_CXX11_TRUE
+WINDOWS_TARGET_FALSE
+WINDOWS_TARGET_TRUE
+HAVE_BOOST_COROUTINE_FALSE
+HAVE_BOOST_COROUTINE_TRUE
+SEPARATE_COMPILATION_FALSE
+SEPARATE_COMPILATION_TRUE
+STANDALONE_FALSE
+STANDALONE_TRUE
+HAVE_OPENSSL_FALSE
+HAVE_OPENSSL_TRUE
+pkgconfigdir
+RANLIB
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+CSCOPE
+ETAGS
+CTAGS
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL
+am__quote'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_maintainer_mode
+enable_silent_rules
+enable_dependency_tracking
+with_pkgconfigdir
+with_boost
+enable_separate_compilation
+enable_boost_coroutine
+with_openssl
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures asio 1.30.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/asio]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of asio 1.30.2:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-separate-compilation separate compilation of asio source
+ --enable-boost-coroutine use Boost.Coroutine to implement stackful coroutines
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pkgconfigdir pkg-config installation directory
+ ['${libdir}/pkgconfig']
+ --with-boost=DIR location of boost distribution
+ --with-openssl=DIR location of openssl
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+asio configure 1.30.2
+generated by GNU Autoconf 2.71
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_cxx_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_cxx_check_header_compile
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by asio $as_me 1.30.2, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ $ $0$ac_configure_args_raw
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ printf "%s\n" "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ printf "%s\n" "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ printf "%s\n" "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ printf "%s\n" "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+printf "%s\n" "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ ac_site_files="$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
+else
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+fi
+
+for ac_site_file in $ac_site_files
+do
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+# Test code for whether the C++ compiler supports C++98 (global declarations)
+ac_cxx_conftest_cxx98_globals='
+// Does the compiler advertise C++98 conformance?
+#if !defined __cplusplus || __cplusplus < 199711L
+# error "Compiler does not advertise C++98 conformance"
+#endif
+
+// These inclusions are to reject old compilers that
+// lack the unsuffixed header files.
+#include <cstdlib>
+#include <exception>
+
+// <cassert> and <cstring> are *not* freestanding headers in C++98.
+extern void assert (int);
+namespace std {
+ extern int strcmp (const char *, const char *);
+}
+
+// Namespaces, exceptions, and templates were all added after "C++ 2.0".
+using std::exception;
+using std::strcmp;
+
+namespace {
+
+void test_exception_syntax()
+{
+ try {
+ throw "test";
+ } catch (const char *s) {
+ // Extra parentheses suppress a warning when building autoconf itself,
+ // due to lint rules shared with more typical C programs.
+ assert (!(strcmp) (s, "test"));
+ }
+}
+
+template <typename T> struct test_template
+{
+ T const val;
+ explicit test_template(T t) : val(t) {}
+ template <typename U> T add(U u) { return static_cast<T>(u) + val; }
+};
+
+} // anonymous namespace
+'
+
+# Test code for whether the C++ compiler supports C++98 (body of main)
+ac_cxx_conftest_cxx98_main='
+ assert (argc);
+ assert (! argv[0]);
+{
+ test_exception_syntax ();
+ test_template<double> tt (2.0);
+ assert (tt.add (4) == 6.0);
+ assert (true && !false);
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (global declarations)
+ac_cxx_conftest_cxx11_globals='
+// Does the compiler advertise C++ 2011 conformance?
+#if !defined __cplusplus || __cplusplus < 201103L
+# error "Compiler does not advertise C++11 conformance"
+#endif
+
+namespace cxx11test
+{
+ constexpr int get_val() { return 20; }
+
+ struct testinit
+ {
+ int i;
+ double d;
+ };
+
+ class delegate
+ {
+ public:
+ delegate(int n) : n(n) {}
+ delegate(): delegate(2354) {}
+
+ virtual int getval() { return this->n; };
+ protected:
+ int n;
+ };
+
+ class overridden : public delegate
+ {
+ public:
+ overridden(int n): delegate(n) {}
+ virtual int getval() override final { return this->n * 2; }
+ };
+
+ class nocopy
+ {
+ public:
+ nocopy(int i): i(i) {}
+ nocopy() = default;
+ nocopy(const nocopy&) = delete;
+ nocopy & operator=(const nocopy&) = delete;
+ private:
+ int i;
+ };
+
+ // for testing lambda expressions
+ template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
+ {
+ return f(v);
+ }
+
+ // for testing variadic templates and trailing return types
+ template <typename V> auto sum(V first) -> V
+ {
+ return first;
+ }
+ template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
+ {
+ return first + sum(rest...);
+ }
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (body of main)
+ac_cxx_conftest_cxx11_main='
+{
+ // Test auto and decltype
+ auto a1 = 6538;
+ auto a2 = 48573953.4;
+ auto a3 = "String literal";
+
+ int total = 0;
+ for (auto i = a3; *i; ++i) { total += *i; }
+
+ decltype(a2) a4 = 34895.034;
+}
+{
+ // Test constexpr
+ short sa[cxx11test::get_val()] = { 0 };
+}
+{
+ // Test initializer lists
+ cxx11test::testinit il = { 4323, 435234.23544 };
+}
+{
+ // Test range-based for
+ int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
+ 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
+ for (auto &x : array) { x += 23; }
+}
+{
+ // Test lambda expressions
+ using cxx11test::eval;
+ assert (eval ([](int x) { return x*2; }, 21) == 42);
+ double d = 2.0;
+ assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
+ assert (d == 5.0);
+ assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
+ assert (d == 5.0);
+}
+{
+ // Test use of variadic templates
+ using cxx11test::sum;
+ auto a = sum(1);
+ auto b = sum(1, 2);
+ auto c = sum(1.0, 2.0, 3.0);
+}
+{
+ // Test constructor delegation
+ cxx11test::delegate d1;
+ cxx11test::delegate d2();
+ cxx11test::delegate d3(45);
+}
+{
+ // Test override and final
+ cxx11test::overridden o1(55464);
+}
+{
+ // Test nullptr
+ char *c = nullptr;
+}
+{
+ // Test template brackets
+ test_template<::test_template<int>> v(test_template<int>(12));
+}
+{
+ // Unicode literals
+ char const *utf8 = u8"UTF-8 string \u2500";
+ char16_t const *utf16 = u"UTF-8 string \u2500";
+ char32_t const *utf32 = U"UTF-32 string \u2500";
+}
+'
+
+# Test code for whether the C compiler supports C++11 (complete).
+ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
+${ac_cxx_conftest_cxx11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ ${ac_cxx_conftest_cxx11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C++98 (complete).
+ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="compile config.guess config.sub missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test ${enable_maintainer_mode+y}
+then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else $as_nop
+ USE_MAINTAINER_MODE=no
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+am__api_version='1.16'
+
+
+
+ # Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test ${ac_cv_path_install+y}; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test ${ac_cv_path_mkdir+y}; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SET_MAKE=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='asio'
+ VERSION='1.30.2'
+
+
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
+
+
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+printf %s "checking how to create a pax tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_pax}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ if test ${am_cv_prog_tar_pax+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ am_cv_prog_tar_pax=$_am_tool
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+printf "%s\n" "$am_cv_prog_tar_pax" >&6; }
+
+
+
+
+
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
+
+# Check whether --enable-dependency-tracking was given.
+if test ${enable_dependency_tracking+y}
+then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else $as_nop
+ ac_file=''
+fi
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+
+
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+printf "%s\n" "$ac_ct_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
+printf %s "checking whether the compiler supports GNU C++... " >&6; }
+if test ${ac_cv_cxx_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+y}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+printf %s "checking whether $CXX accepts -g... " >&6; }
+if test ${ac_cv_prog_cxx_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+else $as_nop
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
+if test $ac_test_CXXFLAGS; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_prog_cxx_stdcxx=no
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+printf %s "checking for $CXX option to enable C++11 features... " >&6; }
+if test ${ac_cv_prog_cxx_11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_11=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx11_program
+_ACEOF
+for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx11"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+ ac_prog_cxx_stdcxx=cxx11
+fi
+fi
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
+printf %s "checking for $CXX option to enable C++98 features... " >&6; }
+if test ${ac_cv_prog_cxx_98+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_98=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx98_program
+_ACEOF
+for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx98=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx98" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx98" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx98"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+ ac_prog_cxx_stdcxx=cxx98
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CXX_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+
+# Check whether --with-pkgconfigdir was given.
+if test ${with_pkgconfigdir+y}
+then :
+ withval=$with_pkgconfigdir;
+else $as_nop
+ with_pkgconfigdir='${libdir}/pkgconfig'
+fi
+
+pkgconfigdir=$with_pkgconfigdir
+
+
+
+
+
+
+printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
+
+
+
+# Check whether --with-boost was given.
+if test ${with_boost+y}
+then :
+ withval=$with_boost;
+ if test "${withval}" = no; then
+ STANDALONE="yes"
+ else
+ if test "${withval}" != system; then
+ CPPFLAGS="$CPPFLAGS -I${withval}"
+ LIBS="$LIBS -L${withval}/stage/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -DASIO_ENABLE_BOOST -DBOOST_CHRONO_HEADER_ONLY -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING"
+ fi
+
+else $as_nop
+
+ STANDALONE="yes"
+
+fi
+
+
+# Check whether --enable-separate-compilation was given.
+if test ${enable_separate_compilation+y}
+then :
+ enableval=$enable_separate_compilation;
+ SEPARATE_COMPILATION=yes
+
+fi
+
+
+# Check whether --enable-boost-coroutine was given.
+if test ${enable_boost_coroutine+y}
+then :
+ enableval=$enable_boost_coroutine;
+ HAVE_BOOST_COROUTINE=yes
+
+fi
+
+
+if test "$STANDALONE" != yes; then
+
+ac_header= ac_cache=
+for ac_item in $ac_header_cxx_list
+do
+ if test $ac_cache; then
+ ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+ac_fn_cxx_check_header_compile "$LINENO" "boost/noncopyable.hpp" "ac_cv_header_boost_noncopyable_hpp" "$ac_includes_default"
+if test "x$ac_cv_header_boost_noncopyable_hpp" = xyes
+then :
+
+else $as_nop
+
+ echo "Can't find boost headers. Please check the location of the boost"
+ echo "distribution and rerun configure using the --with-boost=DIR option."
+ echo "Alternatively, run with --without-boost to enable standalone build."
+ exit 1
+
+fi
+
+fi
+
+
+# Check whether --with-openssl was given.
+if test ${with_openssl+y}
+then :
+ withval=$with_openssl;
+ CPPFLAGS="$CPPFLAGS -I${withval}/include"
+ LIBS="$LIBS -L${withval}/lib"
+
+fi
+
+
+ac_fn_cxx_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes
+then :
+
+else $as_nop
+
+ OPENSSL_FOUND=no
+
+fi
+
+
+if test x$OPENSSL_FOUND != xno; then
+ LIBS="$LIBS -lssl -lcrypto"
+fi
+
+ if test x$OPENSSL_FOUND != xno; then
+ HAVE_OPENSSL_TRUE=
+ HAVE_OPENSSL_FALSE='#'
+else
+ HAVE_OPENSSL_TRUE='#'
+ HAVE_OPENSSL_FALSE=
+fi
+
+
+WINDOWS=no
+case $host in
+ *-*-linux*)
+ CXXFLAGS="$CXXFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ LIBS="$LIBS -lrt"
+ ;;
+ *-*-solaris*)
+ if test "$GXX" = yes; then
+ CXXFLAGS="$CXXFLAGS -D_PTHREADS"
+ else
+ # We'll assume Sun's CC.
+ CXXFLAGS="$CXXFLAGS -mt"
+ fi
+ LIBS="$LIBS -lsocket -lnsl -lpthread"
+ ;;
+ *-*-mingw32*)
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ LDFLAGS="$LDFLAGS -mthreads"
+ LIBS="$LIBS -lws2_32 -lmswsock"
+ WINDOWS=yes
+ ;;
+ *-*-mingw64*)
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ LDFLAGS="$LDFLAGS -mthreads"
+ LIBS="$LIBS -lws2_32 -lmswsock"
+ WINDOWS=yes
+ ;;
+ *-pc-cygwin*)
+ CXXFLAGS="$CXXFLAGS -D__USE_W32_SOCKETS -D_WIN32_WINNT=0x0601"
+ LIBS="$LIBS -lws2_32 -lmswsock"
+ WINDOWS=yes
+ ;;
+ *-apple-darwin*)
+ CXXFLAGS="$CXXFLAGS"
+ LDFLAGS="$LDFLAGS"
+ ;;
+ *-*-freebsd*)
+ CXXFLAGS="$CXXFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ ;;
+ *-*-netbsd*)
+ CXXFLAGS="$CXXFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ ;;
+ *-*-haiku*)
+ CXXFLAGS="$CXXFLAGS -lnetwork"
+ LDFLAGS="$LDFLAGS -lnetwork"
+
+esac
+
+if test "$GXX" = yes; then
+ CXXFLAGS="$CXXFLAGS -ftemplate-depth-256"
+fi
+
+if test "$STANDALONE" = yes; then
+ CPPFLAGS="$CPPFLAGS -DASIO_STANDALONE"
+fi
+
+if test "$SEPARATE_COMPILATION" = yes; then
+ CPPFLAGS="$CPPFLAGS -DASIO_SEPARATE_COMPILATION"
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++11 is enabled" >&5
+printf %s "checking whether C++11 is enabled... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if __cplusplus < 201103L
+ #error C++11 not available
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ HAVE_CXX11=yes;
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ HAVE_CXX11=no;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++14 is enabled" >&5
+printf %s "checking whether C++14 is enabled... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined(__GNUC__) && !defined(__clang__)
+ # if (__GNUC__ <= 6)
+ # error C++14 support on this compiler not sufficiently compliant
+ # endif
+ #endif
+ #if __cplusplus < 201402L
+ #error C++14 not available
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ HAVE_CXX14=yes;
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ HAVE_CXX14=no;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++17 is enabled" >&5
+printf %s "checking whether C++17 is enabled... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if __cplusplus < 201703L
+ #error C++17 not available
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ HAVE_CXX17=yes;
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ HAVE_CXX17=no;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++20 is enabled" >&5
+printf %s "checking whether C++20 is enabled... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if __cplusplus < 202002L
+ #error C++20 not available
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ HAVE_CXX20=yes;
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ HAVE_CXX20=no;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether coroutines are enabled" >&5
+printf %s "checking whether coroutines are enabled... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined(__clang__)
+ # if (__clang_major__ >= 14)
+ # if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+ # if __has_include(<coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
+ # elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
+ # if __has_include(<experimental/coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
+ # endif
+ # else
+ # if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
+ # if __has_include(<experimental/coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
+ # endif
+ # endif
+ #elif defined(__GNUC__)
+ # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
+ # if __has_include(<coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
+ # endif
+ #endif
+ #ifndef ASIO_HAS_CO_AWAIT
+ # error coroutines not available
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ HAVE_COROUTINES=yes;
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ HAVE_COROUTINES=no;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+if test "$GXX" = yes; then
+ if test "$STANDALONE" = yes; then
+ if test "$HAVE_CXX11" = no; then
+ HAVE_CXX11=yes
+ CPPFLAGS="-std=c++0x $CPPFLAGS"
+ fi
+ fi
+fi
+
+ if test x$STANDALONE = xyes; then
+ STANDALONE_TRUE=
+ STANDALONE_FALSE='#'
+else
+ STANDALONE_TRUE='#'
+ STANDALONE_FALSE=
+fi
+
+
+ if test x$SEPARATE_COMPILATION = xyes; then
+ SEPARATE_COMPILATION_TRUE=
+ SEPARATE_COMPILATION_FALSE='#'
+else
+ SEPARATE_COMPILATION_TRUE='#'
+ SEPARATE_COMPILATION_FALSE=
+fi
+
+
+ if test x$HAVE_BOOST_COROUTINE = xyes; then
+ HAVE_BOOST_COROUTINE_TRUE=
+ HAVE_BOOST_COROUTINE_FALSE='#'
+else
+ HAVE_BOOST_COROUTINE_TRUE='#'
+ HAVE_BOOST_COROUTINE_FALSE=
+fi
+
+
+ if test x$WINDOWS != xno; then
+ WINDOWS_TARGET_TRUE=
+ WINDOWS_TARGET_FALSE='#'
+else
+ WINDOWS_TARGET_TRUE='#'
+ WINDOWS_TARGET_FALSE=
+fi
+
+
+ if test x$HAVE_CXX11 = xyes; then
+ HAVE_CXX11_TRUE=
+ HAVE_CXX11_FALSE='#'
+else
+ HAVE_CXX11_TRUE='#'
+ HAVE_CXX11_FALSE=
+fi
+
+
+ if test x$HAVE_CXX14 = xyes; then
+ HAVE_CXX14_TRUE=
+ HAVE_CXX14_FALSE='#'
+else
+ HAVE_CXX14_TRUE='#'
+ HAVE_CXX14_FALSE=
+fi
+
+
+ if test x$HAVE_CXX17 = xyes; then
+ HAVE_CXX17_TRUE=
+ HAVE_CXX17_FALSE='#'
+else
+ HAVE_CXX17_TRUE='#'
+ HAVE_CXX17_FALSE=
+fi
+
+
+ if test x$HAVE_CXX20 = xyes; then
+ HAVE_CXX20_TRUE=
+ HAVE_CXX20_FALSE='#'
+else
+ HAVE_CXX20_TRUE='#'
+ HAVE_CXX20_FALSE=
+fi
+
+
+ if test x$HAVE_COROUTINES = xyes; then
+ HAVE_COROUTINES_TRUE=
+ HAVE_COROUTINES_FALSE='#'
+else
+ HAVE_COROUTINES_TRUE='#'
+ HAVE_COROUTINES_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files asio.pc"
+
+
+ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/tests/Makefile src/tests/properties/Makefile src/examples/cpp11/Makefile src/examples/cpp14/Makefile src/examples/cpp17/Makefile src/examples/cpp20/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_OPENSSL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${STANDALONE_TRUE}" && test -z "${STANDALONE_FALSE}"; then
+ as_fn_error $? "conditional \"STANDALONE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SEPARATE_COMPILATION_TRUE}" && test -z "${SEPARATE_COMPILATION_FALSE}"; then
+ as_fn_error $? "conditional \"SEPARATE_COMPILATION\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_BOOST_COROUTINE_TRUE}" && test -z "${HAVE_BOOST_COROUTINE_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_BOOST_COROUTINE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WINDOWS_TARGET_TRUE}" && test -z "${WINDOWS_TARGET_FALSE}"; then
+ as_fn_error $? "conditional \"WINDOWS_TARGET\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CXX11_TRUE}" && test -z "${HAVE_CXX11_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_CXX11\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CXX14_TRUE}" && test -z "${HAVE_CXX14_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_CXX14\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CXX17_TRUE}" && test -z "${HAVE_CXX17_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_CXX17\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CXX20_TRUE}" && test -z "${HAVE_CXX20_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_CXX20\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_COROUTINES_TRUE}" && test -z "${HAVE_COROUTINES_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_COROUTINES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by asio $as_me 1.30.2, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config='$ac_cs_config_escaped'
+ac_cs_version="\\
+asio config.status 1.30.2
+configured by $0, generated by GNU Autoconf 2.71,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ printf "%s\n" "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ printf "%s\n" "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ printf "%s\n" "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ printf "%s\n" "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "asio.pc") CONFIG_FILES="$CONFIG_FILES asio.pc" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
+ "src/tests/properties/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/properties/Makefile" ;;
+ "src/examples/cpp11/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp11/Makefile" ;;
+ "src/examples/cpp14/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp14/Makefile" ;;
+ "src/examples/cpp17/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp17/Makefile" ;;
+ "src/examples/cpp20/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp20/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
diff --git a/3rdparty/asio/configure.ac b/3rdparty/asio/configure.ac
index 260cfbc0792..15e470fd1a4 100644
--- a/3rdparty/asio/configure.ac
+++ b/3rdparty/asio/configure.ac
@@ -1,13 +1,14 @@
-AC_INIT(asio, [1.11.0])
+AC_INIT(asio, [1.30.2])
AC_CONFIG_SRCDIR(include/asio.hpp)
AM_MAINTAINER_MODE
-AM_INIT_AUTOMAKE([tar-ustar])
+AM_INIT_AUTOMAKE([tar-pax])
AC_CANONICAL_HOST
AM_PROG_CC_C_O
AC_PROG_CXX
AC_LANG(C++)
AC_PROG_RANLIB
+PKG_INSTALLDIR
AC_DEFINE(_REENTRANT, [1], [Define this])
@@ -17,142 +18,15 @@ AC_ARG_WITH(boost,
if test "${withval}" = no; then
STANDALONE="yes"
else
- CPPFLAGS="$CPPFLAGS -I${withval}"
- LIBS="$LIBS -L${withval}/stage/lib"
+ if test "${withval}" != system; then
+ CPPFLAGS="$CPPFLAGS -I${withval}"
+ LIBS="$LIBS -L${withval}/stage/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -DASIO_ENABLE_BOOST -DBOOST_CHRONO_HEADER_ONLY -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING"
fi
],
[
- BOOSTDIR="`pwd`/../boost_1_55_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- LIBS="$LIBS -L${BOOSTDIR}/stage/lib"
- else
- BOOSTDIR="`pwd`/../boost_1_54_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- LIBS="$LIBS -L${BOOSTDIR}/stage/lib"
- else
- BOOSTDIR="`pwd`/../boost_1_53_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_52_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_51_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_50_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_49_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_48_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_47_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_46_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_46_1"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_45_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_44_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_43_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_42_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_41_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_40_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_39_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_38_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_37_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_36_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_35_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_34_1"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_34_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_33_1"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- else
- BOOSTDIR="`pwd`/../boost_1_33_0"
- if test -d "${BOOSTDIR}"; then
- CPPFLAGS="$CPPFLAGS -I${BOOSTDIR}"
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
- fi
+ STANDALONE="yes"
])
AC_ARG_ENABLE(separate-compilation,
@@ -172,6 +46,7 @@ if test "$STANDALONE" != yes; then
[
echo "Can't find boost headers. Please check the location of the boost"
echo "distribution and rerun configure using the --with-boost=DIR option."
+ echo "Alternatively, run with --without-boost to enable standalone build."
exit 1
],[])
fi
@@ -179,7 +54,8 @@ fi
AC_ARG_WITH(openssl,
AC_HELP_STRING([--with-openssl=DIR],[location of openssl]),
[
- CPPFLAGS="$CPPFLAGS -I${withval}"
+ CPPFLAGS="$CPPFLAGS -I${withval}/include"
+ LIBS="$LIBS -L${withval}/lib"
],[])
AC_CHECK_HEADER([openssl/ssl.h],,
@@ -198,6 +74,7 @@ case $host in
*-*-linux*)
CXXFLAGS="$CXXFLAGS -pthread"
LDFLAGS="$LDFLAGS -pthread"
+ LIBS="$LIBS -lrt"
;;
*-*-solaris*)
if test "$GXX" = yes; then
@@ -214,8 +91,14 @@ case $host in
LIBS="$LIBS -lws2_32 -lmswsock"
WINDOWS=yes
;;
+ *-*-mingw64*)
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ LDFLAGS="$LDFLAGS -mthreads"
+ LIBS="$LIBS -lws2_32 -lmswsock"
+ WINDOWS=yes
+ ;;
*-pc-cygwin*)
- CXXFLAGS="$CXXFLAGS -D__USE_W32_SOCKETS -D_WIN32_WINNT=0x0501"
+ CXXFLAGS="$CXXFLAGS -D__USE_W32_SOCKETS -D_WIN32_WINNT=0x0601"
LIBS="$LIBS -lws2_32 -lmswsock"
WINDOWS=yes
;;
@@ -231,13 +114,14 @@ case $host in
CXXFLAGS="$CXXFLAGS -pthread"
LDFLAGS="$LDFLAGS -pthread"
;;
+ *-*-haiku*)
+ CXXFLAGS="$CXXFLAGS -lnetwork"
+ LDFLAGS="$LDFLAGS -lnetwork"
+
esac
if test "$GXX" = yes; then
CXXFLAGS="$CXXFLAGS -ftemplate-depth-256"
- if test "$STANDALONE" = yes; then
- CPPFLAGS="-std=c++0x $CPPFLAGS"
- fi
fi
if test "$STANDALONE" = yes; then
@@ -248,6 +132,100 @@ if test "$SEPARATE_COMPILATION" = yes; then
CPPFLAGS="$CPPFLAGS -DASIO_SEPARATE_COMPILATION"
fi
+AC_MSG_CHECKING([whether C++11 is enabled])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if __cplusplus < 201103L]]
+ [[#error C++11 not available]]
+ [[#endif]])],
+ [AC_MSG_RESULT([yes])
+ HAVE_CXX11=yes;],
+ [AC_MSG_RESULT([no])
+ HAVE_CXX11=no;])
+
+AC_MSG_CHECKING([whether C++14 is enabled])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if defined(__GNUC__) && !defined(__clang__)]]
+ [[# if (__GNUC__ <= 6)]]
+ [[# error C++14 support on this compiler not sufficiently compliant]]
+ [[# endif]]
+ [[#endif]]
+ [[#if __cplusplus < 201402L]]
+ [[#error C++14 not available]]
+ [[#endif]])],
+ [AC_MSG_RESULT([yes])
+ HAVE_CXX14=yes;],
+ [AC_MSG_RESULT([no])
+ HAVE_CXX14=no;])
+
+AC_MSG_CHECKING([whether C++17 is enabled])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if __cplusplus < 201703L]]
+ [[#error C++17 not available]]
+ [[#endif]])],
+ [AC_MSG_RESULT([yes])
+ HAVE_CXX17=yes;],
+ [AC_MSG_RESULT([no])
+ HAVE_CXX17=no;])
+
+AC_MSG_CHECKING([whether C++20 is enabled])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if __cplusplus < 202002L]]
+ [[#error C++20 not available]]
+ [[#endif]])],
+ [AC_MSG_RESULT([yes])
+ HAVE_CXX20=yes;],
+ [AC_MSG_RESULT([no])
+ HAVE_CXX20=no;])
+
+AC_MSG_CHECKING([whether coroutines are enabled])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if defined(__clang__)]]
+ [[# if (__clang_major__ >= 14)]]
+ [[# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)]]
+ [[# if __has_include(<coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
+ [[# elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)]]
+ [[# if __has_include(<experimental/coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
+ [[# endif]]
+ [[# else]]
+ [[# if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)]]
+ [[# if __has_include(<experimental/coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
+ [[# endif]]
+ [[# endif]]
+ [[#elif defined(__GNUC__)]]
+ [[# if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)]]
+ [[# if __has_include(<coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
+ [[# endif]]
+ [[#endif]]
+ [[#ifndef ASIO_HAS_CO_AWAIT]]
+ [[# error coroutines not available]]
+ [[#endif]])],
+ [AC_MSG_RESULT([yes])
+ HAVE_COROUTINES=yes;],
+ [AC_MSG_RESULT([no])
+ HAVE_COROUTINES=no;])
+
+if test "$GXX" = yes; then
+ if test "$STANDALONE" = yes; then
+ if test "$HAVE_CXX11" = no; then
+ HAVE_CXX11=yes
+ CPPFLAGS="-std=c++0x $CPPFLAGS"
+ fi
+ fi
+fi
+
AM_CONDITIONAL(STANDALONE,test x$STANDALONE = xyes)
AM_CONDITIONAL(SEPARATE_COMPILATION,test x$SEPARATE_COMPILATION = xyes)
@@ -256,11 +234,25 @@ AM_CONDITIONAL(HAVE_BOOST_COROUTINE,test x$HAVE_BOOST_COROUTINE = xyes)
AM_CONDITIONAL(WINDOWS_TARGET,test x$WINDOWS != xno)
+AM_CONDITIONAL(HAVE_CXX11,test x$HAVE_CXX11 = xyes)
+
+AM_CONDITIONAL(HAVE_CXX14,test x$HAVE_CXX14 = xyes)
+
+AM_CONDITIONAL(HAVE_CXX17,test x$HAVE_CXX17 = xyes)
+
+AM_CONDITIONAL(HAVE_CXX20,test x$HAVE_CXX20 = xyes)
+
+AM_CONDITIONAL(HAVE_COROUTINES,test x$HAVE_COROUTINES = xyes)
+
+AC_CONFIG_FILES([asio.pc])
+
AC_OUTPUT([
Makefile
include/Makefile
src/Makefile
src/tests/Makefile
- src/examples/cpp03/Makefile
+ src/tests/properties/Makefile
src/examples/cpp11/Makefile
- src/examples/cpp14/Makefile])
+ src/examples/cpp14/Makefile
+ src/examples/cpp17/Makefile
+ src/examples/cpp20/Makefile])
diff --git a/3rdparty/asio/depcomp b/3rdparty/asio/depcomp
new file mode 100644
index 00000000000..715e34311ed
--- /dev/null
+++ b/3rdparty/asio/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/3rdparty/asio/include/.gitignore b/3rdparty/asio/include/.gitignore
deleted file mode 100644
index 282522db034..00000000000
--- a/3rdparty/asio/include/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/3rdparty/asio/include/Makefile.am b/3rdparty/asio/include/Makefile.am
index 26362bc6503..8f43766563e 100644
--- a/3rdparty/asio/include/Makefile.am
+++ b/3rdparty/asio/include/Makefile.am
@@ -1,12 +1,24 @@
# find . -name "*.*pp" | sed -e 's/^\.\///' | sed -e 's/^.*$/ & \\/' | sort
nobase_include_HEADERS = \
+ asio/any_completion_executor.hpp \
+ asio/any_completion_handler.hpp \
+ asio/any_io_executor.hpp \
+ asio/append.hpp \
+ asio/as_tuple.hpp \
asio/associated_allocator.hpp \
+ asio/associated_cancellation_slot.hpp \
asio/associated_executor.hpp \
+ asio/associated_immediate_executor.hpp \
+ asio/associator.hpp \
asio/async_result.hpp \
+ asio/awaitable.hpp \
asio/basic_datagram_socket.hpp \
asio/basic_deadline_timer.hpp \
+ asio/basic_file.hpp \
asio/basic_io_object.hpp \
+ asio/basic_random_access_file.hpp \
asio/basic_raw_socket.hpp \
+ asio/basic_readable_pipe.hpp \
asio/basic_seq_packet_socket.hpp \
asio/basic_serial_port.hpp \
asio/basic_signal_set.hpp \
@@ -16,9 +28,14 @@ nobase_include_HEADERS = \
asio/basic_socket_streambuf.hpp \
asio/basic_streambuf_fwd.hpp \
asio/basic_streambuf.hpp \
+ asio/basic_stream_file.hpp \
asio/basic_stream_socket.hpp \
asio/basic_waitable_timer.hpp \
+ asio/basic_writable_pipe.hpp \
+ asio/bind_allocator.hpp \
+ asio/bind_cancellation_slot.hpp \
asio/bind_executor.hpp \
+ asio/bind_immediate_executor.hpp \
asio/buffered_read_stream_fwd.hpp \
asio/buffered_read_stream.hpp \
asio/buffered_stream_fwd.hpp \
@@ -26,20 +43,30 @@ nobase_include_HEADERS = \
asio/buffered_write_stream_fwd.hpp \
asio/buffered_write_stream.hpp \
asio/buffer.hpp \
+ asio/buffer_registration.hpp \
asio/buffers_iterator.hpp \
+ asio/cancellation_signal.hpp \
+ asio/cancellation_state.hpp \
+ asio/cancellation_type.hpp \
+ asio/co_spawn.hpp \
asio/completion_condition.hpp \
+ asio/compose.hpp \
asio/connect.hpp \
+ asio/connect_pipe.hpp \
+ asio/consign.hpp \
asio/coroutine.hpp \
- asio/datagram_socket_service.hpp \
asio/deadline_timer.hpp \
- asio/deadline_timer_service.hpp \
asio/defer.hpp \
+ asio/deferred.hpp \
+ asio/detached.hpp \
asio/detail/array_fwd.hpp \
asio/detail/array.hpp \
asio/detail/assert.hpp \
asio/detail/atomic_count.hpp \
+ asio/detail/base_from_cancellation_state.hpp \
asio/detail/base_from_completion_cond.hpp \
asio/detail/bind_handler.hpp \
+ asio/detail/blocking_executor_op.hpp \
asio/detail/buffered_stream_storage.hpp \
asio/detail/buffer_resize_guard.hpp \
asio/detail/buffer_sequence_adapter.hpp \
@@ -47,6 +74,7 @@ nobase_include_HEADERS = \
asio/detail/chrono.hpp \
asio/detail/chrono_time_traits.hpp \
asio/detail/completion_handler.hpp \
+ asio/detail/composed_work.hpp \
asio/detail/concurrency_hint.hpp \
asio/detail/conditionally_enabled_event.hpp \
asio/detail/conditionally_enabled_mutex.hpp \
@@ -64,18 +92,16 @@ nobase_include_HEADERS = \
asio/detail/epoll_reactor.hpp \
asio/detail/eventfd_select_interrupter.hpp \
asio/detail/event.hpp \
+ asio/detail/exception.hpp \
+ asio/detail/executor_function.hpp \
asio/detail/executor_op.hpp \
asio/detail/fd_set_adapter.hpp \
asio/detail/fenced_block.hpp \
asio/detail/functional.hpp \
- asio/detail/gcc_arm_fenced_block.hpp \
- asio/detail/gcc_hppa_fenced_block.hpp \
- asio/detail/gcc_sync_fenced_block.hpp \
- asio/detail/gcc_x86_fenced_block.hpp \
+ asio/detail/future.hpp \
asio/detail/global.hpp \
asio/detail/handler_alloc_helpers.hpp \
asio/detail/handler_cont_helpers.hpp \
- asio/detail/handler_invoke_helpers.hpp \
asio/detail/handler_tracking.hpp \
asio/detail/handler_type_requirements.hpp \
asio/detail/handler_work.hpp \
@@ -88,16 +114,21 @@ nobase_include_HEADERS = \
asio/detail/impl/epoll_reactor.ipp \
asio/detail/impl/eventfd_select_interrupter.ipp \
asio/detail/impl/handler_tracking.ipp \
+ asio/detail/impl/io_uring_descriptor_service.ipp \
+ asio/detail/impl/io_uring_file_service.ipp \
+ asio/detail/impl/io_uring_service.hpp \
+ asio/detail/impl/io_uring_service.ipp \
+ asio/detail/impl/io_uring_socket_service_base.ipp \
asio/detail/impl/kqueue_reactor.hpp \
asio/detail/impl/kqueue_reactor.ipp \
asio/detail/impl/null_event.ipp \
asio/detail/impl/pipe_select_interrupter.ipp \
asio/detail/impl/posix_event.ipp \
asio/detail/impl/posix_mutex.ipp \
+ asio/detail/impl/posix_serial_port_service.ipp \
asio/detail/impl/posix_thread.ipp \
asio/detail/impl/posix_tss_ptr.ipp \
asio/detail/impl/reactive_descriptor_service.ipp \
- asio/detail/impl/reactive_serial_port_service.ipp \
asio/detail/impl/reactive_socket_service_base.ipp \
asio/detail/impl/resolver_service_base.ipp \
asio/detail/impl/scheduler.ipp \
@@ -112,10 +143,12 @@ nobase_include_HEADERS = \
asio/detail/impl/strand_executor_service.ipp \
asio/detail/impl/strand_service.hpp \
asio/detail/impl/strand_service.ipp \
+ asio/detail/impl/thread_context.ipp \
asio/detail/impl/throw_error.ipp \
asio/detail/impl/timer_queue_ptime.ipp \
asio/detail/impl/timer_queue_set.ipp \
asio/detail/impl/win_event.ipp \
+ asio/detail/impl/win_iocp_file_service.ipp \
asio/detail/impl/win_iocp_handle_service.ipp \
asio/detail/impl/win_iocp_io_context.hpp \
asio/detail/impl/win_iocp_io_context.ipp \
@@ -130,16 +163,39 @@ nobase_include_HEADERS = \
asio/detail/impl/win_static_mutex.ipp \
asio/detail/impl/win_thread.ipp \
asio/detail/impl/win_tss_ptr.ipp \
+ asio/detail/initiate_defer.hpp \
+ asio/detail/initiate_dispatch.hpp \
+ asio/detail/initiate_post.hpp \
asio/detail/io_control.hpp \
+ asio/detail/io_object_impl.hpp \
+ asio/detail/io_uring_descriptor_read_at_op.hpp \
+ asio/detail/io_uring_descriptor_read_op.hpp \
+ asio/detail/io_uring_descriptor_service.hpp \
+ asio/detail/io_uring_descriptor_write_at_op.hpp \
+ asio/detail/io_uring_descriptor_write_op.hpp \
+ asio/detail/io_uring_file_service.hpp \
+ asio/detail/io_uring_null_buffers_op.hpp \
+ asio/detail/io_uring_operation.hpp \
+ asio/detail/io_uring_service.hpp \
+ asio/detail/io_uring_socket_accept_op.hpp \
+ asio/detail/io_uring_socket_connect_op.hpp \
+ asio/detail/io_uring_socket_recvfrom_op.hpp \
+ asio/detail/io_uring_socket_recvmsg_op.hpp \
+ asio/detail/io_uring_socket_recv_op.hpp \
+ asio/detail/io_uring_socket_send_op.hpp \
+ asio/detail/io_uring_socket_sendto_op.hpp \
+ asio/detail/io_uring_socket_service_base.hpp \
+ asio/detail/io_uring_socket_service.hpp \
+ asio/detail/io_uring_wait_op.hpp \
asio/detail/is_buffer_sequence.hpp \
asio/detail/is_executor.hpp \
asio/detail/keyword_tss_ptr.hpp \
asio/detail/kqueue_reactor.hpp \
asio/detail/limits.hpp \
asio/detail/local_free_on_block_exit.hpp \
- asio/detail/macos_fenced_block.hpp \
asio/detail/memory.hpp \
asio/detail/mutex.hpp \
+ asio/detail/non_const_lvalue.hpp \
asio/detail/noncopyable.hpp \
asio/detail/null_event.hpp \
asio/detail/null_fenced_block.hpp \
@@ -161,6 +217,7 @@ nobase_include_HEADERS = \
asio/detail/posix_fd_set_adapter.hpp \
asio/detail/posix_global.hpp \
asio/detail/posix_mutex.hpp \
+ asio/detail/posix_serial_port_service.hpp \
asio/detail/posix_signal_blocker.hpp \
asio/detail/posix_static_mutex.hpp \
asio/detail/posix_thread.hpp \
@@ -168,7 +225,6 @@ nobase_include_HEADERS = \
asio/detail/push_options.hpp \
asio/detail/reactive_descriptor_service.hpp \
asio/detail/reactive_null_buffers_op.hpp \
- asio/detail/reactive_serial_port_service.hpp \
asio/detail/reactive_socket_accept_op.hpp \
asio/detail/reactive_socket_connect_op.hpp \
asio/detail/reactive_socket_recvfrom_op.hpp \
@@ -179,7 +235,6 @@ nobase_include_HEADERS = \
asio/detail/reactive_socket_service_base.hpp \
asio/detail/reactive_socket_service.hpp \
asio/detail/reactive_wait_op.hpp \
- asio/detail/reactor_fwd.hpp \
asio/detail/reactor.hpp \
asio/detail/reactor_op.hpp \
asio/detail/reactor_op_queue.hpp \
@@ -192,6 +247,7 @@ nobase_include_HEADERS = \
asio/detail/resolver_service.hpp \
asio/detail/scheduler.hpp \
asio/detail/scheduler_operation.hpp \
+ asio/detail/scheduler_task.hpp \
asio/detail/scheduler_thread_info.hpp \
asio/detail/scoped_lock.hpp \
asio/detail/scoped_ptr.hpp \
@@ -208,9 +264,10 @@ nobase_include_HEADERS = \
asio/detail/socket_option.hpp \
asio/detail/socket_select_interrupter.hpp \
asio/detail/socket_types.hpp \
- asio/detail/solaris_fenced_block.hpp \
+ asio/detail/source_location.hpp \
asio/detail/static_mutex.hpp \
asio/detail/std_event.hpp \
+ asio/detail/std_fenced_block.hpp \
asio/detail/std_global.hpp \
asio/detail/std_mutex.hpp \
asio/detail/std_static_mutex.hpp \
@@ -232,15 +289,15 @@ nobase_include_HEADERS = \
asio/detail/timer_scheduler.hpp \
asio/detail/tss_ptr.hpp \
asio/detail/type_traits.hpp \
- asio/detail/variadic_templates.hpp \
+ asio/detail/utility.hpp \
asio/detail/wait_handler.hpp \
asio/detail/wait_op.hpp \
asio/detail/winapp_thread.hpp \
asio/detail/wince_thread.hpp \
asio/detail/win_event.hpp \
asio/detail/win_fd_set_adapter.hpp \
- asio/detail/win_fenced_block.hpp \
asio/detail/win_global.hpp \
+ asio/detail/win_iocp_file_service.hpp \
asio/detail/win_iocp_handle_read_op.hpp \
asio/detail/win_iocp_handle_service.hpp \
asio/detail/win_iocp_handle_write_op.hpp \
@@ -282,9 +339,68 @@ nobase_include_HEADERS = \
asio/dispatch.hpp \
asio/error_code.hpp \
asio/error.hpp \
+ asio/execution.hpp \
asio/execution_context.hpp \
- asio/executor_work_guard.hpp \
+ asio/execution/allocator.hpp \
+ asio/execution/any_executor.hpp \
+ asio/execution/bad_executor.hpp \
+ asio/execution/blocking.hpp \
+ asio/execution/blocking_adaptation.hpp \
+ asio/execution/context.hpp \
+ asio/execution/context_as.hpp \
+ asio/execution/executor.hpp \
+ asio/execution/impl/bad_executor.ipp \
+ asio/execution/invocable_archetype.hpp \
+ asio/execution/mapping.hpp \
+ asio/execution/occupancy.hpp \
+ asio/execution/outstanding_work.hpp \
+ asio/execution/prefer_only.hpp \
+ asio/execution/relationship.hpp \
asio/executor.hpp \
+ asio/executor_work_guard.hpp \
+ asio/experimental/append.hpp \
+ asio/experimental/as_single.hpp \
+ asio/experimental/as_tuple.hpp \
+ asio/experimental/awaitable_operators.hpp \
+ asio/experimental/basic_channel.hpp \
+ asio/experimental/basic_concurrent_channel.hpp \
+ asio/experimental/cancellation_condition.hpp \
+ asio/experimental/channel.hpp \
+ asio/experimental/channel_error.hpp \
+ asio/experimental/channel_traits.hpp \
+ asio/experimental/co_composed.hpp \
+ asio/experimental/co_spawn.hpp \
+ asio/experimental/concurrent_channel.hpp \
+ asio/experimental/coro.hpp \
+ asio/experimental/coro_traits.hpp \
+ asio/experimental/deferred.hpp \
+ asio/experimental/detail/channel_handler.hpp \
+ asio/experimental/detail/channel_message.hpp \
+ asio/experimental/detail/channel_operation.hpp \
+ asio/experimental/detail/channel_payload.hpp \
+ asio/experimental/detail/channel_receive_op.hpp \
+ asio/experimental/detail/channel_send_functions.hpp \
+ asio/experimental/detail/channel_send_op.hpp \
+ asio/experimental/detail/channel_service.hpp \
+ asio/experimental/detail/coro_completion_handler.hpp \
+ asio/experimental/detail/coro_promise_allocator.hpp \
+ asio/experimental/detail/has_signature.hpp \
+ asio/experimental/detail/impl/channel_service.hpp \
+ asio/experimental/detail/partial_promise.hpp \
+ asio/experimental/impl/as_single.hpp \
+ asio/experimental/impl/channel_error.ipp \
+ asio/experimental/impl/co_composed.hpp \
+ asio/experimental/impl/coro.hpp \
+ asio/experimental/impl/parallel_group.hpp \
+ asio/experimental/impl/promise.hpp \
+ asio/experimental/impl/use_coro.hpp \
+ asio/experimental/impl/use_promise.hpp \
+ asio/experimental/parallel_group.hpp \
+ asio/experimental/prepend.hpp \
+ asio/experimental/promise.hpp \
+ asio/experimental/use_coro.hpp \
+ asio/experimental/use_promise.hpp \
+ asio/file_base.hpp \
asio/generic/basic_endpoint.hpp \
asio/generic/datagram_protocol.hpp \
asio/generic/detail/endpoint.hpp \
@@ -292,46 +408,55 @@ nobase_include_HEADERS = \
asio/generic/raw_protocol.hpp \
asio/generic/seq_packet_protocol.hpp \
asio/generic/stream_protocol.hpp \
- asio/handler_alloc_hook.hpp \
asio/handler_continuation_hook.hpp \
- asio/handler_invoke_hook.hpp \
- asio/handler_type.hpp \
asio/high_resolution_timer.hpp \
asio.hpp \
+ asio/impl/any_completion_executor.ipp \
+ asio/impl/any_io_executor.ipp \
+ asio/impl/append.hpp \
+ asio/impl/as_tuple.hpp \
+ asio/impl/awaitable.hpp \
asio/impl/buffered_read_stream.hpp \
asio/impl/buffered_write_stream.hpp \
+ asio/impl/cancellation_signal.ipp \
+ asio/impl/co_spawn.hpp \
asio/impl/connect.hpp \
- asio/impl/defer.hpp \
- asio/impl/dispatch.hpp \
+ asio/impl/connect_pipe.hpp \
+ asio/impl/connect_pipe.ipp \
+ asio/impl/consign.hpp \
+ asio/impl/deferred.hpp \
+ asio/impl/detached.hpp \
asio/impl/error_code.ipp \
asio/impl/error.ipp \
asio/impl/execution_context.hpp \
asio/impl/execution_context.ipp \
asio/impl/executor.hpp \
asio/impl/executor.ipp \
- asio/impl/handler_alloc_hook.ipp \
asio/impl/io_context.hpp \
asio/impl/io_context.ipp \
- asio/impl/post.hpp \
+ asio/impl/multiple_exceptions.ipp \
+ asio/impl/prepend.hpp \
asio/impl/read_at.hpp \
asio/impl/read.hpp \
asio/impl/read_until.hpp \
+ asio/impl/redirect_error.hpp \
asio/impl/serial_port_base.hpp \
asio/impl/serial_port_base.ipp \
asio/impl/spawn.hpp \
- asio/impl/src.cpp \
asio/impl/src.hpp \
+ asio/impl/system_context.hpp \
+ asio/impl/system_context.ipp \
asio/impl/system_executor.hpp \
- asio/impl/system_executor.ipp \
asio/impl/thread_pool.hpp \
asio/impl/thread_pool.ipp \
+ asio/impl/use_awaitable.hpp \
asio/impl/use_future.hpp \
asio/impl/write_at.hpp \
asio/impl/write.hpp \
- asio/io_context_strand.hpp \
asio/io_context.hpp \
- asio/io_service_strand.hpp \
+ asio/io_context_strand.hpp \
asio/io_service.hpp \
+ asio/io_service_strand.hpp \
asio/ip/address.hpp \
asio/ip/address_v4.hpp \
asio/ip/address_v4_iterator.hpp \
@@ -368,11 +493,12 @@ nobase_include_HEADERS = \
asio/ip/network_v6.hpp \
asio/ip/resolver_base.hpp \
asio/ip/resolver_query_base.hpp \
- asio/ip/resolver_service.hpp \
asio/ip/tcp.hpp \
asio/ip/udp.hpp \
asio/ip/unicast.hpp \
asio/ip/v6_only.hpp \
+ asio/is_applicable_property.hpp \
+ asio/is_contiguous_iterator.hpp \
asio/is_executor.hpp \
asio/is_read_buffered.hpp \
asio/is_write_buffered.hpp \
@@ -381,27 +507,34 @@ nobase_include_HEADERS = \
asio/local/datagram_protocol.hpp \
asio/local/detail/endpoint.hpp \
asio/local/detail/impl/endpoint.ipp \
+ asio/local/seq_packet_protocol.hpp \
asio/local/stream_protocol.hpp \
+ asio/multiple_exceptions.hpp \
asio/packaged_task.hpp \
asio/placeholders.hpp \
asio/posix/basic_descriptor.hpp \
asio/posix/basic_stream_descriptor.hpp \
- asio/posix/descriptor.hpp \
asio/posix/descriptor_base.hpp \
+ asio/posix/descriptor.hpp \
asio/posix/stream_descriptor.hpp \
- asio/posix/stream_descriptor_service.hpp \
asio/post.hpp \
- asio/raw_socket_service.hpp \
+ asio/prefer.hpp \
+ asio/prepend.hpp \
+ asio/query.hpp \
+ asio/random_access_file.hpp \
asio/read_at.hpp \
asio/read.hpp \
asio/read_until.hpp \
- asio/seq_packet_socket_service.hpp \
+ asio/readable_pipe.hpp \
+ asio/recycling_allocator.hpp \
+ asio/redirect_error.hpp \
+ asio/registered_buffer.hpp \
+ asio/require.hpp \
+ asio/require_concept.hpp \
asio/serial_port_base.hpp \
asio/serial_port.hpp \
- asio/serial_port_service.hpp \
+ asio/signal_set_base.hpp \
asio/signal_set.hpp \
- asio/signal_set_service.hpp \
- asio/socket_acceptor_service.hpp \
asio/socket_base.hpp \
asio/spawn.hpp \
asio/ssl/context_base.hpp \
@@ -422,9 +555,11 @@ nobase_include_HEADERS = \
asio/ssl/detail/write_op.hpp \
asio/ssl/error.hpp \
asio/ssl.hpp \
+ asio/ssl/host_name_verification.hpp \
asio/ssl/impl/context.hpp \
asio/ssl/impl/context.ipp \
asio/ssl/impl/error.ipp \
+ asio/ssl/impl/host_name_verification.ipp \
asio/ssl/impl/rfc2818_verification.ipp \
asio/ssl/impl/src.hpp \
asio/ssl/rfc2818_verification.hpp \
@@ -432,16 +567,33 @@ nobase_include_HEADERS = \
asio/ssl/stream.hpp \
asio/ssl/verify_context.hpp \
asio/ssl/verify_mode.hpp \
+ asio/static_thread_pool.hpp \
asio/steady_timer.hpp \
asio/strand.hpp \
asio/streambuf.hpp \
- asio/stream_socket_service.hpp \
+ asio/stream_file.hpp \
+ asio/system_context.hpp \
asio/system_error.hpp \
asio/system_executor.hpp \
asio/system_timer.hpp \
+ asio/this_coro.hpp \
asio/thread.hpp \
asio/thread_pool.hpp \
asio/time_traits.hpp \
+ asio/traits/equality_comparable.hpp \
+ asio/traits/execute_member.hpp \
+ asio/traits/prefer_free.hpp \
+ asio/traits/prefer_member.hpp \
+ asio/traits/query_free.hpp \
+ asio/traits/query_member.hpp \
+ asio/traits/query_static_constexpr_member.hpp \
+ asio/traits/require_concept_free.hpp \
+ asio/traits/require_concept_member.hpp \
+ asio/traits/require_free.hpp \
+ asio/traits/require_member.hpp \
+ asio/traits/static_query.hpp \
+ asio/traits/static_require.hpp \
+ asio/traits/static_require_concept.hpp \
asio/ts/buffer.hpp \
asio/ts/executor.hpp \
asio/ts/internet.hpp \
@@ -451,23 +603,21 @@ nobase_include_HEADERS = \
asio/ts/socket.hpp \
asio/ts/timer.hpp \
asio/unyield.hpp \
+ asio/use_awaitable.hpp \
asio/use_future.hpp \
asio/uses_executor.hpp \
asio/version.hpp \
- asio/waitable_timer_service.hpp \
asio/wait_traits.hpp \
- asio/windows/basic_handle.hpp \
asio/windows/basic_object_handle.hpp \
+ asio/windows/basic_overlapped_handle.hpp \
asio/windows/basic_random_access_handle.hpp \
asio/windows/basic_stream_handle.hpp \
asio/windows/object_handle.hpp \
- asio/windows/object_handle_service.hpp \
asio/windows/overlapped_handle.hpp \
asio/windows/overlapped_ptr.hpp \
asio/windows/random_access_handle.hpp \
- asio/windows/random_access_handle_service.hpp \
asio/windows/stream_handle.hpp \
- asio/windows/stream_handle_service.hpp \
+ asio/writable_pipe.hpp \
asio/write_at.hpp \
asio/write.hpp \
asio/yield.hpp
diff --git a/3rdparty/asio/include/Makefile.in b/3rdparty/asio/include/Makefile.in
new file mode 100644
index 00000000000..e71be1bf590
--- /dev/null
+++ b/3rdparty/asio/include/Makefile.in
@@ -0,0 +1,1164 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(nobase_include_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(includedir)"
+HEADERS = $(nobase_include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# find . -name "*.*pp" | sed -e 's/^\.\///' | sed -e 's/^.*$/ & \\/' | sort
+nobase_include_HEADERS = \
+ asio/any_completion_executor.hpp \
+ asio/any_completion_handler.hpp \
+ asio/any_io_executor.hpp \
+ asio/append.hpp \
+ asio/as_tuple.hpp \
+ asio/associated_allocator.hpp \
+ asio/associated_cancellation_slot.hpp \
+ asio/associated_executor.hpp \
+ asio/associated_immediate_executor.hpp \
+ asio/associator.hpp \
+ asio/async_result.hpp \
+ asio/awaitable.hpp \
+ asio/basic_datagram_socket.hpp \
+ asio/basic_deadline_timer.hpp \
+ asio/basic_file.hpp \
+ asio/basic_io_object.hpp \
+ asio/basic_random_access_file.hpp \
+ asio/basic_raw_socket.hpp \
+ asio/basic_readable_pipe.hpp \
+ asio/basic_seq_packet_socket.hpp \
+ asio/basic_serial_port.hpp \
+ asio/basic_signal_set.hpp \
+ asio/basic_socket_acceptor.hpp \
+ asio/basic_socket.hpp \
+ asio/basic_socket_iostream.hpp \
+ asio/basic_socket_streambuf.hpp \
+ asio/basic_streambuf_fwd.hpp \
+ asio/basic_streambuf.hpp \
+ asio/basic_stream_file.hpp \
+ asio/basic_stream_socket.hpp \
+ asio/basic_waitable_timer.hpp \
+ asio/basic_writable_pipe.hpp \
+ asio/bind_allocator.hpp \
+ asio/bind_cancellation_slot.hpp \
+ asio/bind_executor.hpp \
+ asio/bind_immediate_executor.hpp \
+ asio/buffered_read_stream_fwd.hpp \
+ asio/buffered_read_stream.hpp \
+ asio/buffered_stream_fwd.hpp \
+ asio/buffered_stream.hpp \
+ asio/buffered_write_stream_fwd.hpp \
+ asio/buffered_write_stream.hpp \
+ asio/buffer.hpp \
+ asio/buffer_registration.hpp \
+ asio/buffers_iterator.hpp \
+ asio/cancellation_signal.hpp \
+ asio/cancellation_state.hpp \
+ asio/cancellation_type.hpp \
+ asio/co_spawn.hpp \
+ asio/completion_condition.hpp \
+ asio/compose.hpp \
+ asio/connect.hpp \
+ asio/connect_pipe.hpp \
+ asio/consign.hpp \
+ asio/coroutine.hpp \
+ asio/deadline_timer.hpp \
+ asio/defer.hpp \
+ asio/deferred.hpp \
+ asio/detached.hpp \
+ asio/detail/array_fwd.hpp \
+ asio/detail/array.hpp \
+ asio/detail/assert.hpp \
+ asio/detail/atomic_count.hpp \
+ asio/detail/base_from_cancellation_state.hpp \
+ asio/detail/base_from_completion_cond.hpp \
+ asio/detail/bind_handler.hpp \
+ asio/detail/blocking_executor_op.hpp \
+ asio/detail/buffered_stream_storage.hpp \
+ asio/detail/buffer_resize_guard.hpp \
+ asio/detail/buffer_sequence_adapter.hpp \
+ asio/detail/call_stack.hpp \
+ asio/detail/chrono.hpp \
+ asio/detail/chrono_time_traits.hpp \
+ asio/detail/completion_handler.hpp \
+ asio/detail/composed_work.hpp \
+ asio/detail/concurrency_hint.hpp \
+ asio/detail/conditionally_enabled_event.hpp \
+ asio/detail/conditionally_enabled_mutex.hpp \
+ asio/detail/config.hpp \
+ asio/detail/consuming_buffers.hpp \
+ asio/detail/cstddef.hpp \
+ asio/detail/cstdint.hpp \
+ asio/detail/date_time_fwd.hpp \
+ asio/detail/deadline_timer_service.hpp \
+ asio/detail/dependent_type.hpp \
+ asio/detail/descriptor_ops.hpp \
+ asio/detail/descriptor_read_op.hpp \
+ asio/detail/descriptor_write_op.hpp \
+ asio/detail/dev_poll_reactor.hpp \
+ asio/detail/epoll_reactor.hpp \
+ asio/detail/eventfd_select_interrupter.hpp \
+ asio/detail/event.hpp \
+ asio/detail/exception.hpp \
+ asio/detail/executor_function.hpp \
+ asio/detail/executor_op.hpp \
+ asio/detail/fd_set_adapter.hpp \
+ asio/detail/fenced_block.hpp \
+ asio/detail/functional.hpp \
+ asio/detail/future.hpp \
+ asio/detail/global.hpp \
+ asio/detail/handler_alloc_helpers.hpp \
+ asio/detail/handler_cont_helpers.hpp \
+ asio/detail/handler_tracking.hpp \
+ asio/detail/handler_type_requirements.hpp \
+ asio/detail/handler_work.hpp \
+ asio/detail/hash_map.hpp \
+ asio/detail/impl/buffer_sequence_adapter.ipp \
+ asio/detail/impl/descriptor_ops.ipp \
+ asio/detail/impl/dev_poll_reactor.hpp \
+ asio/detail/impl/dev_poll_reactor.ipp \
+ asio/detail/impl/epoll_reactor.hpp \
+ asio/detail/impl/epoll_reactor.ipp \
+ asio/detail/impl/eventfd_select_interrupter.ipp \
+ asio/detail/impl/handler_tracking.ipp \
+ asio/detail/impl/io_uring_descriptor_service.ipp \
+ asio/detail/impl/io_uring_file_service.ipp \
+ asio/detail/impl/io_uring_service.hpp \
+ asio/detail/impl/io_uring_service.ipp \
+ asio/detail/impl/io_uring_socket_service_base.ipp \
+ asio/detail/impl/kqueue_reactor.hpp \
+ asio/detail/impl/kqueue_reactor.ipp \
+ asio/detail/impl/null_event.ipp \
+ asio/detail/impl/pipe_select_interrupter.ipp \
+ asio/detail/impl/posix_event.ipp \
+ asio/detail/impl/posix_mutex.ipp \
+ asio/detail/impl/posix_serial_port_service.ipp \
+ asio/detail/impl/posix_thread.ipp \
+ asio/detail/impl/posix_tss_ptr.ipp \
+ asio/detail/impl/reactive_descriptor_service.ipp \
+ asio/detail/impl/reactive_socket_service_base.ipp \
+ asio/detail/impl/resolver_service_base.ipp \
+ asio/detail/impl/scheduler.ipp \
+ asio/detail/impl/select_reactor.hpp \
+ asio/detail/impl/select_reactor.ipp \
+ asio/detail/impl/service_registry.hpp \
+ asio/detail/impl/service_registry.ipp \
+ asio/detail/impl/signal_set_service.ipp \
+ asio/detail/impl/socket_ops.ipp \
+ asio/detail/impl/socket_select_interrupter.ipp \
+ asio/detail/impl/strand_executor_service.hpp \
+ asio/detail/impl/strand_executor_service.ipp \
+ asio/detail/impl/strand_service.hpp \
+ asio/detail/impl/strand_service.ipp \
+ asio/detail/impl/thread_context.ipp \
+ asio/detail/impl/throw_error.ipp \
+ asio/detail/impl/timer_queue_ptime.ipp \
+ asio/detail/impl/timer_queue_set.ipp \
+ asio/detail/impl/win_event.ipp \
+ asio/detail/impl/win_iocp_file_service.ipp \
+ asio/detail/impl/win_iocp_handle_service.ipp \
+ asio/detail/impl/win_iocp_io_context.hpp \
+ asio/detail/impl/win_iocp_io_context.ipp \
+ asio/detail/impl/win_iocp_serial_port_service.ipp \
+ asio/detail/impl/win_iocp_socket_service_base.ipp \
+ asio/detail/impl/win_mutex.ipp \
+ asio/detail/impl/win_object_handle_service.ipp \
+ asio/detail/impl/winrt_ssocket_service_base.ipp \
+ asio/detail/impl/winrt_timer_scheduler.hpp \
+ asio/detail/impl/winrt_timer_scheduler.ipp \
+ asio/detail/impl/winsock_init.ipp \
+ asio/detail/impl/win_static_mutex.ipp \
+ asio/detail/impl/win_thread.ipp \
+ asio/detail/impl/win_tss_ptr.ipp \
+ asio/detail/initiate_defer.hpp \
+ asio/detail/initiate_dispatch.hpp \
+ asio/detail/initiate_post.hpp \
+ asio/detail/io_control.hpp \
+ asio/detail/io_object_impl.hpp \
+ asio/detail/io_uring_descriptor_read_at_op.hpp \
+ asio/detail/io_uring_descriptor_read_op.hpp \
+ asio/detail/io_uring_descriptor_service.hpp \
+ asio/detail/io_uring_descriptor_write_at_op.hpp \
+ asio/detail/io_uring_descriptor_write_op.hpp \
+ asio/detail/io_uring_file_service.hpp \
+ asio/detail/io_uring_null_buffers_op.hpp \
+ asio/detail/io_uring_operation.hpp \
+ asio/detail/io_uring_service.hpp \
+ asio/detail/io_uring_socket_accept_op.hpp \
+ asio/detail/io_uring_socket_connect_op.hpp \
+ asio/detail/io_uring_socket_recvfrom_op.hpp \
+ asio/detail/io_uring_socket_recvmsg_op.hpp \
+ asio/detail/io_uring_socket_recv_op.hpp \
+ asio/detail/io_uring_socket_send_op.hpp \
+ asio/detail/io_uring_socket_sendto_op.hpp \
+ asio/detail/io_uring_socket_service_base.hpp \
+ asio/detail/io_uring_socket_service.hpp \
+ asio/detail/io_uring_wait_op.hpp \
+ asio/detail/is_buffer_sequence.hpp \
+ asio/detail/is_executor.hpp \
+ asio/detail/keyword_tss_ptr.hpp \
+ asio/detail/kqueue_reactor.hpp \
+ asio/detail/limits.hpp \
+ asio/detail/local_free_on_block_exit.hpp \
+ asio/detail/memory.hpp \
+ asio/detail/mutex.hpp \
+ asio/detail/non_const_lvalue.hpp \
+ asio/detail/noncopyable.hpp \
+ asio/detail/null_event.hpp \
+ asio/detail/null_fenced_block.hpp \
+ asio/detail/null_global.hpp \
+ asio/detail/null_mutex.hpp \
+ asio/detail/null_reactor.hpp \
+ asio/detail/null_signal_blocker.hpp \
+ asio/detail/null_socket_service.hpp \
+ asio/detail/null_static_mutex.hpp \
+ asio/detail/null_thread.hpp \
+ asio/detail/null_tss_ptr.hpp \
+ asio/detail/object_pool.hpp \
+ asio/detail/old_win_sdk_compat.hpp \
+ asio/detail/operation.hpp \
+ asio/detail/op_queue.hpp \
+ asio/detail/pipe_select_interrupter.hpp \
+ asio/detail/pop_options.hpp \
+ asio/detail/posix_event.hpp \
+ asio/detail/posix_fd_set_adapter.hpp \
+ asio/detail/posix_global.hpp \
+ asio/detail/posix_mutex.hpp \
+ asio/detail/posix_serial_port_service.hpp \
+ asio/detail/posix_signal_blocker.hpp \
+ asio/detail/posix_static_mutex.hpp \
+ asio/detail/posix_thread.hpp \
+ asio/detail/posix_tss_ptr.hpp \
+ asio/detail/push_options.hpp \
+ asio/detail/reactive_descriptor_service.hpp \
+ asio/detail/reactive_null_buffers_op.hpp \
+ asio/detail/reactive_socket_accept_op.hpp \
+ asio/detail/reactive_socket_connect_op.hpp \
+ asio/detail/reactive_socket_recvfrom_op.hpp \
+ asio/detail/reactive_socket_recvmsg_op.hpp \
+ asio/detail/reactive_socket_recv_op.hpp \
+ asio/detail/reactive_socket_send_op.hpp \
+ asio/detail/reactive_socket_sendto_op.hpp \
+ asio/detail/reactive_socket_service_base.hpp \
+ asio/detail/reactive_socket_service.hpp \
+ asio/detail/reactive_wait_op.hpp \
+ asio/detail/reactor.hpp \
+ asio/detail/reactor_op.hpp \
+ asio/detail/reactor_op_queue.hpp \
+ asio/detail/recycling_allocator.hpp \
+ asio/detail/regex_fwd.hpp \
+ asio/detail/resolve_endpoint_op.hpp \
+ asio/detail/resolve_op.hpp \
+ asio/detail/resolve_query_op.hpp \
+ asio/detail/resolver_service_base.hpp \
+ asio/detail/resolver_service.hpp \
+ asio/detail/scheduler.hpp \
+ asio/detail/scheduler_operation.hpp \
+ asio/detail/scheduler_task.hpp \
+ asio/detail/scheduler_thread_info.hpp \
+ asio/detail/scoped_lock.hpp \
+ asio/detail/scoped_ptr.hpp \
+ asio/detail/select_interrupter.hpp \
+ asio/detail/select_reactor.hpp \
+ asio/detail/service_registry.hpp \
+ asio/detail/signal_blocker.hpp \
+ asio/detail/signal_handler.hpp \
+ asio/detail/signal_init.hpp \
+ asio/detail/signal_op.hpp \
+ asio/detail/signal_set_service.hpp \
+ asio/detail/socket_holder.hpp \
+ asio/detail/socket_ops.hpp \
+ asio/detail/socket_option.hpp \
+ asio/detail/socket_select_interrupter.hpp \
+ asio/detail/socket_types.hpp \
+ asio/detail/source_location.hpp \
+ asio/detail/static_mutex.hpp \
+ asio/detail/std_event.hpp \
+ asio/detail/std_fenced_block.hpp \
+ asio/detail/std_global.hpp \
+ asio/detail/std_mutex.hpp \
+ asio/detail/std_static_mutex.hpp \
+ asio/detail/std_thread.hpp \
+ asio/detail/strand_executor_service.hpp \
+ asio/detail/strand_service.hpp \
+ asio/detail/string_view.hpp \
+ asio/detail/thread_context.hpp \
+ asio/detail/thread_group.hpp \
+ asio/detail/thread.hpp \
+ asio/detail/thread_info_base.hpp \
+ asio/detail/throw_error.hpp \
+ asio/detail/throw_exception.hpp \
+ asio/detail/timer_queue_base.hpp \
+ asio/detail/timer_queue.hpp \
+ asio/detail/timer_queue_ptime.hpp \
+ asio/detail/timer_queue_set.hpp \
+ asio/detail/timer_scheduler_fwd.hpp \
+ asio/detail/timer_scheduler.hpp \
+ asio/detail/tss_ptr.hpp \
+ asio/detail/type_traits.hpp \
+ asio/detail/utility.hpp \
+ asio/detail/wait_handler.hpp \
+ asio/detail/wait_op.hpp \
+ asio/detail/winapp_thread.hpp \
+ asio/detail/wince_thread.hpp \
+ asio/detail/win_event.hpp \
+ asio/detail/win_fd_set_adapter.hpp \
+ asio/detail/win_global.hpp \
+ asio/detail/win_iocp_file_service.hpp \
+ asio/detail/win_iocp_handle_read_op.hpp \
+ asio/detail/win_iocp_handle_service.hpp \
+ asio/detail/win_iocp_handle_write_op.hpp \
+ asio/detail/win_iocp_io_context.hpp \
+ asio/detail/win_iocp_null_buffers_op.hpp \
+ asio/detail/win_iocp_operation.hpp \
+ asio/detail/win_iocp_overlapped_op.hpp \
+ asio/detail/win_iocp_overlapped_ptr.hpp \
+ asio/detail/win_iocp_serial_port_service.hpp \
+ asio/detail/win_iocp_socket_accept_op.hpp \
+ asio/detail/win_iocp_socket_connect_op.hpp \
+ asio/detail/win_iocp_socket_recvfrom_op.hpp \
+ asio/detail/win_iocp_socket_recvmsg_op.hpp \
+ asio/detail/win_iocp_socket_recv_op.hpp \
+ asio/detail/win_iocp_socket_send_op.hpp \
+ asio/detail/win_iocp_socket_service_base.hpp \
+ asio/detail/win_iocp_socket_service.hpp \
+ asio/detail/win_iocp_thread_info.hpp \
+ asio/detail/win_iocp_wait_op.hpp \
+ asio/detail/win_mutex.hpp \
+ asio/detail/win_object_handle_service.hpp \
+ asio/detail/winrt_async_manager.hpp \
+ asio/detail/winrt_async_op.hpp \
+ asio/detail/winrt_resolve_op.hpp \
+ asio/detail/winrt_resolver_service.hpp \
+ asio/detail/winrt_socket_connect_op.hpp \
+ asio/detail/winrt_socket_recv_op.hpp \
+ asio/detail/winrt_socket_send_op.hpp \
+ asio/detail/winrt_ssocket_service_base.hpp \
+ asio/detail/winrt_ssocket_service.hpp \
+ asio/detail/winrt_timer_scheduler.hpp \
+ asio/detail/winrt_utils.hpp \
+ asio/detail/winsock_init.hpp \
+ asio/detail/win_static_mutex.hpp \
+ asio/detail/win_thread.hpp \
+ asio/detail/win_tss_ptr.hpp \
+ asio/detail/work_dispatcher.hpp \
+ asio/detail/wrapped_handler.hpp \
+ asio/dispatch.hpp \
+ asio/error_code.hpp \
+ asio/error.hpp \
+ asio/execution.hpp \
+ asio/execution_context.hpp \
+ asio/execution/allocator.hpp \
+ asio/execution/any_executor.hpp \
+ asio/execution/bad_executor.hpp \
+ asio/execution/blocking.hpp \
+ asio/execution/blocking_adaptation.hpp \
+ asio/execution/context.hpp \
+ asio/execution/context_as.hpp \
+ asio/execution/executor.hpp \
+ asio/execution/impl/bad_executor.ipp \
+ asio/execution/invocable_archetype.hpp \
+ asio/execution/mapping.hpp \
+ asio/execution/occupancy.hpp \
+ asio/execution/outstanding_work.hpp \
+ asio/execution/prefer_only.hpp \
+ asio/execution/relationship.hpp \
+ asio/executor.hpp \
+ asio/executor_work_guard.hpp \
+ asio/experimental/append.hpp \
+ asio/experimental/as_single.hpp \
+ asio/experimental/as_tuple.hpp \
+ asio/experimental/awaitable_operators.hpp \
+ asio/experimental/basic_channel.hpp \
+ asio/experimental/basic_concurrent_channel.hpp \
+ asio/experimental/cancellation_condition.hpp \
+ asio/experimental/channel.hpp \
+ asio/experimental/channel_error.hpp \
+ asio/experimental/channel_traits.hpp \
+ asio/experimental/co_composed.hpp \
+ asio/experimental/co_spawn.hpp \
+ asio/experimental/concurrent_channel.hpp \
+ asio/experimental/coro.hpp \
+ asio/experimental/coro_traits.hpp \
+ asio/experimental/deferred.hpp \
+ asio/experimental/detail/channel_handler.hpp \
+ asio/experimental/detail/channel_message.hpp \
+ asio/experimental/detail/channel_operation.hpp \
+ asio/experimental/detail/channel_payload.hpp \
+ asio/experimental/detail/channel_receive_op.hpp \
+ asio/experimental/detail/channel_send_functions.hpp \
+ asio/experimental/detail/channel_send_op.hpp \
+ asio/experimental/detail/channel_service.hpp \
+ asio/experimental/detail/coro_completion_handler.hpp \
+ asio/experimental/detail/coro_promise_allocator.hpp \
+ asio/experimental/detail/has_signature.hpp \
+ asio/experimental/detail/impl/channel_service.hpp \
+ asio/experimental/detail/partial_promise.hpp \
+ asio/experimental/impl/as_single.hpp \
+ asio/experimental/impl/channel_error.ipp \
+ asio/experimental/impl/co_composed.hpp \
+ asio/experimental/impl/coro.hpp \
+ asio/experimental/impl/parallel_group.hpp \
+ asio/experimental/impl/promise.hpp \
+ asio/experimental/impl/use_coro.hpp \
+ asio/experimental/impl/use_promise.hpp \
+ asio/experimental/parallel_group.hpp \
+ asio/experimental/prepend.hpp \
+ asio/experimental/promise.hpp \
+ asio/experimental/use_coro.hpp \
+ asio/experimental/use_promise.hpp \
+ asio/file_base.hpp \
+ asio/generic/basic_endpoint.hpp \
+ asio/generic/datagram_protocol.hpp \
+ asio/generic/detail/endpoint.hpp \
+ asio/generic/detail/impl/endpoint.ipp \
+ asio/generic/raw_protocol.hpp \
+ asio/generic/seq_packet_protocol.hpp \
+ asio/generic/stream_protocol.hpp \
+ asio/handler_continuation_hook.hpp \
+ asio/high_resolution_timer.hpp \
+ asio.hpp \
+ asio/impl/any_completion_executor.ipp \
+ asio/impl/any_io_executor.ipp \
+ asio/impl/append.hpp \
+ asio/impl/as_tuple.hpp \
+ asio/impl/awaitable.hpp \
+ asio/impl/buffered_read_stream.hpp \
+ asio/impl/buffered_write_stream.hpp \
+ asio/impl/cancellation_signal.ipp \
+ asio/impl/co_spawn.hpp \
+ asio/impl/connect.hpp \
+ asio/impl/connect_pipe.hpp \
+ asio/impl/connect_pipe.ipp \
+ asio/impl/consign.hpp \
+ asio/impl/deferred.hpp \
+ asio/impl/detached.hpp \
+ asio/impl/error_code.ipp \
+ asio/impl/error.ipp \
+ asio/impl/execution_context.hpp \
+ asio/impl/execution_context.ipp \
+ asio/impl/executor.hpp \
+ asio/impl/executor.ipp \
+ asio/impl/io_context.hpp \
+ asio/impl/io_context.ipp \
+ asio/impl/multiple_exceptions.ipp \
+ asio/impl/prepend.hpp \
+ asio/impl/read_at.hpp \
+ asio/impl/read.hpp \
+ asio/impl/read_until.hpp \
+ asio/impl/redirect_error.hpp \
+ asio/impl/serial_port_base.hpp \
+ asio/impl/serial_port_base.ipp \
+ asio/impl/spawn.hpp \
+ asio/impl/src.hpp \
+ asio/impl/system_context.hpp \
+ asio/impl/system_context.ipp \
+ asio/impl/system_executor.hpp \
+ asio/impl/thread_pool.hpp \
+ asio/impl/thread_pool.ipp \
+ asio/impl/use_awaitable.hpp \
+ asio/impl/use_future.hpp \
+ asio/impl/write_at.hpp \
+ asio/impl/write.hpp \
+ asio/io_context.hpp \
+ asio/io_context_strand.hpp \
+ asio/io_service.hpp \
+ asio/io_service_strand.hpp \
+ asio/ip/address.hpp \
+ asio/ip/address_v4.hpp \
+ asio/ip/address_v4_iterator.hpp \
+ asio/ip/address_v4_range.hpp \
+ asio/ip/address_v6.hpp \
+ asio/ip/address_v6_iterator.hpp \
+ asio/ip/address_v6_range.hpp \
+ asio/ip/bad_address_cast.hpp \
+ asio/ip/basic_endpoint.hpp \
+ asio/ip/basic_resolver_entry.hpp \
+ asio/ip/basic_resolver.hpp \
+ asio/ip/basic_resolver_iterator.hpp \
+ asio/ip/basic_resolver_query.hpp \
+ asio/ip/basic_resolver_results.hpp \
+ asio/ip/detail/endpoint.hpp \
+ asio/ip/detail/impl/endpoint.ipp \
+ asio/ip/detail/socket_option.hpp \
+ asio/ip/host_name.hpp \
+ asio/ip/icmp.hpp \
+ asio/ip/impl/address.hpp \
+ asio/ip/impl/address.ipp \
+ asio/ip/impl/address_v4.hpp \
+ asio/ip/impl/address_v4.ipp \
+ asio/ip/impl/address_v6.hpp \
+ asio/ip/impl/address_v6.ipp \
+ asio/ip/impl/basic_endpoint.hpp \
+ asio/ip/impl/host_name.ipp \
+ asio/ip/impl/network_v4.hpp \
+ asio/ip/impl/network_v4.ipp \
+ asio/ip/impl/network_v6.hpp \
+ asio/ip/impl/network_v6.ipp \
+ asio/ip/multicast.hpp \
+ asio/ip/network_v4.hpp \
+ asio/ip/network_v6.hpp \
+ asio/ip/resolver_base.hpp \
+ asio/ip/resolver_query_base.hpp \
+ asio/ip/tcp.hpp \
+ asio/ip/udp.hpp \
+ asio/ip/unicast.hpp \
+ asio/ip/v6_only.hpp \
+ asio/is_applicable_property.hpp \
+ asio/is_contiguous_iterator.hpp \
+ asio/is_executor.hpp \
+ asio/is_read_buffered.hpp \
+ asio/is_write_buffered.hpp \
+ asio/local/basic_endpoint.hpp \
+ asio/local/connect_pair.hpp \
+ asio/local/datagram_protocol.hpp \
+ asio/local/detail/endpoint.hpp \
+ asio/local/detail/impl/endpoint.ipp \
+ asio/local/seq_packet_protocol.hpp \
+ asio/local/stream_protocol.hpp \
+ asio/multiple_exceptions.hpp \
+ asio/packaged_task.hpp \
+ asio/placeholders.hpp \
+ asio/posix/basic_descriptor.hpp \
+ asio/posix/basic_stream_descriptor.hpp \
+ asio/posix/descriptor_base.hpp \
+ asio/posix/descriptor.hpp \
+ asio/posix/stream_descriptor.hpp \
+ asio/post.hpp \
+ asio/prefer.hpp \
+ asio/prepend.hpp \
+ asio/query.hpp \
+ asio/random_access_file.hpp \
+ asio/read_at.hpp \
+ asio/read.hpp \
+ asio/read_until.hpp \
+ asio/readable_pipe.hpp \
+ asio/recycling_allocator.hpp \
+ asio/redirect_error.hpp \
+ asio/registered_buffer.hpp \
+ asio/require.hpp \
+ asio/require_concept.hpp \
+ asio/serial_port_base.hpp \
+ asio/serial_port.hpp \
+ asio/signal_set_base.hpp \
+ asio/signal_set.hpp \
+ asio/socket_base.hpp \
+ asio/spawn.hpp \
+ asio/ssl/context_base.hpp \
+ asio/ssl/context.hpp \
+ asio/ssl/detail/buffered_handshake_op.hpp \
+ asio/ssl/detail/engine.hpp \
+ asio/ssl/detail/handshake_op.hpp \
+ asio/ssl/detail/impl/engine.ipp \
+ asio/ssl/detail/impl/openssl_init.ipp \
+ asio/ssl/detail/io.hpp \
+ asio/ssl/detail/openssl_init.hpp \
+ asio/ssl/detail/openssl_types.hpp \
+ asio/ssl/detail/password_callback.hpp \
+ asio/ssl/detail/read_op.hpp \
+ asio/ssl/detail/shutdown_op.hpp \
+ asio/ssl/detail/stream_core.hpp \
+ asio/ssl/detail/verify_callback.hpp \
+ asio/ssl/detail/write_op.hpp \
+ asio/ssl/error.hpp \
+ asio/ssl.hpp \
+ asio/ssl/host_name_verification.hpp \
+ asio/ssl/impl/context.hpp \
+ asio/ssl/impl/context.ipp \
+ asio/ssl/impl/error.ipp \
+ asio/ssl/impl/host_name_verification.ipp \
+ asio/ssl/impl/rfc2818_verification.ipp \
+ asio/ssl/impl/src.hpp \
+ asio/ssl/rfc2818_verification.hpp \
+ asio/ssl/stream_base.hpp \
+ asio/ssl/stream.hpp \
+ asio/ssl/verify_context.hpp \
+ asio/ssl/verify_mode.hpp \
+ asio/static_thread_pool.hpp \
+ asio/steady_timer.hpp \
+ asio/strand.hpp \
+ asio/streambuf.hpp \
+ asio/stream_file.hpp \
+ asio/system_context.hpp \
+ asio/system_error.hpp \
+ asio/system_executor.hpp \
+ asio/system_timer.hpp \
+ asio/this_coro.hpp \
+ asio/thread.hpp \
+ asio/thread_pool.hpp \
+ asio/time_traits.hpp \
+ asio/traits/equality_comparable.hpp \
+ asio/traits/execute_member.hpp \
+ asio/traits/prefer_free.hpp \
+ asio/traits/prefer_member.hpp \
+ asio/traits/query_free.hpp \
+ asio/traits/query_member.hpp \
+ asio/traits/query_static_constexpr_member.hpp \
+ asio/traits/require_concept_free.hpp \
+ asio/traits/require_concept_member.hpp \
+ asio/traits/require_free.hpp \
+ asio/traits/require_member.hpp \
+ asio/traits/static_query.hpp \
+ asio/traits/static_require.hpp \
+ asio/traits/static_require_concept.hpp \
+ asio/ts/buffer.hpp \
+ asio/ts/executor.hpp \
+ asio/ts/internet.hpp \
+ asio/ts/io_context.hpp \
+ asio/ts/netfwd.hpp \
+ asio/ts/net.hpp \
+ asio/ts/socket.hpp \
+ asio/ts/timer.hpp \
+ asio/unyield.hpp \
+ asio/use_awaitable.hpp \
+ asio/use_future.hpp \
+ asio/uses_executor.hpp \
+ asio/version.hpp \
+ asio/wait_traits.hpp \
+ asio/windows/basic_object_handle.hpp \
+ asio/windows/basic_overlapped_handle.hpp \
+ asio/windows/basic_random_access_handle.hpp \
+ asio/windows/basic_stream_handle.hpp \
+ asio/windows/object_handle.hpp \
+ asio/windows/overlapped_handle.hpp \
+ asio/windows/overlapped_ptr.hpp \
+ asio/windows/random_access_handle.hpp \
+ asio/windows/stream_handle.hpp \
+ asio/writable_pipe.hpp \
+ asio/write_at.hpp \
+ asio/write.hpp \
+ asio/yield.hpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+ fi; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \
+ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \
+ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nobase_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ cscopelist-am ctags ctags-am distclean distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-nobase_includeHEADERS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-nobase_includeHEADERS
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/include/asio.hpp b/3rdparty/asio/include/asio.hpp
index 1e42e035d25..3421b58bdae 100644
--- a/3rdparty/asio/include/asio.hpp
+++ b/3rdparty/asio/include/asio.hpp
@@ -2,7 +2,7 @@
// asio.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,24 +15,43 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include "asio/any_completion_executor.hpp"
+#include "asio/any_completion_handler.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/append.hpp"
+#include "asio/as_tuple.hpp"
#include "asio/associated_allocator.hpp"
+#include "asio/associated_cancellation_slot.hpp"
#include "asio/associated_executor.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/associator.hpp"
#include "asio/async_result.hpp"
+#include "asio/awaitable.hpp"
#include "asio/basic_datagram_socket.hpp"
#include "asio/basic_deadline_timer.hpp"
+#include "asio/basic_file.hpp"
#include "asio/basic_io_object.hpp"
+#include "asio/basic_random_access_file.hpp"
#include "asio/basic_raw_socket.hpp"
+#include "asio/basic_readable_pipe.hpp"
#include "asio/basic_seq_packet_socket.hpp"
#include "asio/basic_serial_port.hpp"
#include "asio/basic_signal_set.hpp"
+#include "asio/basic_socket.hpp"
#include "asio/basic_socket_acceptor.hpp"
#include "asio/basic_socket_iostream.hpp"
#include "asio/basic_socket_streambuf.hpp"
+#include "asio/basic_stream_file.hpp"
#include "asio/basic_stream_socket.hpp"
#include "asio/basic_streambuf.hpp"
#include "asio/basic_waitable_timer.hpp"
+#include "asio/basic_writable_pipe.hpp"
+#include "asio/bind_allocator.hpp"
+#include "asio/bind_cancellation_slot.hpp"
#include "asio/bind_executor.hpp"
+#include "asio/bind_immediate_executor.hpp"
#include "asio/buffer.hpp"
+#include "asio/buffer_registration.hpp"
#include "asio/buffered_read_stream_fwd.hpp"
#include "asio/buffered_read_stream.hpp"
#include "asio/buffered_stream_fwd.hpp"
@@ -40,28 +59,47 @@
#include "asio/buffered_write_stream_fwd.hpp"
#include "asio/buffered_write_stream.hpp"
#include "asio/buffers_iterator.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/co_spawn.hpp"
#include "asio/completion_condition.hpp"
+#include "asio/compose.hpp"
#include "asio/connect.hpp"
+#include "asio/connect_pipe.hpp"
+#include "asio/consign.hpp"
#include "asio/coroutine.hpp"
-#include "asio/datagram_socket_service.hpp"
-#include "asio/deadline_timer_service.hpp"
#include "asio/deadline_timer.hpp"
#include "asio/defer.hpp"
+#include "asio/deferred.hpp"
+#include "asio/detached.hpp"
#include "asio/dispatch.hpp"
#include "asio/error.hpp"
#include "asio/error_code.hpp"
-#include "asio/execution_context.hpp"
+#include "asio/execution.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/any_executor.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/blocking_adaptation.hpp"
+#include "asio/execution/context.hpp"
+#include "asio/execution/context_as.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/invocable_archetype.hpp"
+#include "asio/execution/mapping.hpp"
+#include "asio/execution/occupancy.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/execution/prefer_only.hpp"
+#include "asio/execution/relationship.hpp"
#include "asio/executor.hpp"
#include "asio/executor_work_guard.hpp"
+#include "asio/file_base.hpp"
#include "asio/generic/basic_endpoint.hpp"
#include "asio/generic/datagram_protocol.hpp"
#include "asio/generic/raw_protocol.hpp"
#include "asio/generic/seq_packet_protocol.hpp"
#include "asio/generic/stream_protocol.hpp"
-#include "asio/handler_alloc_hook.hpp"
#include "asio/handler_continuation_hook.hpp"
-#include "asio/handler_invoke_hook.hpp"
-#include "asio/handler_type.hpp"
+#include "asio/high_resolution_timer.hpp"
#include "asio/io_context.hpp"
#include "asio/io_context_strand.hpp"
#include "asio/io_service.hpp"
@@ -73,6 +111,8 @@
#include "asio/ip/address_v6.hpp"
#include "asio/ip/address_v6_iterator.hpp"
#include "asio/ip/address_v6_range.hpp"
+#include "asio/ip/network_v4.hpp"
+#include "asio/ip/network_v6.hpp"
#include "asio/ip/bad_address_cast.hpp"
#include "asio/ip/basic_endpoint.hpp"
#include "asio/ip/basic_resolver.hpp"
@@ -84,18 +124,21 @@
#include "asio/ip/multicast.hpp"
#include "asio/ip/resolver_base.hpp"
#include "asio/ip/resolver_query_base.hpp"
-#include "asio/ip/resolver_service.hpp"
#include "asio/ip/tcp.hpp"
#include "asio/ip/udp.hpp"
#include "asio/ip/unicast.hpp"
#include "asio/ip/v6_only.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/is_contiguous_iterator.hpp"
#include "asio/is_executor.hpp"
#include "asio/is_read_buffered.hpp"
#include "asio/is_write_buffered.hpp"
#include "asio/local/basic_endpoint.hpp"
#include "asio/local/connect_pair.hpp"
#include "asio/local/datagram_protocol.hpp"
+#include "asio/local/seq_packet_protocol.hpp"
#include "asio/local/stream_protocol.hpp"
+#include "asio/multiple_exceptions.hpp"
#include "asio/packaged_task.hpp"
#include "asio/placeholders.hpp"
#include "asio/posix/basic_descriptor.hpp"
@@ -103,45 +146,53 @@
#include "asio/posix/descriptor.hpp"
#include "asio/posix/descriptor_base.hpp"
#include "asio/posix/stream_descriptor.hpp"
-#include "asio/posix/stream_descriptor_service.hpp"
#include "asio/post.hpp"
-#include "asio/raw_socket_service.hpp"
+#include "asio/prefer.hpp"
+#include "asio/prepend.hpp"
+#include "asio/query.hpp"
+#include "asio/random_access_file.hpp"
#include "asio/read.hpp"
#include "asio/read_at.hpp"
#include "asio/read_until.hpp"
-#include "asio/seq_packet_socket_service.hpp"
+#include "asio/readable_pipe.hpp"
+#include "asio/recycling_allocator.hpp"
+#include "asio/redirect_error.hpp"
+#include "asio/registered_buffer.hpp"
+#include "asio/require.hpp"
+#include "asio/require_concept.hpp"
#include "asio/serial_port.hpp"
#include "asio/serial_port_base.hpp"
-#include "asio/serial_port_service.hpp"
#include "asio/signal_set.hpp"
-#include "asio/signal_set_service.hpp"
-#include "asio/socket_acceptor_service.hpp"
+#include "asio/signal_set_base.hpp"
#include "asio/socket_base.hpp"
+#include "asio/static_thread_pool.hpp"
+#include "asio/steady_timer.hpp"
#include "asio/strand.hpp"
-#include "asio/stream_socket_service.hpp"
+#include "asio/stream_file.hpp"
#include "asio/streambuf.hpp"
+#include "asio/system_context.hpp"
#include "asio/system_error.hpp"
#include "asio/system_executor.hpp"
+#include "asio/system_timer.hpp"
+#include "asio/this_coro.hpp"
#include "asio/thread.hpp"
#include "asio/thread_pool.hpp"
#include "asio/time_traits.hpp"
+#include "asio/use_awaitable.hpp"
#include "asio/use_future.hpp"
#include "asio/uses_executor.hpp"
#include "asio/version.hpp"
#include "asio/wait_traits.hpp"
-#include "asio/waitable_timer_service.hpp"
-#include "asio/windows/basic_handle.hpp"
#include "asio/windows/basic_object_handle.hpp"
+#include "asio/windows/basic_overlapped_handle.hpp"
#include "asio/windows/basic_random_access_handle.hpp"
#include "asio/windows/basic_stream_handle.hpp"
#include "asio/windows/object_handle.hpp"
-#include "asio/windows/object_handle_service.hpp"
#include "asio/windows/overlapped_handle.hpp"
#include "asio/windows/overlapped_ptr.hpp"
#include "asio/windows/random_access_handle.hpp"
-#include "asio/windows/random_access_handle_service.hpp"
#include "asio/windows/stream_handle.hpp"
-#include "asio/windows/stream_handle_service.hpp"
+#include "asio/writable_pipe.hpp"
#include "asio/write.hpp"
#include "asio/write_at.hpp"
diff --git a/3rdparty/asio/include/asio/any_completion_executor.hpp b/3rdparty/asio/include/asio/any_completion_executor.hpp
new file mode 100644
index 00000000000..650ff7bafdd
--- /dev/null
+++ b/3rdparty/asio/include/asio/any_completion_executor.hpp
@@ -0,0 +1,336 @@
+//
+// any_completion_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_ANY_COMPLETION_EXECUTOR_HPP
+#define ASIO_ANY_COMPLETION_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/executor.hpp"
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/execution.hpp"
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+typedef executor any_completion_executor;
+
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+/// Polymorphic executor type for use with I/O objects.
+/**
+ * The @c any_completion_executor type is a polymorphic executor that supports
+ * the set of properties required for the execution of completion handlers. It
+ * is defined as the execution::any_executor class template parameterised as
+ * follows:
+ * @code execution::any_executor<
+ * execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ * execution::prefer_only<execution::outstanding_work_t::untracked_t>
+ * execution::prefer_only<execution::relationship_t::fork_t>,
+ * execution::prefer_only<execution::relationship_t::continuation_t>
+ * > @endcode
+ */
+class any_completion_executor :
+#if defined(GENERATING_DOCUMENTATION)
+ public execution::any_executor<...>
+#else // defined(GENERATING_DOCUMENTATION)
+ public execution::any_executor<
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ >
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+public:
+#if !defined(GENERATING_DOCUMENTATION)
+ typedef execution::any_executor<
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ > base_type;
+
+ typedef void supportable_properties_type(
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ );
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Default constructor.
+ ASIO_DECL any_completion_executor() noexcept;
+
+ /// Construct in an empty state. Equivalent effects to default constructor.
+ ASIO_DECL any_completion_executor(nullptr_t) noexcept;
+
+ /// Copy constructor.
+ ASIO_DECL any_completion_executor(
+ const any_completion_executor& e) noexcept;
+
+ /// Move constructor.
+ ASIO_DECL any_completion_executor(
+ any_completion_executor&& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_completion_executor(
+ execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_completion_executor(OtherAnyExecutor e,
+ constraint_t<
+ conditional<
+ !is_same<OtherAnyExecutor, any_completion_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::type::value
+ > = 0)
+ : base_type(static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_completion_executor(std::nothrow_t,
+ execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_completion_executor(std::nothrow_t, OtherAnyExecutor e,
+ constraint_t<
+ conditional<
+ !is_same<OtherAnyExecutor, any_completion_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::type::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_completion_executor(std::nothrow_t,
+ const any_completion_executor& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_completion_executor(std::nothrow_t,
+ any_completion_executor&& e) noexcept;
+
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(Executor e,
+ constraint_t<
+ conditional<
+ !is_same<Executor, any_completion_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::type::value
+ > = 0)
+ : base_type(static_cast<Executor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(std::nothrow_t, Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(std::nothrow_t, Executor e,
+ constraint_t<
+ conditional<
+ !is_same<Executor, any_completion_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::type::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<Executor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator.
+ ASIO_DECL any_completion_executor& operator=(
+ const any_completion_executor& e) noexcept;
+
+ /// Move assignment operator.
+ ASIO_DECL any_completion_executor& operator=(
+ any_completion_executor&& e) noexcept;
+
+ /// Assignment operator that sets the polymorphic wrapper to the empty state.
+ ASIO_DECL any_completion_executor& operator=(nullptr_t);
+
+ /// Destructor.
+ ASIO_DECL ~any_completion_executor();
+
+ /// Swap targets with another polymorphic wrapper.
+ ASIO_DECL void swap(any_completion_executor& other) noexcept;
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require and asio::prefer customisation points.
+ *
+ * For example:
+ * @code any_completion_executor ex = ...;
+ * auto ex2 = asio::require(ex, execution::relationship.fork); @endcode
+ */
+ template <typename Property>
+ any_completion_executor require(const Property& p,
+ constraint_t<
+ traits::require_member<const base_type&, const Property&>::is_valid
+ > = 0) const
+ {
+ return static_cast<const base_type&>(*this).require(p);
+ }
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::prefer customisation point.
+ *
+ * For example:
+ * @code any_completion_executor ex = ...;
+ * auto ex2 = asio::prefer(ex, execution::relationship.fork); @endcode
+ */
+ template <typename Property>
+ any_completion_executor prefer(const Property& p,
+ constraint_t<
+ traits::prefer_member<const base_type&, const Property&>::is_valid
+ > = 0) const
+ {
+ return static_cast<const base_type&>(*this).prefer(p);
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::tracked_t&, int) const;
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::untracked_t&, int) const;
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::fork_t&, int) const;
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::continuation_t&, int) const;
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<any_completion_executor>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<any_completion_executor, F>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Prop>
+struct query_member<any_completion_executor, Prop> :
+ query_member<any_completion_executor::base_type, Prop>
+{
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Prop>
+struct require_member<any_completion_executor, Prop> :
+ require_member<any_completion_executor::base_type, Prop>
+{
+ typedef any_completion_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename Prop>
+struct prefer_member<any_completion_executor, Prop> :
+ prefer_member<any_completion_executor::base_type, Prop>
+{
+ typedef any_completion_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY) \
+ && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/impl/any_completion_executor.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+ // && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_ANY_COMPLETION_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/any_completion_handler.hpp b/3rdparty/asio/include/asio/any_completion_handler.hpp
new file mode 100644
index 00000000000..45b3e75fec7
--- /dev/null
+++ b/3rdparty/asio/include/asio/any_completion_handler.hpp
@@ -0,0 +1,822 @@
+//
+// any_completion_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_ANY_COMPLETION_HANDLER_HPP
+#define ASIO_ANY_COMPLETION_HANDLER_HPP
+
+#include "asio/detail/config.hpp"
+#include <cstring>
+#include <functional>
+#include <memory>
+#include <utility>
+#include "asio/any_completion_executor.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/recycling_allocator.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class any_completion_handler_impl_base
+{
+public:
+ template <typename S>
+ explicit any_completion_handler_impl_base(S&& slot)
+ : cancel_state_(static_cast<S&&>(slot), enable_total_cancellation())
+ {
+ }
+
+ cancellation_slot get_cancellation_slot() const noexcept
+ {
+ return cancel_state_.slot();
+ }
+
+private:
+ cancellation_state cancel_state_;
+};
+
+template <typename Handler>
+class any_completion_handler_impl :
+ public any_completion_handler_impl_base
+{
+public:
+ template <typename S, typename H>
+ any_completion_handler_impl(S&& slot, H&& h)
+ : any_completion_handler_impl_base(static_cast<S&&>(slot)),
+ handler_(static_cast<H&&>(h))
+ {
+ }
+
+ struct uninit_deleter
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<any_completion_handler_impl> alloc;
+
+ void operator()(any_completion_handler_impl* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ };
+
+ struct deleter
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<any_completion_handler_impl> alloc;
+
+ void operator()(any_completion_handler_impl* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, ptr);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ };
+
+ template <typename S, typename H>
+ static any_completion_handler_impl* create(S&& slot, H&& h)
+ {
+ uninit_deleter d{
+ (get_associated_allocator)(h,
+ asio::recycling_allocator<void>())};
+
+ std::unique_ptr<any_completion_handler_impl, uninit_deleter> uninit_ptr(
+ std::allocator_traits<decltype(d.alloc)>::allocate(d.alloc, 1), d);
+
+ any_completion_handler_impl* ptr =
+ new (uninit_ptr.get()) any_completion_handler_impl(
+ static_cast<S&&>(slot), static_cast<H&&>(h));
+
+ uninit_ptr.release();
+ return ptr;
+ }
+
+ void destroy()
+ {
+ deleter d{
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>())};
+
+ d(this);
+ }
+
+ any_completion_executor executor(
+ const any_completion_executor& candidate) const noexcept
+ {
+ return any_completion_executor(std::nothrow,
+ (get_associated_executor)(handler_, candidate));
+ }
+
+ any_completion_executor immediate_executor(
+ const any_io_executor& candidate) const noexcept
+ {
+ return any_completion_executor(std::nothrow,
+ (get_associated_immediate_executor)(handler_, candidate));
+ }
+
+ void* allocate(std::size_t size, std::size_t align) const
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<unsigned char> alloc(
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>()));
+
+ std::size_t space = size + align - 1;
+ unsigned char* base =
+ std::allocator_traits<decltype(alloc)>::allocate(
+ alloc, space + sizeof(std::ptrdiff_t));
+
+ void* p = base;
+ if (detail::align(align, size, p, space))
+ {
+ std::ptrdiff_t off = static_cast<unsigned char*>(p) - base;
+ std::memcpy(static_cast<unsigned char*>(p) + size, &off, sizeof(off));
+ return p;
+ }
+
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ return nullptr;
+ }
+
+ void deallocate(void* p, std::size_t size, std::size_t align) const
+ {
+ if (p)
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<unsigned char> alloc(
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>()));
+
+ std::ptrdiff_t off;
+ std::memcpy(&off, static_cast<unsigned char*>(p) + size, sizeof(off));
+ unsigned char* base = static_cast<unsigned char*>(p) - off;
+
+ std::allocator_traits<decltype(alloc)>::deallocate(
+ alloc, base, size + align -1 + sizeof(std::ptrdiff_t));
+ }
+ }
+
+ template <typename... Args>
+ void call(Args&&... args)
+ {
+ deleter d{
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>())};
+
+ std::unique_ptr<any_completion_handler_impl, deleter> ptr(this, d);
+ Handler handler(static_cast<Handler&&>(handler_));
+ ptr.reset();
+
+ static_cast<Handler&&>(handler)(
+ static_cast<Args&&>(args)...);
+ }
+
+private:
+ Handler handler_;
+};
+
+template <typename Signature>
+class any_completion_handler_call_fn;
+
+template <typename R, typename... Args>
+class any_completion_handler_call_fn<R(Args...)>
+{
+public:
+ using type = void(*)(any_completion_handler_impl_base*, Args...);
+
+ constexpr any_completion_handler_call_fn(type fn)
+ : call_fn_(fn)
+ {
+ }
+
+ void call(any_completion_handler_impl_base* impl, Args... args) const
+ {
+ call_fn_(impl, static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler>
+ static void impl(any_completion_handler_impl_base* impl, Args... args)
+ {
+ static_cast<any_completion_handler_impl<Handler>*>(impl)->call(
+ static_cast<Args&&>(args)...);
+ }
+
+private:
+ type call_fn_;
+};
+
+template <typename... Signatures>
+class any_completion_handler_call_fns;
+
+template <typename Signature>
+class any_completion_handler_call_fns<Signature> :
+ public any_completion_handler_call_fn<Signature>
+{
+public:
+ using any_completion_handler_call_fn<
+ Signature>::any_completion_handler_call_fn;
+ using any_completion_handler_call_fn<Signature>::call;
+};
+
+template <typename Signature, typename... Signatures>
+class any_completion_handler_call_fns<Signature, Signatures...> :
+ public any_completion_handler_call_fn<Signature>,
+ public any_completion_handler_call_fns<Signatures...>
+{
+public:
+ template <typename CallFn, typename... CallFns>
+ constexpr any_completion_handler_call_fns(CallFn fn, CallFns... fns)
+ : any_completion_handler_call_fn<Signature>(fn),
+ any_completion_handler_call_fns<Signatures...>(fns...)
+ {
+ }
+
+ using any_completion_handler_call_fn<Signature>::call;
+ using any_completion_handler_call_fns<Signatures...>::call;
+};
+
+class any_completion_handler_destroy_fn
+{
+public:
+ using type = void(*)(any_completion_handler_impl_base*);
+
+ constexpr any_completion_handler_destroy_fn(type fn)
+ : destroy_fn_(fn)
+ {
+ }
+
+ void destroy(any_completion_handler_impl_base* impl) const
+ {
+ destroy_fn_(impl);
+ }
+
+ template <typename Handler>
+ static void impl(any_completion_handler_impl_base* impl)
+ {
+ static_cast<any_completion_handler_impl<Handler>*>(impl)->destroy();
+ }
+
+private:
+ type destroy_fn_;
+};
+
+class any_completion_handler_executor_fn
+{
+public:
+ using type = any_completion_executor(*)(
+ any_completion_handler_impl_base*, const any_completion_executor&);
+
+ constexpr any_completion_handler_executor_fn(type fn)
+ : executor_fn_(fn)
+ {
+ }
+
+ any_completion_executor executor(any_completion_handler_impl_base* impl,
+ const any_completion_executor& candidate) const
+ {
+ return executor_fn_(impl, candidate);
+ }
+
+ template <typename Handler>
+ static any_completion_executor impl(any_completion_handler_impl_base* impl,
+ const any_completion_executor& candidate)
+ {
+ return static_cast<any_completion_handler_impl<Handler>*>(impl)->executor(
+ candidate);
+ }
+
+private:
+ type executor_fn_;
+};
+
+class any_completion_handler_immediate_executor_fn
+{
+public:
+ using type = any_completion_executor(*)(
+ any_completion_handler_impl_base*, const any_io_executor&);
+
+ constexpr any_completion_handler_immediate_executor_fn(type fn)
+ : immediate_executor_fn_(fn)
+ {
+ }
+
+ any_completion_executor immediate_executor(
+ any_completion_handler_impl_base* impl,
+ const any_io_executor& candidate) const
+ {
+ return immediate_executor_fn_(impl, candidate);
+ }
+
+ template <typename Handler>
+ static any_completion_executor impl(any_completion_handler_impl_base* impl,
+ const any_io_executor& candidate)
+ {
+ return static_cast<any_completion_handler_impl<Handler>*>(
+ impl)->immediate_executor(candidate);
+ }
+
+private:
+ type immediate_executor_fn_;
+};
+
+class any_completion_handler_allocate_fn
+{
+public:
+ using type = void*(*)(any_completion_handler_impl_base*,
+ std::size_t, std::size_t);
+
+ constexpr any_completion_handler_allocate_fn(type fn)
+ : allocate_fn_(fn)
+ {
+ }
+
+ void* allocate(any_completion_handler_impl_base* impl,
+ std::size_t size, std::size_t align) const
+ {
+ return allocate_fn_(impl, size, align);
+ }
+
+ template <typename Handler>
+ static void* impl(any_completion_handler_impl_base* impl,
+ std::size_t size, std::size_t align)
+ {
+ return static_cast<any_completion_handler_impl<Handler>*>(impl)->allocate(
+ size, align);
+ }
+
+private:
+ type allocate_fn_;
+};
+
+class any_completion_handler_deallocate_fn
+{
+public:
+ using type = void(*)(any_completion_handler_impl_base*,
+ void*, std::size_t, std::size_t);
+
+ constexpr any_completion_handler_deallocate_fn(type fn)
+ : deallocate_fn_(fn)
+ {
+ }
+
+ void deallocate(any_completion_handler_impl_base* impl,
+ void* p, std::size_t size, std::size_t align) const
+ {
+ deallocate_fn_(impl, p, size, align);
+ }
+
+ template <typename Handler>
+ static void impl(any_completion_handler_impl_base* impl,
+ void* p, std::size_t size, std::size_t align)
+ {
+ static_cast<any_completion_handler_impl<Handler>*>(impl)->deallocate(
+ p, size, align);
+ }
+
+private:
+ type deallocate_fn_;
+};
+
+template <typename... Signatures>
+class any_completion_handler_fn_table
+ : private any_completion_handler_destroy_fn,
+ private any_completion_handler_executor_fn,
+ private any_completion_handler_immediate_executor_fn,
+ private any_completion_handler_allocate_fn,
+ private any_completion_handler_deallocate_fn,
+ private any_completion_handler_call_fns<Signatures...>
+{
+public:
+ template <typename... CallFns>
+ constexpr any_completion_handler_fn_table(
+ any_completion_handler_destroy_fn::type destroy_fn,
+ any_completion_handler_executor_fn::type executor_fn,
+ any_completion_handler_immediate_executor_fn::type immediate_executor_fn,
+ any_completion_handler_allocate_fn::type allocate_fn,
+ any_completion_handler_deallocate_fn::type deallocate_fn,
+ CallFns... call_fns)
+ : any_completion_handler_destroy_fn(destroy_fn),
+ any_completion_handler_executor_fn(executor_fn),
+ any_completion_handler_immediate_executor_fn(immediate_executor_fn),
+ any_completion_handler_allocate_fn(allocate_fn),
+ any_completion_handler_deallocate_fn(deallocate_fn),
+ any_completion_handler_call_fns<Signatures...>(call_fns...)
+ {
+ }
+
+ using any_completion_handler_destroy_fn::destroy;
+ using any_completion_handler_executor_fn::executor;
+ using any_completion_handler_immediate_executor_fn::immediate_executor;
+ using any_completion_handler_allocate_fn::allocate;
+ using any_completion_handler_deallocate_fn::deallocate;
+ using any_completion_handler_call_fns<Signatures...>::call;
+};
+
+template <typename Handler, typename... Signatures>
+struct any_completion_handler_fn_table_instance
+{
+ static constexpr any_completion_handler_fn_table<Signatures...>
+ value = any_completion_handler_fn_table<Signatures...>(
+ &any_completion_handler_destroy_fn::impl<Handler>,
+ &any_completion_handler_executor_fn::impl<Handler>,
+ &any_completion_handler_immediate_executor_fn::impl<Handler>,
+ &any_completion_handler_allocate_fn::impl<Handler>,
+ &any_completion_handler_deallocate_fn::impl<Handler>,
+ &any_completion_handler_call_fn<Signatures>::template impl<Handler>...);
+};
+
+template <typename Handler, typename... Signatures>
+constexpr any_completion_handler_fn_table<Signatures...>
+any_completion_handler_fn_table_instance<Handler, Signatures...>::value;
+
+} // namespace detail
+
+template <typename... Signatures>
+class any_completion_handler;
+
+/// An allocator type that forwards memory allocation operations through an
+/// instance of @c any_completion_handler.
+template <typename T, typename... Signatures>
+class any_completion_handler_allocator
+{
+private:
+ template <typename...>
+ friend class any_completion_handler;
+
+ template <typename, typename...>
+ friend class any_completion_handler_allocator;
+
+ const detail::any_completion_handler_fn_table<Signatures...>* fn_table_;
+ detail::any_completion_handler_impl_base* impl_;
+
+ constexpr any_completion_handler_allocator(int,
+ const any_completion_handler<Signatures...>& h) noexcept
+ : fn_table_(h.fn_table_),
+ impl_(h.impl_)
+ {
+ }
+
+public:
+ /// The type of objects that may be allocated by the allocator.
+ typedef T value_type;
+
+ /// Rebinds an allocator to another value type.
+ template <typename U>
+ struct rebind
+ {
+ /// Specifies the type of the rebound allocator.
+ typedef any_completion_handler_allocator<U, Signatures...> other;
+ };
+
+ /// Construct from another @c any_completion_handler_allocator.
+ template <typename U>
+ constexpr any_completion_handler_allocator(
+ const any_completion_handler_allocator<U, Signatures...>& a)
+ noexcept
+ : fn_table_(a.fn_table_),
+ impl_(a.impl_)
+ {
+ }
+
+ /// Equality operator.
+ constexpr bool operator==(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ == other.fn_table_ && impl_ == other.impl_;
+ }
+
+ /// Inequality operator.
+ constexpr bool operator!=(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ != other.fn_table_ || impl_ != other.impl_;
+ }
+
+ /// Allocate space for @c n objects of the allocator's value type.
+ T* allocate(std::size_t n) const
+ {
+ if (fn_table_)
+ {
+ return static_cast<T*>(
+ fn_table_->allocate(
+ impl_, sizeof(T) * n, alignof(T)));
+ }
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ return nullptr;
+ }
+
+ /// Deallocate space for @c n objects of the allocator's value type.
+ void deallocate(T* p, std::size_t n) const
+ {
+ fn_table_->deallocate(impl_, p, sizeof(T) * n, alignof(T));
+ }
+};
+
+/// A protoco-allocator type that may be rebound to obtain an allocator that
+/// forwards memory allocation operations through an instance of
+/// @c any_completion_handler.
+template <typename... Signatures>
+class any_completion_handler_allocator<void, Signatures...>
+{
+private:
+ template <typename...>
+ friend class any_completion_handler;
+
+ template <typename, typename...>
+ friend class any_completion_handler_allocator;
+
+ const detail::any_completion_handler_fn_table<Signatures...>* fn_table_;
+ detail::any_completion_handler_impl_base* impl_;
+
+ constexpr any_completion_handler_allocator(int,
+ const any_completion_handler<Signatures...>& h) noexcept
+ : fn_table_(h.fn_table_),
+ impl_(h.impl_)
+ {
+ }
+
+public:
+ /// @c void as no objects can be allocated through a proto-allocator.
+ typedef void value_type;
+
+ /// Rebinds an allocator to another value type.
+ template <typename U>
+ struct rebind
+ {
+ /// Specifies the type of the rebound allocator.
+ typedef any_completion_handler_allocator<U, Signatures...> other;
+ };
+
+ /// Construct from another @c any_completion_handler_allocator.
+ template <typename U>
+ constexpr any_completion_handler_allocator(
+ const any_completion_handler_allocator<U, Signatures...>& a)
+ noexcept
+ : fn_table_(a.fn_table_),
+ impl_(a.impl_)
+ {
+ }
+
+ /// Equality operator.
+ constexpr bool operator==(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ == other.fn_table_ && impl_ == other.impl_;
+ }
+
+ /// Inequality operator.
+ constexpr bool operator!=(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ != other.fn_table_ || impl_ != other.impl_;
+ }
+};
+
+/// Polymorphic wrapper for completion handlers.
+/**
+ * The @c any_completion_handler class template is a polymorphic wrapper for
+ * completion handlers that propagates the associated executor, associated
+ * allocator, and associated cancellation slot through a type-erasing interface.
+ *
+ * When using @c any_completion_handler, specify one or more completion
+ * signatures as template parameters. These will dictate the arguments that may
+ * be passed to the handler through the polymorphic interface.
+ *
+ * Typical uses for @c any_completion_handler include:
+ *
+ * @li Separate compilation of asynchronous operation implementations.
+ *
+ * @li Enabling interoperability between asynchronous operations and virtual
+ * functions.
+ */
+template <typename... Signatures>
+class any_completion_handler
+{
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ template <typename, typename...>
+ friend class any_completion_handler_allocator;
+
+ template <typename, typename>
+ friend struct associated_executor;
+
+ template <typename, typename>
+ friend struct associated_immediate_executor;
+
+ const detail::any_completion_handler_fn_table<Signatures...>* fn_table_;
+ detail::any_completion_handler_impl_base* impl_;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+public:
+ /// The associated allocator type.
+ using allocator_type = any_completion_handler_allocator<void, Signatures...>;
+
+ /// The associated cancellation slot type.
+ using cancellation_slot_type = cancellation_slot;
+
+ /// Construct an @c any_completion_handler in an empty state, without a target
+ /// object.
+ constexpr any_completion_handler()
+ : fn_table_(nullptr),
+ impl_(nullptr)
+ {
+ }
+
+ /// Construct an @c any_completion_handler in an empty state, without a target
+ /// object.
+ constexpr any_completion_handler(nullptr_t)
+ : fn_table_(nullptr),
+ impl_(nullptr)
+ {
+ }
+
+ /// Construct an @c any_completion_handler to contain the specified target.
+ template <typename H, typename Handler = decay_t<H>>
+ any_completion_handler(H&& h,
+ constraint_t<
+ !is_same<decay_t<H>, any_completion_handler>::value
+ > = 0)
+ : fn_table_(
+ &detail::any_completion_handler_fn_table_instance<
+ Handler, Signatures...>::value),
+ impl_(detail::any_completion_handler_impl<Handler>::create(
+ (get_associated_cancellation_slot)(h), static_cast<H&&>(h)))
+ {
+ }
+
+ /// Move-construct an @c any_completion_handler from another.
+ /**
+ * After the operation, the moved-from object @c other has no target.
+ */
+ any_completion_handler(any_completion_handler&& other) noexcept
+ : fn_table_(other.fn_table_),
+ impl_(other.impl_)
+ {
+ other.fn_table_ = nullptr;
+ other.impl_ = nullptr;
+ }
+
+ /// Move-assign an @c any_completion_handler from another.
+ /**
+ * After the operation, the moved-from object @c other has no target.
+ */
+ any_completion_handler& operator=(
+ any_completion_handler&& other) noexcept
+ {
+ any_completion_handler(
+ static_cast<any_completion_handler&&>(other)).swap(*this);
+ return *this;
+ }
+
+ /// Assignment operator that sets the polymorphic wrapper to the empty state.
+ any_completion_handler& operator=(nullptr_t) noexcept
+ {
+ any_completion_handler().swap(*this);
+ return *this;
+ }
+
+ /// Destructor.
+ ~any_completion_handler()
+ {
+ if (impl_)
+ fn_table_->destroy(impl_);
+ }
+
+ /// Test if the polymorphic wrapper is empty.
+ constexpr explicit operator bool() const noexcept
+ {
+ return impl_ != nullptr;
+ }
+
+ /// Test if the polymorphic wrapper is non-empty.
+ constexpr bool operator!() const noexcept
+ {
+ return impl_ == nullptr;
+ }
+
+ /// Swap the content of an @c any_completion_handler with another.
+ void swap(any_completion_handler& other) noexcept
+ {
+ std::swap(fn_table_, other.fn_table_);
+ std::swap(impl_, other.impl_);
+ }
+
+ /// Get the associated allocator.
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_type(0, *this);
+ }
+
+ /// Get the associated cancellation slot.
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return impl_ ? impl_->get_cancellation_slot() : cancellation_slot_type();
+ }
+
+ /// Function call operator.
+ /**
+ * Invokes target completion handler with the supplied arguments.
+ *
+ * This function may only be called once, as the target handler is moved from.
+ * The polymorphic wrapper is left in an empty state.
+ *
+ * Throws @c std::bad_function_call if the polymorphic wrapper is empty.
+ */
+ template <typename... Args>
+ auto operator()(Args&&... args)
+ -> decltype(fn_table_->call(impl_, static_cast<Args&&>(args)...))
+ {
+ if (detail::any_completion_handler_impl_base* impl = impl_)
+ {
+ impl_ = nullptr;
+ return fn_table_->call(impl, static_cast<Args&&>(args)...);
+ }
+ std::bad_function_call ex;
+ asio::detail::throw_exception(ex);
+ }
+
+ /// Equality operator.
+ friend constexpr bool operator==(
+ const any_completion_handler& a, nullptr_t) noexcept
+ {
+ return a.impl_ == nullptr;
+ }
+
+ /// Equality operator.
+ friend constexpr bool operator==(
+ nullptr_t, const any_completion_handler& b) noexcept
+ {
+ return nullptr == b.impl_;
+ }
+
+ /// Inequality operator.
+ friend constexpr bool operator!=(
+ const any_completion_handler& a, nullptr_t) noexcept
+ {
+ return a.impl_ != nullptr;
+ }
+
+ /// Inequality operator.
+ friend constexpr bool operator!=(
+ nullptr_t, const any_completion_handler& b) noexcept
+ {
+ return nullptr != b.impl_;
+ }
+};
+
+template <typename... Signatures, typename Candidate>
+struct associated_executor<any_completion_handler<Signatures...>, Candidate>
+{
+ using type = any_completion_executor;
+
+ static type get(const any_completion_handler<Signatures...>& handler,
+ const Candidate& candidate = Candidate()) noexcept
+ {
+ any_completion_executor any_candidate(std::nothrow, candidate);
+ return handler.fn_table_
+ ? handler.fn_table_->executor(handler.impl_, any_candidate)
+ : any_candidate;
+ }
+};
+
+template <typename... Signatures, typename Candidate>
+struct associated_immediate_executor<
+ any_completion_handler<Signatures...>, Candidate>
+{
+ using type = any_completion_executor;
+
+ static type get(const any_completion_handler<Signatures...>& handler,
+ const Candidate& candidate = Candidate()) noexcept
+ {
+ any_io_executor any_candidate(std::nothrow, candidate);
+ return handler.fn_table_
+ ? handler.fn_table_->immediate_executor(handler.impl_, any_candidate)
+ : any_candidate;
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_ANY_COMPLETION_HANDLER_HPP
diff --git a/3rdparty/asio/include/asio/any_io_executor.hpp b/3rdparty/asio/include/asio/any_io_executor.hpp
new file mode 100644
index 00000000000..d35acf44ae3
--- /dev/null
+++ b/3rdparty/asio/include/asio/any_io_executor.hpp
@@ -0,0 +1,351 @@
+//
+// any_io_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_ANY_IO_EXECUTOR_HPP
+#define ASIO_ANY_IO_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/executor.hpp"
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/execution.hpp"
+# include "asio/execution_context.hpp"
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+typedef executor any_io_executor;
+
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+/// Polymorphic executor type for use with I/O objects.
+/**
+ * The @c any_io_executor type is a polymorphic executor that supports the set
+ * of properties required by I/O objects. It is defined as the
+ * execution::any_executor class template parameterised as follows:
+ * @code execution::any_executor<
+ * execution::context_as_t<execution_context&>,
+ * execution::blocking_t::never_t,
+ * execution::prefer_only<execution::blocking_t::possibly_t>,
+ * execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ * execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ * execution::prefer_only<execution::relationship_t::fork_t>,
+ * execution::prefer_only<execution::relationship_t::continuation_t>
+ * > @endcode
+ */
+class any_io_executor :
+#if defined(GENERATING_DOCUMENTATION)
+ public execution::any_executor<...>
+#else // defined(GENERATING_DOCUMENTATION)
+ public execution::any_executor<
+ execution::context_as_t<execution_context&>,
+ execution::blocking_t::never_t,
+ execution::prefer_only<execution::blocking_t::possibly_t>,
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ >
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+public:
+#if !defined(GENERATING_DOCUMENTATION)
+ typedef execution::any_executor<
+ execution::context_as_t<execution_context&>,
+ execution::blocking_t::never_t,
+ execution::prefer_only<execution::blocking_t::possibly_t>,
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ > base_type;
+
+ typedef void supportable_properties_type(
+ execution::context_as_t<execution_context&>,
+ execution::blocking_t::never_t,
+ execution::prefer_only<execution::blocking_t::possibly_t>,
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ );
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Default constructor.
+ ASIO_DECL any_io_executor() noexcept;
+
+ /// Construct in an empty state. Equivalent effects to default constructor.
+ ASIO_DECL any_io_executor(nullptr_t) noexcept;
+
+ /// Copy constructor.
+ ASIO_DECL any_io_executor(const any_io_executor& e) noexcept;
+
+ /// Move constructor.
+ ASIO_DECL any_io_executor(any_io_executor&& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_io_executor(execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_io_executor(OtherAnyExecutor e,
+ constraint_t<
+ conditional_t<
+ !is_same<OtherAnyExecutor, any_io_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::value
+ > = 0)
+ : base_type(static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_io_executor(std::nothrow_t,
+ execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_io_executor(std::nothrow_t, OtherAnyExecutor e,
+ constraint_t<
+ conditional_t<
+ !is_same<OtherAnyExecutor, any_io_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_io_executor(std::nothrow_t,
+ const any_io_executor& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_io_executor(std::nothrow_t, any_io_executor&& e) noexcept;
+
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_io_executor(Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_io_executor(Executor e,
+ constraint_t<
+ conditional_t<
+ !is_same<Executor, any_io_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::value
+ > = 0)
+ : base_type(static_cast<Executor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_io_executor(std::nothrow_t, Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_io_executor(std::nothrow_t, Executor e,
+ constraint_t<
+ conditional_t<
+ !is_same<Executor, any_io_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<Executor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator.
+ ASIO_DECL any_io_executor& operator=(
+ const any_io_executor& e) noexcept;
+
+ /// Move assignment operator.
+ ASIO_DECL any_io_executor& operator=(any_io_executor&& e) noexcept;
+
+ /// Assignment operator that sets the polymorphic wrapper to the empty state.
+ ASIO_DECL any_io_executor& operator=(nullptr_t);
+
+ /// Destructor.
+ ASIO_DECL ~any_io_executor();
+
+ /// Swap targets with another polymorphic wrapper.
+ ASIO_DECL void swap(any_io_executor& other) noexcept;
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require and asio::prefer customisation points.
+ *
+ * For example:
+ * @code any_io_executor ex = ...;
+ * auto ex2 = asio::require(ex, execution::blocking.possibly); @endcode
+ */
+ template <typename Property>
+ any_io_executor require(const Property& p,
+ constraint_t<
+ traits::require_member<const base_type&, const Property&>::is_valid
+ > = 0) const
+ {
+ return static_cast<const base_type&>(*this).require(p);
+ }
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::prefer customisation point.
+ *
+ * For example:
+ * @code any_io_executor ex = ...;
+ * auto ex2 = asio::prefer(ex, execution::blocking.possibly); @endcode
+ */
+ template <typename Property>
+ any_io_executor prefer(const Property& p,
+ constraint_t<
+ traits::prefer_member<const base_type&, const Property&>::is_valid
+ > = 0) const
+ {
+ return static_cast<const base_type&>(*this).prefer(p);
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::require(
+ const execution::blocking_t::never_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::blocking_t::possibly_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::tracked_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::untracked_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::fork_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::continuation_t&, int) const;
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<any_io_executor>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<any_io_executor, F>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Prop>
+struct query_member<any_io_executor, Prop> :
+ query_member<any_io_executor::base_type, Prop>
+{
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Prop>
+struct require_member<any_io_executor, Prop> :
+ require_member<any_io_executor::base_type, Prop>
+{
+ typedef any_io_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename Prop>
+struct prefer_member<any_io_executor, Prop> :
+ prefer_member<any_io_executor::base_type, Prop>
+{
+ typedef any_io_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY) \
+ && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/impl/any_io_executor.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+ // && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_ANY_IO_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/append.hpp b/3rdparty/asio/include/asio/append.hpp
new file mode 100644
index 00000000000..04608924280
--- /dev/null
+++ b/3rdparty/asio/include/asio/append.hpp
@@ -0,0 +1,65 @@
+//
+// append.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_APPEND_HPP
+#define ASIO_APPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values after the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+class append_t
+{
+public:
+ /// Constructor.
+ template <typename T, typename... V>
+ constexpr explicit append_t(T&& completion_token, V&&... values)
+ : token_(static_cast<T&&>(completion_token)),
+ values_(static_cast<V&&>(values)...)
+ {
+ }
+
+//private:
+ CompletionToken token_;
+ std::tuple<Values...> values_;
+};
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values after the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+ASIO_NODISCARD inline constexpr
+append_t<decay_t<CompletionToken>, decay_t<Values>...>
+append(CompletionToken&& completion_token, Values&&... values)
+{
+ return append_t<decay_t<CompletionToken>, decay_t<Values>...>(
+ static_cast<CompletionToken&&>(completion_token),
+ static_cast<Values&&>(values)...);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/append.hpp"
+
+#endif // ASIO_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/as_tuple.hpp b/3rdparty/asio/include/asio/as_tuple.hpp
new file mode 100644
index 00000000000..60008bda5c2
--- /dev/null
+++ b/3rdparty/asio/include/asio/as_tuple.hpp
@@ -0,0 +1,126 @@
+//
+// as_tuple.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_AS_TUPLE_HPP
+#define ASIO_AS_TUPLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// A @ref completion_token adapter used to specify that the completion handler
+/// arguments should be combined into a single tuple argument.
+/**
+ * The as_tuple_t class is used to indicate that any arguments to the
+ * completion handler should be combined and passed as a single tuple argument.
+ * The arguments are first moved into a @c std::tuple and that tuple is then
+ * passed to the completion handler.
+ */
+template <typename CompletionToken>
+class as_tuple_t
+{
+public:
+ /// Tag type used to prevent the "default" constructor from being used for
+ /// conversions.
+ struct default_constructor_tag {};
+
+ /// Default constructor.
+ /**
+ * This constructor is only valid if the underlying completion token is
+ * default constructible and move constructible. The underlying completion
+ * token is itself defaulted as an argument to allow it to capture a source
+ * location.
+ */
+ constexpr as_tuple_t(
+ default_constructor_tag = default_constructor_tag(),
+ CompletionToken token = CompletionToken())
+ : token_(static_cast<CompletionToken&&>(token))
+ {
+ }
+
+ /// Constructor.
+ template <typename T>
+ constexpr explicit as_tuple_t(
+ T&& completion_token)
+ : token_(static_cast<T&&>(completion_token))
+ {
+ }
+
+ /// Adapts an executor to add the @c as_tuple_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c as_tuple_t as the default completion token type.
+ typedef as_tuple_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c as_tuple_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c as_tuple_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+//private:
+ CompletionToken token_;
+};
+
+/// Adapt a @ref completion_token to specify that the completion handler
+/// arguments should be combined into a single tuple argument.
+template <typename CompletionToken>
+ASIO_NODISCARD inline
+constexpr as_tuple_t<decay_t<CompletionToken>>
+as_tuple(CompletionToken&& completion_token)
+{
+ return as_tuple_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token));
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/as_tuple.hpp"
+
+#endif // ASIO_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/associated_allocator.hpp b/3rdparty/asio/include/asio/associated_allocator.hpp
index 3834b862a5c..f21ea250efb 100644
--- a/3rdparty/asio/include/asio/associated_allocator.hpp
+++ b/3rdparty/asio/include/asio/associated_allocator.hpp
@@ -2,7 +2,7 @@
// associated_allocator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,42 +17,76 @@
#include "asio/detail/config.hpp"
#include <memory>
+#include "asio/associator.hpp"
+#include "asio/detail/functional.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+
+template <typename T, typename Allocator>
+struct associated_allocator;
+
namespace detail {
-template <typename>
-struct associated_allocator_check
+template <typename T, typename = void>
+struct has_allocator_type : false_type
+{
+};
+
+template <typename T>
+struct has_allocator_type<T, void_t<typename T::allocator_type>> : true_type
{
- typedef void type;
};
-template <typename T, typename E, typename = void>
+template <typename T, typename A, typename = void, typename = void>
struct associated_allocator_impl
{
- typedef E type;
+ typedef void asio_associated_allocator_is_unspecialised;
+
+ typedef A type;
+
+ static type get(const T&) noexcept
+ {
+ return type();
+ }
- static type get(const T&, const E& e) ASIO_NOEXCEPT
+ static const type& get(const T&, const A& a) noexcept
{
- return e;
+ return a;
}
};
-template <typename T, typename E>
-struct associated_allocator_impl<T, E,
- typename associated_allocator_check<typename T::allocator_type>::type>
+template <typename T, typename A>
+struct associated_allocator_impl<T, A, void_t<typename T::allocator_type>>
{
typedef typename T::allocator_type type;
- static type get(const T& t, const E&) ASIO_NOEXCEPT
+ static auto get(const T& t) noexcept
+ -> decltype(t.get_allocator())
+ {
+ return t.get_allocator();
+ }
+
+ static auto get(const T& t, const A&) noexcept
+ -> decltype(t.get_allocator())
{
return t.get_allocator();
}
};
+template <typename T, typename A>
+struct associated_allocator_impl<T, A,
+ enable_if_t<
+ !has_allocator_type<T>::value
+ >,
+ void_t<
+ typename associator<associated_allocator, T, A>::type
+ >> : associator<associated_allocator, T, A>
+{
+};
+
} // namespace detail
/// Traits type used to obtain the allocator associated with an object.
@@ -69,29 +103,32 @@ struct associated_allocator_impl<T, E,
* Allocator requirements.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,a) and with return type @c type.
+ * get(t,a) and with return type @c type or a (possibly const) reference to @c
+ * type.
*/
-template <typename T, typename Allocator = std::allocator<void> >
+template <typename T, typename Allocator = std::allocator<void>>
struct associated_allocator
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_allocator_impl<T, Allocator>
+#endif // !defined(GENERATING_DOCUMENTATION)
{
+#if defined(GENERATING_DOCUMENTATION)
/// If @c T has a nested type @c allocator_type, <tt>T::allocator_type</tt>.
/// Otherwise @c Allocator.
-#if defined(GENERATING_DOCUMENTATION)
typedef see_below type;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::associated_allocator_impl<T, Allocator>::type type;
-#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// If @c T has a nested type @c allocator_type, returns
+ /// <tt>t.get_allocator()</tt>. Otherwise returns @c type().
+ static decltype(auto) get(const T& t) noexcept;
/// If @c T has a nested type @c allocator_type, returns
/// <tt>t.get_allocator()</tt>. Otherwise returns @c a.
- static type get(const T& t,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
- {
- return detail::associated_allocator_impl<T, Allocator>::get(t, a);
- }
+ static decltype(auto) get(const T& t, const Allocator& a) noexcept;
+#endif // defined(GENERATING_DOCUMENTATION)
};
/// Helper function to obtain an object's associated allocator.
@@ -99,8 +136,8 @@ struct associated_allocator
* @returns <tt>associated_allocator<T>::get(t)</tt>
*/
template <typename T>
-inline typename associated_allocator<T>::type
-get_associated_allocator(const T& t) ASIO_NOEXCEPT
+ASIO_NODISCARD inline typename associated_allocator<T>::type
+get_associated_allocator(const T& t) noexcept
{
return associated_allocator<T>::get(t);
}
@@ -110,12 +147,66 @@ get_associated_allocator(const T& t) ASIO_NOEXCEPT
* @returns <tt>associated_allocator<T, Allocator>::get(t, a)</tt>
*/
template <typename T, typename Allocator>
-inline typename associated_allocator<T, Allocator>::type
-get_associated_allocator(const T& t, const Allocator& a) ASIO_NOEXCEPT
+ASIO_NODISCARD inline auto get_associated_allocator(
+ const T& t, const Allocator& a) noexcept
+ -> decltype(associated_allocator<T, Allocator>::get(t, a))
{
return associated_allocator<T, Allocator>::get(t, a);
}
+template <typename T, typename Allocator = std::allocator<void>>
+using associated_allocator_t
+ = typename associated_allocator<T, Allocator>::type;
+
+namespace detail {
+
+template <typename T, typename A, typename = void>
+struct associated_allocator_forwarding_base
+{
+};
+
+template <typename T, typename A>
+struct associated_allocator_forwarding_base<T, A,
+ enable_if_t<
+ is_same<
+ typename associated_allocator<T,
+ A>::asio_associated_allocator_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ typedef void asio_associated_allocator_is_unspecialised;
+};
+
+} // namespace detail
+
+/// Specialisation of associated_allocator for @c std::reference_wrapper.
+template <typename T, typename Allocator>
+struct associated_allocator<reference_wrapper<T>, Allocator>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_allocator_forwarding_base<T, Allocator>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+ /// Forwards @c type to the associator specialisation for the unwrapped type
+ /// @c T.
+ typedef typename associated_allocator<T, Allocator>::type type;
+
+ /// Forwards the request to get the allocator to the associator specialisation
+ /// for the unwrapped type @c T.
+ static type get(reference_wrapper<T> t) noexcept
+ {
+ return associated_allocator<T, Allocator>::get(t.get());
+ }
+
+ /// Forwards the request to get the allocator to the associator specialisation
+ /// for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const Allocator& a) noexcept
+ -> decltype(associated_allocator<T, Allocator>::get(t.get(), a))
+ {
+ return associated_allocator<T, Allocator>::get(t.get(), a);
+ }
+};
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/associated_cancellation_slot.hpp b/3rdparty/asio/include/asio/associated_cancellation_slot.hpp
new file mode 100644
index 00000000000..518bd881eaf
--- /dev/null
+++ b/3rdparty/asio/include/asio/associated_cancellation_slot.hpp
@@ -0,0 +1,221 @@
+//
+// associated_cancellation_slot.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_ASSOCIATED_CANCELLATION_SLOT_HPP
+#define ASIO_ASSOCIATED_CANCELLATION_SLOT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/detail/functional.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+template <typename T, typename CancellationSlot>
+struct associated_cancellation_slot;
+
+namespace detail {
+
+template <typename T, typename = void>
+struct has_cancellation_slot_type : false_type
+{
+};
+
+template <typename T>
+struct has_cancellation_slot_type<T, void_t<typename T::cancellation_slot_type>>
+ : true_type
+{
+};
+
+template <typename T, typename S, typename = void, typename = void>
+struct associated_cancellation_slot_impl
+{
+ typedef void asio_associated_cancellation_slot_is_unspecialised;
+
+ typedef S type;
+
+ static type get(const T&) noexcept
+ {
+ return type();
+ }
+
+ static const type& get(const T&, const S& s) noexcept
+ {
+ return s;
+ }
+};
+
+template <typename T, typename S>
+struct associated_cancellation_slot_impl<T, S,
+ void_t<typename T::cancellation_slot_type>>
+{
+ typedef typename T::cancellation_slot_type type;
+
+ static auto get(const T& t) noexcept
+ -> decltype(t.get_cancellation_slot())
+ {
+ return t.get_cancellation_slot();
+ }
+
+ static auto get(const T& t, const S&) noexcept
+ -> decltype(t.get_cancellation_slot())
+ {
+ return t.get_cancellation_slot();
+ }
+};
+
+template <typename T, typename S>
+struct associated_cancellation_slot_impl<T, S,
+ enable_if_t<
+ !has_cancellation_slot_type<T>::value
+ >,
+ void_t<
+ typename associator<associated_cancellation_slot, T, S>::type
+ >> : associator<associated_cancellation_slot, T, S>
+{
+};
+
+} // namespace detail
+
+/// Traits type used to obtain the cancellation_slot associated with an object.
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type. The template parameter @c
+ * CancellationSlot shall be a type meeting the CancellationSlot requirements.
+ *
+ * Specialisations shall meet the following requirements, where @c t is a const
+ * reference to an object of type @c T, and @c s is an object of type @c
+ * CancellationSlot.
+ *
+ * @li Provide a nested typedef @c type that identifies a type meeting the
+ * CancellationSlot requirements.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t,s) and with return type @c type or a (possibly const) reference to @c
+ * type.
+ */
+template <typename T, typename CancellationSlot = cancellation_slot>
+struct associated_cancellation_slot
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_cancellation_slot_impl<T, CancellationSlot>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// If @c T has a nested type @c cancellation_slot_type,
+ /// <tt>T::cancellation_slot_type</tt>. Otherwise
+ /// @c CancellationSlot.
+ typedef see_below type;
+
+ /// If @c T has a nested type @c cancellation_slot_type, returns
+ /// <tt>t.get_cancellation_slot()</tt>. Otherwise returns @c type().
+ static decltype(auto) get(const T& t) noexcept;
+
+ /// If @c T has a nested type @c cancellation_slot_type, returns
+ /// <tt>t.get_cancellation_slot()</tt>. Otherwise returns @c s.
+ static decltype(auto) get(const T& t,
+ const CancellationSlot& s) noexcept;
+#endif // defined(GENERATING_DOCUMENTATION)
+};
+
+/// Helper function to obtain an object's associated cancellation_slot.
+/**
+ * @returns <tt>associated_cancellation_slot<T>::get(t)</tt>
+ */
+template <typename T>
+ASIO_NODISCARD inline typename associated_cancellation_slot<T>::type
+get_associated_cancellation_slot(const T& t) noexcept
+{
+ return associated_cancellation_slot<T>::get(t);
+}
+
+/// Helper function to obtain an object's associated cancellation_slot.
+/**
+ * @returns <tt>associated_cancellation_slot<T,
+ * CancellationSlot>::get(t, st)</tt>
+ */
+template <typename T, typename CancellationSlot>
+ASIO_NODISCARD inline auto get_associated_cancellation_slot(
+ const T& t, const CancellationSlot& st) noexcept
+ -> decltype(associated_cancellation_slot<T, CancellationSlot>::get(t, st))
+{
+ return associated_cancellation_slot<T, CancellationSlot>::get(t, st);
+}
+
+template <typename T, typename CancellationSlot = cancellation_slot>
+using associated_cancellation_slot_t =
+ typename associated_cancellation_slot<T, CancellationSlot>::type;
+
+namespace detail {
+
+template <typename T, typename S, typename = void>
+struct associated_cancellation_slot_forwarding_base
+{
+};
+
+template <typename T, typename S>
+struct associated_cancellation_slot_forwarding_base<T, S,
+ enable_if_t<
+ is_same<
+ typename associated_cancellation_slot<T,
+ S>::asio_associated_cancellation_slot_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ typedef void asio_associated_cancellation_slot_is_unspecialised;
+};
+
+} // namespace detail
+
+/// Specialisation of associated_cancellation_slot for @c
+/// std::reference_wrapper.
+template <typename T, typename CancellationSlot>
+struct associated_cancellation_slot<reference_wrapper<T>, CancellationSlot>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_cancellation_slot_forwarding_base<T, CancellationSlot>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+ /// Forwards @c type to the associator specialisation for the unwrapped type
+ /// @c T.
+ typedef typename associated_cancellation_slot<T, CancellationSlot>::type type;
+
+ /// Forwards the request to get the cancellation slot to the associator
+ /// specialisation for the unwrapped type @c T.
+ static type get(reference_wrapper<T> t) noexcept
+ {
+ return associated_cancellation_slot<T, CancellationSlot>::get(t.get());
+ }
+
+ /// Forwards the request to get the cancellation slot to the associator
+ /// specialisation for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const CancellationSlot& s) noexcept
+ -> decltype(
+ associated_cancellation_slot<T, CancellationSlot>::get(t.get(), s))
+ {
+ return associated_cancellation_slot<T, CancellationSlot>::get(t.get(), s);
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_ASSOCIATED_CANCELLATION_SLOT_HPP
diff --git a/3rdparty/asio/include/asio/associated_executor.hpp b/3rdparty/asio/include/asio/associated_executor.hpp
index 74603c593f0..4ca7ba149e9 100644
--- a/3rdparty/asio/include/asio/associated_executor.hpp
+++ b/3rdparty/asio/include/asio/associated_executor.hpp
@@ -2,7 +2,7 @@
// associated_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,44 +16,80 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/detail/functional.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
#include "asio/is_executor.hpp"
#include "asio/system_executor.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+
+template <typename T, typename Executor>
+struct associated_executor;
+
namespace detail {
-template <typename>
-struct associated_executor_check
+template <typename T, typename = void>
+struct has_executor_type : false_type
{
- typedef void type;
};
-template <typename T, typename E, typename = void>
+template <typename T>
+struct has_executor_type<T, void_t<typename T::executor_type>>
+ : true_type
+{
+};
+
+template <typename T, typename E, typename = void, typename = void>
struct associated_executor_impl
{
+ typedef void asio_associated_executor_is_unspecialised;
+
typedef E type;
- static type get(const T&, const E& e) ASIO_NOEXCEPT
+ static type get(const T&) noexcept
+ {
+ return type();
+ }
+
+ static const type& get(const T&, const E& e) noexcept
{
return e;
}
};
template <typename T, typename E>
-struct associated_executor_impl<T, E,
- typename associated_executor_check<typename T::executor_type>::type>
+struct associated_executor_impl<T, E, void_t<typename T::executor_type>>
{
typedef typename T::executor_type type;
- static type get(const T& t, const E&) ASIO_NOEXCEPT
+ static auto get(const T& t) noexcept
+ -> decltype(t.get_executor())
+ {
+ return t.get_executor();
+ }
+
+ static auto get(const T& t, const E&) noexcept
+ -> decltype(t.get_executor())
{
return t.get_executor();
}
};
+template <typename T, typename E>
+struct associated_executor_impl<T, E,
+ enable_if_t<
+ !has_executor_type<T>::value
+ >,
+ void_t<
+ typename associator<associated_executor, T, E>::type
+ >> : associator<associated_executor, T, E>
+{
+};
+
} // namespace detail
/// Traits type used to obtain the executor associated with an object.
@@ -70,29 +106,32 @@ struct associated_executor_impl<T, E,
* Executor requirements.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,e) and with return type @c type.
+ * get(t,e) and with return type @c type or a (possibly const) reference to @c
+ * type.
*/
template <typename T, typename Executor = system_executor>
struct associated_executor
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_executor_impl<T, Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
{
+#if defined(GENERATING_DOCUMENTATION)
/// If @c T has a nested type @c executor_type, <tt>T::executor_type</tt>.
/// Otherwise @c Executor.
-#if defined(GENERATING_DOCUMENTATION)
typedef see_below type;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::associated_executor_impl<T, Executor>::type type;
-#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// If @c T has a nested type @c executor_type, returns
+ /// <tt>t.get_executor()</tt>. Otherwise returns @c type().
+ static decltype(auto) get(const T& t) noexcept;
/// If @c T has a nested type @c executor_type, returns
/// <tt>t.get_executor()</tt>. Otherwise returns @c ex.
- static type get(const T& t,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
- {
- return detail::associated_executor_impl<T, Executor>::get(t, ex);
- }
+ static decltype(auto) get(const T& t, const Executor& ex) noexcept;
+#endif // defined(GENERATING_DOCUMENTATION)
};
/// Helper function to obtain an object's associated executor.
@@ -100,8 +139,8 @@ struct associated_executor
* @returns <tt>associated_executor<T>::get(t)</tt>
*/
template <typename T>
-inline typename associated_executor<T>::type
-get_associated_executor(const T& t) ASIO_NOEXCEPT
+ASIO_NODISCARD inline typename associated_executor<T>::type
+get_associated_executor(const T& t) noexcept
{
return associated_executor<T>::get(t);
}
@@ -111,10 +150,12 @@ get_associated_executor(const T& t) ASIO_NOEXCEPT
* @returns <tt>associated_executor<T, Executor>::get(t, ex)</tt>
*/
template <typename T, typename Executor>
-inline typename associated_executor<T, Executor>::type
-get_associated_executor(const T& t, const Executor& ex,
- typename enable_if<is_executor<
- Executor>::value>::type* = 0) ASIO_NOEXCEPT
+ASIO_NODISCARD inline auto get_associated_executor(
+ const T& t, const Executor& ex,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0) noexcept
+ -> decltype(associated_executor<T, Executor>::get(t, ex))
{
return associated_executor<T, Executor>::get(t, ex);
}
@@ -125,16 +166,68 @@ get_associated_executor(const T& t, const Executor& ex,
* ExecutionContext::executor_type>::get(t, ctx.get_executor())</tt>
*/
template <typename T, typename ExecutionContext>
-inline typename associated_executor<T,
- typename ExecutionContext::executor_type>::type
+ASIO_NODISCARD inline typename associated_executor<T,
+ typename ExecutionContext::executor_type>::type
get_associated_executor(const T& t, ExecutionContext& ctx,
- typename enable_if<is_convertible<ExecutionContext&,
- execution_context&>::value>::type* = 0) ASIO_NOEXCEPT
+ constraint_t<is_convertible<ExecutionContext&,
+ execution_context&>::value> = 0) noexcept
{
return associated_executor<T,
typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
}
+template <typename T, typename Executor = system_executor>
+using associated_executor_t = typename associated_executor<T, Executor>::type;
+
+namespace detail {
+
+template <typename T, typename E, typename = void>
+struct associated_executor_forwarding_base
+{
+};
+
+template <typename T, typename E>
+struct associated_executor_forwarding_base<T, E,
+ enable_if_t<
+ is_same<
+ typename associated_executor<T,
+ E>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ typedef void asio_associated_executor_is_unspecialised;
+};
+
+} // namespace detail
+
+/// Specialisation of associated_executor for @c std::reference_wrapper.
+template <typename T, typename Executor>
+struct associated_executor<reference_wrapper<T>, Executor>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_executor_forwarding_base<T, Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+ /// Forwards @c type to the associator specialisation for the unwrapped type
+ /// @c T.
+ typedef typename associated_executor<T, Executor>::type type;
+
+ /// Forwards the request to get the executor to the associator specialisation
+ /// for the unwrapped type @c T.
+ static type get(reference_wrapper<T> t) noexcept
+ {
+ return associated_executor<T, Executor>::get(t.get());
+ }
+
+ /// Forwards the request to get the executor to the associator specialisation
+ /// for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const Executor& ex) noexcept
+ -> decltype(associated_executor<T, Executor>::get(t.get(), ex))
+ {
+ return associated_executor<T, Executor>::get(t.get(), ex);
+ }
+};
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/associated_immediate_executor.hpp b/3rdparty/asio/include/asio/associated_immediate_executor.hpp
new file mode 100644
index 00000000000..aa6e0fcfee7
--- /dev/null
+++ b/3rdparty/asio/include/asio/associated_immediate_executor.hpp
@@ -0,0 +1,280 @@
+//
+// associated_immediate_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_ASSOCIATED_IMMEDIATE_EXECUTOR_HPP
+#define ASIO_ASSOCIATED_IMMEDIATE_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/detail/functional.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+template <typename T, typename Executor>
+struct associated_immediate_executor;
+
+namespace detail {
+
+template <typename T, typename = void>
+struct has_immediate_executor_type : false_type
+{
+};
+
+template <typename T>
+struct has_immediate_executor_type<T,
+ void_t<typename T::immediate_executor_type>>
+ : true_type
+{
+};
+
+template <typename E, typename = void, typename = void>
+struct default_immediate_executor
+{
+ typedef require_result_t<E, execution::blocking_t::never_t> type;
+
+ static type get(const E& e) noexcept
+ {
+ return asio::require(e, execution::blocking.never);
+ }
+};
+
+template <typename E>
+struct default_immediate_executor<E,
+ enable_if_t<
+ !execution::is_executor<E>::value
+ >,
+ enable_if_t<
+ is_executor<E>::value
+ >>
+{
+ class type : public E
+ {
+ public:
+ template <typename Executor1>
+ explicit type(const Executor1& e,
+ constraint_t<
+ conditional_t<
+ !is_same<Executor1, type>::value,
+ is_convertible<Executor1, E>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : E(e)
+ {
+ }
+
+ type(const type& other) noexcept
+ : E(static_cast<const E&>(other))
+ {
+ }
+
+ type(type&& other) noexcept
+ : E(static_cast<E&&>(other))
+ {
+ }
+
+ template <typename Function, typename Allocator>
+ void dispatch(Function&& f, const Allocator& a) const
+ {
+ this->post(static_cast<Function&&>(f), a);
+ }
+
+ friend bool operator==(const type& a, const type& b) noexcept
+ {
+ return static_cast<const E&>(a) == static_cast<const E&>(b);
+ }
+
+ friend bool operator!=(const type& a, const type& b) noexcept
+ {
+ return static_cast<const E&>(a) != static_cast<const E&>(b);
+ }
+ };
+
+ static type get(const E& e) noexcept
+ {
+ return type(e);
+ }
+};
+
+template <typename T, typename E, typename = void, typename = void>
+struct associated_immediate_executor_impl
+{
+ typedef void asio_associated_immediate_executor_is_unspecialised;
+
+ typedef typename default_immediate_executor<E>::type type;
+
+ static auto get(const T&, const E& e) noexcept
+ -> decltype(default_immediate_executor<E>::get(e))
+ {
+ return default_immediate_executor<E>::get(e);
+ }
+};
+
+template <typename T, typename E>
+struct associated_immediate_executor_impl<T, E,
+ void_t<typename T::immediate_executor_type>>
+{
+ typedef typename T::immediate_executor_type type;
+
+ static auto get(const T& t, const E&) noexcept
+ -> decltype(t.get_immediate_executor())
+ {
+ return t.get_immediate_executor();
+ }
+};
+
+template <typename T, typename E>
+struct associated_immediate_executor_impl<T, E,
+ enable_if_t<
+ !has_immediate_executor_type<T>::value
+ >,
+ void_t<
+ typename associator<associated_immediate_executor, T, E>::type
+ >> : associator<associated_immediate_executor, T, E>
+{
+};
+
+} // namespace detail
+
+/// Traits type used to obtain the immediate executor associated with an object.
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type. The template parameter @c
+ * Executor shall be a type meeting the Executor requirements.
+ *
+ * Specialisations shall meet the following requirements, where @c t is a const
+ * reference to an object of type @c T, and @c e is an object of type @c
+ * Executor.
+ *
+ * @li Provide a nested typedef @c type that identifies a type meeting the
+ * Executor requirements.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t,e) and with return type @c type or a (possibly const) reference to @c
+ * type.
+ */
+template <typename T, typename Executor>
+struct associated_immediate_executor
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_immediate_executor_impl<T, Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// If @c T has a nested type @c immediate_executor_type,
+ // <tt>T::immediate_executor_type</tt>. Otherwise @c Executor.
+ typedef see_below type;
+
+ /// If @c T has a nested type @c immediate_executor_type, returns
+ /// <tt>t.get_immediate_executor()</tt>. Otherwise returns
+ /// <tt>asio::require(ex, asio::execution::blocking.never)</tt>.
+ static decltype(auto) get(const T& t, const Executor& ex) noexcept;
+#endif // defined(GENERATING_DOCUMENTATION)
+};
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_immediate_executor<T, Executor>::get(t, ex)</tt>
+ */
+template <typename T, typename Executor>
+ASIO_NODISCARD inline auto get_associated_immediate_executor(
+ const T& t, const Executor& ex,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0) noexcept
+ -> decltype(associated_immediate_executor<T, Executor>::get(t, ex))
+{
+ return associated_immediate_executor<T, Executor>::get(t, ex);
+}
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_immediate_executor<T, typename
+ * ExecutionContext::executor_type>::get(t, ctx.get_executor())</tt>
+ */
+template <typename T, typename ExecutionContext>
+ASIO_NODISCARD inline typename associated_immediate_executor<T,
+ typename ExecutionContext::executor_type>::type
+get_associated_immediate_executor(const T& t, ExecutionContext& ctx,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0) noexcept
+{
+ return associated_immediate_executor<T,
+ typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
+}
+
+template <typename T, typename Executor>
+using associated_immediate_executor_t =
+ typename associated_immediate_executor<T, Executor>::type;
+
+namespace detail {
+
+template <typename T, typename E, typename = void>
+struct associated_immediate_executor_forwarding_base
+{
+};
+
+template <typename T, typename E>
+struct associated_immediate_executor_forwarding_base<T, E,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<T,
+ E>::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ typedef void asio_associated_immediate_executor_is_unspecialised;
+};
+
+} // namespace detail
+
+/// Specialisation of associated_immediate_executor for
+/// @c std::reference_wrapper.
+template <typename T, typename Executor>
+struct associated_immediate_executor<reference_wrapper<T>, Executor>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_immediate_executor_forwarding_base<T, Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+ /// Forwards @c type to the associator specialisation for the unwrapped type
+ /// @c T.
+ typedef typename associated_immediate_executor<T, Executor>::type type;
+
+ /// Forwards the request to get the executor to the associator specialisation
+ /// for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const Executor& ex) noexcept
+ -> decltype(associated_immediate_executor<T, Executor>::get(t.get(), ex))
+ {
+ return associated_immediate_executor<T, Executor>::get(t.get(), ex);
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_ASSOCIATED_IMMEDIATE_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/associator.hpp b/3rdparty/asio/include/asio/associator.hpp
new file mode 100644
index 00000000000..7952fcc51ba
--- /dev/null
+++ b/3rdparty/asio/include/asio/associator.hpp
@@ -0,0 +1,35 @@
+//
+// associator.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_ASSOCIATOR_HPP
+#define ASIO_ASSOCIATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Used to generically specialise associators for a type.
+template <template <typename, typename> class Associator,
+ typename T, typename DefaultCandidate>
+struct associator
+{
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_ASSOCIATOR_HPP
diff --git a/3rdparty/asio/include/asio/async_result.hpp b/3rdparty/asio/include/asio/async_result.hpp
index cd866bbd0e6..cdae9ede687 100644
--- a/3rdparty/asio/include/asio/async_result.hpp
+++ b/3rdparty/asio/include/asio/async_result.hpp
@@ -2,7 +2,7 @@
// async_result.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,12 +17,321 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/handler_type.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+#if defined(ASIO_HAS_CONCEPTS)
+
+namespace detail {
+
+template <typename T>
+struct is_completion_signature : false_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_completion_signature<R(Args...)> : true_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_completion_signature<R(Args...) &> : true_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_completion_signature<R(Args...) &&> : true_type
+{
+};
+
+# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct is_completion_signature<R(Args...) noexcept> : true_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_completion_signature<R(Args...) & noexcept> : true_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_completion_signature<R(Args...) && noexcept> : true_type
+{
+};
+
+# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename... T>
+struct are_completion_signatures : false_type
+{
+};
+
+template <typename T0>
+struct are_completion_signatures<T0>
+ : is_completion_signature<T0>
+{
+};
+
+template <typename T0, typename... TN>
+struct are_completion_signatures<T0, TN...>
+ : integral_constant<bool, (
+ is_completion_signature<T0>::value
+ && are_completion_signatures<TN...>::value)>
+{
+};
+
+template <typename T, typename... Args>
+ASIO_CONCEPT callable_with = requires(T&& t, Args&&... args)
+{
+ static_cast<T&&>(t)(static_cast<Args&&>(args)...);
+};
+
+template <typename T, typename... Signatures>
+struct is_completion_handler_for : false_type
+{
+};
+
+template <typename T, typename R, typename... Args>
+struct is_completion_handler_for<T, R(Args...)>
+ : integral_constant<bool, (callable_with<decay_t<T>, Args...>)>
+{
+};
+
+template <typename T, typename R, typename... Args>
+struct is_completion_handler_for<T, R(Args...) &>
+ : integral_constant<bool, (callable_with<decay_t<T>&, Args...>)>
+{
+};
+
+template <typename T, typename R, typename... Args>
+struct is_completion_handler_for<T, R(Args...) &&>
+ : integral_constant<bool, (callable_with<decay_t<T>&&, Args...>)>
+{
+};
+
+# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename T, typename R, typename... Args>
+struct is_completion_handler_for<T, R(Args...) noexcept>
+ : integral_constant<bool, (callable_with<decay_t<T>, Args...>)>
+{
+};
+
+template <typename T, typename R, typename... Args>
+struct is_completion_handler_for<T, R(Args...) & noexcept>
+ : integral_constant<bool, (callable_with<decay_t<T>&, Args...>)>
+{
+};
+
+template <typename T, typename R, typename... Args>
+struct is_completion_handler_for<T, R(Args...) && noexcept>
+ : integral_constant<bool, (callable_with<decay_t<T>&&, Args...>)>
+{
+};
+
+# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename T, typename Signature0, typename... SignatureN>
+struct is_completion_handler_for<T, Signature0, SignatureN...>
+ : integral_constant<bool, (
+ is_completion_handler_for<T, Signature0>::value
+ && is_completion_handler_for<T, SignatureN...>::value)>
+{
+};
+
+} // namespace detail
+
+template <typename T>
+ASIO_CONCEPT completion_signature =
+ detail::is_completion_signature<T>::value;
+
+#define ASIO_COMPLETION_SIGNATURE \
+ ::asio::completion_signature
+
+template <typename T, typename... Signatures>
+ASIO_CONCEPT completion_handler_for =
+ detail::are_completion_signatures<Signatures...>::value
+ && detail::is_completion_handler_for<T, Signatures...>::value;
+
+#define ASIO_COMPLETION_HANDLER_FOR(sig) \
+ ::asio::completion_handler_for<sig>
+#define ASIO_COMPLETION_HANDLER_FOR2(sig0, sig1) \
+ ::asio::completion_handler_for<sig0, sig1>
+#define ASIO_COMPLETION_HANDLER_FOR3(sig0, sig1, sig2) \
+ ::asio::completion_handler_for<sig0, sig1, sig2>
+
+#else // defined(ASIO_HAS_CONCEPTS)
+
+#define ASIO_COMPLETION_SIGNATURE typename
+#define ASIO_COMPLETION_HANDLER_FOR(sig) typename
+#define ASIO_COMPLETION_HANDLER_FOR2(sig0, sig1) typename
+#define ASIO_COMPLETION_HANDLER_FOR3(sig0, sig1, sig2) typename
+
+#endif // defined(ASIO_HAS_CONCEPTS)
+
+namespace detail {
+
+template <typename T>
+struct is_lvalue_completion_signature : false_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_lvalue_completion_signature<R(Args...) &> : true_type
+{
+};
+
+# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct is_lvalue_completion_signature<R(Args...) & noexcept> : true_type
+{
+};
+
+# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename... Signatures>
+struct are_any_lvalue_completion_signatures : false_type
+{
+};
+
+template <typename Sig0>
+struct are_any_lvalue_completion_signatures<Sig0>
+ : is_lvalue_completion_signature<Sig0>
+{
+};
+
+template <typename Sig0, typename... SigN>
+struct are_any_lvalue_completion_signatures<Sig0, SigN...>
+ : integral_constant<bool, (
+ is_lvalue_completion_signature<Sig0>::value
+ || are_any_lvalue_completion_signatures<SigN...>::value)>
+{
+};
+
+template <typename T>
+struct is_rvalue_completion_signature : false_type
+{
+};
+
+template <typename R, typename... Args>
+struct is_rvalue_completion_signature<R(Args...) &&> : true_type
+{
+};
+
+# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct is_rvalue_completion_signature<R(Args...) && noexcept> : true_type
+{
+};
+
+# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename... Signatures>
+struct are_any_rvalue_completion_signatures : false_type
+{
+};
+
+template <typename Sig0>
+struct are_any_rvalue_completion_signatures<Sig0>
+ : is_rvalue_completion_signature<Sig0>
+{
+};
+
+template <typename Sig0, typename... SigN>
+struct are_any_rvalue_completion_signatures<Sig0, SigN...>
+ : integral_constant<bool, (
+ is_rvalue_completion_signature<Sig0>::value
+ || are_any_rvalue_completion_signatures<SigN...>::value)>
+{
+};
+
+template <typename T>
+struct simple_completion_signature;
+
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...)>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) &>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) &&>
+{
+ typedef R type(Args...);
+};
+
+# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) noexcept>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) & noexcept>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) && noexcept>
+{
+ typedef R type(Args...);
+};
+
+# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
+class completion_handler_async_result
+{
+public:
+ typedef CompletionToken completion_handler_type;
+ typedef void return_type;
+
+ explicit completion_handler_async_result(completion_handler_type&)
+ {
+ }
+
+ return_type get()
+ {
+ }
+
+ template <typename Initiation,
+ ASIO_COMPLETION_HANDLER_FOR(Signatures...) RawCompletionToken,
+ typename... Args>
+ static return_type initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation)(
+ static_cast<RawCompletionToken&&>(token),
+ static_cast<Args&&>(args)...);
+ }
+
+private:
+ completion_handler_async_result(
+ const completion_handler_async_result&) = delete;
+ completion_handler_async_result& operator=(
+ const completion_handler_async_result&) = delete;
+};
+
+} // namespace detail
+
+#if defined(GENERATING_DOCUMENTATION)
+
/// An interface for customising the behaviour of an initiating function.
/**
* The async_result traits class is used for determining:
@@ -41,30 +350,16 @@ namespace asio {
* The primary template assumes that the CompletionToken is the completion
* handler.
*/
-#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-template <typename CompletionToken, typename Signature>
-#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-template <typename CompletionToken, typename Signature = void>
-#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
class async_result
{
public:
-#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
/// The concrete completion handler type for the specific signature.
typedef CompletionToken completion_handler_type;
/// The return type of the initiating function.
typedef void return_type;
-#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // For backward compatibility, determine the concrete completion handler type
- // by using the legacy handler_type trait.
- typedef typename handler_type<CompletionToken, Signature>::type
- completion_handler_type;
-
- // For backward compatibility, determine the initiating function return type
- // using the legacy single-parameter version of async_result.
- typedef typename async_result<completion_handler_type>::type return_type;
-#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
/// Construct an async result from a given handler.
/**
@@ -72,150 +367,576 @@ public:
* to initialise some state associated with the completion handler, which is
* then returned from the initiating function.
*/
- explicit async_result(completion_handler_type& h)
-#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // No data members to initialise.
-#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- : legacy_result_(h)
-#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- {
- (void)h;
- }
+ explicit async_result(completion_handler_type& h);
/// Obtain the value to be returned from the initiating function.
- return_type get()
- {
-#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // Nothing to do.
-#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- return legacy_result_.get();
-#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- }
+ return_type get();
-private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
+ /// Initiate the asynchronous operation that will produce the result, and
+ /// obtain the value to be returned from the initiating function.
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static return_type initiate(
+ Initiation&& initiation,
+ RawCompletionToken&& token,
+ Args&&... args);
-#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- // No data members.
-#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- async_result<completion_handler_type> legacy_result_;
-#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
-#if !defined(ASIO_NO_DEPRECATED)
+#else // defined(GENERATING_DOCUMENTATION)
-/// (Deprecated: Use two-parameter version of async_result.) An interface for
-/// customising the behaviour of an initiating function.
-/**
- * This template may be specialised for user-defined handler types.
- */
-template <typename Handler>
-class async_result<Handler>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
+class async_result :
+ public conditional_t<
+ detail::are_any_lvalue_completion_signatures<Signatures...>::value
+ || !detail::are_any_rvalue_completion_signatures<Signatures...>::value,
+ detail::completion_handler_async_result<CompletionToken, Signatures...>,
+ async_result<CompletionToken,
+ typename detail::simple_completion_signature<Signatures>::type...>
+ >
{
public:
- /// The return type of the initiating function.
- typedef void type;
+ typedef conditional_t<
+ detail::are_any_lvalue_completion_signatures<Signatures...>::value
+ || !detail::are_any_rvalue_completion_signatures<Signatures...>::value,
+ detail::completion_handler_async_result<CompletionToken, Signatures...>,
+ async_result<CompletionToken,
+ typename detail::simple_completion_signature<Signatures>::type...>
+ > base_type;
- /// Construct an async result from a given handler.
- /**
- * When using a specalised async_result, the constructor has an opportunity
- * to initialise some state associated with the handler, which is then
- * returned from the initiating function.
- */
- explicit async_result(Handler&)
- {
- }
+ using base_type::base_type;
- /// Obtain the value to be returned from the initiating function.
- type get()
- {
- }
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
-#endif // !defined(ASIO_NO_DEPRECATED)
+template <ASIO_COMPLETION_SIGNATURE... Signatures>
+class async_result<void, Signatures...>
+{
+ // Empty.
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
/// Helper template to deduce the handler type from a CompletionToken, capture
/// a local copy of the handler, and then create an async_result for the
/// handler.
-template <typename CompletionToken, typename Signature>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
struct async_completion
{
/// The real handler type to be used for the asynchronous operation.
typedef typename asio::async_result<
- typename decay<CompletionToken>::type,
- Signature>::completion_handler_type completion_handler_type;
+ decay_t<CompletionToken>, Signatures...>::completion_handler_type
+ completion_handler_type;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Constructor.
/**
* The constructor creates the concrete completion handler and makes the link
* between the handler and the asynchronous result.
*/
explicit async_completion(CompletionToken& token)
- : completion_handler(static_cast<typename conditional<
+ : completion_handler(static_cast<conditional_t<
is_same<CompletionToken, completion_handler_type>::value,
- completion_handler_type&, CompletionToken&&>::type>(token)),
- result(completion_handler)
- {
- }
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- explicit async_completion(typename decay<CompletionToken>::type& token)
- : completion_handler(token),
- result(completion_handler)
- {
- }
-
- explicit async_completion(const typename decay<CompletionToken>::type& token)
- : completion_handler(token),
+ completion_handler_type&, CompletionToken&&>>(token)),
result(completion_handler)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// A copy of, or reference to, a real handler object.
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- typename conditional<
+ conditional_t<
is_same<CompletionToken, completion_handler_type>::value,
- completion_handler_type&, completion_handler_type>::type completion_handler;
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- completion_handler_type completion_handler;
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ completion_handler_type&, completion_handler_type> completion_handler;
/// The result of the asynchronous operation's initiating function.
- async_result<typename decay<CompletionToken>::type, Signature> result;
+ async_result<decay_t<CompletionToken>, Signatures...> result;
};
namespace detail {
-template <typename CompletionToken, typename Signature>
-struct async_result_helper
- : async_result<typename decay<CompletionToken>::type, Signature>
+struct async_result_memfns_base
{
+ void initiate();
};
-} // namespace detail
-} // namespace asio
+template <typename T>
+struct async_result_memfns_derived
+ : T, async_result_memfns_base
+{
+};
-#include "asio/detail/pop_options.hpp"
+template <typename T, T>
+struct async_result_memfns_check
+{
+};
+
+template <typename>
+char (&async_result_initiate_memfn_helper(...))[2];
+
+template <typename T>
+char async_result_initiate_memfn_helper(
+ async_result_memfns_check<
+ void (async_result_memfns_base::*)(),
+ &async_result_memfns_derived<T>::initiate>*);
+
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
+struct async_result_has_initiate_memfn
+ : integral_constant<bool, sizeof(async_result_initiate_memfn_helper<
+ async_result<decay_t<CompletionToken>, Signatures...>
+ >(0)) != 1>
+{
+};
+
+} // namespace detail
#if defined(GENERATING_DOCUMENTATION)
# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
void_or_deduced
-#elif defined(_MSC_VER) && (_MSC_VER < 1500)
-# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
- typename ::asio::detail::async_result_helper< \
- ct, sig>::return_type
-#define ASIO_HANDLER_TYPE(ct, sig) \
- typename ::asio::detail::async_result_helper< \
- ct, sig>::completion_handler_type
+# define ASIO_INITFN_RESULT_TYPE2(ct, sig0, sig1) \
+ void_or_deduced
+# define ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2) \
+ void_or_deduced
#else
# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
typename ::asio::async_result< \
typename ::asio::decay<ct>::type, sig>::return_type
+# define ASIO_INITFN_RESULT_TYPE2(ct, sig0, sig1) \
+ typename ::asio::async_result< \
+ typename ::asio::decay<ct>::type, sig0, sig1>::return_type
+# define ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2) \
+ typename ::asio::async_result< \
+ typename ::asio::decay<ct>::type, sig0, sig1, sig2>::return_type
#define ASIO_HANDLER_TYPE(ct, sig) \
typename ::asio::async_result< \
typename ::asio::decay<ct>::type, sig>::completion_handler_type
+#define ASIO_HANDLER_TYPE2(ct, sig0, sig1) \
+ typename ::asio::async_result< \
+ typename ::asio::decay<ct>::type, \
+ sig0, sig1>::completion_handler_type
+#define ASIO_HANDLER_TYPE3(ct, sig0, sig1, sig2) \
+ typename ::asio::async_result< \
+ typename ::asio::decay<ct>::type, \
+ sig0, sig1, sig2>::completion_handler_type
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+# define ASIO_INITFN_AUTO_RESULT_TYPE(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE3(ct, sig0, sig1, sig2) \
+ auto
+#elif defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+# define ASIO_INITFN_AUTO_RESULT_TYPE(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE3(ct, sig0, sig1, sig2) \
+ auto
+#else
+# define ASIO_INITFN_AUTO_RESULT_TYPE(ct, sig) \
+ ASIO_INITFN_RESULT_TYPE(ct, sig)
+# define ASIO_INITFN_AUTO_RESULT_TYPE2(ct, sig0, sig1) \
+ ASIO_INITFN_RESULT_TYPE2(ct, sig0, sig1)
+# define ASIO_INITFN_AUTO_RESULT_TYPE3(ct, sig0, sig1, sig2) \
+ ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2)
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr)
+#elif defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr)
+#else
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr) -> decltype expr
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+# define ASIO_INITFN_DEDUCED_RESULT_TYPE(ct, sig, expr) \
+ void_or_deduced
+# define ASIO_INITFN_DEDUCED_RESULT_TYPE2(ct, sig0, sig1, expr) \
+ void_or_deduced
+# define ASIO_INITFN_DEDUCED_RESULT_TYPE3(ct, sig0, sig1, sig2, expr) \
+ void_or_deduced
+#else
+# define ASIO_INITFN_DEDUCED_RESULT_TYPE(ct, sig, expr) \
+ decltype expr
+# define ASIO_INITFN_DEDUCED_RESULT_TYPE2(ct, sig0, sig1, expr) \
+ decltype expr
+# define ASIO_INITFN_DEDUCED_RESULT_TYPE3(ct, sig0, sig1, sig2, expr) \
+ decltype expr
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken,
+ completion_signature... Signatures,
+ typename Initiation, typename... Args>
+void_or_deduced async_initiate(
+ Initiation&& initiation,
+ type_identity_t<CompletionToken>& token,
+ Args&&... args);
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures,
+ typename Initiation, typename... Args>
+inline auto async_initiate(Initiation&& initiation,
+ type_identity_t<CompletionToken>& token, Args&&... args)
+ -> constraint_t<
+ detail::async_result_has_initiate_memfn<
+ CompletionToken, Signatures...>::value,
+ decltype(
+ async_result<decay_t<CompletionToken>, Signatures...>::initiate(
+ static_cast<Initiation&&>(initiation),
+ static_cast<CompletionToken&&>(token),
+ static_cast<Args&&>(args)...))>
+{
+ return async_result<decay_t<CompletionToken>, Signatures...>::initiate(
+ static_cast<Initiation&&>(initiation),
+ static_cast<CompletionToken&&>(token),
+ static_cast<Args&&>(args)...);
+}
+
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures,
+ typename Initiation, typename... Args>
+inline constraint_t<
+ !detail::async_result_has_initiate_memfn<
+ CompletionToken, Signatures...>::value,
+ typename async_result<decay_t<CompletionToken>, Signatures...>::return_type>
+async_initiate(Initiation&& initiation,
+ type_identity_t<CompletionToken>& token, Args&&... args)
+{
+ async_completion<CompletionToken, Signatures...> completion(token);
+
+ static_cast<Initiation&&>(initiation)(
+ static_cast<
+ typename async_result<decay_t<CompletionToken>,
+ Signatures...>::completion_handler_type&&>(
+ completion.completion_handler),
+ static_cast<Args&&>(args)...);
+
+ return completion.result.get();
+}
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#if defined(ASIO_HAS_CONCEPTS)
+
+namespace detail {
+
+template <typename... Signatures>
+struct initiation_archetype
+{
+ template <completion_handler_for<Signatures...> CompletionHandler>
+ void operator()(CompletionHandler&&) const
+ {
+ }
+};
+
+} // namespace detail
+
+template <typename T, typename... Signatures>
+ASIO_CONCEPT completion_token_for =
+ detail::are_completion_signatures<Signatures...>::value
+ &&
+ requires(T&& t)
+ {
+ async_initiate<T, Signatures...>(
+ detail::initiation_archetype<Signatures...>{}, t);
+ };
+
+#define ASIO_COMPLETION_TOKEN_FOR(sig) \
+ ::asio::completion_token_for<sig>
+#define ASIO_COMPLETION_TOKEN_FOR2(sig0, sig1) \
+ ::asio::completion_token_for<sig0, sig1>
+#define ASIO_COMPLETION_TOKEN_FOR3(sig0, sig1, sig2) \
+ ::asio::completion_token_for<sig0, sig1, sig2>
+
+#else // defined(ASIO_HAS_CONCEPTS)
+
+#define ASIO_COMPLETION_TOKEN_FOR(sig) typename
+#define ASIO_COMPLETION_TOKEN_FOR2(sig0, sig1) typename
+#define ASIO_COMPLETION_TOKEN_FOR3(sig0, sig1, sig2) typename
+
+#endif // defined(ASIO_HAS_CONCEPTS)
+
+namespace detail {
+
+struct async_operation_probe {};
+struct async_operation_probe_result {};
+
+template <typename Call, typename = void>
+struct is_async_operation_call : false_type
+{
+};
+
+template <typename Call>
+struct is_async_operation_call<Call,
+ void_t<
+ enable_if_t<
+ is_same<
+ result_of_t<Call>,
+ async_operation_probe_result
+ >::value
+ >
+ >
+ > : true_type
+{
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename... Signatures>
+class async_result<detail::async_operation_probe, Signatures...>
+{
+public:
+ typedef detail::async_operation_probe_result return_type;
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&&,
+ detail::async_operation_probe, InitArgs&&...)
+ {
+ return return_type();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// The is_async_operation trait detects whether a type @c T and arguments
+/// @c Args... may be used to initiate an asynchronous operation.
+/**
+ * Class template @c is_async_operation is a trait is derived from @c true_type
+ * if the expression <tt>T(Args..., token)</tt> initiates an asynchronous
+ * operation, where @c token is an unspecified completion token type. Otherwise,
+ * @c is_async_operation is derived from @c false_type.
+ */
+template <typename T, typename... Args>
+struct is_async_operation : integral_constant<bool, automatically_determined>
+{
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename... Args>
+struct is_async_operation :
+ detail::is_async_operation_call<
+ T(Args..., detail::async_operation_probe)>
+{
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#if defined(ASIO_HAS_CONCEPTS)
+
+template <typename T, typename... Args>
+ASIO_CONCEPT async_operation = is_async_operation<T, Args...>::value;
+
+#define ASIO_ASYNC_OPERATION(t) \
+ ::asio::async_operation<t>
+#define ASIO_ASYNC_OPERATION1(t, a0) \
+ ::asio::async_operation<t, a0>
+#define ASIO_ASYNC_OPERATION2(t, a0, a1) \
+ ::asio::async_operation<t, a0, a1>
+#define ASIO_ASYNC_OPERATION3(t, a0, a1, a2) \
+ ::asio::async_operation<t, a0, a1, a2>
+
+#else // defined(ASIO_HAS_CONCEPTS)
+
+#define ASIO_ASYNC_OPERATION(t) typename
+#define ASIO_ASYNC_OPERATION1(t, a0) typename
+#define ASIO_ASYNC_OPERATION2(t, a0, a1) typename
+#define ASIO_ASYNC_OPERATION3(t, a0, a1, a2) typename
+
+#endif // defined(ASIO_HAS_CONCEPTS)
+
+namespace detail {
+
+struct completion_signature_probe {};
+
+template <typename... T>
+struct completion_signature_probe_result
+{
+ template <template <typename...> class Op>
+ struct apply
+ {
+ typedef Op<T...> type;
+ };
+};
+
+template <typename T>
+struct completion_signature_probe_result<T>
+{
+ typedef T type;
+
+ template <template <typename...> class Op>
+ struct apply
+ {
+ typedef Op<T> type;
+ };
+};
+
+template <>
+struct completion_signature_probe_result<void>
+{
+ template <template <typename...> class Op>
+ struct apply
+ {
+ typedef Op<> type;
+ };
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename... Signatures>
+class async_result<detail::completion_signature_probe, Signatures...>
+{
+public:
+ typedef detail::completion_signature_probe_result<Signatures...> return_type;
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&&,
+ detail::completion_signature_probe, InitArgs&&...)
+ {
+ return return_type();
+ }
+};
+
+template <typename Signature>
+class async_result<detail::completion_signature_probe, Signature>
+{
+public:
+ typedef detail::completion_signature_probe_result<Signature> return_type;
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&&,
+ detail::completion_signature_probe, InitArgs&&...)
+ {
+ return return_type();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// The completion_signature_of trait determines the completion signature
+/// of an asynchronous operation.
+/**
+ * Class template @c completion_signature_of is a trait with a member type
+ * alias @c type that denotes the completion signature of the asynchronous
+ * operation initiated by the expression <tt>T(Args..., token)</tt> operation,
+ * where @c token is an unspecified completion token type. If the asynchronous
+ * operation does not have exactly one completion signature, the instantion of
+ * the trait is well-formed but the member type alias @c type is omitted. If
+ * the expression <tt>T(Args..., token)</tt> is not an asynchronous operation
+ * then use of the trait is ill-formed.
+ */
+template <typename T, typename... Args>
+struct completion_signature_of
+{
+ typedef automatically_determined type;
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename... Args>
+struct completion_signature_of :
+ result_of_t<T(Args..., detail::completion_signature_probe)>
+{
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename... Args>
+using completion_signature_of_t =
+ typename completion_signature_of<T, Args...>::type;
+
+namespace detail {
+
+template <typename T, typename = void>
+struct default_completion_token_impl
+{
+ typedef void type;
+};
+
+template <typename T>
+struct default_completion_token_impl<T,
+ void_t<typename T::default_completion_token_type>
+ >
+{
+ typedef typename T::default_completion_token_type type;
+};
+
+} // namespace detail
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// Traits type used to determine the default completion token type associated
+/// with a type (such as an executor).
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type.
+ *
+ * Specialisations of this trait may provide a nested typedef @c type, which is
+ * a default-constructible completion token type.
+ */
+template <typename T>
+struct default_completion_token
+{
+ /// If @c T has a nested type @c default_completion_token_type,
+ /// <tt>T::default_completion_token_type</tt>. Otherwise the typedef @c type
+ /// is not defined.
+ typedef see_below type;
+};
+#else
+template <typename T>
+struct default_completion_token
+ : detail::default_completion_token_impl<T>
+{
+};
#endif
+template <typename T>
+using default_completion_token_t = typename default_completion_token<T>::type;
+
+#define ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(e) \
+ = typename ::asio::default_completion_token<e>::type
+#define ASIO_DEFAULT_COMPLETION_TOKEN(e) \
+ = typename ::asio::default_completion_token<e>::type()
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
#endif // ASIO_ASYNC_RESULT_HPP
diff --git a/3rdparty/asio/include/asio/awaitable.hpp b/3rdparty/asio/include/asio/awaitable.hpp
new file mode 100644
index 00000000000..7e4ee7a2f22
--- /dev/null
+++ b/3rdparty/asio/include/asio/awaitable.hpp
@@ -0,0 +1,142 @@
+//
+// awaitable.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_AWAITABLE_HPP
+#define ASIO_AWAITABLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+# include <coroutine>
+#else // defined(ASIO_HAS_STD_COROUTINE)
+# include <experimental/coroutine>
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+#include <utility>
+#include "asio/any_io_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+using std::coroutine_handle;
+using std::suspend_always;
+#else // defined(ASIO_HAS_STD_COROUTINE)
+using std::experimental::coroutine_handle;
+using std::experimental::suspend_always;
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+template <typename> class awaitable_thread;
+template <typename, typename> class awaitable_frame;
+
+} // namespace detail
+
+/// The return type of a coroutine or asynchronous operation.
+template <typename T, typename Executor = any_io_executor>
+class ASIO_NODISCARD awaitable
+{
+public:
+ /// The type of the awaited value.
+ typedef T value_type;
+
+ /// The executor type that will be used for the coroutine.
+ typedef Executor executor_type;
+
+ /// Default constructor.
+ constexpr awaitable() noexcept
+ : frame_(nullptr)
+ {
+ }
+
+ /// Move constructor.
+ awaitable(awaitable&& other) noexcept
+ : frame_(std::exchange(other.frame_, nullptr))
+ {
+ }
+
+ /// Destructor
+ ~awaitable()
+ {
+ if (frame_)
+ frame_->destroy();
+ }
+
+ /// Move assignment.
+ awaitable& operator=(awaitable&& other) noexcept
+ {
+ if (this != &other)
+ frame_ = std::exchange(other.frame_, nullptr);
+ return *this;
+ }
+
+ /// Checks if the awaitable refers to a future result.
+ bool valid() const noexcept
+ {
+ return !!frame_;
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+ // Support for co_await keyword.
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ // Support for co_await keyword.
+ template <class U>
+ void await_suspend(
+ detail::coroutine_handle<detail::awaitable_frame<U, Executor>> h)
+ {
+ frame_->push_frame(&h.promise());
+ }
+
+ // Support for co_await keyword.
+ T await_resume()
+ {
+ return awaitable(static_cast<awaitable&&>(*this)).frame_->get();
+ }
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+private:
+ template <typename> friend class detail::awaitable_thread;
+ template <typename, typename> friend class detail::awaitable_frame;
+
+ // Not copy constructible or copy assignable.
+ awaitable(const awaitable&) = delete;
+ awaitable& operator=(const awaitable&) = delete;
+
+ // Construct the awaitable from a coroutine's frame object.
+ explicit awaitable(detail::awaitable_frame<T, Executor>* a)
+ : frame_(a)
+ {
+ }
+
+ detail::awaitable_frame<T, Executor>* frame_;
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/awaitable.hpp"
+
+#endif // defined(ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_AWAITABLE_HPP
diff --git a/3rdparty/asio/include/asio/basic_datagram_socket.hpp b/3rdparty/asio/include/asio/basic_datagram_socket.hpp
index a451013fba4..3d72a38475a 100644
--- a/3rdparty/asio/include/asio/basic_datagram_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_datagram_socket.hpp
@@ -2,7 +2,7 @@
// basic_datagram_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,18 +19,24 @@
#include <cstddef>
#include "asio/basic_socket.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/datagram_socket_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
+#if !defined(ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+#define ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
+class basic_datagram_socket;
+
+#endif // !defined(ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+
/// Provides datagram-oriented socket functionality.
/**
* The basic_datagram_socket class template provides asynchronous and blocking
@@ -39,19 +45,42 @@ namespace asio {
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
+ *
+ * Synchronous @c send, @c send_to, @c receive, @c receive_from, @c connect,
+ * and @c shutdown operations are thread safe with respect to each other, if
+ * the underlying operating system calls are also thread safe. This means that
+ * it is permitted to perform concurrent calls to these synchronous operations
+ * on a single socket object. Other synchronous operations, such as @c open or
+ * @c close, are not thread safe.
*/
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= datagram_socket_service<Protocol>)>
+template <typename Protocol, typename Executor>
class basic_datagram_socket
- : public basic_socket<Protocol ASIO_SVC_TARG>
+ : public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_send_to;
+ class initiate_async_receive;
+ class initiate_async_receive_from;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_datagram_socket<Protocol, Executor1> other;
+ };
+
/// The native representation of a socket.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
#else
- typedef typename basic_socket<
- Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
#endif
/// The protocol type.
@@ -65,12 +94,29 @@ public:
* This constructor creates a datagram socket without opening it. The open()
* function must be called before data can be sent or received on the socket.
*
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ */
+ explicit basic_datagram_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_datagram_socket without opening it.
+ /**
+ * This constructor creates a datagram socket without opening it. The open()
+ * function must be called before data can be sent or received on the socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
*/
- explicit basic_datagram_socket(asio::io_context& io_context)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
+ template <typename ExecutionContext>
+ explicit basic_datagram_socket(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context)
{
}
@@ -78,17 +124,38 @@ public:
/**
* This constructor creates and opens a datagram socket.
*
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_datagram_socket(asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
+ basic_datagram_socket(const executor_type& ex, const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_datagram_socket.
+ /**
+ * This constructor creates and opens a datagram socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_datagram_socket(ExecutionContext& context,
+ const protocol_type& protocol,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -99,18 +166,42 @@ public:
* to the specified endpoint on the local machine. The protocol used is the
* protocol associated with the given endpoint.
*
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param endpoint An endpoint on the local machine to which the datagram
* socket will be bound.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_datagram_socket(asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
+ basic_datagram_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_datagram_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a datagram socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the datagram
+ * socket will be bound.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_datagram_socket(ExecutionContext& context,
+ const endpoint_type& endpoint,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -119,9 +210,8 @@ public:
* This constructor creates a datagram socket object to hold an existing
* native socket.
*
- * @param io_context The io_context object that the datagram socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
@@ -129,14 +219,37 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_datagram_socket(asio::io_context& io_context,
+ basic_datagram_socket(const executor_type& ex,
const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_datagram_socket on an existing native socket.
+ /**
+ * This constructor creates a datagram socket object to hold an existing
+ * native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_datagram_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_datagram_socket from another.
/**
* This constructor moves a datagram socket from one object to another.
@@ -145,10 +258,11 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_datagram_socket(io_context&) constructor.
+ * constructed using the @c basic_datagram_socket(const executor_type&)
+ * constructor.
*/
- basic_datagram_socket(basic_datagram_socket&& other)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ basic_datagram_socket(basic_datagram_socket&& other) noexcept
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -161,11 +275,12 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_datagram_socket(io_context&) constructor.
+ * constructed using the @c basic_datagram_socket(const executor_type&)
+ * constructor.
*/
basic_datagram_socket& operator=(basic_datagram_socket&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
@@ -178,13 +293,16 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_datagram_socket(io_context&) constructor.
+ * constructed using the @c basic_datagram_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- basic_datagram_socket(
- basic_datagram_socket<Protocol1 ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ template <typename Protocol1, typename Executor1>
+ basic_datagram_socket(basic_datagram_socket<Protocol1, Executor1>&& other,
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -198,17 +316,19 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_datagram_socket(io_context&) constructor.
+ * constructed using the @c basic_datagram_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_datagram_socket>::type& operator=(
- basic_datagram_socket<Protocol1 ASIO_SVC_TARG1>&& other)
+ template <typename Protocol1, typename Executor1>
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_datagram_socket&
+ > operator=(basic_datagram_socket<Protocol1, Executor1>&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -245,8 +365,8 @@ public:
std::size_t send(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -273,8 +393,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -300,31 +420,37 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send on a connected socket.
/**
* This function is used to asynchronously send data on the datagram socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected datagram
@@ -338,82 +464,92 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Start an asynchronous send on a connected socket.
/**
* This function is used to asynchronously send data on the datagram socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected datagram
* socket.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token, buffers, flags);
}
/// Send a datagram to the specified endpoint.
@@ -446,8 +582,8 @@ public:
const endpoint_type& destination)
{
asio::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, 0, ec);
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, 0, ec);
asio::detail::throw_error(ec, "send_to");
return s;
}
@@ -473,8 +609,8 @@ public:
const endpoint_type& destination, socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, flags, ec);
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, flags, ec);
asio::detail::throw_error(ec, "send_to");
return s;
}
@@ -500,34 +636,40 @@ public:
const endpoint_type& destination, socket_base::message_flags flags,
asio::error_code& ec)
{
- return this->get_service().send_to(this->get_implementation(),
+ return this->impl_.get_service().send_to(this->impl_.get_implementation(),
buffers, destination, flags, ec);
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send a datagram to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To send a single data buffer use the @ref buffer function as follows:
@@ -540,86 +682,94 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token, buffers,
+ destination, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, 0,
- ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send_to(this), token, buffers,
+ destination, socket_base::message_flags(0));
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send a datagram to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token,
+ buffers, destination, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send_to(this), token,
+ buffers, destination, flags);
}
/// Receive some data on a connected socket.
@@ -650,8 +800,8 @@ public:
std::size_t receive(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -679,8 +829,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -707,31 +857,37 @@ public:
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the datagram
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
@@ -746,82 +902,92 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the datagram
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
* datagram socket.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token, buffers, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token, buffers, flags);
}
/// Receive a datagram with the endpoint of the sender.
@@ -855,8 +1021,8 @@ public:
endpoint_type& sender_endpoint)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0, ec);
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, 0, ec);
asio::detail::throw_error(ec, "receive_from");
return s;
}
@@ -882,8 +1048,8 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags, ec);
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
asio::detail::throw_error(ec, "receive_from");
return s;
}
@@ -909,36 +1075,42 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags,
asio::error_code& ec)
{
- return this->get_service().receive_from(this->get_implementation(),
- buffers, sender_endpoint, flags, ec);
+ return this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
}
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive a datagram. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive a datagram. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the datagram. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To receive into a single data buffer use the @ref buffer function as
@@ -948,89 +1120,239 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token, buffers,
+ &sender_endpoint, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive_from(this), token, buffers,
+ &sender_endpoint, socket_base::message_flags(0));
}
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive a datagram. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive a datagram. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the datagram. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token,
+ buffers, &sender_endpoint, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive_from(this), token,
+ buffers, &sender_endpoint, flags);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_datagram_socket(const basic_datagram_socket&) = delete;
+ basic_datagram_socket& operator=(
+ const basic_datagram_socket&) = delete;
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_datagram_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_send(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_datagram_socket* self_;
+ };
+
+ class initiate_async_send_to
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send_to(basic_datagram_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers, const endpoint_type& destination,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_send_to(
+ self_->impl_.get_implementation(), buffers, destination,
+ flags, handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_datagram_socket* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_datagram_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_receive(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_datagram_socket* self_;
+ };
+
+ class initiate_async_receive_from
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive_from(basic_datagram_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers, endpoint_type* sender_endpoint,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_receive_from(
+ self_->impl_.get_implementation(), buffers, *sender_endpoint,
+ flags, handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_datagram_socket* self_;
+ };
};
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_deadline_timer.hpp b/3rdparty/asio/include/asio/basic_deadline_timer.hpp
index 085c8ee1fe8..9343591bf8b 100644
--- a/3rdparty/asio/include/asio/basic_deadline_timer.hpp
+++ b/3rdparty/asio/include/asio/basic_deadline_timer.hpp
@@ -2,7 +2,7 @@
// basic_deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,19 +21,16 @@
|| defined(GENERATING_DOCUMENTATION)
#include <cstddef>
-#include "asio/basic_io_object.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/detail/deadline_timer_service.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
#include "asio/time_traits.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/deadline_timer_service.hpp"
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/detail/deadline_timer_service.hpp"
-# define ASIO_SVC_T detail::deadline_timer_service<TimeTraits>
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -57,7 +54,7 @@ namespace asio {
* Performing a blocking wait:
* @code
* // Construct a timer without setting an expiry time.
- * asio::deadline_timer timer(io_context);
+ * asio::deadline_timer timer(my_context);
*
* // Set an expiry time relative to now.
* timer.expires_from_now(boost::posix_time::seconds(5));
@@ -80,7 +77,7 @@ namespace asio {
* ...
*
* // Construct a timer with an absolute expiry time.
- * asio::deadline_timer timer(io_context,
+ * asio::deadline_timer timer(my_context,
* boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
*
* // Start an asynchronous wait.
@@ -127,14 +124,24 @@ namespace asio {
* it contains the value asio::error::operation_aborted.
*/
template <typename Time,
- typename TimeTraits = asio::time_traits<Time>
- ASIO_SVC_TPARAM_DEF2(= deadline_timer_service<Time, TimeTraits>)>
+ typename TimeTraits = asio::time_traits<Time>,
+ typename Executor = any_io_executor>
class basic_deadline_timer
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
+ 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;
@@ -151,11 +158,30 @@ public:
* expires_at() or expires_from_now() functions must be called to set an
* expiry time before the timer can be waited on.
*
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
+ * @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_(0, 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.
*/
- explicit basic_deadline_timer(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ template <typename ExecutionContext>
+ explicit basic_deadline_timer(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
}
@@ -163,18 +189,40 @@ public:
/**
* This constructor creates a timer and sets the expiry time.
*
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
+ * @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(asio::io_context& io_context,
- const time_type& expiry_time)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_deadline_timer(const executor_type& ex, const time_type& expiry_time)
+ : impl_(0, ex)
{
asio::error_code ec;
- this->get_service().expires_at(this->get_implementation(), expiry_time, ec);
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
+ 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,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_at");
}
@@ -182,23 +230,47 @@ public:
/**
* This constructor creates a timer and sets the expiry time.
*
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
+ * @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(asio::io_context& io_context,
+ basic_deadline_timer(const executor_type& ex,
const duration_type& expiry_time)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ : impl_(0, ex)
{
asio::error_code ec;
- this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
+ impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
+ 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,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_from_now");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_deadline_timer from another.
/**
* This constructor moves a timer from one object to another.
@@ -207,10 +279,11 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_deadline_timer(io_context&) constructor.
+ * constructed using the @c basic_deadline_timer(const executor_type&)
+ * constructor.
*/
basic_deadline_timer(basic_deadline_timer&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
+ : impl_(std::move(other.impl_))
{
}
@@ -223,14 +296,14 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_deadline_timer(io_context&) constructor.
+ * constructed using the @c basic_deadline_timer(const executor_type&)
+ * constructor.
*/
basic_deadline_timer& operator=(basic_deadline_timer&& other)
{
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+ impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the timer.
/**
@@ -241,45 +314,11 @@ public:
{
}
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
- return basic_io_object<ASIO_SVC_T>::get_executor();
+ return impl_.get_executor();
}
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
/// Cancel any asynchronous operations that are waiting on the timer.
/**
@@ -306,7 +345,7 @@ public:
std::size_t cancel()
{
asio::error_code ec;
- std::size_t s = this->get_service().cancel(this->get_implementation(), ec);
+ std::size_t s = impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
return s;
}
@@ -335,7 +374,7 @@ public:
*/
std::size_t cancel(asio::error_code& ec)
{
- return this->get_service().cancel(this->get_implementation(), ec);
+ return impl_.get_service().cancel(impl_.get_implementation(), ec);
}
/// Cancels one asynchronous operation that is waiting on the timer.
@@ -365,8 +404,8 @@ public:
std::size_t cancel_one()
{
asio::error_code ec;
- std::size_t s = this->get_service().cancel_one(
- this->get_implementation(), ec);
+ std::size_t s = impl_.get_service().cancel_one(
+ impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel_one");
return s;
}
@@ -397,7 +436,7 @@ public:
*/
std::size_t cancel_one(asio::error_code& ec)
{
- return this->get_service().cancel_one(this->get_implementation(), ec);
+ return impl_.get_service().cancel_one(impl_.get_implementation(), ec);
}
/// Get the timer's expiry time as an absolute time.
@@ -407,7 +446,7 @@ public:
*/
time_type expires_at() const
{
- return this->get_service().expires_at(this->get_implementation());
+ return impl_.get_service().expires_at(impl_.get_implementation());
}
/// Set the timer's expiry time as an absolute time.
@@ -435,8 +474,8 @@ public:
std::size_t expires_at(const time_type& expiry_time)
{
asio::error_code ec;
- std::size_t s = this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
+ std::size_t s = impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_at");
return s;
}
@@ -466,8 +505,8 @@ public:
std::size_t expires_at(const time_type& expiry_time,
asio::error_code& ec)
{
- return this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
+ return impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
}
/// Get the timer's expiry time relative to now.
@@ -477,7 +516,7 @@ public:
*/
duration_type expires_from_now() const
{
- return this->get_service().expires_from_now(this->get_implementation());
+ return impl_.get_service().expires_from_now(impl_.get_implementation());
}
/// Set the timer's expiry time relative to now.
@@ -505,8 +544,8 @@ public:
std::size_t expires_from_now(const duration_type& expiry_time)
{
asio::error_code ec;
- std::size_t s = this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
+ std::size_t s = impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_from_now");
return s;
}
@@ -536,8 +575,8 @@ public:
std::size_t expires_from_now(const duration_type& expiry_time,
asio::error_code& ec)
{
- return this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
+ return impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
}
/// Perform a blocking wait on the timer.
@@ -550,7 +589,7 @@ public:
void wait()
{
asio::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
+ impl_.get_service().wait(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "wait");
}
@@ -563,65 +602,108 @@ public:
*/
void wait(asio::error_code& ec)
{
- this->get_service().wait(this->get_implementation(), 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.
+ * timer. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
+ * For each call to async_wait(), the completion handler will be called
+ * exactly once. The completion 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 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:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the timer expires. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(ASIO_MOVE_ARG(WaitHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_deadline_timer(const basic_deadline_timer&) = delete;
+ basic_deadline_timer& operator=(
+ const basic_deadline_timer&) = delete;
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_deadline_timer* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WaitHandler>
+ void operator()(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.
+ 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
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/basic_file.hpp b/3rdparty/asio/include/asio/basic_file.hpp
new file mode 100644
index 00000000000..dbdb6d843d0
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_file.hpp
@@ -0,0 +1,824 @@
+//
+// basic_file.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BASIC_FILE_HPP
+#define ASIO_BASIC_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/post.hpp"
+#include "asio/file_base.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_file_service.hpp"
+#elif defined(ASIO_HAS_IO_URING)
+# include "asio/detail/io_uring_file_service.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(ASIO_BASIC_FILE_FWD_DECL)
+#define ASIO_BASIC_FILE_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Executor = any_io_executor>
+class basic_file;
+
+#endif // !defined(ASIO_BASIC_FILE_FWD_DECL)
+
+/// Provides file functionality.
+/**
+ * The basic_file class template provides functionality that is common to both
+ * stream-oriented and random-access files.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor>
+class basic_file
+ : public file_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the file type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The file type when rebound to the specified executor.
+ typedef basic_file<Executor1> other;
+ };
+
+ /// The native representation of a file.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_file_service::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IO_URING)
+ typedef detail::io_uring_file_service::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file without opening it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ */
+ explicit basic_file(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ */
+ template <typename ExecutionContext>
+ explicit basic_file(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct and open a basic_file.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ explicit basic_file(const executor_type& ex,
+ const char* path, file_base::flags open_flags)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ template <typename ExecutionContext>
+ explicit basic_file(ExecutionContext& context,
+ const char* path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_file.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ explicit basic_file(const executor_type& ex,
+ const std::string& path, file_base::flags open_flags)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ template <typename ExecutionContext>
+ explicit basic_file(ExecutionContext& context,
+ const std::string& path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_file on an existing native file handle.
+ /**
+ * This constructor initialises a file object to hold an existing native file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param native_file A native file handle.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_file(const executor_type& ex, const native_handle_type& native_file)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_file on an existing native file.
+ /**
+ * This constructor initialises a file object to hold an existing native file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param native_file A native file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_file(ExecutionContext& context, const native_handle_type& native_file,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct a basic_file from another.
+ /**
+ * This constructor moves a file from one object to another.
+ *
+ * @param other The other basic_file 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_file(const executor_type&) constructor.
+ */
+ basic_file(basic_file&& other) noexcept
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_file from another.
+ /**
+ * This assignment operator moves a file from one object to another.
+ *
+ * @param other The other basic_file 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_file(const executor_type&) constructor.
+ */
+ basic_file& operator=(basic_file&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All files have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_file;
+
+ /// Move-construct a basic_file from a file of another executor type.
+ /**
+ * This constructor moves a file from one object to another.
+ *
+ * @param other The other basic_file 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_file(const executor_type&) constructor.
+ */
+ template <typename Executor1>
+ basic_file(basic_file<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_file from a file of another executor type.
+ /**
+ * This assignment operator moves a file from one object to another.
+ *
+ * @param other The other basic_file 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_file(const executor_type&) constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_file&
+ > operator=(basic_file<Executor1>&& other)
+ {
+ basic_file tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * file.open("/path/to/my/file", asio::stream_file::read_only);
+ * @endcode
+ */
+ void open(const char* path, file_base::flags open_flags)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * asio::error_code ec;
+ * file.open("/path/to/my/file", asio::stream_file::read_only, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ ASIO_SYNC_OP_VOID open(const char* path,
+ file_base::flags open_flags, asio::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * file.open("/path/to/my/file", asio::stream_file::read_only);
+ * @endcode
+ */
+ void open(const std::string& path, file_base::flags open_flags)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * asio::error_code ec;
+ * file.open("/path/to/my/file", asio::stream_file::read_only, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ ASIO_SYNC_OP_VOID open(const std::string& path,
+ file_base::flags open_flags, asio::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Assign an existing native file to the file.
+ /*
+ * This function opens the file to hold an existing native file.
+ *
+ * @param native_file A native file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_file)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native file to the file.
+ /*
+ * This function opens the file to hold an existing native file.
+ *
+ * @param native_file A native file.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_file,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the file is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the file.
+ /**
+ * This function is used to close the file. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the file.
+ /**
+ * This function is used to close the file. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * ...
+ * asio::error_code ec;
+ * file.close(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ * Ownership of the native file is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ * Ownership of the native file is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native file representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * file. This is intended to allow access to native file functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note Calls to cancel() will always fail with
+ * asio::error::operation_not_supported when run on Windows XP, Windows
+ * Server 2003, and earlier versions of Windows, unless
+ * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
+ * two issues that should be considered before enabling its use:
+ *
+ * @li It will only cancel asynchronous operations that were initiated in the
+ * current thread.
+ *
+ * @li It can appear to complete without error, but the request to cancel the
+ * unfinished operations may be silently ignored by the operating system.
+ * Whether it works or not seems to depend on the drivers that are installed.
+ *
+ * For portable cancellation, consider using the close() function to
+ * simultaneously cancel the outstanding operations and close the file.
+ *
+ * When running on Windows Vista, Windows Server 2008, and later, the
+ * CancelIoEx function is always used. This function does not have the
+ * problems described above.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
+ && !defined(ASIO_ENABLE_CANCELIO)
+ __declspec(deprecated("By default, this function always fails with "
+ "operation_not_supported when used on Windows XP, Windows Server 2003, "
+ "or earlier. Consult documentation for details."))
+#endif
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls to cancel() will always fail with
+ * asio::error::operation_not_supported when run on Windows XP, Windows
+ * Server 2003, and earlier versions of Windows, unless
+ * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
+ * two issues that should be considered before enabling its use:
+ *
+ * @li It will only cancel asynchronous operations that were initiated in the
+ * current thread.
+ *
+ * @li It can appear to complete without error, but the request to cancel the
+ * unfinished operations may be silently ignored by the operating system.
+ * Whether it works or not seems to depend on the drivers that are installed.
+ *
+ * For portable cancellation, consider using the close() function to
+ * simultaneously cancel the outstanding operations and close the file.
+ *
+ * When running on Windows Vista, Windows Server 2008, and later, the
+ * CancelIoEx function is always used. This function does not have the
+ * problems described above.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
+ && !defined(ASIO_ENABLE_CANCELIO)
+ __declspec(deprecated("By default, this function always fails with "
+ "operation_not_supported when used on Windows XP, Windows Server 2003, "
+ "or earlier. Consult documentation for details."))
+#endif
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the size of the file.
+ /**
+ * This function determines the size of the file, in bytes.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ uint64_t size() const
+ {
+ asio::error_code ec;
+ uint64_t s = impl_.get_service().size(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "size");
+ return s;
+ }
+
+ /// Get the size of the file.
+ /**
+ * This function determines the size of the file, in bytes.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ uint64_t size(asio::error_code& ec) const
+ {
+ return impl_.get_service().size(impl_.get_implementation(), ec);
+ }
+
+ /// Alter the size of the file.
+ /**
+ * This function resizes the file to the specified size, in bytes. If the
+ * current file size exceeds @c n then any extra data is discarded. If the
+ * current size is less than @c n then the file is extended and filled with
+ * zeroes.
+ *
+ * @param n The new size for the file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void resize(uint64_t n)
+ {
+ asio::error_code ec;
+ impl_.get_service().resize(impl_.get_implementation(), n, ec);
+ asio::detail::throw_error(ec, "resize");
+ }
+
+ /// Alter the size of the file.
+ /**
+ * This function resizes the file to the specified size, in bytes. If the
+ * current file size exceeds @c n then any extra data is discarded. If the
+ * current size is less than @c n then the file is extended and filled with
+ * zeroes.
+ *
+ * @param n The new size for the file.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID resize(uint64_t n, asio::error_code& ec)
+ {
+ impl_.get_service().resize(impl_.get_implementation(), n, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Synchronise the file to disk.
+ /**
+ * This function synchronises the file data and metadata to disk. Note that
+ * the semantics of this synchronisation vary between operation systems.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void sync_all()
+ {
+ asio::error_code ec;
+ impl_.get_service().sync_all(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "sync_all");
+ }
+
+ /// Synchronise the file to disk.
+ /**
+ * This function synchronises the file data and metadata to disk. Note that
+ * the semantics of this synchronisation vary between operation systems.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID sync_all(asio::error_code& ec)
+ {
+ impl_.get_service().sync_all(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Synchronise the file data to disk.
+ /**
+ * This function synchronises the file data to disk. Note that the semantics
+ * of this synchronisation vary between operation systems.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void sync_data()
+ {
+ asio::error_code ec;
+ impl_.get_service().sync_data(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "sync_data");
+ }
+
+ /// Synchronise the file data to disk.
+ /**
+ * This function synchronises the file data to disk. Note that the semantics
+ * of this synchronisation vary between operation systems.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID sync_data(asio::error_code& ec)
+ {
+ impl_.get_service().sync_data(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the file, cancelling any outstanding asynchronous
+ * operations associated with the file as if by calling @c cancel.
+ */
+ ~basic_file()
+ {
+ }
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_file_service, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING)
+ detail::io_object_impl<detail::io_uring_file_service, Executor> impl_;
+#endif
+
+private:
+ // Disallow copying and assignment.
+ basic_file(const basic_file&) = delete;
+ basic_file& operator=(const basic_file&) = delete;
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_FILE_HPP
diff --git a/3rdparty/asio/include/asio/basic_io_object.hpp b/3rdparty/asio/include/asio/basic_io_object.hpp
index b0ccfcb5293..7e502206ff8 100644
--- a/3rdparty/asio/include/asio/basic_io_object.hpp
+++ b/3rdparty/asio/include/asio/basic_io_object.hpp
@@ -2,7 +2,7 @@
// basic_io_object.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,7 +22,6 @@
namespace asio {
-#if defined(ASIO_HAS_MOVE)
namespace detail
{
// Type trait used to determine whether a service supports move.
@@ -45,14 +44,13 @@ namespace detail
static_cast<implementation_type*>(0))) == 1;
};
}
-#endif // defined(ASIO_HAS_MOVE)
/// Base class for all I/O objects.
/**
* @note All I/O objects are non-copyable. However, when using C++0x, certain
* I/O objects do support move construction and move assignment.
*/
-#if !defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+#if defined(GENERATING_DOCUMENTATION)
template <typename IoObjectService>
#else
template <typename IoObjectService,
@@ -101,7 +99,7 @@ public:
typedef asio::io_context::executor_type executor_type;
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return service_.get_io_context().get_executor();
}
@@ -138,6 +136,11 @@ protected:
* @note Available only for services that support movability,
*/
basic_io_object& operator=(basic_io_object&& other);
+
+ /// Perform a converting move-construction of a basic_io_object.
+ template <typename IoObjectService1>
+ basic_io_object(IoObjectService1& other_service,
+ typename IoObjectService1::implementation_type& other_implementation);
#endif // defined(GENERATING_DOCUMENTATION)
/// Protected destructor to prevent deletion through this type.
@@ -185,7 +188,6 @@ private:
implementation_type implementation_;
};
-#if defined(ASIO_HAS_MOVE)
// Specialisation for movable objects.
template <typename IoObjectService>
class basic_io_object<IoObjectService, true>
@@ -208,7 +210,7 @@ public:
typedef asio::io_context::executor_type executor_type;
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return service_->get_io_context().get_executor();
}
@@ -226,6 +228,16 @@ protected:
service_->move_construct(implementation_, other.implementation_);
}
+ template <typename IoObjectService1>
+ basic_io_object(IoObjectService1& other_service,
+ typename IoObjectService1::implementation_type& other_implementation)
+ : service_(&asio::use_service<IoObjectService>(
+ other_service.get_io_context()))
+ {
+ service_->converting_move_construct(implementation_,
+ other_service, other_implementation);
+ }
+
~basic_io_object()
{
service_->destroy(implementation_);
@@ -266,7 +278,6 @@ private:
IoObjectService* service_;
implementation_type implementation_;
};
-#endif // defined(ASIO_HAS_MOVE)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_random_access_file.hpp b/3rdparty/asio/include/asio/basic_random_access_file.hpp
new file mode 100644
index 00000000000..fe88f420560
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_random_access_file.hpp
@@ -0,0 +1,689 @@
+//
+// basic_random_access_file.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BASIC_RANDOM_ACCESS_FILE_HPP
+#define ASIO_BASIC_RANDOM_ACCESS_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include "asio/async_result.hpp"
+#include "asio/basic_file.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(ASIO_BASIC_RANDOM_ACCESS_FILE_FWD_DECL)
+#define ASIO_BASIC_RANDOM_ACCESS_FILE_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Executor = any_io_executor>
+class basic_random_access_file;
+
+#endif // !defined(ASIO_BASIC_RANDOM_ACCESS_FILE_FWD_DECL)
+
+/// Provides random-access file functionality.
+/**
+ * The basic_random_access_file class template provides asynchronous and
+ * blocking random-access file functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * Synchronous @c read_some_at and @c write_some_at operations are thread safe
+ * with respect to each other, if the underlying operating system calls are
+ * also thread safe. This means that it is permitted to perform concurrent
+ * calls to these synchronous operations on a single file object. Other
+ * synchronous operations, such as @c open or @c close, are not thread safe.
+ */
+template <typename Executor>
+class basic_random_access_file
+ : public basic_file<Executor>
+{
+private:
+ class initiate_async_write_some_at;
+ class initiate_async_read_some_at;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the file type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The file type when rebound to the specified executor.
+ typedef basic_random_access_file<Executor1> other;
+ };
+
+ /// The native representation of a file.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_file<Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a basic_random_access_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ */
+ explicit basic_random_access_file(const executor_type& ex)
+ : basic_file<Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_random_access_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ */
+ template <typename ExecutionContext>
+ explicit basic_random_access_file(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_random_access_file(const executor_type& ex,
+ const char* path, file_base::flags open_flags)
+ : basic_file<Executor>(ex, path, open_flags)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_file(ExecutionContext& context,
+ const char* path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, path, open_flags)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_random_access_file(const executor_type& ex,
+ const std::string& path, file_base::flags open_flags)
+ : basic_file<Executor>(ex, path, open_flags)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_file(ExecutionContext& context,
+ const std::string& path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, path, open_flags)
+ {
+ }
+
+ /// Construct a basic_random_access_file on an existing native file.
+ /**
+ * This constructor initialises a random-access file object to hold an
+ * existing native file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_random_access_file(const executor_type& ex,
+ const native_handle_type& native_file)
+ : basic_file<Executor>(ex, native_file)
+ {
+ }
+
+ /// Construct a basic_random_access_file on an existing native file.
+ /**
+ * This constructor initialises a random-access file object to hold an
+ * existing native file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_file(ExecutionContext& context,
+ const native_handle_type& native_file,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, native_file)
+ {
+ }
+
+ /// Move-construct a basic_random_access_file from another.
+ /**
+ * This constructor moves a random-access file from one object to another.
+ *
+ * @param other The other basic_random_access_file 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_random_access_file(const executor_type&)
+ * constructor.
+ */
+ basic_random_access_file(basic_random_access_file&& other) noexcept
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_random_access_file from another.
+ /**
+ * This assignment operator moves a random-access file from one object to
+ * another.
+ *
+ * @param other The other basic_random_access_file 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_random_access_file(const executor_type&)
+ * constructor.
+ */
+ basic_random_access_file& operator=(basic_random_access_file&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_random_access_file from a file of another executor
+ /// type.
+ /**
+ * This constructor moves a random-access file from one object to another.
+ *
+ * @param other The other basic_random_access_file 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_random_access_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_random_access_file(basic_random_access_file<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_random_access_file from a file of another executor
+ /// type.
+ /**
+ * This assignment operator moves a random-access file from one object to
+ * another.
+ *
+ * @param other The other basic_random_access_file 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_random_access_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_random_access_file&
+ > operator=(basic_random_access_file<Executor1>&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Destroys the file.
+ /**
+ * This function destroys the file, cancelling any outstanding asynchronous
+ * operations associated with the file as if by calling @c cancel.
+ */
+ ~basic_random_access_file()
+ {
+ }
+
+ /// Write some data to the handle at the specified offset.
+ /**
+ * This function is used to write data to the random-access handle. The
+ * function call will block until one or more bytes of the data has been
+ * written successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The write_some_at operation may not write all of the data. Consider
+ * using the @ref write_at function if you need to ensure that all data is
+ * written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.write_some_at(42, asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some_at(uint64_t offset,
+ const ConstBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ asio::detail::throw_error(ec, "write_some_at");
+ return s;
+ }
+
+ /// Write some data to the handle at the specified offset.
+ /**
+ * This function is used to write data to the random-access handle. The
+ * function call will block until one or more bytes of the data has been
+ * written successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not write all of the data to the
+ * file. Consider using the @ref write_at function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some_at(uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ }
+
+ /// Start an asynchronous write at the specified offset.
+ /**
+ * This function is used to asynchronously write data to the random-access
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The write operation may not write all of the data to the file.
+ * Consider using the @ref async_write_at function if you need to ensure that
+ * all data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_write_some_at(42, asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some_at(uint64_t offset, const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some_at>(), token, offset, buffers))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some_at(this), token, offset, buffers);
+ }
+
+ /// Read some data from the handle at the specified offset.
+ /**
+ * This function is used to read data from the random-access handle. The
+ * function call will block until one or more bytes of data has been read
+ * successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read_at function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.read_some_at(42, asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some_at(uint64_t offset,
+ const MutableBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ asio::detail::throw_error(ec, "read_some_at");
+ return s;
+ }
+
+ /// Read some data from the handle at the specified offset.
+ /**
+ * This function is used to read data from the random-access handle. The
+ * function call will block until one or more bytes of data has been read
+ * successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read_at function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some_at(uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ }
+
+ /// Start an asynchronous read at the specified offset.
+ /**
+ * This function is used to asynchronously read data from the random-access
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read_at function if you need to ensure that
+ * the requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_read_some_at(42, asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some_at(uint64_t offset, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some_at>(), token, offset, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some_at(this), token, offset, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_random_access_file(const basic_random_access_file&) = delete;
+ basic_random_access_file& operator=(
+ const basic_random_access_file&) = delete;
+
+ class initiate_async_write_some_at
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some_at(basic_random_access_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ uint64_t offset, const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some_at(
+ self_->impl_.get_implementation(), offset, buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_random_access_file* self_;
+ };
+
+ class initiate_async_read_some_at
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some_at(basic_random_access_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ uint64_t offset, const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some_at(
+ self_->impl_.get_implementation(), offset, buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_random_access_file* self_;
+ };
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_RANDOM_ACCESS_FILE_HPP
diff --git a/3rdparty/asio/include/asio/basic_raw_socket.hpp b/3rdparty/asio/include/asio/basic_raw_socket.hpp
index 30114939359..112090900ce 100644
--- a/3rdparty/asio/include/asio/basic_raw_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_raw_socket.hpp
@@ -2,7 +2,7 @@
// basic_raw_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,18 +19,24 @@
#include <cstddef>
#include "asio/basic_socket.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/raw_socket_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
+#if !defined(ASIO_BASIC_RAW_SOCKET_FWD_DECL)
+#define ASIO_BASIC_RAW_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
+class basic_raw_socket;
+
+#endif // !defined(ASIO_BASIC_RAW_SOCKET_FWD_DECL)
+
/// Provides raw-oriented socket functionality.
/**
* The basic_raw_socket class template provides asynchronous and blocking
@@ -39,19 +45,42 @@ namespace asio {
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
+ *
+ * Synchronous @c send, @c send_to, @c receive, @c receive_from, @c connect,
+ * and @c shutdown operations are thread safe with respect to each other, if
+ * the underlying operating system calls are also thread safe. This means that
+ * it is permitted to perform concurrent calls to these synchronous operations
+ * on a single socket object. Other synchronous operations, such as @c open or
+ * @c close, are not thread safe.
*/
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= raw_socket_service<Protocol>)>
+template <typename Protocol, typename Executor>
class basic_raw_socket
- : public basic_socket<Protocol ASIO_SVC_TARG>
+ : public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_send_to;
+ class initiate_async_receive;
+ class initiate_async_receive_from;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_raw_socket<Protocol, Executor1> other;
+ };
+
/// The native representation of a socket.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
#else
- typedef typename basic_socket<
- Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
#endif
/// The protocol type.
@@ -65,12 +94,29 @@ public:
* This constructor creates a raw socket without opening it. The open()
* function must be called before data can be sent or received on the socket.
*
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*/
- explicit basic_raw_socket(asio::io_context& io_context)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
+ explicit basic_raw_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_raw_socket without opening it.
+ /**
+ * This constructor creates a raw socket without opening it. The open()
+ * function must be called before data can be sent or received on the socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_raw_socket(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context)
{
}
@@ -78,17 +124,37 @@ public:
/**
* This constructor creates and opens a raw socket.
*
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_raw_socket(asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
+ basic_raw_socket(const executor_type& ex, const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_raw_socket.
+ /**
+ * This constructor creates and opens a raw socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_raw_socket(ExecutionContext& context, const protocol_type& protocol,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -99,18 +165,41 @@ public:
* to the specified endpoint on the local machine. The protocol used is the
* protocol associated with the given endpoint.
*
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the raw
+ * socket will be bound.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_raw_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_raw_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a raw socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
*
* @param endpoint An endpoint on the local machine to which the raw
* socket will be bound.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_raw_socket(asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
+ template <typename ExecutionContext>
+ basic_raw_socket(ExecutionContext& context, const endpoint_type& endpoint,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -119,9 +208,8 @@ public:
* This constructor creates a raw socket object to hold an existing
* native socket.
*
- * @param io_context The io_context object that the raw socket will use
- * to dispatch handlers for any asynchronous operations performed on the
- * socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
@@ -129,14 +217,37 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_raw_socket(asio::io_context& io_context,
+ basic_raw_socket(const executor_type& ex,
const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_raw_socket on an existing native socket.
+ /**
+ * This constructor creates a raw socket object to hold an existing
+ * native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_raw_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_raw_socket from another.
/**
* This constructor moves a raw socket from one object to another.
@@ -145,10 +256,11 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_raw_socket(io_context&) constructor.
+ * constructed using the @c basic_raw_socket(const executor_type&)
+ * constructor.
*/
- basic_raw_socket(basic_raw_socket&& other)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ basic_raw_socket(basic_raw_socket&& other) noexcept
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -160,28 +272,34 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_raw_socket(io_context&) constructor.
+ * constructed using the @c basic_raw_socket(const executor_type&)
+ * constructor.
*/
basic_raw_socket& operator=(basic_raw_socket&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
- /// Move-construct a basic_raw_socket from a socket of another protocol type.
+ /// Move-construct a basic_raw_socket from a socket of another protocol
+ /// type.
/**
* This constructor moves a raw socket from one object to another.
*
- * @param other The other basic_raw_socket object from which the move will
- * occur.
+ * @param other The other basic_raw_socket 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_raw_socket(io_context&) constructor.
+ * constructed using the @c basic_raw_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- basic_raw_socket(basic_raw_socket<Protocol1 ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ template <typename Protocol1, typename Executor1>
+ basic_raw_socket(basic_raw_socket<Protocol1, Executor1>&& other,
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -193,17 +311,19 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_raw_socket(io_context&) constructor.
+ * constructed using the @c basic_raw_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_raw_socket>::type& operator=(
- basic_raw_socket<Protocol1 ASIO_SVC_TARG1>&& other)
+ template <typename Protocol1, typename Executor1>
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_raw_socket&
+ > operator=(basic_raw_socket<Protocol1, Executor1>&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -239,8 +359,8 @@ public:
std::size_t send(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -266,8 +386,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -292,31 +412,37 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send on a connected socket.
/**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
+ * This function is used to asynchronously send data on the raw socket. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected raw
@@ -330,82 +456,92 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Start an asynchronous send on a connected socket.
/**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
+ * This function is used to asynchronously send data on the raw socket. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected raw
* socket.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token, buffers, flags);
}
/// Send raw data to the specified endpoint.
@@ -438,8 +574,8 @@ public:
const endpoint_type& destination)
{
asio::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, 0, ec);
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, 0, ec);
asio::detail::throw_error(ec, "send_to");
return s;
}
@@ -465,8 +601,8 @@ public:
const endpoint_type& destination, socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().send_to(
- this->get_implementation(), buffers, destination, flags, ec);
+ std::size_t s = this->impl_.get_service().send_to(
+ this->impl_.get_implementation(), buffers, destination, flags, ec);
asio::detail::throw_error(ec, "send_to");
return s;
}
@@ -492,34 +628,40 @@ public:
const endpoint_type& destination, socket_base::message_flags flags,
asio::error_code& ec)
{
- return this->get_service().send_to(this->get_implementation(),
+ return this->impl_.get_service().send_to(this->impl_.get_implementation(),
buffers, destination, flags, ec);
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send raw data to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To send a single data buffer use the @ref buffer function as follows:
@@ -532,84 +674,94 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token, buffers,
+ destination, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(this->get_implementation(),
- buffers, destination, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(this->get_implementation(),
- buffers, destination, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send_to(this), token, buffers,
+ destination, socket_base::message_flags(0));
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send raw data to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token,
+ buffers, destination, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send_to(
- this->get_implementation(), buffers, destination, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send_to(this), token,
+ buffers, destination, flags);
}
/// Receive some data on a connected socket.
@@ -640,8 +792,8 @@ public:
std::size_t receive(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -669,8 +821,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -697,31 +849,37 @@ public:
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the raw
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
@@ -736,82 +894,93 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the raw
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
* raw socket.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken
+ = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token, buffers, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token, buffers, flags);
}
/// Receive raw data with the endpoint of the sender.
@@ -845,8 +1014,8 @@ public:
endpoint_type& sender_endpoint)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0, ec);
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, 0, ec);
asio::detail::throw_error(ec, "receive_from");
return s;
}
@@ -872,8 +1041,8 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags, ec);
+ std::size_t s = this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
asio::detail::throw_error(ec, "receive_from");
return s;
}
@@ -899,36 +1068,42 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags,
asio::error_code& ec)
{
- return this->get_service().receive_from(this->get_implementation(),
- buffers, sender_endpoint, flags, ec);
+ return this->impl_.get_service().receive_from(
+ this->impl_.get_implementation(), buffers, sender_endpoint, flags, ec);
}
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive raw data. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive raw data. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the data. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To receive into a single data buffer use the @ref buffer function as
@@ -938,89 +1113,240 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token
+ = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token, buffers,
+ &sender_endpoint, socket_base::message_flags(0)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive_from(this), token, buffers,
+ &sender_endpoint, socket_base::message_flags(0));
}
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive raw data. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive raw data. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the data. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken
+ = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token,
+ buffers, &sender_endpoint, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_from(
- this->get_implementation(), buffers, sender_endpoint, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive_from(this), token,
+ buffers, &sender_endpoint, flags);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_raw_socket(const basic_raw_socket&) = delete;
+ basic_raw_socket& operator=(const basic_raw_socket&) = delete;
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_raw_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_send(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_raw_socket* self_;
+ };
+
+ class initiate_async_send_to
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send_to(basic_raw_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers, const endpoint_type& destination,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_send_to(
+ self_->impl_.get_implementation(), buffers, destination,
+ flags, handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_raw_socket* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_raw_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_receive(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_raw_socket* self_;
+ };
+
+ class initiate_async_receive_from
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive_from(basic_raw_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers, endpoint_type* sender_endpoint,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_receive_from(
+ self_->impl_.get_implementation(), buffers, *sender_endpoint,
+ flags, handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_raw_socket* self_;
+ };
};
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_readable_pipe.hpp b/3rdparty/asio/include/asio/basic_readable_pipe.hpp
new file mode 100644
index 00000000000..9a5a0653f6b
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_readable_pipe.hpp
@@ -0,0 +1,626 @@
+//
+// basic_readable_pipe.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BASIC_READABLE_PIPE_HPP
+#define ASIO_BASIC_READABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_handle_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Provides pipe functionality.
+/**
+ * The basic_readable_pipe class provides a wrapper over pipe
+ * functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = any_io_executor>
+class basic_readable_pipe
+{
+private:
+ class initiate_async_read_some;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the pipe type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The pipe type when rebound to the specified executor.
+ typedef basic_readable_pipe<Executor1> other;
+ };
+
+ /// The native representation of a pipe.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::io_uring_descriptor_service::native_handle_type
+ native_handle_type;
+#else
+ typedef detail::reactive_descriptor_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A basic_readable_pipe is always the lowest layer.
+ typedef basic_readable_pipe lowest_layer_type;
+
+ /// Construct a basic_readable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to dispatch
+ * handlers for any asynchronous operations performed on the pipe.
+ */
+ explicit basic_readable_pipe(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_readable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the pipe.
+ */
+ template <typename ExecutionContext>
+ explicit basic_readable_pipe(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct a basic_readable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_readable_pipe(const executor_type& ex,
+ const native_handle_type& native_pipe)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_readable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_readable_pipe(ExecutionContext& context,
+ const native_handle_type& native_pipe,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct a basic_readable_pipe from another.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe 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_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_readable_pipe(basic_readable_pipe&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_readable_pipe from another.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe 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_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_readable_pipe& operator=(basic_readable_pipe&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All pipes have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_readable_pipe;
+
+ /// Move-construct a basic_readable_pipe from a pipe of another executor type.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe 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_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_readable_pipe(basic_readable_pipe<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_readable_pipe from a pipe of another executor type.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe 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_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_readable_pipe&
+ > operator=(basic_readable_pipe<Executor1>&& other)
+ {
+ basic_readable_pipe tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Destroys the pipe.
+ /**
+ * This function destroys the pipe, cancelling any outstanding
+ * asynchronous wait operations associated with the pipe as if by
+ * calling @c cancel.
+ */
+ ~basic_readable_pipe()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a basic_readable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a basic_readable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_pipe)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_pipe,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the pipe is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous read operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous read operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native pipe representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * pipe. This is intended to allow access to native pipe
+ * functionality that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Read some data from the pipe.
+ /**
+ * This function is used to read data from the pipe. The function call will
+ * block until one or more bytes of data has been read successfully, or until
+ * an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_readable_pipe.read_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the pipe.
+ /**
+ * This function is used to read data from the pipe. The function call will
+ * block until one or more bytes of data has been read successfully, or until
+ * an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the pipe. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read function if you need to ensure that the
+ * requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_readable_pipe.async_read_some(
+ * asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_readable_pipe(const basic_readable_pipe&) = delete;
+ basic_readable_pipe& operator=(const basic_readable_pipe&) = delete;
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_readable_pipe* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_readable_pipe* self_;
+ };
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_handle_service, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::io_uring_descriptor_service, Executor> impl_;
+#else
+ detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+#endif
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_READABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp b/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp
index ca992eceeee..cf2a4b6ad71 100644
--- a/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp
@@ -2,7 +2,7 @@
// basic_seq_packet_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,14 +22,19 @@
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/seq_packet_socket_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
+#if !defined(ASIO_BASIC_SEQ_PACKET_SOCKET_FWD_DECL)
+#define ASIO_BASIC_SEQ_PACKET_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
+class basic_seq_packet_socket;
+
+#endif // !defined(ASIO_BASIC_SEQ_PACKET_SOCKET_FWD_DECL)
+
/// Provides sequenced packet socket functionality.
/**
* The basic_seq_packet_socket class template provides asynchronous and blocking
@@ -38,19 +43,40 @@ namespace asio {
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
+ *
+ * Synchronous @c send, @c receive, @c connect, and @c shutdown operations are
+ * thread safe with respect to each other, if the underlying operating system
+ * calls are also thread safe. This means that it is permitted to perform
+ * concurrent calls to these synchronous operations on a single socket object.
+ * Other synchronous operations, such as @c open or @c close, are not thread
+ * safe.
*/
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= seq_packet_socket_service<Protocol>)>
+template <typename Protocol, typename Executor>
class basic_seq_packet_socket
- : public basic_socket<Protocol ASIO_SVC_TARG>
+ : public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_receive_with_flags;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_seq_packet_socket<Protocol, Executor1> other;
+ };
+
/// The native representation of a socket.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
#else
- typedef typename basic_socket<
- Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
#endif
/// The protocol type.
@@ -65,12 +91,30 @@ public:
* socket needs to be opened and then connected or accepted before data can
* be sent or received on it.
*
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*/
- explicit basic_seq_packet_socket(asio::io_context& io_context)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
+ explicit basic_seq_packet_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket without opening it.
+ /**
+ * This constructor creates a sequenced packet socket without opening it. The
+ * socket needs to be opened and then connected or accepted before data can
+ * be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_seq_packet_socket(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context)
{
}
@@ -80,17 +124,41 @@ public:
* needs to be connected or accepted before data can be sent or received on
* it.
*
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_seq_packet_socket(asio::io_context& io_context,
+ basic_seq_packet_socket(const executor_type& ex,
const protocol_type& protocol)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_seq_packet_socket.
+ /**
+ * This constructor creates and opens a sequenced_packet socket. The socket
+ * needs to be connected or accepted before data can be sent or received on
+ * it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_seq_packet_socket(ExecutionContext& context,
+ const protocol_type& protocol,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -101,18 +169,43 @@ public:
* it bound to the specified endpoint on the local machine. The protocol used
* is the protocol associated with the given endpoint.
*
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param endpoint An endpoint on the local machine to which the sequenced
* packet socket will be bound.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_seq_packet_socket(asio::io_context& io_context,
+ basic_seq_packet_socket(const executor_type& ex,
const endpoint_type& endpoint)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket, opening it and binding it to the
+ /// given local endpoint.
+ /**
+ * This constructor creates a sequenced packet socket and automatically opens
+ * it bound to the specified endpoint on the local machine. The protocol used
+ * is the protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the sequenced
+ * packet socket will be bound.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_seq_packet_socket(ExecutionContext& context,
+ const endpoint_type& endpoint,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -121,9 +214,8 @@ public:
* This constructor creates a sequenced packet socket object to hold an
* existing native socket.
*
- * @param io_context The io_context object that the sequenced packet socket
- * will use to dispatch handlers for any asynchronous operations performed on
- * the socket.
+ * @param ex The I/O executor that the socket will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
@@ -131,14 +223,37 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_seq_packet_socket(asio::io_context& io_context,
+ basic_seq_packet_socket(const executor_type& ex,
const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_seq_packet_socket on an existing native socket.
+ /**
+ * This constructor creates a sequenced packet socket object to hold an
+ * existing native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_seq_packet_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_seq_packet_socket from another.
/**
* This constructor moves a sequenced packet socket from one object to
@@ -148,10 +263,11 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
+ * constructed using the @c basic_seq_packet_socket(const executor_type&)
+ * constructor.
*/
- basic_seq_packet_socket(basic_seq_packet_socket&& other)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ basic_seq_packet_socket(basic_seq_packet_socket&& other) noexcept
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -164,11 +280,12 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
+ * constructed using the @c basic_seq_packet_socket(const executor_type&)
+ * constructor.
*/
basic_seq_packet_socket& operator=(basic_seq_packet_socket&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
@@ -182,13 +299,16 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
+ * constructed using the @c basic_seq_packet_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- basic_seq_packet_socket(
- basic_seq_packet_socket<Protocol1 ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ template <typename Protocol1, typename Executor1>
+ basic_seq_packet_socket(basic_seq_packet_socket<Protocol1, Executor1>&& other,
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -202,17 +322,19 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_seq_packet_socket(io_context&) constructor.
+ * constructed using the @c basic_seq_packet_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_seq_packet_socket>::type& operator=(
- basic_seq_packet_socket<Protocol1 ASIO_SVC_TARG1>&& other)
+ template <typename Protocol1, typename Executor1>
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_seq_packet_socket&
+ > operator=(basic_seq_packet_socket<Protocol1, Executor1>&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -251,8 +373,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -279,33 +401,39 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send data on the sequenced packet
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To send a single data buffer use the @ref buffer function as follows:
@@ -315,30 +443,33 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken
+ = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token
+ = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, flags, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token, buffers, flags);
}
/// Receive some data on the socket.
@@ -375,13 +506,8 @@ public:
socket_base::message_flags& out_flags)
{
asio::error_code ec;
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, out_flags, ec);
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive_with_flags(
- this->get_implementation(), buffers, 0, out_flags, ec);
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ std::size_t s = this->impl_.get_service().receive_with_flags(
+ this->impl_.get_implementation(), buffers, 0, out_flags, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -427,13 +553,8 @@ public:
socket_base::message_flags& out_flags)
{
asio::error_code ec;
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, in_flags, out_flags, ec);
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- std::size_t s = this->get_service().receive_with_flags(
- this->get_implementation(), buffers, in_flags, out_flags, ec);
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ std::size_t s = this->impl_.get_service().receive_with_flags(
+ this->impl_.get_implementation(), buffers, in_flags, out_flags, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -466,42 +587,43 @@ public:
socket_base::message_flags in_flags,
socket_base::message_flags& out_flags, asio::error_code& ec)
{
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().receive(this->get_implementation(),
- buffers, in_flags, out_flags, ec);
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().receive_with_flags(this->get_implementation(),
- buffers, in_flags, out_flags, ec);
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return this->impl_.get_service().receive_with_flags(
+ this->impl_.get_implementation(), buffers, in_flags, out_flags, ec);
}
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the sequenced
- * packet socket. The function call always returns immediately.
+ * packet socket. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param out_flags Once the asynchronous operation completes, contains flags
* associated with the received data. For example, if the
* socket_base::message_end_of_record bit is set then the received data marks
* the end of a record. The caller must guarantee that the referenced
- * variable remains valid until the handler is called.
+ * variable remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To receive into a single data buffer use the @ref buffer function as
@@ -512,43 +634,45 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags& out_flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_with_flags>(), token,
+ buffers, socket_base::message_flags(0), &out_flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(
- this->get_implementation(), buffers, 0, out_flags,
- ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_with_flags(
- this->get_implementation(), buffers, 0, out_flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive_with_flags(this), token,
+ buffers, socket_base::message_flags(0), &out_flags);
}
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the sequenced
- * data socket. The function call always returns immediately.
+ * data socket. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param in_flags Flags specifying how the receive call is to be made.
*
@@ -556,19 +680,24 @@ public:
* associated with the received data. For example, if the
* socket_base::message_end_of_record bit is set then the received data marks
* the end of a record. The caller must guarantee that the referenced
- * variable remains valid until the handler is called.
+ * variable remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To receive into a single data buffer use the @ref buffer function as
@@ -581,34 +710,110 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags in_flags,
socket_base::message_flags& out_flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_with_flags>(),
+ token, buffers, in_flags, &out_flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(
- this->get_implementation(), buffers, in_flags, out_flags,
- ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive_with_flags(
- this->get_implementation(), buffers, in_flags, out_flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive_with_flags(this),
+ token, buffers, in_flags, &out_flags);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_seq_packet_socket(const basic_seq_packet_socket&) = delete;
+ basic_seq_packet_socket& operator=(
+ const basic_seq_packet_socket&) = delete;
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_seq_packet_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_send(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_seq_packet_socket* self_;
+ };
+
+ class initiate_async_receive_with_flags
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive_with_flags(basic_seq_packet_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags* out_flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_receive_with_flags(
+ self_->impl_.get_implementation(), buffers, in_flags,
+ *out_flags, handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_seq_packet_socket* self_;
+ };
};
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_serial_port.hpp b/3rdparty/asio/include/asio/basic_serial_port.hpp
index b6ac51ebb99..8fa66c0b0d7 100644
--- a/3rdparty/asio/include/asio/basic_serial_port.hpp
+++ b/3rdparty/asio/include/asio/basic_serial_port.hpp
@@ -2,7 +2,7 @@
// basic_serial_port.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,18 +18,26 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
#if defined(ASIO_HAS_SERIAL_PORT) \
|| defined(GENERATING_DOCUMENTATION)
#include <string>
-#include "asio/basic_io_object.hpp"
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
#include "asio/serial_port_base.hpp"
-#include "asio/serial_port_service.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_serial_port_service.hpp"
+#else
+# include "asio/detail/posix_serial_port_service.hpp"
+#endif
#include "asio/detail/push_options.hpp"
@@ -37,34 +45,75 @@ namespace asio {
/// Provides serial port functionality.
/**
- * The basic_serial_port class template provides functionality that is common
- * to all serial ports.
+ * The basic_serial_port class provides a wrapper over serial port
+ * functionality.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename SerialPortService = serial_port_service>
+template <typename Executor = any_io_executor>
class basic_serial_port
- : public basic_io_object<SerialPortService>,
- public serial_port_base
+ : public serial_port_base
{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the serial port type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The serial port type when rebound to the specified executor.
+ typedef basic_serial_port<Executor1> other;
+ };
+
/// The native representation of a serial port.
- typedef typename SerialPortService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_serial_port_service::native_handle_type
+ native_handle_type;
+#else
+ typedef detail::posix_serial_port_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A basic_basic_serial_port is always the lowest layer.
+ typedef basic_serial_port lowest_layer_type;
- /// A basic_serial_port is always the lowest layer.
- typedef basic_serial_port<SerialPortService> lowest_layer_type;
+ /// Construct a basic_serial_port without opening it.
+ /**
+ * This constructor creates a serial port without opening it.
+ *
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
+ */
+ explicit basic_serial_port(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
/// Construct a basic_serial_port without opening it.
/**
* This constructor creates a serial port without opening it.
*
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
*/
- explicit basic_serial_port(asio::io_context& io_context)
- : basic_io_object<SerialPortService>(io_context)
+ template <typename ExecutionContext>
+ explicit basic_serial_port(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
{
}
@@ -73,18 +122,18 @@ public:
* This constructor creates and opens a serial port for the specified device
* name.
*
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
*
* @param device The platform-specific device name for this serial
* port.
*/
- explicit basic_serial_port(asio::io_context& io_context,
- const char* device)
- : basic_io_object<SerialPortService>(io_context)
+ basic_serial_port(const executor_type& ex, const char* device)
+ : impl_(0, ex)
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
asio::detail::throw_error(ec, "open");
}
@@ -93,18 +142,66 @@ public:
* This constructor creates and opens a serial port for the specified device
* name.
*
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
*
* @param device The platform-specific device name for this serial
* port.
*/
- explicit basic_serial_port(asio::io_context& io_context,
- const std::string& device)
- : basic_io_object<SerialPortService>(io_context)
+ template <typename ExecutionContext>
+ basic_serial_port(ExecutionContext& context, const char* device,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_serial_port.
+ /**
+ * This constructor creates and opens a serial port for the specified device
+ * name.
+ *
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
+ *
+ * @param device The platform-specific device name for this serial
+ * port.
+ */
+ basic_serial_port(const executor_type& ex, const std::string& device)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_serial_port.
+ /**
+ * This constructor creates and opens a serial port for the specified device
+ * name.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
+ *
+ * @param device The platform-specific device name for this serial
+ * port.
+ */
+ template <typename ExecutionContext>
+ basic_serial_port(ExecutionContext& context, const std::string& device,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
asio::detail::throw_error(ec, "open");
}
@@ -113,24 +210,51 @@ public:
* This constructor creates a serial port object to hold an existing native
* serial port.
*
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
+ * @param ex The I/O executor that the serial port will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * serial port.
*
* @param native_serial_port A native serial port.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_serial_port(asio::io_context& io_context,
+ basic_serial_port(const executor_type& ex,
const native_handle_type& native_serial_port)
- : basic_io_object<SerialPortService>(io_context)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_serial_port, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_serial_port on an existing native serial port.
+ /**
+ * This constructor creates a serial port object to hold an existing native
+ * serial port.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the serial port will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the serial port.
+ *
+ * @param native_serial_port A native serial port.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_serial_port(ExecutionContext& context,
+ const native_handle_type& native_serial_port,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
native_serial_port, ec);
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_serial_port from another.
/**
* This constructor moves a serial port from one object to another.
@@ -139,11 +263,11 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_serial_port(io_context&) constructor.
+ * constructed using the @c basic_serial_port(const executor_type&)
+ * constructor.
*/
basic_serial_port(basic_serial_port&& other)
- : basic_io_object<SerialPortService>(
- ASIO_MOVE_CAST(basic_serial_port)(other))
+ : impl_(std::move(other.impl_))
{
}
@@ -155,15 +279,79 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_serial_port(io_context&) constructor.
+ * constructed using the @c basic_serial_port(const executor_type&)
+ * constructor.
*/
basic_serial_port& operator=(basic_serial_port&& other)
{
- basic_io_object<SerialPortService>::operator=(
- ASIO_MOVE_CAST(basic_serial_port)(other));
+ impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ // All serial ports have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_serial_port;
+
+ /// Move-construct a basic_serial_port from a serial port of another executor
+ /// type.
+ /**
+ * This constructor moves a serial port from one object to another.
+ *
+ * @param other The other basic_serial_port 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_serial_port(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_serial_port(basic_serial_port<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_serial_port from a serial port of another executor
+ /// type.
+ /**
+ * This assignment operator moves a serial port from one object to another.
+ *
+ * @param other The other basic_serial_port 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_serial_port(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_serial_port&
+ > operator=(basic_serial_port<Executor1>&& other)
+ {
+ basic_serial_port tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Destroys the serial port.
+ /**
+ * This function destroys the serial port, cancelling any outstanding
+ * asynchronous wait operations associated with the serial port as if by
+ * calling @c cancel.
+ */
+ ~basic_serial_port()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
/// Get a reference to the lowest layer.
/**
@@ -204,7 +392,7 @@ public:
void open(const std::string& device)
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
asio::detail::throw_error(ec, "open");
}
@@ -220,7 +408,7 @@ public:
ASIO_SYNC_OP_VOID open(const std::string& device,
asio::error_code& ec)
{
- this->get_service().open(this->get_implementation(), device, ec);
+ impl_.get_service().open(impl_.get_implementation(), device, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -235,7 +423,7 @@ public:
void assign(const native_handle_type& native_serial_port)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
native_serial_port, ec);
asio::detail::throw_error(ec, "assign");
}
@@ -251,7 +439,7 @@ public:
ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
asio::error_code& ec)
{
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
native_serial_port, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -259,7 +447,7 @@ public:
/// Determine whether the serial port is open.
bool is_open() const
{
- return this->get_service().is_open(this->get_implementation());
+ return impl_.get_service().is_open(impl_.get_implementation());
}
/// Close the serial port.
@@ -273,7 +461,7 @@ public:
void close()
{
asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "close");
}
@@ -287,7 +475,7 @@ public:
*/
ASIO_SYNC_OP_VOID close(asio::error_code& ec)
{
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -299,7 +487,7 @@ public:
*/
native_handle_type native_handle()
{
- return this->get_service().native_handle(this->get_implementation());
+ return impl_.get_service().native_handle(impl_.get_implementation());
}
/// Cancel all asynchronous operations associated with the serial port.
@@ -313,7 +501,7 @@ public:
void cancel()
{
asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
}
@@ -327,7 +515,7 @@ public:
*/
ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
{
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -341,7 +529,7 @@ public:
void send_break()
{
asio::error_code ec;
- this->get_service().send_break(this->get_implementation(), ec);
+ impl_.get_service().send_break(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "send_break");
}
@@ -354,7 +542,7 @@ public:
*/
ASIO_SYNC_OP_VOID send_break(asio::error_code& ec)
{
- this->get_service().send_break(this->get_implementation(), ec);
+ impl_.get_service().send_break(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -377,7 +565,7 @@ public:
void set_option(const SettableSerialPortOption& option)
{
asio::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
asio::detail::throw_error(ec, "set_option");
}
@@ -400,7 +588,7 @@ public:
ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
asio::error_code& ec)
{
- this->get_service().set_option(this->get_implementation(), option, ec);
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -421,10 +609,10 @@ public:
* asio::serial_port_base::character_size
*/
template <typename GettableSerialPortOption>
- void get_option(GettableSerialPortOption& option)
+ void get_option(GettableSerialPortOption& option) const
{
asio::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
asio::detail::throw_error(ec, "get_option");
}
@@ -446,9 +634,9 @@ public:
*/
template <typename GettableSerialPortOption>
ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
- asio::error_code& ec)
+ asio::error_code& ec) const
{
- this->get_service().get_option(this->get_implementation(), option, ec);
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -473,7 +661,7 @@ public:
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
* @code
- * serial_port.write_some(asio::buffer(data, size));
+ * basic_serial_port.write_some(asio::buffer(data, size));
* @endcode
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
@@ -483,8 +671,8 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
+ std::size_t s = impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
asio::detail::throw_error(ec, "write_some");
return s;
}
@@ -509,31 +697,37 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().write_some(
- this->get_implementation(), buffers, ec);
+ return impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
}
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the serial port.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be written to the serial port.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
@@ -542,24 +736,36 @@ public:
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
* @code
- * serial_port.async_write_some(asio::buffer(data, size), handler);
+ * basic_serial_port.async_write_some(
+ * asio::buffer(data, size), handler);
* @endcode
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- return this->get_service().async_write_some(this->get_implementation(),
- buffers, ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the serial port.
@@ -584,7 +790,7 @@ public:
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
* @code
- * serial_port.read_some(asio::buffer(data, size));
+ * basic_serial_port.read_some(asio::buffer(data, size));
* @endcode
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
@@ -594,8 +800,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
+ std::size_t s = impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
asio::detail::throw_error(ec, "read_some");
return s;
}
@@ -621,31 +827,37 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().read_some(
- this->get_implementation(), buffers, ec);
+ return impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
}
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the serial port.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
@@ -655,25 +867,114 @@ public:
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
* @code
- * serial_port.async_read_some(asio::buffer(data, size), handler);
+ * basic_serial_port.async_read_some(
+ * asio::buffer(data, size), handler);
* @endcode
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- return this->get_service().async_read_some(this->get_implementation(),
- buffers, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_serial_port(const basic_serial_port&) = delete;
+ basic_serial_port& operator=(const basic_serial_port&) = delete;
+
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_serial_port* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_serial_port* self_;
+ };
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_serial_port* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_serial_port* self_;
+ };
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_serial_port_service, Executor> impl_;
+#else
+ detail::io_object_impl<detail::posix_serial_port_service, Executor> impl_;
+#endif
};
} // namespace asio
@@ -683,6 +984,4 @@ public:
#endif // defined(ASIO_HAS_SERIAL_PORT)
// || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_BASIC_SERIAL_PORT_HPP
diff --git a/3rdparty/asio/include/asio/basic_signal_set.hpp b/3rdparty/asio/include/asio/basic_signal_set.hpp
index 6f1d07ed796..bf74c39b3a8 100644
--- a/3rdparty/asio/include/asio/basic_signal_set.hpp
+++ b/3rdparty/asio/include/asio/basic_signal_set.hpp
@@ -2,7 +2,7 @@
// basic_signal_set.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,13 +17,17 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/basic_io_object.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/signal_set_service.hpp"
#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
-#include "asio/signal_set_service.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/signal_set_base.hpp"
#include "asio/detail/push_options.hpp"
@@ -31,10 +35,8 @@ namespace asio {
/// Provides signal functionality.
/**
- * The basic_signal_set class template provides the ability to perform an
- * asynchronous wait for one or more signals to occur.
- *
- * Most applications will use the asio::signal_set typedef.
+ * The basic_signal_set class provides the ability to perform an asynchronous
+ * wait for one or more signals to occur.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
@@ -56,7 +58,7 @@ namespace asio {
* ...
*
* // Construct a signal set registered for process termination.
- * asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ * asio::signal_set signals(my_context, SIGINT, SIGTERM);
*
* // Start an asynchronous wait for one of the signals to occur.
* signals.async_wait(handler);
@@ -91,41 +93,101 @@ namespace asio {
* that any signals registered using signal_set objects are unblocked in at
* least one thread.
*/
-template <typename SignalSetService = signal_set_service>
-class basic_signal_set
- : public basic_io_object<SignalSetService>
+template <typename Executor = any_io_executor>
+class basic_signal_set : public signal_set_base
{
+private:
+ class initiate_async_wait;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the signal set type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The signal set type when rebound to the specified executor.
+ typedef basic_signal_set<Executor1> other;
+ };
+
+ /// Construct a signal set without adding any signals.
+ /**
+ * This constructor creates a signal set without registering for any signals.
+ *
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
+ */
+ explicit basic_signal_set(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
/// Construct a signal set without adding any signals.
/**
* This constructor creates a signal set without registering for any signals.
*
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ */
+ template <typename ExecutionContext>
+ explicit basic_signal_set(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct a signal set and add one signal.
+ /**
+ * This constructor creates a signal set and registers for one signal.
+ *
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
+ *
+ * @param signal_number_1 The signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code asio::signal_set signals(ex);
+ * signals.add(signal_number_1); @endcode
*/
- explicit basic_signal_set(asio::io_context& io_context)
- : basic_io_object<SignalSetService>(io_context)
+ basic_signal_set(const executor_type& ex, int signal_number_1)
+ : impl_(0, ex)
{
+ asio::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ asio::detail::throw_error(ec, "add");
}
/// Construct a signal set and add one signal.
/**
* This constructor creates a signal set and registers for one signal.
*
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
*
* @param signal_number_1 The signal number to be added.
*
* @note This constructor is equivalent to performing:
- * @code asio::signal_set signals(io_context);
+ * @code asio::signal_set signals(context);
* signals.add(signal_number_1); @endcode
*/
- basic_signal_set(asio::io_context& io_context, int signal_number_1)
- : basic_io_object<SignalSetService>(io_context)
+ template <typename ExecutionContext>
+ basic_signal_set(ExecutionContext& context, int signal_number_1,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
asio::detail::throw_error(ec, "add");
}
@@ -133,26 +195,60 @@ public:
/**
* This constructor creates a signal set and registers for two signals.
*
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
*
* @param signal_number_1 The first signal number to be added.
*
* @param signal_number_2 The second signal number to be added.
*
* @note This constructor is equivalent to performing:
- * @code asio::signal_set signals(io_context);
+ * @code asio::signal_set signals(ex);
* signals.add(signal_number_1);
* signals.add(signal_number_2); @endcode
*/
- basic_signal_set(asio::io_context& io_context, int signal_number_1,
+ basic_signal_set(const executor_type& ex, int signal_number_1,
int signal_number_2)
- : basic_io_object<SignalSetService>(io_context)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
+ asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add two signals.
+ /**
+ * This constructor creates a signal set and registers for two signals.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ *
+ * @param signal_number_1 The first signal number to be added.
+ *
+ * @param signal_number_2 The second signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code asio::signal_set signals(context);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2); @endcode
+ */
+ template <typename ExecutionContext>
+ basic_signal_set(ExecutionContext& context, int signal_number_1,
+ int signal_number_2,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
asio::detail::throw_error(ec, "add");
}
@@ -160,8 +256,9 @@ public:
/**
* This constructor creates a signal set and registers for three signals.
*
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
+ * @param ex The I/O executor that the signal set will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * signal set.
*
* @param signal_number_1 The first signal number to be added.
*
@@ -170,24 +267,78 @@ public:
* @param signal_number_3 The third signal number to be added.
*
* @note This constructor is equivalent to performing:
- * @code asio::signal_set signals(io_context);
+ * @code asio::signal_set signals(ex);
* signals.add(signal_number_1);
* signals.add(signal_number_2);
* signals.add(signal_number_3); @endcode
*/
- basic_signal_set(asio::io_context& io_context, int signal_number_1,
+ basic_signal_set(const executor_type& ex, int signal_number_1,
int signal_number_2, int signal_number_3)
- : basic_io_object<SignalSetService>(io_context)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
+ asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
+ asio::detail::throw_error(ec, "add");
+ impl_.get_service().add(impl_.get_implementation(), signal_number_3, ec);
+ asio::detail::throw_error(ec, "add");
+ }
+
+ /// Construct a signal set and add three signals.
+ /**
+ * This constructor creates a signal set and registers for three signals.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the signal set will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the signal set.
+ *
+ * @param signal_number_1 The first signal number to be added.
+ *
+ * @param signal_number_2 The second signal number to be added.
+ *
+ * @param signal_number_3 The third signal number to be added.
+ *
+ * @note This constructor is equivalent to performing:
+ * @code asio::signal_set signals(context);
+ * signals.add(signal_number_1);
+ * signals.add(signal_number_2);
+ * signals.add(signal_number_3); @endcode
+ */
+ template <typename ExecutionContext>
+ basic_signal_set(ExecutionContext& context, int signal_number_1,
+ int signal_number_2, int signal_number_3,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec);
asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number_2, ec);
asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_3, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number_3, ec);
asio::detail::throw_error(ec, "add");
}
+ /// Destroys the signal set.
+ /**
+ * This function destroys the signal set, cancelling any outstanding
+ * asynchronous wait operations associated with the signal set as if by
+ * calling @c cancel.
+ */
+ ~basic_signal_set()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
/// Add a signal to a signal_set.
/**
* This function adds the specified signal to the set. It has no effect if the
@@ -200,7 +351,7 @@ public:
void add(int signal_number)
{
asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number, ec);
asio::detail::throw_error(ec, "add");
}
@@ -213,9 +364,62 @@ public:
*
* @param ec Set to indicate what error occurred, if any.
*/
- ASIO_SYNC_OP_VOID add(int signal_number, asio::error_code& ec)
+ ASIO_SYNC_OP_VOID add(int signal_number,
+ asio::error_code& ec)
+ {
+ impl_.get_service().add(impl_.get_implementation(), signal_number, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Add a signal to a signal_set with the specified flags.
+ /**
+ * This function adds the specified signal to the set. It has no effect if the
+ * signal is already in the set.
+ *
+ * Flags other than flags::dont_care require OS support for the @c sigaction
+ * call, and this function will fail with @c error::operation_not_supported if
+ * this is unavailable.
+ *
+ * The specified flags will conflict with a prior, active registration of the
+ * same signal, if either specified a flags value other than flags::dont_care.
+ * In this case, the @c add will fail with @c error::invalid_argument.
+ *
+ * @param signal_number The signal to be added to the set.
+ *
+ * @param f Flags to modify the behaviour of the specified signal.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void add(int signal_number, flags_t f)
+ {
+ asio::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number, f, ec);
+ asio::detail::throw_error(ec, "add");
+ }
+
+ /// Add a signal to a signal_set with the specified flags.
+ /**
+ * This function adds the specified signal to the set. It has no effect if the
+ * signal is already in the set.
+ *
+ * Flags other than flags::dont_care require OS support for the @c sigaction
+ * call, and this function will fail with @c error::operation_not_supported if
+ * this is unavailable.
+ *
+ * The specified flags will conflict with a prior, active registration of the
+ * same signal, if either specified a flags value other than flags::dont_care.
+ * In this case, the @c add will fail with @c error::invalid_argument.
+ *
+ * @param signal_number The signal to be added to the set.
+ *
+ * @param f Flags to modify the behaviour of the specified signal.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID add(int signal_number, flags_t f,
+ asio::error_code& ec)
{
- this->get_service().add(this->get_implementation(), signal_number, ec);
+ impl_.get_service().add(impl_.get_implementation(), signal_number, f, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -234,7 +438,7 @@ public:
void remove(int signal_number)
{
asio::error_code ec;
- this->get_service().remove(this->get_implementation(), signal_number, ec);
+ impl_.get_service().remove(impl_.get_implementation(), signal_number, ec);
asio::detail::throw_error(ec, "remove");
}
@@ -253,7 +457,7 @@ public:
ASIO_SYNC_OP_VOID remove(int signal_number,
asio::error_code& ec)
{
- this->get_service().remove(this->get_implementation(), signal_number, ec);
+ impl_.get_service().remove(impl_.get_implementation(), signal_number, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -269,7 +473,7 @@ public:
void clear()
{
asio::error_code ec;
- this->get_service().clear(this->get_implementation(), ec);
+ impl_.get_service().clear(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "clear");
}
@@ -284,7 +488,7 @@ public:
*/
ASIO_SYNC_OP_VOID clear(asio::error_code& ec)
{
- this->get_service().clear(this->get_implementation(), ec);
+ impl_.get_service().clear(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -312,7 +516,7 @@ public:
void cancel()
{
asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
}
@@ -339,53 +543,106 @@ public:
*/
ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
{
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
/// Start an asynchronous operation to wait for a signal to be delivered.
/**
* This function may be used to initiate an asynchronous wait against the
- * signal set. It always returns immediately.
+ * signal set. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
+ * For each call to async_wait(), the completion handler will be called
+ * exactly once. The completion handler will be called when:
*
* @li One of the registered signals in the signal set occurs; or
*
* @li The signal set was cancelled, in which case the handler is passed the
* error code asio::error::operation_aborted.
*
- * @param handler The handler to be called when the signal occurs. Copies
- * will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* int signal_number // Indicates which signal occurred.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, int) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename SignalHandler>
- ASIO_INITFN_RESULT_TYPE(SignalHandler,
- void (asio::error_code, int))
- async_wait(ASIO_MOVE_ARG(SignalHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code, int))
+ SignalToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ SignalToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<SignalToken, void (asio::error_code, int)>(
+ declval<initiate_async_wait>(), token))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a SignalHandler.
- ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
-
- return this->get_service().async_wait(this->get_implementation(),
- ASIO_MOVE_CAST(SignalHandler)(handler));
+ return async_initiate<SignalToken, void (asio::error_code, int)>(
+ initiate_async_wait(this), token);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_signal_set(const basic_signal_set&) = delete;
+ basic_signal_set& operator=(const basic_signal_set&) = delete;
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_signal_set* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename SignalHandler>
+ void operator()(SignalHandler&& 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 SignalHandler.
+ ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
+
+ detail::non_const_lvalue<SignalHandler> handler2(handler);
+ self_->impl_.get_service().async_wait(
+ self_->impl_.get_implementation(),
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_signal_set* self_;
+ };
+
+ detail::io_object_impl<detail::signal_set_service, Executor> impl_;
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_BASIC_SIGNAL_SET_HPP
diff --git a/3rdparty/asio/include/asio/basic_socket.hpp b/3rdparty/asio/include/asio/basic_socket.hpp
index a1e7b81c3f8..88c4b03fe18 100644
--- a/3rdparty/asio/include/asio/basic_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_socket.hpp
@@ -2,7 +2,7 @@
// basic_socket.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,37 +15,43 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include <utility>
+#include "asio/any_io_executor.hpp"
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
#include "asio/post.hpp"
#include "asio/socket_base.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/winrt_ssocket_service.hpp"
-# define ASIO_SVC_T detail::winrt_ssocket_service<Protocol>
-# elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-# define ASIO_SVC_T detail::win_iocp_socket_service<Protocol>
-# else
-# include "asio/detail/reactive_socket_service.hpp"
-# define ASIO_SVC_T detail::reactive_socket_service<Protocol>
-# endif
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+#if defined(ASIO_WINDOWS_RUNTIME)
+# include "asio/detail/null_socket_service.hpp"
+#elif defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_socket_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_socket_service.hpp"
+#else
+# include "asio/detail/reactive_socket_service.hpp"
+#endif
#include "asio/detail/push_options.hpp"
namespace asio {
+#if !defined(ASIO_BASIC_SOCKET_FWD_DECL)
+#define ASIO_BASIC_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
+class basic_socket;
+
+#endif // !defined(ASIO_BASIC_SOCKET_FWD_DECL)
+
/// Provides socket functionality.
/**
* The basic_socket class template provides functionality that is common to both
@@ -55,20 +61,41 @@ namespace asio {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename Protocol ASIO_SVC_TPARAM>
+template <typename Protocol, typename Executor>
class basic_socket
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
- public socket_base
+ : public socket_base
{
+private:
+ class initiate_async_connect;
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_socket<Protocol, Executor1> other;
+ };
/// The native representation of a socket.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
+#elif defined(ASIO_WINDOWS_RUNTIME)
+ typedef typename detail::null_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef typename detail::win_iocp_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef typename detail::io_uring_socket_service<
+ Protocol>::native_handle_type native_handle_type;
#else
- typedef typename ASIO_SVC_T::native_handle_type native_handle_type;
+ typedef typename detail::reactive_socket_service<
+ Protocol>::native_handle_type native_handle_type;
#endif
/// The protocol type.
@@ -79,18 +106,35 @@ public:
#if !defined(ASIO_NO_EXTENSIONS)
/// A basic_socket is always the lowest layer.
- typedef basic_socket<Protocol ASIO_SVC_TARG> lowest_layer_type;
+ typedef basic_socket<Protocol, Executor> lowest_layer_type;
#endif // !defined(ASIO_NO_EXTENSIONS)
/// Construct a basic_socket without opening it.
/**
* This constructor creates a socket without opening it.
*
- * @param io_context The io_context object that the socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*/
- explicit basic_socket(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ explicit basic_socket(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_socket without opening it.
+ /**
+ * This constructor creates a socket without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_socket(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
}
@@ -98,19 +142,43 @@ public:
/**
* This constructor creates and opens a socket.
*
- * @param io_context The io_context object that the socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_socket(asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_socket(const executor_type& ex, const protocol_type& protocol)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_socket.
+ /**
+ * This constructor creates and opens a socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket(ExecutionContext& context, const protocol_type& protocol,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
asio::detail::throw_error(ec, "open");
}
@@ -121,7 +189,7 @@ public:
* specified endpoint on the local machine. The protocol used is the protocol
* associated with the given endpoint.
*
- * @param io_context The io_context object that the socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*
* @param endpoint An endpoint on the local machine to which the socket will
@@ -129,15 +197,45 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_socket(asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : impl_(0, ex)
{
asio::error_code ec;
const protocol_type protocol = endpoint.protocol();
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
asio::detail::throw_error(ec, "open");
- this->get_service().bind(this->get_implementation(), endpoint, ec);
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ asio::detail::throw_error(ec, "bind");
+ }
+
+ /// Construct a basic_socket, opening it and binding it to the given local
+ /// endpoint.
+ /**
+ * This constructor creates a socket and automatically opens it bound to the
+ * specified endpoint on the local machine. The protocol used is the protocol
+ * associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the socket will
+ * be bound.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket(ExecutionContext& context, const endpoint_type& endpoint,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ const protocol_type protocol = endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ asio::detail::throw_error(ec, "open");
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
asio::detail::throw_error(ec, "bind");
}
@@ -145,7 +243,7 @@ public:
/**
* This constructor creates a socket object to hold an existing native socket.
*
- * @param io_context The io_context object that the socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
@@ -154,17 +252,44 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_socket(asio::io_context& io_context,
- const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_socket(const executor_type& ex, const protocol_type& protocol,
+ const native_handle_type& native_socket)
+ : impl_(0, ex)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_socket, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_socket on an existing native socket.
+ /**
+ * This constructor creates a socket object to hold an existing native socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket A native socket.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket(ExecutionContext& context, const protocol_type& protocol,
+ const native_handle_type& native_socket,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
protocol, native_socket, ec);
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_socket from another.
/**
* This constructor moves a socket from one object to another.
@@ -173,10 +298,10 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket(io_context&) constructor.
+ * constructed using the @c basic_socket(const executor_type&) constructor.
*/
- basic_socket(basic_socket&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
+ basic_socket(basic_socket&& other) noexcept
+ : impl_(std::move(other.impl_))
{
}
@@ -188,16 +313,16 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket(io_context&) constructor.
+ * constructed using the @c basic_socket(const executor_type&) constructor.
*/
basic_socket& operator=(basic_socket&& other)
{
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+ impl_ = std::move(other.impl_);
return *this;
}
// All sockets have access to each other's implementations.
- template <typename Protocol1 ASIO_SVC_TPARAM1>
+ template <typename Protocol1, typename Executor1>
friend class basic_socket;
/// Move-construct a basic_socket from a socket of another protocol type.
@@ -208,15 +333,16 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket(io_context&) constructor.
+ * constructed using the @c basic_socket(const executor_type&) constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- basic_socket(basic_socket<Protocol1 ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_io_object<ASIO_SVC_T>(other.get_service().get_io_context())
+ template <typename Protocol1, typename Executor1>
+ basic_socket(basic_socket<Protocol1, Executor1>&& other,
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ > = 0)
+ : impl_(std::move(other.impl_))
{
- this->get_service().template converting_move_construct<Protocol1>(
- this->get_implementation(), other.get_implementation());
}
/// Move-assign a basic_socket from a socket of another protocol type.
@@ -227,58 +353,25 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket(io_context&) constructor.
+ * constructed using the @c basic_socket(const executor_type&) constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_socket>::type& operator=(
- basic_socket<Protocol1 ASIO_SVC_TARG1>&& other)
+ template <typename Protocol1, typename Executor1>
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_socket&
+ > operator=(basic_socket<Protocol1, Executor1>&& other)
{
basic_socket tmp(std::move(other));
- basic_io_object<ASIO_SVC_T>::operator=(std::move(tmp));
+ impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
- return basic_io_object<ASIO_SVC_T>::get_executor();
+ return impl_.get_executor();
}
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
#if !defined(ASIO_NO_EXTENSIONS)
/// Get a reference to the lowest layer.
@@ -320,14 +413,14 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* socket.open(asio::ip::tcp::v4());
* @endcode
*/
void open(const protocol_type& protocol = protocol_type())
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
asio::detail::throw_error(ec, "open");
}
@@ -341,7 +434,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::error_code ec;
* socket.open(asio::ip::tcp::v4(), ec);
* if (ec)
@@ -353,7 +446,7 @@ public:
ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
asio::error_code& ec)
{
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -371,7 +464,7 @@ public:
const native_handle_type& native_socket)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
protocol, native_socket, ec);
asio::detail::throw_error(ec, "assign");
}
@@ -389,7 +482,7 @@ public:
ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
const native_handle_type& native_socket, asio::error_code& ec)
{
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
protocol, native_socket, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -397,7 +490,7 @@ public:
/// Determine whether the socket is open.
bool is_open() const
{
- return this->get_service().is_open(this->get_implementation());
+ return impl_.get_service().is_open(impl_.get_implementation());
}
/// Close the socket.
@@ -415,7 +508,7 @@ public:
void close()
{
asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "close");
}
@@ -430,7 +523,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::error_code ec;
* socket.close(ec);
@@ -445,10 +538,62 @@ public:
*/
ASIO_SYNC_OP_VOID close(asio::error_code& ec)
{
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
+ /// Release ownership of the underlying native socket.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the asio::error::operation_aborted error. Ownership
+ * of the native socket is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native socket.
+ /**
+ * This function causes all outstanding asynchronous connect, send and receive
+ * operations to finish immediately, and the handlers for cancelled operations
+ * will be passed the asio::error::operation_aborted error. Ownership
+ * of the native socket is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
/// Get the native socket representation.
/**
* This function may be used to obtain the underlying representation of the
@@ -457,7 +602,7 @@ public:
*/
native_handle_type native_handle()
{
- return this->get_service().native_handle(this->get_implementation());
+ return impl_.get_service().native_handle(impl_.get_implementation());
}
/// Cancel all asynchronous operations associated with the socket.
@@ -504,7 +649,7 @@ public:
void cancel()
{
asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
}
@@ -551,7 +696,7 @@ public:
#endif
ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
{
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -568,7 +713,7 @@ public:
bool at_mark() const
{
asio::error_code ec;
- bool b = this->get_service().at_mark(this->get_implementation(), ec);
+ bool b = impl_.get_service().at_mark(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "at_mark");
return b;
}
@@ -585,7 +730,7 @@ public:
*/
bool at_mark(asio::error_code& ec) const
{
- return this->get_service().at_mark(this->get_implementation(), ec);
+ return impl_.get_service().at_mark(impl_.get_implementation(), ec);
}
/// Determine the number of bytes available for reading.
@@ -601,8 +746,8 @@ public:
std::size_t available() const
{
asio::error_code ec;
- std::size_t s = this->get_service().available(
- this->get_implementation(), ec);
+ std::size_t s = impl_.get_service().available(
+ impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "available");
return s;
}
@@ -619,7 +764,7 @@ public:
*/
std::size_t available(asio::error_code& ec) const
{
- return this->get_service().available(this->get_implementation(), ec);
+ return impl_.get_service().available(impl_.get_implementation(), ec);
}
/// Bind the socket to the given local endpoint.
@@ -634,7 +779,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* socket.open(asio::ip::tcp::v4());
* socket.bind(asio::ip::tcp::endpoint(
* asio::ip::tcp::v4(), 12345));
@@ -643,7 +788,7 @@ public:
void bind(const endpoint_type& endpoint)
{
asio::error_code ec;
- this->get_service().bind(this->get_implementation(), endpoint, ec);
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
asio::detail::throw_error(ec, "bind");
}
@@ -659,7 +804,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* socket.open(asio::ip::tcp::v4());
* asio::error_code ec;
* socket.bind(asio::ip::tcp::endpoint(
@@ -673,7 +818,7 @@ public:
ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
asio::error_code& ec)
{
- this->get_service().bind(this->get_implementation(), endpoint, ec);
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -694,7 +839,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::ip::tcp::endpoint endpoint(
* asio::ip::address::from_string("1.2.3.4"), 12345);
* socket.connect(endpoint);
@@ -705,11 +850,11 @@ public:
asio::error_code ec;
if (!is_open())
{
- this->get_service().open(this->get_implementation(),
+ impl_.get_service().open(impl_.get_implementation(),
peer_endpoint.protocol(), ec);
asio::detail::throw_error(ec, "connect");
}
- this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
+ impl_.get_service().connect(impl_.get_implementation(), peer_endpoint, ec);
asio::detail::throw_error(ec, "connect");
}
@@ -730,7 +875,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::ip::tcp::endpoint endpoint(
* asio::ip::address::from_string("1.2.3.4"), 12345);
* asio::error_code ec;
@@ -746,7 +891,7 @@ public:
{
if (!is_open())
{
- this->get_service().open(this->get_implementation(),
+ impl_.get_service().open(impl_.get_implementation(),
peer_endpoint.protocol(), ec);
if (ec)
{
@@ -754,14 +899,15 @@ public:
}
}
- this->get_service().connect(this->get_implementation(), peer_endpoint, ec);
+ impl_.get_service().connect(impl_.get_implementation(), peer_endpoint, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
/// Start an asynchronous connect.
/**
* This function is used to asynchronously connect a socket to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* The socket is automatically opened if it is not already open. If the
* connect fails, and the socket was automatically opened, the socket is
@@ -770,16 +916,21 @@ public:
* @param peer_endpoint The remote endpoint to which the socket will be
* connected. Copies will be made of the endpoint object as required.
*
- * @param handler The handler to be called when the connection operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Example
* @code
@@ -793,54 +944,41 @@ public:
*
* ...
*
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::ip::tcp::endpoint endpoint(
* asio::ip::address::from_string("1.2.3.4"), 12345);
* socket.async_connect(endpoint, connect_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConnectHandler>
- ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (asio::error_code))
- async_connect(const endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(ConnectHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ ConnectToken = default_completion_token_t<executor_type>>
+ auto async_connect(const endpoint_type& peer_endpoint,
+ ConnectToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ConnectToken, void (asio::error_code)>(
+ declval<initiate_async_connect>(), token,
+ peer_endpoint, declval<asio::error_code&>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ConnectHandler.
- ASIO_CONNECT_HANDLER_CHECK(ConnectHandler, handler) type_check;
-
+ asio::error_code open_ec;
if (!is_open())
{
- asio::error_code ec;
const protocol_type protocol = peer_endpoint.protocol();
- this->get_service().open(this->get_implementation(), protocol, ec);
- if (ec)
- {
- async_completion<ConnectHandler,
- void (asio::error_code)> init(handler);
-
- asio::post(this->get_executor(),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(
- ConnectHandler, void (asio::error_code)))(
- init.completion_handler), ec));
-
- return init.result.get();
- }
+ impl_.get_service().open(impl_.get_implementation(), protocol, open_ec);
}
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_connect(this->get_implementation(),
- peer_endpoint, ASIO_MOVE_CAST(ConnectHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ConnectHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_connect(
- this->get_implementation(), peer_endpoint, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ConnectToken, void (asio::error_code)>(
+ initiate_async_connect(this), token, peer_endpoint, open_ec);
}
/// Set an option on the socket.
@@ -871,7 +1009,7 @@ public:
* @par Example
* Setting the IPPROTO_TCP/TCP_NODELAY option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::no_delay option(true);
* socket.set_option(option);
@@ -881,7 +1019,7 @@ public:
void set_option(const SettableSocketOption& option)
{
asio::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
asio::detail::throw_error(ec, "set_option");
}
@@ -913,7 +1051,7 @@ public:
* @par Example
* Setting the IPPROTO_TCP/TCP_NODELAY option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::no_delay option(true);
* asio::error_code ec;
@@ -928,7 +1066,7 @@ public:
ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
asio::error_code& ec)
{
- this->get_service().set_option(this->get_implementation(), option, ec);
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -960,7 +1098,7 @@ public:
* @par Example
* Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::socket::keep_alive option;
* socket.get_option(option);
@@ -971,7 +1109,7 @@ public:
void get_option(GettableSocketOption& option) const
{
asio::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
asio::detail::throw_error(ec, "get_option");
}
@@ -1003,7 +1141,7 @@ public:
* @par Example
* Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::socket::keep_alive option;
* asio::error_code ec;
@@ -1019,7 +1157,7 @@ public:
ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
asio::error_code& ec) const
{
- this->get_service().get_option(this->get_implementation(), option, ec);
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1038,7 +1176,7 @@ public:
* @par Example
* Getting the number of bytes ready to read:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::socket::bytes_readable command;
* socket.io_control(command);
@@ -1049,7 +1187,7 @@ public:
void io_control(IoControlCommand& command)
{
asio::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
asio::detail::throw_error(ec, "io_control");
}
@@ -1068,7 +1206,7 @@ public:
* @par Example
* Getting the number of bytes ready to read:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::socket::bytes_readable command;
* asio::error_code ec;
@@ -1084,7 +1222,7 @@ public:
ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
asio::error_code& ec)
{
- this->get_service().io_control(this->get_implementation(), command, ec);
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1101,7 +1239,7 @@ public:
*/
bool non_blocking() const
{
- return this->get_service().non_blocking(this->get_implementation());
+ return impl_.get_service().non_blocking(impl_.get_implementation());
}
/// Sets the non-blocking mode of the socket.
@@ -1120,7 +1258,7 @@ public:
void non_blocking(bool mode)
{
asio::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
asio::detail::throw_error(ec, "non_blocking");
}
@@ -1140,7 +1278,7 @@ public:
ASIO_SYNC_OP_VOID non_blocking(
bool mode, asio::error_code& ec)
{
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1230,7 +1368,7 @@ public:
*/
bool native_non_blocking() const
{
- return this->get_service().native_non_blocking(this->get_implementation());
+ return impl_.get_service().native_non_blocking(impl_.get_implementation());
}
/// Sets the non-blocking mode of the native socket implementation.
@@ -1321,8 +1459,8 @@ public:
void native_non_blocking(bool mode)
{
asio::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
asio::detail::throw_error(ec, "native_non_blocking");
}
@@ -1414,8 +1552,8 @@ public:
ASIO_SYNC_OP_VOID native_non_blocking(
bool mode, asio::error_code& ec)
{
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1429,7 +1567,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
* @endcode
@@ -1437,8 +1575,8 @@ public:
endpoint_type local_endpoint() const
{
asio::error_code ec;
- endpoint_type ep = this->get_service().local_endpoint(
- this->get_implementation(), ec);
+ endpoint_type ep = impl_.get_service().local_endpoint(
+ impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "local_endpoint");
return ep;
}
@@ -1454,7 +1592,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::error_code ec;
* asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
@@ -1466,7 +1604,7 @@ public:
*/
endpoint_type local_endpoint(asio::error_code& ec) const
{
- return this->get_service().local_endpoint(this->get_implementation(), ec);
+ return impl_.get_service().local_endpoint(impl_.get_implementation(), ec);
}
/// Get the remote endpoint of the socket.
@@ -1479,7 +1617,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
* @endcode
@@ -1487,8 +1625,8 @@ public:
endpoint_type remote_endpoint() const
{
asio::error_code ec;
- endpoint_type ep = this->get_service().remote_endpoint(
- this->get_implementation(), ec);
+ endpoint_type ep = impl_.get_service().remote_endpoint(
+ impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "remote_endpoint");
return ep;
}
@@ -1504,7 +1642,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::error_code ec;
* asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
@@ -1516,7 +1654,7 @@ public:
*/
endpoint_type remote_endpoint(asio::error_code& ec) const
{
- return this->get_service().remote_endpoint(this->get_implementation(), ec);
+ return impl_.get_service().remote_endpoint(impl_.get_implementation(), ec);
}
/// Disable sends or receives on the socket.
@@ -1531,7 +1669,7 @@ public:
* @par Example
* Shutting down the send side of the socket:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* socket.shutdown(asio::ip::tcp::socket::shutdown_send);
* @endcode
@@ -1539,7 +1677,7 @@ public:
void shutdown(shutdown_type what)
{
asio::error_code ec;
- this->get_service().shutdown(this->get_implementation(), what, ec);
+ impl_.get_service().shutdown(impl_.get_implementation(), what, ec);
asio::detail::throw_error(ec, "shutdown");
}
@@ -1555,7 +1693,7 @@ public:
* @par Example
* Shutting down the send side of the socket:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::error_code ec;
* socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
@@ -1568,7 +1706,7 @@ public:
ASIO_SYNC_OP_VOID shutdown(shutdown_type what,
asio::error_code& ec)
{
- this->get_service().shutdown(this->get_implementation(), what, ec);
+ impl_.get_service().shutdown(impl_.get_implementation(), what, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1583,7 +1721,7 @@ public:
* @par Example
* Waiting for a socket to become readable.
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* socket.wait(asio::ip::tcp::socket::wait_read);
* @endcode
@@ -1591,7 +1729,7 @@ public:
void wait(wait_type w)
{
asio::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
asio::detail::throw_error(ec, "wait");
}
@@ -1608,7 +1746,7 @@ public:
* @par Example
* Waiting for a socket to become readable.
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::error_code ec;
* socket.wait(asio::ip::tcp::socket::wait_read, ec);
@@ -1616,7 +1754,7 @@ public:
*/
ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
{
- this->get_service().wait(this->get_implementation(), w, ec);
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1624,20 +1762,27 @@ public:
/// write, or to have pending error conditions.
/**
* This function is used to perform an asynchronous wait for a socket to enter
- * a ready to read, write or error condition state.
+ * a ready to read, write or error condition state. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param w Specifies the desired socket state.
*
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Example
* @code
@@ -1651,32 +1796,32 @@ public:
*
* ...
*
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w, ASIO_MOVE_ARG(WaitHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(wait_type w,
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token, w))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- w, ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- w, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token, w);
}
protected:
@@ -1689,18 +1834,103 @@ protected:
{
}
+#if defined(ASIO_WINDOWS_RUNTIME)
+ detail::io_object_impl<
+ detail::null_socket_service<Protocol>, Executor> impl_;
+#elif defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<
+ detail::win_iocp_socket_service<Protocol>, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<
+ detail::io_uring_socket_service<Protocol>, Executor> impl_;
+#else
+ detail::io_object_impl<
+ detail::reactive_socket_service<Protocol>, Executor> impl_;
+#endif
+
private:
// Disallow copying and assignment.
- basic_socket(const basic_socket&) ASIO_DELETED;
- basic_socket& operator=(const basic_socket&) ASIO_DELETED;
+ basic_socket(const basic_socket&) = delete;
+ basic_socket& operator=(const basic_socket&) = delete;
+
+ class initiate_async_connect
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_connect(basic_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ConnectHandler>
+ void operator()(ConnectHandler&& handler,
+ const endpoint_type& peer_endpoint,
+ const asio::error_code& open_ec) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ConnectHandler.
+ ASIO_CONNECT_HANDLER_CHECK(ConnectHandler, handler) type_check;
+
+ if (open_ec)
+ {
+ asio::post(self_->impl_.get_executor(),
+ asio::detail::bind_handler(
+ static_cast<ConnectHandler&&>(handler), open_ec));
+ }
+ else
+ {
+ detail::non_const_lvalue<ConnectHandler> handler2(handler);
+ self_->impl_.get_service().async_connect(
+ self_->impl_.get_implementation(), peer_endpoint,
+ handler2.value, self_->impl_.get_executor());
+ }
+ }
+
+ private:
+ basic_socket* self_;
+ };
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WaitHandler>
+ void operator()(WaitHandler&& handler, wait_type w) 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.
+ 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(), w,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_socket* self_;
+ };
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_BASIC_SOCKET_HPP
diff --git a/3rdparty/asio/include/asio/basic_socket_acceptor.hpp b/3rdparty/asio/include/asio/basic_socket_acceptor.hpp
index 9554bb9ed30..059d33ead53 100644
--- a/3rdparty/asio/include/asio/basic_socket_acceptor.hpp
+++ b/3rdparty/asio/include/asio/basic_socket_acceptor.hpp
@@ -2,7 +2,7 @@
// basic_socket_acceptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,38 +15,42 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include <utility>
#include "asio/detail/config.hpp"
-#include "asio/basic_io_object.hpp"
+#include "asio/any_io_executor.hpp"
#include "asio/basic_socket.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
#include "asio/socket_base.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/socket_acceptor_service.hpp"
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_socket_service.hpp"
-# define ASIO_SVC_T detail::null_socket_service<Protocol>
-# elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-# define ASIO_SVC_T detail::win_iocp_socket_service<Protocol>
-# else
-# include "asio/detail/reactive_socket_service.hpp"
-# define ASIO_SVC_T detail::reactive_socket_service<Protocol>
-# endif
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+#if defined(ASIO_WINDOWS_RUNTIME)
+# include "asio/detail/null_socket_service.hpp"
+#elif defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_socket_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_socket_service.hpp"
+#else
+# include "asio/detail/reactive_socket_service.hpp"
+#endif
#include "asio/detail/push_options.hpp"
namespace asio {
+#if !defined(ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+#define ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
+class basic_socket_acceptor;
+
+#endif // !defined(ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+
/// Provides the ability to accept new connections.
/**
* The basic_socket_acceptor class template is used for accepting new socket
@@ -56,10 +60,16 @@ namespace asio {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
+ * Synchronous @c accept operations are thread safe, if the underlying
+ * operating system calls are also thread safe. This means that it is permitted
+ * to perform concurrent calls to synchronous @c accept operations on a single
+ * socket object. Other synchronous operations, such as @c open or @c close, are
+ * not thread safe.
+ *
* @par Example
* Opening a socket acceptor with the SO_REUSEADDR option enabled:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), port);
* acceptor.open(endpoint.protocol());
* acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true));
@@ -67,21 +77,42 @@ namespace asio {
* acceptor.listen();
* @endcode
*/
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= socket_acceptor_service<Protocol>)>
+template <typename Protocol, typename Executor>
class basic_socket_acceptor
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
- public socket_base
+ : public socket_base
{
+private:
+ class initiate_async_wait;
+ class initiate_async_accept;
+ class initiate_async_move_accept;
+
public:
/// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
+ typedef Executor executor_type;
+
+ /// Rebinds the acceptor type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_socket_acceptor<Protocol, Executor1> other;
+ };
/// The native representation of an acceptor.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
+#elif defined(ASIO_WINDOWS_RUNTIME)
+ typedef typename detail::null_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef typename detail::win_iocp_socket_service<
+ Protocol>::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef typename detail::io_uring_socket_service<
+ Protocol>::native_handle_type native_handle_type;
#else
- typedef typename ASIO_SVC_T::native_handle_type native_handle_type;
+ typedef typename detail::reactive_socket_service<
+ Protocol>::native_handle_type native_handle_type;
#endif
/// The protocol type.
@@ -96,12 +127,31 @@ public:
* connections. The open() function must be called before the acceptor can
* accept new socket connections.
*
- * @param io_context The io_context object that the acceptor will use to
+ * @param ex The I/O executor that the acceptor will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* acceptor.
*/
- explicit basic_socket_acceptor(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ explicit basic_socket_acceptor(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct an acceptor without opening it.
+ /**
+ * This constructor creates an acceptor without opening it to listen for new
+ * connections. The open() function must be called before the acceptor can
+ * accept new socket connections.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ */
+ template <typename ExecutionContext>
+ explicit basic_socket_acceptor(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
}
@@ -109,7 +159,7 @@ public:
/**
* This constructor creates an acceptor and automatically opens it.
*
- * @param io_context The io_context object that the acceptor will use to
+ * @param ex The I/O executor that the acceptor will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* acceptor.
*
@@ -117,12 +167,37 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_socket_acceptor(asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_socket_acceptor(const executor_type& ex, const protocol_type& protocol)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct an open acceptor.
+ /**
+ * This constructor creates an acceptor and automatically opens it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket_acceptor(ExecutionContext& context,
+ const protocol_type& protocol,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
asio::detail::throw_error(ec, "open");
}
@@ -131,7 +206,7 @@ public:
* This constructor creates an acceptor and automatically opens it to listen
* for new connections on the specified endpoint.
*
- * @param io_context The io_context object that the acceptor will use to
+ * @param ex The I/O executor that the acceptor will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* acceptor.
*
@@ -145,31 +220,83 @@ public:
*
* @note This constructor is equivalent to the following code:
* @code
- * basic_socket_acceptor<Protocol> acceptor(io_context);
+ * basic_socket_acceptor<Protocol> acceptor(my_context);
* acceptor.open(endpoint.protocol());
* if (reuse_addr)
* acceptor.set_option(socket_base::reuse_address(true));
* acceptor.bind(endpoint);
- * acceptor.listen(listen_backlog);
+ * acceptor.listen();
* @endcode
*/
- basic_socket_acceptor(asio::io_context& io_context,
+ basic_socket_acceptor(const executor_type& ex,
const endpoint_type& endpoint, bool reuse_addr = true)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ const protocol_type protocol = endpoint.protocol();
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
+ asio::detail::throw_error(ec, "open");
+ if (reuse_addr)
+ {
+ impl_.get_service().set_option(impl_.get_implementation(),
+ socket_base::reuse_address(true), ec);
+ asio::detail::throw_error(ec, "set_option");
+ }
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
+ asio::detail::throw_error(ec, "bind");
+ impl_.get_service().listen(impl_.get_implementation(),
+ socket_base::max_listen_connections, ec);
+ asio::detail::throw_error(ec, "listen");
+ }
+
+ /// Construct an acceptor opened on the given endpoint.
+ /**
+ * This constructor creates an acceptor and automatically opens it to listen
+ * for new connections on the specified endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ *
+ * @param endpoint An endpoint on the local machine on which the acceptor
+ * will listen for new connections.
+ *
+ * @param reuse_addr Whether the constructor should set the socket option
+ * socket_base::reuse_address.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This constructor is equivalent to the following code:
+ * @code
+ * basic_socket_acceptor<Protocol> acceptor(my_context);
+ * acceptor.open(endpoint.protocol());
+ * if (reuse_addr)
+ * acceptor.set_option(socket_base::reuse_address(true));
+ * acceptor.bind(endpoint);
+ * acceptor.listen();
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ basic_socket_acceptor(ExecutionContext& context,
+ const endpoint_type& endpoint, bool reuse_addr = true,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
asio::error_code ec;
const protocol_type protocol = endpoint.protocol();
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
asio::detail::throw_error(ec, "open");
if (reuse_addr)
{
- this->get_service().set_option(this->get_implementation(),
+ impl_.get_service().set_option(impl_.get_implementation(),
socket_base::reuse_address(true), ec);
asio::detail::throw_error(ec, "set_option");
}
- this->get_service().bind(this->get_implementation(), endpoint, ec);
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
asio::detail::throw_error(ec, "bind");
- this->get_service().listen(this->get_implementation(),
+ impl_.get_service().listen(impl_.get_implementation(),
socket_base::max_listen_connections, ec);
asio::detail::throw_error(ec, "listen");
}
@@ -179,7 +306,7 @@ public:
* This constructor creates an acceptor object to hold an existing native
* acceptor.
*
- * @param io_context The io_context object that the acceptor will use to
+ * @param ex The I/O executor that the acceptor will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* acceptor.
*
@@ -189,17 +316,45 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_socket_acceptor(asio::io_context& io_context,
+ basic_socket_acceptor(const executor_type& ex,
const protocol_type& protocol, const native_handle_type& native_acceptor)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ protocol, native_acceptor, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_socket_acceptor on an existing native acceptor.
+ /**
+ * This constructor creates an acceptor object to hold an existing native
+ * acceptor.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the acceptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the acceptor.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_acceptor A native acceptor.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_socket_acceptor(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_acceptor,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
protocol, native_acceptor, ec);
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_socket_acceptor from another.
/**
* This constructor moves an acceptor from one object to another.
@@ -208,10 +363,11 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket_acceptor(io_context&) constructor.
+ * constructed using the @c basic_socket_acceptor(const executor_type&)
+ * constructor.
*/
- basic_socket_acceptor(basic_socket_acceptor&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
+ basic_socket_acceptor(basic_socket_acceptor&& other) noexcept
+ : impl_(std::move(other.impl_))
{
}
@@ -223,16 +379,17 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket_acceptor(io_context&) constructor.
+ * constructed using the @c basic_socket_acceptor(const executor_type&)
+ * constructor.
*/
basic_socket_acceptor& operator=(basic_socket_acceptor&& other)
{
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+ impl_ = std::move(other.impl_);
return *this;
}
// All socket acceptors have access to each other's implementations.
- template <typename Protocol1 ASIO_SVC_TPARAM1>
+ template <typename Protocol1, typename Executor1>
friend class basic_socket_acceptor;
/// Move-construct a basic_socket_acceptor from an acceptor of another
@@ -244,17 +401,17 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket(io_context&) constructor.
+ * constructed using the @c basic_socket_acceptor(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- basic_socket_acceptor(
- basic_socket_acceptor<Protocol1 ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_io_object<ASIO_SVC_T>(
- other.get_service().get_io_context())
+ template <typename Protocol1, typename Executor1>
+ basic_socket_acceptor(basic_socket_acceptor<Protocol1, Executor1>&& other,
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ > = 0)
+ : impl_(std::move(other.impl_))
{
- this->get_service().template converting_move_construct<Protocol1>(
- this->get_implementation(), other.get_implementation());
}
/// Move-assign a basic_socket_acceptor from an acceptor of another protocol
@@ -266,18 +423,20 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_socket(io_context&) constructor.
+ * constructed using the @c basic_socket_acceptor(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_socket_acceptor>::type& operator=(
- basic_socket_acceptor<Protocol1 ASIO_SVC_TARG1>&& other)
+ template <typename Protocol1, typename Executor1>
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_socket_acceptor&
+ > operator=(basic_socket_acceptor<Protocol1, Executor1>&& other)
{
basic_socket_acceptor tmp(std::move(other));
- basic_io_object<ASIO_SVC_T>::operator=(std::move(tmp));
+ impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the acceptor.
/**
@@ -289,45 +448,11 @@ public:
{
}
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
- return basic_io_object<ASIO_SVC_T>::get_executor();
+ return impl_.get_executor();
}
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
/// Open the acceptor using the specified protocol.
/**
@@ -340,14 +465,14 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* acceptor.open(asio::ip::tcp::v4());
* @endcode
*/
void open(const protocol_type& protocol = protocol_type())
{
asio::error_code ec;
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
asio::detail::throw_error(ec, "open");
}
@@ -362,7 +487,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* asio::error_code ec;
* acceptor.open(asio::ip::tcp::v4(), ec);
* if (ec)
@@ -374,7 +499,7 @@ public:
ASIO_SYNC_OP_VOID open(const protocol_type& protocol,
asio::error_code& ec)
{
- this->get_service().open(this->get_implementation(), protocol, ec);
+ impl_.get_service().open(impl_.get_implementation(), protocol, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -392,7 +517,7 @@ public:
const native_handle_type& native_acceptor)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
protocol, native_acceptor, ec);
asio::detail::throw_error(ec, "assign");
}
@@ -410,7 +535,7 @@ public:
ASIO_SYNC_OP_VOID assign(const protocol_type& protocol,
const native_handle_type& native_acceptor, asio::error_code& ec)
{
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
protocol, native_acceptor, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -418,7 +543,7 @@ public:
/// Determine whether the acceptor is open.
bool is_open() const
{
- return this->get_service().is_open(this->get_implementation());
+ return impl_.get_service().is_open(impl_.get_implementation());
}
/// Bind the acceptor to the given local endpoint.
@@ -433,7 +558,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 12345);
* acceptor.open(endpoint.protocol());
* acceptor.bind(endpoint);
@@ -442,7 +567,7 @@ public:
void bind(const endpoint_type& endpoint)
{
asio::error_code ec;
- this->get_service().bind(this->get_implementation(), endpoint, ec);
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
asio::detail::throw_error(ec, "bind");
}
@@ -458,7 +583,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 12345);
* acceptor.open(endpoint.protocol());
* asio::error_code ec;
@@ -472,7 +597,7 @@ public:
ASIO_SYNC_OP_VOID bind(const endpoint_type& endpoint,
asio::error_code& ec)
{
- this->get_service().bind(this->get_implementation(), endpoint, ec);
+ impl_.get_service().bind(impl_.get_implementation(), endpoint, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -489,7 +614,7 @@ public:
void listen(int backlog = socket_base::max_listen_connections)
{
asio::error_code ec;
- this->get_service().listen(this->get_implementation(), backlog, ec);
+ impl_.get_service().listen(impl_.get_implementation(), backlog, ec);
asio::detail::throw_error(ec, "listen");
}
@@ -505,7 +630,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::error_code ec;
* acceptor.listen(asio::socket_base::max_listen_connections, ec);
@@ -517,7 +642,7 @@ public:
*/
ASIO_SYNC_OP_VOID listen(int backlog, asio::error_code& ec)
{
- this->get_service().listen(this->get_implementation(), backlog, ec);
+ impl_.get_service().listen(impl_.get_implementation(), backlog, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -534,7 +659,7 @@ public:
void close()
{
asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "close");
}
@@ -550,7 +675,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::error_code ec;
* acceptor.close(ec);
@@ -562,10 +687,62 @@ public:
*/
ASIO_SYNC_OP_VOID close(asio::error_code& ec)
{
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
+ /// Release ownership of the underlying native acceptor.
+ /**
+ * This function causes all outstanding asynchronous accept operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native acceptor is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native acceptor.
+ /**
+ * This function causes all outstanding asynchronous accept operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native acceptor is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
/// Get the native acceptor representation.
/**
* This function may be used to obtain the underlying representation of the
@@ -574,7 +751,7 @@ public:
*/
native_handle_type native_handle()
{
- return this->get_service().native_handle(this->get_implementation());
+ return impl_.get_service().native_handle(impl_.get_implementation());
}
/// Cancel all asynchronous operations associated with the acceptor.
@@ -588,7 +765,7 @@ public:
void cancel()
{
asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
}
@@ -602,7 +779,7 @@ public:
*/
ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
{
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -621,7 +798,7 @@ public:
* @par Example
* Setting the SOL_SOCKET/SO_REUSEADDR option:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::acceptor::reuse_address option(true);
* acceptor.set_option(option);
@@ -631,7 +808,7 @@ public:
void set_option(const SettableSocketOption& option)
{
asio::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
asio::detail::throw_error(ec, "set_option");
}
@@ -650,7 +827,7 @@ public:
* @par Example
* Setting the SOL_SOCKET/SO_REUSEADDR option:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::acceptor::reuse_address option(true);
* asio::error_code ec;
@@ -665,7 +842,7 @@ public:
ASIO_SYNC_OP_VOID set_option(const SettableSocketOption& option,
asio::error_code& ec)
{
- this->get_service().set_option(this->get_implementation(), option, ec);
+ impl_.get_service().set_option(impl_.get_implementation(), option, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -684,7 +861,7 @@ public:
* @par Example
* Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::acceptor::reuse_address option;
* acceptor.get_option(option);
@@ -692,10 +869,10 @@ public:
* @endcode
*/
template <typename GettableSocketOption>
- void get_option(GettableSocketOption& option)
+ void get_option(GettableSocketOption& option) const
{
asio::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
asio::detail::throw_error(ec, "get_option");
}
@@ -714,7 +891,7 @@ public:
* @par Example
* Getting the value of the SOL_SOCKET/SO_REUSEADDR option:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::acceptor::reuse_address option;
* asio::error_code ec;
@@ -728,9 +905,9 @@ public:
*/
template <typename GettableSocketOption>
ASIO_SYNC_OP_VOID get_option(GettableSocketOption& option,
- asio::error_code& ec)
+ asio::error_code& ec) const
{
- this->get_service().get_option(this->get_implementation(), option, ec);
+ impl_.get_service().get_option(impl_.get_implementation(), option, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -748,7 +925,7 @@ public:
* @par Example
* Getting the number of bytes ready to read:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::acceptor::non_blocking_io command(true);
* socket.io_control(command);
@@ -758,7 +935,7 @@ public:
void io_control(IoControlCommand& command)
{
asio::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
asio::detail::throw_error(ec, "io_control");
}
@@ -776,7 +953,7 @@ public:
* @par Example
* Getting the number of bytes ready to read:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::acceptor::non_blocking_io command(true);
* asio::error_code ec;
@@ -791,7 +968,7 @@ public:
ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
asio::error_code& ec)
{
- this->get_service().io_control(this->get_implementation(), command, ec);
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -808,7 +985,7 @@ public:
*/
bool non_blocking() const
{
- return this->get_service().non_blocking(this->get_implementation());
+ return impl_.get_service().non_blocking(impl_.get_implementation());
}
/// Sets the non-blocking mode of the acceptor.
@@ -827,7 +1004,7 @@ public:
void non_blocking(bool mode)
{
asio::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
asio::detail::throw_error(ec, "non_blocking");
}
@@ -847,7 +1024,7 @@ public:
ASIO_SYNC_OP_VOID non_blocking(
bool mode, asio::error_code& ec)
{
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -867,7 +1044,7 @@ public:
*/
bool native_non_blocking() const
{
- return this->get_service().native_non_blocking(this->get_implementation());
+ return impl_.get_service().native_non_blocking(impl_.get_implementation());
}
/// Sets the non-blocking mode of the native acceptor implementation.
@@ -888,8 +1065,8 @@ public:
void native_non_blocking(bool mode)
{
asio::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
asio::detail::throw_error(ec, "native_non_blocking");
}
@@ -911,8 +1088,8 @@ public:
ASIO_SYNC_OP_VOID native_non_blocking(
bool mode, asio::error_code& ec)
{
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -926,7 +1103,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
* @endcode
@@ -934,8 +1111,8 @@ public:
endpoint_type local_endpoint() const
{
asio::error_code ec;
- endpoint_type ep = this->get_service().local_endpoint(
- this->get_implementation(), ec);
+ endpoint_type ep = impl_.get_service().local_endpoint(
+ impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "local_endpoint");
return ep;
}
@@ -952,7 +1129,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::error_code ec;
* asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
@@ -964,7 +1141,7 @@ public:
*/
endpoint_type local_endpoint(asio::error_code& ec) const
{
- return this->get_service().local_endpoint(this->get_implementation(), ec);
+ return impl_.get_service().local_endpoint(impl_.get_implementation(), ec);
}
/// Wait for the acceptor to become ready to read, ready to write, or to have
@@ -978,7 +1155,7 @@ public:
* @par Example
* Waiting for an acceptor to become readable.
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* acceptor.wait(asio::ip::tcp::acceptor::wait_read);
* @endcode
@@ -986,7 +1163,7 @@ public:
void wait(wait_type w)
{
asio::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
asio::detail::throw_error(ec, "wait");
}
@@ -1003,7 +1180,7 @@ public:
* @par Example
* Waiting for an acceptor to become readable.
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::error_code ec;
* acceptor.wait(asio::ip::tcp::acceptor::wait_read, ec);
@@ -1011,7 +1188,7 @@ public:
*/
ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
{
- this->get_service().wait(this->get_implementation(), w, ec);
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1019,20 +1196,27 @@ public:
/// write, or to have pending error conditions.
/**
* This function is used to perform an asynchronous wait for an acceptor to
- * enter a ready to read, write or error condition state.
+ * enter a ready to read, write or error condition state. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param w Specifies the desired acceptor state.
*
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Example
* @code
@@ -1046,34 +1230,34 @@ public:
*
* ...
*
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* acceptor.async_wait(
* asio::ip::tcp::acceptor::wait_read,
* wait_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w, ASIO_MOVE_ARG(WaitHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(wait_type w,
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token, w))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- w, ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- w, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token, w);
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -1089,24 +1273,20 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* acceptor.accept(socket);
* @endcode
*/
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename SocketService>
- void accept(basic_socket<Protocol1, SocketService>& peer,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1>
- void accept(basic_socket<Protocol1>& peer,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <typename Protocol1, typename Executor1>
+ void accept(basic_socket<Protocol1, Executor1>& peer,
+ constraint_t<
+ is_convertible<Protocol, Protocol1>::value
+ > = 0)
{
asio::error_code ec;
- this->get_service().accept(this->get_implementation(),
+ impl_.get_service().accept(impl_.get_implementation(),
peer, static_cast<endpoint_type*>(0), ec);
asio::detail::throw_error(ec, "accept");
}
@@ -1123,9 +1303,9 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::error_code ec;
* acceptor.accept(socket, ec);
* if (ec)
@@ -1134,20 +1314,14 @@ public:
* }
* @endcode
*/
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename SocketService>
- ASIO_SYNC_OP_VOID accept(
- basic_socket<Protocol1, SocketService>& peer,
- asio::error_code& ec,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1>
+ template <typename Protocol1, typename Executor1>
ASIO_SYNC_OP_VOID accept(
- basic_socket<Protocol1>& peer, asio::error_code& ec,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ basic_socket<Protocol1, Executor1>& peer, asio::error_code& ec,
+ constraint_t<
+ is_convertible<Protocol, Protocol1>::value
+ > = 0)
{
- this->get_service().accept(this->get_implementation(),
+ impl_.get_service().accept(impl_.get_implementation(),
peer, static_cast<endpoint_type*>(0), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1155,22 +1329,29 @@ public:
/// Start an asynchronous accept.
/**
* This function is used to asynchronously accept a new connection into a
- * socket. The function call always returns immediately.
+ * socket, and additionally obtain the endpoint of the remote peer. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param peer The socket into which the new connection will be accepted.
* Ownership of the peer object is retained by the caller, which must
- * guarantee that it is valid until the handler is called.
+ * guarantee that it is valid until the completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Example
* @code
@@ -1184,45 +1365,38 @@ public:
*
* ...
*
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* acceptor.async_accept(socket, accept_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename SocketService, typename AcceptHandler>
- ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(basic_socket<Protocol1, SocketService>& peer,
- ASIO_MOVE_ARG(AcceptHandler) handler,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename Protocol1, typename AcceptHandler>
- ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(basic_socket<Protocol1>& peer,
- ASIO_MOVE_ARG(AcceptHandler) handler,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a AcceptHandler.
- ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(),
- peer, static_cast<endpoint_type*>(0),
- ASIO_MOVE_CAST(AcceptHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<AcceptHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- peer, static_cast<endpoint_type*>(0), init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <typename Protocol1, typename Executor1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ AcceptToken = default_completion_token_t<executor_type>>
+ auto async_accept(basic_socket<Protocol1, Executor1>& peer,
+ AcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_convertible<Protocol, Protocol1>::value
+ > = 0)
+ -> decltype(
+ async_initiate<AcceptToken, void (asio::error_code)>(
+ declval<initiate_async_accept>(), token,
+ &peer, static_cast<endpoint_type*>(0)))
+ {
+ return async_initiate<AcceptToken, void (asio::error_code)>(
+ initiate_async_accept(this), token,
+ &peer, static_cast<endpoint_type*>(0));
}
/// Accept a new connection and obtain the endpoint of the peer
@@ -1241,23 +1415,19 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::ip::tcp::endpoint endpoint;
* acceptor.accept(socket, endpoint);
* @endcode
*/
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename SocketService>
- void accept(basic_socket<protocol_type, SocketService>& peer,
+ template <typename Executor1>
+ void accept(basic_socket<protocol_type, Executor1>& peer,
endpoint_type& peer_endpoint)
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- void accept(basic_socket<protocol_type>& peer, endpoint_type& peer_endpoint)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
{
asio::error_code ec;
- this->get_service().accept(this->get_implementation(),
+ impl_.get_service().accept(impl_.get_implementation(),
peer, &peer_endpoint, ec);
asio::detail::throw_error(ec, "accept");
}
@@ -1278,9 +1448,9 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* asio::ip::tcp::endpoint endpoint;
* asio::error_code ec;
* acceptor.accept(socket, endpoint, ec);
@@ -1290,81 +1460,72 @@ public:
* }
* @endcode
*/
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename SocketService>
- ASIO_SYNC_OP_VOID accept(
- basic_socket<protocol_type, SocketService>& peer,
- endpoint_type& peer_endpoint, asio::error_code& ec)
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- ASIO_SYNC_OP_VOID accept(basic_socket<protocol_type>& peer,
+ template <typename Executor1>
+ ASIO_SYNC_OP_VOID accept(basic_socket<protocol_type, Executor1>& peer,
endpoint_type& peer_endpoint, asio::error_code& ec)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
{
- this->get_service().accept(
- this->get_implementation(), peer, &peer_endpoint, ec);
+ impl_.get_service().accept(
+ impl_.get_implementation(), peer, &peer_endpoint, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
/// Start an asynchronous accept.
/**
* This function is used to asynchronously accept a new connection into a
- * socket, and additionally obtain the endpoint of the remote peer. The
- * function call always returns immediately.
+ * socket, and additionally obtain the endpoint of the remote peer. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param peer The socket into which the new connection will be accepted.
* Ownership of the peer object is retained by the caller, which must
- * guarantee that it is valid until the handler is called.
+ * guarantee that it is valid until the completion handler is called.
*
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
* handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- */
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename SocketService, typename AcceptHandler>
- ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(basic_socket<protocol_type, SocketService>& peer,
- endpoint_type& peer_endpoint, ASIO_MOVE_ARG(AcceptHandler) handler)
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- template <typename AcceptHandler>
- ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(basic_socket<protocol_type>& peer,
- endpoint_type& peer_endpoint, ASIO_MOVE_ARG(AcceptHandler) handler)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a AcceptHandler.
- ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(), peer,
- &peer_endpoint, ASIO_MOVE_CAST(AcceptHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<AcceptHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- peer, &peer_endpoint, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename Executor1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ AcceptToken = default_completion_token_t<executor_type>>
+ auto async_accept(basic_socket<protocol_type, Executor1>& peer,
+ endpoint_type& peer_endpoint,
+ AcceptToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<AcceptToken, void (asio::error_code)>(
+ declval<initiate_async_accept>(), token, &peer, &peer_endpoint))
+ {
+ return async_initiate<AcceptToken, void (asio::error_code)>(
+ initiate_async_accept(this), token, &peer, &peer_endpoint);
}
#endif // !defined(ASIO_NO_EXTENSIONS)
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Accept a new connection.
/**
* This function is used to accept a new connection from a peer. The function
@@ -1380,17 +1541,18 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::socket socket(acceptor.accept());
* @endcode
*/
- typename Protocol::socket accept()
+ typename Protocol::socket::template rebind_executor<executor_type>::other
+ accept()
{
asio::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(
- this->get_implementation(), 0, 0, ec));
+ typename Protocol::socket::template rebind_executor<
+ executor_type>::other peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
asio::detail::throw_error(ec, "accept");
return peer;
}
@@ -1411,7 +1573,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::socket socket(acceptor.accept(ec));
* if (ec)
@@ -1420,30 +1582,46 @@ public:
* }
* @endcode
*/
- typename Protocol::socket accept(asio::error_code& ec)
+ typename Protocol::socket::template rebind_executor<executor_type>::other
+ accept(asio::error_code& ec)
{
- return this->get_service().accept(this->get_implementation(), 0, 0, ec);
+ typename Protocol::socket::template rebind_executor<
+ executor_type>::other peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ return peer;
}
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
- * typename Protocol::socket peer // On success, the newly accepted socket.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
+ * typename Protocol::socket::template
+ * rebind_executor<executor_type>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template
+ * rebind_executor<executor_type>::other)) @endcode
*
* @par Example
* @code
@@ -1458,37 +1636,83 @@ public:
*
* ...
*
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* acceptor.async_accept(accept_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MoveAcceptHandler>
- ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code, typename Protocol::socket))
- async_accept(ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(
- this->get_implementation(), static_cast<asio::io_context*>(0),
- static_cast<endpoint_type*>(0),
- ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(
- this->get_implementation(), static_cast<asio::io_context*>(0),
- static_cast<endpoint_type*>(0), init.completion_handler);
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code, typename Protocol::socket::template
+ rebind_executor<executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ declval<const executor_type&>(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
+ void (asio::error_code, typename Protocol::socket::template
+ rebind_executor<executor_type>::other)>(
+ initiate_async_move_accept(this), token,
+ impl_.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<executor_type>::other*>(0));
+ }
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly
+ * accepted socket.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * asio::ip::tcp::socket socket(acceptor.accept());
+ * @endcode
+ */
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const Executor1& ex,
+ constraint_t<
+ is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value
+ > = 0)
+ {
+ asio::error_code ec;
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ asio::detail::throw_error(ec, "accept");
+ return peer;
}
/// Accept a new connection.
@@ -1500,8 +1724,8 @@ public:
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param io_context The io_context object to be used for the newly accepted
- * socket.
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
*
* @returns A socket object representing the newly accepted connection.
*
@@ -1509,17 +1733,23 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::socket socket(acceptor.accept());
* @endcode
*/
- typename Protocol::socket accept(asio::io_context& io_context)
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
{
asio::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0), ec));
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
asio::detail::throw_error(ec, "accept");
return peer;
}
@@ -1533,7 +1763,7 @@ public:
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param io_context The io_context object to be used for the newly accepted
+ * @param ex The I/O executor object to be used for the newly accepted
* socket.
*
* @param ec Set to indicate what error occurred, if any.
@@ -1543,44 +1773,105 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * asio::ip::tcp::socket socket(acceptor.accept(io_context2, ec));
+ * asio::ip::tcp::socket socket(acceptor.accept(my_context2, ec));
* if (ec)
* {
* // An error occurred.
* }
* @endcode
*/
- typename Protocol::socket accept(
- asio::io_context& io_context, asio::error_code& ec)
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const Executor1& ex, asio::error_code& ec,
+ constraint_t<
+ is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value
+ > = 0)
{
- return this->get_service().accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0), ec);
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * asio::ip::tcp::socket socket(acceptor.accept(my_context2, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context, asio::error_code& ec,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ {
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(), peer, 0, ec);
+ return peer;
}
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param io_context The io_context object to be used for the newly accepted
+ * @param ex The I/O executor object to be used for the newly accepted
* socket.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
- * typename Protocol::socket peer // On success, the newly accepted socket.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other)) @endcode
*
* @par Example
* @code
@@ -1595,36 +1886,145 @@ public:
*
* ...
*
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
- * acceptor.async_accept(io_context2, accept_handler);
+ * acceptor.async_accept(my_context2, accept_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MoveAcceptHandler>
- ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code, typename Protocol::socket))
- async_accept(asio::io_context& io_context,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0),
- ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
+ template <typename Executor1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ constraint_t<is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value,
+ Executor1>>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(const Executor1& ex,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ ex, static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
void (asio::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- &io_context, static_cast<endpoint_type*>(0), init.completion_handler);
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ initiate_async_move_accept(this), token,
+ ex, static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0));
+ }
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other peer
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other)) @endcode
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const asio::error_code& error,
+ * asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * acceptor.async_accept(my_context2, accept_handler);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename ExecutionContext,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(ExecutionContext& context,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ context.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)>(
+ initiate_async_move_accept(this), token,
+ context.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0));
}
/// Accept a new connection.
@@ -1645,18 +2045,20 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint;
* asio::ip::tcp::socket socket(acceptor.accept(endpoint));
* @endcode
*/
- typename Protocol::socket accept(endpoint_type& peer_endpoint)
+ typename Protocol::socket::template rebind_executor<executor_type>::other
+ accept(endpoint_type& peer_endpoint)
{
asio::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(this->get_implementation(),
- static_cast<asio::io_context*>(0), &peer_endpoint, ec));
+ typename Protocol::socket::template rebind_executor<
+ executor_type>::other peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
asio::detail::throw_error(ec, "accept");
return peer;
}
@@ -1680,7 +2082,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint;
* asio::ip::tcp::socket socket(acceptor.accept(endpoint, ec));
@@ -1690,17 +2092,21 @@ public:
* }
* @endcode
*/
- typename Protocol::socket accept(
- endpoint_type& peer_endpoint, asio::error_code& ec)
+ typename Protocol::socket::template rebind_executor<executor_type>::other
+ accept(endpoint_type& peer_endpoint, asio::error_code& ec)
{
- return this->get_service().accept(this->get_implementation(),
- static_cast<asio::io_context*>(0), &peer_endpoint, ec);
+ typename Protocol::socket::template rebind_executor<
+ executor_type>::other peer(impl_.get_executor());
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ return peer;
}
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
@@ -1708,19 +2114,30 @@ public:
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
- * typename Protocol::socket peer // On success, the newly accepted socket.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
+ * typename Protocol::socket::template
+ * rebind_executor<executor_type>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template
+ * rebind_executor<executor_type>::other)) @endcode
*
* @par Example
* @code
@@ -1735,38 +2152,45 @@ public:
*
* ...
*
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint;
* acceptor.async_accept(endpoint, accept_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MoveAcceptHandler>
- ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code, typename Protocol::socket))
- async_accept(endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(this->get_implementation(),
- static_cast<asio::io_context*>(0), &peer_endpoint,
- ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- static_cast<asio::io_context*>(0), &peer_endpoint,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(endpoint_type& peer_endpoint,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code, typename Protocol::socket::template
+ rebind_executor<executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ declval<const executor_type&>(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
+ void (asio::error_code, typename Protocol::socket::template
+ rebind_executor<executor_type>::other)>(
+ initiate_async_move_accept(this), token,
+ impl_.get_executor(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<executor_type>::other*>(0));
}
/// Accept a new connection.
@@ -1778,7 +2202,7 @@ public:
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param io_context The io_context object to be used for the newly accepted
+ * @param ex The I/O executor object to be used for the newly accepted
* socket.
*
* @param peer_endpoint An endpoint object into which the endpoint of the
@@ -1790,20 +2214,26 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint;
* asio::ip::tcp::socket socket(
- * acceptor.accept(io_context2, endpoint));
+ * acceptor.accept(my_context2, endpoint));
* @endcode
*/
- typename Protocol::socket accept(
- asio::io_context& io_context, endpoint_type& peer_endpoint)
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const Executor1& ex, endpoint_type& peer_endpoint,
+ constraint_t<
+ is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value
+ > = 0)
{
asio::error_code ec;
- typename Protocol::socket peer(
- this->get_service().accept(this->get_implementation(),
- &io_context, &peer_endpoint, ec));
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
asio::detail::throw_error(ec, "accept");
return peer;
}
@@ -1817,7 +2247,52 @@ public:
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param io_context The io_context object to be used for the newly accepted
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @returns A socket object representing the newly accepted connection.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * asio::ip::tcp::endpoint endpoint;
+ * asio::ip::tcp::socket socket(
+ * acceptor.accept(my_context2, endpoint));
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context, endpoint_type& peer_endpoint,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ {
+ asio::error_code ec;
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ asio::detail::throw_error(ec, "accept");
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param ex The I/O executor object to be used for the newly accepted
* socket.
*
* @param peer_endpoint An endpoint object into which the endpoint of the
@@ -1830,51 +2305,121 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint;
* asio::ip::tcp::socket socket(
- * acceptor.accept(io_context2, endpoint, ec));
+ * acceptor.accept(my_context2, endpoint, ec));
* if (ec)
* {
* // An error occurred.
* }
* @endcode
*/
- typename Protocol::socket accept(asio::io_context& io_context,
- endpoint_type& peer_endpoint, asio::error_code& ec)
+ template <typename Executor1>
+ typename Protocol::socket::template rebind_executor<Executor1>::other
+ accept(const executor_type& ex,
+ endpoint_type& peer_endpoint, asio::error_code& ec,
+ constraint_t<
+ is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value
+ > = 0)
+ {
+ typename Protocol::socket::template
+ rebind_executor<Executor1>::other peer(ex);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ return peer;
+ }
+
+ /// Accept a new connection.
+ /**
+ * This function is used to accept a new connection from a peer. The function
+ * call will block until a new connection has been accepted successfully or
+ * an error occurs.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns On success, a socket object representing the newly accepted
+ * connection. On error, a socket object where is_open() is false.
+ *
+ * @par Example
+ * @code
+ * asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * asio::ip::tcp::endpoint endpoint;
+ * asio::ip::tcp::socket socket(
+ * acceptor.accept(my_context2, endpoint, ec));
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ template <typename ExecutionContext>
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other
+ accept(ExecutionContext& context,
+ endpoint_type& peer_endpoint, asio::error_code& ec,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
{
- return this->get_service().accept(this->get_implementation(),
- &io_context, &peer_endpoint, ec);
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other peer(context);
+ impl_.get_service().accept(impl_.get_implementation(),
+ peer, &peer_endpoint, ec);
+ return peer;
}
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param io_context The io_context object to be used for the newly accepted
+ * @param ex The I/O executor object to be used for the newly accepted
* socket.
*
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
- * typename Protocol::socket peer // On success, the newly accepted socket.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other)) @endcode
*
* @par Example
* @code
@@ -1889,48 +2434,275 @@ public:
*
* ...
*
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::ip::tcp::endpoint endpoint;
- * acceptor.async_accept(io_context2, endpoint, accept_handler);
+ * acceptor.async_accept(my_context2, endpoint, accept_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MoveAcceptHandler>
- ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code, typename Protocol::socket))
- async_accept(asio::io_context& io_context,
- endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a MoveAcceptHandler.
- ASIO_MOVE_ACCEPT_HANDLER_CHECK(MoveAcceptHandler,
- handler, typename Protocol::socket) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_accept(
- this->get_implementation(), &io_context, &peer_endpoint,
- ASIO_MOVE_CAST(MoveAcceptHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<MoveAcceptHandler,
+ template <typename Executor1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ constraint_t<is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value,
+ Executor1>>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(const Executor1& ex, endpoint_type& peer_endpoint,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ declval<initiate_async_move_accept>(), token, ex, &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
void (asio::error_code,
- typename Protocol::socket)> init(handler);
-
- this->get_service().async_accept(this->get_implementation(),
- &io_context, &peer_endpoint, init.completion_handler);
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ initiate_async_move_accept(this), token, ex, &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0));
+ }
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ /// Start an asynchronous accept.
+ /**
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
+ *
+ * This overload requires that the Protocol template parameter satisfy the
+ * AcceptableProtocol type requirements.
+ *
+ * @param context The I/O execution context object to be used for the newly
+ * accepted socket.
+ *
+ * @param peer_endpoint An endpoint object into which the endpoint of the
+ * remote peer will be written. Ownership of the peer_endpoint object is
+ * retained by the caller, which must guarantee that it is valid until the
+ * completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other peer
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other)) @endcode
+ *
+ * @par Example
+ * @code
+ * void accept_handler(const asio::error_code& error,
+ * asio::ip::tcp::socket peer)
+ * {
+ * if (!error)
+ * {
+ * // Accept succeeded.
+ * }
+ * }
+ *
+ * ...
+ *
+ * asio::ip::tcp::acceptor acceptor(my_context);
+ * ...
+ * asio::ip::tcp::endpoint endpoint;
+ * acceptor.async_accept(my_context2, endpoint, accept_handler);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename ExecutionContext,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(ExecutionContext& context, endpoint_type& peer_endpoint,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ context.get_executor(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)>(
+ initiate_async_move_accept(this), token,
+ context.get_executor(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0));
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+private:
+ // Disallow copying and assignment.
+ basic_socket_acceptor(const basic_socket_acceptor&) = delete;
+ basic_socket_acceptor& operator=(
+ const basic_socket_acceptor&) = delete;
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_socket_acceptor* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WaitHandler>
+ void operator()(WaitHandler&& handler, wait_type w) 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.
+ 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(), w,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_socket_acceptor* self_;
+ };
+
+ class initiate_async_accept
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_accept(basic_socket_acceptor* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename AcceptHandler, typename Protocol1, typename Executor1>
+ void operator()(AcceptHandler&& handler,
+ basic_socket<Protocol1, Executor1>* peer,
+ endpoint_type* peer_endpoint) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a AcceptHandler.
+ ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;
+
+ detail::non_const_lvalue<AcceptHandler> handler2(handler);
+ self_->impl_.get_service().async_accept(
+ self_->impl_.get_implementation(), *peer, peer_endpoint,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_socket_acceptor* self_;
+ };
+
+ class initiate_async_move_accept
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_move_accept(basic_socket_acceptor* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename MoveAcceptHandler, typename Executor1, typename Socket>
+ void operator()(MoveAcceptHandler&& handler,
+ const Executor1& peer_ex, endpoint_type* peer_endpoint, Socket*) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a MoveAcceptHandler.
+ ASIO_MOVE_ACCEPT_HANDLER_CHECK(
+ MoveAcceptHandler, handler, Socket) type_check;
+
+ detail::non_const_lvalue<MoveAcceptHandler> handler2(handler);
+ self_->impl_.get_service().async_move_accept(
+ self_->impl_.get_implementation(), peer_ex, peer_endpoint,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_socket_acceptor* self_;
+ };
+
+#if defined(ASIO_WINDOWS_RUNTIME)
+ detail::io_object_impl<
+ detail::null_socket_service<Protocol>, Executor> impl_;
+#elif defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<
+ detail::win_iocp_socket_service<Protocol>, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<
+ detail::io_uring_socket_service<Protocol>, Executor> impl_;
+#else
+ detail::io_object_impl<
+ detail::reactive_socket_service<Protocol>, Executor> impl_;
+#endif
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_BASIC_SOCKET_ACCEPTOR_HPP
diff --git a/3rdparty/asio/include/asio/basic_socket_iostream.hpp b/3rdparty/asio/include/asio/basic_socket_iostream.hpp
index ad4759bec29..902898d9502 100644
--- a/3rdparty/asio/include/asio/basic_socket_iostream.hpp
+++ b/3rdparty/asio/include/asio/basic_socket_iostream.hpp
@@ -2,7 +2,7 @@
// basic_socket_iostream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,61 +23,6 @@
#include <ostream>
#include "asio/basic_socket_streambuf.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/stream_socket_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include "asio/detail/variadic_templates.hpp"
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// explicit basic_socket_iostream(T1 x1, ..., Tn xn)
-// : std::basic_iostream<char>(
-// &this->detail::socket_iostream_base<
-// Protocol ASIO_SVC_TARG, Clock,
-// WaitTraits ASIO_SVC_TARG1>::streambuf_)
-// {
-// if (rdbuf()->connect(x1, ..., xn) == 0)
-// this->setstate(std::ios_base::failbit);
-// }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CTR_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- explicit basic_socket_iostream(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- : std::basic_iostream<char>( \
- &this->detail::socket_iostream_base< \
- Protocol ASIO_SVC_TARG, Clock, \
- WaitTraits ASIO_SVC_TARG1>::streambuf_) \
- { \
- this->setf(std::ios_base::unitbuf); \
- if (rdbuf()->connect(ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
- this->setstate(std::ios_base::failbit); \
- } \
- /**/
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// void connect(T1 x1, ..., Tn xn)
-// {
-// if (rdbuf()->connect(x1, ..., xn) == 0)
-// this->setstate(std::ios_base::failbit);
-// }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CONNECT_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void connect(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- if (rdbuf()->connect(ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
- this->setstate(std::ios_base::failbit); \
- } \
- /**/
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -85,8 +30,7 @@ namespace detail {
// A separate base class is used to ensure that the streambuf is initialised
// prior to the basic_socket_iostream's basic_iostream base class.
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Clock, typename WaitTraits ASIO_SVC_TPARAM1>
+template <typename Protocol, typename Clock, typename WaitTraits>
class socket_iostream_base
{
protected:
@@ -94,7 +38,6 @@ protected:
{
}
-#if defined(ASIO_HAS_MOVE)
socket_iostream_base(socket_iostream_base&& other)
: streambuf_(std::move(other.streambuf_))
{
@@ -110,10 +53,8 @@ protected:
streambuf_ = std::move(other.streambuf_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
- basic_socket_streambuf<Protocol ASIO_SVC_TARG,
- Clock, WaitTraits ASIO_SVC_TARG1> streambuf_;
+ basic_socket_streambuf<Protocol, Clock, WaitTraits> streambuf_;
};
} // namespace detail
@@ -122,17 +63,17 @@ protected:
#define ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
// Forward declaration with defaulted arguments.
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
+template <typename Protocol,
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
-#else
+ typename WaitTraits = time_traits<Clock>>
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
-#endif
+ typename WaitTraits = wait_traits<Clock>>
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
class basic_socket_iostream;
#endif // !defined(ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
@@ -141,24 +82,25 @@ class basic_socket_iostream;
#if defined(GENERATING_DOCUMENTATION)
template <typename Protocol,
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#else // defined(GENERATING_DOCUMENTATION)
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Clock, typename WaitTraits ASIO_SVC_TPARAM1>
+template <typename Protocol, typename Clock, typename WaitTraits>
#endif // defined(GENERATING_DOCUMENTATION)
class basic_socket_iostream
- : private detail::socket_iostream_base<Protocol
- ASIO_SVC_TARG, Clock, WaitTraits ASIO_SVC_TARG1>,
+ : private detail::socket_iostream_base<Protocol, Clock, WaitTraits>,
public std::basic_iostream<char>
{
private:
// These typedefs are intended keep this class's implementation independent
// of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typedef WaitTraits traits_helper;
-#else
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
-#endif
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
public:
/// The protocol type.
@@ -195,22 +137,18 @@ public:
basic_socket_iostream()
: std::basic_iostream<char>(
&this->detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>::streambuf_)
+ Protocol, Clock, WaitTraits>::streambuf_)
{
this->setf(std::ios_base::unitbuf);
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a basic_socket_iostream from the supplied socket.
explicit basic_socket_iostream(basic_stream_socket<protocol_type> s)
: detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>(std::move(s)),
+ Protocol, Clock, WaitTraits>(std::move(s)),
std::basic_iostream<char>(
&this->detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>::streambuf_)
+ Protocol, Clock, WaitTraits>::streambuf_)
{
this->setf(std::ios_base::unitbuf);
}
@@ -218,13 +156,11 @@ public:
/// Move-construct a basic_socket_iostream from another.
basic_socket_iostream(basic_socket_iostream&& other)
: detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>(std::move(other)),
+ Protocol, Clock, WaitTraits>(std::move(other)),
std::basic_iostream<char>(std::move(other))
{
this->set_rdbuf(&this->detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>::streambuf_);
+ Protocol, Clock, WaitTraits>::streambuf_);
}
/// Move-assign a basic_socket_iostream from another.
@@ -232,56 +168,39 @@ public:
{
std::basic_iostream<char>::operator=(std::move(other));
detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>::operator=(std::move(other));
+ Protocol, Clock, WaitTraits>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-#if defined(GENERATING_DOCUMENTATION)
/// Establish a connection to an endpoint corresponding to a resolver query.
/**
* This constructor automatically establishes a connection based on the
* supplied resolver query parameters. The arguments are used to construct
* a resolver query object.
*/
- template <typename T1, ..., typename TN>
- explicit basic_socket_iostream(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... T>
explicit basic_socket_iostream(T... x)
: std::basic_iostream<char>(
&this->detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>::streambuf_)
+ Protocol, Clock, WaitTraits>::streambuf_)
{
this->setf(std::ios_base::unitbuf);
if (rdbuf()->connect(x...) == 0)
this->setstate(std::ios_base::failbit);
}
-#else
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CTR_DEF)
-#endif
-#if defined(GENERATING_DOCUMENTATION)
/// Establish a connection to an endpoint corresponding to a resolver query.
/**
* This function automatically establishes a connection based on the supplied
* resolver query parameters. The arguments are used to construct a resolver
* query object.
*/
- template <typename T1, ..., typename TN>
- void connect(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... T>
void connect(T... x)
{
if (rdbuf()->connect(x...) == 0)
this->setstate(std::ios_base::failbit);
}
-#else
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CONNECT_DEF)
-#endif
/// Close the connection.
void close()
@@ -291,18 +210,15 @@ public:
}
/// Return a pointer to the underlying streambuf.
- basic_socket_streambuf<Protocol ASIO_SVC_TARG,
- Clock, WaitTraits ASIO_SVC_TARG1>* rdbuf() const
+ basic_socket_streambuf<Protocol, Clock, WaitTraits>* rdbuf() const
{
- return const_cast<basic_socket_streambuf<Protocol ASIO_SVC_TARG,
- Clock, WaitTraits ASIO_SVC_TARG1>*>(
+ return const_cast<basic_socket_streambuf<Protocol, Clock, WaitTraits>*>(
&this->detail::socket_iostream_base<
- Protocol ASIO_SVC_TARG, Clock,
- WaitTraits ASIO_SVC_TARG1>::streambuf_);
+ Protocol, Clock, WaitTraits>::streambuf_);
}
/// Get a reference to the underlying socket.
- basic_socket<Protocol ASIO_SVC_TARG>& socket()
+ basic_socket<Protocol>& socket()
{
return rdbuf()->socket();
}
@@ -401,20 +317,15 @@ public:
private:
// Disallow copying and assignment.
- basic_socket_iostream(const basic_socket_iostream&) ASIO_DELETED;
+ basic_socket_iostream(const basic_socket_iostream&) = delete;
basic_socket_iostream& operator=(
- const basic_socket_iostream&) ASIO_DELETED;
+ const basic_socket_iostream&) = delete;
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# undef ASIO_PRIVATE_CTR_DEF
-# undef ASIO_PRIVATE_CONNECT_DEF
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // ASIO_BASIC_SOCKET_IOSTREAM_HPP
diff --git a/3rdparty/asio/include/asio/basic_socket_streambuf.hpp b/3rdparty/asio/include/asio/basic_socket_streambuf.hpp
index 42fb3cacd75..e3a5f836382 100644
--- a/3rdparty/asio/include/asio/basic_socket_streambuf.hpp
+++ b/3rdparty/asio/include/asio/basic_socket_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_socket_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,55 +28,14 @@
#include "asio/detail/throw_error.hpp"
#include "asio/io_context.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/stream_socket_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-# if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/deadline_timer_service.hpp"
-# else // defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/detail/deadline_timer_service.hpp"
-# endif // defined(ASIO_ENABLE_OLD_SERVICES)
-#else
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
+# include "asio/detail/deadline_timer_service.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
# include "asio/steady_timer.hpp"
-#endif
-
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include "asio/detail/variadic_templates.hpp"
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// basic_socket_streambuf* connect(T1 x1, ..., Tn xn)
-// {
-// init_buffers();
-// typedef typename Protocol::resolver resolver_type;
-// resolver_type resolver(socket().get_executor().context());
-// connect_to_endpoints(
-// resolver.resolve(x1, ..., xn, ec_));
-// return !ec_ ? this : 0;
-// }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CONNECT_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- basic_socket_streambuf* connect(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- init_buffers(); \
- typedef typename Protocol::resolver resolver_type; \
- resolver_type resolver(socket().get_executor().context()); \
- connect_to_endpoints( \
- resolver.resolve(ASIO_VARIADIC_BYVAL_ARGS(n), ec_)); \
- return !ec_ ? this : 0; \
- } \
- /**/
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# define ASIO_SVC_T1 detail::deadline_timer_service<traits_helper>
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
#include "asio/detail/push_options.hpp"
@@ -121,17 +80,17 @@ protected:
#define ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
// Forward declaration with defaulted arguments.
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
+template <typename Protocol,
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
-#else
+ typename WaitTraits = time_traits<Clock>>
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
-#endif
+ typename WaitTraits = wait_traits<Clock>>
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
class basic_socket_streambuf;
#endif // !defined(ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
@@ -140,29 +99,31 @@ class basic_socket_streambuf;
#if defined(GENERATING_DOCUMENTATION)
template <typename Protocol,
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#else // defined(GENERATING_DOCUMENTATION)
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Clock, typename WaitTraits ASIO_SVC_TPARAM1>
+template <typename Protocol, typename Clock, typename WaitTraits>
#endif // defined(GENERATING_DOCUMENTATION)
class basic_socket_streambuf
: public std::streambuf,
private detail::socket_streambuf_io_context,
private detail::socket_streambuf_buffers,
#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- private basic_socket<Protocol ASIO_SVC_TARG>
+ private basic_socket<Protocol>
#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
- public basic_socket<Protocol ASIO_SVC_TARG>
+ public basic_socket<Protocol>
#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
{
private:
// These typedefs are intended keep this class's implementation independent
// of whether it's using Boost.DateClock, Boost.Chrono or std::chrono.
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typedef WaitTraits traits_helper;
-#else
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper;
-#endif
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
public:
/// The protocol type.
@@ -198,17 +159,16 @@ public:
/// Construct a basic_socket_streambuf without establishing a connection.
basic_socket_streambuf()
: detail::socket_streambuf_io_context(new io_context),
- basic_socket<Protocol ASIO_SVC_TARG>(*default_io_context_),
+ basic_socket<Protocol>(*default_io_context_),
expiry_time_(max_expiry_time())
{
init_buffers();
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a basic_socket_streambuf from the supplied socket.
explicit basic_socket_streambuf(basic_stream_socket<protocol_type> s)
: detail::socket_streambuf_io_context(0),
- basic_socket<Protocol ASIO_SVC_TARG>(std::move(s)),
+ basic_socket<Protocol>(std::move(s)),
expiry_time_(max_expiry_time())
{
init_buffers();
@@ -217,7 +177,7 @@ public:
/// Move-construct a basic_socket_streambuf from another.
basic_socket_streambuf(basic_socket_streambuf&& other)
: detail::socket_streambuf_io_context(other),
- basic_socket<Protocol ASIO_SVC_TARG>(std::move(other.socket())),
+ basic_socket<Protocol>(std::move(other.socket())),
ec_(other.ec_),
expiry_time_(other.expiry_time_)
{
@@ -248,7 +208,6 @@ public:
other.init_buffers();
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor flushes buffered data.
virtual ~basic_socket_streambuf()
@@ -272,7 +231,6 @@ public:
return !ec_ ? this : 0;
}
-#if defined(GENERATING_DOCUMENTATION)
/// Establish a connection.
/**
* This function automatically establishes a connection based on the supplied
@@ -282,21 +240,15 @@ public:
* @return \c this if a connection was successfully established, a null
* pointer otherwise.
*/
- template <typename T1, ..., typename TN>
- basic_socket_streambuf* connect(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... T>
basic_socket_streambuf* connect(T... x)
{
init_buffers();
typedef typename Protocol::resolver resolver_type;
- resolver_type resolver(socket().get_executor().context());
+ resolver_type resolver(socket().get_executor());
connect_to_endpoints(resolver.resolve(x..., ec_));
return !ec_ ? this : 0;
}
-#else
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CONNECT_DEF)
-#endif
/// Close the connection.
/**
@@ -313,7 +265,7 @@ public:
}
/// Get a reference to the underlying socket.
- basic_socket<Protocol ASIO_SVC_TARG>& socket()
+ basic_socket<Protocol>& socket()
{
return *this;
}
@@ -566,9 +518,9 @@ protected:
private:
// Disallow copying and assignment.
- basic_socket_streambuf(const basic_socket_streambuf&) ASIO_DELETED;
+ basic_socket_streambuf(const basic_socket_streambuf&) = delete;
basic_socket_streambuf& operator=(
- const basic_socket_streambuf&) ASIO_DELETED;
+ const basic_socket_streambuf&) = delete;
void init_buffers()
{
@@ -666,11 +618,14 @@ private:
// Helper function to get the maximum expiry time.
static time_point max_expiry_time()
{
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
+#if defined(ASIO_HAS_BOOST_DATE_TIME) \
+ && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
return boost::posix_time::pos_infin;
#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
return (time_point::max)();
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
}
enum { putback_max = 8 };
@@ -682,14 +637,6 @@ private:
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T1
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# undef ASIO_PRIVATE_CONNECT_DEF
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // ASIO_BASIC_SOCKET_STREAMBUF_HPP
diff --git a/3rdparty/asio/include/asio/basic_stream_file.hpp b/3rdparty/asio/include/asio/basic_stream_file.hpp
new file mode 100644
index 00000000000..4b2ca8775e5
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_stream_file.hpp
@@ -0,0 +1,744 @@
+//
+// basic_stream_file.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BASIC_STREAM_FILE_HPP
+#define ASIO_BASIC_STREAM_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include "asio/async_result.hpp"
+#include "asio/basic_file.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(ASIO_BASIC_STREAM_FILE_FWD_DECL)
+#define ASIO_BASIC_STREAM_FILE_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Executor = any_io_executor>
+class basic_stream_file;
+
+#endif // !defined(ASIO_BASIC_STREAM_FILE_FWD_DECL)
+
+/// Provides stream-oriented file functionality.
+/**
+ * The basic_stream_file class template provides asynchronous and blocking
+ * stream-oriented file functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Executor>
+class basic_stream_file
+ : public basic_file<Executor>
+{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the file type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The file type when rebound to the specified executor.
+ typedef basic_stream_file<Executor1> other;
+ };
+
+ /// The native representation of a file.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_file<Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a basic_stream_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ */
+ explicit basic_stream_file(const executor_type& ex)
+ : basic_file<Executor>(ex)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Construct a basic_stream_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_file(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_stream_file(const executor_type& ex,
+ const char* path, file_base::flags open_flags)
+ : basic_file<Executor>(ex)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_file(ExecutionContext& context,
+ const char* path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_stream_file(const executor_type& ex,
+ const std::string& path, file_base::flags open_flags)
+ : basic_file<Executor>(ex)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_file(ExecutionContext& context,
+ const std::string& path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_stream_file on an existing native file.
+ /**
+ * This constructor initialises a stream file object to hold an existing
+ * native file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_stream_file(const executor_type& ex,
+ const native_handle_type& native_file)
+ : basic_file<Executor>(ex, native_file)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Construct a basic_stream_file on an existing native file.
+ /**
+ * This constructor initialises a stream file object to hold an existing
+ * native file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_file(ExecutionContext& context,
+ const native_handle_type& native_file,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, native_file)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Move-construct a basic_stream_file from another.
+ /**
+ * This constructor moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file 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_stream_file(const executor_type&)
+ * constructor.
+ */
+ basic_stream_file(basic_stream_file&& other) noexcept
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_file from another.
+ /**
+ * This assignment operator moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file 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_stream_file(const executor_type&)
+ * constructor.
+ */
+ basic_stream_file& operator=(basic_stream_file&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_stream_file from a file of another executor
+ /// type.
+ /**
+ * This constructor moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file 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_stream_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_stream_file(basic_stream_file<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_file from a file of another executor type.
+ /**
+ * This assignment operator moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file 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_stream_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_stream_file&
+ > operator=(basic_stream_file<Executor1>&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Destroys the file.
+ /**
+ * This function destroys the file, cancelling any outstanding asynchronous
+ * operations associated with the file as if by calling @c cancel.
+ */
+ ~basic_stream_file()
+ {
+ }
+
+ /// Seek to a position in the file.
+ /**
+ * This function updates the current position in the file.
+ *
+ * @param offset The requested position in the file, relative to @c whence.
+ *
+ * @param whence One of @c seek_set, @c seek_cur or @c seek_end.
+ *
+ * @returns The new position relative to the beginning of the file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ uint64_t seek(int64_t offset, file_base::seek_basis whence)
+ {
+ asio::error_code ec;
+ uint64_t n = this->impl_.get_service().seek(
+ this->impl_.get_implementation(), offset, whence, ec);
+ asio::detail::throw_error(ec, "seek");
+ return n;
+ }
+
+ /// Seek to a position in the file.
+ /**
+ * This function updates the current position in the file.
+ *
+ * @param offset The requested position in the file, relative to @c whence.
+ *
+ * @param whence One of @c seek_set, @c seek_cur or @c seek_end.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The new position relative to the beginning of the file.
+ */
+ uint64_t seek(int64_t offset, file_base::seek_basis whence,
+ asio::error_code& ec)
+ {
+ return this->impl_.get_service().seek(
+ this->impl_.get_implementation(), offset, whence, ec);
+ }
+
+ /// Write some data to the file.
+ /**
+ * This function is used to write data to the stream file. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the file.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.write_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the file.
+ /**
+ * This function is used to write data to the stream file. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the file.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the stream file.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
+ *
+ * @param buffers One or more data buffers to be written to the file.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The write operation may not transmit all of the data to the peer.
+ * Consider using the @ref async_write function if you need to ensure that all
+ * data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.async_write_some(asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
+ }
+
+ /// Read some data from the file.
+ /**
+ * This function is used to read data from the stream file. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.read_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the file.
+ /**
+ * This function is used to read data from the stream file. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the stream file.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read function if you need to ensure that the
+ * requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.async_read_some(asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_stream_file(const basic_stream_file&) = delete;
+ basic_stream_file& operator=(const basic_stream_file&) = delete;
+
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_stream_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_file* self_;
+ };
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_stream_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_file* self_;
+ };
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_STREAM_FILE_HPP
diff --git a/3rdparty/asio/include/asio/basic_stream_socket.hpp b/3rdparty/asio/include/asio/basic_stream_socket.hpp
index 31e685098a5..e3a79450037 100644
--- a/3rdparty/asio/include/asio/basic_stream_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_stream_socket.hpp
@@ -2,7 +2,7 @@
// basic_stream_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,17 +20,23 @@
#include "asio/async_result.hpp"
#include "asio/basic_socket.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/stream_socket_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
+#if !defined(ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+#define ASIO_BASIC_STREAM_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
+class basic_stream_socket;
+
+#endif // !defined(ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+
/// Provides stream-oriented socket functionality.
/**
* The basic_stream_socket class template provides asynchronous and blocking
@@ -40,21 +46,42 @@ namespace asio {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
+ * Synchronous @c send, @c receive, @c connect, and @c shutdown operations are
+ * thread safe with respect to each other, if the underlying operating system
+ * calls are also thread safe. This means that it is permitted to perform
+ * concurrent calls to these synchronous operations on a single socket object.
+ * Other synchronous operations, such as @c open or @c close, are not thread
+ * safe.
+ *
* @par Concepts:
* AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
*/
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>)>
+template <typename Protocol, typename Executor>
class basic_stream_socket
- : public basic_socket<Protocol ASIO_SVC_TARG>
+ : public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_receive;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the socket type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The socket type when rebound to the specified executor.
+ typedef basic_stream_socket<Protocol, Executor1> other;
+ };
+
/// The native representation of a socket.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
#else
- typedef typename basic_socket<
- Protocol ASIO_SVC_TARG>::native_handle_type native_handle_type;
+ typedef typename basic_socket<Protocol,
+ Executor>::native_handle_type native_handle_type;
#endif
/// The protocol type.
@@ -69,11 +96,30 @@ public:
* needs to be opened and then connected or accepted before data can be sent
* or received on it.
*
- * @param io_context The io_context object that the stream socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*/
- explicit basic_stream_socket(asio::io_context& io_context)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context)
+ explicit basic_stream_socket(const executor_type& ex)
+ : basic_socket<Protocol, Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_stream_socket without opening it.
+ /**
+ * This constructor creates a stream socket without opening it. The socket
+ * needs to be opened and then connected or accepted before data can be sent
+ * or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_socket(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context)
{
}
@@ -82,16 +128,38 @@ public:
* This constructor creates and opens a stream socket. The socket needs to be
* connected or accepted before data can be sent or received on it.
*
- * @param io_context The io_context object that the stream socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_stream_socket(asio::io_context& io_context,
- const protocol_type& protocol)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, protocol)
+ basic_stream_socket(const executor_type& ex, const protocol_type& protocol)
+ : basic_socket<Protocol, Executor>(ex, protocol)
+ {
+ }
+
+ /// Construct and open a basic_stream_socket.
+ /**
+ * This constructor creates and opens a stream socket. The socket needs to be
+ * connected or accepted before data can be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_socket(ExecutionContext& context, const protocol_type& protocol,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -102,7 +170,7 @@ public:
* to the specified endpoint on the local machine. The protocol used is the
* protocol associated with the given endpoint.
*
- * @param io_context The io_context object that the stream socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*
* @param endpoint An endpoint on the local machine to which the stream
@@ -110,9 +178,33 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_stream_socket(asio::io_context& io_context,
- const endpoint_type& endpoint)
- : basic_socket<Protocol ASIO_SVC_TARG>(io_context, endpoint)
+ basic_stream_socket(const executor_type& ex, const endpoint_type& endpoint)
+ : basic_socket<Protocol, Executor>(ex, endpoint)
+ {
+ }
+
+ /// Construct a basic_stream_socket, opening it and binding it to the given
+ /// local endpoint.
+ /**
+ * This constructor creates a stream socket and automatically opens it bound
+ * to the specified endpoint on the local machine. The protocol used is the
+ * protocol associated with the given endpoint.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param endpoint An endpoint on the local machine to which the stream
+ * socket will be bound.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_socket(ExecutionContext& context, const endpoint_type& endpoint,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -121,7 +213,7 @@ public:
* This constructor creates a stream socket object to hold an existing native
* socket.
*
- * @param io_context The io_context object that the stream socket will use to
+ * @param ex The I/O executor that the socket will use, by default, to
* dispatch handlers for any asynchronous operations performed on the socket.
*
* @param protocol An object specifying protocol parameters to be used.
@@ -130,14 +222,37 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_stream_socket(asio::io_context& io_context,
+ basic_stream_socket(const executor_type& ex,
const protocol_type& protocol, const native_handle_type& native_socket)
- : basic_socket<Protocol ASIO_SVC_TARG>(
- io_context, protocol, native_socket)
+ : basic_socket<Protocol, Executor>(ex, protocol, native_socket)
+ {
+ }
+
+ /// Construct a basic_stream_socket on an existing native socket.
+ /**
+ * This constructor creates a stream socket object to hold an existing native
+ * socket.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the socket will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the socket.
+ *
+ * @param protocol An object specifying protocol parameters to be used.
+ *
+ * @param native_socket The new underlying socket implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_socket(ExecutionContext& context,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_stream_socket from another.
/**
* This constructor moves a stream socket from one object to another.
@@ -146,10 +261,11 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_stream_socket(io_context&) constructor.
+ * constructed using the @c basic_stream_socket(const executor_type&)
+ * constructor.
*/
- basic_stream_socket(basic_stream_socket&& other)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ basic_stream_socket(basic_stream_socket&& other) noexcept
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -161,11 +277,12 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_stream_socket(io_context&) constructor.
+ * constructed using the @c basic_stream_socket(const executor_type&)
+ * constructor.
*/
basic_stream_socket& operator=(basic_stream_socket&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
@@ -178,13 +295,16 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_stream_socket(io_context&) constructor.
+ * constructed using the @c basic_stream_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- basic_stream_socket(
- basic_stream_socket<Protocol1 ASIO_SVC_TARG1>&& other,
- typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0)
- : basic_socket<Protocol ASIO_SVC_TARG>(std::move(other))
+ template <typename Protocol1, typename Executor1>
+ basic_stream_socket(basic_stream_socket<Protocol1, Executor1>&& other,
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value
+ > = 0)
+ : basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -196,17 +316,19 @@ public:
* will occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_stream_socket(io_context&) constructor.
+ * constructed using the @c basic_stream_socket(const executor_type&)
+ * constructor.
*/
- template <typename Protocol1 ASIO_SVC_TPARAM1>
- typename enable_if<is_convertible<Protocol1, Protocol>::value,
- basic_stream_socket>::type& operator=(
- basic_stream_socket<Protocol1 ASIO_SVC_TARG1>&& other)
+ template <typename Protocol1, typename Executor1>
+ constraint_t<
+ is_convertible<Protocol1, Protocol>::value
+ && is_convertible<Executor1, Executor>::value,
+ basic_stream_socket&
+ > operator=(basic_stream_socket<Protocol1, Executor1>&& other)
{
- basic_socket<Protocol ASIO_SVC_TARG>::operator=(std::move(other));
+ basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -246,8 +368,8 @@ public:
std::size_t send(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -284,8 +406,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "send");
return s;
}
@@ -312,31 +434,37 @@ public:
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().send(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send data on the stream socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The send operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
@@ -350,56 +478,63 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(
- this->get_implementation(), buffers, 0,
- ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(
- this->get_implementation(), buffers, 0,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send data on the stream socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The send operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
@@ -413,32 +548,31 @@ public:
* See the @ref buffer documentation for information on sending multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(
- this->get_implementation(), buffers, flags,
- ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(
- this->get_implementation(), buffers, flags,
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token, buffers, flags);
}
/// Receive some data on the socket.
@@ -473,8 +607,8 @@ public:
std::size_t receive(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -514,8 +648,8 @@ public:
socket_base::message_flags flags)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
asio::detail::throw_error(ec, "receive");
return s;
}
@@ -542,31 +676,37 @@ public:
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- return this->get_service().receive(
- this->get_implementation(), buffers, flags, ec);
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, flags, ec);
}
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the stream
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The receive operation may not receive all of the requested number of
* bytes. Consider using the @ref async_read function if you need to ensure
@@ -582,54 +722,63 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the stream
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The receive operation may not receive all of the requested number of
* bytes. Consider using the @ref async_read function if you need to ensure
@@ -645,30 +794,31 @@ public:
* See the @ref buffer documentation for information on receiving into
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token, buffers, flags))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, flags, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, flags, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token, buffers, flags);
}
/// Write some data to the socket.
@@ -702,8 +852,8 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().send(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "write_some");
return s;
}
@@ -728,30 +878,37 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().send(this->get_implementation(), buffers, 0, ec);
+ return this->impl_.get_service().send(
+ this->impl_.get_implementation(), buffers, 0, ec);
}
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be written to the socket.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
@@ -765,29 +922,32 @@ public:
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_send(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(WriteHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_send(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_send(this), token,
+ buffers, socket_base::message_flags(0));
}
/// Read some data from the socket.
@@ -822,8 +982,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
+ std::size_t s = this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
asio::detail::throw_error(ec, "read_some");
return s;
}
@@ -849,31 +1009,37 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().receive(
- this->get_implementation(), buffers, 0, ec);
+ return this->impl_.get_service().receive(
+ this->impl_.get_implementation(), buffers, 0, ec);
}
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the stream socket.
- * The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
@@ -888,30 +1054,106 @@ public:
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_receive(this->get_implementation(),
- buffers, 0, ASIO_MOVE_CAST(ReadHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_receive(this->get_implementation(),
- buffers, 0, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_receive(this), token,
+ buffers, socket_base::message_flags(0));
}
+
+private:
+ // Disallow copying and assignment.
+ basic_stream_socket(const basic_stream_socket&) = delete;
+ basic_stream_socket& operator=(const basic_stream_socket&) = delete;
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_stream_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_send(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_socket* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_stream_socket* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_receive(
+ self_->impl_.get_implementation(), buffers, flags,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_socket* self_;
+ };
};
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_streambuf.hpp b/3rdparty/asio/include/asio/basic_streambuf.hpp
index 0f060321788..0450811dca1 100644
--- a/3rdparty/asio/include/asio/basic_streambuf.hpp
+++ b/3rdparty/asio/include/asio/basic_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -103,7 +103,7 @@ namespace asio {
* @endcode
*/
#if defined(GENERATING_DOCUMENTATION)
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
#else
template <typename Allocator>
#endif
@@ -155,7 +155,7 @@ public:
* }
* @endcode
*/
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return pptr() - gptr();
}
@@ -165,7 +165,7 @@ public:
* @returns The allowed maximum of the sum of the sizes of the input sequence
* and output sequence.
*/
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return max_size_;
}
@@ -175,7 +175,7 @@ public:
* @returns The current total capacity of the streambuf, i.e. for both the
* input sequence and output sequence.
*/
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return buffer_.capacity();
}
@@ -189,7 +189,7 @@ public:
* @note The returned object is invalidated by any @c basic_streambuf member
* function that modifies the input sequence or output sequence.
*/
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return asio::buffer(asio::const_buffer(gptr(),
(pptr() - gptr()) * sizeof(char_type)));
@@ -232,8 +232,7 @@ public:
*/
void commit(std::size_t n)
{
- if (pptr() + n > epptr())
- n = epptr() - pptr();
+ n = std::min<std::size_t>(n, epptr() - pptr());
pbump(static_cast<int>(n));
setg(eback(), gptr(), pptr());
}
@@ -362,7 +361,7 @@ private:
/// Adapts basic_streambuf to the dynamic buffer sequence type requirements.
#if defined(GENERATING_DOCUMENTATION)
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
#else
template <typename Allocator>
#endif
@@ -384,39 +383,37 @@ public:
}
/// Copy construct a basic_streambuf_ref.
- basic_streambuf_ref(const basic_streambuf_ref& other) ASIO_NOEXCEPT
+ basic_streambuf_ref(const basic_streambuf_ref& other) noexcept
: sb_(other.sb_)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move construct a basic_streambuf_ref.
- basic_streambuf_ref(basic_streambuf_ref&& other) ASIO_NOEXCEPT
+ basic_streambuf_ref(basic_streambuf_ref&& other) noexcept
: sb_(other.sb_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Get the size of the input sequence.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return sb_.size();
}
/// Get the maximum size of the dynamic buffer.
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return sb_.max_size();
}
/// Get the current capacity of the dynamic buffer.
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return sb_.capacity();
}
/// Get a list of buffers that represents the input sequence.
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return sb_.data();
}
diff --git a/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp b/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp
index 361997b779f..1ff320d4637 100644
--- a/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp
+++ b/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp
@@ -2,7 +2,7 @@
// basic_streambuf_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,10 +23,10 @@
namespace asio {
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
class basic_streambuf;
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
class basic_streambuf_ref;
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_waitable_timer.hpp b/3rdparty/asio/include/asio/basic_waitable_timer.hpp
index 6e9a3e18585..5e9df3ef4f8 100644
--- a/3rdparty/asio/include/asio/basic_waitable_timer.hpp
+++ b/3rdparty/asio/include/asio/basic_waitable_timer.hpp
@@ -2,7 +2,7 @@
// basic_waitable_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,26 +17,17 @@
#include "asio/detail/config.hpp"
#include <cstddef>
-#include "asio/basic_io_object.hpp"
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/detail/chrono_time_traits.hpp"
+#include "asio/detail/deadline_timer_service.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
#include "asio/wait_traits.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/waitable_timer_service.hpp"
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/detail/chrono_time_traits.hpp"
-# include "asio/detail/deadline_timer_service.hpp"
-# define ASIO_SVC_T \
- detail::deadline_timer_service< \
- detail::chrono_time_traits<Clock, WaitTraits> >
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -46,8 +37,8 @@ namespace asio {
// Forward declaration with defaulted arguments.
template <typename Clock,
- typename WaitTraits = asio::wait_traits<Clock>
- ASIO_SVC_TPARAM_DEF2(= waitable_timer_service<Clock, WaitTraits>)>
+ typename WaitTraits = asio::wait_traits<Clock>,
+ typename Executor = any_io_executor>
class basic_waitable_timer;
#endif // !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
@@ -75,7 +66,7 @@ class basic_waitable_timer;
* Performing a blocking wait (C++11):
* @code
* // Construct a timer without setting an expiry time.
- * asio::steady_timer timer(io_context);
+ * asio::steady_timer timer(my_context);
*
* // Set an expiry time relative to now.
* timer.expires_after(std::chrono::seconds(5));
@@ -98,7 +89,7 @@ class basic_waitable_timer;
* ...
*
* // Construct a timer with an absolute expiry time.
- * asio::steady_timer timer(io_context,
+ * asio::steady_timer timer(my_context,
* std::chrono::steady_clock::now() + std::chrono::seconds(60));
*
* // Start an asynchronous wait.
@@ -144,13 +135,23 @@ class basic_waitable_timer;
* @li If a wait handler is cancelled, the asio::error_code passed to
* it contains the value asio::error::operation_aborted.
*/
-template <typename Clock, typename WaitTraits ASIO_SVC_TPARAM>
+template <typename Clock, typename WaitTraits, typename Executor>
class basic_waitable_timer
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
+ 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_waitable_timer<Clock, WaitTraits, Executor1> other;
+ };
/// The clock type.
typedef Clock clock_type;
@@ -170,11 +171,30 @@ public:
* expires_at() or expires_after() functions must be called to set an expiry
* time before the timer can be waited on.
*
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
+ * @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_waitable_timer(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Constructor.
+ /**
+ * This constructor creates a timer without setting an expiry time. The
+ * expires_at() or expires_after() 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.
*/
- explicit basic_waitable_timer(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ template <typename ExecutionContext>
+ explicit basic_waitable_timer(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
}
@@ -182,18 +202,41 @@ public:
/**
* This constructor creates a timer and sets the expiry time.
*
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
+ * @param ex The I/O executor object 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_waitable_timer(asio::io_context& io_context,
- const time_point& expiry_time)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_waitable_timer(const executor_type& ex, const time_point& expiry_time)
+ : impl_(0, ex)
{
asio::error_code ec;
- this->get_service().expires_at(this->get_implementation(), expiry_time, ec);
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
+ 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>
+ explicit basic_waitable_timer(ExecutionContext& context,
+ const time_point& expiry_time,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_at");
}
@@ -201,23 +244,46 @@ public:
/**
* This constructor creates a timer and sets the expiry time.
*
- * @param io_context The io_context object that the timer will use to dispatch
- * handlers for any asynchronous operations performed on the timer.
+ * @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_waitable_timer(asio::io_context& io_context,
- const duration& expiry_time)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ basic_waitable_timer(const executor_type& ex, const duration& expiry_time)
+ : impl_(0, ex)
{
asio::error_code ec;
- this->get_service().expires_after(
- this->get_implementation(), expiry_time, ec);
+ impl_.get_service().expires_after(
+ impl_.get_implementation(), expiry_time, ec);
+ asio::detail::throw_error(ec, "expires_after");
+ }
+
+ /// 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>
+ explicit basic_waitable_timer(ExecutionContext& context,
+ const duration& expiry_time,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().expires_after(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_after");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_waitable_timer from another.
/**
* This constructor moves a timer from one object to another.
@@ -226,10 +292,11 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_waitable_timer(io_context&) constructor.
+ * constructed using the @c basic_waitable_timer(const executor_type&)
+ * constructor.
*/
basic_waitable_timer(basic_waitable_timer&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
+ : impl_(std::move(other.impl_))
{
}
@@ -242,63 +309,77 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_waitable_timer(io_context&) constructor.
+ * constructed using the @c basic_waitable_timer(const executor_type&)
+ * constructor.
*/
basic_waitable_timer& operator=(basic_waitable_timer&& other)
{
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+ impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Destroys the timer.
+ // All timers have access to each other's implementations.
+ template <typename Clock1, typename WaitTraits1, typename Executor1>
+ friend class basic_waitable_timer;
+
+ /// Move-construct a basic_waitable_timer from another.
/**
- * This function destroys the timer, cancelling any outstanding asynchronous
- * wait operations associated with the timer as if by calling @c cancel.
+ * This constructor moves a timer from one object to another.
+ *
+ * @param other The other basic_waitable_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_waitable_timer(const executor_type&)
+ * constructor.
*/
- ~basic_waitable_timer()
+ template <typename Executor1>
+ basic_waitable_timer(
+ basic_waitable_timer<Clock, WaitTraits, Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
+ : impl_(std::move(other.impl_))
{
}
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
+ /// Move-assign a basic_waitable_timer from another.
/**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
+ * This assignment operator moves a timer from one object to another. Cancels
+ * any outstanding asynchronous operations associated with the target object.
*
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
+ * @param other The other basic_waitable_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_waitable_timer(const executor_type&)
+ * constructor.
*/
- asio::io_context& get_io_context()
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_waitable_timer&
+ > operator=(basic_waitable_timer<Clock, WaitTraits, Executor1>&& other)
{
- return basic_io_object<ASIO_SVC_T>::get_io_context();
+ basic_waitable_timer tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
}
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
+ /// Destroys the timer.
/**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
+ * This function destroys the timer, cancelling any outstanding asynchronous
+ * wait operations associated with the timer as if by calling @c cancel.
*/
- asio::io_context& get_io_service()
+ ~basic_waitable_timer()
{
- return basic_io_object<ASIO_SVC_T>::get_io_service();
}
-#endif // !defined(ASIO_NO_DEPRECATED)
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
- return basic_io_object<ASIO_SVC_T>::get_executor();
+ return impl_.get_executor();
}
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
/// Cancel any asynchronous operations that are waiting on the timer.
/**
@@ -325,7 +406,7 @@ public:
std::size_t cancel()
{
asio::error_code ec;
- std::size_t s = this->get_service().cancel(this->get_implementation(), ec);
+ std::size_t s = impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
return s;
}
@@ -356,7 +437,7 @@ public:
*/
std::size_t cancel(asio::error_code& ec)
{
- return this->get_service().cancel(this->get_implementation(), ec);
+ return impl_.get_service().cancel(impl_.get_implementation(), ec);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -387,8 +468,8 @@ public:
std::size_t cancel_one()
{
asio::error_code ec;
- std::size_t s = this->get_service().cancel_one(
- this->get_implementation(), ec);
+ std::size_t s = impl_.get_service().cancel_one(
+ impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel_one");
return s;
}
@@ -421,7 +502,7 @@ public:
*/
std::size_t cancel_one(asio::error_code& ec)
{
- return this->get_service().cancel_one(this->get_implementation(), ec);
+ return impl_.get_service().cancel_one(impl_.get_implementation(), ec);
}
/// (Deprecated: Use expiry().) Get the timer's expiry time as an absolute
@@ -432,7 +513,7 @@ public:
*/
time_point expires_at() const
{
- return this->get_service().expires_at(this->get_implementation());
+ return impl_.get_service().expires_at(impl_.get_implementation());
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -443,7 +524,7 @@ public:
*/
time_point expiry() const
{
- return this->get_service().expiry(this->get_implementation());
+ return impl_.get_service().expiry(impl_.get_implementation());
}
/// Set the timer's expiry time as an absolute time.
@@ -471,8 +552,8 @@ public:
std::size_t expires_at(const time_point& expiry_time)
{
asio::error_code ec;
- std::size_t s = this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
+ std::size_t s = impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_at");
return s;
}
@@ -504,8 +585,8 @@ public:
std::size_t expires_at(const time_point& expiry_time,
asio::error_code& ec)
{
- return this->get_service().expires_at(
- this->get_implementation(), expiry_time, ec);
+ return impl_.get_service().expires_at(
+ impl_.get_implementation(), expiry_time, ec);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -534,8 +615,8 @@ public:
std::size_t expires_after(const duration& expiry_time)
{
asio::error_code ec;
- std::size_t s = this->get_service().expires_after(
- this->get_implementation(), expiry_time, ec);
+ std::size_t s = impl_.get_service().expires_after(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_after");
return s;
}
@@ -548,7 +629,7 @@ public:
*/
duration expires_from_now() const
{
- return this->get_service().expires_from_now(this->get_implementation());
+ return impl_.get_service().expires_from_now(impl_.get_implementation());
}
/// (Deprecated: Use expires_after().) Set the timer's expiry time relative
@@ -577,8 +658,8 @@ public:
std::size_t expires_from_now(const duration& expiry_time)
{
asio::error_code ec;
- std::size_t s = this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
+ std::size_t s = impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
asio::detail::throw_error(ec, "expires_from_now");
return s;
}
@@ -609,8 +690,8 @@ public:
std::size_t expires_from_now(const duration& expiry_time,
asio::error_code& ec)
{
- return this->get_service().expires_from_now(
- this->get_implementation(), expiry_time, ec);
+ return impl_.get_service().expires_from_now(
+ impl_.get_implementation(), expiry_time, ec);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -624,7 +705,7 @@ public:
void wait()
{
asio::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
+ impl_.get_service().wait(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "wait");
}
@@ -637,69 +718,107 @@ public:
*/
void wait(asio::error_code& ec)
{
- this->get_service().wait(this->get_implementation(), 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.
+ * timer. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
+ * For each call to async_wait(), the completion handler will be called
+ * exactly once. The completion 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 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:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the timer expires. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(ASIO_MOVE_ARG(WaitHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_wait(this->get_implementation(),
- ASIO_MOVE_CAST(WaitHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token);
}
private:
// Disallow copying and assignment.
- basic_waitable_timer(const basic_waitable_timer&) ASIO_DELETED;
- basic_waitable_timer& operator=(
- const basic_waitable_timer&) ASIO_DELETED;
+ basic_waitable_timer(const basic_waitable_timer&) = delete;
+ basic_waitable_timer& operator=(const basic_waitable_timer&) = delete;
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_waitable_timer* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WaitHandler>
+ void operator()(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.
+ 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_waitable_timer* self_;
+ };
+
+ detail::io_object_impl<
+ detail::deadline_timer_service<
+ detail::chrono_time_traits<Clock, WaitTraits>>,
+ executor_type > impl_;
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_BASIC_WAITABLE_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/basic_writable_pipe.hpp b/3rdparty/asio/include/asio/basic_writable_pipe.hpp
new file mode 100644
index 00000000000..4c389c9b464
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_writable_pipe.hpp
@@ -0,0 +1,622 @@
+//
+// basic_writable_pipe.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BASIC_WRITABLE_PIPE_HPP
+#define ASIO_BASIC_WRITABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_handle_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Provides pipe functionality.
+/**
+ * The basic_writable_pipe class provides a wrapper over pipe
+ * functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = any_io_executor>
+class basic_writable_pipe
+{
+private:
+ class initiate_async_write_some;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the pipe type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The pipe type when rebound to the specified executor.
+ typedef basic_writable_pipe<Executor1> other;
+ };
+
+ /// The native representation of a pipe.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::io_uring_descriptor_service::native_handle_type
+ native_handle_type;
+#else
+ typedef detail::reactive_descriptor_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A basic_writable_pipe is always the lowest layer.
+ typedef basic_writable_pipe lowest_layer_type;
+
+ /// Construct a basic_writable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to dispatch
+ * handlers for any asynchronous operations performed on the pipe.
+ */
+ explicit basic_writable_pipe(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_writable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the pipe.
+ */
+ template <typename ExecutionContext>
+ explicit basic_writable_pipe(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct a basic_writable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_writable_pipe(const executor_type& ex,
+ const native_handle_type& native_pipe)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_writable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_writable_pipe(ExecutionContext& context,
+ const native_handle_type& native_pipe,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct a basic_writable_pipe from another.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe 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_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_writable_pipe(basic_writable_pipe&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_writable_pipe from another.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe 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_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_writable_pipe& operator=(basic_writable_pipe&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All pipes have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_writable_pipe;
+
+ /// Move-construct a basic_writable_pipe from a pipe of another executor type.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe 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_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_writable_pipe(basic_writable_pipe<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_writable_pipe from a pipe of another executor type.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe 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_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_writable_pipe&
+ > operator=(basic_writable_pipe<Executor1>&& other)
+ {
+ basic_writable_pipe tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Destroys the pipe.
+ /**
+ * This function destroys the pipe, cancelling any outstanding
+ * asynchronous wait operations associated with the pipe as if by
+ * calling @c cancel.
+ */
+ ~basic_writable_pipe()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a basic_writable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a basic_writable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_pipe)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_pipe,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the pipe is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous write operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous write operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native pipe representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * pipe. This is intended to allow access to native pipe
+ * functionality that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Write some data to the pipe.
+ /**
+ * This function is used to write data to the pipe. The function call will
+ * block until one or more bytes of the data has been written successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the pipe.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * pipe.write_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the pipe.
+ /**
+ * This function is used to write data to the pipe. The function call will
+ * block until one or more bytes of the data has been written successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the pipe.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the pipe. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
+ *
+ * @param buffers One or more data buffers to be written to the pipe.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The write operation may not transmit all of the data to the peer.
+ * Consider using the @ref async_write function if you need to ensure that all
+ * data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * pipe.async_write_some(asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_writable_pipe(const basic_writable_pipe&) = delete;
+ basic_writable_pipe& operator=(const basic_writable_pipe&) = delete;
+
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_writable_pipe* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_writable_pipe* self_;
+ };
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_handle_service, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::io_uring_descriptor_service, Executor> impl_;
+#else
+ detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+#endif
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_WRITABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/bind_allocator.hpp b/3rdparty/asio/include/asio/bind_allocator.hpp
new file mode 100644
index 00000000000..27910a2ec69
--- /dev/null
+++ b/3rdparty/asio/include/asio/bind_allocator.hpp
@@ -0,0 +1,530 @@
+//
+// bind_allocator.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BIND_ALLOCATOR_HPP
+#define ASIO_BIND_ALLOCATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Helper to automatically define nested typedef result_type.
+
+template <typename T, typename = void>
+struct allocator_binder_result_type
+{
+protected:
+ typedef void result_type_or_void;
+};
+
+template <typename T>
+struct allocator_binder_result_type<T, void_t<typename T::result_type>>
+{
+ typedef typename T::result_type result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct allocator_binder_result_type<R(*)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct allocator_binder_result_type<R(&)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_result_type<R(*)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_result_type<R(&)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_result_type<R(*)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_result_type<R(&)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+// Helper to automatically define nested typedef argument_type.
+
+template <typename T, typename = void>
+struct allocator_binder_argument_type {};
+
+template <typename T>
+struct allocator_binder_argument_type<T, void_t<typename T::argument_type>>
+{
+ typedef typename T::argument_type argument_type;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_argument_type<R(*)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_argument_type<R(&)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+// Helper to automatically define nested typedefs first_argument_type and
+// second_argument_type.
+
+template <typename T, typename = void>
+struct allocator_binder_argument_types {};
+
+template <typename T>
+struct allocator_binder_argument_types<T,
+ void_t<typename T::first_argument_type>>
+{
+ typedef typename T::first_argument_type first_argument_type;
+ typedef typename T::second_argument_type second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_argument_type<R(*)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_argument_type<R(&)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+} // namespace detail
+
+/// A call wrapper type to bind an allocator of type @c Allocator
+/// to an object of type @c T.
+template <typename T, typename Allocator>
+class allocator_binder
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::allocator_binder_result_type<T>,
+ public detail::allocator_binder_argument_type<T>,
+ public detail::allocator_binder_argument_types<T>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+public:
+ /// The type of the target object.
+ typedef T target_type;
+
+ /// The type of the associated allocator.
+ typedef Allocator allocator_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The return type if a function.
+ /**
+ * The type of @c result_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to function type, @c result_type is a synonym for
+ * the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c result_type, then @c
+ * result_type is a synonym for @c T::result_type;
+ *
+ * @li otherwise @c result_type is not defined.
+ */
+ typedef see_below result_type;
+
+ /// The type of the function's argument.
+ /**
+ * The type of @c argument_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to a function type accepting a single argument,
+ * @c argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c argument_type, then @c
+ * argument_type is a synonym for @c T::argument_type;
+ *
+ * @li otherwise @c argument_type is not defined.
+ */
+ typedef see_below argument_type;
+
+ /// The type of the function's first argument.
+ /**
+ * The type of @c first_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * first_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c first_argument_type is a synonym for @c T::first_argument_type;
+ *
+ * @li otherwise @c first_argument_type is not defined.
+ */
+ typedef see_below first_argument_type;
+
+ /// The type of the function's second argument.
+ /**
+ * The type of @c second_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * second_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c second_argument_type is a synonym for @c T::second_argument_type;
+ *
+ * @li otherwise @c second_argument_type is not defined.
+ */
+ typedef see_below second_argument_type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct an allocator wrapper for the specified object.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U>
+ allocator_binder(const allocator_type& s, U&& u)
+ : allocator_(s),
+ target_(static_cast<U&&>(u))
+ {
+ }
+
+ /// Copy constructor.
+ allocator_binder(const allocator_binder& other)
+ : allocator_(other.get_allocator()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy, but specify a different allocator.
+ allocator_binder(const allocator_type& s, const allocator_binder& other)
+ : allocator_(s),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different allocator wrapper type.
+ /**
+ * This constructor is only valid if the @c Allocator type is
+ * constructible from type @c OtherAllocator, and the type @c T is
+ * constructible from type @c U.
+ */
+ template <typename U, typename OtherAllocator>
+ allocator_binder(const allocator_binder<U, OtherAllocator>& other,
+ constraint_t<is_constructible<Allocator, OtherAllocator>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(other.get_allocator()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different allocator wrapper type, but
+ /// specify a different allocator.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherAllocator>
+ allocator_binder(const allocator_type& s,
+ const allocator_binder<U, OtherAllocator>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(s),
+ target_(other.get())
+ {
+ }
+
+ /// Move constructor.
+ allocator_binder(allocator_binder&& other)
+ : allocator_(static_cast<allocator_type&&>(
+ other.get_allocator())),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct the target object, but specify a different allocator.
+ allocator_binder(const allocator_type& s,
+ allocator_binder&& other)
+ : allocator_(s),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different allocator wrapper type.
+ template <typename U, typename OtherAllocator>
+ allocator_binder(
+ allocator_binder<U, OtherAllocator>&& other,
+ constraint_t<is_constructible<Allocator, OtherAllocator>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(static_cast<OtherAllocator&&>(
+ other.get_allocator())),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different allocator wrapper type, but
+ /// specify a different allocator.
+ template <typename U, typename OtherAllocator>
+ allocator_binder(const allocator_type& s,
+ allocator_binder<U, OtherAllocator>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(s),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Destructor.
+ ~allocator_binder()
+ {
+ }
+
+ /// Obtain a reference to the target object.
+ target_type& get() noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain a reference to the target object.
+ const target_type& get() const noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain the associated allocator.
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args)
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args) const
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+private:
+ Allocator allocator_;
+ T target_;
+};
+
+/// Associate an object of type @c T with an allocator of type
+/// @c Allocator.
+template <typename Allocator, typename T>
+ASIO_NODISCARD inline allocator_binder<decay_t<T>, Allocator>
+bind_allocator(const Allocator& s, T&& t)
+{
+ return allocator_binder<decay_t<T>, Allocator>(s, static_cast<T&&>(t));
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace detail {
+
+template <typename TargetAsyncResult, typename Allocator, typename = void>
+class allocator_binder_completion_handler_async_result
+{
+public:
+ template <typename T>
+ explicit allocator_binder_completion_handler_async_result(T&)
+ {
+ }
+};
+
+template <typename TargetAsyncResult, typename Allocator>
+class allocator_binder_completion_handler_async_result<
+ TargetAsyncResult, Allocator,
+ void_t<typename TargetAsyncResult::completion_handler_type>>
+{
+private:
+ TargetAsyncResult target_;
+
+public:
+ typedef allocator_binder<
+ typename TargetAsyncResult::completion_handler_type, Allocator>
+ completion_handler_type;
+
+ explicit allocator_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
+};
+
+template <typename TargetAsyncResult, typename = void>
+struct allocator_binder_async_result_return_type
+{
+};
+
+template <typename TargetAsyncResult>
+struct allocator_binder_async_result_return_type<
+ TargetAsyncResult, void_type<typename TargetAsyncResult::return_type>>
+{
+ typedef typename TargetAsyncResult::return_type return_type;
+};
+
+} // namespace detail
+
+template <typename T, typename Allocator, typename Signature>
+class async_result<allocator_binder<T, Allocator>, Signature> :
+ public detail::allocator_binder_completion_handler_async_result<
+ async_result<T, Signature>, Allocator>,
+ public detail::allocator_binder_async_result_return_type<
+ async_result<T, Signature>>
+{
+public:
+ explicit async_result(allocator_binder<T, Allocator>& b)
+ : detail::allocator_binder_completion_handler_async_result<
+ async_result<T, Signature>, Allocator>(b.get())
+ {
+ }
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ template <typename Init>
+ init_wrapper(const Allocator& allocator, Init&& init)
+ : allocator_(allocator),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ allocator_binder<decay_t<Handler>, Allocator>(
+ allocator_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args) const
+ {
+ initiation_(
+ allocator_binder<decay_t<Handler>, Allocator>(
+ allocator_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Allocator allocator_;
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
+ {
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(token.get_allocator(),
+ static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
+ }
+
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+
+ async_result<T, Signature> target_;
+};
+
+template <template <typename, typename> class Associator,
+ typename T, typename Allocator, typename DefaultCandidate>
+struct associator<Associator, allocator_binder<T, Allocator>, DefaultCandidate>
+ : Associator<T, DefaultCandidate>
+{
+ static typename Associator<T, DefaultCandidate>::type get(
+ const allocator_binder<T, Allocator>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
+
+ static auto get(const allocator_binder<T, Allocator>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
+ {
+ return Associator<T, DefaultCandidate>::get(b.get(), c);
+ }
+};
+
+template <typename T, typename Allocator, typename Allocator1>
+struct associated_allocator<allocator_binder<T, Allocator>, Allocator1>
+{
+ typedef Allocator type;
+
+ static auto get(const allocator_binder<T, Allocator>& b,
+ const Allocator1& = Allocator1()) noexcept
+ -> decltype(b.get_allocator())
+ {
+ return b.get_allocator();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BIND_ALLOCATOR_HPP
diff --git a/3rdparty/asio/include/asio/bind_cancellation_slot.hpp b/3rdparty/asio/include/asio/bind_cancellation_slot.hpp
new file mode 100644
index 00000000000..7be13426283
--- /dev/null
+++ b/3rdparty/asio/include/asio/bind_cancellation_slot.hpp
@@ -0,0 +1,544 @@
+//
+// bind_cancellation_slot.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BIND_CANCELLATION_SLOT_HPP
+#define ASIO_BIND_CANCELLATION_SLOT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Helper to automatically define nested typedef result_type.
+
+template <typename T, typename = void>
+struct cancellation_slot_binder_result_type
+{
+protected:
+ typedef void result_type_or_void;
+};
+
+template <typename T>
+struct cancellation_slot_binder_result_type<T, void_t<typename T::result_type>>
+{
+ typedef typename T::result_type result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct cancellation_slot_binder_result_type<R(*)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct cancellation_slot_binder_result_type<R(&)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct cancellation_slot_binder_result_type<R(*)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct cancellation_slot_binder_result_type<R(&)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct cancellation_slot_binder_result_type<R(*)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct cancellation_slot_binder_result_type<R(&)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+// Helper to automatically define nested typedef argument_type.
+
+template <typename T, typename = void>
+struct cancellation_slot_binder_argument_type {};
+
+template <typename T>
+struct cancellation_slot_binder_argument_type<T,
+ void_t<typename T::argument_type>>
+{
+ typedef typename T::argument_type argument_type;
+};
+
+template <typename R, typename A1>
+struct cancellation_slot_binder_argument_type<R(*)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+template <typename R, typename A1>
+struct cancellation_slot_binder_argument_type<R(&)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+// Helper to automatically define nested typedefs first_argument_type and
+// second_argument_type.
+
+template <typename T, typename = void>
+struct cancellation_slot_binder_argument_types {};
+
+template <typename T>
+struct cancellation_slot_binder_argument_types<T,
+ void_t<typename T::first_argument_type>>
+{
+ typedef typename T::first_argument_type first_argument_type;
+ typedef typename T::second_argument_type second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct cancellation_slot_binder_argument_type<R(*)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct cancellation_slot_binder_argument_type<R(&)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+} // namespace detail
+
+/// A call wrapper type to bind a cancellation slot of type @c CancellationSlot
+/// to an object of type @c T.
+template <typename T, typename CancellationSlot>
+class cancellation_slot_binder
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::cancellation_slot_binder_result_type<T>,
+ public detail::cancellation_slot_binder_argument_type<T>,
+ public detail::cancellation_slot_binder_argument_types<T>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+public:
+ /// The type of the target object.
+ typedef T target_type;
+
+ /// The type of the associated cancellation slot.
+ typedef CancellationSlot cancellation_slot_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The return type if a function.
+ /**
+ * The type of @c result_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to function type, @c result_type is a synonym for
+ * the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c result_type, then @c
+ * result_type is a synonym for @c T::result_type;
+ *
+ * @li otherwise @c result_type is not defined.
+ */
+ typedef see_below result_type;
+
+ /// The type of the function's argument.
+ /**
+ * The type of @c argument_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to a function type accepting a single argument,
+ * @c argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c argument_type, then @c
+ * argument_type is a synonym for @c T::argument_type;
+ *
+ * @li otherwise @c argument_type is not defined.
+ */
+ typedef see_below argument_type;
+
+ /// The type of the function's first argument.
+ /**
+ * The type of @c first_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * first_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c first_argument_type is a synonym for @c T::first_argument_type;
+ *
+ * @li otherwise @c first_argument_type is not defined.
+ */
+ typedef see_below first_argument_type;
+
+ /// The type of the function's second argument.
+ /**
+ * The type of @c second_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * second_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c second_argument_type is a synonym for @c T::second_argument_type;
+ *
+ * @li otherwise @c second_argument_type is not defined.
+ */
+ typedef see_below second_argument_type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a cancellation slot wrapper for the specified object.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U>
+ cancellation_slot_binder(const cancellation_slot_type& s, U&& u)
+ : slot_(s),
+ target_(static_cast<U&&>(u))
+ {
+ }
+
+ /// Copy constructor.
+ cancellation_slot_binder(const cancellation_slot_binder& other)
+ : slot_(other.get_cancellation_slot()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy, but specify a different cancellation slot.
+ cancellation_slot_binder(const cancellation_slot_type& s,
+ const cancellation_slot_binder& other)
+ : slot_(s),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different cancellation slot wrapper type.
+ /**
+ * This constructor is only valid if the @c CancellationSlot type is
+ * constructible from type @c OtherCancellationSlot, and the type @c T is
+ * constructible from type @c U.
+ */
+ template <typename U, typename OtherCancellationSlot>
+ cancellation_slot_binder(
+ const cancellation_slot_binder<U, OtherCancellationSlot>& other,
+ constraint_t<is_constructible<CancellationSlot,
+ OtherCancellationSlot>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : slot_(other.get_cancellation_slot()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different cancellation slot wrapper type, but
+ /// specify a different cancellation slot.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherCancellationSlot>
+ cancellation_slot_binder(const cancellation_slot_type& s,
+ const cancellation_slot_binder<U, OtherCancellationSlot>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : slot_(s),
+ target_(other.get())
+ {
+ }
+
+ /// Move constructor.
+ cancellation_slot_binder(cancellation_slot_binder&& other)
+ : slot_(static_cast<cancellation_slot_type&&>(
+ other.get_cancellation_slot())),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct the target object, but specify a different cancellation
+ /// slot.
+ cancellation_slot_binder(const cancellation_slot_type& s,
+ cancellation_slot_binder&& other)
+ : slot_(s),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different cancellation slot wrapper type.
+ template <typename U, typename OtherCancellationSlot>
+ cancellation_slot_binder(
+ cancellation_slot_binder<U, OtherCancellationSlot>&& other,
+ constraint_t<is_constructible<CancellationSlot,
+ OtherCancellationSlot>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : slot_(static_cast<OtherCancellationSlot&&>(
+ other.get_cancellation_slot())),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different cancellation slot wrapper type, but
+ /// specify a different cancellation slot.
+ template <typename U, typename OtherCancellationSlot>
+ cancellation_slot_binder(const cancellation_slot_type& s,
+ cancellation_slot_binder<U, OtherCancellationSlot>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : slot_(s),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Destructor.
+ ~cancellation_slot_binder()
+ {
+ }
+
+ /// Obtain a reference to the target object.
+ target_type& get() noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain a reference to the target object.
+ const target_type& get() const noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain the associated cancellation slot.
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return slot_;
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args)
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args) const
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+private:
+ CancellationSlot slot_;
+ T target_;
+};
+
+/// Associate an object of type @c T with a cancellation slot of type
+/// @c CancellationSlot.
+template <typename CancellationSlot, typename T>
+ASIO_NODISCARD inline
+cancellation_slot_binder<decay_t<T>, CancellationSlot>
+bind_cancellation_slot(const CancellationSlot& s, T&& t)
+{
+ return cancellation_slot_binder<decay_t<T>, CancellationSlot>(
+ s, static_cast<T&&>(t));
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace detail {
+
+template <typename TargetAsyncResult,
+ typename CancellationSlot, typename = void>
+class cancellation_slot_binder_completion_handler_async_result
+{
+public:
+ template <typename T>
+ explicit cancellation_slot_binder_completion_handler_async_result(T&)
+ {
+ }
+};
+
+template <typename TargetAsyncResult, typename CancellationSlot>
+class cancellation_slot_binder_completion_handler_async_result<
+ TargetAsyncResult, CancellationSlot,
+ void_t<typename TargetAsyncResult::completion_handler_type>>
+{
+private:
+ TargetAsyncResult target_;
+
+public:
+ typedef cancellation_slot_binder<
+ typename TargetAsyncResult::completion_handler_type, CancellationSlot>
+ completion_handler_type;
+
+ explicit cancellation_slot_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
+};
+
+template <typename TargetAsyncResult, typename = void>
+struct cancellation_slot_binder_async_result_return_type
+{
+};
+
+template <typename TargetAsyncResult>
+struct cancellation_slot_binder_async_result_return_type<
+ TargetAsyncResult, void_t<typename TargetAsyncResult::return_type>>
+{
+ typedef typename TargetAsyncResult::return_type return_type;
+};
+
+} // namespace detail
+
+template <typename T, typename CancellationSlot, typename Signature>
+class async_result<cancellation_slot_binder<T, CancellationSlot>, Signature> :
+ public detail::cancellation_slot_binder_completion_handler_async_result<
+ async_result<T, Signature>, CancellationSlot>,
+ public detail::cancellation_slot_binder_async_result_return_type<
+ async_result<T, Signature>>
+{
+public:
+ explicit async_result(cancellation_slot_binder<T, CancellationSlot>& b)
+ : detail::cancellation_slot_binder_completion_handler_async_result<
+ async_result<T, Signature>, CancellationSlot>(b.get())
+ {
+ }
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ template <typename Init>
+ init_wrapper(const CancellationSlot& slot, Init&& init)
+ : slot_(slot),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ cancellation_slot_binder<decay_t<Handler>, CancellationSlot>(
+ slot_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args) const
+ {
+ initiation_(
+ cancellation_slot_binder<decay_t<Handler>, CancellationSlot>(
+ slot_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ CancellationSlot slot_;
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
+ {
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(
+ token.get_cancellation_slot(),
+ static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
+ }
+
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+
+ async_result<T, Signature> target_;
+};
+
+template <template <typename, typename> class Associator,
+ typename T, typename CancellationSlot, typename DefaultCandidate>
+struct associator<Associator,
+ cancellation_slot_binder<T, CancellationSlot>,
+ DefaultCandidate>
+ : Associator<T, DefaultCandidate>
+{
+ static typename Associator<T, DefaultCandidate>::type get(
+ const cancellation_slot_binder<T, CancellationSlot>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
+
+ static auto get(const cancellation_slot_binder<T, CancellationSlot>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
+ {
+ return Associator<T, DefaultCandidate>::get(b.get(), c);
+ }
+};
+
+template <typename T, typename CancellationSlot, typename CancellationSlot1>
+struct associated_cancellation_slot<
+ cancellation_slot_binder<T, CancellationSlot>,
+ CancellationSlot1>
+{
+ typedef CancellationSlot type;
+
+ static auto get(const cancellation_slot_binder<T, CancellationSlot>& b,
+ const CancellationSlot1& = CancellationSlot1()) noexcept
+ -> decltype(b.get_cancellation_slot())
+ {
+ return b.get_cancellation_slot();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BIND_CANCELLATION_SLOT_HPP
diff --git a/3rdparty/asio/include/asio/bind_executor.hpp b/3rdparty/asio/include/asio/bind_executor.hpp
index 3ed890d9d73..f117b4ce903 100644
--- a/3rdparty/asio/include/asio/bind_executor.hpp
+++ b/3rdparty/asio/include/asio/bind_executor.hpp
@@ -2,7 +2,7 @@
// bind_executor.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,10 +17,10 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/associated_executor.hpp"
-#include "asio/associated_allocator.hpp"
+#include "asio/associator.hpp"
#include "asio/async_result.hpp"
+#include "asio/execution/executor.hpp"
#include "asio/execution_context.hpp"
#include "asio/is_executor.hpp"
#include "asio/uses_executor.hpp"
@@ -30,12 +30,6 @@
namespace asio {
namespace detail {
-template <typename T>
-struct executor_binder_check
-{
- typedef void type;
-};
-
// Helper to automatically define nested typedef result_type.
template <typename T, typename = void>
@@ -46,8 +40,7 @@ protected:
};
template <typename T>
-struct executor_binder_result_type<T,
- typename executor_binder_check<typename T::result_type>::type>
+struct executor_binder_result_type<T, void_t<typename T::result_type>>
{
typedef typename T::result_type result_type;
protected:
@@ -108,8 +101,7 @@ template <typename T, typename = void>
struct executor_binder_argument_type {};
template <typename T>
-struct executor_binder_argument_type<T,
- typename executor_binder_check<typename T::argument_type>::type>
+struct executor_binder_argument_type<T, void_t<typename T::argument_type>>
{
typedef typename T::argument_type argument_type;
};
@@ -134,7 +126,7 @@ struct executor_binder_argument_types {};
template <typename T>
struct executor_binder_argument_types<T,
- typename executor_binder_check<typename T::first_argument_type>::type>
+ void_t<typename T::first_argument_type>>
{
typedef typename T::first_argument_type first_argument_type;
typedef typename T::second_argument_type second_argument_type;
@@ -154,22 +146,20 @@ struct executor_binder_argument_type<R(&)(A1, A2)>
typedef A2 second_argument_type;
};
-// Helper to:
-// - Apply the empty base optimisation to the executor.
-// - Perform uses_executor construction of the target type, if required.
+// Helper to perform uses_executor construction of the target type, if
+// required.
template <typename T, typename Executor, bool UsesExecutor>
class executor_binder_base;
template <typename T, typename Executor>
class executor_binder_base<T, Executor, true>
- : protected Executor
{
protected:
template <typename E, typename U>
- executor_binder_base(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(U) u)
- : executor_(ASIO_MOVE_CAST(E)(e)),
- target_(executor_arg_t(), executor_, ASIO_MOVE_CAST(U)(u))
+ executor_binder_base(E&& e, U&& u)
+ : executor_(static_cast<E&&>(e)),
+ target_(executor_arg_t(), executor_, static_cast<U&&>(u))
{
}
@@ -182,9 +172,9 @@ class executor_binder_base<T, Executor, false>
{
protected:
template <typename E, typename U>
- executor_binder_base(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(U) u)
- : executor_(ASIO_MOVE_CAST(E)(e)),
- target_(ASIO_MOVE_CAST(U)(u))
+ executor_binder_base(E&& e, U&& u)
+ : executor_(static_cast<E&&>(e)),
+ target_(static_cast<U&&>(u))
{
}
@@ -192,21 +182,6 @@ protected:
T target_;
};
-// Helper to enable SFINAE on zero-argument operator() below.
-
-template <typename T, typename = void>
-struct executor_binder_result_of0
-{
- typedef void type;
-};
-
-template <typename T>
-struct executor_binder_result_of0<T,
- typename executor_binder_check<typename result_of<T()>::type>::type>
-{
- typedef typename result_of<T()>::type type;
-};
-
} // namespace detail
/// A call wrapper type to bind an executor of type @c Executor to an object of
@@ -297,8 +272,8 @@ public:
*/
template <typename U>
executor_binder(executor_arg_t, const executor_type& e,
- ASIO_MOVE_ARG(U) u)
- : base_type(e, ASIO_MOVE_CAST(U)(u))
+ U&& u)
+ : base_type(e, static_cast<U&&>(u))
{
}
@@ -322,7 +297,9 @@ public:
* @c U.
*/
template <typename U, typename OtherExecutor>
- executor_binder(const executor_binder<U, OtherExecutor>& other)
+ executor_binder(const executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
: base_type(other.get_executor(), other.get())
{
}
@@ -335,32 +312,33 @@ public:
*/
template <typename U, typename OtherExecutor>
executor_binder(executor_arg_t, const executor_type& e,
- const executor_binder<U, OtherExecutor>& other)
+ const executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
: base_type(e, other.get())
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// Move constructor.
executor_binder(executor_binder&& other)
- : base_type(ASIO_MOVE_CAST(executor_type)(other.get_executor()),
- ASIO_MOVE_CAST(T)(other.get()))
+ : base_type(static_cast<executor_type&&>(other.get_executor()),
+ static_cast<T&&>(other.get()))
{
}
/// Move construct the target object, but specify a different executor.
executor_binder(executor_arg_t, const executor_type& e,
executor_binder&& other)
- : base_type(e, ASIO_MOVE_CAST(T)(other.get()))
+ : base_type(e, static_cast<T&&>(other.get()))
{
}
/// Move construct from a different executor wrapper type.
template <typename U, typename OtherExecutor>
- executor_binder(executor_binder<U, OtherExecutor>&& other)
- : base_type(ASIO_MOVE_CAST(OtherExecutor)(other.get_executor()),
- ASIO_MOVE_CAST(U)(other.get()))
+ executor_binder(executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : base_type(static_cast<OtherExecutor&&>(other.get_executor()),
+ static_cast<U&&>(other.get()))
{
}
@@ -368,124 +346,49 @@ public:
/// different executor.
template <typename U, typename OtherExecutor>
executor_binder(executor_arg_t, const executor_type& e,
- executor_binder<U, OtherExecutor>&& other)
- : base_type(e, ASIO_MOVE_CAST(U)(other.get()))
+ executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : base_type(e, static_cast<U&&>(other.get()))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// Destructor.
~executor_binder()
{
}
/// Obtain a reference to the target object.
- target_type& get() ASIO_NOEXCEPT
+ target_type& get() noexcept
{
return this->target_;
}
/// Obtain a reference to the target object.
- const target_type& get() const ASIO_NOEXCEPT
+ const target_type& get() const noexcept
{
return this->target_;
}
/// Obtain the associated executor.
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return this->executor_;
}
-#if defined(GENERATING_DOCUMENTATION)
-
- template <typename... Args> auto operator()(Args&& ...);
- template <typename... Args> auto operator()(Args&& ...) const;
-
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
/// Forwarding function call operator.
template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- ASIO_MOVE_ARG(Args)... args)
+ result_of_t<T(Args...)> operator()(Args&&... args)
{
- return this->target_(ASIO_MOVE_CAST(Args)(args)...);
+ return this->target_(static_cast<Args&&>(args)...);
}
/// Forwarding function call operator.
template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- ASIO_MOVE_ARG(Args)... args) const
- {
- return this->target_(ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#elif defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typename detail::executor_binder_result_of0<T>::type operator()()
- {
- return this->target_();
- }
-
- typename detail::executor_binder_result_of0<T>::type operator()() const
- {
- return this->target_();
- }
-
-#define ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(ASIO_VARIADIC_TARGS(n))>::type operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(ASIO_VARIADIC_TARGS(n))>::type operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
-#undef ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
-
-#else // defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typedef typename detail::executor_binder_result_type<T>::result_type_or_void
- result_type_or_void;
-
- result_type_or_void operator()()
- {
- return this->target_();
- }
-
- result_type_or_void operator()() const
+ result_of_t<T(Args...)> operator()(Args&&... args) const
{
- return this->target_();
+ return this->target_(static_cast<Args&&>(args)...);
}
-#define ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
-#undef ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
-
-#endif // defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
private:
typedef detail::executor_binder_base<T, Executor,
uses_executor<T, Executor>::value> base_type;
@@ -493,25 +396,27 @@ private:
/// Associate an object of type @c T with an executor of type @c Executor.
template <typename Executor, typename T>
-inline executor_binder<typename decay<T>::type, Executor>
-bind_executor(const Executor& ex, ASIO_MOVE_ARG(T) t,
- typename enable_if<is_executor<Executor>::value>::type* = 0)
+ASIO_NODISCARD inline executor_binder<decay_t<T>, Executor>
+bind_executor(const Executor& ex, T&& t,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
{
- return executor_binder<typename decay<T>::type, Executor>(
- executor_arg_t(), ex, ASIO_MOVE_CAST(T)(t));
+ return executor_binder<decay_t<T>, Executor>(
+ executor_arg_t(), ex, static_cast<T&&>(t));
}
/// Associate an object of type @c T with an execution context's executor.
template <typename ExecutionContext, typename T>
-inline executor_binder<typename decay<T>::type,
- typename ExecutionContext::executor_type>
-bind_executor(ExecutionContext& ctx, ASIO_MOVE_ARG(T) t,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0)
+ASIO_NODISCARD inline executor_binder<decay_t<T>,
+ typename ExecutionContext::executor_type>
+bind_executor(ExecutionContext& ctx, T&& t,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
{
- return executor_binder<typename decay<T>::type,
- typename ExecutionContext::executor_type>(
- executor_arg_t(), ctx.get_executor(), ASIO_MOVE_CAST(T)(t));
+ return executor_binder<decay_t<T>, typename ExecutionContext::executor_type>(
+ executor_arg_t(), ctx.get_executor(), static_cast<T&&>(t));
}
#if !defined(GENERATING_DOCUMENTATION)
@@ -520,73 +425,138 @@ template <typename T, typename Executor>
struct uses_executor<executor_binder<T, Executor>, Executor>
: true_type {};
-template <typename T, typename Executor, typename Signature>
-class async_result<executor_binder<T, Executor>, Signature>
+namespace detail {
+
+template <typename TargetAsyncResult, typename Executor, typename = void>
+class executor_binder_completion_handler_async_result
+{
+public:
+ template <typename T>
+ explicit executor_binder_completion_handler_async_result(T&)
+ {
+ }
+};
+
+template <typename TargetAsyncResult, typename Executor>
+class executor_binder_completion_handler_async_result<
+ TargetAsyncResult, Executor,
+ void_t<typename TargetAsyncResult::completion_handler_type >>
{
+private:
+ TargetAsyncResult target_;
+
public:
typedef executor_binder<
- typename async_result<T, Signature>::completion_handler_type, Executor>
+ typename TargetAsyncResult::completion_handler_type, Executor>
completion_handler_type;
- typedef typename async_result<T, Signature>::return_type return_type;
-
- explicit async_result(executor_binder<T, Executor>& b)
- : target_(b.get())
+ explicit executor_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
{
}
- return_type get()
+ auto get() -> decltype(target_.get())
{
return target_.get();
}
-
-private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
-
- async_result<T, Signature> target_;
};
-#if !defined(ASIO_NO_DEPRECATED)
+template <typename TargetAsyncResult, typename = void>
+struct executor_binder_async_result_return_type
+{
+};
-template <typename T, typename Executor, typename Signature>
-struct handler_type<executor_binder<T, Executor>, Signature>
+template <typename TargetAsyncResult>
+struct executor_binder_async_result_return_type<TargetAsyncResult,
+ void_t<typename TargetAsyncResult::return_type>>
{
- typedef executor_binder<
- typename handler_type<T, Signature>::type, Executor> type;
+ typedef typename TargetAsyncResult::return_type return_type;
};
-template <typename T, typename Executor>
-class async_result<executor_binder<T, Executor> >
+} // namespace detail
+
+template <typename T, typename Executor, typename Signature>
+class async_result<executor_binder<T, Executor>, Signature> :
+ public detail::executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>,
+ public detail::executor_binder_async_result_return_type<
+ async_result<T, Signature>>
{
public:
- typedef typename async_result<T>::type type;
-
explicit async_result(executor_binder<T, Executor>& b)
- : target_(b.get())
+ : detail::executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>(b.get())
{
}
- type get()
+ template <typename Initiation>
+ struct init_wrapper
{
- return target_.get();
+ template <typename Init>
+ init_wrapper(const Executor& ex, Init&& init)
+ : ex_(ex),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ executor_binder<decay_t<Handler>, Executor>(
+ executor_arg_t(), ex_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args) const
+ {
+ initiation_(
+ executor_binder<decay_t<Handler>, Executor>(
+ executor_arg_t(), ex_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Executor ex_;
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
+ {
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(
+ token.get_executor(), static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
}
private:
- async_result<T> target_;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
-#endif // !defined(ASIO_NO_DEPRECATED)
-
-template <typename T, typename Executor, typename Allocator>
-struct associated_allocator<executor_binder<T, Executor>, Allocator>
+template <template <typename, typename> class Associator,
+ typename T, typename Executor, typename DefaultCandidate>
+struct associator<Associator, executor_binder<T, Executor>, DefaultCandidate>
+ : Associator<T, DefaultCandidate>
{
- typedef typename associated_allocator<T, Allocator>::type type;
+ static typename Associator<T, DefaultCandidate>::type get(
+ const executor_binder<T, Executor>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
- static type get(const executor_binder<T, Executor>& b,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static auto get(const executor_binder<T, Executor>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
{
- return associated_allocator<T, Allocator>::get(b.get(), a);
+ return Associator<T, DefaultCandidate>::get(b.get(), c);
}
};
@@ -595,8 +565,9 @@ struct associated_executor<executor_binder<T, Executor>, Executor1>
{
typedef Executor type;
- static type get(const executor_binder<T, Executor>& b,
- const Executor1& = Executor1()) ASIO_NOEXCEPT
+ static auto get(const executor_binder<T, Executor>& b,
+ const Executor1& = Executor1()) noexcept
+ -> decltype(b.get_executor())
{
return b.get_executor();
}
diff --git a/3rdparty/asio/include/asio/bind_immediate_executor.hpp b/3rdparty/asio/include/asio/bind_immediate_executor.hpp
new file mode 100644
index 00000000000..b02c520a689
--- /dev/null
+++ b/3rdparty/asio/include/asio/bind_immediate_executor.hpp
@@ -0,0 +1,549 @@
+//
+// bind_immediate_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BIND_IMMEDIATE_EXECUTOR_HPP
+#define ASIO_BIND_IMMEDIATE_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Helper to automatically define nested typedef result_type.
+
+template <typename T, typename = void>
+struct immediate_executor_binder_result_type
+{
+protected:
+ typedef void result_type_or_void;
+};
+
+template <typename T>
+struct immediate_executor_binder_result_type<T, void_t<typename T::result_type>>
+{
+ typedef typename T::result_type result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct immediate_executor_binder_result_type<R(*)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct immediate_executor_binder_result_type<R(&)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_result_type<R(*)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_result_type<R(&)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_result_type<R(*)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_result_type<R(&)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+// Helper to automatically define nested typedef argument_type.
+
+template <typename T, typename = void>
+struct immediate_executor_binder_argument_type {};
+
+template <typename T>
+struct immediate_executor_binder_argument_type<T,
+ void_t<typename T::argument_type>>
+{
+ typedef typename T::argument_type argument_type;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_argument_type<R(*)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_argument_type<R(&)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+// Helper to automatically define nested typedefs first_argument_type and
+// second_argument_type.
+
+template <typename T, typename = void>
+struct immediate_executor_binder_argument_types {};
+
+template <typename T>
+struct immediate_executor_binder_argument_types<T,
+ void_t<typename T::first_argument_type>>
+{
+ typedef typename T::first_argument_type first_argument_type;
+ typedef typename T::second_argument_type second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_argument_type<R(*)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_argument_type<R(&)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+} // namespace detail
+
+/// A call wrapper type to bind a immediate executor of type @c Executor
+/// to an object of type @c T.
+template <typename T, typename Executor>
+class immediate_executor_binder
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::immediate_executor_binder_result_type<T>,
+ public detail::immediate_executor_binder_argument_type<T>,
+ public detail::immediate_executor_binder_argument_types<T>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+public:
+ /// The type of the target object.
+ typedef T target_type;
+
+ /// The type of the associated immediate executor.
+ typedef Executor immediate_executor_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The return type if a function.
+ /**
+ * The type of @c result_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to function type, @c result_type is a synonym for
+ * the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c result_type, then @c
+ * result_type is a synonym for @c T::result_type;
+ *
+ * @li otherwise @c result_type is not defined.
+ */
+ typedef see_below result_type;
+
+ /// The type of the function's argument.
+ /**
+ * The type of @c argument_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to a function type accepting a single argument,
+ * @c argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c argument_type, then @c
+ * argument_type is a synonym for @c T::argument_type;
+ *
+ * @li otherwise @c argument_type is not defined.
+ */
+ typedef see_below argument_type;
+
+ /// The type of the function's first argument.
+ /**
+ * The type of @c first_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * first_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c first_argument_type is a synonym for @c T::first_argument_type;
+ *
+ * @li otherwise @c first_argument_type is not defined.
+ */
+ typedef see_below first_argument_type;
+
+ /// The type of the function's second argument.
+ /**
+ * The type of @c second_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * second_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c second_argument_type is a synonym for @c T::second_argument_type;
+ *
+ * @li otherwise @c second_argument_type is not defined.
+ */
+ typedef see_below second_argument_type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a immediate executor wrapper for the specified object.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U>
+ immediate_executor_binder(const immediate_executor_type& e,
+ U&& u)
+ : executor_(e),
+ target_(static_cast<U&&>(u))
+ {
+ }
+
+ /// Copy constructor.
+ immediate_executor_binder(const immediate_executor_binder& other)
+ : executor_(other.get_immediate_executor()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy, but specify a different immediate executor.
+ immediate_executor_binder(const immediate_executor_type& e,
+ const immediate_executor_binder& other)
+ : executor_(e),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different immediate executor wrapper type.
+ /**
+ * This constructor is only valid if the @c Executor type is
+ * constructible from type @c OtherExecutor, and the type @c T is
+ * constructible from type @c U.
+ */
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(
+ const immediate_executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(other.get_immediate_executor()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different immediate executor wrapper type, but
+ /// specify a different immediate executor.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(const immediate_executor_type& e,
+ const immediate_executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(e),
+ target_(other.get())
+ {
+ }
+
+ /// Move constructor.
+ immediate_executor_binder(immediate_executor_binder&& other)
+ : executor_(static_cast<immediate_executor_type&&>(
+ other.get_immediate_executor())),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct the target object, but specify a different immediate
+ /// executor.
+ immediate_executor_binder(const immediate_executor_type& e,
+ immediate_executor_binder&& other)
+ : executor_(e),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different immediate executor wrapper type.
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(
+ immediate_executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(static_cast<OtherExecutor&&>(
+ other.get_immediate_executor())),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different immediate executor wrapper type, but
+ /// specify a different immediate executor.
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(const immediate_executor_type& e,
+ immediate_executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(e),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Destructor.
+ ~immediate_executor_binder()
+ {
+ }
+
+ /// Obtain a reference to the target object.
+ target_type& get() noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain a reference to the target object.
+ const target_type& get() const noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain the associated immediate executor.
+ immediate_executor_type get_immediate_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args)
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args) const
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+private:
+ Executor executor_;
+ T target_;
+};
+
+/// Associate an object of type @c T with a immediate executor of type
+/// @c Executor.
+template <typename Executor, typename T>
+ASIO_NODISCARD inline immediate_executor_binder<decay_t<T>, Executor>
+bind_immediate_executor(const Executor& e, T&& t)
+{
+ return immediate_executor_binder<
+ decay_t<T>, Executor>(
+ e, static_cast<T&&>(t));
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace detail {
+
+template <typename TargetAsyncResult, typename Executor, typename = void>
+class immediate_executor_binder_completion_handler_async_result
+{
+public:
+ template <typename T>
+ explicit immediate_executor_binder_completion_handler_async_result(T&)
+ {
+ }
+};
+
+template <typename TargetAsyncResult, typename Executor>
+class immediate_executor_binder_completion_handler_async_result<
+ TargetAsyncResult, Executor,
+ void_t<
+ typename TargetAsyncResult::completion_handler_type
+ >>
+{
+private:
+ TargetAsyncResult target_;
+
+public:
+ typedef immediate_executor_binder<
+ typename TargetAsyncResult::completion_handler_type, Executor>
+ completion_handler_type;
+
+ explicit immediate_executor_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
+};
+
+template <typename TargetAsyncResult, typename = void>
+struct immediate_executor_binder_async_result_return_type
+{
+};
+
+template <typename TargetAsyncResult>
+struct immediate_executor_binder_async_result_return_type<
+ TargetAsyncResult,
+ void_t<
+ typename TargetAsyncResult::return_type
+ >>
+{
+ typedef typename TargetAsyncResult::return_type return_type;
+};
+
+} // namespace detail
+
+template <typename T, typename Executor, typename Signature>
+class async_result<immediate_executor_binder<T, Executor>, Signature> :
+ public detail::immediate_executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>,
+ public detail::immediate_executor_binder_async_result_return_type<
+ async_result<T, Signature>>
+{
+public:
+ explicit async_result(immediate_executor_binder<T, Executor>& b)
+ : detail::immediate_executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>(b.get())
+ {
+ }
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ template <typename Init>
+ init_wrapper(const Executor& e, Init&& init)
+ : executor_(e),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ immediate_executor_binder<
+ decay_t<Handler>, Executor>(
+ executor_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args) const
+ {
+ initiation_(
+ immediate_executor_binder<
+ decay_t<Handler>, Executor>(
+ executor_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Executor executor_;
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
+ {
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(
+ token.get_immediate_executor(),
+ static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
+ }
+
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+
+ async_result<T, Signature> target_;
+};
+
+template <template <typename, typename> class Associator,
+ typename T, typename Executor, typename DefaultCandidate>
+struct associator<Associator,
+ immediate_executor_binder<T, Executor>,
+ DefaultCandidate>
+ : Associator<T, DefaultCandidate>
+{
+ static typename Associator<T, DefaultCandidate>::type get(
+ const immediate_executor_binder<T, Executor>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
+
+ static auto get(const immediate_executor_binder<T, Executor>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
+ {
+ return Associator<T, DefaultCandidate>::get(b.get(), c);
+ }
+};
+
+template <typename T, typename Executor, typename Executor1>
+struct associated_immediate_executor<
+ immediate_executor_binder<T, Executor>,
+ Executor1>
+{
+ typedef Executor type;
+
+ static auto get(const immediate_executor_binder<T, Executor>& b,
+ const Executor1& = Executor1()) noexcept
+ -> decltype(b.get_immediate_executor())
+ {
+ return b.get_immediate_executor();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BIND_IMMEDIATE_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/buffer.hpp b/3rdparty/asio/include/asio/buffer.hpp
index 094353eb52d..ad49f290a66 100644
--- a/3rdparty/asio/include/asio/buffer.hpp
+++ b/3rdparty/asio/include/asio/buffer.hpp
@@ -2,7 +2,7 @@
// buffer.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,18 +23,19 @@
#include <string>
#include <vector>
#include "asio/detail/array_fwd.hpp"
-#include "asio/detail/is_buffer_sequence.hpp"
+#include "asio/detail/memory.hpp"
#include "asio/detail/string_view.hpp"
#include "asio/detail/throw_exception.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/is_contiguous_iterator.hpp"
-#if defined(ASIO_MSVC)
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1700)
# if defined(_HAS_ITERATOR_DEBUGGING) && (_HAS_ITERATOR_DEBUGGING != 0)
# if !defined(ASIO_DISABLE_BUFFER_DEBUGGING)
# define ASIO_ENABLE_BUFFER_DEBUGGING
# endif // !defined(ASIO_DISABLE_BUFFER_DEBUGGING)
# endif // defined(_HAS_ITERATOR_DEBUGGING)
-#endif // defined(ASIO_MSVC)
+#endif // defined(ASIO_MSVC) && (ASIO_MSVC >= 1700)
#if defined(__GNUC__)
# if defined(_GLIBCXX_DEBUG)
@@ -48,19 +49,6 @@
# include "asio/detail/functional.hpp"
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
-#if defined(ASIO_HAS_BOOST_WORKAROUND)
-# include <boost/detail/workaround.hpp>
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) \
- || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-# define ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND
-# endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- // || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-#endif // defined(ASIO_HAS_BOOST_WORKAROUND)
-
-#if defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-# include "asio/detail/type_traits.hpp"
-#endif // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -91,14 +79,14 @@ class mutable_buffer
{
public:
/// Construct an empty buffer.
- mutable_buffer() ASIO_NOEXCEPT
+ mutable_buffer() noexcept
: data_(0),
size_(0)
{
}
/// Construct a buffer to represent a given memory range.
- mutable_buffer(void* data, std::size_t size) ASIO_NOEXCEPT
+ mutable_buffer(void* data, std::size_t size) noexcept
: data_(data),
size_(size)
{
@@ -120,7 +108,7 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Get a pointer to the beginning of the memory range.
- void* data() const ASIO_NOEXCEPT
+ void* data() const noexcept
{
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
if (size_ && debug_check_)
@@ -130,13 +118,13 @@ public:
}
/// Get the size of the memory range.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return size_;
}
/// Move the start of the buffer by the specified number of bytes.
- mutable_buffer& operator+=(std::size_t n) ASIO_NOEXCEPT
+ mutable_buffer& operator+=(std::size_t n) noexcept
{
std::size_t offset = n < size_ ? n : size_;
data_ = static_cast<char*>(data_) + offset;
@@ -168,7 +156,7 @@ public:
typedef const mutable_buffer* const_iterator;
/// Construct to represent a given memory range.
- mutable_buffers_1(void* data, std::size_t size) ASIO_NOEXCEPT
+ mutable_buffers_1(void* data, std::size_t size) noexcept
: mutable_buffer(data, size)
{
}
@@ -182,19 +170,19 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Construct to represent a single modifiable buffer.
- explicit mutable_buffers_1(const mutable_buffer& b) ASIO_NOEXCEPT
+ explicit mutable_buffers_1(const mutable_buffer& b) noexcept
: mutable_buffer(b)
{
}
/// Get a random-access iterator to the first element.
- const_iterator begin() const ASIO_NOEXCEPT
+ const_iterator begin() const noexcept
{
return this;
}
/// Get a random-access iterator for one past the last element.
- const_iterator end() const ASIO_NOEXCEPT
+ const_iterator end() const noexcept
{
return begin() + 1;
}
@@ -225,21 +213,21 @@ class const_buffer
{
public:
/// Construct an empty buffer.
- const_buffer() ASIO_NOEXCEPT
+ const_buffer() noexcept
: data_(0),
size_(0)
{
}
/// Construct a buffer to represent a given memory range.
- const_buffer(const void* data, std::size_t size) ASIO_NOEXCEPT
+ const_buffer(const void* data, std::size_t size) noexcept
: data_(data),
size_(size)
{
}
/// Construct a non-modifiable buffer from a modifiable one.
- const_buffer(const mutable_buffer& b) ASIO_NOEXCEPT
+ const_buffer(const mutable_buffer& b) noexcept
: data_(b.data()),
size_(b.size())
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -264,7 +252,7 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Get a pointer to the beginning of the memory range.
- const void* data() const ASIO_NOEXCEPT
+ const void* data() const noexcept
{
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
if (size_ && debug_check_)
@@ -274,13 +262,13 @@ public:
}
/// Get the size of the memory range.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return size_;
}
/// Move the start of the buffer by the specified number of bytes.
- const_buffer& operator+=(std::size_t n) ASIO_NOEXCEPT
+ const_buffer& operator+=(std::size_t n) noexcept
{
std::size_t offset = n < size_ ? n : size_;
data_ = static_cast<const char*>(data_) + offset;
@@ -312,7 +300,7 @@ public:
typedef const const_buffer* const_iterator;
/// Construct to represent a given memory range.
- const_buffers_1(const void* data, std::size_t size) ASIO_NOEXCEPT
+ const_buffers_1(const void* data, std::size_t size) noexcept
: const_buffer(data, size)
{
}
@@ -326,19 +314,19 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Construct to represent a single non-modifiable buffer.
- explicit const_buffers_1(const const_buffer& b) ASIO_NOEXCEPT
+ explicit const_buffers_1(const const_buffer& b) noexcept
: const_buffer(b)
{
}
/// Get a random-access iterator to the first element.
- const_iterator begin() const ASIO_NOEXCEPT
+ const_iterator begin() const noexcept
{
return this;
}
/// Get a random-access iterator for one past the last element.
- const_iterator end() const ASIO_NOEXCEPT
+ const_iterator end() const noexcept
{
return begin() + 1;
}
@@ -346,41 +334,6 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
-/// Trait to determine whether a type satisfies the MutableBufferSequence
-/// requirements.
-template <typename T>
-struct is_mutable_buffer_sequence
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : asio::detail::is_buffer_sequence<T, mutable_buffer>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-/// Trait to determine whether a type satisfies the ConstBufferSequence
-/// requirements.
-template <typename T>
-struct is_const_buffer_sequence
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : asio::detail::is_buffer_sequence<T, const_buffer>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
-template <typename T>
-struct is_dynamic_buffer
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : asio::detail::is_dynamic_buffer<T>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
/// (Deprecated: Use the socket/descriptor wait() and async_wait() member
/// functions.) An implementation of both the ConstBufferSequence and
/// MutableBufferSequence concepts to represent a null buffer sequence.
@@ -394,13 +347,13 @@ public:
typedef const mutable_buffer* const_iterator;
/// Get a random-access iterator to the first element.
- const_iterator begin() const ASIO_NOEXCEPT
+ const_iterator begin() const noexcept
{
return &buf_;
}
/// Get a random-access iterator for one past the last element.
- const_iterator end() const ASIO_NOEXCEPT
+ const_iterator end() const noexcept
{
return &buf_;
}
@@ -417,49 +370,47 @@ private:
/*@{*/
/// Get an iterator to the first element in a buffer sequence.
-inline const mutable_buffer* buffer_sequence_begin(const mutable_buffer& b)
+template <typename MutableBuffer>
+inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b,
+ constraint_t<
+ is_convertible<const MutableBuffer*, const mutable_buffer*>::value
+ > = 0) noexcept
{
- return &b;
+ return static_cast<const mutable_buffer*>(detail::addressof(b));
}
/// Get an iterator to the first element in a buffer sequence.
-inline const const_buffer* buffer_sequence_begin(const const_buffer& b)
+template <typename ConstBuffer>
+inline const const_buffer* buffer_sequence_begin(const ConstBuffer& b,
+ constraint_t<
+ is_convertible<const ConstBuffer*, const const_buffer*>::value
+ > = 0) noexcept
{
- return &b;
+ return static_cast<const const_buffer*>(detail::addressof(b));
}
-#if defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/// Get an iterator to the first element in a buffer sequence.
template <typename C>
-inline auto buffer_sequence_begin(C& c) -> decltype(c.begin())
+inline auto buffer_sequence_begin(C& c,
+ constraint_t<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ > = 0) noexcept -> decltype(c.begin())
{
return c.begin();
}
/// Get an iterator to the first element in a buffer sequence.
template <typename C>
-inline auto buffer_sequence_begin(const C& c) -> decltype(c.begin())
+inline auto buffer_sequence_begin(const C& c,
+ constraint_t<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ > = 0) noexcept -> decltype(c.begin())
{
return c.begin();
}
-#else // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-template <typename C>
-inline typename C::iterator buffer_sequence_begin(C& c)
-{
- return c.begin();
-}
-
-template <typename C>
-inline typename C::const_iterator buffer_sequence_begin(const C& c)
-{
- return c.begin();
-}
-
-#endif // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/*@}*/
/** @defgroup buffer_sequence_end asio::buffer_sequence_end
@@ -470,49 +421,47 @@ inline typename C::const_iterator buffer_sequence_begin(const C& c)
/*@{*/
/// Get an iterator to one past the end element in a buffer sequence.
-inline const mutable_buffer* buffer_sequence_end(const mutable_buffer& b)
+template <typename MutableBuffer>
+inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b,
+ constraint_t<
+ is_convertible<const MutableBuffer*, const mutable_buffer*>::value
+ > = 0) noexcept
{
- return &b + 1;
+ return static_cast<const mutable_buffer*>(detail::addressof(b)) + 1;
}
/// Get an iterator to one past the end element in a buffer sequence.
-inline const const_buffer* buffer_sequence_end(const const_buffer& b)
+template <typename ConstBuffer>
+inline const const_buffer* buffer_sequence_end(const ConstBuffer& b,
+ constraint_t<
+ is_convertible<const ConstBuffer*, const const_buffer*>::value
+ > = 0) noexcept
{
- return &b + 1;
+ return static_cast<const const_buffer*>(detail::addressof(b)) + 1;
}
-#if defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/// Get an iterator to one past the end element in a buffer sequence.
template <typename C>
-inline auto buffer_sequence_end(C& c) -> decltype(c.end())
+inline auto buffer_sequence_end(C& c,
+ constraint_t<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ > = 0) noexcept -> decltype(c.end())
{
return c.end();
}
/// Get an iterator to one past the end element in a buffer sequence.
template <typename C>
-inline auto buffer_sequence_end(const C& c) -> decltype(c.end())
-{
- return c.end();
-}
-
-#else // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-template <typename C>
-inline typename C::iterator buffer_sequence_end(C& c)
+inline auto buffer_sequence_end(const C& c,
+ constraint_t<
+ !is_convertible<const C*, const mutable_buffer*>::value
+ && !is_convertible<const C*, const const_buffer*>::value
+ > = 0) noexcept -> decltype(c.end())
{
return c.end();
}
-template <typename C>
-inline typename C::const_iterator buffer_sequence_end(const C& c)
-{
- return c.end();
-}
-
-#endif // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/*@}*/
namespace detail {
@@ -524,25 +473,25 @@ struct multiple_buffers {};
// Helper trait to detect single buffers.
template <typename BufferSequence>
struct buffer_sequence_cardinality :
- conditional<
+ conditional_t<
is_same<BufferSequence, mutable_buffer>::value
#if !defined(ASIO_NO_DEPRECATED)
|| is_same<BufferSequence, mutable_buffers_1>::value
|| is_same<BufferSequence, const_buffers_1>::value
#endif // !defined(ASIO_NO_DEPRECATED)
|| is_same<BufferSequence, const_buffer>::value,
- one_buffer, multiple_buffers>::type {};
+ one_buffer, multiple_buffers> {};
template <typename Iterator>
inline std::size_t buffer_size(one_buffer,
- Iterator begin, Iterator) ASIO_NOEXCEPT
+ Iterator begin, Iterator) noexcept
{
return const_buffer(*begin).size();
}
template <typename Iterator>
inline std::size_t buffer_size(multiple_buffers,
- Iterator begin, Iterator end) ASIO_NOEXCEPT
+ Iterator begin, Iterator end) noexcept
{
std::size_t total_buffer_size = 0;
@@ -577,7 +526,7 @@ inline std::size_t buffer_size(multiple_buffers,
* ConstBufferSequence or @c MutableBufferSequence type requirements.
*/
template <typename BufferSequence>
-inline std::size_t buffer_size(const BufferSequence& b) ASIO_NOEXCEPT
+inline std::size_t buffer_size(const BufferSequence& b) noexcept
{
return detail::buffer_size(
detail::buffer_sequence_cardinality<BufferSequence>(),
@@ -612,14 +561,14 @@ inline std::size_t buffer_size(const BufferSequence& b) ASIO_NOEXCEPT
/// Cast a non-modifiable buffer to a specified pointer to POD type.
template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const mutable_buffer& b) ASIO_NOEXCEPT
+inline PointerToPodType buffer_cast(const mutable_buffer& b) noexcept
{
return static_cast<PointerToPodType>(b.data());
}
/// Cast a non-modifiable buffer to a specified pointer to POD type.
template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const const_buffer& b) ASIO_NOEXCEPT
+inline PointerToPodType buffer_cast(const const_buffer& b) noexcept
{
return static_cast<PointerToPodType>(b.data());
}
@@ -633,7 +582,7 @@ inline PointerToPodType buffer_cast(const const_buffer& b) ASIO_NOEXCEPT
* @relates mutable_buffer
*/
inline mutable_buffer operator+(const mutable_buffer& b,
- std::size_t n) ASIO_NOEXCEPT
+ std::size_t n) noexcept
{
std::size_t offset = n < b.size() ? n : b.size();
char* new_data = static_cast<char*>(b.data()) + offset;
@@ -650,7 +599,7 @@ inline mutable_buffer operator+(const mutable_buffer& b,
* @relates mutable_buffer
*/
inline mutable_buffer operator+(std::size_t n,
- const mutable_buffer& b) ASIO_NOEXCEPT
+ const mutable_buffer& b) noexcept
{
return b + n;
}
@@ -660,7 +609,7 @@ inline mutable_buffer operator+(std::size_t n,
* @relates const_buffer
*/
inline const_buffer operator+(const const_buffer& b,
- std::size_t n) ASIO_NOEXCEPT
+ std::size_t n) noexcept
{
std::size_t offset = n < b.size() ? n : b.size();
const char* new_data = static_cast<const char*>(b.data()) + offset;
@@ -677,7 +626,7 @@ inline const_buffer operator+(const const_buffer& b,
* @relates const_buffer
*/
inline const_buffer operator+(std::size_t n,
- const const_buffer& b) ASIO_NOEXCEPT
+ const const_buffer& b) noexcept
{
return b + n;
}
@@ -876,6 +825,25 @@ private:
* bufs2.push_back(asio::buffer(d2));
* bufs2.push_back(asio::buffer(d3));
* bytes_transferred = sock.send(bufs2); @endcode
+ *
+ * @par Buffer Literals
+ *
+ * The `_buf` literal suffix, defined in namespace
+ * <tt>asio::buffer_literals</tt>, may be used to create @c const_buffer
+ * objects from string, binary integer, and hexadecimal integer literals.
+ * For example:
+ *
+ * @code
+ * using namespace asio::buffer_literals;
+ *
+ * asio::const_buffer b1 = "hello"_buf;
+ * asio::const_buffer b2 = 0xdeadbeef_buf;
+ * asio::const_buffer b3 = 0x0123456789abcdef0123456789abcdef_buf;
+ * asio::const_buffer b4 = 0b1010101011001100_buf; @endcode
+ *
+ * Note that the memory associated with a buffer literal is valid for the
+ * lifetime of the program. This means that the buffer can be safely used with
+ * asynchronous operations.
*/
/*@{*/
@@ -891,8 +859,8 @@ private:
/**
* @returns <tt>mutable_buffer(b)</tt>.
*/
-inline ASIO_MUTABLE_BUFFER buffer(
- const mutable_buffer& b) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ const mutable_buffer& b) noexcept
{
return ASIO_MUTABLE_BUFFER(b);
}
@@ -904,8 +872,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* b.data(),
* min(b.size(), max_size_in_bytes)); @endcode
*/
-inline ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ const mutable_buffer& b,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(
mutable_buffer(b.data(),
@@ -921,8 +890,8 @@ inline ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
/**
* @returns <tt>const_buffer(b)</tt>.
*/
-inline ASIO_CONST_BUFFER buffer(
- const const_buffer& b) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const const_buffer& b) noexcept
{
return ASIO_CONST_BUFFER(b);
}
@@ -934,8 +903,9 @@ inline ASIO_CONST_BUFFER buffer(
* b.data(),
* min(b.size(), max_size_in_bytes)); @endcode
*/
-inline ASIO_CONST_BUFFER buffer(const const_buffer& b,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const const_buffer& b,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(b.data(),
b.size() < max_size_in_bytes
@@ -950,8 +920,8 @@ inline ASIO_CONST_BUFFER buffer(const const_buffer& b,
/**
* @returns <tt>mutable_buffer(data, size_in_bytes)</tt>.
*/
-inline ASIO_MUTABLE_BUFFER buffer(void* data,
- std::size_t size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ void* data, std::size_t size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data, size_in_bytes);
}
@@ -960,8 +930,8 @@ inline ASIO_MUTABLE_BUFFER buffer(void* data,
/**
* @returns <tt>const_buffer(data, size_in_bytes)</tt>.
*/
-inline ASIO_CONST_BUFFER buffer(const void* data,
- std::size_t size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const void* data, std::size_t size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data, size_in_bytes);
}
@@ -974,7 +944,8 @@ inline ASIO_CONST_BUFFER buffer(const void* data,
* N * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ PodType (&data)[N]) noexcept
{
return ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
}
@@ -987,8 +958,9 @@ inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) ASIO_NOEXCEPT
* min(N * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ PodType (&data)[N],
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data,
N * sizeof(PodType) < max_size_in_bytes
@@ -1003,8 +975,8 @@ inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
* N * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- const PodType (&data)[N]) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const PodType (&data)[N]) noexcept
{
return ASIO_CONST_BUFFER(data, N * sizeof(PodType));
}
@@ -1017,84 +989,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(N * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(const PodType (&data)[N],
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const PodType (&data)[N],
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data,
N * sizeof(PodType) < max_size_in_bytes
? N * sizeof(PodType) : max_size_in_bytes);
}
-#if defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
-// Borland C++ and Sun Studio think the overloads:
-//
-// unspecified buffer(boost::array<PodType, N>& array ...);
-//
-// and
-//
-// unspecified buffer(boost::array<const PodType, N>& array ...);
-//
-// are ambiguous. This will be worked around by using a buffer_types traits
-// class that contains typedefs for the appropriate buffer and container
-// classes, based on whether PodType is const or non-const.
-
-namespace detail {
-
-template <bool IsConst>
-struct buffer_types_base;
-
-template <>
-struct buffer_types_base<false>
-{
- typedef mutable_buffer buffer_type;
- typedef ASIO_MUTABLE_BUFFER container_type;
-};
-
-template <>
-struct buffer_types_base<true>
-{
- typedef const_buffer buffer_type;
- typedef ASIO_CONST_BUFFER container_type;
-};
-
-template <typename PodType>
-struct buffer_types
- : public buffer_types_base<is_const<PodType>::value>
-{
-};
-
-} // namespace detail
-
-template <typename PodType, std::size_t N>
-inline typename detail::buffer_types<PodType>::container_type
-buffer(boost::array<PodType, N>& data) ASIO_NOEXCEPT
-{
- typedef typename asio::detail::buffer_types<PodType>::buffer_type
- buffer_type;
- typedef typename asio::detail::buffer_types<PodType>::container_type
- container_type;
- return container_type(
- buffer_type(data.c_array(), data.size() * sizeof(PodType)));
-}
-
-template <typename PodType, std::size_t N>
-inline typename detail::buffer_types<PodType>::container_type
-buffer(boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
-{
- typedef typename asio::detail::buffer_types<PodType>::buffer_type
- buffer_type;
- typedef typename asio::detail::buffer_types<PodType>::container_type
- container_type;
- return container_type(
- buffer_type(data.c_array(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes));
-}
-
-#else // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
/// Create a new modifiable buffer that represents the given POD array.
/**
* @returns A mutable_buffer value equivalent to:
@@ -1103,8 +1006,8 @@ buffer(boost::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(
- boost::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ boost::array<PodType, N>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(
data.c_array(), data.size() * sizeof(PodType));
@@ -1118,8 +1021,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.c_array(),
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1134,8 +1038,8 @@ inline ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- boost::array<const PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ boost::array<const PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1148,16 +1052,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ boost::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
? data.size() * sizeof(PodType) : max_size_in_bytes);
}
-#endif // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
/// Create a new non-modifiable buffer that represents the given POD array.
/**
* @returns A const_buffer value equivalent to:
@@ -1166,8 +1069,8 @@ inline ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- const boost::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const boost::array<PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1180,16 +1083,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
? data.size() * sizeof(PodType) : max_size_in_bytes);
}
-#if defined(ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
-
/// Create a new modifiable buffer that represents the given POD array.
/**
* @returns A mutable_buffer value equivalent to:
@@ -1198,8 +1100,8 @@ inline ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(
- std::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::array<PodType, N>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1212,8 +1114,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1228,8 +1131,8 @@ inline ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- std::array<const PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ std::array<const PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1242,8 +1145,9 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ std::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1258,8 +1162,8 @@ inline ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- const std::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::array<PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1272,16 +1176,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
? data.size() * sizeof(PodType) : max_size_in_bytes);
}
-#endif // defined(ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
-
/// Create a new modifiable buffer that represents the given POD vector.
/**
* @returns A mutable_buffer value equivalent to:
@@ -1293,8 +1196,8 @@ inline ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(
- std::vector<PodType, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::vector<PodType, Allocator>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(
data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
@@ -1317,8 +1220,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::vector<PodType, Allocator>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1342,8 +1246,8 @@ inline ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
- const std::vector<PodType, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::vector<PodType, Allocator>& data) noexcept
{
return ASIO_CONST_BUFFER(
data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
@@ -1366,9 +1270,9 @@ inline ASIO_CONST_BUFFER buffer(
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
const std::vector<PodType, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1390,8 +1294,8 @@ inline ASIO_CONST_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(
- std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::basic_string<Elem, Traits, Allocator>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem)
@@ -1403,7 +1307,7 @@ inline ASIO_MUTABLE_BUFFER buffer(
);
}
-/// Create a new non-modifiable buffer that represents the given string.
+/// Create a new modifiable buffer that represents the given string.
/**
* @returns A mutable_buffer value equivalent to:
* @code mutable_buffer(
@@ -1414,9 +1318,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem) < max_size_in_bytes
@@ -1437,8 +1341,8 @@ inline ASIO_MUTABLE_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
- const std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::basic_string<Elem, Traits, Allocator>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(Elem)
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -1460,9 +1364,9 @@ inline ASIO_CONST_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
const std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(Elem) < max_size_in_bytes
@@ -1475,17 +1379,17 @@ inline ASIO_CONST_BUFFER buffer(
);
}
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
-/// Create a new modifiable buffer that represents the given string_view.
+/// Create a new non-modifiable buffer that represents the given string_view.
/**
* @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
* data.size() * sizeof(Elem))</tt>.
*/
template <typename Elem, typename Traits>
-inline ASIO_CONST_BUFFER buffer(
- basic_string_view<Elem, Traits> data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ basic_string_view<Elem, Traits> data) noexcept
{
return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem)
@@ -1505,9 +1409,9 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
*/
template <typename Elem, typename Traits>
-inline ASIO_CONST_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
basic_string_view<Elem, Traits> data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem) < max_size_in_bytes
@@ -1520,9 +1424,218 @@ inline ASIO_CONST_BUFFER buffer(
);
}
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
+/// Create a new modifiable buffer from a contiguous container.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(typename T::value_type)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ T& data,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_MUTABLE_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type));
+}
+
+/// Create a new modifiable buffer from a contiguous container.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(
+ * data.size() * sizeof(typename T::value_type),
+ * max_size_in_bytes)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ T& data, std::size_t max_size_in_bytes,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_MUTABLE_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type) < max_size_in_bytes
+ ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(typename T::value_type)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ T& data,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type));
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(
+ * data.size() * sizeof(typename T::value_type),
+ * max_size_in_bytes)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ T& data, std::size_t max_size_in_bytes,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type) < max_size_in_bytes
+ ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(typename T::value_type)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const T& data,
+ constraint_t<
+ is_contiguous_iterator<typename T::const_iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type));
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(
+ * data.size() * sizeof(typename T::value_type),
+ * max_size_in_bytes)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const T& data, std::size_t max_size_in_bytes,
+ constraint_t<
+ is_contiguous_iterator<typename T::const_iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type) < max_size_in_bytes
+ ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
+}
+
/*@}*/
/// Adapt a basic_string to the DynamicBuffer requirements.
@@ -1533,84 +1646,153 @@ template <typename Elem, typename Traits, typename Allocator>
class dynamic_string_buffer
{
public:
- /// The type used to represent the input sequence as a list of buffers.
+ /// The type used to represent a sequence of constant buffers that refers to
+ /// the underlying memory.
typedef ASIO_CONST_BUFFER const_buffers_type;
- /// The type used to represent the output sequence as a list of buffers.
+ /// The type used to represent a sequence of mutable buffers that refers to
+ /// the underlying memory.
typedef ASIO_MUTABLE_BUFFER mutable_buffers_type;
/// Construct a dynamic buffer from a string.
/**
* @param s The string to be used as backing storage for the dynamic buffer.
- * Any existing data in the string is treated as the dynamic buffer's input
- * sequence. The object stores a reference to the string and the user is
- * responsible for ensuring that the string object remains valid until the
- * dynamic_string_buffer object is destroyed.
+ * The object stores a reference to the string and the user is responsible
+ * for ensuring that the string object remains valid while the
+ * dynamic_string_buffer object, and copies of the object, are in use.
+ *
+ * @b DynamicBuffer_v1: Any existing data in the string is treated as the
+ * dynamic buffer's input sequence.
*
* @param maximum_size Specifies a maximum size for the buffer, in bytes.
*/
explicit dynamic_string_buffer(std::basic_string<Elem, Traits, Allocator>& s,
std::size_t maximum_size =
- (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ (std::numeric_limits<std::size_t>::max)()) noexcept
: string_(s),
- size_(string_.size()),
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_((std::numeric_limits<std::size_t>::max)()),
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
max_size_(maximum_size)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
+ dynamic_string_buffer(const dynamic_string_buffer& other) noexcept
+ : string_(other.string_),
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_(other.size_),
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(other.max_size_)
+ {
+ }
+
/// Move construct a dynamic buffer.
- dynamic_string_buffer(dynamic_string_buffer&& other) ASIO_NOEXCEPT
+ dynamic_string_buffer(dynamic_string_buffer&& other) noexcept
: string_(other.string_),
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_(other.size_),
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
max_size_(other.max_size_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Get the size of the input sequence.
- std::size_t size() const ASIO_NOEXCEPT
+ /// @b DynamicBuffer_v1: Get the size of the input sequence.
+ /// @b DynamicBuffer_v2: Get the current size of the underlying memory.
+ /**
+ * @returns @b DynamicBuffer_v1 The current size of the input sequence.
+ * @b DynamicBuffer_v2: The current size of the underlying string if less than
+ * max_size(). Otherwise returns max_size().
+ */
+ std::size_t size() const noexcept
{
- return size_;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ return size_;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ return (std::min)(string_.size(), max_size());
}
/// Get the maximum size of the dynamic buffer.
/**
- * @returns The allowed maximum of the sum of the sizes of the input sequence
- * and output sequence.
+ * @returns The allowed maximum size of the underlying memory.
*/
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return max_size_;
}
- /// Get the current capacity of the dynamic buffer.
+ /// Get the maximum size that the buffer may grow to without triggering
+ /// reallocation.
/**
- * @returns The current total capacity of the buffer, i.e. for both the input
- * sequence and output sequence.
+ * @returns The current capacity of the underlying string if less than
+ * max_size(). Otherwise returns max_size().
*/
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
- return string_.capacity();
+ return (std::min)(string_.capacity(), max_size());
}
- /// Get a list of buffers that represents the input sequence.
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: Get a list of buffers that represents the input
+ /// sequence.
/**
* @returns An object of type @c const_buffers_type that satisfies
* ConstBufferSequence requirements, representing the basic_string memory in
- * input sequence.
+ * the input sequence.
*
* @note The returned object is invalidated by any @c dynamic_string_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
+ * or @c basic_string member function that resizes or erases the string.
*/
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return const_buffers_type(asio::buffer(string_, size_));
}
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing the basic_string memory.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that resizes or erases the string.
+ */
+ mutable_buffers_type data(std::size_t pos, std::size_t n) noexcept
+ {
+ return mutable_buffers_type(asio::buffer(
+ asio::buffer(string_, max_size_) + pos, n));
+ }
- /// Get a list of buffers that represents the output sequence, with the given
- /// size.
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that resizes or erases the string.
+ */
+ const_buffers_type data(std::size_t pos,
+ std::size_t n) const noexcept
+ {
+ return const_buffers_type(asio::buffer(
+ asio::buffer(string_, max_size_) + pos, n));
+ }
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: Get a list of buffers that represents the output
+ /// sequence, with the given size.
/**
* Ensures that the output sequence can accommodate @c n bytes, resizing the
* basic_string object as necessary.
@@ -1627,18 +1809,22 @@ public:
*/
mutable_buffers_type prepare(std::size_t n)
{
- if (size () > max_size() || max_size() - size() < n)
+ if (size() > max_size() || max_size() - size() < n)
{
std::length_error ex("dynamic_string_buffer too long");
asio::detail::throw_exception(ex);
}
+ if (size_ == (std::numeric_limits<std::size_t>::max)())
+ size_ = string_.size(); // Enable v1 behaviour.
+
string_.resize(size_ + n);
return asio::buffer(asio::buffer(string_) + size_, n);
}
- /// Move bytes from the output sequence to the input sequence.
+ /// @b DynamicBuffer_v1: Move bytes from the output sequence to the input
+ /// sequence.
/**
* @param n The number of bytes to append from the start of the output
* sequence to the end of the input sequence. The remainder of the output
@@ -1655,24 +1841,69 @@ public:
size_ += (std::min)(n, string_.size() - size_);
string_.resize(size_);
}
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
- /// Remove characters from the input sequence.
+ /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of
+ /// bytes.
/**
- * Removes @c n characters from the beginning of the input sequence.
+ * Resizes the string to accommodate an additional @c n bytes at the end.
*
- * @note If @c n is greater than the size of the input sequence, the entire
- * input sequence is consumed and no error is issued.
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ */
+ void grow(std::size_t n)
+ {
+ if (size() > max_size() || max_size() - size() < n)
+ {
+ std::length_error ex("dynamic_string_buffer too long");
+ asio::detail::throw_exception(ex);
+ }
+
+ string_.resize(size() + n);
+ }
+
+ /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number
+ /// of bytes.
+ /**
+ * Erases @c n bytes from the end of the string by resizing the basic_string
+ * object. If @c n is greater than the current size of the string, the string
+ * is emptied.
+ */
+ void shrink(std::size_t n)
+ {
+ string_.resize(n > size() ? 0 : size() - n);
+ }
+
+ /// @b DynamicBuffer_v1: Remove characters from the input sequence.
+ /// @b DynamicBuffer_v2: Consume the specified number of bytes from the
+ /// beginning of the underlying memory.
+ /**
+ * @b DynamicBuffer_v1: Removes @c n characters from the beginning of the
+ * input sequence. @note If @c n is greater than the size of the input
+ * sequence, the entire input sequence is consumed and no error is issued.
+ *
+ * @b DynamicBuffer_v2: Erases @c n bytes from the beginning of the string.
+ * If @c n is greater than the current size of the string, the string is
+ * emptied.
*/
void consume(std::size_t n)
{
- std::size_t consume_length = (std::min)(n, size_);
- string_.erase(0, consume_length);
- size_ -= consume_length;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ {
+ std::size_t consume_length = (std::min)(n, size_);
+ string_.erase(0, consume_length);
+ size_ -= consume_length;
+ return;
+ }
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ string_.erase(0, n);
}
private:
std::basic_string<Elem, Traits, Allocator>& string_;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
std::size_t size_;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
const std::size_t max_size_;
};
@@ -1684,97 +1915,168 @@ template <typename Elem, typename Allocator>
class dynamic_vector_buffer
{
public:
- /// The type used to represent the input sequence as a list of buffers.
+ /// The type used to represent a sequence of constant buffers that refers to
+ /// the underlying memory.
typedef ASIO_CONST_BUFFER const_buffers_type;
- /// The type used to represent the output sequence as a list of buffers.
+ /// The type used to represent a sequence of mutable buffers that refers to
+ /// the underlying memory.
typedef ASIO_MUTABLE_BUFFER mutable_buffers_type;
- /// Construct a dynamic buffer from a string.
+ /// Construct a dynamic buffer from a vector.
/**
* @param v The vector to be used as backing storage for the dynamic buffer.
- * Any existing data in the vector is treated as the dynamic buffer's input
- * sequence. The object stores a reference to the vector and the user is
- * responsible for ensuring that the vector object remains valid until the
- * dynamic_vector_buffer object is destroyed.
+ * The object stores a reference to the vector and the user is responsible
+ * for ensuring that the vector object remains valid while the
+ * dynamic_vector_buffer object, and copies of the object, are in use.
*
* @param maximum_size Specifies a maximum size for the buffer, in bytes.
*/
explicit dynamic_vector_buffer(std::vector<Elem, Allocator>& v,
std::size_t maximum_size =
- (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ (std::numeric_limits<std::size_t>::max)()) noexcept
: vector_(v),
- size_(vector_.size()),
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_((std::numeric_limits<std::size_t>::max)()),
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
max_size_(maximum_size)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
+ dynamic_vector_buffer(const dynamic_vector_buffer& other) noexcept
+ : vector_(other.vector_),
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ size_(other.size_),
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ max_size_(other.max_size_)
+ {
+ }
+
/// Move construct a dynamic buffer.
- dynamic_vector_buffer(dynamic_vector_buffer&& other) ASIO_NOEXCEPT
+ dynamic_vector_buffer(dynamic_vector_buffer&& other) noexcept
: vector_(other.vector_),
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_(other.size_),
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
max_size_(other.max_size_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Get the size of the input sequence.
- std::size_t size() const ASIO_NOEXCEPT
+ /// @b DynamicBuffer_v1: Get the size of the input sequence.
+ /// @b DynamicBuffer_v2: Get the current size of the underlying memory.
+ /**
+ * @returns @b DynamicBuffer_v1 The current size of the input sequence.
+ * @b DynamicBuffer_v2: The current size of the underlying vector if less than
+ * max_size(). Otherwise returns max_size().
+ */
+ std::size_t size() const noexcept
{
- return size_;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ return size_;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ return (std::min)(vector_.size(), max_size());
}
/// Get the maximum size of the dynamic buffer.
/**
- * @returns The allowed maximum of the sum of the sizes of the input sequence
- * and output sequence.
+ * @returns @b DynamicBuffer_v1: The allowed maximum of the sum of the sizes
+ * of the input sequence and output sequence. @b DynamicBuffer_v2: The allowed
+ * maximum size of the underlying memory.
*/
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return max_size_;
}
- /// Get the current capacity of the dynamic buffer.
+ /// Get the maximum size that the buffer may grow to without triggering
+ /// reallocation.
/**
- * @returns The current total capacity of the buffer, i.e. for both the input
- * sequence and output sequence.
+ * @returns @b DynamicBuffer_v1: The current total capacity of the buffer,
+ * i.e. for both the input sequence and output sequence. @b DynamicBuffer_v2:
+ * The current capacity of the underlying vector if less than max_size().
+ * Otherwise returns max_size().
*/
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
- return vector_.capacity();
+ return (std::min)(vector_.capacity(), max_size());
}
- /// Get a list of buffers that represents the input sequence.
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: Get a list of buffers that represents the input
+ /// sequence.
/**
* @returns An object of type @c const_buffers_type that satisfies
- * ConstBufferSequence requirements, representing the basic_string memory in
+ * ConstBufferSequence requirements, representing the vector memory in the
* input sequence.
*
* @note The returned object is invalidated by any @c dynamic_vector_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
+ * or @c vector member function that modifies the input sequence or output
+ * sequence.
*/
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return const_buffers_type(asio::buffer(vector_, size_));
}
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
- /// Get a list of buffers that represents the output sequence, with the given
- /// size.
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing the vector memory.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c vector member function that resizes or erases the vector.
+ */
+ mutable_buffers_type data(std::size_t pos, std::size_t n) noexcept
+ {
+ return mutable_buffers_type(asio::buffer(
+ asio::buffer(vector_, max_size_) + pos, n));
+ }
+
+ /// @b DynamicBuffer_v2: Get a sequence of buffers that represents the
+ /// underlying memory.
+ /**
+ * @param pos Position of the first byte to represent in the buffer sequence
+ *
+ * @param n The number of bytes to return in the buffer sequence. If the
+ * underlying memory is shorter, the buffer sequence represents as many bytes
+ * as are available.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c vector member function that resizes or erases the vector.
+ */
+ const_buffers_type data(std::size_t pos,
+ std::size_t n) const noexcept
+ {
+ return const_buffers_type(asio::buffer(
+ asio::buffer(vector_, max_size_) + pos, n));
+ }
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ /// @b DynamicBuffer_v1: Get a list of buffers that represents the output
+ /// sequence, with the given size.
/**
* Ensures that the output sequence can accommodate @c n bytes, resizing the
- * basic_string object as necessary.
+ * vector object as necessary.
*
* @returns An object of type @c mutable_buffers_type that satisfies
- * MutableBufferSequence requirements, representing basic_string memory
- * at the start of the output sequence of size @c n.
+ * MutableBufferSequence requirements, representing vector memory at the
+ * start of the output sequence of size @c n.
*
* @throws std::length_error If <tt>size() + n > max_size()</tt>.
*
* @note The returned object is invalidated by any @c dynamic_vector_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
+ * or @c vector member function that modifies the input sequence or output
+ * sequence.
*/
mutable_buffers_type prepare(std::size_t n)
{
@@ -1784,12 +2086,16 @@ public:
asio::detail::throw_exception(ex);
}
+ if (size_ == (std::numeric_limits<std::size_t>::max)())
+ size_ = vector_.size(); // Enable v1 behaviour.
+
vector_.resize(size_ + n);
return asio::buffer(asio::buffer(vector_) + size_, n);
}
- /// Move bytes from the output sequence to the input sequence.
+ /// @b DynamicBuffer_v1: Move bytes from the output sequence to the input
+ /// sequence.
/**
* @param n The number of bytes to append from the start of the output
* sequence to the end of the input sequence. The remainder of the output
@@ -1806,24 +2112,69 @@ public:
size_ += (std::min)(n, vector_.size() - size_);
vector_.resize(size_);
}
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+ /// @b DynamicBuffer_v2: Grow the underlying memory by the specified number of
+ /// bytes.
+ /**
+ * Resizes the vector to accommodate an additional @c n bytes at the end.
+ *
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ */
+ void grow(std::size_t n)
+ {
+ if (size() > max_size() || max_size() - size() < n)
+ {
+ std::length_error ex("dynamic_vector_buffer too long");
+ asio::detail::throw_exception(ex);
+ }
+
+ vector_.resize(size() + n);
+ }
- /// Remove characters from the input sequence.
+ /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number
+ /// of bytes.
/**
- * Removes @c n characters from the beginning of the input sequence.
+ * Erases @c n bytes from the end of the vector by resizing the vector
+ * object. If @c n is greater than the current size of the vector, the vector
+ * is emptied.
+ */
+ void shrink(std::size_t n)
+ {
+ vector_.resize(n > size() ? 0 : size() - n);
+ }
+
+ /// @b DynamicBuffer_v1: Remove characters from the input sequence.
+ /// @b DynamicBuffer_v2: Consume the specified number of bytes from the
+ /// beginning of the underlying memory.
+ /**
+ * @b DynamicBuffer_v1: Removes @c n characters from the beginning of the
+ * input sequence. @note If @c n is greater than the size of the input
+ * sequence, the entire input sequence is consumed and no error is issued.
*
- * @note If @c n is greater than the size of the input sequence, the entire
- * input sequence is consumed and no error is issued.
+ * @b DynamicBuffer_v2: Erases @c n bytes from the beginning of the vector.
+ * If @c n is greater than the current size of the vector, the vector is
+ * emptied.
*/
void consume(std::size_t n)
{
- std::size_t consume_length = (std::min)(n, size_);
- vector_.erase(vector_.begin(), vector_.begin() + consume_length);
- size_ -= consume_length;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ if (size_ != (std::numeric_limits<std::size_t>::max)())
+ {
+ std::size_t consume_length = (std::min)(n, size_);
+ vector_.erase(vector_.begin(), vector_.begin() + consume_length);
+ size_ -= consume_length;
+ return;
+ }
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ vector_.erase(vector_.begin(), vector_.begin() + (std::min)(size(), n));
}
private:
std::vector<Elem, Allocator>& vector_;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
std::size_t size_;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
const std::size_t max_size_;
};
@@ -1839,8 +2190,9 @@ private:
* @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data)</tt>.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
- std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline
+dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
+ std::basic_string<Elem, Traits, Allocator>& data) noexcept
{
return dynamic_string_buffer<Elem, Traits, Allocator>(data);
}
@@ -1851,9 +2203,10 @@ inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
* max_size)</tt>.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
+ASIO_NODISCARD inline
+dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size) ASIO_NOEXCEPT
+ std::size_t max_size) noexcept
{
return dynamic_string_buffer<Elem, Traits, Allocator>(data, max_size);
}
@@ -1863,8 +2216,9 @@ inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
* @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data)</tt>.
*/
template <typename Elem, typename Allocator>
-inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
- std::vector<Elem, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline
+dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
+ std::vector<Elem, Allocator>& data) noexcept
{
return dynamic_vector_buffer<Elem, Allocator>(data);
}
@@ -1874,9 +2228,10 @@ inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
* @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data, max_size)</tt>.
*/
template <typename Elem, typename Allocator>
-inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
+ASIO_NODISCARD inline
+dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
std::vector<Elem, Allocator>& data,
- std::size_t max_size) ASIO_NOEXCEPT
+ std::size_t max_size) noexcept
{
return dynamic_vector_buffer<Elem, Allocator>(data, max_size);
}
@@ -1920,14 +2275,15 @@ inline std::size_t buffer_copy_1(const mutable_buffer& target,
std::size_t target_size = target.size();
std::size_t source_size = source.size();
std::size_t n = target_size < source_size ? target_size : source_size;
- memcpy(target.data(), source.data(), n);
+ if (n > 0)
+ memcpy(target.data(), source.data(), n);
return n;
}
template <typename TargetIterator, typename SourceIterator>
inline std::size_t buffer_copy(one_buffer, one_buffer,
TargetIterator target_begin, TargetIterator,
- SourceIterator source_begin, SourceIterator) ASIO_NOEXCEPT
+ SourceIterator source_begin, SourceIterator) noexcept
{
return (buffer_copy_1)(*target_begin, *source_begin);
}
@@ -1936,7 +2292,7 @@ template <typename TargetIterator, typename SourceIterator>
inline std::size_t buffer_copy(one_buffer, one_buffer,
TargetIterator target_begin, TargetIterator,
SourceIterator source_begin, SourceIterator,
- std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+ std::size_t max_bytes_to_copy) noexcept
{
return (buffer_copy_1)(*target_begin,
asio::buffer(*source_begin, max_bytes_to_copy));
@@ -1947,7 +2303,7 @@ std::size_t buffer_copy(one_buffer, multiple_buffers,
TargetIterator target_begin, TargetIterator,
SourceIterator source_begin, SourceIterator source_end,
std::size_t max_bytes_to_copy
- = (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ = (std::numeric_limits<std::size_t>::max)()) noexcept
{
std::size_t total_bytes_copied = 0;
SourceIterator source_iter = source_begin;
@@ -1970,7 +2326,7 @@ std::size_t buffer_copy(multiple_buffers, one_buffer,
TargetIterator target_begin, TargetIterator target_end,
SourceIterator source_begin, SourceIterator,
std::size_t max_bytes_to_copy
- = (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ = (std::numeric_limits<std::size_t>::max)()) noexcept
{
std::size_t total_bytes_copied = 0;
TargetIterator target_iter = target_begin;
@@ -1991,7 +2347,7 @@ std::size_t buffer_copy(multiple_buffers, one_buffer,
template <typename TargetIterator, typename SourceIterator>
std::size_t buffer_copy(multiple_buffers, multiple_buffers,
TargetIterator target_begin, TargetIterator target_end,
- SourceIterator source_begin, SourceIterator source_end) ASIO_NOEXCEPT
+ SourceIterator source_begin, SourceIterator source_end) noexcept
{
std::size_t total_bytes_copied = 0;
@@ -2036,7 +2392,7 @@ template <typename TargetIterator, typename SourceIterator>
std::size_t buffer_copy(multiple_buffers, multiple_buffers,
TargetIterator target_begin, TargetIterator target_end,
SourceIterator source_begin, SourceIterator source_end,
- std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+ std::size_t max_bytes_to_copy) noexcept
{
std::size_t total_bytes_copied = 0;
@@ -2103,7 +2459,7 @@ std::size_t buffer_copy(multiple_buffers, multiple_buffers,
*/
template <typename MutableBufferSequence, typename ConstBufferSequence>
inline std::size_t buffer_copy(const MutableBufferSequence& target,
- const ConstBufferSequence& source) ASIO_NOEXCEPT
+ const ConstBufferSequence& source) noexcept
{
return detail::buffer_copy(
detail::buffer_sequence_cardinality<MutableBufferSequence>(),
@@ -2141,7 +2497,7 @@ inline std::size_t buffer_copy(const MutableBufferSequence& target,
template <typename MutableBufferSequence, typename ConstBufferSequence>
inline std::size_t buffer_copy(const MutableBufferSequence& target,
const ConstBufferSequence& source,
- std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+ std::size_t max_bytes_to_copy) noexcept
{
return detail::buffer_copy(
detail::buffer_sequence_cardinality<MutableBufferSequence>(),
@@ -2157,5 +2513,239 @@ inline std::size_t buffer_copy(const MutableBufferSequence& target,
} // namespace asio
#include "asio/detail/pop_options.hpp"
+#include "asio/detail/is_buffer_sequence.hpp"
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Trait to determine whether a type satisfies the MutableBufferSequence
+/// requirements.
+template <typename T>
+struct is_mutable_buffer_sequence
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : asio::detail::is_buffer_sequence<T, mutable_buffer>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+/// Trait to determine whether a type satisfies the ConstBufferSequence
+/// requirements.
+template <typename T>
+struct is_const_buffer_sequence
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : asio::detail::is_buffer_sequence<T, const_buffer>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+/// Trait to determine whether a type satisfies the DynamicBuffer_v1
+/// requirements.
+template <typename T>
+struct is_dynamic_buffer_v1
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : asio::detail::is_dynamic_buffer_v1<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Trait to determine whether a type satisfies the DynamicBuffer_v2
+/// requirements.
+template <typename T>
+struct is_dynamic_buffer_v2
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : asio::detail::is_dynamic_buffer_v2<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
+/**
+ * If @c ASIO_NO_DYNAMIC_BUFFER_V1 is not defined, determines whether the
+ * type satisfies the DynamicBuffer_v1 requirements. Otherwise, if @c
+ * ASIO_NO_DYNAMIC_BUFFER_V1 is defined, determines whether the type
+ * satisfies the DynamicBuffer_v2 requirements.
+ */
+template <typename T>
+struct is_dynamic_buffer
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#elif defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ : asio::is_dynamic_buffer_v2<T>
+#else // defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ : asio::is_dynamic_buffer_v1<T>
+#endif // defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+{
+};
+
+namespace buffer_literals {
+namespace detail {
+
+template <char... Chars>
+struct chars {};
+
+template <unsigned char... Bytes>
+struct bytes {};
+
+// Literal processor that converts binary literals to an array of bytes.
+
+template <typename Bytes, char... Chars>
+struct bin_literal;
+
+template <unsigned char... Bytes>
+struct bin_literal<bytes<Bytes...>>
+{
+ static const std::size_t size = sizeof...(Bytes);
+ static const unsigned char data[sizeof...(Bytes)];
+};
+
+template <unsigned char... Bytes>
+const unsigned char bin_literal<bytes<Bytes...>>::data[sizeof...(Bytes)]
+ = { Bytes... };
+
+template <unsigned char... Bytes, char Bit7, char Bit6, char Bit5,
+ char Bit4, char Bit3, char Bit2, char Bit1, char Bit0, char... Chars>
+struct bin_literal<bytes<Bytes...>, Bit7, Bit6,
+ Bit5, Bit4, Bit3, Bit2, Bit1, Bit0, Chars...> :
+ bin_literal<
+ bytes<Bytes...,
+ static_cast<unsigned char>(
+ (Bit7 == '1' ? 0x80 : 0) |
+ (Bit6 == '1' ? 0x40 : 0) |
+ (Bit5 == '1' ? 0x20 : 0) |
+ (Bit4 == '1' ? 0x10 : 0) |
+ (Bit3 == '1' ? 0x08 : 0) |
+ (Bit2 == '1' ? 0x04 : 0) |
+ (Bit1 == '1' ? 0x02 : 0) |
+ (Bit0 == '1' ? 0x01 : 0))
+ >, Chars...> {};
+
+template <unsigned char... Bytes, char... Chars>
+struct bin_literal<bytes<Bytes...>, Chars...>
+{
+ static_assert(sizeof...(Chars) == 0,
+ "number of digits in a binary buffer literal must be a multiple of 8");
+
+ static const std::size_t size = 0;
+ static const unsigned char data[1];
+};
+
+template <unsigned char... Bytes, char... Chars>
+const unsigned char bin_literal<bytes<Bytes...>, Chars...>::data[1] = {};
+
+// Literal processor that converts hexadecimal literals to an array of bytes.
+
+template <typename Bytes, char... Chars>
+struct hex_literal;
+
+template <unsigned char... Bytes>
+struct hex_literal<bytes<Bytes...>>
+{
+ static const std::size_t size = sizeof...(Bytes);
+ static const unsigned char data[sizeof...(Bytes)];
+};
+
+template <unsigned char... Bytes>
+const unsigned char hex_literal<bytes<Bytes...>>::data[sizeof...(Bytes)]
+ = { Bytes... };
+
+template <unsigned char... Bytes, char Hi, char Lo, char... Chars>
+struct hex_literal<bytes<Bytes...>, Hi, Lo, Chars...> :
+ hex_literal<
+ bytes<Bytes...,
+ static_cast<unsigned char>(
+ Lo >= 'A' && Lo <= 'F' ? Lo - 'A' + 10 :
+ (Lo >= 'a' && Lo <= 'f' ? Lo - 'a' + 10 : Lo - '0')) |
+ ((static_cast<unsigned char>(
+ Hi >= 'A' && Hi <= 'F' ? Hi - 'A' + 10 :
+ (Hi >= 'a' && Hi <= 'f' ? Hi - 'a' + 10 : Hi - '0'))) << 4)
+ >, Chars...> {};
+
+template <unsigned char... Bytes, char Char>
+struct hex_literal<bytes<Bytes...>, Char>
+{
+ static_assert(!Char,
+ "a hexadecimal buffer literal must have an even number of digits");
+
+ static const std::size_t size = 0;
+ static const unsigned char data[1];
+};
+
+template <unsigned char... Bytes, char Char>
+const unsigned char hex_literal<bytes<Bytes...>, Char>::data[1] = {};
+
+// Helper template that removes digit separators and then passes the cleaned
+// variadic pack of characters to the literal processor.
+
+template <template <typename, char...> class Literal,
+ typename Clean, char... Raw>
+struct remove_separators;
+
+template <template <typename, char...> class Literal,
+ char... Clean, char... Raw>
+struct remove_separators<Literal, chars<Clean...>, '\'', Raw...> :
+ remove_separators<Literal, chars<Clean...>, Raw...> {};
+
+template <template <typename, char...> class Literal,
+ char... Clean, char C, char... Raw>
+struct remove_separators<Literal, chars<Clean...>, C, Raw...> :
+ remove_separators<Literal, chars<Clean..., C>, Raw...> {};
+
+template <template <typename, char...> class Literal, char... Clean>
+struct remove_separators<Literal, chars<Clean...>> :
+ Literal<bytes<>, Clean...> {};
+
+// Helper template to determine the literal type based on the prefix.
+
+template <char... Chars>
+struct literal;
+
+template <char... Chars>
+struct literal<'0', 'b', Chars...> :
+ remove_separators<bin_literal, chars<>, Chars...>{};
+
+template <char... Chars>
+struct literal<'0', 'B', Chars...> :
+ remove_separators<bin_literal, chars<>, Chars...>{};
+
+template <char... Chars>
+struct literal<'0', 'x', Chars...> :
+ remove_separators<hex_literal, chars<>, Chars...>{};
+
+template <char... Chars>
+struct literal<'0', 'X', Chars...> :
+ remove_separators<hex_literal, chars<>, Chars...>{};
+
+} // namespace detail
+
+/// Literal operator for creating const_buffer objects from string literals.
+inline ASIO_CONST_BUFFER operator ""_buf(const char* data, std::size_t n)
+{
+ return ASIO_CONST_BUFFER(data, n);
+}
+
+/// Literal operator for creating const_buffer objects from unbounded binary or
+/// hexadecimal integer literals.
+template <char... Chars>
+inline ASIO_CONST_BUFFER operator ""_buf()
+{
+ return ASIO_CONST_BUFFER(
+ +detail::literal<Chars...>::data,
+ detail::literal<Chars...>::size);
+}
+
+} // namespace buffer_literals
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
#endif // ASIO_BUFFER_HPP
diff --git a/3rdparty/asio/include/asio/buffer_registration.hpp b/3rdparty/asio/include/asio/buffer_registration.hpp
new file mode 100644
index 00000000000..39897ba2450
--- /dev/null
+++ b/3rdparty/asio/include/asio/buffer_registration.hpp
@@ -0,0 +1,318 @@
+//
+// buffer_registration.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_BUFFER_REGISTRATION_HPP
+#define ASIO_BUFFER_REGISTRATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <iterator>
+#include <utility>
+#include <vector>
+#include "asio/detail/memory.hpp"
+#include "asio/execution/context.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/query.hpp"
+#include "asio/registered_buffer.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+# include "asio/detail/scheduler.hpp"
+# include "asio/detail/io_uring_service.hpp"
+#endif // defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class buffer_registration_base
+{
+protected:
+ static mutable_registered_buffer make_buffer(const mutable_buffer& b,
+ const void* scope, int index) noexcept
+ {
+ return mutable_registered_buffer(b, registered_buffer_id(scope, index));
+ }
+};
+
+} // namespace detail
+
+/// Automatically registers and unregistered buffers with an execution context.
+/**
+ * For portability, applications should assume that only one registration is
+ * permitted per execution context.
+ */
+template <typename MutableBufferSequence,
+ typename Allocator = std::allocator<void>>
+class buffer_registration
+ : detail::buffer_registration_base
+{
+public:
+ /// The allocator type used for allocating storage for the buffers container.
+ typedef Allocator allocator_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The type of an iterator over the registered buffers.
+ typedef unspecified iterator;
+
+ /// The type of a const iterator over the registered buffers.
+ typedef unspecified const_iterator;
+#else // defined(GENERATING_DOCUMENTATION)
+ typedef std::vector<mutable_registered_buffer>::const_iterator iterator;
+ typedef std::vector<mutable_registered_buffer>::const_iterator const_iterator;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Register buffers with an executor's execution context.
+ template <typename Executor>
+ buffer_registration(const Executor& ex,
+ const MutableBufferSequence& buffer_sequence,
+ const allocator_type& alloc = allocator_type(),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ : buffer_sequence_(buffer_sequence),
+ buffers_(
+ ASIO_REBIND_ALLOC(allocator_type,
+ mutable_registered_buffer)(alloc))
+ {
+ init_buffers(buffer_registration::get_context(ex),
+ asio::buffer_sequence_begin(buffer_sequence_),
+ asio::buffer_sequence_end(buffer_sequence_));
+ }
+
+ /// Register buffers with an execution context.
+ template <typename ExecutionContext>
+ buffer_registration(ExecutionContext& ctx,
+ const MutableBufferSequence& buffer_sequence,
+ const allocator_type& alloc = allocator_type(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : buffer_sequence_(buffer_sequence),
+ buffers_(
+ ASIO_REBIND_ALLOC(allocator_type,
+ mutable_registered_buffer)(alloc))
+ {
+ init_buffers(ctx,
+ asio::buffer_sequence_begin(buffer_sequence_),
+ asio::buffer_sequence_end(buffer_sequence_));
+ }
+
+ /// Move constructor.
+ buffer_registration(buffer_registration&& other) noexcept
+ : buffer_sequence_(std::move(other.buffer_sequence_)),
+ buffers_(std::move(other.buffers_))
+ {
+#if defined(ASIO_HAS_IO_URING)
+ service_ = other.service_;
+ other.service_ = 0;
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+ /// Unregisters the buffers.
+ ~buffer_registration()
+ {
+#if defined(ASIO_HAS_IO_URING)
+ if (service_)
+ service_->unregister_buffers();
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+ /// Move assignment.
+ buffer_registration& operator=(buffer_registration&& other) noexcept
+ {
+ if (this != &other)
+ {
+ buffer_sequence_ = std::move(other.buffer_sequence_);
+ buffers_ = std::move(other.buffers_);
+#if defined(ASIO_HAS_IO_URING)
+ if (service_)
+ service_->unregister_buffers();
+ service_ = other.service_;
+ other.service_ = 0;
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+ return *this;
+ }
+
+ /// Get the number of registered buffers.
+ std::size_t size() const noexcept
+ {
+ return buffers_.size();
+ }
+
+ /// Get the begin iterator for the sequence of registered buffers.
+ const_iterator begin() const noexcept
+ {
+ return buffers_.begin();
+ }
+
+ /// Get the begin iterator for the sequence of registered buffers.
+ const_iterator cbegin() const noexcept
+ {
+ return buffers_.cbegin();
+ }
+
+ /// Get the end iterator for the sequence of registered buffers.
+ const_iterator end() const noexcept
+ {
+ return buffers_.end();
+ }
+
+ /// Get the end iterator for the sequence of registered buffers.
+ const_iterator cend() const noexcept
+ {
+ return buffers_.cend();
+ }
+
+ /// Get the buffer at the specified index.
+ const mutable_registered_buffer& operator[](std::size_t i) noexcept
+ {
+ return buffers_[i];
+ }
+
+ /// Get the buffer at the specified index.
+ const mutable_registered_buffer& at(std::size_t i) noexcept
+ {
+ return buffers_.at(i);
+ }
+
+private:
+ // Disallow copying and assignment.
+ buffer_registration(const buffer_registration&) = delete;
+ buffer_registration& operator=(const buffer_registration&) = delete;
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ // Helper function to initialise the container of buffers.
+ template <typename Iterator>
+ void init_buffers(execution_context& ctx, Iterator begin, Iterator end)
+ {
+ std::size_t n = std::distance(begin, end);
+ buffers_.resize(n);
+
+#if defined(ASIO_HAS_IO_URING)
+ service_ = &use_service<detail::io_uring_service>(ctx);
+ std::vector<iovec,
+ ASIO_REBIND_ALLOC(allocator_type, iovec)> iovecs(n,
+ ASIO_REBIND_ALLOC(allocator_type, iovec)(
+ buffers_.get_allocator()));
+#endif // defined(ASIO_HAS_IO_URING)
+
+ Iterator iter = begin;
+ for (int index = 0; iter != end; ++index, ++iter)
+ {
+ mutable_buffer b(*iter);
+ std::size_t i = static_cast<std::size_t>(index);
+ buffers_[i] = this->make_buffer(b, &ctx, index);
+
+#if defined(ASIO_HAS_IO_URING)
+ iovecs[i].iov_base = buffers_[i].data();
+ iovecs[i].iov_len = buffers_[i].size();
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+#if defined(ASIO_HAS_IO_URING)
+ if (n > 0)
+ {
+ service_->register_buffers(&iovecs[0],
+ static_cast<unsigned>(iovecs.size()));
+ }
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+ MutableBufferSequence buffer_sequence_;
+ std::vector<mutable_registered_buffer,
+ ASIO_REBIND_ALLOC(allocator_type,
+ mutable_registered_buffer)> buffers_;
+#if defined(ASIO_HAS_IO_URING)
+ detail::io_uring_service* service_;
+#endif // defined(ASIO_HAS_IO_URING)
+};
+
+/// Register buffers with an execution context.
+template <typename Executor, typename MutableBufferSequence>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence>
+register_buffers(const Executor& ex,
+ const MutableBufferSequence& buffer_sequence,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence>(ex, buffer_sequence);
+}
+
+/// Register buffers with an execution context.
+template <typename Executor, typename MutableBufferSequence, typename Allocator>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence, Allocator>
+register_buffers(const Executor& ex,
+ const MutableBufferSequence& buffer_sequence, const Allocator& alloc,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence, Allocator>(
+ ex, buffer_sequence, alloc);
+}
+
+/// Register buffers with an execution context.
+template <typename ExecutionContext, typename MutableBufferSequence>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence>
+register_buffers(ExecutionContext& ctx,
+ const MutableBufferSequence& buffer_sequence,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence>(ctx, buffer_sequence);
+}
+
+/// Register buffers with an execution context.
+template <typename ExecutionContext,
+ typename MutableBufferSequence, typename Allocator>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence, Allocator>
+register_buffers(ExecutionContext& ctx,
+ const MutableBufferSequence& buffer_sequence, const Allocator& alloc,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence, Allocator>(
+ ctx, buffer_sequence, alloc);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BUFFER_REGISTRATION_HPP
diff --git a/3rdparty/asio/include/asio/buffered_read_stream.hpp b/3rdparty/asio/include/asio/buffered_read_stream.hpp
index 908dd37101e..264f66c55d8 100644
--- a/3rdparty/asio/include/asio/buffered_read_stream.hpp
+++ b/3rdparty/asio/include/asio/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -26,11 +26,16 @@
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_buffered_fill;
+template <typename> class initiate_async_buffered_read_some;
+
+} // namespace detail
/// Adds buffering to the read-related operations of a stream.
/**
@@ -50,7 +55,7 @@ class buffered_read_stream
{
public:
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -67,16 +72,17 @@ public:
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_read_stream(Arg& a)
- : next_layer_(a),
+ explicit buffered_read_stream(Arg&& a)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(default_buffer_size)
{
}
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- buffered_read_stream(Arg& a, std::size_t buffer_size)
- : next_layer_(a),
+ buffered_read_stream(Arg&& a,
+ std::size_t buffer_size)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(buffer_size)
{
}
@@ -100,27 +106,11 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return next_layer_.lowest_layer().get_executor();
}
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_context()
- {
- return next_layer_.get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_service()
- {
- return next_layer_.get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
/// Close the stream.
void close()
{
@@ -153,14 +143,21 @@ public:
/// Start an asynchronous write. The data being written must be valid for the
/// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<conditional_t<true, Stream&, WriteHandler>>().async_write_some(
+ buffers, static_cast<WriteHandler&&>(handler)))
{
return next_layer_.async_write_some(buffers,
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ static_cast<WriteHandler&&>(handler));
}
/// Fill the buffer with some data. Returns the number of bytes placed in the
@@ -172,10 +169,20 @@ public:
std::size_t fill(asio::error_code& ec);
/// Start an asynchronous fill.
- template <typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_fill(ASIO_MOVE_ARG(ReadHandler) handler);
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_fill(
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_fill<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()));
/// Read some data from the stream. Returns the number of bytes read. Throws
/// an exception on failure.
@@ -190,11 +197,20 @@ public:
/// Start an asynchronous read. The buffer into which the data will be read
/// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler);
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_read_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers));
/// Peek at the incoming data on the stream. Returns the number of bytes read.
/// Throws an exception on failure.
diff --git a/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp b/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp
index 3f1646afc03..d98aa70483a 100644
--- a/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp
+++ b/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/buffered_stream.hpp b/3rdparty/asio/include/asio/buffered_stream.hpp
index cabab60726f..e0e1b47b792 100644
--- a/3rdparty/asio/include/asio/buffered_stream.hpp
+++ b/3rdparty/asio/include/asio/buffered_stream.hpp
@@ -2,7 +2,7 @@
// buffered_stream.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,6 @@
#include "asio/buffered_stream_fwd.hpp"
#include "asio/detail/noncopyable.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
#include "asio/detail/push_options.hpp"
@@ -47,7 +46,7 @@ class buffered_stream
{
public:
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -57,17 +56,17 @@ public:
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_stream(Arg& a)
- : inner_stream_impl_(a),
+ explicit buffered_stream(Arg&& a)
+ : inner_stream_impl_(static_cast<Arg&&>(a)),
stream_impl_(inner_stream_impl_)
{
}
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_stream(Arg& a, std::size_t read_buffer_size,
- std::size_t write_buffer_size)
- : inner_stream_impl_(a, write_buffer_size),
+ explicit buffered_stream(Arg&& a,
+ std::size_t read_buffer_size, std::size_t write_buffer_size)
+ : inner_stream_impl_(static_cast<Arg&&>(a), write_buffer_size),
stream_impl_(inner_stream_impl_, read_buffer_size)
{
}
@@ -91,27 +90,11 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return stream_impl_.lowest_layer().get_executor();
}
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_context()
- {
- return stream_impl_.get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_service()
- {
- return stream_impl_.get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
/// Close the stream.
void close()
{
@@ -142,13 +125,21 @@ public:
}
/// Start an asynchronous flush.
- template <typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_flush(ASIO_MOVE_ARG(WriteHandler) handler)
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_flush(
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<buffered_write_stream<Stream>&>().async_flush(
+ static_cast<WriteHandler&&>(handler)))
{
return stream_impl_.next_layer().async_flush(
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ static_cast<WriteHandler&&>(handler));
}
/// Write the given data to the stream. Returns the number of bytes written.
@@ -170,14 +161,21 @@ public:
/// Start an asynchronous write. The data being written must be valid for the
/// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<Stream&>().async_write_some(buffers,
+ static_cast<WriteHandler&&>(handler)))
{
return stream_impl_.async_write_some(buffers,
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ static_cast<WriteHandler&&>(handler));
}
/// Fill the buffer with some data. Returns the number of bytes placed in the
@@ -195,12 +193,21 @@ public:
}
/// Start an asynchronous fill.
- template <typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_fill(ASIO_MOVE_ARG(ReadHandler) handler)
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_fill(
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<buffered_read_stream<
+ buffered_write_stream<Stream>>&>().async_fill(
+ static_cast<ReadHandler&&>(handler)))
{
- return stream_impl_.async_fill(ASIO_MOVE_CAST(ReadHandler)(handler));
+ return stream_impl_.async_fill(static_cast<ReadHandler&&>(handler));
}
/// Read some data from the stream. Returns the number of bytes read. Throws
@@ -222,14 +229,21 @@ public:
/// Start an asynchronous read. The buffer into which the data will be read
/// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<Stream&>().async_read_some(buffers,
+ static_cast<ReadHandler&&>(handler)))
{
return stream_impl_.async_read_some(buffers,
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ static_cast<ReadHandler&&>(handler));
}
/// Peek at the incoming data on the stream. Returns the number of bytes read.
diff --git a/3rdparty/asio/include/asio/buffered_stream_fwd.hpp b/3rdparty/asio/include/asio/buffered_stream_fwd.hpp
index cc445d225cf..790c76269f9 100644
--- a/3rdparty/asio/include/asio/buffered_stream_fwd.hpp
+++ b/3rdparty/asio/include/asio/buffered_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/buffered_write_stream.hpp b/3rdparty/asio/include/asio/buffered_write_stream.hpp
index 9cdab8b1d25..f8f0538dcea 100644
--- a/3rdparty/asio/include/asio/buffered_write_stream.hpp
+++ b/3rdparty/asio/include/asio/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -25,12 +25,17 @@
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
#include "asio/write.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_buffered_flush;
+template <typename> class initiate_async_buffered_write_some;
+
+} // namespace detail
/// Adds buffering to the write-related operations of a stream.
/**
@@ -50,7 +55,7 @@ class buffered_write_stream
{
public:
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -67,16 +72,17 @@ public:
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_write_stream(Arg& a)
- : next_layer_(a),
+ explicit buffered_write_stream(Arg&& a)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(default_buffer_size)
{
}
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- buffered_write_stream(Arg& a, std::size_t buffer_size)
- : next_layer_(a),
+ buffered_write_stream(Arg&& a,
+ std::size_t buffer_size)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(buffer_size)
{
}
@@ -100,27 +106,11 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return next_layer_.lowest_layer().get_executor();
}
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_context()
- {
- return next_layer_.get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_service()
- {
- return next_layer_.get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
/// Close the stream.
void close()
{
@@ -145,10 +135,20 @@ public:
std::size_t flush(asio::error_code& ec);
/// Start an asynchronous flush.
- template <typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_flush(ASIO_MOVE_ARG(WriteHandler) handler);
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_flush(
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_flush<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()));
/// Write the given data to the stream. Returns the number of bytes written.
/// Throws an exception on failure.
@@ -163,11 +163,20 @@ public:
/// Start an asynchronous write. The data being written must be valid for the
/// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler);
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_write_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers));
/// Read some data from the stream. Returns the number of bytes read. Throws
/// an exception on failure.
@@ -188,14 +197,21 @@ public:
/// Start an asynchronous read. The buffer into which the data will be read
/// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<conditional_t<true, Stream&, ReadHandler>>().async_read_some(
+ buffers, static_cast<ReadHandler&&>(handler)))
{
return next_layer_.async_read_some(buffers,
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ static_cast<ReadHandler&&>(handler));
}
/// Peek at the incoming data on the stream. Returns the number of bytes read.
diff --git a/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp b/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp
index 88f93a4126e..809f44af03d 100644
--- a/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp
+++ b/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/buffers_iterator.hpp b/3rdparty/asio/include/asio/buffers_iterator.hpp
index 9080915134a..2c6d720787c 100644
--- a/3rdparty/asio/include/asio/buffers_iterator.hpp
+++ b/3rdparty/asio/include/asio/buffers_iterator.hpp
@@ -2,7 +2,7 @@
// buffers_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -38,7 +38,7 @@ namespace detail
template <typename ByteType>
struct byte_type
{
- typedef typename add_const<ByteType>::type type;
+ typedef add_const_t<ByteType> type;
};
};
@@ -80,7 +80,7 @@ namespace detail
struct buffers_iterator_types<const_buffer, ByteType>
{
typedef const_buffer buffer_type;
- typedef typename add_const<ByteType>::type byte_type;
+ typedef add_const_t<ByteType> byte_type;
typedef const const_buffer* const_iterator;
};
@@ -98,7 +98,7 @@ namespace detail
struct buffers_iterator_types<const_buffers_1, ByteType>
{
typedef const_buffer buffer_type;
- typedef typename add_const<ByteType>::type byte_type;
+ typedef add_const_t<ByteType> byte_type;
typedef const const_buffer* const_iterator;
};
diff --git a/3rdparty/asio/include/asio/cancellation_signal.hpp b/3rdparty/asio/include/asio/cancellation_signal.hpp
new file mode 100644
index 00000000000..43540ac3b08
--- /dev/null
+++ b/3rdparty/asio/include/asio/cancellation_signal.hpp
@@ -0,0 +1,245 @@
+//
+// cancellation_signal.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_CANCELLATION_SIGNAL_HPP
+#define ASIO_CANCELLATION_SIGNAL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <cassert>
+#include <new>
+#include <utility>
+#include "asio/cancellation_type.hpp"
+#include "asio/detail/cstddef.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class cancellation_handler_base
+{
+public:
+ virtual void call(cancellation_type_t) = 0;
+ virtual std::pair<void*, std::size_t> destroy() noexcept = 0;
+
+protected:
+ ~cancellation_handler_base() {}
+};
+
+template <typename Handler>
+class cancellation_handler
+ : public cancellation_handler_base
+{
+public:
+ template <typename... Args>
+ cancellation_handler(std::size_t size, Args&&... args)
+ : handler_(static_cast<Args&&>(args)...),
+ size_(size)
+ {
+ }
+
+ void call(cancellation_type_t type)
+ {
+ handler_(type);
+ }
+
+ std::pair<void*, std::size_t> destroy() noexcept
+ {
+ std::pair<void*, std::size_t> mem(this, size_);
+ this->cancellation_handler::~cancellation_handler();
+ return mem;
+ }
+
+ Handler& handler() noexcept
+ {
+ return handler_;
+ }
+
+private:
+ ~cancellation_handler()
+ {
+ }
+
+ Handler handler_;
+ std::size_t size_;
+};
+
+} // namespace detail
+
+class cancellation_slot;
+
+/// A cancellation signal with a single slot.
+class cancellation_signal
+{
+public:
+ constexpr cancellation_signal()
+ : handler_(0)
+ {
+ }
+
+ ASIO_DECL ~cancellation_signal();
+
+ /// Emits the signal and causes invocation of the slot's handler, if any.
+ void emit(cancellation_type_t type)
+ {
+ if (handler_)
+ handler_->call(type);
+ }
+
+ /// Returns the single slot associated with the signal.
+ /**
+ * The signal object must remain valid for as long the slot may be used.
+ * Destruction of the signal invalidates the slot.
+ */
+ cancellation_slot slot() noexcept;
+
+private:
+ cancellation_signal(const cancellation_signal&) = delete;
+ cancellation_signal& operator=(const cancellation_signal&) = delete;
+
+ detail::cancellation_handler_base* handler_;
+};
+
+/// A slot associated with a cancellation signal.
+class cancellation_slot
+{
+public:
+ /// Creates a slot that is not connected to any cancellation signal.
+ constexpr cancellation_slot()
+ : handler_(0)
+ {
+ }
+
+ /// Installs a handler into the slot, constructing the new object directly.
+ /**
+ * Destroys any existing handler in the slot, then installs the new handler,
+ * constructing it with the supplied @c args.
+ *
+ * The handler is a function object to be called when the signal is emitted.
+ * The signature of the handler must be
+ * @code void handler(asio::cancellation_type_t); @endcode
+ *
+ * @param args Arguments to be passed to the @c CancellationHandler object's
+ * constructor.
+ *
+ * @returns A reference to the newly installed handler.
+ *
+ * @note Handlers installed into the slot via @c emplace are not required to
+ * be copy constructible or move constructible.
+ */
+ template <typename CancellationHandler, typename... Args>
+ CancellationHandler& emplace(Args&&... args)
+ {
+ typedef detail::cancellation_handler<CancellationHandler>
+ cancellation_handler_type;
+ auto_delete_helper del = { prepare_memory(
+ sizeof(cancellation_handler_type),
+ alignof(CancellationHandler)) };
+ cancellation_handler_type* handler_obj =
+ new (del.mem.first) cancellation_handler_type(
+ del.mem.second, static_cast<Args&&>(args)...);
+ del.mem.first = 0;
+ *handler_ = handler_obj;
+ return handler_obj->handler();
+ }
+
+ /// Installs a handler into the slot.
+ /**
+ * Destroys any existing handler in the slot, then installs the new handler,
+ * constructing it as a decay-copy of the supplied handler.
+ *
+ * The handler is a function object to be called when the signal is emitted.
+ * The signature of the handler must be
+ * @code void handler(asio::cancellation_type_t); @endcode
+ *
+ * @param handler The handler to be installed.
+ *
+ * @returns A reference to the newly installed handler.
+ */
+ template <typename CancellationHandler>
+ decay_t<CancellationHandler>& assign(CancellationHandler&& handler)
+ {
+ return this->emplace<decay_t<CancellationHandler>>(
+ static_cast<CancellationHandler&&>(handler));
+ }
+
+ /// Clears the slot.
+ /**
+ * Destroys any existing handler in the slot.
+ */
+ ASIO_DECL void clear();
+
+ /// Returns whether the slot is connected to a signal.
+ constexpr bool is_connected() const noexcept
+ {
+ return handler_ != 0;
+ }
+
+ /// Returns whether the slot is connected and has an installed handler.
+ constexpr bool has_handler() const noexcept
+ {
+ return handler_ != 0 && *handler_ != 0;
+ }
+
+ /// Compare two slots for equality.
+ friend constexpr bool operator==(const cancellation_slot& lhs,
+ const cancellation_slot& rhs) noexcept
+ {
+ return lhs.handler_ == rhs.handler_;
+ }
+
+ /// Compare two slots for inequality.
+ friend constexpr bool operator!=(const cancellation_slot& lhs,
+ const cancellation_slot& rhs) noexcept
+ {
+ return lhs.handler_ != rhs.handler_;
+ }
+
+private:
+ friend class cancellation_signal;
+
+ constexpr cancellation_slot(int,
+ detail::cancellation_handler_base** handler)
+ : handler_(handler)
+ {
+ }
+
+ ASIO_DECL std::pair<void*, std::size_t> prepare_memory(
+ std::size_t size, std::size_t align);
+
+ struct auto_delete_helper
+ {
+ std::pair<void*, std::size_t> mem;
+
+ ASIO_DECL ~auto_delete_helper();
+ };
+
+ detail::cancellation_handler_base** handler_;
+};
+
+inline cancellation_slot cancellation_signal::slot() noexcept
+{
+ return cancellation_slot(0, &handler_);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/cancellation_signal.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_CANCELLATION_SIGNAL_HPP
diff --git a/3rdparty/asio/include/asio/cancellation_state.hpp b/3rdparty/asio/include/asio/cancellation_state.hpp
new file mode 100644
index 00000000000..3c13edcab94
--- /dev/null
+++ b/3rdparty/asio/include/asio/cancellation_state.hpp
@@ -0,0 +1,235 @@
+//
+// cancellation_state.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_CANCELLATION_STATE_HPP
+#define ASIO_CANCELLATION_STATE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <cassert>
+#include <new>
+#include <utility>
+#include "asio/cancellation_signal.hpp"
+#include "asio/detail/cstddef.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// A simple cancellation signal propagation filter.
+template <cancellation_type_t Mask>
+struct cancellation_filter
+{
+ /// Returns <tt>type & Mask</tt>.
+ cancellation_type_t operator()(
+ cancellation_type_t type) const noexcept
+ {
+ return type & Mask;
+ }
+};
+
+/// A cancellation filter that disables cancellation.
+typedef cancellation_filter<cancellation_type::none>
+ disable_cancellation;
+
+/// A cancellation filter that enables terminal cancellation only.
+typedef cancellation_filter<cancellation_type::terminal>
+ enable_terminal_cancellation;
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// A cancellation filter that enables terminal and partial cancellation.
+typedef cancellation_filter<
+ cancellation_type::terminal | cancellation_type::partial>
+ enable_partial_cancellation;
+
+/// A cancellation filter that enables terminal, partial and total cancellation.
+typedef cancellation_filter<cancellation_type::terminal
+ | cancellation_type::partial | cancellation_type::total>
+ enable_total_cancellation;
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+typedef cancellation_filter<
+ static_cast<cancellation_type_t>(
+ static_cast<unsigned int>(cancellation_type::terminal)
+ | static_cast<unsigned int>(cancellation_type::partial))>
+ enable_partial_cancellation;
+
+typedef cancellation_filter<
+ static_cast<cancellation_type_t>(
+ static_cast<unsigned int>(cancellation_type::terminal)
+ | static_cast<unsigned int>(cancellation_type::partial)
+ | static_cast<unsigned int>(cancellation_type::total))>
+ enable_total_cancellation;
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+/// A cancellation state is used for chaining signals and slots in compositions.
+class cancellation_state
+{
+public:
+ /// Construct a disconnected cancellation state.
+ constexpr cancellation_state() noexcept
+ : impl_(0)
+ {
+ }
+
+ /// Construct and attach to a parent slot to create a new child slot.
+ /**
+ * Initialises the cancellation state so that it allows terminal cancellation
+ * only. Equivalent to <tt>cancellation_state(slot,
+ * enable_terminal_cancellation())</tt>.
+ *
+ * @param slot The parent cancellation slot to which the state will be
+ * attached.
+ */
+ template <typename CancellationSlot>
+ constexpr explicit cancellation_state(CancellationSlot slot)
+ : impl_(slot.is_connected() ? &slot.template emplace<impl<>>() : 0)
+ {
+ }
+
+ /// Construct and attach to a parent slot to create a new child slot.
+ /**
+ * @param slot The parent cancellation slot to which the state will be
+ * attached.
+ *
+ * @param filter A function object that is used to transform incoming
+ * cancellation signals as they are received from the parent slot. This
+ * function object must have the signature:
+ * @code asio::cancellation_type_t filter(
+ * asio::cancellation_type_t); @endcode
+ *
+ * The library provides the following pre-defined cancellation filters:
+ *
+ * @li asio::disable_cancellation
+ * @li asio::enable_terminal_cancellation
+ * @li asio::enable_partial_cancellation
+ * @li asio::enable_total_cancellation
+ */
+ template <typename CancellationSlot, typename Filter>
+ constexpr cancellation_state(CancellationSlot slot, Filter filter)
+ : impl_(slot.is_connected()
+ ? &slot.template emplace<impl<Filter, Filter>>(filter, filter)
+ : 0)
+ {
+ }
+
+ /// Construct and attach to a parent slot to create a new child slot.
+ /**
+ * @param slot The parent cancellation slot to which the state will be
+ * attached.
+ *
+ * @param in_filter A function object that is used to transform incoming
+ * cancellation signals as they are received from the parent slot. This
+ * function object must have the signature:
+ * @code asio::cancellation_type_t in_filter(
+ * asio::cancellation_type_t); @endcode
+ *
+ * @param out_filter A function object that is used to transform outcoming
+ * cancellation signals as they are relayed to the child slot. This function
+ * object must have the signature:
+ * @code asio::cancellation_type_t out_filter(
+ * asio::cancellation_type_t); @endcode
+ *
+ * The library provides the following pre-defined cancellation filters:
+ *
+ * @li asio::disable_cancellation
+ * @li asio::enable_terminal_cancellation
+ * @li asio::enable_partial_cancellation
+ * @li asio::enable_total_cancellation
+ */
+ template <typename CancellationSlot, typename InFilter, typename OutFilter>
+ constexpr cancellation_state(CancellationSlot slot,
+ InFilter in_filter, OutFilter out_filter)
+ : impl_(slot.is_connected()
+ ? &slot.template emplace<impl<InFilter, OutFilter>>(
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter))
+ : 0)
+ {
+ }
+
+ /// Returns the single child slot associated with the state.
+ /**
+ * This sub-slot is used with the operations that are being composed.
+ */
+ constexpr cancellation_slot slot() const noexcept
+ {
+ return impl_ ? impl_->signal_.slot() : cancellation_slot();
+ }
+
+ /// Returns the cancellation types that have been triggered.
+ cancellation_type_t cancelled() const noexcept
+ {
+ return impl_ ? impl_->cancelled_ : cancellation_type_t();
+ }
+
+ /// Clears the specified cancellation types, if they have been triggered.
+ void clear(cancellation_type_t mask = cancellation_type::all)
+ noexcept
+ {
+ if (impl_)
+ impl_->cancelled_ &= ~mask;
+ }
+
+private:
+ struct impl_base
+ {
+ impl_base()
+ : cancelled_()
+ {
+ }
+
+ cancellation_signal signal_;
+ cancellation_type_t cancelled_;
+ };
+
+ template <
+ typename InFilter = enable_terminal_cancellation,
+ typename OutFilter = InFilter>
+ struct impl : impl_base
+ {
+ impl()
+ : in_filter_(),
+ out_filter_()
+ {
+ }
+
+ impl(InFilter in_filter, OutFilter out_filter)
+ : in_filter_(static_cast<InFilter&&>(in_filter)),
+ out_filter_(static_cast<OutFilter&&>(out_filter))
+ {
+ }
+
+ void operator()(cancellation_type_t in)
+ {
+ this->cancelled_ = in_filter_(in);
+ cancellation_type_t out = out_filter_(this->cancelled_);
+ if (out != cancellation_type::none)
+ this->signal_.emit(out);
+ }
+
+ InFilter in_filter_;
+ OutFilter out_filter_;
+ };
+
+ impl_base* impl_;
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_CANCELLATION_STATE_HPP
diff --git a/3rdparty/asio/include/asio/cancellation_type.hpp b/3rdparty/asio/include/asio/cancellation_type.hpp
new file mode 100644
index 00000000000..ec4a4d2458a
--- /dev/null
+++ b/3rdparty/asio/include/asio/cancellation_type.hpp
@@ -0,0 +1,157 @@
+//
+// cancellation_type.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_CANCELLATION_TYPE_HPP
+#define ASIO_CANCELLATION_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+# if defined(GENERATING_DOCUMENTATION)
+
+/// Enumeration representing the different types of cancellation that may
+/// be requested from or implemented by an asynchronous operation.
+enum cancellation_type
+{
+ /// Bitmask representing no types of cancellation.
+ none = 0,
+
+ /// Requests cancellation where, following a successful cancellation, the only
+ /// safe operations on the I/O object are closure or destruction.
+ terminal = 1,
+
+ /// Requests cancellation where a successful cancellation may result in
+ /// partial side effects or no side effects. Following cancellation, the I/O
+ /// object is in a well-known state, and may be used for further operations.
+ partial = 2,
+
+ /// Requests cancellation where a successful cancellation results in no
+ /// apparent side effects. Following cancellation, the I/O object is in the
+ /// same observable state as it was prior to the operation.
+ total = 4,
+
+ /// Bitmask representing all types of cancellation.
+ all = 0xFFFFFFFF
+};
+
+/// Portability typedef.
+typedef cancellation_type cancellation_type_t;
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+enum class cancellation_type : unsigned int
+{
+ none = 0,
+ terminal = 1,
+ partial = 2,
+ total = 4,
+ all = 0xFFFFFFFF
+};
+
+typedef cancellation_type cancellation_type_t;
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+/// Negation operator.
+/**
+ * @relates cancellation_type
+ */
+inline constexpr bool operator!(cancellation_type_t x)
+{
+ return static_cast<unsigned int>(x) == 0;
+}
+
+/// Bitwise and operator.
+/**
+ * @relates cancellation_type
+ */
+inline constexpr cancellation_type_t operator&(
+ cancellation_type_t x, cancellation_type_t y)
+{
+ return static_cast<cancellation_type_t>(
+ static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
+}
+
+/// Bitwise or operator.
+/**
+ * @relates cancellation_type
+ */
+inline constexpr cancellation_type_t operator|(
+ cancellation_type_t x, cancellation_type_t y)
+{
+ return static_cast<cancellation_type_t>(
+ static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
+}
+
+/// Bitwise xor operator.
+/**
+ * @relates cancellation_type
+ */
+inline constexpr cancellation_type_t operator^(
+ cancellation_type_t x, cancellation_type_t y)
+{
+ return static_cast<cancellation_type_t>(
+ static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
+}
+
+/// Bitwise negation operator.
+/**
+ * @relates cancellation_type
+ */
+inline constexpr cancellation_type_t operator~(cancellation_type_t x)
+{
+ return static_cast<cancellation_type_t>(~static_cast<unsigned int>(x));
+}
+
+/// Bitwise and-assignment operator.
+/**
+ * @relates cancellation_type
+ */
+inline cancellation_type_t& operator&=(
+ cancellation_type_t& x, cancellation_type_t y)
+{
+ x = x & y;
+ return x;
+}
+
+/// Bitwise or-assignment operator.
+/**
+ * @relates cancellation_type
+ */
+inline cancellation_type_t& operator|=(
+ cancellation_type_t& x, cancellation_type_t y)
+{
+ x = x | y;
+ return x;
+}
+
+/// Bitwise xor-assignment operator.
+/**
+ * @relates cancellation_type
+ */
+inline cancellation_type_t& operator^=(
+ cancellation_type_t& x, cancellation_type_t y)
+{
+ x = x ^ y;
+ return x;
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_CANCELLATION_TYPE_HPP
diff --git a/3rdparty/asio/include/asio/co_spawn.hpp b/3rdparty/asio/include/asio/co_spawn.hpp
new file mode 100644
index 00000000000..26988f47da0
--- /dev/null
+++ b/3rdparty/asio/include/asio/co_spawn.hpp
@@ -0,0 +1,523 @@
+//
+// co_spawn.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_CO_SPAWN_HPP
+#define ASIO_CO_SPAWN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/awaitable.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/is_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct awaitable_signature;
+
+template <typename T, typename Executor>
+struct awaitable_signature<awaitable<T, Executor>>
+{
+ typedef void type(std::exception_ptr, T);
+};
+
+template <typename Executor>
+struct awaitable_signature<awaitable<void, Executor>>
+{
+ typedef void type(std::exception_ptr);
+};
+
+} // namespace detail
+
+/// Spawn a new coroutined-based thread of execution.
+/**
+ * @param ex The executor that will be used to schedule the new thread of
+ * execution.
+ *
+ * @param a The asio::awaitable object that is the result of calling the
+ * coroutine's entry point function.
+ *
+ * @param token The @ref completion_token that will handle the notification that
+ * the thread of execution has completed. The function signature of the
+ * completion handler must be:
+ * @code void handler(std::exception_ptr, T); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, T) @endcode
+ *
+ * @par Example
+ * @code
+ * asio::awaitable<std::size_t> echo(tcp::socket socket)
+ * {
+ * std::size_t bytes_transferred = 0;
+ *
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ *
+ * bytes_transferred += n;
+ * }
+ * }
+ * catch (const std::exception&)
+ * {
+ * }
+ *
+ * co_return bytes_transferred;
+ * }
+ *
+ * // ...
+ *
+ * asio::co_spawn(my_executor,
+ * echo(std::move(my_tcp_socket)),
+ * [](std::exception_ptr e, std::size_t n)
+ * {
+ * std::cout << "transferred " << n << "\n";
+ * });
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call asio::this_coro::reset_cancellation_state.
+ */
+template <typename Executor, typename T, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr, T)) CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(const Executor& ex, awaitable<T, AwaitableExecutor> a,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
+ constraint_t<
+ (is_executor<Executor>::value || execution::is_executor<Executor>::value)
+ && is_convertible<Executor, AwaitableExecutor>::value
+ > = 0);
+
+/// Spawn a new coroutined-based thread of execution.
+/**
+ * @param ex The executor that will be used to schedule the new thread of
+ * execution.
+ *
+ * @param a The asio::awaitable object that is the result of calling the
+ * coroutine's entry point function.
+ *
+ * @param token The @ref completion_token that will handle the notification that
+ * the thread of execution has completed. The function signature of the
+ * completion handler must be:
+ * @code void handler(std::exception_ptr); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr) @endcode
+ *
+ * @par Example
+ * @code
+ * asio::awaitable<void> echo(tcp::socket socket)
+ * {
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ * }
+ * }
+ * catch (const std::exception& e)
+ * {
+ * std::cerr << "Exception: " << e.what() << "\n";
+ * }
+ * }
+ *
+ * // ...
+ *
+ * asio::co_spawn(my_executor,
+ * echo(std::move(my_tcp_socket)),
+ * asio::detached);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call asio::this_coro::reset_cancellation_state.
+ */
+template <typename Executor, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr)) CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(const Executor& ex, awaitable<void, AwaitableExecutor> a,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
+ constraint_t<
+ (is_executor<Executor>::value || execution::is_executor<Executor>::value)
+ && is_convertible<Executor, AwaitableExecutor>::value
+ > = 0);
+
+/// Spawn a new coroutined-based thread of execution.
+/**
+ * @param ctx An execution context that will provide the executor to be used to
+ * schedule the new thread of execution.
+ *
+ * @param a The asio::awaitable object that is the result of calling the
+ * coroutine's entry point function.
+ *
+ * @param token The @ref completion_token that will handle the notification that
+ * the thread of execution has completed. The function signature of the
+ * completion handler must be:
+ * @code void handler(std::exception_ptr); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, T) @endcode
+ *
+ * @par Example
+ * @code
+ * asio::awaitable<std::size_t> echo(tcp::socket socket)
+ * {
+ * std::size_t bytes_transferred = 0;
+ *
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ *
+ * bytes_transferred += n;
+ * }
+ * }
+ * catch (const std::exception&)
+ * {
+ * }
+ *
+ * co_return bytes_transferred;
+ * }
+ *
+ * // ...
+ *
+ * asio::co_spawn(my_io_context,
+ * echo(std::move(my_tcp_socket)),
+ * [](std::exception_ptr e, std::size_t n)
+ * {
+ * std::cout << "transferred " << n << "\n";
+ * });
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call asio::this_coro::reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename T, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr, T)) CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename ExecutionContext::executor_type)>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(ExecutionContext& ctx, awaitable<T, AwaitableExecutor> a,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename ExecutionContext::executor_type),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ && is_convertible<typename ExecutionContext::executor_type,
+ AwaitableExecutor>::value
+ > = 0);
+
+/// Spawn a new coroutined-based thread of execution.
+/**
+ * @param ctx An execution context that will provide the executor to be used to
+ * schedule the new thread of execution.
+ *
+ * @param a The asio::awaitable object that is the result of calling the
+ * coroutine's entry point function.
+ *
+ * @param token The @ref completion_token that will handle the notification that
+ * the thread of execution has completed. The function signature of the
+ * completion handler must be:
+ * @code void handler(std::exception_ptr); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr) @endcode
+ *
+ * @par Example
+ * @code
+ * asio::awaitable<void> echo(tcp::socket socket)
+ * {
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ * }
+ * }
+ * catch (const std::exception& e)
+ * {
+ * std::cerr << "Exception: " << e.what() << "\n";
+ * }
+ * }
+ *
+ * // ...
+ *
+ * asio::co_spawn(my_io_context,
+ * echo(std::move(my_tcp_socket)),
+ * asio::detached);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call asio::this_coro::reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr)) CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename ExecutionContext::executor_type)>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(ExecutionContext& ctx, awaitable<void, AwaitableExecutor> a,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename ExecutionContext::executor_type),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ && is_convertible<typename ExecutionContext::executor_type,
+ AwaitableExecutor>::value
+ > = 0);
+
+/// Spawn a new coroutined-based thread of execution.
+/**
+ * @param ex The executor that will be used to schedule the new thread of
+ * execution.
+ *
+ * @param f A nullary function object with a return type of the form
+ * @c asio::awaitable<R,E> that will be used as the coroutine's entry
+ * point.
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the thread of execution has completed. If @c R is @c void, the function
+ * signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the first template argument to the @c awaitable returned by the
+ * supplied function object @c F:
+ * @code asio::awaitable<R, AwaitableExecutor> F() @endcode
+ *
+ * @par Example
+ * @code
+ * asio::awaitable<std::size_t> echo(tcp::socket socket)
+ * {
+ * std::size_t bytes_transferred = 0;
+ *
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ *
+ * bytes_transferred += n;
+ * }
+ * }
+ * catch (const std::exception&)
+ * {
+ * }
+ *
+ * co_return bytes_transferred;
+ * }
+ *
+ * // ...
+ *
+ * asio::co_spawn(my_executor,
+ * [socket = std::move(my_tcp_socket)]() mutable
+ * -> asio::awaitable<void>
+ * {
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ * }
+ * }
+ * catch (const std::exception& e)
+ * {
+ * std::cerr << "Exception: " << e.what() << "\n";
+ * }
+ * }, asio::detached);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call asio::this_coro::reset_cancellation_state.
+ */
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
+ result_of_t<F()>>::type) CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
+co_spawn(const Executor& ex, F&& f,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0);
+
+/// Spawn a new coroutined-based thread of execution.
+/**
+ * @param ctx An execution context that will provide the executor to be used to
+ * schedule the new thread of execution.
+ *
+ * @param f A nullary function object with a return type of the form
+ * @c asio::awaitable<R,E> that will be used as the coroutine's entry
+ * point.
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the thread of execution has completed. If @c R is @c void, the function
+ * signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the first template argument to the @c awaitable returned by the
+ * supplied function object @c F:
+ * @code asio::awaitable<R, AwaitableExecutor> F() @endcode
+ *
+ * @par Example
+ * @code
+ * asio::awaitable<std::size_t> echo(tcp::socket socket)
+ * {
+ * std::size_t bytes_transferred = 0;
+ *
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ *
+ * bytes_transferred += n;
+ * }
+ * }
+ * catch (const std::exception&)
+ * {
+ * }
+ *
+ * co_return bytes_transferred;
+ * }
+ *
+ * // ...
+ *
+ * asio::co_spawn(my_io_context,
+ * [socket = std::move(my_tcp_socket)]() mutable
+ * -> asio::awaitable<void>
+ * {
+ * try
+ * {
+ * char data[1024];
+ * for (;;)
+ * {
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::use_awaitable);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::use_awaitable);
+ * }
+ * }
+ * catch (const std::exception& e)
+ * {
+ * std::cerr << "Exception: " << e.what() << "\n";
+ * }
+ * }, asio::detached);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call asio::this_coro::reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
+ result_of_t<F()>>::type) CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename ExecutionContext::executor_type)>
+ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
+co_spawn(ExecutionContext& ctx, F&& f,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename ExecutionContext::executor_type),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0);
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/co_spawn.hpp"
+
+#endif // defined(ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_CO_SPAWN_HPP
diff --git a/3rdparty/asio/include/asio/completion_condition.hpp b/3rdparty/asio/include/asio/completion_condition.hpp
index cb22ddddd90..3fe774f1ef1 100644
--- a/3rdparty/asio/include/asio/completion_condition.hpp
+++ b/3rdparty/asio/include/asio/completion_condition.hpp
@@ -2,7 +2,7 @@
// completion_condition.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/compose.hpp b/3rdparty/asio/include/asio/compose.hpp
new file mode 100644
index 00000000000..abb438e3da7
--- /dev/null
+++ b/3rdparty/asio/include/asio/compose.hpp
@@ -0,0 +1,319 @@
+//
+// compose.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_COMPOSE_HPP
+#define ASIO_COMPOSE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
+#include "asio/detail/composed_work.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Impl, typename Work, typename Handler, typename Signature>
+class composed_op;
+
+template <typename Impl, typename Work, typename Handler,
+ typename R, typename... Args>
+class composed_op<Impl, Work, Handler, R(Args...)>
+ : public base_from_cancellation_state<Handler>
+{
+public:
+ template <typename I, typename W, typename H>
+ composed_op(I&& impl,
+ W&& work,
+ H&& handler)
+ : base_from_cancellation_state<Handler>(
+ handler, enable_terminal_cancellation()),
+ impl_(static_cast<I&&>(impl)),
+ work_(static_cast<W&&>(work)),
+ handler_(static_cast<H&&>(handler)),
+ invocations_(0)
+ {
+ }
+
+ composed_op(composed_op&& other)
+ : base_from_cancellation_state<Handler>(
+ static_cast<base_from_cancellation_state<Handler>&&>(other)),
+ impl_(static_cast<Impl&&>(other.impl_)),
+ work_(static_cast<Work&&>(other.work_)),
+ handler_(static_cast<Handler&&>(other.handler_)),
+ invocations_(other.invocations_)
+ {
+ }
+
+ typedef typename composed_work_guard<
+ typename Work::head_type>::executor_type io_executor_type;
+
+ io_executor_type get_io_executor() const noexcept
+ {
+ return work_.head_.get_executor();
+ }
+
+ typedef associated_executor_t<Handler, io_executor_type> executor_type;
+
+ executor_type get_executor() const noexcept
+ {
+ return (get_associated_executor)(handler_, work_.head_.get_executor());
+ }
+
+ typedef associated_allocator_t<Handler, std::allocator<void>> allocator_type;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return (get_associated_allocator)(handler_, std::allocator<void>());
+ }
+
+ template<typename... T>
+ void operator()(T&&... t)
+ {
+ if (invocations_ < ~0u)
+ ++invocations_;
+ this->get_cancellation_state().slot().clear();
+ impl_(*this, static_cast<T&&>(t)...);
+ }
+
+ void complete(Args... args)
+ {
+ this->work_.reset();
+ static_cast<Handler&&>(this->handler_)(static_cast<Args&&>(args)...);
+ }
+
+ void reset_cancellation_state()
+ {
+ base_from_cancellation_state<Handler>::reset_cancellation_state(handler_);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter)
+ {
+ base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
+ static_cast<Filter&&>(filter));
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter)
+ {
+ base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return base_from_cancellation_state<Handler>::cancelled();
+ }
+
+//private:
+ Impl impl_;
+ Work work_;
+ Handler handler_;
+ unsigned invocations_;
+};
+
+template <typename Impl, typename Work, typename Handler, typename Signature>
+inline bool asio_handler_is_continuation(
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+{
+ return this_handler->invocations_ > 1 ? true
+ : asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature, typename Executors>
+class initiate_composed_op
+{
+public:
+ typedef typename composed_io_executors<Executors>::head_type executor_type;
+
+ template <typename T>
+ explicit initiate_composed_op(int, T&& executors)
+ : executors_(static_cast<T&&>(executors))
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executors_.head_;
+ }
+
+ template <typename Handler, typename Impl>
+ void operator()(Handler&& handler,
+ Impl&& impl) const
+ {
+ composed_op<decay_t<Impl>, composed_work<Executors>,
+ decay_t<Handler>, Signature>(
+ static_cast<Impl&&>(impl),
+ composed_work<Executors>(executors_),
+ static_cast<Handler&&>(handler))();
+ }
+
+private:
+ composed_io_executors<Executors> executors_;
+};
+
+template <typename Signature, typename Executors>
+inline initiate_composed_op<Signature, Executors> make_initiate_composed_op(
+ composed_io_executors<Executors>&& executors)
+{
+ return initiate_composed_op<Signature, Executors>(0,
+ static_cast<composed_io_executors<Executors>&&>(executors));
+}
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename Impl, typename Work, typename Handler,
+ typename Signature, typename DefaultCandidate>
+struct associator<Associator,
+ detail::composed_op<Impl, Work, Handler, Signature>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::composed_op<Impl, Work, Handler, Signature>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::composed_op<Impl, Work, Handler, Signature>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Launch an asynchronous operation with a stateful implementation.
+/**
+ * The async_compose function simplifies the implementation of composed
+ * asynchronous operations automatically wrapping a stateful function object
+ * with a conforming intermediate completion handler.
+ *
+ * @param implementation A function object that contains the implementation of
+ * the composed asynchronous operation. The first argument to the function
+ * object is a non-const reference to the enclosing intermediate completion
+ * handler. The remaining arguments are any arguments that originate from the
+ * completion handlers of any asynchronous operations performed by the
+ * implementation.
+ *
+ * @param token The completion token.
+ *
+ * @param io_objects_or_executors Zero or more I/O objects or I/O executors for
+ * which outstanding work must be maintained.
+ *
+ * @par Per-Operation Cancellation
+ * By default, terminal per-operation cancellation is enabled for
+ * composed operations that are implemented using @c async_compose. To
+ * disable cancellation for the composed operation, or to alter its
+ * supported cancellation types, call the @c self object's @c
+ * reset_cancellation_state function.
+ *
+ * @par Example:
+ *
+ * @code struct async_echo_implementation
+ * {
+ * tcp::socket& socket_;
+ * asio::mutable_buffer buffer_;
+ * enum { starting, reading, writing } state_;
+ *
+ * template <typename Self>
+ * void operator()(Self& self,
+ * asio::error_code error = {},
+ * std::size_t n = 0)
+ * {
+ * switch (state_)
+ * {
+ * case starting:
+ * state_ = reading;
+ * socket_.async_read_some(
+ * buffer_, std::move(self));
+ * break;
+ * case reading:
+ * if (error)
+ * {
+ * self.complete(error, 0);
+ * }
+ * else
+ * {
+ * state_ = writing;
+ * asio::async_write(socket_, buffer_,
+ * asio::transfer_exactly(n),
+ * std::move(self));
+ * }
+ * break;
+ * case writing:
+ * self.complete(error, n);
+ * break;
+ * }
+ * }
+ * };
+ *
+ * template <typename CompletionToken>
+ * auto async_echo(tcp::socket& socket,
+ * asio::mutable_buffer buffer,
+ * CompletionToken&& token) ->
+ * decltype(
+ * asio::async_compose<CompletionToken,
+ * void(asio::error_code, std::size_t)>(
+ * std::declval<async_echo_implementation>(),
+ * token, socket))
+ * {
+ * return asio::async_compose<CompletionToken,
+ * void(asio::error_code, std::size_t)>(
+ * async_echo_implementation{socket, buffer,
+ * async_echo_implementation::starting},
+ * token, socket);
+ * } @endcode
+ */
+template <typename CompletionToken, typename Signature,
+ typename Implementation, typename... IoObjectsOrExecutors>
+auto async_compose(Implementation&& implementation,
+ type_identity_t<CompletionToken>& token,
+ IoObjectsOrExecutors&&... io_objects_or_executors)
+ -> decltype(
+ async_initiate<CompletionToken, Signature>(
+ detail::make_initiate_composed_op<Signature>(
+ detail::make_composed_io_executors(
+ detail::get_composed_io_executor(
+ static_cast<IoObjectsOrExecutors&&>(
+ io_objects_or_executors))...)),
+ token, static_cast<Implementation&&>(implementation)))
+{
+ return async_initiate<CompletionToken, Signature>(
+ detail::make_initiate_composed_op<Signature>(
+ detail::make_composed_io_executors(
+ detail::get_composed_io_executor(
+ static_cast<IoObjectsOrExecutors&&>(
+ io_objects_or_executors))...)),
+ token, static_cast<Implementation&&>(implementation));
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_COMPOSE_HPP
diff --git a/3rdparty/asio/include/asio/connect.hpp b/3rdparty/asio/include/asio/connect.hpp
index 7dba932ecfb..d2916675455 100644
--- a/3rdparty/asio/include/asio/connect.hpp
+++ b/3rdparty/asio/include/asio/connect.hpp
@@ -2,7 +2,7 @@
// connect.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -27,6 +27,10 @@ namespace asio {
namespace detail
{
+ struct default_connect_condition;
+ template <typename, typename> class initiate_async_range_connect;
+ template <typename, typename> class initiate_async_iterator_connect;
+
char (&has_iterator_helper(...))[2];
template <typename T>
@@ -58,7 +62,8 @@ struct is_endpoint_sequence
/**
* @defgroup connect asio::connect
*
- * @brief Establishes a socket connection by trying each endpoint in a sequence.
+ * @brief The @c connect function is a composed operation that establishes a
+ * socket connection by trying each endpoint in a sequence.
*/
/*@{*/
@@ -81,17 +86,15 @@ struct is_endpoint_sequence
* Otherwise, contains the error from the last connection attempt.
*
* @par Example
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::connect(s, r.resolve(q)); @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -113,9 +116,9 @@ typename Protocol::endpoint connect(
* default-constructed endpoint.
*
* @par Example
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::error_code ec;
* asio::connect(s, r.resolve(q), ec);
* if (ec)
@@ -123,16 +126,14 @@ typename Protocol::endpoint connect(
* // An error occurred.
* } @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, asio::error_code& ec,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
#if !defined(ASIO_NO_DEPRECATED)
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c connect member
@@ -155,12 +156,12 @@ typename Protocol::endpoint connect(
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c connect member
@@ -183,10 +184,10 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, asio::error_code& ec,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
#endif // !defined(ASIO_NO_DEPRECATED)
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -210,14 +211,14 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* Otherwise, contains the error from the last connection attempt.
*
* @par Example
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
* tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::connect(s, e.begin(), e.end()); @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end);
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -242,10 +243,10 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* endpoint. Otherwise, the end iterator.
*
* @par Example
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
* tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::error_code ec;
* asio::connect(s, e.begin(), e.end(), ec);
* if (ec)
@@ -253,8 +254,8 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* // An error occurred.
* } @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, asio::error_code& ec);
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -301,20 +302,18 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* }
* }; @endcode
* It would be used with the asio::connect function as follows:
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* tcp::endpoint e = asio::connect(s,
* r.resolve(q), my_connect_condition());
* std::cout << "Connected to: " << e << std::endl; @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -361,9 +360,9 @@ typename Protocol::endpoint connect(
* }
* }; @endcode
* It would be used with the asio::connect function as follows:
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::error_code ec;
* tcp::endpoint e = asio::connect(s,
* r.resolve(q), my_connect_condition(), ec);
@@ -376,18 +375,16 @@ typename Protocol::endpoint connect(
* std::cout << "Connected to: " << e << std::endl;
* } @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
asio::error_code& ec,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
#if !defined(ASIO_NO_DEPRECATED)
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c connect member
@@ -421,14 +418,14 @@ typename Protocol::endpoint connect(
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
*/
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c connect member
@@ -462,11 +459,11 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
*/
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
ConnectCondition connect_condition, asio::error_code& ec,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
#endif // !defined(ASIO_NO_DEPRECATED)
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -515,17 +512,17 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* }
* }; @endcode
* It would be used with the asio::connect function as follows:
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
* tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* tcp::resolver::results_type::iterator i = asio::connect(
* s, e.begin(), e.end(), my_connect_condition());
* std::cout << "Connected to: " << i->endpoint() << std::endl; @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
Iterator end, ConnectCondition connect_condition);
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -575,10 +572,10 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* }
* }; @endcode
* It would be used with the asio::connect function as follows:
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
* tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::error_code ec;
* tcp::resolver::results_type::iterator i = asio::connect(
* s, e.begin(), e.end(), my_connect_condition());
@@ -591,9 +588,9 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* std::cout << "Connected to: " << i->endpoint() << std::endl;
* } @endcode
*/
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, ConnectCondition connect_condition,
asio::error_code& ec);
@@ -602,8 +599,8 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
/**
* @defgroup async_connect asio::async_connect
*
- * @brief Asynchronously establishes a socket connection by trying each
- * endpoint in a sequence.
+ * @brief The @c async_connect function is a composed asynchronous operation
+ * that establishes a socket connection by trying each endpoint in a sequence.
*/
/*@{*/
@@ -613,16 +610,19 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param endpoints A sequence of endpoints.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -634,14 +634,17 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* const typename Protocol::endpoint& endpoint
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, typename Protocol::endpoint) @endcode
*
* @par Example
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
*
* // ...
*
@@ -667,34 +670,51 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* {
* // ...
* } @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the socket's @c async_connect operation.
*/
-template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename RangeConnectHandler>
-ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename EndpointSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::endpoint)) RangeConnectToken
+ = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
+ RangeConnectToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, declval<detail::default_connect_condition>()));
#if !defined(ASIO_NO_DEPRECATED)
-/// (Deprecated.) Asynchronously establishes a socket connection by trying each
-/// endpoint in a sequence.
+/// (Deprecated: Use range overload.) Asynchronously establishes a socket
+/// connection by trying each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param begin An iterator pointing to the start of a sequence of endpoints.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -706,21 +726,39 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
*
* @note This overload assumes that a default constructed object of type @c
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the socket's @c async_connect operation.
*/
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+template <typename Protocol, typename Executor, typename Iterator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ IteratorConnectToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(),
+ declval<detail::default_connect_condition>()));
#endif // !defined(ASIO_NO_DEPRECATED)
/// Asynchronously establishes a socket connection by trying each endpoint in a
@@ -729,7 +767,8 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -738,9 +777,11 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
*
* @param end An iterator pointing to the end of a sequence of endpoints.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -752,13 +793,16 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
*
* @par Example
* @code std::vector<tcp::endpoint> endpoints = ...;
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
* asio::async_connect(s,
* endpoints.begin(), endpoints.end(),
* connect_handler);
@@ -771,14 +815,28 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* {
* // ...
* } @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the socket's @c async_connect operation.
*/
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler);
+template <typename Protocol, typename Executor, typename Iterator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+auto async_connect(
+ basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
+ IteratorConnectToken&& token = default_completion_token_t<Executor>())
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, declval<detail::default_connect_condition>()));
/// Asynchronously establishes a socket connection by trying each endpoint in a
/// sequence.
@@ -786,7 +844,8 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -804,9 +863,11 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* The function object should return true if the next endpoint should be tried,
* and false if it should be skipped.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -818,9 +879,12 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, typename Protocol::endpoint) @endcode
*
* @par Example
* The following connect condition function object can be used to output
@@ -837,9 +901,9 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* }
* }; @endcode
* It would be used with the asio::connect function as follows:
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
*
* // ...
*
@@ -874,25 +938,41 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* std::cout << "Connected to: " << endpoint << std::endl;
* }
* } @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the socket's @c async_connect operation.
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
-ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor,
+ typename EndpointSequence, typename ConnectCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::endpoint)) RangeConnectToken
+ = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
+ RangeConnectToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, connect_condition));
#if !defined(ASIO_NO_DEPRECATED)
-/// (Deprecated.) Asynchronously establishes a socket connection by trying each
-/// endpoint in a sequence.
+/// (Deprecated: Use range overload.) Asynchronously establishes a socket
+/// connection by trying each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -910,9 +990,11 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* The function object should return true if the next endpoint should be tried,
* and false if it should be skipped.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -924,22 +1006,40 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
*
* @note This overload assumes that a default constructed object of type @c
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the socket's @c async_connect operation.
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
- ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, ConnectCondition connect_condition,
+ IteratorConnectToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), connect_condition));
#endif // !defined(ASIO_NO_DEPRECATED)
/// Asynchronously establishes a socket connection by trying each endpoint in a
@@ -948,7 +1048,8 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -968,9 +1069,11 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* The function object should return true if the next endpoint should be tried,
* and false if it should be skipped.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -982,9 +1085,12 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
*
* @par Example
* The following connect condition function object can be used to output
@@ -1001,9 +1107,9 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* }
* }; @endcode
* It would be used with the asio::connect function as follows:
- * @code tcp::resolver r(io_context);
+ * @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
+ * tcp::socket s(my_context);
*
* // ...
*
@@ -1039,14 +1145,29 @@ async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
* std::cout << "Connected to: " << i->endpoint() << std::endl;
* }
* } @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the socket's @c async_connect operation.
*/
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler);
+ IteratorConnectToken&& token = default_completion_token_t<Executor>())
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, connect_condition));
/*@}*/
diff --git a/3rdparty/asio/include/asio/connect_pipe.hpp b/3rdparty/asio/include/asio/connect_pipe.hpp
new file mode 100644
index 00000000000..1c9eb79383f
--- /dev/null
+++ b/3rdparty/asio/include/asio/connect_pipe.hpp
@@ -0,0 +1,83 @@
+//
+// connect_pipe.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_CONNECT_PIPE_HPP
+#define ASIO_CONNECT_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_readable_pipe.hpp"
+#include "asio/basic_writable_pipe.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_IOCP)
+typedef HANDLE native_pipe_handle;
+#else // defined(ASIO_HAS_IOCP)
+typedef int native_pipe_handle;
+#endif // defined(ASIO_HAS_IOCP)
+
+ASIO_DECL void create_pipe(native_pipe_handle p[2],
+ asio::error_code& ec);
+
+ASIO_DECL void close_pipe(native_pipe_handle p);
+
+} // namespace detail
+
+/// Connect two pipe ends using an anonymous pipe.
+/**
+ * @param read_end The read end of the pipe.
+ *
+ * @param write_end The write end of the pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+template <typename Executor1, typename Executor2>
+void connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end);
+
+/// Connect two pipe ends using an anonymous pipe.
+/**
+ * @param read_end The read end of the pipe.
+ *
+ * @param write_end The write end of the pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+template <typename Executor1, typename Executor2>
+ASIO_SYNC_OP_VOID connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end, asio::error_code& ec);
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/connect_pipe.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/connect_pipe.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_CONNECT_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/consign.hpp b/3rdparty/asio/include/asio/consign.hpp
new file mode 100644
index 00000000000..4b0bc431309
--- /dev/null
+++ b/3rdparty/asio/include/asio/consign.hpp
@@ -0,0 +1,75 @@
+//
+// consign.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_CONSIGN_HPP
+#define ASIO_CONSIGN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Completion token type used to specify that the completion handler should
+/// carry additional values along with it.
+/**
+ * This completion token adapter is typically used to keep at least one copy of
+ * an object, such as a smart pointer, alive until the completion handler is
+ * called.
+ */
+template <typename CompletionToken, typename... Values>
+class consign_t
+{
+public:
+ /// Constructor.
+ template <typename T, typename... V>
+ constexpr explicit consign_t(T&& completion_token, V&&... values)
+ : token_(static_cast<T&&>(completion_token)),
+ values_(static_cast<V&&>(values)...)
+ {
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+private:
+#endif // defined(GENERATING_DOCUMENTATION)
+ CompletionToken token_;
+ std::tuple<Values...> values_;
+};
+
+/// Completion token adapter used to specify that the completion handler should
+/// carry additional values along with it.
+/**
+ * This completion token adapter is typically used to keep at least one copy of
+ * an object, such as a smart pointer, alive until the completion handler is
+ * called.
+ */
+template <typename CompletionToken, typename... Values>
+ASIO_NODISCARD inline constexpr
+consign_t<decay_t<CompletionToken>, decay_t<Values>...>
+consign(CompletionToken&& completion_token, Values&&... values)
+{
+ return consign_t<decay_t<CompletionToken>, decay_t<Values>...>(
+ static_cast<CompletionToken&&>(completion_token),
+ static_cast<Values&&>(values)...);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/consign.hpp"
+
+#endif // ASIO_CONSIGN_HPP
diff --git a/3rdparty/asio/include/asio/coroutine.hpp b/3rdparty/asio/include/asio/coroutine.hpp
index d4a03356d69..036e5148ad0 100644
--- a/3rdparty/asio/include/asio/coroutine.hpp
+++ b/3rdparty/asio/include/asio/coroutine.hpp
@@ -2,7 +2,7 @@
// coroutine.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -205,7 +205,7 @@ class coroutine_ref;
* {
* do
* {
- * socket_.reset(new tcp::socket(io_context_));
+ * socket_.reset(new tcp::socket(my_context_));
* yield acceptor->async_accept(*socket_, *this);
* fork server(*this)();
* } while (is_parent());
@@ -227,7 +227,7 @@ class coroutine_ref;
* Note that @c fork doesn't do the actual forking by itself. It is the
* application's responsibility to create a clone of the coroutine and call it.
* The clone can be called immediately, as above, or scheduled for delayed
- * execution using something like io_context::post().
+ * execution using something like asio::post().
*
* @par Alternate macro names
*
@@ -266,6 +266,7 @@ class coroutine_ref
public:
coroutine_ref(coroutine& c) : value_(c.value_), modified_(false) {}
coroutine_ref(coroutine* c) : value_(c->value_), modified_(false) {}
+ coroutine_ref(const coroutine_ref&) = default;
~coroutine_ref() { if (!modified_) value_ = -1; }
operator int() const { return value_; }
int& operator=(int v) { modified_ = true; return value_ = v; }
@@ -289,7 +290,7 @@ private:
bail_out_of_coroutine: \
break; \
} \
- else case 0:
+ else /* fall-through */ case 0:
#define ASIO_CORO_YIELD_IMPL(n) \
for (_coro_value = (n);;) \
@@ -301,12 +302,12 @@ private:
else \
switch (_coro_value ? 0 : 1) \
for (;;) \
- case -1: if (_coro_value) \
+ /* fall-through */ case -1: if (_coro_value) \
goto terminate_coroutine; \
else for (;;) \
- case 1: if (_coro_value) \
+ /* fall-through */ case 1: if (_coro_value) \
goto bail_out_of_coroutine; \
- else case 0:
+ else /* fall-through */ case 0:
#define ASIO_CORO_FORK_IMPL(n) \
for (_coro_value = -(n);; _coro_value = (n)) \
diff --git a/3rdparty/asio/include/asio/datagram_socket_service.hpp b/3rdparty/asio/include/asio/datagram_socket_service.hpp
deleted file mode 100644
index 4b9047dee90..00000000000
--- a/3rdparty/asio/include/asio/datagram_socket_service.hpp
+++ /dev/null
@@ -1,455 +0,0 @@
-//
-// datagram_socket_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DATAGRAM_SOCKET_SERVICE_HPP
-#define ASIO_DATAGRAM_SOCKET_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_socket_service.hpp"
-#elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-#else
-# include "asio/detail/reactive_socket_service.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a datagram socket.
-template <typename Protocol>
-class datagram_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<datagram_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a datagram socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new datagram socket service for the specified io_context.
- explicit datagram_socket_service(asio::io_context& io_context)
- : asio::detail::service_base<
- datagram_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new datagram socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new datagram socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another datagram socket implementation.
- void move_assign(implementation_type& impl,
- datagram_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- /// Move-construct a new datagram socket implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- typename datagram_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a datagram socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- // Open a new datagram socket implementation.
- ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, asio::error_code& ec)
- {
- if (protocol.type() == ASIO_OS_DEF(SOCK_DGRAM))
- service_impl_.open(impl, protocol, ec);
- else
- ec = asio::error::invalid_argument;
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a datagram socket.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- asio::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a datagram socket implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- // Bind the datagram socket to the specified local endpoint.
- ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, asio::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the datagram socket to the specified endpoint.
- ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, asio::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (asio::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, asio::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, asio::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, asio::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, asio::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, asio::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(implementation_type& impl, const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send a datagram to the specified endpoint.
- template <typename ConstBufferSequence>
- std::size_t send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.send_to(impl, buffers, destination, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send_to(impl, buffers,
- destination, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.receive(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive a datagram with the endpoint of the sender.
- template <typename MutableBufferSequence>
- std::size_t receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.receive_from(impl, buffers, sender_endpoint, flags,
- ec);
- }
-
- /// Start an asynchronous receive that will get the endpoint of the sender.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive_from(impl, buffers,
- sender_endpoint, flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_DATAGRAM_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/deadline_timer.hpp b/3rdparty/asio/include/asio/deadline_timer.hpp
index 1ffbfe534d0..dfa0b9ca169 100644
--- a/3rdparty/asio/include/asio/deadline_timer.hpp
+++ b/3rdparty/asio/include/asio/deadline_timer.hpp
@@ -2,7 +2,7 @@
// deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/deadline_timer_service.hpp b/3rdparty/asio/include/asio/deadline_timer_service.hpp
deleted file mode 100644
index 7acac1cb109..00000000000
--- a/3rdparty/asio/include/asio/deadline_timer_service.hpp
+++ /dev/null
@@ -1,173 +0,0 @@
-//
-// deadline_timer_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DEADLINE_TIMER_SERVICE_HPP
-#define ASIO_DEADLINE_TIMER_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_BOOST_DATE_TIME) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/deadline_timer_service.hpp"
-#include "asio/io_context.hpp"
-#include "asio/time_traits.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a timer.
-template <typename TimeType,
- typename TimeTraits = asio::time_traits<TimeType> >
-class deadline_timer_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<
- deadline_timer_service<TimeType, TimeTraits> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// 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;
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::deadline_timer_service<traits_type> service_impl_type;
-
-public:
- /// The implementation type of the deadline timer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new timer service for the specified io_context.
- explicit deadline_timer_service(asio::io_context& io_context)
- : asio::detail::service_base<
- deadline_timer_service<TimeType, TimeTraits> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new timer implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- /// Destroy a timer implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Cancel any asynchronous wait operations associated with the timer.
- std::size_t cancel(implementation_type& impl, asio::error_code& ec)
- {
- return service_impl_.cancel(impl, ec);
- }
-
- /// Cancels one asynchronous wait operation associated with the timer.
- std::size_t cancel_one(implementation_type& impl,
- asio::error_code& ec)
- {
- return service_impl_.cancel_one(impl, ec);
- }
-
- /// Get the expiry time for the timer as an absolute time.
- time_type expires_at(const implementation_type& impl) const
- {
- return service_impl_.expiry(impl);
- }
-
- /// Set the expiry time for the timer as an absolute time.
- std::size_t expires_at(implementation_type& impl,
- const time_type& expiry_time, asio::error_code& ec)
- {
- return service_impl_.expires_at(impl, expiry_time, ec);
- }
-
- /// Get the expiry time for the timer relative to now.
- duration_type expires_from_now(const implementation_type& impl) const
- {
- return TimeTraits::subtract(service_impl_.expiry(impl), TimeTraits::now());
- }
-
- /// Set the expiry time for the timer relative to now.
- std::size_t expires_from_now(implementation_type& impl,
- const duration_type& expiry_time, asio::error_code& ec)
- {
- return service_impl_.expires_after(impl, expiry_time, ec);
- }
-
- // Perform a blocking wait on the timer.
- void wait(implementation_type& impl, asio::error_code& ec)
- {
- service_impl_.wait(impl, ec);
- }
-
- // Start an asynchronous wait on the timer.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_DEADLINE_TIMER_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/defer.hpp b/3rdparty/asio/include/asio/defer.hpp
index 5e8061406ab..608debe4d91 100644
--- a/3rdparty/asio/include/asio/defer.hpp
+++ b/3rdparty/asio/include/asio/defer.hpp
@@ -2,7 +2,7 @@
// defer.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,9 +17,13 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/initiate_defer.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
#include "asio/is_executor.hpp"
+#include "asio/require.hpp"
#include "asio/detail/push_options.hpp"
@@ -31,27 +35,58 @@ namespace asio {
* executor. The function object is queued for execution, and is never called
* from the current thread prior to returning from <tt>defer()</tt>.
*
- * This function has the following effects:
+ * The use of @c defer(), rather than @ref post(), indicates the caller's
+ * preference that the executor defer the queueing of the function object. This
+ * may allow the executor to optimise queueing for cases when the function
+ * object represents a continuation of the current call context.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{}, token)</tt>, where @c Init is a function object type defined
+ * as:
*
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * }; @endcode
*
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * The function call operator of @c Init:
*
- * @li Performs <tt>ex.defer(std::move(handler), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex of type @c Ex by
+ * performing @code auto ex = get_associated_executor(handler); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.continuation,
+ * execution::allocator(alloc)
+ * ).execute(std::forward<CompletionHandler>(completion_handler)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.defer(
+ * std::forward<CompletionHandler>(completion_handler),
+ * alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- ASIO_MOVE_ARG(CompletionToken) token);
+template <ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
+auto defer(NullaryToken&& token)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_defer>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_defer(), token);
+}
/// Submits a completion token or function object for execution.
/**
@@ -59,49 +94,125 @@ ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
* The function object is queued for execution, and is never called from the
* current thread prior to returning from <tt>defer()</tt>.
*
- * This function has the following effects:
+ * The use of @c defer(), rather than @ref post(), indicates the caller's
+ * preference that the executor defer the queueing of the function object. This
+ * may allow the executor to optimise queueing for cases when the function
+ * object represents a continuation of the current call context.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param ex The target executor.
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{ex}, token)</tt>, where @c Init is a function object type
+ * defined as:
*
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * using executor_type = Executor;
+ * explicit Init(const Executor& ex) : ex_(ex) {}
+ * executor_type get_executor() const noexcept { return ex_; }
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * private:
+ * Executor ex_; // exposition only
+ * }; @endcode
*
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * The function call operator of @c Init:
*
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
+ * @li Obtains the handler's associated executor object @c ex1 of type @c Ex1 by
+ * performing @code auto ex1 = get_associated_executor(handler, ex); @endcode
*
- * @li Performs <tt>Executor(ex).defer(std::move(f), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is true, constructs a
+ * function object @c f with a member @c executor_ that is initialised with
+ * <tt>prefer(ex1, execution::outstanding_work.tracked)</tt>, a member @c
+ * handler_ that is a decay-copy of @c completion_handler, and a function call
+ * operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * prefer(executor_, execution::allocator(a)).execute(std::move(handler_));
+ * @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is false, constructs a
+ * function object @c f with a member @c work_ that is initialised with
+ * <tt>make_work_guard(ex1)</tt>, a member @c handler_ that is a decay-copy of
+ * @c completion_handler, and a function call operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * work_.get_executor().dispatch(std::move(handler_), a);
+ * work_.reset(); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.continuation,
+ * execution::allocator(alloc)
+ * ).execute(std::move(f)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.defer(std::move(f), alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename Executor, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type* = 0);
+template <typename Executor,
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<Executor>>
+auto defer(const Executor& ex,
+ NullaryToken&& token
+ = default_completion_token_t<Executor>(),
+ constraint_t<
+ (execution::is_executor<Executor>::value
+ && can_require<Executor, execution::blocking_t::never_t>::value)
+ || is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_defer_with_executor<Executor>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_defer_with_executor<Executor>(ex), token);
+}
/// Submits a completion token or function object for execution.
/**
- * @returns <tt>defer(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
+ * @param ctx An execution context, from which the target executor is obtained.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
+ *
+ * @returns <tt>defer(ctx.get_executor(), forward<NullaryToken>(token))</tt>.
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename ExecutionContext, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
+template <typename ExecutionContext,
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+auto defer(ExecutionContext& ctx,
+ NullaryToken&& token
+ = default_completion_token_t<typename ExecutionContext::executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_defer_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_defer_with_executor<
+ typename ExecutionContext::executor_type>(
+ ctx.get_executor()), token);
+}
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/defer.hpp"
-
#endif // ASIO_DEFER_HPP
diff --git a/3rdparty/asio/include/asio/deferred.hpp b/3rdparty/asio/include/asio/deferred.hpp
new file mode 100644
index 00000000000..b919f249553
--- /dev/null
+++ b/3rdparty/asio/include/asio/deferred.hpp
@@ -0,0 +1,715 @@
+//
+// deferred.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DEFERRED_HPP
+#define ASIO_DEFERRED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Trait for detecting objects that are usable as deferred operations.
+template <typename T>
+struct is_deferred : false_type
+{
+};
+
+/// Helper type to wrap multiple completion signatures.
+template <typename... Signatures>
+struct deferred_signatures
+{
+};
+
+namespace detail {
+
+// Helper trait for getting the completion signatures of the tail in a sequence
+// when invoked with the specified arguments.
+
+template <typename Tail, typename... Signatures>
+struct deferred_sequence_signatures;
+
+template <typename Tail, typename R, typename... Args, typename... Signatures>
+struct deferred_sequence_signatures<Tail, R(Args...), Signatures...>
+ : completion_signature_of<decltype(declval<Tail>()(declval<Args>()...))>
+{
+ static_assert(
+ !is_same<decltype(declval<Tail>()(declval<Args>()...)), void>::value,
+ "deferred functions must produce a deferred return type");
+};
+
+// Completion handler for the head component of a deferred sequence.
+template <typename Handler, typename Tail>
+class deferred_sequence_handler
+{
+public:
+ template <typename H, typename T>
+ explicit deferred_sequence_handler(H&& handler, T&& tail)
+ : handler_(static_cast<H&&>(handler)),
+ tail_(static_cast<T&&>(tail))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Tail&&>(tail_)(
+ static_cast<Args&&>(args)...)(
+ static_cast<Handler&&>(handler_));
+ }
+
+//private:
+ Handler handler_;
+ Tail tail_;
+};
+
+template <typename Head, typename Tail, typename... Signatures>
+class deferred_sequence_base
+{
+private:
+ struct initiate
+ {
+ template <typename Handler>
+ void operator()(Handler&& handler, Head head, Tail&& tail)
+ {
+ static_cast<Head&&>(head)(
+ deferred_sequence_handler<decay_t<Handler>, decay_t<Tail>>(
+ static_cast<Handler&&>(handler), static_cast<Tail&&>(tail)));
+ }
+ };
+
+ Head head_;
+ Tail tail_;
+
+public:
+ template <typename H, typename T>
+ constexpr explicit deferred_sequence_base(H&& head, T&& tail)
+ : head_(static_cast<H&&>(head)),
+ tail_(static_cast<T&&>(tail))
+ {
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ initiate(), token, static_cast<Head&&>(this->head_),
+ static_cast<Tail&&>(this->tail_)))
+ {
+ return async_initiate<CompletionToken, Signatures...>(initiate(),
+ token, static_cast<Head&&>(head_), static_cast<Tail&&>(tail_));
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ initiate(), token, this->head_, this->tail_))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ initiate(), token, head_, tail_);
+ }
+};
+
+// Two-step application of variadic Signatures to determine correct base type.
+
+template <typename Head, typename Tail>
+struct deferred_sequence_types
+{
+ template <typename... Signatures>
+ struct op1
+ {
+ typedef deferred_sequence_base<Head, Tail, Signatures...> type;
+ };
+
+ template <typename... Signatures>
+ struct op2
+ {
+ typedef typename deferred_sequence_signatures<Tail, Signatures...>::template
+ apply<op1>::type::type type;
+ };
+
+ typedef typename completion_signature_of<Head>::template
+ apply<op2>::type::type base;
+};
+
+} // namespace detail
+
+/// Used to represent an empty deferred action.
+struct deferred_noop
+{
+ /// No effect.
+ template <typename... Args>
+ void operator()(Args&&...) &&
+ {
+ }
+
+ /// No effect.
+ template <typename... Args>
+ void operator()(Args&&...) const &
+ {
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <>
+struct is_deferred<deferred_noop> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Tag type to disambiguate deferred constructors.
+struct deferred_init_tag {};
+
+/// Wraps a function object so that it may be used as an element in a deferred
+/// composition.
+template <typename Function>
+class deferred_function
+{
+public:
+ /// Constructor.
+ template <typename F>
+ constexpr explicit deferred_function(deferred_init_tag, F&& function)
+ : function_(static_cast<F&&>(function))
+ {
+ }
+
+//private:
+ Function function_;
+
+public:
+ template <typename... Args>
+ auto operator()(Args&&... args) &&
+ -> decltype(
+ static_cast<Function&&>(this->function_)(static_cast<Args&&>(args)...))
+ {
+ return static_cast<Function&&>(function_)(static_cast<Args&&>(args)...);
+ }
+
+ template <typename... Args>
+ auto operator()(Args&&... args) const &
+ -> decltype(Function(function_)(static_cast<Args&&>(args)...))
+ {
+ return Function(function_)(static_cast<Args&&>(args)...);
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Function>
+struct is_deferred<deferred_function<Function>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Encapsulates deferred values.
+template <typename... Values>
+class ASIO_NODISCARD deferred_values
+{
+private:
+ std::tuple<Values...> values_;
+
+ struct initiate
+ {
+ template <typename Handler, typename... V>
+ void operator()(Handler handler, V&&... values)
+ {
+ static_cast<Handler&&>(handler)(static_cast<V&&>(values)...);
+ }
+ };
+
+ template <typename CompletionToken, std::size_t... I>
+ auto invoke_helper(CompletionToken&& token, detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, void(Values...)>(initiate(), token,
+ std::get<I>(static_cast<std::tuple<Values...>&&>(this->values_))...))
+ {
+ return async_initiate<CompletionToken, void(Values...)>(initiate(), token,
+ std::get<I>(static_cast<std::tuple<Values...>&&>(values_))...);
+ }
+
+ template <typename CompletionToken, std::size_t... I>
+ auto const_invoke_helper(CompletionToken&& token,
+ detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, void(Values...)>(
+ initiate(), token, std::get<I>(values_)...))
+ {
+ return async_initiate<CompletionToken, void(Values...)>(
+ initiate(), token, std::get<I>(values_)...);
+ }
+
+public:
+ /// Construct a deferred asynchronous operation from the arguments to an
+ /// initiation function object.
+ template <typename... V>
+ constexpr explicit deferred_values(
+ deferred_init_tag, V&&... values)
+ : values_(static_cast<V&&>(values)...)
+ {
+ }
+
+ /// Initiate the deferred operation using the supplied completion token.
+ template <ASIO_COMPLETION_TOKEN_FOR(void(Values...)) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>()))
+ {
+ return this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>());
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(void(Values...)) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>()))
+ {
+ return this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>());
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename... Values>
+struct is_deferred<deferred_values<Values...>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Encapsulates a deferred asynchronous operation.
+template <typename Signature, typename Initiation, typename... InitArgs>
+class ASIO_NODISCARD deferred_async_operation
+{
+private:
+ typedef decay_t<Initiation> initiation_t;
+ initiation_t initiation_;
+ typedef std::tuple<decay_t<InitArgs>...> init_args_t;
+ init_args_t init_args_;
+
+ template <typename CompletionToken, std::size_t... I>
+ auto invoke_helper(CompletionToken&& token, detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, Signature>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...))
+ {
+ return async_initiate<CompletionToken, Signature>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...);
+ }
+
+ template <typename CompletionToken, std::size_t... I>
+ auto const_invoke_helper(CompletionToken&& token,
+ detail::index_sequence<I...>) const &
+ -> decltype(
+ async_initiate<CompletionToken, Signature>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...))
+ {
+ return async_initiate<CompletionToken, Signature>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...);
+ }
+
+public:
+ /// Construct a deferred asynchronous operation from the arguments to an
+ /// initiation function object.
+ template <typename I, typename... A>
+ constexpr explicit deferred_async_operation(
+ deferred_init_tag, I&& initiation, A&&... init_args)
+ : initiation_(static_cast<I&&>(initiation)),
+ init_args_(static_cast<A&&>(init_args)...)
+ {
+ }
+
+ /// Initiate the asynchronous operation using the supplied completion token.
+ template <ASIO_COMPLETION_TOKEN_FOR(Signature) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signature) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+};
+
+/// Encapsulates a deferred asynchronous operation thas has multiple completion
+/// signatures.
+template <typename... Signatures, typename Initiation, typename... InitArgs>
+class ASIO_NODISCARD deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>
+{
+private:
+ typedef decay_t<Initiation> initiation_t;
+ initiation_t initiation_;
+ typedef std::tuple<decay_t<InitArgs>...> init_args_t;
+ init_args_t init_args_;
+
+ template <typename CompletionToken, std::size_t... I>
+ auto invoke_helper(CompletionToken&& token, detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...);
+ }
+
+ template <typename CompletionToken, std::size_t... I>
+ auto const_invoke_helper(CompletionToken&& token,
+ detail::index_sequence<I...>) const &
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...);
+ }
+
+public:
+ /// Construct a deferred asynchronous operation from the arguments to an
+ /// initiation function object.
+ template <typename I, typename... A>
+ constexpr explicit deferred_async_operation(
+ deferred_init_tag, I&& initiation, A&&... init_args)
+ : initiation_(static_cast<I&&>(initiation)),
+ init_args_(static_cast<A&&>(init_args)...)
+ {
+ }
+
+ /// Initiate the asynchronous operation using the supplied completion token.
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Signature, typename Initiation, typename... InitArgs>
+struct is_deferred<
+ deferred_async_operation<Signature, Initiation, InitArgs...>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Defines a link between two consecutive operations in a sequence.
+template <typename Head, typename Tail>
+class ASIO_NODISCARD deferred_sequence :
+ public detail::deferred_sequence_types<Head, Tail>::base
+{
+public:
+ template <typename H, typename T>
+ constexpr explicit deferred_sequence(deferred_init_tag, H&& head, T&& tail)
+ : detail::deferred_sequence_types<Head, Tail>::base(
+ static_cast<H&&>(head), static_cast<T&&>(tail))
+ {
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) &&;
+
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) const &;
+#endif // defined(GENERATING_DOCUMENTATION)
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Head, typename Tail>
+struct is_deferred<deferred_sequence<Head, Tail>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Used to represent a deferred conditional branch.
+template <typename OnTrue = deferred_noop, typename OnFalse = deferred_noop>
+class ASIO_NODISCARD deferred_conditional
+{
+private:
+ template <typename T, typename F> friend class deferred_conditional;
+
+ // Helper constructor.
+ template <typename T, typename F>
+ explicit deferred_conditional(bool b, T&& on_true, F&& on_false)
+ : on_true_(static_cast<T&&>(on_true)),
+ on_false_(static_cast<F&&>(on_false)),
+ bool_(b)
+ {
+ }
+
+ OnTrue on_true_;
+ OnFalse on_false_;
+ bool bool_;
+
+public:
+ /// Construct a deferred conditional with the value to determine which branch
+ /// will be executed.
+ constexpr explicit deferred_conditional(bool b)
+ : on_true_(),
+ on_false_(),
+ bool_(b)
+ {
+ }
+
+ /// Invoke the conditional branch bsaed on the stored value.
+ template <typename... Args>
+ auto operator()(Args&&... args) &&
+ -> decltype(static_cast<OnTrue&&>(on_true_)(static_cast<Args&&>(args)...))
+ {
+ if (bool_)
+ {
+ return static_cast<OnTrue&&>(on_true_)(static_cast<Args&&>(args)...);
+ }
+ else
+ {
+ return static_cast<OnFalse&&>(on_false_)(static_cast<Args&&>(args)...);
+ }
+ }
+
+ template <typename... Args>
+ auto operator()(Args&&... args) const &
+ -> decltype(on_true_(static_cast<Args&&>(args)...))
+ {
+ if (bool_)
+ {
+ return on_true_(static_cast<Args&&>(args)...);
+ }
+ else
+ {
+ return on_false_(static_cast<Args&&>(args)...);
+ }
+ }
+
+ /// Set the true branch of the conditional.
+ template <typename T>
+ deferred_conditional<T, OnFalse> then(T on_true,
+ constraint_t<
+ is_deferred<T>::value
+ >* = 0,
+ constraint_t<
+ is_same<
+ conditional_t<true, OnTrue, T>,
+ deferred_noop
+ >::value
+ >* = 0) &&
+ {
+ return deferred_conditional<T, OnFalse>(
+ bool_, static_cast<T&&>(on_true),
+ static_cast<OnFalse&&>(on_false_));
+ }
+
+ /// Set the false branch of the conditional.
+ template <typename T>
+ deferred_conditional<OnTrue, T> otherwise(T on_false,
+ constraint_t<
+ is_deferred<T>::value
+ >* = 0,
+ constraint_t<
+ !is_same<
+ conditional_t<true, OnTrue, T>,
+ deferred_noop
+ >::value
+ >* = 0,
+ constraint_t<
+ is_same<
+ conditional_t<true, OnFalse, T>,
+ deferred_noop
+ >::value
+ >* = 0) &&
+ {
+ return deferred_conditional<OnTrue, T>(
+ bool_, static_cast<OnTrue&&>(on_true_),
+ static_cast<T&&>(on_false));
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename OnTrue, typename OnFalse>
+struct is_deferred<deferred_conditional<OnTrue, OnFalse>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Class used to specify that an asynchronous operation should return a
+/// function object to lazily launch the operation.
+/**
+ * The deferred_t class is used to indicate that an asynchronous operation
+ * should return a function object which is itself an initiation function. A
+ * deferred_t object may be passed as a completion token to an asynchronous
+ * operation, typically using the special value @c asio::deferred. For
+ * example:
+ *
+ * @code auto my_deferred_op
+ * = my_socket.async_read_some(my_buffer,
+ * asio::deferred); @endcode
+ *
+ * The initiating function (async_read_some in the above example) returns a
+ * function object that will lazily initiate the operation.
+ */
+class deferred_t
+{
+public:
+ /// Default constructor.
+ constexpr deferred_t()
+ {
+ }
+
+ /// Adapts an executor to add the @c deferred_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c deferred_t as the default completion token type.
+ typedef deferred_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c deferred_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c deferred_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+ /// Creates a new deferred from a function.
+ template <typename Function>
+ constraint_t<
+ !is_deferred<decay_t<Function>>::value,
+ deferred_function<decay_t<Function>>
+ > operator()(Function&& function) const
+ {
+ return deferred_function<decay_t<Function>>(
+ deferred_init_tag{}, static_cast<Function&&>(function));
+ }
+
+ /// Passes through anything that is already deferred.
+ template <typename T>
+ constraint_t<
+ is_deferred<decay_t<T>>::value,
+ decay_t<T>
+ > operator()(T&& t) const
+ {
+ return static_cast<T&&>(t);
+ }
+
+ /// Returns a deferred operation that returns the provided values.
+ template <typename... Args>
+ static constexpr deferred_values<decay_t<Args>...> values(Args&&... args)
+ {
+ return deferred_values<decay_t<Args>...>(
+ deferred_init_tag{}, static_cast<Args&&>(args)...);
+ }
+
+ /// Creates a conditional object for branching deferred operations.
+ static constexpr deferred_conditional<> when(bool b)
+ {
+ return deferred_conditional<>(b);
+ }
+};
+
+/// Pipe operator used to chain deferred operations.
+template <typename Head, typename Tail>
+inline auto operator|(Head head, Tail&& tail)
+ -> constraint_t<
+ is_deferred<Head>::value,
+ decltype(static_cast<Head&&>(head)(static_cast<Tail&&>(tail)))
+ >
+{
+ return static_cast<Head&&>(head)(static_cast<Tail&&>(tail));
+}
+
+/// A @ref completion_token object used to specify that an asynchronous
+/// operation should return a function object to lazily launch the operation.
+/**
+ * See the documentation for asio::deferred_t for a usage example.
+ */
+constexpr deferred_t deferred;
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/deferred.hpp"
+
+#endif // ASIO_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/detached.hpp b/3rdparty/asio/include/asio/detached.hpp
new file mode 100644
index 00000000000..b71bd9d978b
--- /dev/null
+++ b/3rdparty/asio/include/asio/detached.hpp
@@ -0,0 +1,105 @@
+//
+// detached.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETACHED_HPP
+#define ASIO_DETACHED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <memory>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// A @ref completion_token type used to specify that an asynchronous operation
+/// is detached.
+/**
+ * The detached_t class is used to indicate that an asynchronous operation is
+ * detached. That is, there is no completion handler waiting for the
+ * operation's result. A detached_t object may be passed as a handler to an
+ * asynchronous operation, typically using the special value
+ * @c asio::detached. For example:
+ *
+ * @code my_socket.async_send(my_buffer, asio::detached);
+ * @endcode
+ */
+class detached_t
+{
+public:
+ /// Constructor.
+ constexpr detached_t()
+ {
+ }
+
+ /// Adapts an executor to add the @c detached_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c detached_t as the default completion token type.
+ typedef detached_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ executor_with_default(const InnerExecutor& ex) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+
+ /// Convert the specified executor to the inner executor type, then use
+ /// that to construct the adapted executor.
+ template <typename OtherExecutor>
+ executor_with_default(const OtherExecutor& ex,
+ constraint_t<
+ is_convertible<OtherExecutor, InnerExecutor>::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c detached_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c detached_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+};
+
+/// A @ref completion_token object used to specify that an asynchronous
+/// operation is detached.
+/**
+ * See the documentation for asio::detached_t for a usage example.
+ */
+constexpr detached_t detached;
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/detached.hpp"
+
+#endif // ASIO_DETACHED_HPP
diff --git a/3rdparty/asio/include/asio/detail/array.hpp b/3rdparty/asio/include/asio/detail/array.hpp
index cfb0acce60a..f2015c7919b 100644
--- a/3rdparty/asio/include/asio/detail/array.hpp
+++ b/3rdparty/asio/include/asio/detail/array.hpp
@@ -2,7 +2,7 @@
// detail/array.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,20 +17,12 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#else // defined(ASIO_HAS_STD_ARRAY)
-# include <boost/array.hpp>
-#endif // defined(ASIO_HAS_STD_ARRAY)
+#include <array>
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_STD_ARRAY)
using std::array;
-#else // defined(ASIO_HAS_STD_ARRAY)
-using boost::array;
-#endif // defined(ASIO_HAS_STD_ARRAY)
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/array_fwd.hpp b/3rdparty/asio/include/asio/detail/array_fwd.hpp
index 6a19a820461..79491348a69 100644
--- a/3rdparty/asio/include/asio/detail/array_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/array_fwd.hpp
@@ -2,7 +2,7 @@
// detail/array_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -27,8 +27,6 @@ class array;
// Standard library components can't be forward declared, so we'll have to
// include the array header. Fortunately, it's fairly lightweight and doesn't
// add significantly to the compile time.
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
+#include <array>
#endif // ASIO_DETAIL_ARRAY_FWD_HPP
diff --git a/3rdparty/asio/include/asio/detail/assert.hpp b/3rdparty/asio/include/asio/detail/assert.hpp
index 22bb4b94fd9..b53774d9aff 100644
--- a/3rdparty/asio/include/asio/detail/assert.hpp
+++ b/3rdparty/asio/include/asio/detail/assert.hpp
@@ -2,7 +2,7 @@
// detail/assert.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/atomic_count.hpp b/3rdparty/asio/include/asio/detail/atomic_count.hpp
index 798f9150097..6116279c89e 100644
--- a/3rdparty/asio/include/asio/detail/atomic_count.hpp
+++ b/3rdparty/asio/include/asio/detail/atomic_count.hpp
@@ -2,7 +2,7 @@
// detail/atomic_count.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,11 +19,9 @@
#if !defined(ASIO_HAS_THREADS)
// Nothing to include.
-#elif defined(ASIO_HAS_STD_ATOMIC)
+#else // !defined(ASIO_HAS_THREADS)
# include <atomic>
-#else // defined(ASIO_HAS_STD_ATOMIC)
-# include <boost/detail/atomic_count.hpp>
-#endif // defined(ASIO_HAS_STD_ATOMIC)
+#endif // !defined(ASIO_HAS_THREADS)
namespace asio {
namespace detail {
@@ -31,13 +29,29 @@ namespace detail {
#if !defined(ASIO_HAS_THREADS)
typedef long atomic_count;
inline void increment(atomic_count& a, long b) { a += b; }
-#elif defined(ASIO_HAS_STD_ATOMIC)
+inline void decrement(atomic_count& a, long b) { a -= b; }
+inline void ref_count_up(atomic_count& a) { ++a; }
+inline bool ref_count_down(atomic_count& a) { return --a == 0; }
+#else // !defined(ASIO_HAS_THREADS)
typedef std::atomic<long> atomic_count;
inline void increment(atomic_count& a, long b) { a += b; }
-#else // defined(ASIO_HAS_STD_ATOMIC)
-typedef boost::detail::atomic_count atomic_count;
-inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; }
-#endif // defined(ASIO_HAS_STD_ATOMIC)
+inline void decrement(atomic_count& a, long b) { a -= b; }
+
+inline void ref_count_up(atomic_count& a)
+{
+ a.fetch_add(1, std::memory_order_relaxed);
+}
+
+inline bool ref_count_down(atomic_count& a)
+{
+ if (a.fetch_sub(1, std::memory_order_release) == 1)
+ {
+ std::atomic_thread_fence(std::memory_order_acquire);
+ return true;
+ }
+ return false;
+}
+#endif // !defined(ASIO_HAS_THREADS)
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp b/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp
new file mode 100644
index 00000000000..3ce7dcf0b7f
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp
@@ -0,0 +1,164 @@
+//
+// detail/base_from_cancellation_state.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_BASE_FROM_CANCELLATION_STATE_HPP
+#define ASIO_DETAIL_BASE_FROM_CANCELLATION_STATE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename = void>
+class base_from_cancellation_state
+{
+public:
+ typedef cancellation_slot cancellation_slot_type;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancellation_state_.slot();
+ }
+
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return cancellation_state_;
+ }
+
+protected:
+ explicit base_from_cancellation_state(const Handler& handler)
+ : cancellation_state_(
+ asio::get_associated_cancellation_slot(handler))
+ {
+ }
+
+ template <typename Filter>
+ base_from_cancellation_state(const Handler& handler, Filter filter)
+ : cancellation_state_(
+ asio::get_associated_cancellation_slot(handler), filter, filter)
+ {
+ }
+
+ template <typename InFilter, typename OutFilter>
+ base_from_cancellation_state(const Handler& handler,
+ InFilter&& in_filter,
+ OutFilter&& out_filter)
+ : cancellation_state_(
+ asio::get_associated_cancellation_slot(handler),
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter))
+ {
+ }
+
+ void reset_cancellation_state(const Handler& handler)
+ {
+ cancellation_state_ = cancellation_state(
+ asio::get_associated_cancellation_slot(handler));
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(const Handler& handler, Filter filter)
+ {
+ cancellation_state_ = cancellation_state(
+ asio::get_associated_cancellation_slot(handler), filter, filter);
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(const Handler& handler,
+ InFilter&& in_filter,
+ OutFilter&& out_filter)
+ {
+ cancellation_state_ = cancellation_state(
+ asio::get_associated_cancellation_slot(handler),
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_state_.cancelled();
+ }
+
+private:
+ cancellation_state cancellation_state_;
+};
+
+template <typename Handler>
+class base_from_cancellation_state<Handler,
+ enable_if_t<
+ is_same<
+ typename associated_cancellation_slot<
+ Handler, cancellation_slot
+ >::asio_associated_cancellation_slot_is_unspecialised,
+ void
+ >::value
+ >
+ >
+{
+public:
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return cancellation_state();
+ }
+
+protected:
+ explicit base_from_cancellation_state(const Handler&)
+ {
+ }
+
+ template <typename Filter>
+ base_from_cancellation_state(const Handler&, Filter)
+ {
+ }
+
+ template <typename InFilter, typename OutFilter>
+ base_from_cancellation_state(const Handler&,
+ InFilter&&,
+ OutFilter&&)
+ {
+ }
+
+ void reset_cancellation_state(const Handler&)
+ {
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(const Handler&, Filter)
+ {
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(const Handler&,
+ InFilter&&,
+ OutFilter&&)
+ {
+ }
+
+ constexpr cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_type::none;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_BASE_FROM_CANCELLATION_STATE_HPP
diff --git a/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp b/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp
index 9f5165b230d..ba0cc879602 100644
--- a/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp
+++ b/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp
@@ -2,7 +2,7 @@
// detail/base_from_completion_cond.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -27,8 +27,9 @@ template <typename CompletionCondition>
class base_from_completion_cond
{
protected:
- explicit base_from_completion_cond(CompletionCondition completion_condition)
- : completion_condition_(completion_condition)
+ explicit base_from_completion_cond(CompletionCondition& completion_condition)
+ : completion_condition_(
+ static_cast<CompletionCondition&&>(completion_condition))
{
}
diff --git a/3rdparty/asio/include/asio/detail/bind_handler.hpp b/3rdparty/asio/include/asio/detail/bind_handler.hpp
index 3752464a544..3c16b13a458 100644
--- a/3rdparty/asio/include/asio/detail/bind_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/bind_handler.hpp
@@ -2,7 +2,7 @@
// detail/bind_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,11 +16,8 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/associator.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,24 +25,78 @@
namespace asio {
namespace detail {
+template <typename Handler>
+class binder0
+{
+public:
+ template <typename T>
+ binder0(int, T&& handler)
+ : handler_(static_cast<T&&>(handler))
+ {
+ }
+
+ binder0(Handler& handler)
+ : handler_(static_cast<Handler&&>(handler))
+ {
+ }
+
+ binder0(const binder0& other)
+ : handler_(other.handler_)
+ {
+ }
+
+ binder0(binder0&& other)
+ : handler_(static_cast<Handler&&>(other.handler_))
+ {
+ }
+
+ void operator()()
+ {
+ static_cast<Handler&&>(handler_)();
+ }
+
+ void operator()() const
+ {
+ handler_();
+ }
+
+//private:
+ Handler handler_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ binder0<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Handler>
+inline binder0<decay_t<Handler>> bind_handler(
+ Handler&& handler)
+{
+ return binder0<decay_t<Handler>>(
+ 0, static_cast<Handler&&>(handler));
+}
+
template <typename Handler, typename Arg1>
class binder1
{
public:
template <typename T>
- binder1(int, ASIO_MOVE_ARG(T) handler, const Arg1& arg1)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ binder1(int, T&& handler, const Arg1& arg1)
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1)
{
}
binder1(Handler& handler, const Arg1& arg1)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1)
{
}
-#if defined(ASIO_HAS_MOVE)
binder1(const binder1& other)
: handler_(other.handler_),
arg1_(other.arg1_)
@@ -53,15 +104,15 @@ public:
}
binder1(binder1&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- handler_(static_cast<const Arg1&>(arg1_));
+ static_cast<Handler&&>(handler_)(
+ static_cast<const Arg1&>(arg1_));
}
void operator()() const
@@ -75,22 +126,6 @@ public:
};
template <typename Handler, typename Arg1>
-inline void* asio_handler_allocate(std::size_t size,
- binder1<Handler, Arg1>* this_handler)
-{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1>
inline bool asio_handler_is_continuation(
binder1<Handler, Arg1>* this_handler)
{
@@ -98,28 +133,12 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1>
-inline void asio_handler_invoke(Function& function,
- binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Handler, typename Arg1>
-inline void asio_handler_invoke(const Function& function,
- binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
template <typename Handler, typename Arg1>
-inline binder1<typename decay<Handler>::type, Arg1> bind_handler(
- ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1)
+inline binder1<decay_t<Handler>, Arg1> bind_handler(
+ Handler&& handler, const Arg1& arg1)
{
- return binder1<typename decay<Handler>::type, Arg1>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1);
+ return binder1<decay_t<Handler>, Arg1>(0,
+ static_cast<Handler&&>(handler), arg1);
}
template <typename Handler, typename Arg1, typename Arg2>
@@ -127,22 +146,21 @@ class binder2
{
public:
template <typename T>
- binder2(int, ASIO_MOVE_ARG(T) handler,
+ binder2(int, T&& handler,
const Arg1& arg1, const Arg2& arg2)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1),
arg2_(arg2)
{
}
binder2(Handler& handler, const Arg1& arg1, const Arg2& arg2)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
arg2_(arg2)
{
}
-#if defined(ASIO_HAS_MOVE)
binder2(const binder2& other)
: handler_(other.handler_),
arg1_(other.arg1_),
@@ -151,16 +169,16 @@ public:
}
binder2(binder2&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- handler_(static_cast<const Arg1&>(arg1_),
+ static_cast<Handler&&>(handler_)(
+ static_cast<const Arg1&>(arg1_),
static_cast<const Arg2&>(arg2_));
}
@@ -176,99 +194,302 @@ public:
};
template <typename Handler, typename Arg1, typename Arg2>
-inline void* asio_handler_allocate(std::size_t size,
+inline bool asio_handler_is_continuation(
binder2<Handler, Arg1, Arg2>* this_handler)
{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
}
template <typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- binder2<Handler, Arg1, Arg2>* this_handler)
+inline binder2<decay_t<Handler>, Arg1, Arg2> bind_handler(
+ Handler&& handler, const Arg1& arg1, const Arg2& arg2)
{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
+ return binder2<decay_t<Handler>, Arg1, Arg2>(0,
+ static_cast<Handler&&>(handler), arg1, arg2);
}
-template <typename Handler, typename Arg1, typename Arg2>
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+class binder3
+{
+public:
+ template <typename T>
+ binder3(int, T&& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3)
+ : handler_(static_cast<T&&>(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3)
+ {
+ }
+
+ binder3(Handler& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3)
+ : handler_(static_cast<Handler&&>(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3)
+ {
+ }
+
+ binder3(const binder3& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_),
+ arg3_(other.arg3_)
+ {
+ }
+
+ binder3(binder3&& other)
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_)),
+ arg3_(static_cast<Arg3&&>(other.arg3_))
+ {
+ }
+
+ void operator()()
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_),
+ static_cast<const Arg3&>(arg3_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_, arg3_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+ Arg3 arg3_;
+};
+
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
inline bool asio_handler_is_continuation(
- binder2<Handler, Arg1, Arg2>* this_handler)
+ binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
{
return asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_invoke(Function& function,
- binder2<Handler, Arg1, Arg2>* this_handler)
+template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
+inline binder3<decay_t<Handler>, Arg1, Arg2, Arg3> bind_handler(
+ Handler&& handler, const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3)
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
+ return binder3<decay_t<Handler>, Arg1, Arg2, Arg3>(0,
+ static_cast<Handler&&>(handler), arg1, arg2, arg3);
}
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_invoke(const Function& function,
- binder2<Handler, Arg1, Arg2>* this_handler)
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+class binder4
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
+public:
+ template <typename T>
+ binder4(int, T&& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
+ : handler_(static_cast<T&&>(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4)
+ {
+ }
-template <typename Handler, typename Arg1, typename Arg2>
-inline binder2<typename decay<Handler>::type, Arg1, Arg2> bind_handler(
- ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2)
+ binder4(Handler& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
+ : handler_(static_cast<Handler&&>(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4)
+ {
+ }
+
+ binder4(const binder4& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_),
+ arg3_(other.arg3_),
+ arg4_(other.arg4_)
+ {
+ }
+
+ binder4(binder4&& other)
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_)),
+ arg3_(static_cast<Arg3&&>(other.arg3_)),
+ arg4_(static_cast<Arg4&&>(other.arg4_))
+ {
+ }
+
+ void operator()()
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_),
+ static_cast<const Arg3&>(arg3_),
+ static_cast<const Arg4&>(arg4_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_, arg3_, arg4_);
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+ Arg2 arg2_;
+ Arg3 arg3_;
+ Arg4 arg4_;
+};
+
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline bool asio_handler_is_continuation(
+ binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
{
- return binder2<typename decay<Handler>::type, Arg1, Arg2>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1, arg2);
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
}
-#if defined(ASIO_HAS_MOVE)
+template <typename Handler, typename Arg1,
+ typename Arg2, typename Arg3, typename Arg4>
+inline binder4<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4>
+bind_handler(Handler&& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
+{
+ return binder4<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4>(0,
+ static_cast<Handler&&>(handler), arg1, arg2, arg3, arg4);
+}
-template <typename Handler, typename Arg1>
-class move_binder1
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+class binder5
{
public:
- move_binder1(int, ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Arg1) arg1)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(ASIO_MOVE_CAST(Arg1)(arg1))
+ template <typename T>
+ binder5(int, T&& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
+ : handler_(static_cast<T&&>(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4),
+ arg5_(arg5)
{
}
- move_binder1(move_binder1&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_))
+ binder5(Handler& handler, const Arg1& arg1, const Arg2& arg2,
+ const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
+ : handler_(static_cast<Handler&&>(handler)),
+ arg1_(arg1),
+ arg2_(arg2),
+ arg3_(arg3),
+ arg4_(arg4),
+ arg5_(arg5)
+ {
+ }
+
+ binder5(const binder5& other)
+ : handler_(other.handler_),
+ arg1_(other.arg1_),
+ arg2_(other.arg2_),
+ arg3_(other.arg3_),
+ arg4_(other.arg4_),
+ arg5_(other.arg5_)
+ {
+ }
+
+ binder5(binder5&& other)
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_)),
+ arg3_(static_cast<Arg3&&>(other.arg3_)),
+ arg4_(static_cast<Arg4&&>(other.arg4_)),
+ arg5_(static_cast<Arg5&&>(other.arg5_))
{
}
void operator()()
{
- handler_(ASIO_MOVE_CAST(Arg1)(arg1_));
+ static_cast<Handler&&>(handler_)(
+ static_cast<const Arg1&>(arg1_),
+ static_cast<const Arg2&>(arg2_),
+ static_cast<const Arg3&>(arg3_),
+ static_cast<const Arg4&>(arg4_),
+ static_cast<const Arg5&>(arg5_));
+ }
+
+ void operator()() const
+ {
+ handler_(arg1_, arg2_, arg3_, arg4_, arg5_);
}
//private:
Handler handler_;
Arg1 arg1_;
+ Arg2 arg2_;
+ Arg3 arg3_;
+ Arg4 arg4_;
+ Arg5 arg5_;
};
-template <typename Handler, typename Arg1>
-inline void* asio_handler_allocate(std::size_t size,
- move_binder1<Handler, Arg1>* this_handler)
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+inline bool asio_handler_is_continuation(
+ binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
}
-template <typename Handler, typename Arg1>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- move_binder1<Handler, Arg1>* this_handler)
+template <typename Handler, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+inline binder5<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4, Arg5>
+bind_handler(Handler&& handler, const Arg1& arg1,
+ const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
+ return binder5<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
+ static_cast<Handler&&>(handler), arg1, arg2, arg3, arg4, arg5);
}
template <typename Handler, typename Arg1>
+class move_binder1
+{
+public:
+ move_binder1(int, Handler&& handler,
+ Arg1&& arg1)
+ : handler_(static_cast<Handler&&>(handler)),
+ arg1_(static_cast<Arg1&&>(arg1))
+ {
+ }
+
+ move_binder1(move_binder1&& other)
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_))
+ {
+ }
+
+ void operator()()
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<Arg1&&>(arg1_));
+ }
+
+//private:
+ Handler handler_;
+ Arg1 arg1_;
+};
+
+template <typename Handler, typename Arg1>
inline bool asio_handler_is_continuation(
move_binder1<Handler, Arg1>* this_handler)
{
@@ -276,37 +497,30 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1>
-inline void asio_handler_invoke(ASIO_MOVE_ARG(Function) function,
- move_binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
-}
-
template <typename Handler, typename Arg1, typename Arg2>
class move_binder2
{
public:
- move_binder2(int, ASIO_MOVE_ARG(Handler) handler,
- const Arg1& arg1, ASIO_MOVE_ARG(Arg2) arg2)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ move_binder2(int, Handler&& handler,
+ const Arg1& arg1, Arg2&& arg2)
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
- arg2_(ASIO_MOVE_CAST(Arg2)(arg2))
+ arg2_(static_cast<Arg2&&>(arg2))
{
}
move_binder2(move_binder2&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_))
{
}
void operator()()
{
- handler_(static_cast<const Arg1&>(arg1_),
- ASIO_MOVE_CAST(Arg2)(arg2_));
+ static_cast<Handler&&>(handler_)(
+ static_cast<const Arg1&>(arg1_),
+ static_cast<Arg2&&>(arg2_));
}
//private:
@@ -316,22 +530,6 @@ public:
};
template <typename Handler, typename Arg1, typename Arg2>
-inline void* asio_handler_allocate(std::size_t size,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
inline bool asio_handler_is_continuation(
move_binder2<Handler, Arg1, Arg2>* this_handler)
{
@@ -339,119 +537,173 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline void asio_handler_invoke(ASIO_MOVE_ARG(Function) function,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
-}
-
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace detail
-template <typename Handler, typename Arg1, typename Allocator>
-struct associated_allocator<detail::binder1<Handler, Arg1>, Allocator>
+template <template <typename, typename> class Associator,
+ typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::binder0<Handler>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_allocator<Handler, Allocator>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder0<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::binder1<Handler, Arg1>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static auto get(const detail::binder0<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename Handler, typename Arg1, typename Arg2, typename Allocator>
-struct associated_allocator<detail::binder2<Handler, Arg1, Arg2>, Allocator>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename DefaultCandidate>
+struct associator<Associator,
+ detail::binder1<Handler, Arg1>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_allocator<Handler, Allocator>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder1<Handler, Arg1>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::binder2<Handler, Arg1, Arg2>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static auto get(const detail::binder1<Handler, Arg1>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename Handler, typename Arg1, typename Executor>
-struct associated_executor<detail::binder1<Handler, Arg1>, Executor>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename Arg2,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::binder2<Handler, Arg1, Arg2>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_executor<Handler, Executor>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder2<Handler, Arg1, Arg2>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::binder1<Handler, Arg1>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const detail::binder2<Handler, Arg1, Arg2>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename Handler, typename Arg1, typename Arg2, typename Executor>
-struct associated_executor<detail::binder2<Handler, Arg1, Arg2>, Executor>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename Arg2, typename Arg3,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::binder3<Handler, Arg1, Arg2, Arg3>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_executor<Handler, Executor>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder3<Handler, Arg1, Arg2, Arg3>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::binder2<Handler, Arg1, Arg2>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const detail::binder3<Handler, Arg1, Arg2, Arg3>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-#if defined(ASIO_HAS_MOVE)
-
-template <typename Handler, typename Arg1, typename Allocator>
-struct associated_allocator<detail::move_binder1<Handler, Arg1>, Allocator>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename DefaultCandidate>
+struct associator<Associator,
+ detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_allocator<Handler, Allocator>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::move_binder1<Handler, Arg1>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static auto get(const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename Handler, typename Arg1, typename Arg2, typename Allocator>
-struct associated_allocator<
- detail::move_binder2<Handler, Arg1, Arg2>, Allocator>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5, typename DefaultCandidate>
+struct associator<Associator,
+ detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_allocator<Handler, Allocator>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename Handler, typename Arg1, typename Executor>
-struct associated_executor<detail::move_binder1<Handler, Arg1>, Executor>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename DefaultCandidate>
+struct associator<Associator,
+ detail::move_binder1<Handler, Arg1>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_executor<Handler, Executor>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::move_binder1<Handler, Arg1>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::move_binder1<Handler, Arg1>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const detail::move_binder1<Handler, Arg1>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename Handler, typename Arg1, typename Arg2, typename Executor>
-struct associated_executor<detail::move_binder2<Handler, Arg1, Arg2>, Executor>
+template <template <typename, typename> class Associator,
+ typename Handler, typename Arg1, typename Arg2, typename DefaultCandidate>
+struct associator<Associator,
+ detail::move_binder2<Handler, Arg1, Arg2>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_executor<Handler, Executor>::type type;
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::move_binder2<Handler, Arg1, Arg2>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp b/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp
new file mode 100644
index 00000000000..c70e562f403
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp
@@ -0,0 +1,107 @@
+//
+// detail/blocking_executor_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_BLOCKING_EXECUTOR_OP_HPP
+#define ASIO_DETAIL_BLOCKING_EXECUTOR_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/event.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/detail/scheduler_operation.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Operation = scheduler_operation>
+class blocking_executor_op_base : public Operation
+{
+public:
+ blocking_executor_op_base(typename Operation::func_type complete_func)
+ : Operation(complete_func),
+ is_complete_(false)
+ {
+ }
+
+ void wait()
+ {
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ while (!is_complete_)
+ event_.wait(lock);
+ }
+
+protected:
+ struct do_complete_cleanup
+ {
+ ~do_complete_cleanup()
+ {
+ asio::detail::mutex::scoped_lock lock(op_->mutex_);
+ op_->is_complete_ = true;
+ op_->event_.unlock_and_signal_one_for_destruction(lock);
+ }
+
+ blocking_executor_op_base* op_;
+ };
+
+private:
+ asio::detail::mutex mutex_;
+ asio::detail::event event_;
+ bool is_complete_;
+};
+
+template <typename Handler, typename Operation = scheduler_operation>
+class blocking_executor_op : public blocking_executor_op_base<Operation>
+{
+public:
+ blocking_executor_op(Handler& h)
+ : blocking_executor_op_base<Operation>(&blocking_executor_op::do_complete),
+ handler_(h)
+ {
+ }
+
+ static void do_complete(void* owner, Operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ ASIO_ASSUME(base != 0);
+ blocking_executor_op* o(static_cast<blocking_executor_op*>(base));
+
+ typename blocking_executor_op_base<Operation>::do_complete_cleanup
+ on_exit = { o };
+ (void)on_exit;
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN(());
+ static_cast<Handler&&>(o->handler_)();
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler& handler_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_BLOCKING_EXECUTOR_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp b/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp
index 2768c8a107c..1a78307aaae 100644
--- a/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp
+++ b/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp
@@ -2,7 +2,7 @@
// detail/buffer_resize_guard.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp b/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp
index f81e312a47c..8ea904e7023 100644
--- a/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp
@@ -2,7 +2,7 @@
// detail/buffer_sequence_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#include "asio/buffer.hpp"
#include "asio/detail/array_fwd.hpp"
#include "asio/detail/socket_types.hpp"
+#include "asio/registered_buffer.hpp"
#include "asio/detail/push_options.hpp"
@@ -104,6 +105,9 @@ class buffer_sequence_adapter
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = false };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(const Buffers& buffer_sequence)
: count_(0), total_buffer_size_(0)
{
@@ -127,6 +131,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -153,6 +162,16 @@ public:
asio::buffer_sequence_end(buffer_sequence));
}
+ enum { linearisation_storage_size = 8192 };
+
+ static Buffer linearise(const Buffers& buffer_sequence,
+ const asio::mutable_buffer& storage)
+ {
+ return buffer_sequence_adapter::linearise(
+ asio::buffer_sequence_begin(buffer_sequence),
+ asio::buffer_sequence_end(buffer_sequence), storage);
+ }
+
private:
template <typename Iterator>
void init(Iterator begin, Iterator end)
@@ -201,6 +220,30 @@ private:
return Buffer();
}
+ template <typename Iterator>
+ static Buffer linearise(Iterator begin, Iterator end,
+ const asio::mutable_buffer& storage)
+ {
+ asio::mutable_buffer unused_storage = storage;
+ Iterator iter = begin;
+ while (iter != end && unused_storage.size() != 0)
+ {
+ Buffer buffer(*iter);
+ ++iter;
+ if (buffer.size() == 0)
+ continue;
+ if (unused_storage.size() == storage.size())
+ {
+ if (iter == end)
+ return buffer;
+ if (buffer.size() >= unused_storage.size())
+ return buffer;
+ }
+ unused_storage += asio::buffer_copy(unused_storage, buffer);
+ }
+ return Buffer(storage.data(), storage.size() - unused_storage.size());
+ }
+
native_buffer_type buffers_[max_buffers];
std::size_t count_;
std::size_t total_buffer_size_;
@@ -211,6 +254,9 @@ class buffer_sequence_adapter<Buffer, asio::mutable_buffer>
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(
const asio::mutable_buffer& buffer_sequence)
{
@@ -233,6 +279,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -253,6 +304,14 @@ public:
return Buffer(buffer_sequence);
}
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(const asio::mutable_buffer& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence);
+ }
+
private:
native_buffer_type buffer_;
std::size_t total_buffer_size_;
@@ -263,6 +322,9 @@ class buffer_sequence_adapter<Buffer, asio::const_buffer>
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(
const asio::const_buffer& buffer_sequence)
{
@@ -285,6 +347,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -305,6 +372,14 @@ public:
return Buffer(buffer_sequence);
}
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(const asio::const_buffer& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence);
+ }
+
private:
native_buffer_type buffer_;
std::size_t total_buffer_size_;
@@ -317,6 +392,9 @@ class buffer_sequence_adapter<Buffer, asio::mutable_buffers_1>
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(
const asio::mutable_buffers_1& buffer_sequence)
{
@@ -339,6 +417,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -359,6 +442,14 @@ public:
return Buffer(buffer_sequence);
}
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(const asio::mutable_buffers_1& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence);
+ }
+
private:
native_buffer_type buffer_;
std::size_t total_buffer_size_;
@@ -369,6 +460,9 @@ class buffer_sequence_adapter<Buffer, asio::const_buffers_1>
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(
const asio::const_buffers_1& buffer_sequence)
{
@@ -391,6 +485,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -411,6 +510,14 @@ public:
return Buffer(buffer_sequence);
}
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(const asio::const_buffers_1& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence);
+ }
+
private:
native_buffer_type buffer_;
std::size_t total_buffer_size_;
@@ -418,11 +525,162 @@ private:
#endif // !defined(ASIO_NO_DEPRECATED)
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, asio::mutable_registered_buffer>
+ : buffer_sequence_adapter_base
+{
+public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = true };
+
+ explicit buffer_sequence_adapter(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ init_native_buffer(buffer_, buffer_sequence.buffer());
+ total_buffer_size_ = buffer_sequence.size();
+ registered_id_ = buffer_sequence.id();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ registered_buffer_id registered_id() const
+ {
+ return registered_id_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(
+ const asio::mutable_registered_buffer& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+ registered_buffer_id registered_id_;
+};
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, asio::const_registered_buffer>
+ : buffer_sequence_adapter_base
+{
+public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = true };
+
+ explicit buffer_sequence_adapter(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ init_native_buffer(buffer_, buffer_sequence.buffer());
+ total_buffer_size_ = buffer_sequence.size();
+ registered_id_ = buffer_sequence.id();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ registered_buffer_id registered_id() const
+ {
+ return registered_id_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(
+ const asio::const_registered_buffer& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+ registered_buffer_id registered_id_;
+};
+
template <typename Buffer, typename Elem>
-class buffer_sequence_adapter<Buffer, boost::array<Elem, 2> >
+class buffer_sequence_adapter<Buffer, boost::array<Elem, 2>>
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = false };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(
const boost::array<Elem, 2>& buffer_sequence)
{
@@ -446,6 +704,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -468,18 +731,32 @@ public:
? buffer_sequence[0] : buffer_sequence[1]);
}
+ enum { linearisation_storage_size = 8192 };
+
+ static Buffer linearise(const boost::array<Elem, 2>& buffer_sequence,
+ const asio::mutable_buffer& storage)
+ {
+ if (buffer_sequence[0].size() == 0)
+ return Buffer(buffer_sequence[1]);
+ if (buffer_sequence[1].size() == 0)
+ return Buffer(buffer_sequence[0]);
+ return Buffer(storage.data(),
+ asio::buffer_copy(storage, buffer_sequence));
+ }
+
private:
native_buffer_type buffers_[2];
std::size_t total_buffer_size_;
};
-#if defined(ASIO_HAS_STD_ARRAY)
-
template <typename Buffer, typename Elem>
-class buffer_sequence_adapter<Buffer, std::array<Elem, 2> >
+class buffer_sequence_adapter<Buffer, std::array<Elem, 2>>
: buffer_sequence_adapter_base
{
public:
+ enum { is_single_buffer = false };
+ enum { is_registered_buffer = false };
+
explicit buffer_sequence_adapter(
const std::array<Elem, 2>& buffer_sequence)
{
@@ -503,6 +780,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -525,13 +807,24 @@ public:
? buffer_sequence[0] : buffer_sequence[1]);
}
+ enum { linearisation_storage_size = 8192 };
+
+ static Buffer linearise(const std::array<Elem, 2>& buffer_sequence,
+ const asio::mutable_buffer& storage)
+ {
+ if (buffer_sequence[0].size() == 0)
+ return Buffer(buffer_sequence[1]);
+ if (buffer_sequence[1].size() == 0)
+ return Buffer(buffer_sequence[0]);
+ return Buffer(storage.data(),
+ asio::buffer_copy(storage, buffer_sequence));
+ }
+
private:
native_buffer_type buffers_[2];
std::size_t total_buffer_size_;
};
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp b/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp
index a71120dca41..afe5cadffda 100644
--- a/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp
+++ b/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp
@@ -2,7 +2,7 @@
// detail/buffered_stream_storage.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/call_stack.hpp b/3rdparty/asio/include/asio/detail/call_stack.hpp
index 9835e64aa18..c287c57e2c6 100644
--- a/3rdparty/asio/include/asio/detail/call_stack.hpp
+++ b/3rdparty/asio/include/asio/detail/call_stack.hpp
@@ -2,7 +2,7 @@
// detail/call_stack.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/chrono.hpp b/3rdparty/asio/include/asio/detail/chrono.hpp
index 31d6c6e7dfd..45490dde02e 100644
--- a/3rdparty/asio/include/asio/detail/chrono.hpp
+++ b/3rdparty/asio/include/asio/detail/chrono.hpp
@@ -2,7 +2,7 @@
// detail/chrono.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,17 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_CHRONO)
-# include <chrono>
-#elif defined(ASIO_HAS_BOOST_CHRONO)
-# include <boost/chrono/system_clocks.hpp>
-#endif // defined(ASIO_HAS_BOOST_CHRONO)
+#include <chrono>
namespace asio {
namespace chrono {
-#if defined(ASIO_HAS_STD_CHRONO)
using std::chrono::duration;
using std::chrono::time_point;
using std::chrono::duration_cast;
@@ -44,21 +38,6 @@ using std::chrono::steady_clock;
#endif // defined(ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
using std::chrono::system_clock;
using std::chrono::high_resolution_clock;
-#elif defined(ASIO_HAS_BOOST_CHRONO)
-using boost::chrono::duration;
-using boost::chrono::time_point;
-using boost::chrono::duration_cast;
-using boost::chrono::nanoseconds;
-using boost::chrono::microseconds;
-using boost::chrono::milliseconds;
-using boost::chrono::seconds;
-using boost::chrono::minutes;
-using boost::chrono::hours;
-using boost::chrono::time_point_cast;
-using boost::chrono::system_clock;
-using boost::chrono::steady_clock;
-using boost::chrono::high_resolution_clock;
-#endif // defined(ASIO_HAS_BOOST_CHRONO)
} // namespace chrono
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp b/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp
index b6236a5001f..de7b7d69929 100644
--- a/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp
+++ b/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp
@@ -2,7 +2,7 @@
// detail/chrono_time_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/completion_handler.hpp b/3rdparty/asio/include/asio/detail/completion_handler.hpp
index e510dedfbcb..c6f98b36c38 100644
--- a/3rdparty/asio/include/asio/detail/completion_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/completion_handler.hpp
@@ -2,7 +2,7 @@
// detail/completion_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -27,17 +27,17 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class completion_handler : public operation
{
public:
ASIO_DEFINE_HANDLER_PTR(completion_handler);
- completion_handler(Handler& h)
+ completion_handler(Handler& h, const IoExecutor& io_ex)
: operation(&completion_handler::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h))
+ handler_(static_cast<Handler&&>(h)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -47,17 +47,21 @@ public:
// Take ownership of the handler object.
completion_handler* h(static_cast<completion_handler*>(base));
ptr p = { asio::detail::addressof(h->handler_), h, h };
- handler_work<Handler> w(h->handler_);
ASIO_HANDLER_COMPLETION((*h));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ h->work_));
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
// with the handler. Consequently, a local copy of the handler is required
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
- Handler handler(ASIO_MOVE_CAST(Handler)(h->handler_));
+ Handler handler(static_cast<Handler&&>(h->handler_));
p.h = asio::detail::addressof(handler);
p.reset();
@@ -73,6 +77,7 @@ public:
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/composed_work.hpp b/3rdparty/asio/include/asio/detail/composed_work.hpp
new file mode 100644
index 00000000000..8076f8508d6
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/composed_work.hpp
@@ -0,0 +1,252 @@
+//
+// detail/composed_work.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_COMPOSED_WORK_HPP
+#define ASIO_DETAIL_COMPOSED_WORK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/executor_work_guard.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/system_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Executor, typename = void>
+class composed_work_guard
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor, execution::outstanding_work_t::tracked_t>
+ > executor_type;
+
+ composed_work_guard(const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ void reset()
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+private:
+ executor_type executor_;
+};
+
+template <>
+struct composed_work_guard<system_executor>
+{
+public:
+ typedef system_executor executor_type;
+
+ composed_work_guard(const system_executor&)
+ {
+ }
+
+ void reset()
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return system_executor();
+ }
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+struct composed_work_guard<Executor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ >
+ > : executor_work_guard<Executor>
+{
+ composed_work_guard(const Executor& ex)
+ : executor_work_guard<Executor>(ex)
+ {
+ }
+};
+
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename>
+struct composed_io_executors;
+
+template <>
+struct composed_io_executors<void()>
+{
+ composed_io_executors() noexcept
+ : head_(system_executor())
+ {
+ }
+
+ typedef system_executor head_type;
+ system_executor head_;
+};
+
+inline composed_io_executors<void()> make_composed_io_executors()
+{
+ return composed_io_executors<void()>();
+}
+
+template <typename Head>
+struct composed_io_executors<void(Head)>
+{
+ explicit composed_io_executors(const Head& ex) noexcept
+ : head_(ex)
+ {
+ }
+
+ typedef Head head_type;
+ Head head_;
+};
+
+template <typename Head>
+inline composed_io_executors<void(Head)>
+make_composed_io_executors(const Head& head)
+{
+ return composed_io_executors<void(Head)>(head);
+}
+
+template <typename Head, typename... Tail>
+struct composed_io_executors<void(Head, Tail...)>
+{
+ explicit composed_io_executors(const Head& head,
+ const Tail&... tail) noexcept
+ : head_(head),
+ tail_(tail...)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ tail_.reset();
+ }
+
+ typedef Head head_type;
+ Head head_;
+ composed_io_executors<void(Tail...)> tail_;
+};
+
+template <typename Head, typename... Tail>
+inline composed_io_executors<void(Head, Tail...)>
+make_composed_io_executors(const Head& head, const Tail&... tail)
+{
+ return composed_io_executors<void(Head, Tail...)>(head, tail...);
+}
+
+template <typename>
+struct composed_work;
+
+template <>
+struct composed_work<void()>
+{
+ typedef composed_io_executors<void()> executors_type;
+
+ composed_work(const executors_type&) noexcept
+ : head_(system_executor())
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ }
+
+ typedef system_executor head_type;
+ composed_work_guard<system_executor> head_;
+};
+
+template <typename Head>
+struct composed_work<void(Head)>
+{
+ typedef composed_io_executors<void(Head)> executors_type;
+
+ explicit composed_work(const executors_type& ex) noexcept
+ : head_(ex.head_)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ }
+
+ typedef Head head_type;
+ composed_work_guard<Head> head_;
+};
+
+template <typename Head, typename... Tail>
+struct composed_work<void(Head, Tail...)>
+{
+ typedef composed_io_executors<void(Head, Tail...)> executors_type;
+
+ explicit composed_work(const executors_type& ex) noexcept
+ : head_(ex.head_),
+ tail_(ex.tail_)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ tail_.reset();
+ }
+
+ typedef Head head_type;
+ composed_work_guard<Head> head_;
+ composed_work<void(Tail...)> tail_;
+};
+
+template <typename IoObject>
+inline typename IoObject::executor_type
+get_composed_io_executor(IoObject& io_object,
+ enable_if_t<
+ !is_executor<IoObject>::value
+ >* = 0,
+ enable_if_t<
+ !execution::is_executor<IoObject>::value
+ >* = 0)
+{
+ return io_object.get_executor();
+}
+
+template <typename Executor>
+inline const Executor& get_composed_io_executor(const Executor& ex,
+ enable_if_t<
+ is_executor<Executor>::value
+ || execution::is_executor<Executor>::value
+ >* = 0)
+{
+ return ex;
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_COMPOSED_WORK_HPP
diff --git a/3rdparty/asio/include/asio/detail/concurrency_hint.hpp b/3rdparty/asio/include/asio/detail/concurrency_hint.hpp
index 75480932577..43e81a4c22d 100644
--- a/3rdparty/asio/include/asio/detail/concurrency_hint.hpp
+++ b/3rdparty/asio/include/asio/detail/concurrency_hint.hpp
@@ -2,7 +2,7 @@
// detail/concurrency_hint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -26,8 +26,12 @@
// If set, this bit indicates that the scheduler should perform locking.
#define ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER 0x1u
-// If set, this bit indicates that the reactor should perform locking.
-#define ASIO_CONCURRENCY_HINT_LOCKING_REACTOR 0x2u
+// If set, this bit indicates that the reactor should perform locking when
+// managing descriptor registrations.
+#define ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION 0x2u
+
+// If set, this bit indicates that the reactor should perform locking for I/O.
+#define ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_IO 0x4u
// Helper macro to determine if we have a special concurrency hint.
#define ASIO_CONCURRENCY_HINT_IS_SPECIAL(hint) \
@@ -64,13 +68,15 @@
// timers), occur in only one thread at a time.
#define ASIO_CONCURRENCY_HINT_UNSAFE_IO \
static_cast<int>(ASIO_CONCURRENCY_HINT_ID \
- | ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER)
+ | ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
+ | ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION)
// The special concurrency hint provides full thread safety.
#define ASIO_CONCURRENCY_HINT_SAFE \
static_cast<int>(ASIO_CONCURRENCY_HINT_ID \
| ASIO_CONCURRENCY_HINT_LOCKING_SCHEDULER \
- | ASIO_CONCURRENCY_HINT_LOCKING_REACTOR)
+ | ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_REGISTRATION \
+ | ASIO_CONCURRENCY_HINT_LOCKING_REACTOR_IO)
// This #define may be overridden at compile time to specify a program-wide
// default concurrency hint, used by the zero-argument io_context constructor.
diff --git a/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp b/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
index 7ce806a2358..af68dde32c0 100644
--- a/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
+++ b/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
@@ -2,7 +2,7 @@
// detail/conditionally_enabled_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -64,6 +64,14 @@ public:
event_.unlock_and_signal_one(lock);
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ void unlock_and_signal_one_for_destruction(
+ conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.unlock_and_signal_one(lock);
+ }
+
// If there's a waiter, unlock the mutex and signal it.
bool maybe_unlock_and_signal_one(
conditionally_enabled_mutex::scoped_lock& lock)
diff --git a/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp b/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp
index 39c168764b3..27fc30ecbb2 100644
--- a/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp
@@ -2,7 +2,7 @@
// detail/conditionally_enabled_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/config.hpp b/3rdparty/asio/include/asio/detail/config.hpp
index 0c651bed71d..cd345eac2cd 100644
--- a/3rdparty/asio/include/asio/detail/config.hpp
+++ b/3rdparty/asio/include/asio/detail/config.hpp
@@ -2,7 +2,7 @@
// detail/config.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,7 +11,33 @@
#ifndef ASIO_DETAIL_CONFIG_HPP
#define ASIO_DETAIL_CONFIG_HPP
+// boostify: non-boost code starts here
+#if !defined(ASIO_STANDALONE)
+# if !defined(ASIO_ENABLE_BOOST)
+# if (__cplusplus >= 201103)
+# define ASIO_STANDALONE 1
+# elif defined(_MSC_VER) && defined(_MSVC_LANG)
+# if (_MSC_VER >= 1900) && (_MSVC_LANG >= 201103)
+# define ASIO_STANDALONE 1
+# endif // (_MSC_VER >= 1900) && (_MSVC_LANG >= 201103)
+# endif // defined(_MSC_VER) && defined(_MSVC_LANG)
+# endif // !defined(ASIO_ENABLE_BOOST)
+#endif // !defined(ASIO_STANDALONE)
+
+// Make standard library feature macros available.
+#if defined(__has_include)
+# if __has_include(<version>)
+# include <version>
+# else // __has_include(<version>)
+# include <cstddef>
+# endif // __has_include(<version>)
+#else // defined(__has_include)
+# include <cstddef>
+#endif // defined(__has_include)
+
+// boostify: non-boost code ends here
#if defined(ASIO_STANDALONE)
+# define ASIO_DISABLE_BOOST_ALIGN 1
# define ASIO_DISABLE_BOOST_ARRAY 1
# define ASIO_DISABLE_BOOST_ASSERT 1
# define ASIO_DISABLE_BOOST_BIND 1
@@ -23,6 +49,7 @@
# define ASIO_DISABLE_BOOST_THROW_EXCEPTION 1
# define ASIO_DISABLE_BOOST_WORKAROUND 1
#else // defined(ASIO_STANDALONE)
+// Boost.Config library is available.
# include <boost/config.hpp>
# include <boost/version.hpp>
# define ASIO_HAS_BOOST_CONFIG 1
@@ -61,6 +88,9 @@
# define ASIO_DECL
#endif // !defined(ASIO_DECL)
+// Helper macro for documentation.
+#define ASIO_UNSPECIFIED(e) e
+
// Microsoft Visual C++ detection.
#if !defined(ASIO_MSVC)
# if defined(ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
@@ -69,7 +99,7 @@
|| (!defined(__MWERKS__) && !defined(__EDG_VERSION__)))
# define ASIO_MSVC _MSC_VER
# endif // defined(ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
-#endif // defined(ASIO_MSVC)
+#endif // !defined(ASIO_MSVC)
// Clang / libc++ detection.
#if defined(__clang__)
@@ -83,375 +113,323 @@
# endif // (__cplusplus >= 201103)
#endif // defined(__clang__)
-// Support move construction and assignment on compilers known to allow it.
-#if !defined(ASIO_HAS_MOVE)
-# if !defined(ASIO_DISABLE_MOVE)
-# if defined(__clang__)
-# if __has_feature(__cxx_rvalue_references__)
-# define ASIO_HAS_MOVE 1
-# endif // __has_feature(__cxx_rvalue_references__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_MOVE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_MOVE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_MOVE)
-#endif // !defined(ASIO_HAS_MOVE)
+// Android platform detection.
+#if defined(__ANDROID__)
+# include <android/api-level.h>
+#endif // defined(__ANDROID__)
-// If ASIO_MOVE_CAST isn't defined, and move support is available, define
-// ASIO_MOVE_ARG and ASIO_MOVE_CAST to take advantage of rvalue
-// references and perfect forwarding.
-#if defined(ASIO_HAS_MOVE) && !defined(ASIO_MOVE_CAST)
+// Always enabled. Retained for backwards compatibility in user code.
+#if !defined(ASIO_DISABLE_CXX11_MACROS)
+# define ASIO_HAS_MOVE 1
# define ASIO_MOVE_ARG(type) type&&
# define ASIO_MOVE_ARG2(type1, type2) type1, type2&&
+# define ASIO_NONDEDUCED_MOVE_ARG(type) type&
# define ASIO_MOVE_CAST(type) static_cast<type&&>
# define ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
-#endif // defined(ASIO_HAS_MOVE) && !defined(ASIO_MOVE_CAST)
-
-// If ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible
-// implementation. Note that older g++ and MSVC versions don't like it when you
-// pass a non-member function through a const reference, so for most compilers
-// we'll play it safe and stick with the old approach of passing the handler by
-// value.
-#if !defined(ASIO_MOVE_CAST)
+# define ASIO_MOVE_OR_LVALUE(type) static_cast<type&&>
+# define ASIO_MOVE_OR_LVALUE_ARG(type) type&&
+# define ASIO_MOVE_OR_LVALUE_TYPE(type) type
+# define ASIO_DELETED = delete
+# define ASIO_HAS_VARIADIC_TEMPLATES 1
+# define ASIO_HAS_CONSTEXPR 1
+# define ASIO_STATIC_CONSTEXPR(type, assignment) \
+ static constexpr type assignment
+# define ASIO_HAS_NOEXCEPT 1
+# define ASIO_NOEXCEPT noexcept(true)
+# define ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
+# define ASIO_NOEXCEPT_IF(c) noexcept(c)
+# define ASIO_HAS_DECLTYPE 1
+# define ASIO_AUTO_RETURN_TYPE_PREFIX(t) auto
+# define ASIO_AUTO_RETURN_TYPE_PREFIX2(t0, t1) auto
+# define ASIO_AUTO_RETURN_TYPE_PREFIX3(t0, t1, t2) auto
+# define ASIO_AUTO_RETURN_TYPE_SUFFIX(expr) -> decltype expr
+# define ASIO_HAS_ALIAS_TEMPLATES 1
+# define ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
+# define ASIO_HAS_ENUM_CLASS 1
+# define ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1
+# define ASIO_LVALUE_REF_QUAL &
+# define ASIO_RVALUE_REF_QUAL &&
+# define ASIO_HAS_USER_DEFINED_LITERALS 1
+# define ASIO_HAS_ALIGNOF 1
+# define ASIO_ALIGNOF(T) alignof(T)
+# define ASIO_HAS_STD_ALIGN 1
+# define ASIO_HAS_STD_SYSTEM_ERROR 1
+# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
+# define ASIO_HAS_STD_ARRAY 1
+# define ASIO_HAS_STD_SHARED_PTR 1
+# define ASIO_HAS_STD_ALLOCATOR_ARG 1
+# define ASIO_HAS_STD_ATOMIC 1
+# define ASIO_HAS_STD_CHRONO 1
+# define ASIO_HAS_STD_ADDRESSOF 1
+# define ASIO_HAS_STD_FUNCTION 1
+# define ASIO_HAS_STD_REFERENCE_WRAPPER 1
+# define ASIO_HAS_STD_TYPE_TRAITS 1
+# define ASIO_HAS_NULLPTR 1
+# define ASIO_HAS_CXX11_ALLOCATORS 1
+# define ASIO_HAS_CSTDINT 1
+# define ASIO_HAS_STD_THREAD 1
+# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
+# define ASIO_HAS_STD_CALL_ONCE 1
+# define ASIO_HAS_STD_FUTURE 1
+# define ASIO_HAS_STD_TUPLE 1
+# define ASIO_HAS_STD_IOSTREAM_MOVE 1
+# define ASIO_HAS_STD_EXCEPTION_PTR 1
+# define ASIO_HAS_STD_NESTED_EXCEPTION 1
+# define ASIO_HAS_STD_HASH 1
+#endif // !defined(ASIO_DISABLE_CXX11_MACROS)
+
+// Support for static constexpr with default initialisation.
+#if !defined(ASIO_STATIC_CONSTEXPR_DEFAULT_INIT)
# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# define ASIO_MOVE_ARG(type) const type&
-# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# define ASIO_MOVE_ARG(type) type
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
+# if (__GNUC__ >= 8)
+# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
+ static constexpr const type name{}
+# else // (__GNUC__ >= 8)
+# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
+ static const type name
+# endif // (__GNUC__ >= 8)
# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1400)
-# define ASIO_MOVE_ARG(type) const type&
-# else // (_MSC_VER >= 1400)
-# define ASIO_MOVE_ARG(type) type
-# endif // (_MSC_VER >= 1400)
-# else
-# define ASIO_MOVE_ARG(type) type
-# endif
-# define ASIO_MOVE_CAST(type) static_cast<const type&>
-# define ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&>
-#endif // !defined(ASIO_MOVE_CAST)
-
-// Support variadic templates on compilers known to allow it.
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# if !defined(ASIO_DISABLE_VARIADIC_TEMPLATES)
-# if defined(__clang__)
-# if __has_feature(__cxx_variadic_templates__)
-# define ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // __has_feature(__cxx_variadic_templates__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# endif // !defined(ASIO_DISABLE_VARIADIC_TEMPLATES)
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
+# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
+ static const type name
+# else // defined(ASIO_MSVC)
+# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
+ static constexpr const type name{}
+# endif // defined(ASIO_MSVC)
+#endif // !defined(ASIO_STATIC_CONSTEXPR_DEFAULT_INIT)
-// Support deleted functions on compilers known to allow it.
-#if !defined(ASIO_DELETED)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_DELETED = delete
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(__clang__)
-# if __has_feature(__cxx_deleted_functions__)
-# define ASIO_DELETED = delete
-# endif // __has_feature(__cxx_deleted_functions__)
-# endif // defined(__clang__)
-# if !defined(ASIO_DELETED)
-# define ASIO_DELETED
-# endif // !defined(ASIO_DELETED)
-#endif // !defined(ASIO_DELETED)
-
-// Support constexpr on compilers known to allow it.
-#if !defined(ASIO_HAS_CONSTEXPR)
-# if !defined(ASIO_DISABLE_CONSTEXPR)
+// Support noexcept on function types on compilers known to allow it.
+#if !defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+# if !defined(ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE)
# if defined(__clang__)
-# if __has_feature(__cxx_constexpr__)
-# define ASIO_HAS_CONSTEXPR 1
-# endif // __has_feature(__cxx_constexr__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_CONSTEXPR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# endif // !defined(ASIO_DISABLE_CONSTEXPR)
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-#if !defined(ASIO_CONSTEXPR)
-# if defined(ASIO_HAS_CONSTEXPR)
-# define ASIO_CONSTEXPR constexpr
-# else // defined(ASIO_HAS_CONSTEXPR)
-# define ASIO_CONSTEXPR
-# endif // defined(ASIO_HAS_CONSTEXPR)
-#endif // !defined(ASIO_CONSTEXPR)
-
-// Support noexcept on compilers known to allow it.
-#if !defined(ASIO_NOEXCEPT)
-# if !defined(ASIO_DISABLE_NOEXCEPT)
-# if (BOOST_VERSION >= 105300)
-# define ASIO_NOEXCEPT BOOST_NOEXCEPT
-# define ASIO_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
-# elif defined(__clang__)
-# if __has_feature(__cxx_noexcept__)
-# define ASIO_NOEXCEPT noexcept(true)
-# define ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# endif // __has_feature(__cxx_noexcept__)
+# if (__cplusplus >= 202002)
+# define ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
+# endif // (__cplusplus >= 202002)
# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_NOEXCEPT noexcept(true)
-# define ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if (__cplusplus >= 202002)
+# define ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
+# endif // (__cplusplus >= 202002)
# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_NOEXCEPT noexcept(true)
-# define ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_NOEXCEPT)
-# if !defined(ASIO_NOEXCEPT)
-# define ASIO_NOEXCEPT
-# endif // !defined(ASIO_NOEXCEPT)
-# if !defined(ASIO_NOEXCEPT_OR_NOTHROW)
-# define ASIO_NOEXCEPT_OR_NOTHROW throw()
-# endif // !defined(ASIO_NOEXCEPT_OR_NOTHROW)
-#endif // !defined(ASIO_NOEXCEPT)
-
-// Support automatic type deduction on compilers known to support it.
-#if !defined(ASIO_HAS_DECLTYPE)
-# if !defined(ASIO_DISABLE_DECLTYPE)
-# if defined(__clang__)
-# if __has_feature(__cxx_decltype__)
-# define ASIO_HAS_DECLTYPE 1
-# endif // __has_feature(__cxx_decltype__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_DECLTYPE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_DECLTYPE 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSC_VER >= 1900 && _MSVC_LANG >= 202002)
+# define ASIO_HAS_NOEXCEPT_FUNCTION_TYPE 1
+# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 202002)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_DECLTYPE)
-#endif // !defined(ASIO_HAS_DECLTYPE)
+# endif // !defined(ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE)
+#endif // !defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-// Standard library support for system errors.
-#if !defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# if !defined(ASIO_DISABLE_STD_SYSTEM_ERROR)
+// Support return type deduction on compilers known to allow it.
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+# if !defined(ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<system_error>)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // __has_include(<system_error>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // (_MSC_VER >= 1700)
+# if __has_feature(__cxx_return_type_deduction__)
+# define ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+# endif // __has_feature(__cxx_return_type_deduction__)
+# elif (__cplusplus >= 201402)
+# define ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+# elif defined(__cpp_return_type_deduction)
+# if (__cpp_return_type_deduction >= 201304)
+# define ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+# endif // (__cpp_return_type_deduction >= 201304)
+# elif defined(ASIO_MSVC)
+# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201402)
+# define ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201402)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_SYSTEM_ERROR)
-#endif // !defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-// Compliant C++11 compilers put noexcept specifiers on error_category members.
-#if !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-# if (BOOST_VERSION >= 105300)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT
-# elif defined(__clang__)
-# if __has_feature(__cxx_noexcept__)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // __has_feature(__cxx_noexcept__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# if !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT
-# endif // !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-#endif // !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-
-// Standard library support for arrays.
-#if !defined(ASIO_HAS_STD_ARRAY)
-# if !defined(ASIO_DISABLE_STD_ARRAY)
+# endif // !defined(ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+// Support concepts on compilers known to allow them.
+#if !defined(ASIO_HAS_CONCEPTS)
+# if !defined(ASIO_DISABLE_CONCEPTS)
+# if defined(__cpp_concepts)
+# define ASIO_HAS_CONCEPTS 1
+# if (__cpp_concepts >= 201707)
+# define ASIO_CONCEPT concept
+# else // (__cpp_concepts >= 201707)
+# define ASIO_CONCEPT concept bool
+# endif // (__cpp_concepts >= 201707)
+# endif // defined(__cpp_concepts)
+# endif // !defined(ASIO_DISABLE_CONCEPTS)
+#endif // !defined(ASIO_HAS_CONCEPTS)
+
+// Support concepts on compilers known to allow them.
+#if !defined(ASIO_HAS_STD_CONCEPTS)
+# if !defined(ASIO_DISABLE_STD_CONCEPTS)
+# if defined(ASIO_HAS_CONCEPTS)
+# if (__cpp_lib_concepts >= 202002L)
+# define ASIO_HAS_STD_CONCEPTS 1
+# endif // (__cpp_concepts >= 202002L)
+# endif // defined(ASIO_HAS_CONCEPTS)
+# endif // !defined(ASIO_DISABLE_STD_CONCEPTS)
+#endif // !defined(ASIO_HAS_STD_CONCEPTS)
+
+// Support template variables on compilers known to allow it.
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+# if !defined(ASIO_DISABLE_VARIABLE_TEMPLATES)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ARRAY 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<array>)
-# define ASIO_HAS_STD_ARRAY 1
-# endif // __has_include(<array>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ARRAY 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
+# if (__cplusplus >= 201402)
+# if __has_feature(__cxx_variable_templates__)
+# define ASIO_HAS_VARIABLE_TEMPLATES 1
+# endif // __has_feature(__cxx_variable_templates__)
+# endif // (__cplusplus >= 201402)
+# elif defined(__GNUC__) && !defined(__INTEL_COMPILER)
+# if (__GNUC__ >= 6)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_VARIABLE_TEMPLATES 1
+# endif // (__cplusplus >= 201402)
+# endif // (__GNUC__ >= 6)
+# endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define ASIO_HAS_STD_ARRAY 1
-# endif // (_MSC_VER >= 1600)
+# if (_MSC_VER >= 1901)
+# define ASIO_HAS_VARIABLE_TEMPLATES 1
+# endif // (_MSC_VER >= 1901)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ARRAY)
-#endif // !defined(ASIO_HAS_STD_ARRAY)
+# endif // !defined(ASIO_DISABLE_VARIABLE_TEMPLATES)
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
-// Standard library support for shared_ptr and weak_ptr.
-#if !defined(ASIO_HAS_STD_SHARED_PTR)
-# if !defined(ASIO_DISABLE_STD_SHARED_PTR)
+// Support SFINAEd template variables on compilers known to allow it.
+#if !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+# if !defined(ASIO_DISABLE_SFINAE_VARIABLE_TEMPLATES)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201703)
+# if __has_feature(__cxx_variable_templates__)
+# define ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
+# endif // __has_feature(__cxx_variable_templates__)
+# endif // (__cplusplus >= 201703)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 8) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 8)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
+# endif // (__cplusplus >= 201402)
+# endif // ((__GNUC__ == 8) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 8)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# endif // (_MSC_VER >= 1600)
+# if (_MSC_VER >= 1901)
+# define ASIO_HAS_SFINAE_VARIABLE_TEMPLATES 1
+# endif // (_MSC_VER >= 1901)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_SHARED_PTR)
-#endif // !defined(ASIO_HAS_STD_SHARED_PTR)
+# endif // !defined(ASIO_DISABLE_SFINAE_VARIABLE_TEMPLATES)
+#endif // !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-// Standard library support for allocator_arg_t.
-#if !defined(ASIO_HAS_STD_ALLOCATOR_ARG)
-# if !defined(ASIO_DISABLE_STD_ALLOCATOR_ARG)
+// Support SFINAE use of constant expressions on compilers known to allow it.
+#if !defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
+# if !defined(ASIO_DISABLE_CONSTANT_EXPRESSION_SFINAE)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
+# endif // (__cplusplus >= 201402)
+# elif defined(__GNUC__) && !defined(__INTEL_COMPILER)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
+# endif // (__cplusplus >= 201402)
+# endif // (__GNUC__ >= 7)
+# endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (_MSC_VER >= 1600)
+# if (_MSC_VER >= 1901)
+# define ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1
+# endif // (_MSC_VER >= 1901)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ALLOCATOR_ARG)
-#endif // !defined(ASIO_HAS_STD_ALLOCATOR_ARG)
+# endif // !defined(ASIO_DISABLE_CONSTANT_EXPRESSION_SFINAE)
+#endif // !defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
-// Standard library support for atomic operations.
-#if !defined(ASIO_HAS_STD_ATOMIC)
-# if !defined(ASIO_DISABLE_STD_ATOMIC)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ATOMIC 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<atomic>)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // __has_include(<atomic>)
+// Enable workarounds for lack of working expression SFINAE.
+#if !defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# if !defined(ASIO_DISABLE_WORKING_EXPRESSION_SFINAE)
+# if !defined(ASIO_MSVC) && !defined(__INTEL_COMPILER)
+# if (__cplusplus >= 201103)
+# define ASIO_HAS_WORKING_EXPRESSION_SFINAE 1
# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
+# elif defined(ASIO_MSVC) && (_MSC_VER >= 1929)
+# if (_MSVC_LANG >= 202000)
+# define ASIO_HAS_WORKING_EXPRESSION_SFINAE 1
+# endif // (_MSVC_LANG >= 202000)
+# endif // defined(ASIO_MSVC) && (_MSC_VER >= 1929)
+# endif // !defined(ASIO_DISABLE_WORKING_EXPRESSION_SFINAE)
+#endif // !defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+// Support for capturing parameter packs in lambdas.
+#if !defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+# if !defined(ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ATOMIC)
-#endif // !defined(ASIO_HAS_STD_ATOMIC)
-
-// Standard library support for chrono. Some standard libraries (such as the
-// libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x
-// drafts, rather than the eventually standardised name of steady_clock.
-#if !defined(ASIO_HAS_STD_CHRONO)
-# if !defined(ASIO_DISABLE_STD_CHRONO)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_CHRONO 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<chrono>)
-# define ASIO_HAS_STD_CHRONO 1
-# endif // __has_include(<chrono>)
+# if (__GNUC__ >= 6)
+# define ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
+# endif // (__GNUC__ >= 6)
+# elif defined(ASIO_MSVC)
+# if (_MSVC_LANG >= 201103)
+# define ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
+# endif // (_MSC_LANG >= 201103)
+# else // defined(ASIO_MSVC)
+# if (__cplusplus >= 201103)
+# define ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_CHRONO 1
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-# define ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_CHRONO 1
-# endif // (_MSC_VER >= 1700)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_CHRONO)
-#endif // !defined(ASIO_HAS_STD_CHRONO)
+# endif // !defined(ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
+#endif // !defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+
+// Default alignment.
+#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+# define ASIO_DEFAULT_ALIGN __STDCPP_DEFAULT_NEW_ALIGNMENT__
+#elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+# define ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
+# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+# define ASIO_DEFAULT_ALIGN alignof(max_align_t)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+#else // defined(__GNUC__)
+# define ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
+#endif // defined(__GNUC__)
+
+// Standard library support for aligned allocation.
+#if !defined(ASIO_HAS_STD_ALIGNED_ALLOC)
+# if !defined(ASIO_DISABLE_STD_ALIGNED_ALLOC)
+# if (__cplusplus >= 201703)
+# if defined(__clang__)
+# if defined(ASIO_HAS_CLANG_LIBCXX)
+# if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) \
+ && !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
+# if defined(__APPLE__)
+# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+# elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+# if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+# elif defined(__TV_OS_VERSION_MIN_REQUIRED)
+# if (__TV_OS_VERSION_MIN_REQUIRED >= 130000)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__TV_OS_VERSION_MIN_REQUIRED >= 130000)
+# elif defined(__WATCH_OS_VERSION_MIN_REQUIRED)
+# if (__WATCH_OS_VERSION_MIN_REQUIRED >= 60000)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__WATCH_OS_VERSION_MIN_REQUIRED >= 60000)
+# endif // defined(__WATCH_OS_X_VERSION_MIN_REQUIRED)
+# else // defined(__APPLE__)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // defined(__APPLE__)
+# endif // (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
+ // && !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
+# elif defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 7)
+# if defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# endif // ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 7)
+# endif // defined(__GNUC__)
+# endif // (__cplusplus >= 201703)
+# endif // !defined(ASIO_DISABLE_STD_ALIGNED_ALLOC)
+#endif // !defined(ASIO_HAS_STD_ALIGNED_ALLOC)
// Boost support for chrono.
#if !defined(ASIO_HAS_BOOST_CHRONO)
# if !defined(ASIO_DISABLE_BOOST_CHRONO)
-# if (BOOST_VERSION >= 104700)
+# if defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700)
# define ASIO_HAS_BOOST_CHRONO 1
-# endif // (BOOST_VERSION >= 104700)
+# endif // defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 104700)
# endif // !defined(ASIO_DISABLE_BOOST_CHRONO)
#endif // !defined(ASIO_HAS_BOOST_CHRONO)
@@ -471,276 +449,250 @@
# endif // !defined(ASIO_DISABLE_BOOST_DATE_TIME)
#endif // !defined(ASIO_HAS_BOOST_DATE_TIME)
-// Standard library support for addressof.
-#if !defined(ASIO_HAS_STD_ADDRESSOF)
-# if !defined(ASIO_DISABLE_STD_ADDRESSOF)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ADDRESSOF)
-#endif // !defined(ASIO_HAS_STD_ADDRESSOF)
+// Boost support for the Coroutine library.
+#if !defined(ASIO_HAS_BOOST_COROUTINE)
+# if !defined(ASIO_DISABLE_BOOST_COROUTINE)
+# define ASIO_HAS_BOOST_COROUTINE 1
+# endif // !defined(ASIO_DISABLE_BOOST_COROUTINE)
+#endif // !defined(ASIO_HAS_BOOST_COROUTINE)
-// Standard library support for the function class.
-#if !defined(ASIO_HAS_STD_FUNCTION)
-# if !defined(ASIO_DISABLE_STD_FUNCTION)
+// Boost support for the Context library's fibers.
+#if !defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# if !defined(ASIO_DISABLE_BOOST_CONTEXT_FIBER)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_FUNCTION 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_FUNCTION 1
+# if (__cplusplus >= 201103)
+# define ASIO_HAS_BOOST_CONTEXT_FIBER 1
# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_FUNCTION 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define ASIO_HAS_BOOST_CONTEXT_FIBER 1
+# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_FUNCTION 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSVC_LANG >= 201103)
+# define ASIO_HAS_BOOST_CONTEXT_FIBER 1
+# endif // (_MSC_LANG >= 201103)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_FUNCTION)
-#endif // !defined(ASIO_HAS_STD_FUNCTION)
+# endif // !defined(ASIO_DISABLE_BOOST_CONTEXT_FIBER)
+#endif // !defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
-// Standard library support for type traits.
-#if !defined(ASIO_HAS_STD_TYPE_TRAITS)
-# if !defined(ASIO_DISABLE_STD_TYPE_TRAITS)
+// Standard library support for std::string_view.
+#if !defined(ASIO_HAS_STD_STRING_VIEW)
+# if !defined(ASIO_DISABLE_STD_STRING_VIEW)
# if defined(__clang__)
# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<type_traits>)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // __has_include(<type_traits>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_TYPE_TRAITS)
-#endif // !defined(ASIO_HAS_STD_TYPE_TRAITS)
-
-// Standard library support for the nullptr_t type.
-#if !defined(ASIO_HAS_NULLPTR)
-# if !defined(ASIO_DISABLE_NULLPTR)
-# if defined(__clang__)
-# if __has_feature(__cxx_nullptr__)
-# define ASIO_HAS_NULLPTR 1
-# endif // __has_feature(__cxx_rvalue_references__)
+# if (__cplusplus >= 201402)
+# if __has_include(<string_view>)
+# define ASIO_HAS_STD_STRING_VIEW 1
+# endif // __has_include(<string_view>)
+# endif // (__cplusplus >= 201402)
+# else // defined(ASIO_HAS_CLANG_LIBCXX)
+# if (__cplusplus >= 201703)
+# if __has_include(<string_view>)
+# define ASIO_HAS_STD_STRING_VIEW 1
+# endif // __has_include(<string_view>)
+# endif // (__cplusplus >= 201703)
+# endif // defined(ASIO_HAS_CLANG_LIBCXX)
# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_NULLPTR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_NULLPTR 1
-# endif // (_MSC_VER >= 1700)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201703)
+# define ASIO_HAS_STD_STRING_VIEW 1
+# endif // (__cplusplus >= 201703)
+# endif // (__GNUC__ >= 7)
+# elif defined(ASIO_MSVC)
+# if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
+# define ASIO_HAS_STD_STRING_VIEW 1
+# endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_NULLPTR)
-#endif // !defined(ASIO_HAS_NULLPTR)
+# endif // !defined(ASIO_DISABLE_STD_STRING_VIEW)
+#endif // !defined(ASIO_HAS_STD_STRING_VIEW)
-// Standard library support for the cstdint header.
-#if !defined(ASIO_HAS_CSTDINT)
-# if !defined(ASIO_DISABLE_CSTDINT)
+// Standard library support for std::experimental::string_view.
+#if !defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# if !defined(ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
# if defined(__clang__)
# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_CSTDINT 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_CSTDINT 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_CSTDINT 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# if (_LIBCPP_VERSION < 7000)
+# if (__cplusplus >= 201402)
+# if __has_include(<experimental/string_view>)
+# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+# endif // __has_include(<experimental/string_view>)
+# endif // (__cplusplus >= 201402)
+# endif // (_LIBCPP_VERSION < 7000)
+# else // defined(ASIO_HAS_CLANG_LIBCXX)
+# if (__cplusplus >= 201402)
+# if __has_include(<experimental/string_view>)
+# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+# endif // __has_include(<experimental/string_view>)
+# endif // (__cplusplus >= 201402)
+# endif // // defined(ASIO_HAS_CLANG_LIBCXX)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+# endif // (__cplusplus >= 201402)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
# endif // defined(__GNUC__)
+# endif // !defined(ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
+#endif // !defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+
+// Standard library has a string_view that we can use.
+#if !defined(ASIO_HAS_STRING_VIEW)
+# if !defined(ASIO_DISABLE_STRING_VIEW)
+# if defined(ASIO_HAS_STD_STRING_VIEW)
+# define ASIO_HAS_STRING_VIEW 1
+# elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# define ASIO_HAS_STRING_VIEW 1
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# endif // !defined(ASIO_DISABLE_STRING_VIEW)
+#endif // !defined(ASIO_HAS_STRING_VIEW)
+
+// Standard library has invoke_result (which supersedes result_of).
+#if !defined(ASIO_HAS_STD_INVOKE_RESULT)
+# if !defined(ASIO_DISABLE_STD_INVOKE_RESULT)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_CSTDINT 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
+# define ASIO_HAS_STD_INVOKE_RESULT 1
+# endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
+# else // defined(ASIO_MSVC)
+# if (__cplusplus >= 201703)
+# define ASIO_HAS_STD_INVOKE_RESULT 1
+# endif // (__cplusplus >= 201703)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_CSTDINT)
-#endif // !defined(ASIO_HAS_CSTDINT)
+# endif // !defined(ASIO_DISABLE_STD_INVOKE_RESULT)
+#endif // !defined(ASIO_HAS_STD_INVOKE_RESULT)
-// Standard library support for the thread class.
-#if !defined(ASIO_HAS_STD_THREAD)
-# if !defined(ASIO_DISABLE_STD_THREAD)
+// Standard library support for std::any.
+#if !defined(ASIO_HAS_STD_ANY)
+# if !defined(ASIO_DISABLE_STD_ANY)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_THREAD 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<thread>)
-# define ASIO_HAS_STD_THREAD 1
-# endif // __has_include(<thread>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_THREAD 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201703)
+# if __has_include(<any>)
+# define ASIO_HAS_STD_ANY 1
+# endif // __has_include(<any>)
+# endif // (__cplusplus >= 201703)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201703)
+# define ASIO_HAS_STD_ANY 1
+# endif // (__cplusplus >= 201703)
+# endif // (__GNUC__ >= 7)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_THREAD 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
+# define ASIO_HAS_STD_ANY 1
+# endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_THREAD)
-#endif // !defined(ASIO_HAS_STD_THREAD)
+# endif // !defined(ASIO_DISABLE_STD_ANY)
+#endif // !defined(ASIO_HAS_STD_ANY)
-// Standard library support for the mutex and condition variable classes.
-#if !defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# if !defined(ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
+// Standard library support for std::variant.
+#if !defined(ASIO_HAS_STD_VARIANT)
+# if !defined(ASIO_DISABLE_STD_VARIANT)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<mutex>)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201703)
+# if __has_include(<variant>)
+# define ASIO_HAS_STD_VARIANT 1
+# endif // __has_include(<variant>)
+# endif // (__cplusplus >= 201703)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201703)
+# define ASIO_HAS_STD_VARIANT 1
+# endif // (__cplusplus >= 201703)
+# endif // (__GNUC__ >= 7)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
+# define ASIO_HAS_STD_VARIANT 1
+# endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
-#endif // !defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
-// Standard library support for the call_once function.
-#if !defined(ASIO_HAS_STD_CALL_ONCE)
-# if !defined(ASIO_DISABLE_STD_CALL_ONCE)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<mutex>)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
+# endif // !defined(ASIO_DISABLE_STD_VARIANT)
+#endif // !defined(ASIO_HAS_STD_VARIANT)
+
+// Standard library support for std::source_location.
+#if !defined(ASIO_HAS_STD_SOURCE_LOCATION)
+# if !defined(ASIO_DISABLE_STD_SOURCE_LOCATION)
+// ...
+# endif // !defined(ASIO_DISABLE_STD_SOURCE_LOCATION)
+#endif // !defined(ASIO_HAS_STD_SOURCE_LOCATION)
+
+// Standard library support for std::experimental::source_location.
+#if !defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+# if !defined(ASIO_DISABLE_STD_EXPERIMENTAL_SOURCE_LOCATION)
# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201709)
+# if __has_include(<experimental/source_location>)
+# define ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION 1
+# endif // __has_include(<experimental/source_location>)
+# endif // (__cplusplus >= 201709)
# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_CALL_ONCE)
-#endif // !defined(ASIO_HAS_STD_CALL_ONCE)
-
-// Standard library support for futures.
-#if !defined(ASIO_HAS_STD_FUTURE)
-# if !defined(ASIO_DISABLE_STD_FUTURE)
+# endif // !defined(ASIO_DISABLE_STD_EXPERIMENTAL_SOURCE_LOCATION)
+#endif // !defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+
+// Standard library has a source_location that we can use.
+#if !defined(ASIO_HAS_SOURCE_LOCATION)
+# if !defined(ASIO_DISABLE_SOURCE_LOCATION)
+# if defined(ASIO_HAS_STD_SOURCE_LOCATION)
+# define ASIO_HAS_SOURCE_LOCATION 1
+# elif defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+# define ASIO_HAS_SOURCE_LOCATION 1
+# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+# endif // !defined(ASIO_DISABLE_SOURCE_LOCATION)
+#endif // !defined(ASIO_HAS_SOURCE_LOCATION)
+
+// Boost support for source_location and system errors.
+#if !defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+# if !defined(ASIO_DISABLE_BOOST_SOURCE_LOCATION)
+# if defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 107900)
+# define ASIO_HAS_BOOST_SOURCE_LOCATION 1
+# endif // defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 107900)
+# endif // !defined(ASIO_DISABLE_BOOST_SOURCE_LOCATION)
+#endif // !defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+
+// Helper macros for working with Boost source locations.
+#if defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+# define ASIO_SOURCE_LOCATION_PARAM \
+ , const boost::source_location& loc
+# define ASIO_SOURCE_LOCATION_DEFAULTED_PARAM \
+ , const boost::source_location& loc = BOOST_CURRENT_LOCATION
+# define ASIO_SOURCE_LOCATION_ARG , loc
+#else // if defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+# define ASIO_SOURCE_LOCATION_PARAM
+# define ASIO_SOURCE_LOCATION_DEFAULTED_PARAM
+# define ASIO_SOURCE_LOCATION_ARG
+#endif // if defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+
+// Standard library support for std::index_sequence.
+#if !defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+# if !defined(ASIO_DISABLE_STD_INDEX_SEQUENCE)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_FUTURE 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<future>)
-# define ASIO_HAS_STD_FUTURE 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_FUTURE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_STD_INDEX_SEQUENCE 1
+# endif // (__cplusplus >= 201402)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_STD_INDEX_SEQUENCE 1
+# endif // (__cplusplus >= 201402)
+# endif // (__GNUC__ >= 7)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_FUTURE 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201402)
+# define ASIO_HAS_STD_INDEX_SEQUENCE 1
+# endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201402)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_FUTURE)
-#endif // !defined(ASIO_HAS_STD_FUTURE)
-
-// Standard library support for experimental::string_view.
-#if !defined(ASIO_HAS_STD_STRING_VIEW)
-# if !defined(ASIO_DISABLE_STD_STRING_VIEW)
-# if defined(__clang__)
-# if (__cplusplus >= 201103)
-# ifdef _LIBCPP_VERSION
-# if _LIBCPP_VERSION >= 8000
-# define ASIO_HAS_STD_STRING_VIEW 1
-# endif
-# endif
-# if !defined(ASIO_HAS_STD_STRING_VIEW) && __has_include(<experimental/string_view>)
-# define ASIO_HAS_STD_STRING_VIEW 1
-# if defined(__APPLE__)
-# if ((__clang_major__ < 10) || ((__clang_major__ == 10) && (__clang_minor__ == 0) && (__clang_patchlevel__ < 1)))
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
-# endif // clang < 10.0.1
-# else // for non-Xcode Clang
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
-# endif
-# endif // __has_include(<experimental/string_view>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201300)
-# define ASIO_HAS_STD_STRING_VIEW 1
-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
-# endif // (__cplusplus >= 201300)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# endif // !defined(ASIO_DISABLE_STD_STRING_VIEW)
-#endif // !defined(ASIO_HAS_STD_STRING_VIEW)
+# endif // !defined(ASIO_DISABLE_STD_INDEX_SEQUENCE)
+#endif // !defined(ASIO_HAS_STD_INDEX_SEQUENCE)
// Windows App target. Windows but with a limited API.
#if !defined(ASIO_WINDOWS_APP)
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
# include <winapifamily.h>
-# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
+# if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
+ || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)) \
&& !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
# define ASIO_WINDOWS_APP 1
# endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
@@ -778,18 +730,18 @@
// Windows: target OS version.
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
# if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
-# if defined(_MSC_VER) || defined(__BORLANDC__)
+# if defined(_MSC_VER) || (defined(__BORLANDC__) && !defined(__clang__))
# pragma message( \
"Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\
- "- add -D_WIN32_WINNT=0x0501 to the compiler command line; or\n"\
- "- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.\n"\
- "Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).")
-# else // defined(_MSC_VER) || defined(__BORLANDC__)
+ "- add -D_WIN32_WINNT=0x0601 to the compiler command line; or\n"\
+ "- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.\n"\
+ "Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).")
+# else // defined(_MSC_VER) || (defined(__BORLANDC__) && !defined(__clang__))
# warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
-# warning For example, add -D_WIN32_WINNT=0x0501 to the compiler command line.
-# warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
-# endif // defined(_MSC_VER) || defined(__BORLANDC__)
-# define _WIN32_WINNT 0x0501
+# warning For example, add -D_WIN32_WINNT=0x0601 to the compiler command line.
+# warning Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
+# endif // defined(_MSC_VER) || (defined(__BORLANDC__) && !defined(__clang__))
+# define _WIN32_WINNT 0x0601
# endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
# if defined(_MSC_VER)
# if defined(_WIN32) && !defined(WIN32)
@@ -860,7 +812,8 @@
|| defined(__FreeBSD__) \
|| defined(__NetBSD__) \
|| defined(__OpenBSD__) \
- || defined(__linux__)
+ || defined(__linux__) \
+ || defined(__HAIKU__)
# define ASIO_HAS_UNISTD_H 1
# endif
# endif // !defined(ASIO_HAS_BOOST_CONFIG)
@@ -869,7 +822,7 @@
# include <unistd.h>
#endif // defined(ASIO_HAS_UNISTD_H)
-// Linux: epoll, eventfd and timerfd.
+// Linux: epoll, eventfd, timerfd and io_uring.
#if defined(__linux__)
# include <linux/version.h>
# if !defined(ASIO_HAS_EPOLL)
@@ -893,8 +846,20 @@
# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
# endif // defined(ASIO_HAS_EPOLL)
# endif // !defined(ASIO_HAS_TIMERFD)
+# if defined(ASIO_HAS_IO_URING)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
+# error Linux kernel 5.10 or later is required to support io_uring
+# endif // LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
+# endif // defined(ASIO_HAS_IO_URING)
#endif // defined(__linux__)
+// Linux: io_uring is used instead of epoll.
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# if !defined(ASIO_HAS_EPOLL) && defined(ASIO_HAS_IO_URING)
+# define ASIO_HAS_IO_URING_AS_DEFAULT 1
+# endif // !defined(ASIO_HAS_EPOLL) && defined(ASIO_HAS_IO_URING)
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
// Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue.
#if (defined(__MACH__) && defined(__APPLE__)) \
|| defined(__FreeBSD__) \
@@ -990,16 +955,40 @@
// UNIX domain sockets.
#if !defined(ASIO_HAS_LOCAL_SOCKETS)
# if !defined(ASIO_DISABLE_LOCAL_SOCKETS)
-# if !defined(ASIO_WINDOWS) \
- && !defined(ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
+# if !defined(ASIO_WINDOWS_RUNTIME)
# define ASIO_HAS_LOCAL_SOCKETS 1
-# endif // !defined(ASIO_WINDOWS)
- // && !defined(ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
+# endif // !defined(ASIO_WINDOWS_RUNTIME)
# endif // !defined(ASIO_DISABLE_LOCAL_SOCKETS)
#endif // !defined(ASIO_HAS_LOCAL_SOCKETS)
+// Files.
+#if !defined(ASIO_HAS_FILE)
+# if !defined(ASIO_DISABLE_FILE)
+# if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+# define ASIO_HAS_FILE 1
+# elif defined(ASIO_HAS_IO_URING)
+# define ASIO_HAS_FILE 1
+# endif // defined(ASIO_HAS_IO_URING)
+# endif // !defined(ASIO_DISABLE_FILE)
+#endif // !defined(ASIO_HAS_FILE)
+
+// Pipes.
+#if !defined(ASIO_HAS_PIPE)
+# if defined(ASIO_HAS_IOCP) \
+ || !defined(ASIO_WINDOWS) \
+ && !defined(ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+# if !defined(__SYMBIAN32__)
+# if !defined(ASIO_DISABLE_PIPE)
+# define ASIO_HAS_PIPE 1
+# endif // !defined(ASIO_DISABLE_PIPE)
+# endif // !defined(__SYMBIAN32__)
+# endif // defined(ASIO_HAS_IOCP)
+ // || !defined(ASIO_WINDOWS)
+ // && !defined(ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+#endif // !defined(ASIO_HAS_PIPE)
+
// Can use sigaction() instead of signal().
#if !defined(ASIO_HAS_SIGACTION)
# if !defined(ASIO_DISABLE_SIGACTION)
@@ -1080,6 +1069,8 @@
# define ASIO_HAS_THREADS 1
# elif defined(__APPLE__)
# define ASIO_HAS_THREADS 1
+# elif defined(__HAIKU__)
+# define ASIO_HAS_THREADS 1
# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
# define ASIO_HAS_THREADS 1
# elif defined(_PTHREADS)
@@ -1095,6 +1086,8 @@
# define ASIO_HAS_PTHREADS 1
# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
# define ASIO_HAS_PTHREADS 1
+# elif defined(__HAIKU__)
+# define ASIO_HAS_PTHREADS 1
# endif // defined(ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
# endif // defined(ASIO_HAS_THREADS)
#endif // !defined(ASIO_HAS_PTHREADS)
@@ -1113,6 +1106,15 @@
# endif // !defined(ASIO_DISABLE_BOOST_STATIC_CONSTANT)
#endif // !defined(ASIO_STATIC_CONSTANT)
+// Boost align library.
+#if !defined(ASIO_HAS_BOOST_ALIGN)
+# if !defined(ASIO_DISABLE_BOOST_ALIGN)
+# if defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105600)
+# define ASIO_HAS_BOOST_ALIGN 1
+# endif // defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105600)
+# endif // !defined(ASIO_DISABLE_BOOST_ALIGN)
+#endif // !defined(ASIO_HAS_BOOST_ALIGN)
+
// Boost array library.
#if !defined(ASIO_HAS_BOOST_ARRAY)
# if !defined(ASIO_DISABLE_BOOST_ARRAY)
@@ -1182,13 +1184,13 @@
# if (__GNUC__ >= 3)
# define ASIO_HAS_HANDLER_HOOKS 1
# endif // (__GNUC__ >= 3)
-# elif !defined(__BORLANDC__)
+# elif !defined(__BORLANDC__) || defined(__clang__)
# define ASIO_HAS_HANDLER_HOOKS 1
-# endif // !defined(__BORLANDC__)
+# endif // !defined(__BORLANDC__) || defined(__clang__)
# endif // !defined(ASIO_DISABLE_HANDLER_HOOKS)
#endif // !defined(ASIO_HAS_HANDLER_HOOKS)
-// Support for the __thread keyword extension.
+// Support for the __thread keyword extension, or equivalent.
#if !defined(ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
# if defined(__linux__)
# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
@@ -1210,6 +1212,22 @@
# define ASIO_THREAD_KEYWORD __declspec(thread)
# endif // (_MSC_VER >= 1700)
# endif // defined(ASIO_MSVC) && defined(ASIO_WINDOWS_RUNTIME)
+# if defined(__APPLE__)
+# if defined(__clang__)
+# if defined(__apple_build_version__)
+# define ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# define ASIO_THREAD_KEYWORD __thread
+# endif // defined(__apple_build_version__)
+# endif // defined(__clang__)
+# endif // defined(__APPLE__)
+# if !defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
+# if defined(ASIO_HAS_BOOST_CONFIG)
+# if !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+# define ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# define ASIO_THREAD_KEYWORD thread_local
+# endif // !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+# endif // defined(ASIO_HAS_BOOST_CONFIG)
+# endif // !defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
#endif // !defined(ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
#if !defined(ASIO_THREAD_KEYWORD)
# define ASIO_THREAD_KEYWORD __thread
@@ -1224,33 +1242,6 @@
// || (defined(__MACH__) && defined(__APPLE__))
#endif // !defined(ASIO_DISABLE_SSIZE_T)
-// Helper macros to manage the transition away from the old services-based API.
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# define ASIO_SVC_TPARAM , typename Service
-# define ASIO_SVC_TPARAM_DEF1(d1) , typename Service d1
-# define ASIO_SVC_TPARAM_DEF2(d1, d2) , typename Service d1, d2
-# define ASIO_SVC_TARG , Service
-# define ASIO_SVC_T Service
-# define ASIO_SVC_TPARAM1 , typename Service1
-# define ASIO_SVC_TPARAM1_DEF1(d1) , typename Service1 d1
-# define ASIO_SVC_TPARAM1_DEF2(d1, d2) , typename Service1 d1, d2
-# define ASIO_SVC_TARG1 , Service1
-# define ASIO_SVC_T1 Service1
-# define ASIO_SVC_ACCESS public
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# define ASIO_SVC_TPARAM
-# define ASIO_SVC_TPARAM_DEF1(d1)
-# define ASIO_SVC_TPARAM_DEF2(d1, d2)
-# define ASIO_SVC_TARG
-// ASIO_SVC_T is defined at each point of use.
-# define ASIO_SVC_TPARAM1
-# define ASIO_SVC_TPARAM1_DEF1(d1)
-# define ASIO_SVC_TPARAM1_DEF2(d1, d2)
-# define ASIO_SVC_TARG1
-// ASIO_SVC_T1 is defined at each point of use.
-# define ASIO_SVC_ACCESS protected
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
// Helper macros to manage transition away from error_code return values.
#if defined(ASIO_NO_DEPRECATED)
# define ASIO_SYNC_OP_VOID void
@@ -1260,4 +1251,172 @@
# define ASIO_SYNC_OP_VOID_RETURN(e) return e
#endif // defined(ASIO_NO_DEPRECATED)
+// Newer gcc, clang need special treatment to suppress unused typedef warnings.
+#if defined(__clang__)
+# if defined(__apple_build_version__)
+# if (__clang_major__ >= 7)
+# define ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
+# endif // (__clang_major__ >= 7)
+# elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \
+ || (__clang_major__ > 3)
+# define ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
+# endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6))
+ // || (__clang_major__ > 3)
+#elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
+# define ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
+#endif // defined(__GNUC__)
+#if !defined(ASIO_UNUSED_TYPEDEF)
+# define ASIO_UNUSED_TYPEDEF
+#endif // !defined(ASIO_UNUSED_TYPEDEF)
+
+// Some versions of gcc generate spurious warnings about unused variables.
+#if defined(__GNUC__)
+# if (__GNUC__ >= 4)
+# define ASIO_UNUSED_VARIABLE __attribute__((__unused__))
+# endif // (__GNUC__ >= 4)
+#endif // defined(__GNUC__)
+#if !defined(ASIO_UNUSED_VARIABLE)
+# define ASIO_UNUSED_VARIABLE
+#endif // !defined(ASIO_UNUSED_VARIABLE)
+
+// Helper macro to tell the optimiser what may be assumed to be true.
+#if defined(ASIO_MSVC)
+# define ASIO_ASSUME(expr) __assume(expr)
+#elif defined(__clang__)
+# if __has_builtin(__builtin_assume)
+# define ASIO_ASSUME(expr) __builtin_assume(expr)
+# endif // __has_builtin(__builtin_assume)
+#elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# define ASIO_ASSUME(expr) if (expr) {} else { __builtin_unreachable(); }
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+#endif // defined(__GNUC__)
+#if !defined(ASIO_ASSUME)
+# define ASIO_ASSUME(expr) (void)0
+#endif // !defined(ASIO_ASSUME)
+
+// Support the co_await keyword on compilers known to allow it.
+#if !defined(ASIO_HAS_CO_AWAIT)
+# if !defined(ASIO_DISABLE_CO_AWAIT)
+# if defined(ASIO_MSVC)
+# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) && !defined(__clang__)
+# define ASIO_HAS_CO_AWAIT 1
+# elif (_MSC_FULL_VER >= 190023506)
+# if defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
+# endif // (_MSC_FULL_VER >= 190023506)
+# elif defined(__clang__)
+# if (__clang_major__ >= 14)
+# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+# if __has_include(<coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<coroutine>)
+# elif (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# if __has_include(<experimental/coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<experimental/coroutine>)
+# endif // (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# else // (__clang_major__ >= 14)
+# if (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# if __has_include(<experimental/coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<experimental/coroutine>)
+# endif // (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# endif // (__clang_major__ >= 14)
+# elif defined(__GNUC__)
+# if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
+# if __has_include(<coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<coroutine>)
+# endif // (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
+# endif // defined(__GNUC__)
+# endif // !defined(ASIO_DISABLE_CO_AWAIT)
+#endif // !defined(ASIO_HAS_CO_AWAIT)
+
+// Standard library support for coroutines.
+#if !defined(ASIO_HAS_STD_COROUTINE)
+# if !defined(ASIO_DISABLE_STD_COROUTINE)
+# if defined(ASIO_MSVC)
+# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705)
+# define ASIO_HAS_STD_COROUTINE 1
+# endif // (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705)
+# elif defined(__clang__)
+# if (__clang_major__ >= 14)
+# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+# if __has_include(<coroutine>)
+# define ASIO_HAS_STD_COROUTINE 1
+# endif // __has_include(<coroutine>)
+# endif // (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+# endif // (__clang_major__ >= 14)
+# elif defined(__GNUC__)
+# if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
+# if __has_include(<coroutine>)
+# define ASIO_HAS_STD_COROUTINE 1
+# endif // __has_include(<coroutine>)
+# endif // (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
+# endif // defined(__GNUC__)
+# endif // !defined(ASIO_DISABLE_STD_COROUTINE)
+#endif // !defined(ASIO_HAS_STD_COROUTINE)
+
+// Compiler support for the the [[nodiscard]] attribute.
+#if !defined(ASIO_NODISCARD)
+# if defined(__has_cpp_attribute)
+# if __has_cpp_attribute(nodiscard)
+# if (__cplusplus >= 201703)
+# define ASIO_NODISCARD [[nodiscard]]
+# endif // (__cplusplus >= 201703)
+# endif // __has_cpp_attribute(nodiscard)
+# endif // defined(__has_cpp_attribute)
+#endif // !defined(ASIO_NODISCARD)
+#if !defined(ASIO_NODISCARD)
+# define ASIO_NODISCARD
+#endif // !defined(ASIO_NODISCARD)
+
+// Kernel support for MSG_NOSIGNAL.
+#if !defined(ASIO_HAS_MSG_NOSIGNAL)
+# if defined(__linux__)
+# define ASIO_HAS_MSG_NOSIGNAL 1
+# elif defined(_POSIX_VERSION)
+# if (_POSIX_VERSION >= 200809L)
+# define ASIO_HAS_MSG_NOSIGNAL 1
+# endif // _POSIX_VERSION >= 200809L
+# endif // defined(_POSIX_VERSION)
+#endif // !defined(ASIO_HAS_MSG_NOSIGNAL)
+
+// Standard library support for std::to_address.
+#if !defined(ASIO_HAS_STD_TO_ADDRESS)
+# if !defined(ASIO_DISABLE_STD_TO_ADDRESS)
+# if defined(__clang__)
+# if (__cplusplus >= 202002)
+# define ASIO_HAS_STD_TO_ADDRESS 1
+# endif // (__cplusplus >= 202002)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 8)
+# if (__cplusplus >= 202002)
+# define ASIO_HAS_STD_TO_ADDRESS 1
+# endif // (__cplusplus >= 202002)
+# endif // (__GNUC__ >= 8)
+# endif // defined(__GNUC__)
+# if defined(ASIO_MSVC)
+# if (_MSC_VER >= 1922) && (_MSVC_LANG >= 202002)
+# define ASIO_HAS_STD_TO_ADDRESS 1
+# endif // (_MSC_VER >= 1922) && (_MSVC_LANG >= 202002)
+# endif // defined(ASIO_MSVC)
+# endif // !defined(ASIO_DISABLE_STD_TO_ADDRESS)
+#endif // !defined(ASIO_HAS_STD_TO_ADDRESS)
+
+// Standard library support for snprintf.
+#if !defined(ASIO_HAS_SNPRINTF)
+# if !defined(ASIO_DISABLE_SNPRINTF)
+# if defined(__apple_build_version__)
+# if (__clang_major__ >= 14)
+# define ASIO_HAS_SNPRINTF 1
+# endif // (__clang_major__ >= 14)
+# endif // defined(__apple_build_version__)
+# endif // !defined(ASIO_DISABLE_SNPRINTF)
+#endif // !defined(ASIO_HAS_SNPRINTF)
+
#endif // ASIO_DETAIL_CONFIG_HPP
diff --git a/3rdparty/asio/include/asio/detail/consuming_buffers.hpp b/3rdparty/asio/include/asio/detail/consuming_buffers.hpp
index b1d656770fd..8af95aab769 100644
--- a/3rdparty/asio/include/asio/detail/consuming_buffers.hpp
+++ b/3rdparty/asio/include/asio/detail/consuming_buffers.hpp
@@ -2,7 +2,7 @@
// detail/consuming_buffers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,25 +20,40 @@
#include "asio/buffer.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/limits.hpp"
+#include "asio/registered_buffer.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+// Helper template to determine the maximum number of prepared buffers.
+template <typename Buffers>
+struct prepared_buffers_max
+{
+ enum { value = buffer_sequence_adapter_base::max_buffers };
+};
+
+template <typename Elem, std::size_t N>
+struct prepared_buffers_max<boost::array<Elem, N>>
+{
+ enum { value = N };
+};
+
+template <typename Elem, std::size_t N>
+struct prepared_buffers_max<std::array<Elem, N>>
+{
+ enum { value = N };
+};
// A buffer sequence used to represent a subsequence of the buffers.
-template <typename Buffer>
+template <typename Buffer, std::size_t MaxBuffers>
struct prepared_buffers
{
typedef Buffer value_type;
typedef const Buffer* const_iterator;
- enum
- {
- max_buffers = buffer_sequence_adapter_base::max_buffers < 8
- ? buffer_sequence_adapter_base::max_buffers : 8
- };
+ enum { max_buffers = MaxBuffers < 16 ? MaxBuffers : 16 };
prepared_buffers() : count(0) {}
const_iterator begin() const { return elems; }
@@ -53,14 +68,18 @@ template <typename Buffer, typename Buffers, typename Buffer_Iterator>
class consuming_buffers
{
public:
+ typedef prepared_buffers<Buffer, prepared_buffers_max<Buffers>::value>
+ prepared_buffers_type;
+
// Construct to represent the entire list of buffers.
explicit consuming_buffers(const Buffers& buffers)
: buffers_(buffers),
- total_size_(asio::buffer_size(buffers)),
total_consumed_(0),
next_elem_(0),
next_elem_offset_(0)
{
+ using asio::buffer_size;
+ total_size_ = buffer_size(buffers);
}
// Determine if we are at the end of the buffers.
@@ -70,16 +89,16 @@ public:
}
// Get the buffer for a single transfer, with a size.
- prepared_buffers<Buffer> prepare(std::size_t max_size)
+ prepared_buffers_type prepare(std::size_t max_size)
{
- prepared_buffers<Buffer> result;
+ prepared_buffers_type result;
Buffer_Iterator next = asio::buffer_sequence_begin(buffers_);
Buffer_Iterator end = asio::buffer_sequence_end(buffers_);
std::advance(next, next_elem_);
std::size_t elem_offset = next_elem_offset_;
- while (next != end && max_size > 0 && result.count < result.max_buffers)
+ while (next != end && max_size > 0 && (result.count) < result.max_buffers)
{
Buffer next_buf = Buffer(*next) + elem_offset;
result.elems[result.count] = asio::buffer(next_buf, max_size);
@@ -247,6 +266,42 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
+template <>
+class consuming_buffers<mutable_buffer,
+ mutable_registered_buffer, const mutable_buffer*>
+ : public consuming_single_buffer<mutable_registered_buffer>
+{
+public:
+ explicit consuming_buffers(const mutable_registered_buffer& buffer)
+ : consuming_single_buffer<mutable_registered_buffer>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer,
+ mutable_registered_buffer, const mutable_buffer*>
+ : public consuming_single_buffer<mutable_registered_buffer>
+{
+public:
+ explicit consuming_buffers(const mutable_registered_buffer& buffer)
+ : consuming_single_buffer<mutable_registered_buffer>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer,
+ const_registered_buffer, const const_buffer*>
+ : public consuming_single_buffer<const_registered_buffer>
+{
+public:
+ explicit consuming_buffers(const const_registered_buffer& buffer)
+ : consuming_single_buffer<const_registered_buffer>(buffer)
+ {
+ }
+};
+
template <typename Buffer, typename Elem>
class consuming_buffers<Buffer, boost::array<Elem, 2>,
typename boost::array<Elem, 2>::const_iterator>
@@ -297,8 +352,6 @@ private:
std::size_t total_consumed_;
};
-#if defined(ASIO_HAS_STD_ARRAY)
-
template <typename Buffer, typename Elem>
class consuming_buffers<Buffer, std::array<Elem, 2>,
typename std::array<Elem, 2>::const_iterator>
@@ -349,8 +402,6 @@ private:
std::size_t total_consumed_;
};
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
// Specialisation for null_buffers to ensure that the null_buffers type is
// always passed through to the underlying read or write operation.
template <typename Buffer>
@@ -378,7 +429,7 @@ public:
// No-op.
}
- std::size_t total_consume() const
+ std::size_t total_consumed() const
{
return 0;
}
diff --git a/3rdparty/asio/include/asio/detail/cstddef.hpp b/3rdparty/asio/include/asio/detail/cstddef.hpp
index a5092ce53b0..15ec42df5f3 100644
--- a/3rdparty/asio/include/asio/detail/cstddef.hpp
+++ b/3rdparty/asio/include/asio/detail/cstddef.hpp
@@ -2,7 +2,7 @@
// detail/cstddef.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,11 +20,7 @@
namespace asio {
-#if defined(ASIO_HAS_NULLPTR)
using std::nullptr_t;
-#else // defined(ASIO_HAS_NULLPTR)
-struct nullptr_t {};
-#endif // defined(ASIO_HAS_NULLPTR)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/cstdint.hpp b/3rdparty/asio/include/asio/detail/cstdint.hpp
index 2c0641421c3..a696e34c8ae 100644
--- a/3rdparty/asio/include/asio/detail/cstdint.hpp
+++ b/3rdparty/asio/include/asio/detail/cstdint.hpp
@@ -2,7 +2,7 @@
// detail/cstdint.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,16 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CSTDINT)
-# include <cstdint>
-#else // defined(ASIO_HAS_CSTDINT)
-# include <boost/cstdint.hpp>
-#endif // defined(ASIO_HAS_CSTDINT)
+#include <cstdint>
namespace asio {
-#if defined(ASIO_HAS_CSTDINT)
using std::int16_t;
using std::int_least16_t;
using std::uint16_t;
@@ -38,22 +32,8 @@ using std::int64_t;
using std::int_least64_t;
using std::uint64_t;
using std::uint_least64_t;
+using std::uintptr_t;
using std::uintmax_t;
-#else // defined(ASIO_HAS_CSTDINT)
-using boost::int16_t;
-using boost::int_least16_t;
-using boost::uint16_t;
-using boost::uint_least16_t;
-using boost::int32_t;
-using boost::int_least32_t;
-using boost::uint32_t;
-using boost::uint_least32_t;
-using boost::int64_t;
-using boost::int_least64_t;
-using boost::uint64_t;
-using boost::uint_least64_t;
-using boost::uintmax_t;
-#endif // defined(ASIO_HAS_CSTDINT)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/date_time_fwd.hpp b/3rdparty/asio/include/asio/detail/date_time_fwd.hpp
index 918bb7bdbc6..a586fbea713 100644
--- a/3rdparty/asio/include/asio/detail/date_time_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/date_time_fwd.hpp
@@ -2,7 +2,7 @@
// detail/date_time_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp b/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp
index 816f16f1e5b..bd99a6e910c 100644
--- a/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp
+++ b/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp
@@ -2,7 +2,7 @@
// detail/deadline_timer_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,8 +17,10 @@
#include "asio/detail/config.hpp"
#include <cstddef>
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/cancellation_type.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/memory.hpp"
@@ -43,7 +45,7 @@ namespace detail {
template <typename Time_Traits>
class deadline_timer_service
- : public service_base<deadline_timer_service<Time_Traits> >
+ : public execution_context_service_base<deadline_timer_service<Time_Traits>>
{
public:
// The time type.
@@ -63,9 +65,10 @@ public:
};
// Constructor.
- deadline_timer_service(asio::io_context& io_context)
- : service_base<deadline_timer_service<Time_Traits> >(io_context),
- scheduler_(asio::use_service<timer_scheduler>(io_context))
+ deadline_timer_service(execution_context& context)
+ : execution_context_service_base<
+ deadline_timer_service<Time_Traits>>(context),
+ scheduler_(asio::use_service<timer_scheduler>(context))
{
scheduler_.init_task();
scheduler_.add_timer_queue(timer_queue_);
@@ -96,7 +99,7 @@ public:
cancel(impl, ec);
}
- // Move-construct a new serial port implementation.
+ // Move-construct a new timer implementation.
void move_construct(implementation_type& impl,
implementation_type& other_impl)
{
@@ -109,7 +112,7 @@ public:
other_impl.might_have_pending_waits = false;
}
- // Move-assign from another serial port implementation.
+ // Move-assign from another timer implementation.
void move_assign(implementation_type& impl,
deadline_timer_service& other_service,
implementation_type& other_impl)
@@ -128,6 +131,21 @@ public:
other_impl.might_have_pending_waits = false;
}
+ // Move-construct a new timer implementation.
+ void converting_move_construct(implementation_type& impl,
+ deadline_timer_service&, implementation_type& other_impl)
+ {
+ move_construct(impl, other_impl);
+ }
+
+ // Move-assign from another timer implementation.
+ void converting_move_assign(implementation_type& impl,
+ deadline_timer_service& other_service,
+ implementation_type& other_impl)
+ {
+ move_assign(impl, other_service, other_impl);
+ }
+
// Cancel any asynchronous wait operations associated with the timer.
std::size_t cancel(implementation_type& impl, asio::error_code& ec)
{
@@ -225,14 +243,25 @@ public:
}
// Start an asynchronous wait on the timer.
- template <typename Handler>
- void async_wait(implementation_type& impl, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef wait_handler<Handler> op;
+ typedef wait_handler<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<op_cancellation>(this, &impl.timer_data);
+ }
impl.might_have_pending_waits = true;
@@ -263,6 +292,34 @@ private:
#endif // defined(ASIO_WINDOWS_RUNTIME)
}
+ // Helper class used to implement per-operation cancellation.
+ class op_cancellation
+ {
+ public:
+ op_cancellation(deadline_timer_service* s,
+ typename timer_queue<Time_Traits>::per_timer_data* p)
+ : service_(s),
+ timer_data_(p)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ service_->scheduler_.cancel_timer_by_key(
+ service_->timer_queue_, timer_data_, this);
+ }
+ }
+
+ private:
+ deadline_timer_service* service_;
+ typename timer_queue<Time_Traits>::per_timer_data* timer_data_;
+ };
+
// The queue of timers.
timer_queue<Time_Traits> timer_queue_;
diff --git a/3rdparty/asio/include/asio/detail/dependent_type.hpp b/3rdparty/asio/include/asio/detail/dependent_type.hpp
index a4737e2e7b6..fde0e4a6eb5 100644
--- a/3rdparty/asio/include/asio/detail/dependent_type.hpp
+++ b/3rdparty/asio/include/asio/detail/dependent_type.hpp
@@ -2,7 +2,7 @@
// detail/dependent_type.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/descriptor_ops.hpp b/3rdparty/asio/include/asio/detail/descriptor_ops.hpp
index 677f010ca50..c001696a9fd 100644
--- a/3rdparty/asio/include/asio/detail/descriptor_ops.hpp
+++ b/3rdparty/asio/include/asio/detail/descriptor_ops.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_ops.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,6 +24,7 @@
#include <cstddef>
#include "asio/error.hpp"
#include "asio/error_code.hpp"
+#include "asio/detail/cstdint.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/push_options.hpp"
@@ -50,18 +51,26 @@ enum
typedef unsigned char state_type;
-template <typename ReturnType>
-inline ReturnType error_wrapper(ReturnType return_value,
- asio::error_code& ec)
+inline void get_last_error(
+ asio::error_code& ec, bool is_error_condition)
{
- ec = asio::error_code(errno,
- asio::error::get_system_category());
- return return_value;
+ if (!is_error_condition)
+ {
+ asio::error::clear(ec);
+ }
+ else
+ {
+ ec = asio::error_code(errno,
+ asio::error::get_system_category());
+ }
}
ASIO_DECL int open(const char* path, int flags,
asio::error_code& ec);
+ASIO_DECL int open(const char* path, int flags, unsigned mode,
+ asio::error_code& ec);
+
ASIO_DECL int close(int d, state_type& state,
asio::error_code& ec);
@@ -76,17 +85,66 @@ typedef iovec buf;
ASIO_DECL std::size_t sync_read(int d, state_type state, buf* bufs,
std::size_t count, bool all_empty, asio::error_code& ec);
+ASIO_DECL std::size_t sync_read1(int d, state_type state, void* data,
+ std::size_t size, asio::error_code& ec);
+
ASIO_DECL bool non_blocking_read(int d, buf* bufs, std::size_t count,
asio::error_code& ec, std::size_t& bytes_transferred);
+ASIO_DECL bool non_blocking_read1(int d, void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred);
+
ASIO_DECL std::size_t sync_write(int d, state_type state,
const buf* bufs, std::size_t count, bool all_empty,
asio::error_code& ec);
+ASIO_DECL std::size_t sync_write1(int d, state_type state,
+ const void* data, std::size_t size, asio::error_code& ec);
+
ASIO_DECL bool non_blocking_write(int d,
const buf* bufs, std::size_t count,
asio::error_code& ec, std::size_t& bytes_transferred);
+ASIO_DECL bool non_blocking_write1(int d,
+ const void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred);
+
+#if defined(ASIO_HAS_FILE)
+
+ASIO_DECL std::size_t sync_read_at(int d, state_type state,
+ uint64_t offset, buf* bufs, std::size_t count, bool all_empty,
+ asio::error_code& ec);
+
+ASIO_DECL std::size_t sync_read_at1(int d, state_type state,
+ uint64_t offset, void* data, std::size_t size,
+ asio::error_code& ec);
+
+ASIO_DECL bool non_blocking_read_at(int d, uint64_t offset,
+ buf* bufs, std::size_t count, asio::error_code& ec,
+ std::size_t& bytes_transferred);
+
+ASIO_DECL bool non_blocking_read_at1(int d, uint64_t offset,
+ void* data, std::size_t size, asio::error_code& ec,
+ std::size_t& bytes_transferred);
+
+ASIO_DECL std::size_t sync_write_at(int d, state_type state,
+ uint64_t offset, const buf* bufs, std::size_t count, bool all_empty,
+ asio::error_code& ec);
+
+ASIO_DECL std::size_t sync_write_at1(int d, state_type state,
+ uint64_t offset, const void* data, std::size_t size,
+ asio::error_code& ec);
+
+ASIO_DECL bool non_blocking_write_at(int d,
+ uint64_t offset, const buf* bufs, std::size_t count,
+ asio::error_code& ec, std::size_t& bytes_transferred);
+
+ASIO_DECL bool non_blocking_write_at1(int d,
+ uint64_t offset, const void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred);
+
+#endif // defined(ASIO_HAS_FILE)
+
ASIO_DECL int ioctl(int d, state_type& state, long cmd,
ioctl_arg_type* arg, asio::error_code& ec);
diff --git a/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp b/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp
index f1027b004eb..415490cb8a5 100644
--- a/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp
+++ b/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -26,6 +26,7 @@
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
+#include "asio/dispatch.hpp"
#include "asio/detail/push_options.hpp"
@@ -36,9 +37,11 @@ template <typename MutableBufferSequence>
class descriptor_read_op_base : public reactor_op
{
public:
- descriptor_read_op_base(int descriptor,
- const MutableBufferSequence& buffers, func_type complete_func)
- : reactor_op(&descriptor_read_op_base::do_perform, complete_func),
+ descriptor_read_op_base(const asio::error_code& success_ec,
+ int descriptor, const MutableBufferSequence& buffers,
+ func_type complete_func)
+ : reactor_op(success_ec,
+ &descriptor_read_op_base::do_perform, complete_func),
descriptor_(descriptor),
buffers_(buffers)
{
@@ -46,14 +49,27 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
descriptor_read_op_base* o(static_cast<descriptor_read_op_base*>(base));
- buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
- status result = descriptor_ops::non_blocking_read(o->descriptor_,
- bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
- ? done : not_done;
+ status result;
+ if (bufs_type::is_single_buffer)
+ {
+ result = descriptor_ops::non_blocking_read1(o->descriptor_,
+ bufs_type::first(o->buffers_).data(),
+ bufs_type::first(o->buffers_).size(),
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
+ else
+ {
+ bufs_type bufs(o->buffers_);
+ result = descriptor_ops::non_blocking_read(o->descriptor_,
+ bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
+ ? done : not_done;
+ }
ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_read",
o->ec_, o->bytes_transferred_));
@@ -66,20 +82,24 @@ private:
MutableBufferSequence buffers_;
};
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class descriptor_read_op
: public descriptor_read_op_base<MutableBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(descriptor_read_op);
- descriptor_read_op(int descriptor,
- const MutableBufferSequence& buffers, Handler& handler)
- : descriptor_read_op_base<MutableBufferSequence>(
+ descriptor_read_op(const asio::error_code& success_ec,
+ int descriptor, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : descriptor_read_op_base<MutableBufferSequence>(success_ec,
descriptor, buffers, &descriptor_read_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -87,12 +107,19 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
descriptor_read_op* o(static_cast<descriptor_read_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -114,8 +141,41 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ descriptor_read_op* o(static_cast<descriptor_read_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp b/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp
index 96d6e5bc8da..ed1814e7e39 100644
--- a/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp
+++ b/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -36,9 +36,11 @@ template <typename ConstBufferSequence>
class descriptor_write_op_base : public reactor_op
{
public:
- descriptor_write_op_base(int descriptor,
- const ConstBufferSequence& buffers, func_type complete_func)
- : reactor_op(&descriptor_write_op_base::do_perform, complete_func),
+ descriptor_write_op_base(const asio::error_code& success_ec,
+ int descriptor, const ConstBufferSequence& buffers,
+ func_type complete_func)
+ : reactor_op(success_ec,
+ &descriptor_write_op_base::do_perform, complete_func),
descriptor_(descriptor),
buffers_(buffers)
{
@@ -46,14 +48,27 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
descriptor_write_op_base* o(static_cast<descriptor_write_op_base*>(base));
- buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence> bufs(o->buffers_);
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
- status result = descriptor_ops::non_blocking_write(o->descriptor_,
- bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
- ? done : not_done;
+ status result;
+ if (bufs_type::is_single_buffer)
+ {
+ result = descriptor_ops::non_blocking_write1(o->descriptor_,
+ bufs_type::first(o->buffers_).data(),
+ bufs_type::first(o->buffers_).size(),
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
+ else
+ {
+ bufs_type bufs(o->buffers_);
+ result = descriptor_ops::non_blocking_write(o->descriptor_,
+ bufs.buffers(), bufs.count(), o->ec_, o->bytes_transferred_)
+ ? done : not_done;
+ }
ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_write",
o->ec_, o->bytes_transferred_));
@@ -66,20 +81,24 @@ private:
ConstBufferSequence buffers_;
};
-template <typename ConstBufferSequence, typename Handler>
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
class descriptor_write_op
: public descriptor_write_op_base<ConstBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(descriptor_write_op);
- descriptor_write_op(int descriptor,
- const ConstBufferSequence& buffers, Handler& handler)
- : descriptor_write_op_base<ConstBufferSequence>(
+ descriptor_write_op(const asio::error_code& success_ec,
+ int descriptor, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : descriptor_write_op_base<ConstBufferSequence>(success_ec,
descriptor, buffers, &descriptor_write_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -87,12 +106,19 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -114,8 +140,41 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp b/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp
index 1f59cf30995..720fd6b54e8 100644
--- a/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/dev_poll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,6 +28,7 @@
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/reactor_op_queue.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -41,7 +42,8 @@ namespace asio {
namespace detail {
class dev_poll_reactor
- : public execution_context_service_base<dev_poll_reactor>
+ : public execution_context_service_base<dev_poll_reactor>,
+ public scheduler_task
{
public:
enum op_types { read_op = 0, write_op = 1,
@@ -84,32 +86,59 @@ public:
per_descriptor_data& source_descriptor_data);
// 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(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool allow_speculative);
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &dev_poll_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
// 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);
- // Cancel any operations that are running against the descriptor and remove
- // its 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&);
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ ASIO_DECL void cleanup_descriptor_data(per_descriptor_data&);
+
// Add a new timer queue to the reactor.
template <typename Time_Traits>
void add_timer_queue(timer_queue<Time_Traits>& queue);
@@ -132,6 +161,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,
@@ -139,7 +174,7 @@ public:
typename timer_queue<Time_Traits>::per_timer_data& source);
// Run /dev/poll once until interrupted or events are ready to be dispatched.
- ASIO_DECL void run(bool block, op_queue<operation>& ops);
+ ASIO_DECL void run(long usec, op_queue<operation>& ops);
// Interrupt the select loop.
ASIO_DECL void interrupt();
diff --git a/3rdparty/asio/include/asio/detail/epoll_reactor.hpp b/3rdparty/asio/include/asio/detail/epoll_reactor.hpp
index ba8b2a15420..212767a760f 100644
--- a/3rdparty/asio/include/asio/detail/epoll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/epoll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/epoll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -25,6 +25,7 @@
#include "asio/detail/object_pool.hpp"
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -32,13 +33,18 @@
#include "asio/detail/wait_op.hpp"
#include "asio/execution_context.hpp"
+#if defined(ASIO_HAS_TIMERFD)
+# include <sys/timerfd.h>
+#endif // defined(ASIO_HAS_TIMERFD)
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
class epoll_reactor
- : public execution_context_service_base<epoll_reactor>
+ : public execution_context_service_base<epoll_reactor>,
+ public scheduler_task
{
private:
// The mutex type used by this reactor.
@@ -67,6 +73,7 @@ public:
ASIO_DECL descriptor_state(bool locking);
void set_ready_events(uint32_t events) { task_result_ = events; }
+ void add_ready_events(uint32_t events) { task_result_ |= events; }
ASIO_DECL operation* perform_io(uint32_t events);
ASIO_DECL static void do_complete(
void* owner, operation* base,
@@ -109,16 +116,30 @@ public:
per_descriptor_data& source_descriptor_data);
// 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(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative);
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &epoll_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
@@ -126,15 +147,30 @@ public:
ASIO_DECL void cancel_ops(socket_type descriptor,
per_descriptor_data& 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& 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);
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ ASIO_DECL void cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data);
+
// Add a new timer queue to the reactor.
template <typename Time_Traits>
void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
@@ -157,6 +193,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,
diff --git a/3rdparty/asio/include/asio/detail/event.hpp b/3rdparty/asio/include/asio/detail/event.hpp
index bb07fcdd18c..19e458cdf05 100644
--- a/3rdparty/asio/include/asio/detail/event.hpp
+++ b/3rdparty/asio/include/asio/detail/event.hpp
@@ -2,7 +2,7 @@
// detail/event.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_event.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_event.hpp"
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include "asio/detail/std_event.hpp"
#else
-# error Only Windows, POSIX and std::condition_variable are supported!
+# include "asio/detail/std_event.hpp"
#endif
namespace asio {
@@ -38,7 +36,7 @@ typedef null_event event;
typedef win_event event;
#elif defined(ASIO_HAS_PTHREADS)
typedef posix_event event;
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+#else
typedef std_event event;
#endif
diff --git a/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp b/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp
index fcc86637ad6..0eb8843dd56 100644
--- a/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/eventfd_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -40,7 +40,7 @@ public:
// Interrupt the select call.
ASIO_DECL void interrupt();
- // Reset the select interrupt. Returns true if the call was interrupted.
+ // Reset the select interrupter. Returns true if the reset was successful.
ASIO_DECL bool reset();
// Get the read descriptor to be passed to select.
diff --git a/3rdparty/asio/include/asio/detail/exception.hpp b/3rdparty/asio/include/asio/detail/exception.hpp
new file mode 100644
index 00000000000..28c7cffb5d8
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/exception.hpp
@@ -0,0 +1,29 @@
+//
+// detail/exception.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_EXCEPTION_HPP
+#define ASIO_DETAIL_EXCEPTION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <exception>
+
+namespace asio {
+
+using std::exception_ptr;
+using std::current_exception;
+using std::rethrow_exception;
+
+} // namespace asio
+
+#endif // ASIO_DETAIL_EXCEPTION_HPP
diff --git a/3rdparty/asio/include/asio/detail/executor_function.hpp b/3rdparty/asio/include/asio/detail/executor_function.hpp
new file mode 100644
index 00000000000..cccf31bf3af
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/executor_function.hpp
@@ -0,0 +1,152 @@
+//
+// detail/executor_function.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_EXECUTOR_FUNCTION_HPP
+#define ASIO_DETAIL_EXECUTOR_FUNCTION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Lightweight, move-only function object wrapper.
+class executor_function
+{
+public:
+ template <typename F, typename Alloc>
+ explicit executor_function(F f, const Alloc& a)
+ {
+ // Allocate and construct an object to wrap the function.
+ typedef impl<F, Alloc> impl_type;
+ typename impl_type::ptr p = {
+ detail::addressof(a), impl_type::ptr::allocate(a), 0 };
+ impl_ = new (p.v) impl_type(static_cast<F&&>(f), a);
+ p.v = 0;
+ }
+
+ executor_function(executor_function&& other) noexcept
+ : impl_(other.impl_)
+ {
+ other.impl_ = 0;
+ }
+
+ ~executor_function()
+ {
+ if (impl_)
+ impl_->complete_(impl_, false);
+ }
+
+ void operator()()
+ {
+ if (impl_)
+ {
+ impl_base* i = impl_;
+ impl_ = 0;
+ i->complete_(i, true);
+ }
+ }
+
+private:
+ // Base class for polymorphic function implementations.
+ struct impl_base
+ {
+ void (*complete_)(impl_base*, bool);
+ };
+
+ // Polymorphic function implementation.
+ template <typename Function, typename Alloc>
+ struct impl : impl_base
+ {
+ ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR(
+ thread_info_base::executor_function_tag, impl);
+
+ template <typename F>
+ impl(F&& f, const Alloc& a)
+ : function_(static_cast<F&&>(f)),
+ allocator_(a)
+ {
+ complete_ = &executor_function::complete<Function, Alloc>;
+ }
+
+ Function function_;
+ Alloc allocator_;
+ };
+
+ // Helper to complete function invocation.
+ template <typename Function, typename Alloc>
+ static void complete(impl_base* base, bool call)
+ {
+ // Take ownership of the function object.
+ impl<Function, Alloc>* i(static_cast<impl<Function, Alloc>*>(base));
+ Alloc allocator(i->allocator_);
+ typename impl<Function, Alloc>::ptr p = {
+ detail::addressof(allocator), i, i };
+
+ // Make a copy of the function so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the function may be the true owner of the memory
+ // associated with the function. Consequently, a local copy of the function
+ // is required to ensure that any owning sub-object remains valid until
+ // after we have deallocated the memory here.
+ Function function(static_cast<Function&&>(i->function_));
+ p.reset();
+
+ // Make the upcall if required.
+ if (call)
+ {
+ static_cast<Function&&>(function)();
+ }
+ }
+
+ impl_base* impl_;
+};
+
+// Lightweight, non-owning, copyable function object wrapper.
+class executor_function_view
+{
+public:
+ template <typename F>
+ explicit executor_function_view(F& f) noexcept
+ : complete_(&executor_function_view::complete<F>),
+ function_(&f)
+ {
+ }
+
+ void operator()()
+ {
+ complete_(function_);
+ }
+
+private:
+ // Helper to complete function invocation.
+ template <typename F>
+ static void complete(void* f)
+ {
+ (*static_cast<F*>(f))();
+ }
+
+ void (*complete_)(void*);
+ void* function_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_EXECUTOR_FUNCTION_HPP
diff --git a/3rdparty/asio/include/asio/detail/executor_op.hpp b/3rdparty/asio/include/asio/detail/executor_op.hpp
index 31451306a5b..78e781e217b 100644
--- a/3rdparty/asio/include/asio/detail/executor_op.hpp
+++ b/3rdparty/asio/include/asio/detail/executor_op.hpp
@@ -2,7 +2,7 @@
// detail/executor_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,7 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/scheduler_operation.hpp"
#include "asio/detail/push_options.hpp"
@@ -31,11 +30,12 @@ template <typename Handler, typename Alloc,
class executor_op : public Operation
{
public:
- ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(executor_op, Alloc);
+ ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(executor_op);
- executor_op(Handler& h, const Alloc& allocator)
+ template <typename H>
+ executor_op(H&& h, const Alloc& allocator)
: Operation(&executor_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h)),
+ handler_(static_cast<H&&>(h)),
allocator_(allocator)
{
}
@@ -45,8 +45,10 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
executor_op* o(static_cast<executor_op*>(base));
- ptr p = { o->allocator_, o, o };
+ Alloc allocator(o->allocator_);
+ ptr p = { detail::addressof(allocator), o, o };
ASIO_HANDLER_COMPLETION((*o));
@@ -56,7 +58,7 @@ public:
// with the handler. Consequently, a local copy of the handler is required
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
- Handler handler(ASIO_MOVE_CAST(Handler)(o->handler_));
+ Handler handler(static_cast<Handler&&>(o->handler_));
p.reset();
// Make the upcall if required.
@@ -64,7 +66,7 @@ public:
{
fenced_block b(fenced_block::half);
ASIO_HANDLER_INVOCATION_BEGIN(());
- asio_handler_invoke_helpers::invoke(handler, handler);
+ static_cast<Handler&&>(handler)();
ASIO_HANDLER_INVOCATION_END;
}
}
diff --git a/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp b/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp
index 44c4c46ddf5..80b8974a417 100644
--- a/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/fenced_block.hpp b/3rdparty/asio/include/asio/detail/fenced_block.hpp
index c07c85f1483..ff096dc8486 100644
--- a/3rdparty/asio/include/asio/detail/fenced_block.hpp
+++ b/3rdparty/asio/include/asio/detail/fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,26 +20,8 @@
#if !defined(ASIO_HAS_THREADS) \
|| defined(ASIO_DISABLE_FENCED_BLOCK)
# include "asio/detail/null_fenced_block.hpp"
-#elif defined(__MACH__) && defined(__APPLE__)
-# include "asio/detail/macos_fenced_block.hpp"
-#elif defined(__sun)
-# include "asio/detail/solaris_fenced_block.hpp"
-#elif defined(__GNUC__) && defined(__arm__) \
- && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-# include "asio/detail/gcc_arm_fenced_block.hpp"
-#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-# include "asio/detail/gcc_hppa_fenced_block.hpp"
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-# include "asio/detail/gcc_x86_fenced_block.hpp"
-#elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-# include "asio/detail/gcc_sync_fenced_block.hpp"
-#elif defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-# include "asio/detail/win_fenced_block.hpp"
#else
-# include "asio/detail/null_fenced_block.hpp"
+# include "asio/detail/std_fenced_block.hpp"
#endif
namespace asio {
@@ -48,26 +30,8 @@ namespace detail {
#if !defined(ASIO_HAS_THREADS) \
|| defined(ASIO_DISABLE_FENCED_BLOCK)
typedef null_fenced_block fenced_block;
-#elif defined(__MACH__) && defined(__APPLE__)
-typedef macos_fenced_block fenced_block;
-#elif defined(__sun)
-typedef solaris_fenced_block fenced_block;
-#elif defined(__GNUC__) && defined(__arm__) \
- && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-typedef gcc_arm_fenced_block fenced_block;
-#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-typedef gcc_hppa_fenced_block fenced_block;
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-typedef gcc_x86_fenced_block fenced_block;
-#elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-typedef gcc_sync_fenced_block fenced_block;
-#elif defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-typedef win_fenced_block fenced_block;
#else
-typedef null_fenced_block fenced_block;
+typedef std_fenced_block fenced_block;
#endif
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/functional.hpp b/3rdparty/asio/include/asio/detail/functional.hpp
index a72a5fc69fa..145f9d2a9e1 100644
--- a/3rdparty/asio/include/asio/detail/functional.hpp
+++ b/3rdparty/asio/include/asio/detail/functional.hpp
@@ -2,7 +2,7 @@
// detail/functional.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,23 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
#include <functional>
-#if !defined(ASIO_HAS_STD_FUNCTION)
-# include <boost/function.hpp>
-#endif // !defined(ASIO_HAS_STD_FUNCTION)
-
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_STD_FUNCTION)
using std::function;
-#else // defined(ASIO_HAS_STD_FUNCTION)
-using boost::function;
-#endif // defined(ASIO_HAS_STD_FUNCTION)
} // namespace detail
+
+using std::ref;
+using std::reference_wrapper;
+
} // namespace asio
#endif // ASIO_DETAIL_FUNCTIONAL_HPP
diff --git a/3rdparty/asio/include/asio/detail/future.hpp b/3rdparty/asio/include/asio/detail/future.hpp
new file mode 100644
index 00000000000..f33136cbef2
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/future.hpp
@@ -0,0 +1,32 @@
+//
+// detail/future.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_FUTURE_HPP
+#define ASIO_DETAIL_FUTURE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <future>
+
+// Even though the future header is available, libstdc++ may not implement the
+// std::future class itself. However, we need to have already included the
+// future header to reliably test for _GLIBCXX_HAS_GTHREADS.
+#if defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
+# if defined(_GLIBCXX_HAS_GTHREADS)
+# define ASIO_HAS_STD_FUTURE_CLASS 1
+# endif // defined(_GLIBCXX_HAS_GTHREADS)
+#else // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
+# define ASIO_HAS_STD_FUTURE_CLASS 1
+#endif // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
+
+#endif // ASIO_DETAIL_FUTURE_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp
deleted file mode 100644
index debdd3c9f1a..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// detail/gcc_arm_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) && defined(__arm__)
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_arm_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_arm_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_arm_fenced_block(full_t)
- {
- barrier();
- }
-
- // Destructor.
- ~gcc_arm_fenced_block()
- {
- barrier();
- }
-
-private:
- static void barrier()
- {
-#if defined(__ARM_ARCH_4__) \
- || defined(__ARM_ARCH_4T__) \
- || defined(__ARM_ARCH_5__) \
- || defined(__ARM_ARCH_5E__) \
- || defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__) \
- || defined(__ARM_ARCH_6__) \
- || defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6T2__)
-# if defined(__thumb__)
- // This is just a placeholder and almost certainly not sufficient.
- __asm__ __volatile__ ("" : : : "memory");
-# else // defined(__thumb__)
- int a = 0, b = 0;
- __asm__ __volatile__ ("swp %0, %1, [%2]"
- : "=&r"(a) : "r"(1), "r"(&b) : "memory", "cc");
-# endif // defined(__thumb__)
-#else
- // ARMv7 and later.
- __asm__ __volatile__ ("dmb" : : : "memory");
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__) && defined(__arm__)
-
-#endif // ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
deleted file mode 100644
index cd41eb28655..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// detail/gcc_hppa_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_hppa_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_hppa_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_hppa_fenced_block(full_t)
- {
- barrier();
- }
-
- // Destructor.
- ~gcc_hppa_fenced_block()
- {
- barrier();
- }
-
-private:
- static void barrier()
- {
- // This is just a placeholder and almost certainly not sufficient.
- __asm__ __volatile__ ("" : : : "memory");
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-
-#endif // ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp
deleted file mode 100644
index 19330990bee..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// detail/gcc_sync_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_sync_fenced_block
- : private noncopyable
-{
-public:
- enum half_or_full_t { half, full };
-
- // Constructor.
- explicit gcc_sync_fenced_block(half_or_full_t)
- : value_(0)
- {
- __sync_lock_test_and_set(&value_, 1);
- }
-
- // Destructor.
- ~gcc_sync_fenced_block()
- {
- __sync_lock_release(&value_);
- }
-
-private:
- int value_;
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__)
- // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
- // && !defined(__INTEL_COMPILER) && !defined(__ICL)
- // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-
-#endif // ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp
deleted file mode 100644
index 0ec66c54ab6..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// detail/gcc_x86_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_x86_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_x86_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_x86_fenced_block(full_t)
- {
- lbarrier();
- }
-
- // Destructor.
- ~gcc_x86_fenced_block()
- {
- sbarrier();
- }
-
-private:
- static int barrier()
- {
- int r = 0, m = 1;
- __asm__ __volatile__ (
- "xchgl %0, %1" :
- "=r"(r), "=m"(m) :
- "0"(1), "m"(m) :
- "memory", "cc");
- return r;
- }
-
- static void lbarrier()
- {
-#if defined(__SSE2__)
-# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __builtin_ia32_lfence();
-# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __asm__ __volatile__ ("lfence" ::: "memory");
-# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
-#else // defined(__SSE2__)
- barrier();
-#endif // defined(__SSE2__)
- }
-
- static void sbarrier()
- {
-#if defined(__SSE2__)
-# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __builtin_ia32_sfence();
-# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __asm__ __volatile__ ("sfence" ::: "memory");
-# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
-#else // defined(__SSE2__)
- barrier();
-#endif // defined(__SSE2__)
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#endif // ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/global.hpp b/3rdparty/asio/include/asio/detail/global.hpp
index 87c57a008e9..59de23a4884 100644
--- a/3rdparty/asio/include/asio/detail/global.hpp
+++ b/3rdparty/asio/include/asio/detail/global.hpp
@@ -2,7 +2,7 @@
// detail/global.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_global.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_global.hpp"
-#elif defined(ASIO_HAS_STD_CALL_ONCE)
-# include "asio/detail/std_global.hpp"
#else
-# error Only Windows, POSIX and std::call_once are supported!
+# include "asio/detail/std_global.hpp"
#endif
namespace asio {
@@ -41,7 +39,7 @@ inline T& global()
return win_global<T>();
#elif defined(ASIO_HAS_PTHREADS)
return posix_global<T>();
-#elif defined(ASIO_HAS_STD_CALL_ONCE)
+#else
return std_global<T>();
#endif
}
diff --git a/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp b/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp
index 0658b9883f1..c14d542e48c 100644
--- a/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_alloc_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,102 +18,112 @@
#include "asio/detail/config.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+#include "asio/detail/thread_info_base.hpp"
#include "asio/associated_allocator.hpp"
-#include "asio/handler_alloc_hook.hpp"
#include "asio/detail/push_options.hpp"
-// Calls to asio_handler_allocate and asio_handler_deallocate must be made from
-// a namespace that does not contain any overloads of these functions. The
-// asio_handler_alloc_helpers namespace is defined here for that purpose.
-namespace asio_handler_alloc_helpers {
+namespace asio {
+namespace detail {
-template <typename Handler>
-inline void* allocate(std::size_t s, Handler& h)
+inline void* default_allocate(std::size_t s,
+ std::size_t align = ASIO_DEFAULT_ALIGN)
{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- return ::operator new(s);
-#else
- using asio::asio_handler_allocate;
- return asio_handler_allocate(s, asio::detail::addressof(h));
-#endif
+#if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return asio::detail::thread_info_base::allocate(
+ asio::detail::thread_context::top_of_thread_call_stack(),
+ s, align);
+#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return asio::aligned_new(align, s);
+#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
}
-template <typename Handler>
-inline void deallocate(void* p, std::size_t s, Handler& h)
+inline void default_deallocate(void* p, std::size_t s)
{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- ::operator delete(p);
-#else
- using asio::asio_handler_deallocate;
- asio_handler_deallocate(p, s, asio::detail::addressof(h));
-#endif
+#if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ asio::detail::thread_info_base::deallocate(
+ asio::detail::thread_context::top_of_thread_call_stack(), p, s);
+#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ (void)s;
+ asio::aligned_delete(p);
+#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
}
-} // namespace asio_handler_alloc_helpers
-
-namespace asio {
-namespace detail {
-
-template <typename Handler, typename T>
-class hook_allocator
+template <typename T>
+class default_allocator
{
public:
+ typedef T value_type;
+
template <typename U>
struct rebind
{
- typedef hook_allocator<Handler, U> other;
+ typedef default_allocator<U> other;
};
- explicit hook_allocator(Handler& h)
- : handler_(h)
+ default_allocator() noexcept
{
}
template <typename U>
- hook_allocator(const hook_allocator<Handler, U>& a)
- : handler_(a.handler_)
+ default_allocator(const default_allocator<U>&) noexcept
{
}
T* allocate(std::size_t n)
{
- return static_cast<T*>(
- asio_handler_alloc_helpers::allocate(sizeof(T) * n, handler_));
+ return static_cast<T*>(default_allocate(sizeof(T) * n, alignof(T)));
}
void deallocate(T* p, std::size_t n)
{
- asio_handler_alloc_helpers::deallocate(p, sizeof(T) * n, handler_);
+ default_deallocate(p, sizeof(T) * n);
}
-
-//private:
- Handler& handler_;
};
-template <typename Handler>
-class hook_allocator<Handler, void>
+template <>
+class default_allocator<void>
{
public:
+ typedef void value_type;
+
template <typename U>
struct rebind
{
- typedef hook_allocator<Handler, U> other;
+ typedef default_allocator<U> other;
};
- explicit hook_allocator(Handler& h)
- : handler_(h)
+ default_allocator() noexcept
{
}
template <typename U>
- hook_allocator(const hook_allocator<Handler, U>& a)
- : handler_(a.handler_)
+ default_allocator(const default_allocator<U>&) noexcept
{
}
+};
-//private:
- Handler& handler_;
+template <typename Allocator>
+struct get_default_allocator
+{
+ typedef Allocator type;
+
+ static type get(const Allocator& a)
+ {
+ return a;
+ }
+};
+
+template <typename T>
+struct get_default_allocator<std::allocator<T>>
+{
+ typedef default_allocator<T> type;
+
+ static type get(const std::allocator<T>&)
+ {
+ return type();
+ }
};
} // namespace detail
@@ -122,9 +132,6 @@ public:
#define ASIO_DEFINE_HANDLER_PTR(op) \
struct ptr \
{ \
- typedef typename ::asio::associated_allocator<Handler, \
- ::asio::detail::hook_allocator<Handler, \
- void> >::type::template rebind<op>::other allocator_type; \
Handler* h; \
op* v; \
op* p; \
@@ -134,16 +141,18 @@ public:
} \
static op* allocate(Handler& handler) \
{ \
- allocator_type a(::asio::associated_allocator<Handler, \
- ::asio::detail::hook_allocator<Handler, void> >::get(handler, \
- ::asio::detail::hook_allocator<Handler, void>(handler))); \
+ typedef typename ::asio::associated_allocator< \
+ Handler>::type associated_allocator_type; \
+ typedef typename ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::type default_allocator_type; \
+ ASIO_REBIND_ALLOC(default_allocator_type, op) a( \
+ ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::get( \
+ ::asio::get_associated_allocator(handler))); \
return a.allocate(1); \
} \
void reset() \
{ \
- allocator_type a(::asio::associated_allocator<Handler, \
- ::asio::detail::hook_allocator<Handler, void> >::get(*h, \
- ::asio::detail::hook_allocator<Handler, void>(*h))); \
if (p) \
{ \
p->~op(); \
@@ -151,6 +160,14 @@ public:
} \
if (v) \
{ \
+ typedef typename ::asio::associated_allocator< \
+ Handler>::type associated_allocator_type; \
+ typedef typename ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::type default_allocator_type; \
+ ASIO_REBIND_ALLOC(default_allocator_type, op) a( \
+ ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::get( \
+ ::asio::get_associated_allocator(*h))); \
a.deallocate(static_cast<op*>(v), 1); \
v = 0; \
} \
@@ -158,16 +175,25 @@ public:
} \
/**/
-#define ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(op, alloc) \
+#define ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR(purpose, op) \
struct ptr \
{ \
- typename alloc::template rebind<op>::other a; \
+ const Alloc* a; \
void* v; \
op* p; \
~ptr() \
{ \
reset(); \
} \
+ static op* allocate(const Alloc& a) \
+ { \
+ typedef typename ::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::type recycling_allocator_type; \
+ ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
+ ::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::get(a)); \
+ return a1.allocate(1); \
+ } \
void reset() \
{ \
if (p) \
@@ -177,13 +203,23 @@ public:
} \
if (v) \
{ \
- a.deallocate(static_cast<op*>(v), 1); \
+ typedef typename ::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::type recycling_allocator_type; \
+ ASIO_REBIND_ALLOC(recycling_allocator_type, op) a1( \
+ ::asio::detail::get_recycling_allocator< \
+ Alloc, purpose>::get(*a)); \
+ a1.deallocate(static_cast<op*>(v), 1); \
v = 0; \
} \
} \
} \
/**/
+#define ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(op) \
+ ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR( \
+ ::asio::detail::thread_info_base::default_tag, op ) \
+ /**/
+
#include "asio/detail/pop_options.hpp"
#endif // ASIO_DETAIL_HANDLER_ALLOC_HELPERS_HPP
diff --git a/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp b/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp
index defdf26525d..9f8f971984f 100644
--- a/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_cont_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp b/3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp
deleted file mode 100644
index 91325ee9e98..00000000000
--- a/3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// detail/handler_invoke_helpers.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
-#define ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/memory.hpp"
-#include "asio/handler_invoke_hook.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-// Calls to asio_handler_invoke must be made from a namespace that does not
-// contain overloads of this function. The asio_handler_invoke_helpers
-// namespace is defined here for that purpose.
-namespace asio_handler_invoke_helpers {
-
-template <typename Function, typename Context>
-inline void invoke(Function& function, Context& context)
-{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- Function tmp(function);
- tmp();
-#else
- using asio::asio_handler_invoke;
- asio_handler_invoke(function, asio::detail::addressof(context));
-#endif
-}
-
-template <typename Function, typename Context>
-inline void invoke(const Function& function, Context& context)
-{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- Function tmp(function);
- tmp();
-#else
- using asio::asio_handler_invoke;
- asio_handler_invoke(function, asio::detail::addressof(context));
-#endif
-}
-
-} // namespace asio_handler_invoke_helpers
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
diff --git a/3rdparty/asio/include/asio/detail/handler_tracking.hpp b/3rdparty/asio/include/asio/detail/handler_tracking.hpp
index 6ea19a3f10c..f47c777a2d6 100644
--- a/3rdparty/asio/include/asio/detail/handler_tracking.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_tracking.hpp
@@ -2,7 +2,7 @@
// detail/handler_tracking.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -87,6 +87,28 @@ public:
// Initialise the tracking system.
ASIO_DECL static void init();
+ class location
+ {
+ public:
+ // Constructor adds a location to the stack.
+ ASIO_DECL explicit location(const char* file,
+ int line, const char* func);
+
+ // Destructor removes a location from the stack.
+ ASIO_DECL ~location();
+
+ private:
+ // Disallow copying and assignment.
+ location(const location&) = delete;
+ location& operator=(const location&) = delete;
+
+ friend class handler_tracking;
+ const char* file_;
+ int line_;
+ const char* func_;
+ location* next_;
+ };
+
// Record the creation of a tracked handler.
ASIO_DECL static void creation(
execution_context& context, tracked_handler& h,
@@ -175,6 +197,9 @@ private:
# define ASIO_HANDLER_TRACKING_INIT \
asio::detail::handler_tracking::init()
+# define ASIO_HANDLER_LOCATION(args) \
+ asio::detail::handler_tracking::location tracked_location args
+
# define ASIO_HANDLER_CREATION(args) \
asio::detail::handler_tracking::creation args
@@ -211,6 +236,7 @@ private:
# define ASIO_INHERIT_TRACKED_HANDLER
# define ASIO_ALSO_INHERIT_TRACKED_HANDLER
# define ASIO_HANDLER_TRACKING_INIT (void)0
+# define ASIO_HANDLER_LOCATION(loc) (void)0
# define ASIO_HANDLER_CREATION(args) (void)0
# define ASIO_HANDLER_COMPLETION(args) (void)0
# define ASIO_HANDLER_INVOCATION_BEGIN(args) (void)0
diff --git a/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp b/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp
index aaa473dd082..54c53b9b6e3 100644
--- a/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp
@@ -2,7 +2,7 @@
// detail/handler_type_requirements.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -53,18 +53,6 @@
# include "asio/async_result.hpp"
#endif // defined(ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-// Newer gcc, clang need special treatment to suppress unused typedef warnings.
-#if defined(__clang__) && (__clang_major__ >= 7)
-# define ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
-#elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# define ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-#endif // defined(__GNUC__)
-#if !defined(ASIO_UNUSED_TYPEDEF)
-# define ASIO_UNUSED_TYPEDEF
-#endif // !defined(ASIO_UNUSED_TYPEDEF)
-
namespace asio {
namespace detail {
@@ -76,7 +64,7 @@ template <typename Handler>
auto zero_arg_copyable_handler_test(Handler h, void*)
-> decltype(
sizeof(Handler(static_cast<const Handler&>(h))),
- ((h)()),
+ (static_cast<Handler&&>(h)()),
char(0));
template <typename Handler>
@@ -85,8 +73,8 @@ char (&zero_arg_copyable_handler_test(Handler, ...))[2];
template <typename Handler, typename Arg1>
auto one_arg_handler_test(Handler h, Arg1* a1)
-> decltype(
- sizeof(Handler(ASIO_MOVE_CAST(Handler)(h))),
- ((h)(*a1)),
+ sizeof(Handler(static_cast<Handler&&>(h))),
+ (static_cast<Handler&&>(h)(*a1)),
char(0));
template <typename Handler>
@@ -95,8 +83,8 @@ char (&one_arg_handler_test(Handler h, ...))[2];
template <typename Handler, typename Arg1, typename Arg2>
auto two_arg_handler_test(Handler h, Arg1* a1, Arg2* a2)
-> decltype(
- sizeof(Handler(ASIO_MOVE_CAST(Handler)(h))),
- ((h)(*a1, *a2)),
+ sizeof(Handler(static_cast<Handler&&>(h))),
+ (static_cast<Handler&&>(h)(*a1, *a2)),
char(0));
template <typename Handler>
@@ -105,8 +93,9 @@ char (&two_arg_handler_test(Handler, ...))[2];
template <typename Handler, typename Arg1, typename Arg2>
auto two_arg_move_handler_test(Handler h, Arg1* a1, Arg2* a2)
-> decltype(
- sizeof(Handler(ASIO_MOVE_CAST(Handler)(h))),
- ((h)(*a1, ASIO_MOVE_CAST(Arg2)(*a2))),
+ sizeof(Handler(static_cast<Handler&&>(h))),
+ (static_cast<Handler&&>(h)(
+ *a1, static_cast<Arg2&&>(*a2))),
char(0));
template <typename Handler>
@@ -125,13 +114,9 @@ template <typename T> T& lvref();
template <typename T> T& lvref(T);
template <typename T> const T& clvref();
template <typename T> const T& clvref(T);
-#if defined(ASIO_HAS_MOVE)
template <typename T> T rvref();
template <typename T> T rvref(T);
-#else // defined(ASIO_HAS_MOVE)
-template <typename T> const T& rvref();
-template <typename T> const T& rvref(T);
-#endif // defined(ASIO_HAS_MOVE)
+template <typename T> T rorlvref();
template <typename T> char argbyv(T);
template <int>
@@ -139,7 +124,7 @@ struct handler_type_requirements
{
};
-#define ASIO_COMPLETION_HANDLER_CHECK( \
+#define ASIO_LEGACY_COMPLETION_HANDLER_CHECK( \
handler_type, handler) \
\
typedef ASIO_HANDLER_TYPE(handler_type, \
@@ -157,7 +142,7 @@ struct handler_type_requirements
asio::detail::clvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()(), \
char(0))> ASIO_UNUSED_TYPEDEF
@@ -182,7 +167,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const std::size_t>()), \
@@ -209,7 +194,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const std::size_t>()), \
@@ -235,7 +220,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>()), \
char(0))> ASIO_UNUSED_TYPEDEF
@@ -261,7 +246,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::rvref<socket_type>()), \
@@ -287,7 +272,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>()), \
char(0))> ASIO_UNUSED_TYPEDEF
@@ -313,7 +298,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const endpoint_type>()), \
@@ -340,7 +325,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const iter_type>()), \
@@ -367,7 +352,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const range_type>()), \
@@ -393,7 +378,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>()), \
char(0))> ASIO_UNUSED_TYPEDEF
@@ -419,7 +404,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const int>()), \
@@ -445,7 +430,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>()), \
char(0))> ASIO_UNUSED_TYPEDEF
@@ -471,7 +456,7 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>(), \
asio::detail::lvref<const std::size_t>()), \
@@ -497,14 +482,14 @@ struct handler_type_requirements
asio::detail::rvref< \
asio_true_handler_type>())) + \
sizeof( \
- asio::detail::lvref< \
+ asio::detail::rorlvref< \
asio_true_handler_type>()( \
asio::detail::lvref<const asio::error_code>()), \
char(0))> ASIO_UNUSED_TYPEDEF
#else // !defined(ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)
-#define ASIO_COMPLETION_HANDLER_CHECK( \
+#define ASIO_LEGACY_COMPLETION_HANDLER_CHECK( \
handler_type, handler) \
typedef int ASIO_UNUSED_TYPEDEF
@@ -520,6 +505,10 @@ struct handler_type_requirements
handler_type, handler) \
typedef int ASIO_UNUSED_TYPEDEF
+#define ASIO_MOVE_ACCEPT_HANDLER_CHECK( \
+ handler_type, handler, socket_type) \
+ typedef int ASIO_UNUSED_TYPEDEF
+
#define ASIO_CONNECT_HANDLER_CHECK( \
handler_type, handler) \
typedef int ASIO_UNUSED_TYPEDEF
diff --git a/3rdparty/asio/include/asio/detail/handler_work.hpp b/3rdparty/asio/include/asio/detail/handler_work.hpp
index 327c552434b..596d076327a 100644
--- a/3rdparty/asio/include/asio/detail/handler_work.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_work.hpp
@@ -2,7 +2,7 @@
// detail/handler_work.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,75 +16,491 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
#include "asio/associated_executor.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/detail/initiate_dispatch.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/executor_work_guard.hpp"
+#include "asio/prefer.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+
+class executor;
+class io_context;
+
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+class any_completion_executor;
+class any_io_executor;
+
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+namespace execution {
+
+template <typename...> class any_executor;
+
+} // namespace execution
namespace detail {
-// A helper class template to allow completion handlers to be dispatched
-// through either the new executors framework or the old invocaton hook. The
-// primary template uses the new executors framework.
-template <typename Handler, typename Executor
- = typename associated_executor<Handler>::type>
-class handler_work
+template <typename Executor, typename CandidateExecutor = void,
+ typename IoContext = io_context,
+ typename PolymorphicExecutor = executor, typename = void>
+class handler_work_base
{
public:
- explicit handler_work(Handler& handler) ASIO_NOEXCEPT
- : executor_(associated_executor<Handler>::get(handler))
+ explicit handler_work_base(int, int, const Executor& ex) noexcept
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
}
- static void start(Handler& handler) ASIO_NOEXCEPT
+ template <typename OtherExecutor>
+ handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
+ const OtherExecutor& /*candidate*/) noexcept
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
- Executor ex(associated_executor<Handler>::get(handler));
- ex.on_work_started();
}
- ~handler_work()
+ handler_work_base(const handler_work_base& other) noexcept
+ : executor_(other.executor_)
{
- executor_.on_work_finished();
}
- template <typename Function>
- void complete(Function& function, Handler& handler)
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<executor_type&&>(other.executor_))
+ {
+ }
+
+ bool owns_work() const noexcept
+ {
+ return true;
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
{
- executor_.dispatch(ASIO_MOVE_CAST(Function)(function),
- associated_allocator<Handler>::get(handler));
+ asio::prefer(executor_,
+ execution::allocator((get_associated_allocator)(handler))
+ ).execute(static_cast<Function&&>(function));
}
private:
- // Disallow copying and assignment.
- handler_work(const handler_work&);
- handler_work& operator=(const handler_work&);
+ typedef decay_t<
+ prefer_result_t<Executor, execution::outstanding_work_t::tracked_t>
+ > executor_type;
+
+ executor_type executor_;
+};
+
+template <typename Executor, typename CandidateExecutor,
+ typename IoContext, typename PolymorphicExecutor>
+class handler_work_base<Executor, CandidateExecutor,
+ IoContext, PolymorphicExecutor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ && (!is_same<Executor, PolymorphicExecutor>::value
+ || !is_same<CandidateExecutor, void>::value)
+ >
+ >
+{
+public:
+ explicit handler_work_base(int, int, const Executor& ex) noexcept
+ : executor_(ex),
+ owns_work_(true)
+ {
+ executor_.on_work_started();
+ }
+
+ handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
+ const Executor& candidate) noexcept
+ : executor_(ex),
+ owns_work_(ex != candidate)
+ {
+ if (owns_work_)
+ executor_.on_work_started();
+ }
+
+ template <typename OtherExecutor>
+ handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
+ const OtherExecutor& /*candidate*/) noexcept
+ : executor_(ex),
+ owns_work_(true)
+ {
+ executor_.on_work_started();
+ }
+
+ handler_work_base(const handler_work_base& other) noexcept
+ : executor_(other.executor_),
+ owns_work_(other.owns_work_)
+ {
+ if (owns_work_)
+ executor_.on_work_started();
+ }
+
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
+ owns_work_(other.owns_work_)
+ {
+ other.owns_work_ = false;
+ }
+
+ ~handler_work_base()
+ {
+ if (owns_work_)
+ executor_.on_work_finished();
+ }
+
+ bool owns_work() const noexcept
+ {
+ return owns_work_;
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ executor_.dispatch(static_cast<Function&&>(function),
+ asio::get_associated_allocator(handler));
+ }
- typename associated_executor<Handler>::type executor_;
+private:
+ Executor executor_;
+ bool owns_work_;
+};
+
+template <typename Executor, typename IoContext, typename PolymorphicExecutor>
+class handler_work_base<Executor, void, IoContext, PolymorphicExecutor,
+ enable_if_t<
+ is_same<
+ Executor,
+ typename IoContext::executor_type
+ >::value
+ >
+ >
+{
+public:
+ explicit handler_work_base(int, int, const Executor&)
+ {
+ }
+
+ bool owns_work() const noexcept
+ {
+ return false;
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler&)
+ {
+ // When using a native implementation, I/O completion handlers are
+ // already dispatched according to the execution context's executor's
+ // rules. We can call the function directly.
+ static_cast<Function&&>(function)();
+ }
+};
+
+template <typename Executor, typename IoContext>
+class handler_work_base<Executor, void, IoContext, Executor>
+{
+public:
+ explicit handler_work_base(int, int, const Executor& ex) noexcept
+#if !defined(ASIO_NO_TYPEID)
+ : executor_(
+ ex.target_type() == typeid(typename IoContext::executor_type)
+ ? Executor() : ex)
+#else // !defined(ASIO_NO_TYPEID)
+ : executor_(ex)
+#endif // !defined(ASIO_NO_TYPEID)
+ {
+ if (executor_)
+ executor_.on_work_started();
+ }
+
+ handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
+ const Executor& candidate) noexcept
+ : executor_(ex != candidate ? ex : Executor())
+ {
+ if (executor_)
+ executor_.on_work_started();
+ }
+
+ template <typename OtherExecutor>
+ handler_work_base(const Executor& ex,
+ const OtherExecutor&) noexcept
+ : executor_(ex)
+ {
+ executor_.on_work_started();
+ }
+
+ handler_work_base(const handler_work_base& other) noexcept
+ : executor_(other.executor_)
+ {
+ if (executor_)
+ executor_.on_work_started();
+ }
+
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_))
+ {
+ }
+
+ ~handler_work_base()
+ {
+ if (executor_)
+ executor_.on_work_finished();
+ }
+
+ bool owns_work() const noexcept
+ {
+ return !!executor_;
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ executor_.dispatch(static_cast<Function&&>(function),
+ asio::get_associated_allocator(handler));
+ }
+
+private:
+ Executor executor_;
};
-// This specialisation dispatches a handler through the old invocation hook.
-// The specialisation is not strictly required for correctness, as the
-// system_executor will dispatch through the hook anyway. However, by doing
-// this we avoid an extra copy of the handler.
-template <typename Handler>
-class handler_work<Handler, system_executor>
+template <typename... SupportableProperties, typename CandidateExecutor,
+ typename IoContext, typename PolymorphicExecutor>
+class handler_work_base<execution::any_executor<SupportableProperties...>,
+ CandidateExecutor, IoContext, PolymorphicExecutor>
{
public:
- explicit handler_work(Handler&) ASIO_NOEXCEPT {}
- static void start(Handler&) ASIO_NOEXCEPT {}
- ~handler_work() {}
+ typedef execution::any_executor<SupportableProperties...> executor_type;
+
+ explicit handler_work_base(int, int, const executor_type& ex) noexcept
+#if !defined(ASIO_NO_TYPEID)
+ : executor_(
+ ex.target_type() == typeid(typename IoContext::executor_type)
+ ? executor_type()
+ : asio::prefer(ex, execution::outstanding_work.tracked))
+#else // !defined(ASIO_NO_TYPEID)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+#endif // !defined(ASIO_NO_TYPEID)
+ {
+ }
+
+ handler_work_base(bool base1_owns_work, const executor_type& ex,
+ const executor_type& candidate) noexcept
+ : executor_(
+ !base1_owns_work && ex == candidate
+ ? executor_type()
+ : asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ template <typename OtherExecutor>
+ handler_work_base(bool /*base1_owns_work*/, const executor_type& ex,
+ const OtherExecutor& /*candidate*/) noexcept
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ handler_work_base(const handler_work_base& other) noexcept
+ : executor_(other.executor_)
+ {
+ }
+
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<executor_type&&>(other.executor_))
+ {
+ }
+
+ bool owns_work() const noexcept
+ {
+ return !!executor_;
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler&)
+ {
+ executor_.execute(static_cast<Function&&>(function));
+ }
+
+private:
+ executor_type executor_;
+};
+
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+template <typename Executor, typename CandidateExecutor,
+ typename IoContext, typename PolymorphicExecutor>
+class handler_work_base<
+ Executor, CandidateExecutor,
+ IoContext, PolymorphicExecutor,
+ enable_if_t<
+ is_same<Executor, any_completion_executor>::value
+ || is_same<Executor, any_io_executor>::value
+ >
+ >
+{
+public:
+ typedef Executor executor_type;
+
+ explicit handler_work_base(int, int,
+ const executor_type& ex) noexcept
+#if !defined(ASIO_NO_TYPEID)
+ : executor_(
+ ex.target_type() == typeid(typename IoContext::executor_type)
+ ? executor_type()
+ : asio::prefer(ex, execution::outstanding_work.tracked))
+#else // !defined(ASIO_NO_TYPEID)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+#endif // !defined(ASIO_NO_TYPEID)
+ {
+ }
+
+ handler_work_base(bool base1_owns_work, const executor_type& ex,
+ const executor_type& candidate) noexcept
+ : executor_(
+ !base1_owns_work && ex == candidate
+ ? executor_type()
+ : asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ template <typename OtherExecutor>
+ handler_work_base(bool /*base1_owns_work*/, const executor_type& ex,
+ const OtherExecutor& /*candidate*/) noexcept
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ handler_work_base(const handler_work_base& other) noexcept
+ : executor_(other.executor_)
+ {
+ }
+
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<executor_type&&>(other.executor_))
+ {
+ }
+
+ bool owns_work() const noexcept
+ {
+ return !!executor_;
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler&)
+ {
+ executor_.execute(static_cast<Function&&>(function));
+ }
+
+private:
+ executor_type executor_;
+};
+
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+template <typename Handler, typename IoExecutor, typename = void>
+class handler_work :
+ handler_work_base<IoExecutor>,
+ handler_work_base<associated_executor_t<Handler, IoExecutor>, IoExecutor>
+{
+public:
+ typedef handler_work_base<IoExecutor> base1_type;
+ typedef handler_work_base<associated_executor_t<Handler, IoExecutor>,
+ IoExecutor> base2_type;
+
+ handler_work(Handler& handler, const IoExecutor& io_ex) noexcept
+ : base1_type(0, 0, io_ex),
+ base2_type(base1_type::owns_work(),
+ asio::get_associated_executor(handler, io_ex), io_ex)
+ {
+ }
+
+ template <typename Function>
+ void complete(Function& function, Handler& handler)
+ {
+ if (!base1_type::owns_work() && !base2_type::owns_work())
+ {
+ // When using a native implementation, I/O completion handlers are
+ // already dispatched according to the execution context's executor's
+ // rules. We can call the function directly.
+ static_cast<Function&&>(function)();
+ }
+ else
+ {
+ base2_type::dispatch(function, handler);
+ }
+ }
+};
+
+template <typename Handler, typename IoExecutor>
+class handler_work<
+ Handler, IoExecutor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ IoExecutor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >
+ > : handler_work_base<IoExecutor>
+{
+public:
+ typedef handler_work_base<IoExecutor> base1_type;
+
+ handler_work(Handler&, const IoExecutor& io_ex) noexcept
+ : base1_type(0, 0, io_ex)
+ {
+ }
template <typename Function>
void complete(Function& function, Handler& handler)
{
- asio_handler_invoke_helpers::invoke(function, handler);
+ if (!base1_type::owns_work())
+ {
+ // When using a native implementation, I/O completion handlers are
+ // already dispatched according to the execution context's executor's
+ // rules. We can call the function directly.
+ static_cast<Function&&>(function)();
+ }
+ else
+ {
+ base1_type::dispatch(function, handler);
+ }
+ }
+};
+
+template <typename Handler, typename IoExecutor>
+class immediate_handler_work
+{
+public:
+ typedef handler_work<Handler, IoExecutor> handler_work_type;
+
+ explicit immediate_handler_work(handler_work_type&& w)
+ : handler_work_(static_cast<handler_work_type&&>(w))
+ {
+ }
+
+ template <typename Function>
+ void complete(Function& function, Handler& handler, const void* io_ex)
+ {
+ typedef associated_immediate_executor_t<Handler, IoExecutor>
+ immediate_ex_type;
+
+ immediate_ex_type immediate_ex = (get_associated_immediate_executor)(
+ handler, *static_cast<const IoExecutor*>(io_ex));
+
+ (initiate_dispatch_with_executor<immediate_ex_type>(immediate_ex))(
+ static_cast<Function&&>(function));
}
private:
- // Disallow copying and assignment.
- handler_work(const handler_work&);
- handler_work& operator=(const handler_work&);
+ handler_work_type handler_work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/hash_map.hpp b/3rdparty/asio/include/asio/detail/hash_map.hpp
index 8c52edcd3f1..e23de914a18 100644
--- a/3rdparty/asio/include/asio/detail/hash_map.hpp
+++ b/3rdparty/asio/include/asio/detail/hash_map.hpp
@@ -2,7 +2,7 @@
// detail/hash_map.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp b/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
index 9bf955f917c..372ce426e57 100644
--- a/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
@@ -2,7 +2,7 @@
// detail/impl/buffer_sequence_adapter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp b/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp
index 07355e83eae..c56a512e462 100644
--- a/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp
@@ -2,7 +2,7 @@
// detail/impl/descriptor_ops.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -32,10 +32,16 @@ namespace descriptor_ops {
int open(const char* path, int flags, asio::error_code& ec)
{
- errno = 0;
- int result = error_wrapper(::open(path, flags), ec);
- if (result >= 0)
- ec = asio::error_code();
+ int result = ::open(path, flags);
+ get_last_error(ec, result < 0);
+ return result;
+}
+
+int open(const char* path, int flags,
+ unsigned mode, asio::error_code& ec)
+{
+ int result = ::open(path, flags, mode);
+ get_last_error(ec, result < 0);
return result;
}
@@ -44,8 +50,8 @@ int close(int d, state_type& state, asio::error_code& ec)
int result = 0;
if (d != -1)
{
- errno = 0;
- result = error_wrapper(::close(d), ec);
+ result = ::close(d);
+ get_last_error(ec, result < 0);
if (result != 0
&& (ec == asio::error::would_block
@@ -57,23 +63,39 @@ int close(int d, state_type& state, asio::error_code& ec)
// current OS where this behaviour is seen, Windows, says that the socket
// remains open. Therefore we'll put the descriptor back into blocking
// mode and have another attempt at closing it.
-#if defined(__SYMBIAN32__)
+#if defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
int flags = ::fcntl(d, F_GETFL, 0);
if (flags >= 0)
::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
-#else // defined(__SYMBIAN32__)
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = 0;
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ result = ::ioctl(d, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ int flags = ::fcntl(d, F_GETFL, 0);
+ if (flags >= 0)
+ ::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
+ }
+# else // defined(ENOTTY) || defined(ENOTCAPABLE)
::ioctl(d, FIONBIO, &arg);
-#endif // defined(__SYMBIAN32__)
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
+#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
state &= ~non_blocking;
- errno = 0;
- result = error_wrapper(::close(d), ec);
+ result = ::close(d);
+ get_last_error(ec, result < 0);
}
}
- if (result == 0)
- ec = asio::error_code();
return result;
}
@@ -86,23 +108,43 @@ bool set_user_non_blocking(int d, state_type& state,
return false;
}
- errno = 0;
-#if defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(d, F_GETFL, 0), ec);
+#if defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
+ int result = ::fcntl(d, F_GETFL, 0);
+ get_last_error(ec, result < 0);
if (result >= 0)
{
- errno = 0;
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(d, F_SETFL, flag), ec);
+ result = ::fcntl(d, F_SETFL, flag);
+ get_last_error(ec, result < 0);
}
-#else // defined(__SYMBIAN32__)
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(d, FIONBIO, &arg), ec);
-#endif // defined(__SYMBIAN32__)
+ int result = ::ioctl(d, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(d, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = ::fcntl(d, F_SETFL, flag);
+ get_last_error(ec, result < 0);
+ }
+ }
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
+#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
{
- ec = asio::error_code();
if (value)
state |= user_set_non_blocking;
else
@@ -136,23 +178,43 @@ bool set_internal_non_blocking(int d, state_type& state,
return false;
}
- errno = 0;
-#if defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(d, F_GETFL, 0), ec);
+#if defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
+ int result = ::fcntl(d, F_GETFL, 0);
+ get_last_error(ec, result < 0);
if (result >= 0)
{
- errno = 0;
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(d, F_SETFL, flag), ec);
+ result = ::fcntl(d, F_SETFL, flag);
+ get_last_error(ec, result < 0);
}
-#else // defined(__SYMBIAN32__)
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(d, FIONBIO, &arg), ec);
-#endif // defined(__SYMBIAN32__)
+ int result = ::ioctl(d, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(d, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = ::fcntl(d, F_SETFL, flag);
+ get_last_error(ec, result < 0);
+ }
+ }
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
+#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
{
- ec = asio::error_code();
if (value)
state |= internal_non_blocking;
else
@@ -175,7 +237,53 @@ std::size_t sync_read(int d, state_type state, buf* bufs,
// A request to read 0 bytes on a stream is a no-op.
if (all_empty)
{
- ec = asio::error_code();
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::readv(d, bufs, static_cast<int>(count));
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return 0;
+ }
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_read(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+std::size_t sync_read1(int d, state_type state, void* data,
+ std::size_t size, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (size == 0)
+ {
+ asio::error::clear(ec);
return 0;
}
@@ -183,9 +291,8 @@ std::size_t sync_read(int d, state_type state, buf* bufs,
for (;;)
{
// Try to complete the operation without blocking.
- errno = 0;
- signed_size_type bytes = error_wrapper(::readv(
- d, bufs, static_cast<int>(count)), ec);
+ signed_size_type bytes = ::read(d, data, size);
+ get_last_error(ec, bytes < 0);
// Check if operation succeeded.
if (bytes > 0)
@@ -216,9 +323,8 @@ bool non_blocking_read(int d, buf* bufs, std::size_t count,
for (;;)
{
// Read some data.
- errno = 0;
- signed_size_type bytes = error_wrapper(::readv(
- d, bufs, static_cast<int>(count)), ec);
+ signed_size_type bytes = ::readv(d, bufs, static_cast<int>(count));
+ get_last_error(ec, bytes < 0);
// Check for end of stream.
if (bytes == 0)
@@ -227,6 +333,13 @@ bool non_blocking_read(int d, buf* bufs, std::size_t count,
return true;
}
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
continue;
@@ -236,15 +349,46 @@ bool non_blocking_read(int d, buf* bufs, std::size_t count,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_read1(int d, void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = ::read(d, data, size);
+ get_last_error(ec, bytes < 0);
+
+ // Check for end of stream.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return true;
+ }
+
+ // Check if operation succeeded.
if (bytes > 0)
{
- ec = asio::error_code();
bytes_transferred = bytes;
+ return true;
}
- else
- bytes_transferred = 0;
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
@@ -261,7 +405,46 @@ std::size_t sync_write(int d, state_type state, const buf* bufs,
// A request to write 0 bytes on a stream is a no-op.
if (all_empty)
{
- ec = asio::error_code();
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::writev(d, bufs, static_cast<int>(count));
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_write(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+std::size_t sync_write1(int d, state_type state, const void* data,
+ std::size_t size, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a stream is a no-op.
+ if (size == 0)
+ {
+ asio::error::clear(ec);
return 0;
}
@@ -269,9 +452,8 @@ std::size_t sync_write(int d, state_type state, const buf* bufs,
for (;;)
{
// Try to complete the operation without blocking.
- errno = 0;
- signed_size_type bytes = error_wrapper(::writev(
- d, bufs, static_cast<int>(count)), ec);
+ signed_size_type bytes = ::write(d, data, size);
+ get_last_error(ec, bytes < 0);
// Check if operation succeeded.
if (bytes > 0)
@@ -295,9 +477,15 @@ bool non_blocking_write(int d, const buf* bufs, std::size_t count,
for (;;)
{
// Write some data.
- errno = 0;
- signed_size_type bytes = error_wrapper(::writev(
- d, bufs, static_cast<int>(count)), ec);
+ signed_size_type bytes = ::writev(d, bufs, static_cast<int>(count));
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
@@ -308,19 +496,360 @@ bool non_blocking_write(int d, const buf* bufs, std::size_t count,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_write1(int d, const void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = ::write(d, data, size);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
if (bytes >= 0)
{
- ec = asio::error_code();
bytes_transferred = bytes;
+ return true;
}
- else
- bytes_transferred = 0;
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
+#if defined(ASIO_HAS_FILE)
+
+std::size_t sync_read_at(int d, state_type state, uint64_t offset,
+ buf* bufs, std::size_t count, bool all_empty, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (all_empty)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::preadv(d, bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return 0;
+ }
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_read(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+std::size_t sync_read_at1(int d, state_type state, uint64_t offset,
+ void* data, std::size_t size, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (size == 0)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::pread(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return 0;
+ }
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_read(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+bool non_blocking_read_at(int d, uint64_t offset, buf* bufs, std::size_t count,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = ::preadv(d, bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return true;
+ }
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_read_at1(int d, uint64_t offset, void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = ::pread(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return true;
+ }
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+std::size_t sync_write_at(int d, state_type state, uint64_t offset,
+ const buf* bufs, std::size_t count, bool all_empty,
+ asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a stream is a no-op.
+ if (all_empty)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::pwritev(d,
+ bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_write(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+std::size_t sync_write_at1(int d, state_type state, uint64_t offset,
+ const void* data, std::size_t size, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a stream is a no-op.
+ if (size == 0)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::pwrite(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_write(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+bool non_blocking_write_at(int d, uint64_t offset,
+ const buf* bufs, std::size_t count,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = ::pwritev(d,
+ bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_write_at1(int d, uint64_t offset,
+ const void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = ::pwrite(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+#endif // defined(ASIO_HAS_FILE)
+
int ioctl(int d, state_type& state, long cmd,
ioctl_arg_type* arg, asio::error_code& ec)
{
@@ -330,13 +859,11 @@ int ioctl(int d, state_type& state, long cmd,
return -1;
}
- errno = 0;
- int result = error_wrapper(::ioctl(d, cmd, arg), ec);
+ int result = ::ioctl(d, cmd, arg);
+ get_last_error(ec, result < 0);
if (result >= 0)
{
- ec = asio::error_code();
-
// When updating the non-blocking mode we always perform the ioctl syscall,
// even if the flags would otherwise indicate that the descriptor is
// already in the correct state. This ensures that the underlying
@@ -370,10 +897,8 @@ int fcntl(int d, int cmd, asio::error_code& ec)
return -1;
}
- errno = 0;
- int result = error_wrapper(::fcntl(d, cmd), ec);
- if (result != -1)
- ec = asio::error_code();
+ int result = ::fcntl(d, cmd);
+ get_last_error(ec, result < 0);
return result;
}
@@ -385,10 +910,8 @@ int fcntl(int d, int cmd, long arg, asio::error_code& ec)
return -1;
}
- errno = 0;
- int result = error_wrapper(::fcntl(d, cmd, arg), ec);
- if (result != -1)
- ec = asio::error_code();
+ int result = ::fcntl(d, cmd, arg);
+ get_last_error(ec, result < 0);
return result;
}
@@ -405,13 +928,11 @@ int poll_read(int d, state_type state, asio::error_code& ec)
fds.events = POLLIN;
fds.revents = 0;
int timeout = (state & user_set_non_blocking) ? 0 : -1;
- errno = 0;
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ int result = ::poll(&fds, 1, timeout);
+ get_last_error(ec, result < 0);
if (result == 0)
- ec = (state & user_set_non_blocking)
- ? asio::error::would_block : asio::error_code();
- else if (result > 0)
- ec = asio::error_code();
+ if (state & user_set_non_blocking)
+ ec = asio::error::would_block;
return result;
}
@@ -428,13 +949,11 @@ int poll_write(int d, state_type state, asio::error_code& ec)
fds.events = POLLOUT;
fds.revents = 0;
int timeout = (state & user_set_non_blocking) ? 0 : -1;
- errno = 0;
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ int result = ::poll(&fds, 1, timeout);
+ get_last_error(ec, result < 0);
if (result == 0)
- ec = (state & user_set_non_blocking)
- ? asio::error::would_block : asio::error_code();
- else if (result > 0)
- ec = asio::error_code();
+ if (state & user_set_non_blocking)
+ ec = asio::error::would_block;
return result;
}
@@ -451,13 +970,11 @@ int poll_error(int d, state_type state, asio::error_code& ec)
fds.events = POLLPRI | POLLERR | POLLHUP;
fds.revents = 0;
int timeout = (state & user_set_non_blocking) ? 0 : -1;
- errno = 0;
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ int result = ::poll(&fds, 1, timeout);
+ get_last_error(ec, result < 0);
if (result == 0)
- ec = (state & user_set_non_blocking)
- ? asio::error::would_block : asio::error_code();
- else if (result > 0)
- ec = asio::error_code();
+ if (state & user_set_non_blocking)
+ ec = asio::error::would_block;
return result;
}
diff --git a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp
index f6c00a51583..b483e44fd1c 100644
--- a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/dev_poll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,11 +19,19 @@
#if defined(ASIO_HAS_DEV_POLL)
+#include "asio/detail/scheduler.hpp"
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+inline void dev_poll_reactor::post_immediate_completion(
+ operation* op, bool is_continuation) const
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
template <typename Time_Traits>
void dev_poll_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
{
@@ -69,6 +77,18 @@ std::size_t dev_poll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
}
template <typename Time_Traits>
+void dev_poll_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
void dev_poll_reactor::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& target,
typename timer_queue<Time_Traits>::per_timer_data& source)
diff --git a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp
index ac0cedea65b..c9c53fbeafd 100644
--- a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/dev_poll_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,6 +21,7 @@
#include "asio/detail/dev_poll_reactor.hpp"
#include "asio/detail/assert.hpp"
+#include "asio/detail/scheduler.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
@@ -67,7 +68,8 @@ void dev_poll_reactor::shutdown()
scheduler_.abandon_operations(ops);
}
-void dev_poll_reactor::notify_fork(asio::io_context::fork_event fork_ev)
+void dev_poll_reactor::notify_fork(
+ asio::execution_context::fork_event fork_ev)
{
if (fork_ev == asio::execution_context::fork_child)
{
@@ -146,15 +148,24 @@ void dev_poll_reactor::move_descriptor(socket_type,
{
}
+void dev_poll_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const dev_poll_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void dev_poll_reactor::start_op(int op_type, socket_type descriptor,
dev_poll_reactor::per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool allow_speculative)
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
asio::detail::mutex::scoped_lock lock(mutex_);
if (shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -167,7 +178,7 @@ void dev_poll_reactor::start_op(int op_type, socket_type descriptor,
if (op->perform())
{
lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
@@ -200,6 +211,19 @@ void dev_poll_reactor::cancel_ops(socket_type descriptor,
cancel_ops_unlocked(descriptor, asio::error::operation_aborted);
}
+void dev_poll_reactor::cancel_ops_by_key(socket_type descriptor,
+ dev_poll_reactor::per_descriptor_data&,
+ int op_type, void* cancellation_key)
+{
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ bool need_interrupt = op_queue_[op_type].cancel_operations_by_key(
+ descriptor, ops, cancellation_key, asio::error::operation_aborted);
+ scheduler_.post_deferred_completions(ops);
+ if (need_interrupt)
+ interrupter_.interrupt();
+}
+
void dev_poll_reactor::deregister_descriptor(socket_type descriptor,
dev_poll_reactor::per_descriptor_data&, bool)
{
@@ -234,13 +258,18 @@ void dev_poll_reactor::deregister_internal_descriptor(
op_queue_[i].cancel_operations(descriptor, ops, ec);
}
+void dev_poll_reactor::cleanup_descriptor_data(
+ dev_poll_reactor::per_descriptor_data&)
+{
+}
+
void dev_poll_reactor::run(long usec, op_queue<operation>& ops)
{
asio::detail::mutex::scoped_lock lock(mutex_);
// We can return immediately if there's no work to do and the reactor is
// not supposed to block.
- if (!block && op_queue_[read_op].empty() && op_queue_[write_op].empty()
+ if (usec == 0 && op_queue_[read_op].empty() && op_queue_[write_op].empty()
&& op_queue_[except_op].empty() && timer_queues_.all_empty())
return;
diff --git a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp
index a90665405b0..4fffeb75924 100644
--- a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/epoll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,11 +17,19 @@
#if defined(ASIO_HAS_EPOLL)
+#include "asio/detail/scheduler.hpp"
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+inline void epoll_reactor::post_immediate_completion(
+ operation* op, bool is_continuation) const
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
template <typename Time_Traits>
void epoll_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
{
@@ -67,6 +75,18 @@ std::size_t epoll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
}
template <typename Time_Traits>
+void epoll_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
void epoll_reactor::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& target,
typename timer_queue<Time_Traits>::per_timer_data& source)
diff --git a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp
index 382061ed90d..51795bda40c 100644
--- a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/epoll_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,6 +22,7 @@
#include <cstddef>
#include <sys/epoll.h>
#include "asio/detail/epoll_reactor.hpp"
+#include "asio/detail/scheduler.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
@@ -38,7 +39,7 @@ epoll_reactor::epoll_reactor(asio::execution_context& ctx)
: execution_context_service_base<epoll_reactor>(ctx),
scheduler_(use_service<scheduler>(ctx)),
mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
- SCHEDULER, scheduler_.concurrency_hint())),
+ REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
interrupter_(),
epoll_fd_(do_epoll_create()),
timer_fd_(do_timerfd_create()),
@@ -228,14 +229,23 @@ void epoll_reactor::move_descriptor(socket_type,
source_descriptor_data = 0;
}
+void epoll_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const epoll_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void epoll_reactor::start_op(int op_type, socket_type descriptor,
epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative)
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
if (!descriptor_data)
{
op->ec_ = asio::error::bad_descriptor;
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -243,7 +253,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -261,7 +271,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->registered_events_ != 0)
descriptor_data->try_speculative_[op_type] = false;
descriptor_lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
@@ -269,7 +279,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->registered_events_ == 0)
{
op->ec_ = asio::error::operation_not_supported;
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -288,7 +298,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
{
op->ec_ = asio::error_code(errno,
asio::error::get_system_category());
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
@@ -297,7 +307,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
else if (descriptor_data->registered_events_ == 0)
{
op->ec_ = asio::error::operation_not_supported;
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
else
@@ -342,6 +352,35 @@ void epoll_reactor::cancel_ops(socket_type,
scheduler_.post_deferred_completions(ops);
}
+void epoll_reactor::cancel_ops_by_key(socket_type,
+ epoll_reactor::per_descriptor_data& descriptor_data,
+ int op_type, void* cancellation_key)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ op_queue<operation> ops;
+ op_queue<reactor_op> other_ops;
+ while (reactor_op* op = descriptor_data->op_queue_[op_type].front())
+ {
+ descriptor_data->op_queue_[op_type].pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ else
+ other_ops.push(op);
+ }
+ descriptor_data->op_queue_[op_type].push(other_ops);
+
+ descriptor_lock.unlock();
+
+ scheduler_.post_deferred_completions(ops);
+}
+
void epoll_reactor::deregister_descriptor(socket_type descriptor,
epoll_reactor::per_descriptor_data& descriptor_data, bool closing)
{
@@ -383,10 +422,16 @@ void epoll_reactor::deregister_descriptor(socket_type descriptor,
context(), static_cast<uintmax_t>(descriptor),
reinterpret_cast<uintmax_t>(descriptor_data)));
- free_descriptor_state(descriptor_data);
- descriptor_data = 0;
-
scheduler_.post_deferred_completions(ops);
+
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
}
}
@@ -416,6 +461,22 @@ void epoll_reactor::deregister_internal_descriptor(socket_type descriptor,
context(), static_cast<uintmax_t>(descriptor),
reinterpret_cast<uintmax_t>(descriptor_data)));
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
+ }
+}
+
+void epoll_reactor::cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data)
+{
+ if (descriptor_data)
+ {
free_descriptor_state(descriptor_data);
descriptor_data = 0;
}
@@ -462,6 +523,7 @@ void epoll_reactor::run(long usec, op_queue<operation>& ops)
// Ignore.
}
# endif // defined(ASIO_HAS_TIMERFD)
+ else
{
unsigned event_mask = 0;
if ((events[i].events & EPOLLIN) != 0)
@@ -512,8 +574,15 @@ void epoll_reactor::run(long usec, op_queue<operation>& ops)
// don't call work_started() here. This still allows the scheduler to
// stop if the only remaining operations are descriptor operations.
descriptor_state* descriptor_data = static_cast<descriptor_state*>(ptr);
- descriptor_data->set_ready_events(events[i].events);
- ops.push(descriptor_data);
+ if (!ops.is_enqueued(descriptor_data))
+ {
+ descriptor_data->set_ready_events(events[i].events);
+ ops.push(descriptor_data);
+ }
+ else
+ {
+ descriptor_data->add_ready_events(events[i].events);
+ }
}
}
@@ -594,7 +663,8 @@ int epoll_reactor::do_timerfd_create()
epoll_reactor::descriptor_state* epoll_reactor::allocate_descriptor_state()
{
mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- return registered_descriptors_.alloc(registered_descriptors_mutex_.enabled());
+ return registered_descriptors_.alloc(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, scheduler_.concurrency_hint()));
}
void epoll_reactor::free_descriptor_state(epoll_reactor::descriptor_state* s)
diff --git a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
index 152bffd213a..2e970d8850b 100644
--- a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/eventfd_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -23,11 +23,11 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
# include <asm/unistd.h>
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
# include <sys/eventfd.h>
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
#include "asio/detail/cstdint.hpp"
#include "asio/detail/eventfd_select_interrupter.hpp"
#include "asio/detail/throw_error.hpp"
@@ -45,14 +45,14 @@ eventfd_select_interrupter::eventfd_select_interrupter()
void eventfd_select_interrupter::open_descriptors()
{
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
if (read_descriptor_ != -1)
{
::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
}
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
write_descriptor_ = read_descriptor_ =
::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
@@ -69,7 +69,7 @@ void eventfd_select_interrupter::open_descriptors()
::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
}
}
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
if (read_descriptor_ == -1)
{
@@ -134,8 +134,7 @@ bool eventfd_select_interrupter::reset()
int bytes_read = ::read(read_descriptor_, &counter, sizeof(uint64_t));
if (bytes_read < 0 && errno == EINTR)
continue;
- bool was_interrupted = (bytes_read > 0);
- return was_interrupted;
+ return true;
}
}
else
@@ -145,12 +144,19 @@ bool eventfd_select_interrupter::reset()
// Clear all data from the pipe.
char data[1024];
int bytes_read = ::read(read_descriptor_, data, sizeof(data));
- if (bytes_read < 0 && errno == EINTR)
+ if (bytes_read == sizeof(data))
+ continue;
+ if (bytes_read > 0)
+ return true;
+ if (bytes_read == 0)
+ return false;
+ if (errno == EINTR)
continue;
- bool was_interrupted = (bytes_read > 0);
- while (bytes_read == sizeof(data))
- bytes_read = ::read(read_descriptor_, data, sizeof(data));
- return was_interrupted;
+ if (errno == EWOULDBLOCK)
+ return true;
+ if (errno == EAGAIN)
+ return true;
+ return false;
}
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp b/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp
index 7e628d0b5f1..f4e3e3b501a 100644
--- a/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp
@@ -2,7 +2,7 @@
// detail/impl/handler_tracking.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -29,7 +29,7 @@
#if defined(ASIO_HAS_BOOST_DATE_TIME)
# include "asio/time_traits.hpp"
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
# include "asio/detail/chrono.hpp"
# include "asio/detail/chrono_time_traits.hpp"
# include "asio/wait_traits.hpp"
@@ -57,12 +57,12 @@ struct handler_tracking_timestamp
boost::posix_time::ptime epoch(boost::gregorian::date(1970, 1, 1));
boost::posix_time::time_duration now =
boost::posix_time::microsec_clock::universal_time() - epoch;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef chrono_time_traits<chrono::system_clock,
- asio::wait_traits<chrono::system_clock> > traits_helper;
+ asio::wait_traits<chrono::system_clock>> traits_helper;
traits_helper::posix_time_duration now(
chrono::system_clock::now().time_since_epoch());
-#endif
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
seconds = static_cast<uint64_t>(now.total_seconds());
microseconds = static_cast<uint64_t>(now.total_microseconds() % 1000000);
}
@@ -73,11 +73,12 @@ struct handler_tracking::tracking_state
static_mutex mutex_;
uint64_t next_id_;
tss_ptr<completion>* current_completion_;
+ tss_ptr<location>* current_location_;
};
handler_tracking::tracking_state* handler_tracking::get_state()
{
- static tracking_state state = { ASIO_STATIC_MUTEX_INIT, 1, 0 };
+ static tracking_state state = { ASIO_STATIC_MUTEX_INIT, 1, 0, 0 };
return &state;
}
@@ -90,6 +91,25 @@ void handler_tracking::init()
static_mutex::scoped_lock lock(state->mutex_);
if (state->current_completion_ == 0)
state->current_completion_ = new tss_ptr<completion>;
+ if (state->current_location_ == 0)
+ state->current_location_ = new tss_ptr<location>;
+}
+
+handler_tracking::location::location(
+ const char* file, int line, const char* func)
+ : file_(file),
+ line_(line),
+ func_(func),
+ next_(*get_state()->current_location_)
+{
+ if (file_)
+ *get_state()->current_location_ = this;
+}
+
+handler_tracking::location::~location()
+{
+ if (file_)
+ *get_state()->current_location_ = next_;
}
void handler_tracking::creation(execution_context&,
@@ -109,6 +129,24 @@ void handler_tracking::creation(execution_context&,
if (completion* current_completion = *state->current_completion_)
current_id = current_completion->id_;
+ for (location* current_location = *state->current_location_;
+ current_location; current_location = current_location->next_)
+ {
+ write_line(
+#if defined(ASIO_WINDOWS)
+ "@asio|%I64u.%06I64u|%I64u^%I64u|%s%s%.80s%s(%.80s:%d)\n",
+#else // defined(ASIO_WINDOWS)
+ "@asio|%llu.%06llu|%llu^%llu|%s%s%.80s%s(%.80s:%d)\n",
+#endif // defined(ASIO_WINDOWS)
+ timestamp.seconds, timestamp.microseconds,
+ current_id, h.id_,
+ current_location == *state->current_location_ ? "in " : "called from ",
+ current_location->func_ ? "'" : "",
+ current_location->func_ ? current_location->func_ : "",
+ current_location->func_ ? "' " : "",
+ current_location->file_, current_location->line_);
+ }
+
write_line(
#if defined(ASIO_WINDOWS)
"@asio|%I64u.%06I64u|%I64u*%I64u|%.20s@%p.%.50s\n",
@@ -327,7 +365,9 @@ void handler_tracking::write_line(const char* format, ...)
va_start(args, format);
char line[256] = "";
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ int length = vsnprintf(line, sizeof(line), format, args);
+#elif defined(ASIO_HAS_SECURE_RTL)
int length = vsprintf_s(line, sizeof(line), format, args);
#else // defined(ASIO_HAS_SECURE_RTL)
int length = vsprintf(line, format, args);
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp
new file mode 100644
index 00000000000..21b9e232cfb
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp
@@ -0,0 +1,205 @@
+//
+// detail/impl/io_uring_descriptor_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_IO_URING_DESCRIPTOR_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_DESCRIPTOR_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/error.hpp"
+#include "asio/detail/io_uring_descriptor_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_descriptor_service::io_uring_descriptor_service(
+ execution_context& context)
+ : execution_context_service_base<io_uring_descriptor_service>(context),
+ io_uring_service_(asio::use_service<io_uring_service>(context))
+{
+ io_uring_service_.init_task();
+}
+
+void io_uring_descriptor_service::shutdown()
+{
+}
+
+void io_uring_descriptor_service::construct(
+ io_uring_descriptor_service::implementation_type& impl)
+{
+ impl.descriptor_ = -1;
+ impl.state_ = 0;
+ impl.io_object_data_ = 0;
+}
+
+void io_uring_descriptor_service::move_construct(
+ io_uring_descriptor_service::implementation_type& impl,
+ io_uring_descriptor_service::implementation_type& other_impl)
+ noexcept
+{
+ impl.descriptor_ = other_impl.descriptor_;
+ other_impl.descriptor_ = -1;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_descriptor_service::move_assign(
+ io_uring_descriptor_service::implementation_type& impl,
+ io_uring_descriptor_service& /*other_service*/,
+ io_uring_descriptor_service::implementation_type& other_impl)
+{
+ destroy(impl);
+
+ impl.descriptor_ = other_impl.descriptor_;
+ other_impl.descriptor_ = -1;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_descriptor_service::destroy(
+ io_uring_descriptor_service::implementation_type& impl)
+{
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ asio::error_code ignored_ec;
+ descriptor_ops::close(impl.descriptor_, impl.state_, ignored_ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+}
+
+asio::error_code io_uring_descriptor_service::assign(
+ io_uring_descriptor_service::implementation_type& impl,
+ const native_handle_type& native_descriptor, asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ io_uring_service_.register_io_object(impl.io_object_data_);
+
+ impl.descriptor_ = native_descriptor;
+ impl.state_ = descriptor_ops::possible_dup;
+ ec = success_ec_;
+ return ec;
+}
+
+asio::error_code io_uring_descriptor_service::close(
+ io_uring_descriptor_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ descriptor_ops::close(impl.descriptor_, impl.state_, ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+ else
+ {
+ ec = success_ec_;
+ }
+
+ // The descriptor is closed by the OS even if close() returns an error.
+ //
+ // (Actually, POSIX says the state of the descriptor is unspecified. On
+ // Linux the descriptor is apparently closed anyway; e.g. see
+ // http://lkml.org/lkml/2005/9/10/129
+ construct(impl);
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+io_uring_descriptor_service::native_handle_type
+io_uring_descriptor_service::release(
+ io_uring_descriptor_service::implementation_type& impl)
+{
+ native_handle_type descriptor = impl.descriptor_;
+
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "release"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ construct(impl);
+ }
+
+ return descriptor;
+}
+
+asio::error_code io_uring_descriptor_service::cancel(
+ io_uring_descriptor_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "cancel"));
+
+ io_uring_service_.cancel_ops(impl.io_object_data_);
+ ec = success_ec_;
+ return ec;
+}
+
+void io_uring_descriptor_service::start_op(
+ io_uring_descriptor_service::implementation_type& impl,
+ int op_type, io_uring_operation* op, bool is_continuation, bool noop)
+{
+ if (!noop)
+ {
+ io_uring_service_.start_op(op_type,
+ impl.io_object_data_, op, is_continuation);
+ }
+ else
+ {
+ io_uring_service_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_DESCRIPTOR_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp
new file mode 100644
index 00000000000..4742a7190d3
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp
@@ -0,0 +1,140 @@
+//
+// detail/impl/io_uring_file_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_IO_URING_FILE_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_FILE_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ && defined(ASIO_HAS_IO_URING)
+
+#include <cstring>
+#include <sys/stat.h>
+#include "asio/detail/io_uring_file_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_file_service::io_uring_file_service(
+ execution_context& context)
+ : execution_context_service_base<io_uring_file_service>(context),
+ descriptor_service_(context)
+{
+}
+
+void io_uring_file_service::shutdown()
+{
+ descriptor_service_.shutdown();
+}
+
+asio::error_code io_uring_file_service::open(
+ io_uring_file_service::implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ descriptor_ops::state_type state = 0;
+ int fd = descriptor_ops::open(path, static_cast<int>(open_flags), 0777, ec);
+ if (fd < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // We're done. Take ownership of the serial port descriptor.
+ if (descriptor_service_.assign(impl, fd, ec))
+ {
+ asio::error_code ignored_ec;
+ descriptor_ops::close(fd, state, ignored_ec);
+ }
+
+ (void)::posix_fadvise(native_handle(impl), 0, 0,
+ impl.is_stream_ ? POSIX_FADV_SEQUENTIAL : POSIX_FADV_RANDOM);
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+uint64_t io_uring_file_service::size(
+ const io_uring_file_service::implementation_type& impl,
+ asio::error_code& ec) const
+{
+ struct stat s;
+ int result = ::fstat(native_handle(impl), &s);
+ descriptor_ops::get_last_error(ec, result != 0);
+ ASIO_ERROR_LOCATION(ec);
+ return !ec ? s.st_size : 0;
+}
+
+asio::error_code io_uring_file_service::resize(
+ io_uring_file_service::implementation_type& impl,
+ uint64_t n, asio::error_code& ec)
+{
+ int result = ::ftruncate(native_handle(impl), n);
+ descriptor_ops::get_last_error(ec, result != 0);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+asio::error_code io_uring_file_service::sync_all(
+ io_uring_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ int result = ::fsync(native_handle(impl));
+ descriptor_ops::get_last_error(ec, result != 0);
+ return ec;
+}
+
+asio::error_code io_uring_file_service::sync_data(
+ io_uring_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+#if defined(_POSIX_SYNCHRONIZED_IO)
+ int result = ::fdatasync(native_handle(impl));
+#else // defined(_POSIX_SYNCHRONIZED_IO)
+ int result = ::fsync(native_handle(impl));
+#endif // defined(_POSIX_SYNCHRONIZED_IO)
+ descriptor_ops::get_last_error(ec, result != 0);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+uint64_t io_uring_file_service::seek(
+ io_uring_file_service::implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec)
+{
+ int64_t result = ::lseek(native_handle(impl), offset, whence);
+ descriptor_ops::get_last_error(ec, result < 0);
+ ASIO_ERROR_LOCATION(ec);
+ return !ec ? static_cast<uint64_t>(result) : 0;
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // && defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_FILE_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp b/3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp
new file mode 100644
index 00000000000..8dfab1e6d1d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp
@@ -0,0 +1,112 @@
+//
+// detail/impl/io_uring_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_IO_URING_SERVICE_HPP
+#define ASIO_DETAIL_IMPL_IO_URING_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/scheduler.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+inline void io_uring_service::post_immediate_completion(
+ operation* op, bool is_continuation)
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
+template <typename Time_Traits>
+void io_uring_service::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void io_uring_service::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void io_uring_service::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ {
+ update_timeout();
+ post_submit_sqes_op(lock);
+ }
+}
+
+template <typename Time_Traits>
+std::size_t io_uring_service::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void io_uring_service::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
+void io_uring_service::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(target, ops);
+ queue.move_timer(target, source);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp
new file mode 100644
index 00000000000..740010cda11
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp
@@ -0,0 +1,914 @@
+//
+// detail/impl/io_uring_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_IO_URING_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include <cstddef>
+#include <sys/eventfd.h>
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/reactor_op.hpp"
+#include "asio/detail/scheduler.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_service::io_uring_service(asio::execution_context& ctx)
+ : execution_context_service_base<io_uring_service>(ctx),
+ scheduler_(use_service<scheduler>(ctx)),
+ mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
+ outstanding_work_(0),
+ submit_sqes_op_(this),
+ pending_sqes_(0),
+ pending_submit_sqes_op_(false),
+ shutdown_(false),
+ timeout_(),
+ registration_mutex_(mutex_.enabled()),
+ reactor_(use_service<reactor>(ctx)),
+ reactor_data_(),
+ event_fd_(-1)
+{
+ reactor_.init_task();
+ init_ring();
+ register_with_reactor();
+}
+
+io_uring_service::~io_uring_service()
+{
+ if (ring_.ring_fd != -1)
+ ::io_uring_queue_exit(&ring_);
+ if (event_fd_ != -1)
+ ::close(event_fd_);
+}
+
+void io_uring_service::shutdown()
+{
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ lock.unlock();
+
+ op_queue<operation> ops;
+
+ // Cancel all outstanding operations.
+ while (io_object* io_obj = registered_io_objects_.first())
+ {
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (!io_obj->queues_[i].op_queue_.empty())
+ {
+ ops.push(io_obj->queues_[i].op_queue_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[i], 0);
+ }
+ }
+ io_obj->shutdown_ = true;
+ registered_io_objects_.free(io_obj);
+ }
+
+ // Cancel the timeout operation.
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &timeout_, IOSQE_IO_DRAIN);
+ submit_sqes();
+
+ // Wait for all completions to come back.
+ for (; outstanding_work_ > 0; --outstanding_work_)
+ {
+ ::io_uring_cqe* cqe = 0;
+ if (::io_uring_wait_cqe(&ring_, &cqe) != 0)
+ break;
+ }
+
+ timer_queues_.get_all_timers(ops);
+
+ scheduler_.abandon_operations(ops);
+}
+
+void io_uring_service::notify_fork(
+ asio::execution_context::fork_event fork_ev)
+{
+ switch (fork_ev)
+ {
+ case asio::execution_context::fork_prepare:
+ {
+ // Cancel all outstanding operations. They will be restarted
+ // after the fork completes.
+ mutex::scoped_lock registration_lock(registration_mutex_);
+ for (io_object* io_obj = registered_io_objects_.first();
+ io_obj != 0; io_obj = io_obj->next_)
+ {
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (!io_obj->queues_[i].op_queue_.empty()
+ && !io_obj->queues_[i].cancel_requested_)
+ {
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[i], 0);
+ }
+ }
+ }
+
+ // Cancel the timeout operation.
+ {
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &timeout_, IOSQE_IO_DRAIN);
+ submit_sqes();
+ }
+
+ // Wait for all completions to come back, and post all completed I/O
+ // queues to the scheduler. Note that some operations may have already
+ // completed, or were explicitly cancelled. All others will be
+ // automatically restarted.
+ op_queue<operation> ops;
+ for (; outstanding_work_ > 0; --outstanding_work_)
+ {
+ ::io_uring_cqe* cqe = 0;
+ if (::io_uring_wait_cqe(&ring_, &cqe) != 0)
+ break;
+ if (void* ptr = ::io_uring_cqe_get_data(cqe))
+ {
+ if (ptr != this && ptr != &timer_queues_ && ptr != &timeout_)
+ {
+ io_queue* io_q = static_cast<io_queue*>(ptr);
+ io_q->set_result(cqe->res);
+ ops.push(io_q);
+ }
+ }
+ }
+ scheduler_.post_deferred_completions(ops);
+
+ // Restart and eventfd operation.
+ register_with_reactor();
+ }
+ break;
+
+ case asio::execution_context::fork_parent:
+ // Restart the timeout and eventfd operations.
+ update_timeout();
+ register_with_reactor();
+ break;
+
+ case asio::execution_context::fork_child:
+ {
+ // The child process gets a new io_uring instance.
+ ::io_uring_queue_exit(&ring_);
+ init_ring();
+ register_with_reactor();
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void io_uring_service::init_task()
+{
+ scheduler_.init_task();
+}
+
+void io_uring_service::register_io_object(
+ io_uring_service::per_io_object_data& io_obj)
+{
+ io_obj = allocate_io_object();
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ io_obj->service_ = this;
+ io_obj->shutdown_ = false;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ io_obj->queues_[i].io_object_ = io_obj;
+ io_obj->queues_[i].cancel_requested_ = false;
+ }
+}
+
+void io_uring_service::register_internal_io_object(
+ io_uring_service::per_io_object_data& io_obj,
+ int op_type, io_uring_operation* op)
+{
+ io_obj = allocate_io_object();
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ io_obj->service_ = this;
+ io_obj->shutdown_ = false;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ io_obj->queues_[i].io_object_ = io_obj;
+ io_obj->queues_[i].cancel_requested_ = false;
+ }
+
+ io_obj->queues_[op_type].op_queue_.push(op);
+ io_object_lock.unlock();
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ op->prepare(sqe);
+ ::io_uring_sqe_set_data(sqe, &io_obj->queues_[op_type]);
+ post_submit_sqes_op(lock);
+ }
+ else
+ {
+ asio::error_code ec(ENOBUFS,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_get_sqe");
+ }
+}
+
+void io_uring_service::register_buffers(const ::iovec* v, unsigned n)
+{
+ int result = ::io_uring_register_buffers(&ring_, v, n);
+ if (result < 0)
+ {
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_register_buffers");
+ }
+}
+
+void io_uring_service::unregister_buffers()
+{
+ (void)::io_uring_unregister_buffers(&ring_);
+}
+
+void io_uring_service::start_op(int op_type,
+ io_uring_service::per_io_object_data& io_obj,
+ io_uring_operation* op, bool is_continuation)
+{
+ if (!io_obj)
+ {
+ op->ec_ = asio::error::bad_descriptor;
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ if (io_obj->shutdown_)
+ {
+ io_object_lock.unlock();
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (io_obj->queues_[op_type].op_queue_.empty())
+ {
+ if (op->perform(false))
+ {
+ io_object_lock.unlock();
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+ else
+ {
+ io_obj->queues_[op_type].op_queue_.push(op);
+ io_object_lock.unlock();
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ op->prepare(sqe);
+ ::io_uring_sqe_set_data(sqe, &io_obj->queues_[op_type]);
+ scheduler_.work_started();
+ post_submit_sqes_op(lock);
+ }
+ else
+ {
+ lock.unlock();
+ io_obj->queues_[op_type].set_result(-ENOBUFS);
+ post_immediate_completion(&io_obj->queues_[op_type], is_continuation);
+ }
+ }
+ }
+ else
+ {
+ io_obj->queues_[op_type].op_queue_.push(op);
+ scheduler_.work_started();
+ }
+}
+
+void io_uring_service::cancel_ops(io_uring_service::per_io_object_data& io_obj)
+{
+ if (!io_obj)
+ return;
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+ op_queue<operation> ops;
+ do_cancel_ops(io_obj, ops);
+ io_object_lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+void io_uring_service::cancel_ops_by_key(
+ io_uring_service::per_io_object_data& io_obj,
+ int op_type, void* cancellation_key)
+{
+ if (!io_obj)
+ return;
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ bool first = true;
+ op_queue<operation> ops;
+ op_queue<io_uring_operation> other_ops;
+ while (io_uring_operation* op = io_obj->queues_[op_type].op_queue_.front())
+ {
+ io_obj->queues_[op_type].op_queue_.pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ if (first)
+ {
+ other_ops.push(op);
+ if (!io_obj->queues_[op_type].cancel_requested_)
+ {
+ io_obj->queues_[op_type].cancel_requested_ = true;
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[op_type], 0);
+ submit_sqes();
+ }
+ }
+ }
+ else
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ }
+ else
+ other_ops.push(op);
+ first = false;
+ }
+ io_obj->queues_[op_type].op_queue_.push(other_ops);
+
+ io_object_lock.unlock();
+
+ scheduler_.post_deferred_completions(ops);
+}
+
+void io_uring_service::deregister_io_object(
+ io_uring_service::per_io_object_data& io_obj)
+{
+ if (!io_obj)
+ return;
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+ if (!io_obj->shutdown_)
+ {
+ op_queue<operation> ops;
+ bool pending_cancelled_ops = do_cancel_ops(io_obj, ops);
+ io_obj->shutdown_ = true;
+ io_object_lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ if (pending_cancelled_ops)
+ {
+ // There are still pending operations. Prevent cleanup_io_object from
+ // freeing the I/O object and let the last operation to complete free it.
+ io_obj = 0;
+ }
+ else
+ {
+ // Leave io_obj set so that it will be freed by the subsequent call to
+ // cleanup_io_object.
+ }
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_io_object from freeing
+ // the I/O object and let the destructor free it instead.
+ io_obj = 0;
+ }
+}
+
+void io_uring_service::cleanup_io_object(
+ io_uring_service::per_io_object_data& io_obj)
+{
+ if (io_obj)
+ {
+ free_io_object(io_obj);
+ io_obj = 0;
+ }
+}
+
+void io_uring_service::run(long usec, op_queue<operation>& ops)
+{
+ __kernel_timespec ts;
+ int local_ops = 0;
+
+ if (usec > 0)
+ {
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = (usec % 1000000) * 1000;
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ++local_ops;
+ ::io_uring_prep_timeout(sqe, &ts, 0, 0);
+ ::io_uring_sqe_set_data(sqe, &ts);
+ submit_sqes();
+ }
+ }
+
+ ::io_uring_cqe* cqe = 0;
+ int result = (usec == 0)
+ ? ::io_uring_peek_cqe(&ring_, &cqe)
+ : ::io_uring_wait_cqe(&ring_, &cqe);
+
+ if (local_ops > 0)
+ {
+ if (result != 0 || ::io_uring_cqe_get_data(cqe) != &ts)
+ {
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ++local_ops;
+ ::io_uring_prep_timeout_remove(sqe, reinterpret_cast<__u64>(&ts), 0);
+ ::io_uring_sqe_set_data(sqe, &ts);
+ submit_sqes();
+ }
+ }
+ }
+
+ bool check_timers = false;
+ int count = 0;
+ while (result == 0 || local_ops > 0)
+ {
+ if (result == 0)
+ {
+ if (void* ptr = ::io_uring_cqe_get_data(cqe))
+ {
+ if (ptr == this)
+ {
+ // The io_uring service was interrupted.
+ }
+ else if (ptr == &timer_queues_)
+ {
+ check_timers = true;
+ }
+ else if (ptr == &timeout_)
+ {
+ check_timers = true;
+ timeout_.tv_sec = 0;
+ timeout_.tv_nsec = 0;
+ }
+ else if (ptr == &ts)
+ {
+ --local_ops;
+ }
+ else
+ {
+ io_queue* io_q = static_cast<io_queue*>(ptr);
+ io_q->set_result(cqe->res);
+ ops.push(io_q);
+ }
+ }
+ ::io_uring_cqe_seen(&ring_, cqe);
+ ++count;
+ }
+ result = (count < complete_batch_size || local_ops > 0)
+ ? ::io_uring_peek_cqe(&ring_, &cqe) : -EAGAIN;
+ }
+
+ decrement(outstanding_work_, count);
+
+ if (check_timers)
+ {
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.get_ready_timers(ops);
+ if (timeout_.tv_sec == 0 && timeout_.tv_nsec == 0)
+ {
+ timeout_ = get_timeout();
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_timeout(sqe, &timeout_, 0, 0);
+ ::io_uring_sqe_set_data(sqe, &timeout_);
+ push_submit_sqes_op(ops);
+ }
+ }
+ }
+}
+
+void io_uring_service::interrupt()
+{
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_nop(sqe);
+ ::io_uring_sqe_set_data(sqe, this);
+ }
+ submit_sqes();
+}
+
+void io_uring_service::init_ring()
+{
+ int result = ::io_uring_queue_init(ring_size, &ring_, 0);
+ if (result < 0)
+ {
+ ring_.ring_fd = -1;
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_queue_init");
+ }
+
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ event_fd_ = ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+ if (event_fd_ < 0)
+ {
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ ::io_uring_queue_exit(&ring_);
+ asio::detail::throw_error(ec, "eventfd");
+ }
+
+ result = ::io_uring_register_eventfd(&ring_, event_fd_);
+ if (result < 0)
+ {
+ ::close(event_fd_);
+ ::io_uring_queue_exit(&ring_);
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_queue_init");
+ }
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+}
+
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+class io_uring_service::event_fd_read_op :
+ public reactor_op
+{
+public:
+ event_fd_read_op(io_uring_service* s)
+ : reactor_op(asio::error_code(),
+ &event_fd_read_op::do_perform, event_fd_read_op::do_complete),
+ service_(s)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ event_fd_read_op* o(static_cast<event_fd_read_op*>(base));
+
+ for (;;)
+ {
+ // Only perform one read. The kernel maintains an atomic counter.
+ uint64_t counter(0);
+ errno = 0;
+ int bytes_read = ::read(o->service_->event_fd_,
+ &counter, sizeof(uint64_t));
+ if (bytes_read < 0 && errno == EINTR)
+ continue;
+ break;
+ }
+
+ op_queue<operation> ops;
+ o->service_->run(0, ops);
+ o->service_->scheduler_.post_deferred_completions(ops);
+
+ return not_done;
+ }
+
+ static void do_complete(void* /*owner*/, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ event_fd_read_op* o(static_cast<event_fd_read_op*>(base));
+ delete o;
+ }
+
+private:
+ io_uring_service* service_;
+};
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
+void io_uring_service::register_with_reactor()
+{
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ reactor_.register_internal_descriptor(reactor::read_op,
+ event_fd_, reactor_data_, new event_fd_read_op(this));
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+}
+
+io_uring_service::io_object* io_uring_service::allocate_io_object()
+{
+ mutex::scoped_lock registration_lock(registration_mutex_);
+ return registered_io_objects_.alloc(
+ ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, scheduler_.concurrency_hint()));
+}
+
+void io_uring_service::free_io_object(io_uring_service::io_object* io_obj)
+{
+ mutex::scoped_lock registration_lock(registration_mutex_);
+ registered_io_objects_.free(io_obj);
+}
+
+bool io_uring_service::do_cancel_ops(
+ per_io_object_data& io_obj, op_queue<operation>& ops)
+{
+ bool cancel_op = false;
+
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (io_uring_operation* first_op = io_obj->queues_[i].op_queue_.front())
+ {
+ cancel_op = true;
+ io_obj->queues_[i].op_queue_.pop();
+ while (io_uring_operation* op = io_obj->queues_[i].op_queue_.front())
+ {
+ op->ec_ = asio::error::operation_aborted;
+ io_obj->queues_[i].op_queue_.pop();
+ ops.push(op);
+ }
+ io_obj->queues_[i].op_queue_.push(first_op);
+ }
+ }
+
+ if (cancel_op)
+ {
+ mutex::scoped_lock lock(mutex_);
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (!io_obj->queues_[i].op_queue_.empty()
+ && !io_obj->queues_[i].cancel_requested_)
+ {
+ io_obj->queues_[i].cancel_requested_ = true;
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[i], 0);
+ }
+ }
+ submit_sqes();
+ }
+
+ return cancel_op;
+}
+
+void io_uring_service::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void io_uring_service::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+void io_uring_service::update_timeout()
+{
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_timeout_remove(sqe, reinterpret_cast<__u64>(&timeout_), 0);
+ ::io_uring_sqe_set_data(sqe, &timer_queues_);
+ }
+}
+
+__kernel_timespec io_uring_service::get_timeout() const
+{
+ __kernel_timespec ts;
+ long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = usec ? (usec % 1000000) * 1000 : 1;
+ return ts;
+}
+
+::io_uring_sqe* io_uring_service::get_sqe()
+{
+ ::io_uring_sqe* sqe = ::io_uring_get_sqe(&ring_);
+ if (!sqe)
+ {
+ submit_sqes();
+ sqe = ::io_uring_get_sqe(&ring_);
+ }
+ if (sqe)
+ {
+ ::io_uring_sqe_set_data(sqe, 0);
+ ++pending_sqes_;
+ }
+ return sqe;
+}
+
+void io_uring_service::submit_sqes()
+{
+ if (pending_sqes_ != 0)
+ {
+ int result = ::io_uring_submit(&ring_);
+ if (result > 0)
+ {
+ pending_sqes_ -= result;
+ increment(outstanding_work_, result);
+ }
+ }
+}
+
+void io_uring_service::post_submit_sqes_op(mutex::scoped_lock& lock)
+{
+ if (pending_sqes_ >= submit_batch_size)
+ {
+ submit_sqes();
+ }
+ else if (pending_sqes_ != 0 && !pending_submit_sqes_op_)
+ {
+ pending_submit_sqes_op_ = true;
+ lock.unlock();
+ scheduler_.post_immediate_completion(&submit_sqes_op_, false);
+ }
+}
+
+void io_uring_service::push_submit_sqes_op(op_queue<operation>& ops)
+{
+ if (pending_sqes_ != 0 && !pending_submit_sqes_op_)
+ {
+ pending_submit_sqes_op_ = true;
+ ops.push(&submit_sqes_op_);
+ scheduler_.compensating_work_started();
+ }
+}
+
+io_uring_service::submit_sqes_op::submit_sqes_op(io_uring_service* s)
+ : operation(&io_uring_service::submit_sqes_op::do_complete),
+ service_(s)
+{
+}
+
+void io_uring_service::submit_sqes_op::do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/, std::size_t /*bytes_transferred*/)
+{
+ if (owner)
+ {
+ submit_sqes_op* o = static_cast<submit_sqes_op*>(base);
+ mutex::scoped_lock lock(o->service_->mutex_);
+ o->service_->submit_sqes();
+ if (o->service_->pending_sqes_ != 0)
+ o->service_->scheduler_.post_immediate_completion(o, true);
+ else
+ o->service_->pending_submit_sqes_op_ = false;
+ }
+}
+
+io_uring_service::io_queue::io_queue()
+ : operation(&io_uring_service::io_queue::do_complete)
+{
+}
+
+struct io_uring_service::perform_io_cleanup_on_block_exit
+{
+ explicit perform_io_cleanup_on_block_exit(io_uring_service* s)
+ : service_(s), io_object_to_free_(0), first_op_(0)
+ {
+ }
+
+ ~perform_io_cleanup_on_block_exit()
+ {
+ if (io_object_to_free_)
+ {
+ mutex::scoped_lock lock(service_->mutex_);
+ service_->free_io_object(io_object_to_free_);
+ }
+
+ if (first_op_)
+ {
+ // Post the remaining completed operations for invocation.
+ if (!ops_.empty())
+ service_->scheduler_.post_deferred_completions(ops_);
+
+ // A user-initiated operation has completed, but there's no need to
+ // explicitly call work_finished() here. Instead, we'll take advantage of
+ // the fact that the scheduler will call work_finished() once we return.
+ }
+ else
+ {
+ // No user-initiated operations have completed, so we need to compensate
+ // for the work_finished() call that the scheduler will make once this
+ // operation returns.
+ service_->scheduler_.compensating_work_started();
+ }
+ }
+
+ io_uring_service* service_;
+ io_object* io_object_to_free_;
+ op_queue<operation> ops_;
+ operation* first_op_;
+};
+
+operation* io_uring_service::io_queue::perform_io(int result)
+{
+ perform_io_cleanup_on_block_exit io_cleanup(io_object_->service_);
+ mutex::scoped_lock io_object_lock(io_object_->mutex_);
+
+ if (result != -ECANCELED || cancel_requested_)
+ {
+ if (io_uring_operation* op = op_queue_.front())
+ {
+ if (result < 0)
+ {
+ op->ec_.assign(-result, asio::error::get_system_category());
+ op->bytes_transferred_ = 0;
+ }
+ else
+ {
+ op->ec_.assign(0, op->ec_.category());
+ op->bytes_transferred_ = static_cast<std::size_t>(result);
+ }
+ }
+
+ while (io_uring_operation* op = op_queue_.front())
+ {
+ if (op->perform(io_cleanup.ops_.empty()))
+ {
+ op_queue_.pop();
+ io_cleanup.ops_.push(op);
+ }
+ else
+ break;
+ }
+ }
+
+ cancel_requested_ = false;
+
+ if (!op_queue_.empty())
+ {
+ io_uring_service* service = io_object_->service_;
+ mutex::scoped_lock lock(service->mutex_);
+ if (::io_uring_sqe* sqe = service->get_sqe())
+ {
+ op_queue_.front()->prepare(sqe);
+ ::io_uring_sqe_set_data(sqe, this);
+ service->post_submit_sqes_op(lock);
+ }
+ else
+ {
+ lock.unlock();
+ while (io_uring_operation* op = op_queue_.front())
+ {
+ op->ec_ = asio::error::no_buffer_space;
+ op_queue_.pop();
+ io_cleanup.ops_.push(op);
+ }
+ }
+ }
+
+ // The last operation to complete on a shut down object must free it.
+ if (io_object_->shutdown_)
+ {
+ io_cleanup.io_object_to_free_ = io_object_;
+ for (int i = 0; i < max_ops; ++i)
+ if (!io_object_->queues_[i].op_queue_.empty())
+ io_cleanup.io_object_to_free_ = 0;
+ }
+
+ // The first operation will be returned for completion now. The others will
+ // be posted for later by the io_cleanup object's destructor.
+ io_cleanup.first_op_ = io_cleanup.ops_.front();
+ io_cleanup.ops_.pop();
+ return io_cleanup.first_op_;
+}
+
+void io_uring_service::io_queue::do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred)
+{
+ if (owner)
+ {
+ io_queue* io_q = static_cast<io_queue*>(base);
+ int result = static_cast<int>(bytes_transferred);
+ if (operation* op = io_q->perform_io(result))
+ {
+ op->complete(owner, ec, 0);
+ }
+ }
+}
+
+io_uring_service::io_object::io_object(bool locking)
+ : mutex_(locking)
+{
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp
new file mode 100644
index 00000000000..79302fdc6f6
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp
@@ -0,0 +1,249 @@
+//
+// detail/io_uring_socket_service_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_IO_URING_SOCKET_SERVICE_BASE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_SOCKET_SERVICE_BASE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/io_uring_socket_service_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_socket_service_base::io_uring_socket_service_base(
+ execution_context& context)
+ : io_uring_service_(asio::use_service<io_uring_service>(context))
+{
+ io_uring_service_.init_task();
+}
+
+void io_uring_socket_service_base::base_shutdown()
+{
+}
+
+void io_uring_socket_service_base::construct(
+ io_uring_socket_service_base::base_implementation_type& impl)
+{
+ impl.socket_ = invalid_socket;
+ impl.state_ = 0;
+ impl.io_object_data_ = 0;
+}
+
+void io_uring_socket_service_base::base_move_construct(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ io_uring_socket_service_base::base_implementation_type& other_impl)
+ noexcept
+{
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_socket_service_base::base_move_assign(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ io_uring_socket_service_base& /*other_service*/,
+ io_uring_socket_service_base::base_implementation_type& other_impl)
+{
+ destroy(impl);
+
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_socket_service_base::destroy(
+ io_uring_socket_service_base::base_implementation_type& impl)
+{
+ if (impl.socket_ != invalid_socket)
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ asio::error_code ignored_ec;
+ socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+}
+
+asio::error_code io_uring_socket_service_base::close(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ socket_ops::close(impl.socket_, impl.state_, false, ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+ else
+ {
+ ec = success_ec_;
+ }
+
+ // The descriptor is closed by the OS even if close() returns an error.
+ //
+ // (Actually, POSIX says the state of the descriptor is unspecified. On
+ // Linux the descriptor is apparently closed anyway; e.g. see
+ // http://lkml.org/lkml/2005/9/10/129
+ construct(impl);
+
+ return ec;
+}
+
+socket_type io_uring_socket_service_base::release(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ return invalid_socket;
+ }
+
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "release"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ socket_type sock = impl.socket_;
+ construct(impl);
+ ec = success_ec_;
+ return sock;
+}
+
+asio::error_code io_uring_socket_service_base::cancel(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ return ec;
+ }
+
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "cancel"));
+
+ io_uring_service_.cancel_ops(impl.io_object_data_);
+ ec = success_ec_;
+ return ec;
+}
+
+asio::error_code io_uring_socket_service_base::do_open(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ int af, int type, int protocol, asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ return ec;
+ }
+
+ socket_holder sock(socket_ops::socket(af, type, protocol, ec));
+ if (sock.get() == invalid_socket)
+ return ec;
+
+ io_uring_service_.register_io_object(impl.io_object_data_);
+
+ impl.socket_ = sock.release();
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ ec = success_ec_;
+ return ec;
+}
+
+asio::error_code io_uring_socket_service_base::do_assign(
+ io_uring_socket_service_base::base_implementation_type& impl, int type,
+ const io_uring_socket_service_base::native_handle_type& native_socket,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ return ec;
+ }
+
+ io_uring_service_.register_io_object(impl.io_object_data_);
+
+ impl.socket_ = native_socket;
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ impl.state_ |= socket_ops::possible_dup;
+ ec = success_ec_;
+ return ec;
+}
+
+void io_uring_socket_service_base::start_op(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ int op_type, io_uring_operation* op, bool is_continuation, bool noop)
+{
+ if (!noop)
+ {
+ io_uring_service_.start_op(op_type,
+ impl.io_object_data_, op, is_continuation);
+ }
+ else
+ {
+ io_uring_service_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+void io_uring_socket_service_base::start_accept_op(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ io_uring_operation* op, bool is_continuation, bool peer_is_open)
+{
+ if (!peer_is_open)
+ start_op(impl, io_uring_service::read_op, op, is_continuation, false);
+ else
+ {
+ op->ec_ = asio::error::already_open;
+ io_uring_service_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_SOCKET_SERVICE_BASE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp
index eaa7a55e299..3f79e9f7217 100644
--- a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -20,11 +20,19 @@
#if defined(ASIO_HAS_KQUEUE)
+#include "asio/detail/scheduler.hpp"
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+inline void kqueue_reactor::post_immediate_completion(
+ operation* op, bool is_continuation) const
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
template <typename Time_Traits>
void kqueue_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
{
@@ -71,6 +79,18 @@ std::size_t kqueue_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
}
template <typename Time_Traits>
+void kqueue_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
void kqueue_reactor::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& target,
typename timer_queue<Time_Traits>::per_timer_data& source)
diff --git a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp
index 6ba64583ecf..210a89dd49e 100644
--- a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/kqueue_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -25,9 +25,13 @@
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
+#if defined(__NetBSD__)
+# include <sys/param.h>
+#endif
+
#include "asio/detail/push_options.hpp"
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) && __NetBSD_Version__ < 999001500
# define ASIO_KQUEUE_EV_SET(ev, ident, filt, flags, fflags, data, udata) \
EV_SET(ev, ident, filt, flags, fflags, data, \
reinterpret_cast<intptr_t>(static_cast<void*>(udata)))
@@ -43,7 +47,7 @@ kqueue_reactor::kqueue_reactor(asio::execution_context& ctx)
: execution_context_service_base<kqueue_reactor>(ctx),
scheduler_(use_service<scheduler>(ctx)),
mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
- SCHEDULER, scheduler_.concurrency_hint())),
+ REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
kqueue_fd_(do_kqueue_create()),
interrupter_(),
shutdown_(false),
@@ -186,14 +190,23 @@ void kqueue_reactor::move_descriptor(socket_type,
source_descriptor_data = 0;
}
+void kqueue_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const kqueue_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void kqueue_reactor::start_op(int op_type, socket_type descriptor,
kqueue_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative)
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
if (!descriptor_data)
{
op->ec_ = asio::error::bad_descriptor;
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -201,7 +214,7 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -216,7 +229,7 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
if (op->perform())
{
descriptor_lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -235,7 +248,7 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
{
op->ec_ = asio::error_code(errno,
asio::error::get_system_category());
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
@@ -282,6 +295,35 @@ void kqueue_reactor::cancel_ops(socket_type,
scheduler_.post_deferred_completions(ops);
}
+void kqueue_reactor::cancel_ops_by_key(socket_type,
+ kqueue_reactor::per_descriptor_data& descriptor_data,
+ int op_type, void* cancellation_key)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ op_queue<operation> ops;
+ op_queue<reactor_op> other_ops;
+ while (reactor_op* op = descriptor_data->op_queue_[op_type].front())
+ {
+ descriptor_data->op_queue_[op_type].pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ else
+ other_ops.push(op);
+ }
+ descriptor_data->op_queue_[op_type].push(other_ops);
+
+ descriptor_lock.unlock();
+
+ scheduler_.post_deferred_completions(ops);
+}
+
void kqueue_reactor::deregister_descriptor(socket_type descriptor,
kqueue_reactor::per_descriptor_data& descriptor_data, bool closing)
{
@@ -327,10 +369,16 @@ void kqueue_reactor::deregister_descriptor(socket_type descriptor,
context(), static_cast<uintmax_t>(descriptor),
reinterpret_cast<uintmax_t>(descriptor_data)));
- free_descriptor_state(descriptor_data);
- descriptor_data = 0;
-
scheduler_.post_deferred_completions(ops);
+
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
}
}
@@ -364,6 +412,22 @@ void kqueue_reactor::deregister_internal_descriptor(socket_type descriptor,
context(), static_cast<uintmax_t>(descriptor),
reinterpret_cast<uintmax_t>(descriptor_data)));
+ // Leave descriptor_data set so that it will be freed by the subsequent
+ // call to cleanup_descriptor_data.
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_descriptor_data from freeing
+ // the descriptor_data object and let the destructor free it instead.
+ descriptor_data = 0;
+ }
+}
+
+void kqueue_reactor::cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data)
+{
+ if (descriptor_data)
+ {
free_descriptor_state(descriptor_data);
descriptor_data = 0;
}
@@ -498,7 +562,8 @@ int kqueue_reactor::do_kqueue_create()
kqueue_reactor::descriptor_state* kqueue_reactor::allocate_descriptor_state()
{
mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
- return registered_descriptors_.alloc(registered_descriptors_mutex_.enabled());
+ return registered_descriptors_.alloc(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, scheduler_.concurrency_hint()));
}
void kqueue_reactor::free_descriptor_state(kqueue_reactor::descriptor_state* s)
diff --git a/3rdparty/asio/include/asio/detail/impl/null_event.ipp b/3rdparty/asio/include/asio/detail/impl/null_event.ipp
index 71b6080c208..1c9f5684298 100644
--- a/3rdparty/asio/include/asio/detail/impl/null_event.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/null_event.ipp
@@ -2,7 +2,7 @@
// detail/impl/null_event.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -39,7 +39,7 @@ namespace detail {
void null_event::do_wait()
{
#if defined(ASIO_WINDOWS_RUNTIME)
- std::this_thread::sleep_until(std::chrono::steady_clock::time_point::max());
+ std::this_thread::sleep_until((std::chrono::steady_clock::time_point::max)());
#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
::Sleep(INFINITE);
#else
diff --git a/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
index 435da014dcb..75138312d9d 100644
--- a/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/pipe_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -101,12 +101,17 @@ bool pipe_select_interrupter::reset()
{
char data[1024];
signed_size_type bytes_read = ::read(read_descriptor_, data, sizeof(data));
- if (bytes_read < 0 && errno == EINTR)
+ if (bytes_read == sizeof(data))
continue;
- bool was_interrupted = (bytes_read > 0);
- while (bytes_read == sizeof(data))
- bytes_read = ::read(read_descriptor_, data, sizeof(data));
- return was_interrupted;
+ if (bytes_read > 0)
+ return true;
+ if (bytes_read == 0)
+ return false;
+ if (errno == EINTR)
+ continue;
+ if (errno == EWOULDBLOCK || errno == EAGAIN)
+ return true;
+ return false;
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_event.ipp b/3rdparty/asio/include/asio/detail/impl/posix_event.ipp
index a62c434edcd..76d5c468cbf 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_event.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_event.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_event.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -31,15 +31,22 @@ namespace detail {
posix_event::posix_event()
: state_(0)
{
-#if (defined(__MACH__) && defined(__APPLE__))
+#if (defined(__MACH__) && defined(__APPLE__)) \
+ || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
int error = ::pthread_cond_init(&cond_, 0);
#else // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
::pthread_condattr_t attr;
- ::pthread_condattr_init(&attr);
- int error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+ int error = ::pthread_condattr_init(&attr);
if (error == 0)
- error = ::pthread_cond_init(&cond_, &attr);
+ {
+ error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+ if (error == 0)
+ error = ::pthread_cond_init(&cond_, &attr);
+ ::pthread_condattr_destroy(&attr);
+ }
#endif // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
asio::error_code ec(error,
asio::error::get_system_category());
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp b/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp
index c629f6bba7e..5fd832f9821 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/reactive_serial_port_service.ipp b/3rdparty/asio/include/asio/detail/impl/posix_serial_port_service.ipp
index 7ea37a4b7d9..98ed5822877 100644
--- a/3rdparty/asio/include/asio/detail/impl/reactive_serial_port_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_serial_port_service.ipp
@@ -1,16 +1,16 @@
//
-// detail/impl/reactive_serial_port_service.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// detail/impl/posix_serial_port_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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 ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
-#define ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
+#ifndef ASIO_DETAIL_IMPL_POSIX_SERIAL_PORT_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_POSIX_SERIAL_PORT_SERVICE_IPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -22,32 +22,33 @@
#if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#include <cstring>
-#include "asio/detail/reactive_serial_port_service.hpp"
+#include "asio/detail/posix_serial_port_service.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-reactive_serial_port_service::reactive_serial_port_service(
- asio::io_context& io_context)
- : service_base<reactive_serial_port_service>(io_context),
- descriptor_service_(io_context)
+posix_serial_port_service::posix_serial_port_service(
+ execution_context& context)
+ : execution_context_service_base<posix_serial_port_service>(context),
+ descriptor_service_(context)
{
}
-void reactive_serial_port_service::shutdown()
+void posix_serial_port_service::shutdown()
{
descriptor_service_.shutdown();
}
-asio::error_code reactive_serial_port_service::open(
- reactive_serial_port_service::implementation_type& impl,
+asio::error_code posix_serial_port_service::open(
+ posix_serial_port_service::implementation_type& impl,
const std::string& device, asio::error_code& ec)
{
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -55,7 +56,10 @@ asio::error_code reactive_serial_port_service::open(
int fd = descriptor_ops::open(device.c_str(),
O_RDWR | O_NONBLOCK | O_NOCTTY, ec);
if (fd < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
int s = descriptor_ops::fcntl(fd, F_GETFL, ec);
if (s >= 0)
@@ -64,16 +68,17 @@ asio::error_code reactive_serial_port_service::open(
{
asio::error_code ignored_ec;
descriptor_ops::close(fd, state, ignored_ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
// Set up default serial port options.
termios ios;
- errno = 0;
- s = descriptor_ops::error_wrapper(::tcgetattr(fd, &ios), ec);
+ s = ::tcgetattr(fd, &ios);
+ descriptor_ops::get_last_error(ec, s < 0);
if (s >= 0)
{
-#if defined(_BSD_SOURCE)
+#if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
::cfmakeraw(&ios);
#else
ios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK
@@ -85,13 +90,14 @@ asio::error_code reactive_serial_port_service::open(
#endif
ios.c_iflag |= IGNPAR;
ios.c_cflag |= CREAD | CLOCAL;
- errno = 0;
- s = descriptor_ops::error_wrapper(::tcsetattr(fd, TCSANOW, &ios), ec);
+ s = ::tcsetattr(fd, TCSANOW, &ios);
+ descriptor_ops::get_last_error(ec, s < 0);
}
if (s < 0)
{
asio::error_code ignored_ec;
descriptor_ops::close(fd, state, ignored_ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -102,43 +108,53 @@ asio::error_code reactive_serial_port_service::open(
descriptor_ops::close(fd, state, ignored_ec);
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
-asio::error_code reactive_serial_port_service::do_set_option(
- reactive_serial_port_service::implementation_type& impl,
- reactive_serial_port_service::store_function_type store,
+asio::error_code posix_serial_port_service::do_set_option(
+ posix_serial_port_service::implementation_type& impl,
+ posix_serial_port_service::store_function_type store,
const void* option, asio::error_code& ec)
{
termios ios;
- errno = 0;
- descriptor_ops::error_wrapper(::tcgetattr(
- descriptor_service_.native_handle(impl), &ios), ec);
- if (ec)
+ int s = ::tcgetattr(descriptor_service_.native_handle(impl), &ios);
+ descriptor_ops::get_last_error(ec, s < 0);
+ if (s < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
if (store(option, ios, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
- errno = 0;
- descriptor_ops::error_wrapper(::tcsetattr(
- descriptor_service_.native_handle(impl), TCSANOW, &ios), ec);
+ s = ::tcsetattr(descriptor_service_.native_handle(impl), TCSANOW, &ios);
+ descriptor_ops::get_last_error(ec, s < 0);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
-asio::error_code reactive_serial_port_service::do_get_option(
- const reactive_serial_port_service::implementation_type& impl,
- reactive_serial_port_service::load_function_type load,
+asio::error_code posix_serial_port_service::do_get_option(
+ const posix_serial_port_service::implementation_type& impl,
+ posix_serial_port_service::load_function_type load,
void* option, asio::error_code& ec) const
{
termios ios;
- errno = 0;
- descriptor_ops::error_wrapper(::tcgetattr(
- descriptor_service_.native_handle(impl), &ios), ec);
- if (ec)
+ int s = ::tcgetattr(descriptor_service_.native_handle(impl), &ios);
+ descriptor_ops::get_last_error(ec, s < 0);
+ if (s < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
- return load(option, ios, ec);
+ load(option, ios, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
}
} // namespace detail
@@ -149,4 +165,4 @@ asio::error_code reactive_serial_port_service::do_get_option(
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#endif // defined(ASIO_HAS_SERIAL_PORT)
-#endif // ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
+#endif // ASIO_DETAIL_IMPL_POSIX_SERIAL_PORT_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp b/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp
index a4eb2a80f96..7602377336e 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_thread.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp b/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp
index 4d35ebca1b5..099274b2779 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp b/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
index 7aaf3620f16..829aefb01bf 100644
--- a/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/reactive_descriptor_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,7 +19,8 @@
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
+ && !defined(__CYGWIN__) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/error.hpp"
#include "asio/detail/reactive_descriptor_service.hpp"
@@ -30,9 +31,9 @@ namespace asio {
namespace detail {
reactive_descriptor_service::reactive_descriptor_service(
- asio::io_context& io_context)
- : service_base<reactive_descriptor_service>(io_context),
- reactor_(asio::use_service<reactor>(io_context))
+ execution_context& context)
+ : execution_context_service_base<reactive_descriptor_service>(context),
+ reactor_(asio::use_service<reactor>(context))
{
reactor_.init_task();
}
@@ -46,11 +47,13 @@ void reactive_descriptor_service::construct(
{
impl.descriptor_ = -1;
impl.state_ = 0;
+ impl.reactor_data_ = reactor::per_descriptor_data();
}
void reactive_descriptor_service::move_construct(
reactive_descriptor_service::implementation_type& impl,
reactive_descriptor_service::implementation_type& other_impl)
+ noexcept
{
impl.descriptor_ = other_impl.descriptor_;
other_impl.descriptor_ = -1;
@@ -89,10 +92,12 @@ void reactive_descriptor_service::destroy(
reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
(impl.state_ & descriptor_ops::possible_dup) == 0);
- }
- asio::error_code ignored_ec;
- descriptor_ops::close(impl.descriptor_, impl.state_, ignored_ec);
+ asio::error_code ignored_ec;
+ descriptor_ops::close(impl.descriptor_, impl.state_, ignored_ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
}
asio::error_code reactive_descriptor_service::assign(
@@ -102,6 +107,7 @@ asio::error_code reactive_descriptor_service::assign(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -110,6 +116,7 @@ asio::error_code reactive_descriptor_service::assign(
{
ec = asio::error_code(err,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -130,9 +137,15 @@ asio::error_code reactive_descriptor_service::close(
reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
(impl.state_ & descriptor_ops::possible_dup) == 0);
- }
- descriptor_ops::close(impl.descriptor_, impl.state_, ec);
+ descriptor_ops::close(impl.descriptor_, impl.state_, ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
+ else
+ {
+ ec = asio::error_code();
+ }
// The descriptor is closed by the OS even if close() returns an error.
//
@@ -142,6 +155,7 @@ asio::error_code reactive_descriptor_service::close(
// We'll just have to assume that other OSes follow the same behaviour.)
construct(impl);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -157,6 +171,7 @@ reactive_descriptor_service::release(
"descriptor", &impl, impl.descriptor_, "release"));
reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_, false);
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
construct(impl);
}
@@ -170,6 +185,7 @@ asio::error_code reactive_descriptor_service::cancel(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -181,10 +197,10 @@ asio::error_code reactive_descriptor_service::cancel(
return ec;
}
-void reactive_descriptor_service::start_op(
- reactive_descriptor_service::implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool is_non_blocking, bool noop)
+void reactive_descriptor_service::do_start_op(implementation_type& impl,
+ int op_type, reactor_op* op, bool is_continuation, bool is_non_blocking,
+ bool noop, void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if (!noop)
{
@@ -192,13 +208,13 @@ void reactive_descriptor_service::start_op(
descriptor_ops::set_internal_non_blocking(
impl.descriptor_, impl.state_, true, op->ec_))
{
- reactor_.start_op(op_type, impl.descriptor_,
- impl.reactor_data_, op, is_continuation, is_non_blocking);
+ reactor_.start_op(op_type, impl.descriptor_, impl.reactor_data_, op,
+ is_continuation, is_non_blocking, on_immediate, immediate_arg);
return;
}
}
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
} // namespace detail
@@ -209,5 +225,6 @@ void reactive_descriptor_service::start_op(
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
index f1ed1fa1ea7..a02001b421f 100644
--- a/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,7 +18,8 @@
#include "asio/detail/config.hpp"
#if !defined(ASIO_HAS_IOCP) \
- && !defined(ASIO_WINDOWS_RUNTIME)
+ && !defined(ASIO_WINDOWS_RUNTIME) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/reactive_socket_service_base.hpp"
@@ -28,9 +29,8 @@ namespace asio {
namespace detail {
reactive_socket_service_base::reactive_socket_service_base(
- asio::io_context& io_context)
- : io_context_(io_context),
- reactor_(use_service<reactor>(io_context))
+ execution_context& context)
+ : reactor_(use_service<reactor>(context))
{
reactor_.init_task();
}
@@ -44,11 +44,13 @@ void reactive_socket_service_base::construct(
{
impl.socket_ = invalid_socket;
impl.state_ = 0;
+ impl.reactor_data_ = reactor::per_descriptor_data();
}
void reactive_socket_service_base::base_move_construct(
reactive_socket_service_base::base_implementation_type& impl,
reactive_socket_service_base::base_implementation_type& other_impl)
+ noexcept
{
impl.socket_ = other_impl.socket_;
other_impl.socket_ = invalid_socket;
@@ -90,6 +92,8 @@ void reactive_socket_service_base::destroy(
asio::error_code ignored_ec;
socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
}
}
@@ -104,9 +108,15 @@ asio::error_code reactive_socket_service_base::close(
reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
(impl.state_ & socket_ops::possible_dup) == 0);
- }
- socket_ops::close(impl.socket_, impl.state_, false, ec);
+ socket_ops::close(impl.socket_, impl.state_, false, ec);
+
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ }
+ else
+ {
+ ec = asio::error_code();
+ }
// The descriptor is closed by the OS even if close() returns an error.
//
@@ -121,6 +131,27 @@ asio::error_code reactive_socket_service_base::close(
return ec;
}
+socket_type reactive_socket_service_base::release(
+ reactive_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ return invalid_socket;
+ }
+
+ ASIO_HANDLER_OPERATION((reactor_.context(),
+ "socket", &impl, impl.socket_, "release"));
+
+ reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_, false);
+ reactor_.cleanup_descriptor_data(impl.reactor_data_);
+ socket_type sock = impl.socket_;
+ construct(impl);
+ ec = asio::error_code();
+ return sock;
+}
+
asio::error_code reactive_socket_service_base::cancel(
reactive_socket_service_base::base_implementation_type& impl,
asio::error_code& ec)
@@ -202,10 +233,11 @@ asio::error_code reactive_socket_service_base::do_assign(
return ec;
}
-void reactive_socket_service_base::start_op(
- reactive_socket_service_base::base_implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool is_non_blocking, bool noop)
+void reactive_socket_service_base::do_start_op(
+ reactive_socket_service_base::base_implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if (!noop)
{
@@ -213,32 +245,38 @@ void reactive_socket_service_base::start_op(
|| socket_ops::set_internal_non_blocking(
impl.socket_, impl.state_, true, op->ec_))
{
- reactor_.start_op(op_type, impl.socket_,
- impl.reactor_data_, op, is_continuation, is_non_blocking);
+ reactor_.start_op(op_type, impl.socket_, impl.reactor_data_, op,
+ is_continuation, is_non_blocking, on_immediate, immediate_arg);
return;
}
}
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
-void reactive_socket_service_base::start_accept_op(
+void reactive_socket_service_base::do_start_accept_op(
reactive_socket_service_base::base_implementation_type& impl,
- reactor_op* op, bool is_continuation, bool peer_is_open)
+ reactor_op* op, bool is_continuation, bool peer_is_open,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if (!peer_is_open)
- start_op(impl, reactor::read_op, op, true, is_continuation, false);
+ {
+ do_start_op(impl, reactor::read_op, op, is_continuation,
+ true, false, on_immediate, immediate_arg);
+ }
else
{
op->ec_ = asio::error::already_open;
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
}
-void reactive_socket_service_base::start_connect_op(
+void reactive_socket_service_base::do_start_connect_op(
reactive_socket_service_base::base_implementation_type& impl,
- reactor_op* op, bool is_continuation,
- const socket_addr_type* addr, size_t addrlen)
+ reactor_op* op, bool is_continuation, const void* addr, size_t addrlen,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if ((impl.state_ & socket_ops::non_blocking)
|| socket_ops::set_internal_non_blocking(
@@ -250,14 +288,14 @@ void reactive_socket_service_base::start_connect_op(
|| op->ec_ == asio::error::would_block)
{
op->ec_ = asio::error_code();
- reactor_.start_op(reactor::connect_op, impl.socket_,
- impl.reactor_data_, op, is_continuation, false);
+ reactor_.start_op(reactor::connect_op, impl.socket_, impl.reactor_data_,
+ op, is_continuation, false, on_immediate, immediate_arg);
return;
}
}
}
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
} // namespace detail
@@ -267,5 +305,6 @@ void reactive_socket_service_base::start_connect_op(
#endif // !defined(ASIO_HAS_IOCP)
// && !defined(ASIO_WINDOWS_RUNTIME)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp
index 5899db554fc..8d9e944ddde 100644
--- a/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/resolver_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,25 +23,30 @@
namespace asio {
namespace detail {
-class resolver_service_base::work_io_context_runner
+class resolver_service_base::work_scheduler_runner
{
public:
- work_io_context_runner(asio::io_context& io_context)
- : io_context_(io_context) {}
- void operator()() { io_context_.run(); }
+ work_scheduler_runner(scheduler_impl& work_scheduler)
+ : work_scheduler_(work_scheduler)
+ {
+ }
+
+ void operator()()
+ {
+ asio::error_code ec;
+ work_scheduler_.run(ec);
+ }
+
private:
- asio::io_context& io_context_;
+ scheduler_impl& work_scheduler_;
};
-resolver_service_base::resolver_service_base(
- asio::io_context& io_context)
- : io_context_impl_(asio::use_service<io_context_impl>(io_context)),
- work_io_context_(new asio::io_context(-1)),
- work_io_context_impl_(asio::use_service<
- io_context_impl>(*work_io_context_)),
- work_(asio::make_work_guard(*work_io_context_)),
+resolver_service_base::resolver_service_base(execution_context& context)
+ : scheduler_(asio::use_service<scheduler_impl>(context)),
+ work_scheduler_(new scheduler_impl(context, -1, false)),
work_thread_(0)
{
+ work_scheduler_->work_started();
}
resolver_service_base::~resolver_service_base()
@@ -51,35 +56,34 @@ resolver_service_base::~resolver_service_base()
void resolver_service_base::base_shutdown()
{
- work_.reset();
- if (work_io_context_.get())
+ if (work_scheduler_.get())
{
- work_io_context_->stop();
+ work_scheduler_->work_finished();
+ work_scheduler_->stop();
if (work_thread_.get())
{
work_thread_->join();
work_thread_.reset();
}
- work_io_context_.reset();
+ work_scheduler_.reset();
}
}
void resolver_service_base::base_notify_fork(
- asio::io_context::fork_event fork_ev)
+ execution_context::fork_event fork_ev)
{
if (work_thread_.get())
{
- if (fork_ev == asio::io_context::fork_prepare)
+ if (fork_ev == execution_context::fork_prepare)
{
- work_io_context_->stop();
+ work_scheduler_->stop();
work_thread_->join();
+ work_thread_.reset();
}
- else
- {
- work_io_context_->restart();
- work_thread_.reset(new asio::detail::thread(
- work_io_context_runner(*work_io_context_)));
- }
+ }
+ else if (fork_ev != execution_context::fork_prepare)
+ {
+ work_scheduler_->restart();
}
}
@@ -92,7 +96,7 @@ void resolver_service_base::construct(
void resolver_service_base::destroy(
resolver_service_base::implementation_type& impl)
{
- ASIO_HANDLER_OPERATION((io_context_impl_.context(),
+ ASIO_HANDLER_OPERATION((scheduler_.context(),
"resolver", &impl, 0, "cancel"));
impl.reset();
@@ -101,20 +105,20 @@ void resolver_service_base::destroy(
void resolver_service_base::move_construct(implementation_type& impl,
implementation_type& other_impl)
{
- impl = ASIO_MOVE_CAST(implementation_type)(other_impl);
+ impl = static_cast<implementation_type&&>(other_impl);
}
void resolver_service_base::move_assign(implementation_type& impl,
resolver_service_base&, implementation_type& other_impl)
{
destroy(impl);
- impl = ASIO_MOVE_CAST(implementation_type)(other_impl);
+ impl = static_cast<implementation_type&&>(other_impl);
}
void resolver_service_base::cancel(
resolver_service_base::implementation_type& impl)
{
- ASIO_HANDLER_OPERATION((io_context_impl_.context(),
+ ASIO_HANDLER_OPERATION((scheduler_.context(),
"resolver", &impl, 0, "cancel"));
impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
@@ -123,16 +127,16 @@ void resolver_service_base::cancel(
void resolver_service_base::start_resolve_op(resolve_op* op)
{
if (ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
- io_context_impl_.concurrency_hint()))
+ scheduler_.concurrency_hint()))
{
start_work_thread();
- io_context_impl_.work_started();
- work_io_context_impl_.post_immediate_completion(op, false);
+ scheduler_.work_started();
+ work_scheduler_->post_immediate_completion(op, false);
}
else
{
op->ec_ = asio::error::operation_not_supported;
- io_context_impl_.post_immediate_completion(op, false);
+ scheduler_.post_immediate_completion(op, false);
}
}
@@ -142,7 +146,7 @@ void resolver_service_base::start_work_thread()
if (!work_thread_.get())
{
work_thread_.reset(new asio::detail::thread(
- work_io_context_runner(*work_io_context_)));
+ work_scheduler_runner(*work_scheduler_)));
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/scheduler.ipp b/3rdparty/asio/include/asio/detail/impl/scheduler.ipp
index 1b204653226..eccc80322d1 100644
--- a/3rdparty/asio/include/asio/detail/impl/scheduler.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/scheduler.ipp
@@ -2,7 +2,7 @@
// detail/impl/scheduler.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,15 +20,39 @@
#include "asio/detail/concurrency_hint.hpp"
#include "asio/detail/event.hpp"
#include "asio/detail/limits.hpp"
-#include "asio/detail/reactor.hpp"
#include "asio/detail/scheduler.hpp"
#include "asio/detail/scheduler_thread_info.hpp"
+#include "asio/detail/signal_blocker.hpp"
+
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactor.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+class scheduler::thread_function
+{
+public:
+ explicit thread_function(scheduler* s)
+ : this_(s)
+ {
+ }
+
+ void operator()()
+ {
+ asio::error_code ec;
+ this_->run(ec);
+ }
+
+private:
+ scheduler* this_;
+};
+
struct scheduler::task_cleanup
{
~task_cleanup()
@@ -84,30 +108,64 @@ struct scheduler::work_cleanup
thread_info* this_thread_;
};
-scheduler::scheduler(
- asio::execution_context& ctx, int concurrency_hint)
+scheduler::scheduler(asio::execution_context& ctx,
+ int concurrency_hint, bool own_thread, get_task_func_type get_task)
: asio::detail::execution_context_service_base<scheduler>(ctx),
one_thread_(concurrency_hint == 1
|| !ASIO_CONCURRENCY_HINT_IS_LOCKING(
- SCHEDULER, concurrency_hint)),
+ SCHEDULER, concurrency_hint)
+ || !ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, concurrency_hint)),
mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
SCHEDULER, concurrency_hint)),
task_(0),
+ get_task_(get_task),
task_interrupted_(true),
outstanding_work_(0),
stopped_(false),
shutdown_(false),
- concurrency_hint_(concurrency_hint)
+ concurrency_hint_(concurrency_hint),
+ thread_(0)
{
ASIO_HANDLER_TRACKING_INIT;
+
+ if (own_thread)
+ {
+ ++outstanding_work_;
+ asio::detail::signal_blocker sb;
+ thread_ = new asio::detail::thread(thread_function(this));
+ }
+}
+
+scheduler::~scheduler()
+{
+ if (thread_)
+ {
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ stop_all_threads(lock);
+ lock.unlock();
+ thread_->join();
+ delete thread_;
+ }
}
void scheduler::shutdown()
{
mutex::scoped_lock lock(mutex_);
shutdown_ = true;
+ if (thread_)
+ stop_all_threads(lock);
lock.unlock();
+ // Join thread to ensure task operation is returned to queue.
+ if (thread_)
+ {
+ thread_->join();
+ delete thread_;
+ thread_ = 0;
+ }
+
// Destroy handler objects.
while (!op_queue_.empty())
{
@@ -126,7 +184,7 @@ void scheduler::init_task()
mutex::scoped_lock lock(mutex_);
if (!shutdown_ && !task_)
{
- task_ = &use_service<reactor>(this->context());
+ task_ = get_task_(this->context());
op_queue_.push(&task_operation_);
wake_one_thread_and_unlock(lock);
}
@@ -269,9 +327,21 @@ void scheduler::restart()
void scheduler::compensating_work_started()
{
thread_info_base* this_thread = thread_call_stack::contains(this);
+ ASIO_ASSUME(this_thread != 0); // Only called from inside scheduler.
++static_cast<thread_info*>(this_thread)->private_outstanding_work;
}
+bool scheduler::can_dispatch()
+{
+ return thread_call_stack::contains(this) != 0;
+}
+
+void scheduler::capture_current_exception()
+{
+ if (thread_info_base* this_thread = thread_call_stack::contains(this))
+ this_thread->capture_current_exception();
+}
+
void scheduler::post_immediate_completion(
scheduler::operation* op, bool is_continuation)
{
@@ -295,6 +365,30 @@ void scheduler::post_immediate_completion(
wake_one_thread_and_unlock(lock);
}
+void scheduler::post_immediate_completions(std::size_t n,
+ op_queue<scheduler::operation>& ops, bool is_continuation)
+{
+#if defined(ASIO_HAS_THREADS)
+ if (one_thread_ || is_continuation)
+ {
+ if (thread_info_base* this_thread = thread_call_stack::contains(this))
+ {
+ static_cast<thread_info*>(this_thread)->private_outstanding_work
+ += static_cast<long>(n);
+ static_cast<thread_info*>(this_thread)->private_op_queue.push(ops);
+ return;
+ }
+ }
+#else // defined(ASIO_HAS_THREADS)
+ (void)is_continuation;
+#endif // defined(ASIO_HAS_THREADS)
+
+ increment(outstanding_work_, static_cast<long>(n));
+ mutex::scoped_lock lock(mutex_);
+ op_queue_.push(ops);
+ wake_one_thread_and_unlock(lock);
+}
+
void scheduler::post_deferred_completion(scheduler::operation* op)
{
#if defined(ASIO_HAS_THREADS)
@@ -396,6 +490,7 @@ std::size_t scheduler::do_run_one(mutex::scoped_lock& lock,
// Complete the operation. May throw an exception. Deletes the object.
o->complete(this, ec, task_result);
+ this_thread.rethrow_pending_exception();
return 1;
}
@@ -476,6 +571,7 @@ std::size_t scheduler::do_wait_one(mutex::scoped_lock& lock,
// Complete the operation. May throw an exception. Deletes the object.
o->complete(this, ec, task_result);
+ this_thread.rethrow_pending_exception();
return 1;
}
@@ -530,6 +626,7 @@ std::size_t scheduler::do_poll_one(mutex::scoped_lock& lock,
// Complete the operation. May throw an exception. Deletes the object.
o->complete(this, ec, task_result);
+ this_thread.rethrow_pending_exception();
return 1;
}
@@ -561,6 +658,15 @@ void scheduler::wake_one_thread_and_unlock(
}
}
+scheduler_task* scheduler::get_default_task(asio::execution_context& ctx)
+{
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ return &use_service<io_uring_service>(ctx);
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ return &use_service<reactor>(ctx);
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+}
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp
index 04e17f880ca..933b02cddc5 100644
--- a/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,11 +23,23 @@
&& !defined(ASIO_HAS_KQUEUE) \
&& !defined(ASIO_WINDOWS_RUNTIME))
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+inline void select_reactor::post_immediate_completion(
+ operation* op, bool is_continuation) const
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
template <typename Time_Traits>
void select_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
{
@@ -74,6 +86,18 @@ std::size_t select_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
}
template <typename Time_Traits>
+void select_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
void select_reactor::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& target,
typename timer_queue<Time_Traits>::per_timer_data& source)
diff --git a/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp
index dc0737bfad8..5e5946bb84b 100644
--- a/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,6 +28,12 @@
#include "asio/detail/signal_blocker.hpp"
#include "asio/detail/socket_ops.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -60,6 +66,7 @@ select_reactor::select_reactor(asio::execution_context& ctx)
#if defined(ASIO_HAS_IOCP)
stop_thread_(false),
thread_(0),
+ restart_reactor_(this),
#endif // defined(ASIO_HAS_IOCP)
shutdown_(false)
{
@@ -80,13 +87,14 @@ void select_reactor::shutdown()
shutdown_ = true;
#if defined(ASIO_HAS_IOCP)
stop_thread_ = true;
+ if (thread_)
+ interrupter_.interrupt();
#endif // defined(ASIO_HAS_IOCP)
lock.unlock();
#if defined(ASIO_HAS_IOCP)
if (thread_)
{
- interrupter_.interrupt();
thread_->join();
delete thread_;
thread_ = 0;
@@ -106,8 +114,12 @@ void select_reactor::shutdown()
void select_reactor::notify_fork(
asio::execution_context::fork_event fork_ev)
{
+#if defined(ASIO_HAS_IOCP)
+ (void)fork_ev;
+#else // defined(ASIO_HAS_IOCP)
if (fork_ev == asio::execution_context::fork_child)
interrupter_.recreate();
+#endif // defined(ASIO_HAS_IOCP)
}
void select_reactor::init_task()
@@ -139,15 +151,23 @@ void select_reactor::move_descriptor(socket_type,
{
}
+void select_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const select_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void select_reactor::start_op(int op_type, socket_type descriptor,
- select_reactor::per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool)
+ select_reactor::per_descriptor_data&, reactor_op* op, bool is_continuation,
+ bool, void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
asio::detail::mutex::scoped_lock lock(mutex_);
if (shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -164,6 +184,19 @@ void select_reactor::cancel_ops(socket_type descriptor,
cancel_ops_unlocked(descriptor, asio::error::operation_aborted);
}
+void select_reactor::cancel_ops_by_key(socket_type descriptor,
+ select_reactor::per_descriptor_data&,
+ int op_type, void* cancellation_key)
+{
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ bool need_interrupt = op_queue_[op_type].cancel_operations_by_key(
+ descriptor, ops, cancellation_key, asio::error::operation_aborted);
+ scheduler_.post_deferred_completions(ops);
+ if (need_interrupt)
+ interrupter_.interrupt();
+}
+
void select_reactor::deregister_descriptor(socket_type descriptor,
select_reactor::per_descriptor_data&, bool)
{
@@ -180,6 +213,11 @@ void select_reactor::deregister_internal_descriptor(
op_queue_[i].cancel_operations(descriptor, ops);
}
+void select_reactor::cleanup_descriptor_data(
+ select_reactor::per_descriptor_data&)
+{
+}
+
void select_reactor::run(long usec, op_queue<operation>& ops)
{
asio::detail::mutex::scoped_lock lock(mutex_);
@@ -234,7 +272,16 @@ void select_reactor::run(long usec, op_queue<operation>& ops)
// Reset the interrupter.
if (retval > 0 && fd_sets_[read_op].is_set(interrupter_.read_descriptor()))
{
- interrupter_.reset();
+ if (!interrupter_.reset())
+ {
+ lock.lock();
+#if defined(ASIO_HAS_IOCP)
+ stop_thread_ = true;
+ scheduler_.post_immediate_completion(&restart_reactor_, false);
+#else // defined(ASIO_HAS_IOCP)
+ interrupter_.recreate();
+#endif // defined(ASIO_HAS_IOCP)
+ }
--retval;
}
@@ -270,11 +317,36 @@ void select_reactor::run_thread()
{
lock.unlock();
op_queue<operation> ops;
- run(true, ops);
+ run(-1, ops);
scheduler_.post_deferred_completions(ops);
lock.lock();
}
}
+
+void select_reactor::restart_reactor::do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/, std::size_t /*bytes_transferred*/)
+{
+ if (owner)
+ {
+ select_reactor* reactor = static_cast<restart_reactor*>(base)->reactor_;
+
+ if (reactor->thread_)
+ {
+ reactor->thread_->join();
+ delete reactor->thread_;
+ reactor->thread_ = 0;
+ }
+
+ asio::detail::mutex::scoped_lock lock(reactor->mutex_);
+ reactor->interrupter_.recreate();
+ reactor->stop_thread_ = false;
+ lock.unlock();
+
+ asio::detail::signal_blocker sb;
+ reactor->thread_ =
+ new asio::detail::thread(thread_function(reactor));
+ }
+}
#endif // defined(ASIO_HAS_IOCP)
void select_reactor::do_add_timer_queue(timer_queue_base& queue)
diff --git a/3rdparty/asio/include/asio/detail/impl/service_registry.hpp b/3rdparty/asio/include/asio/detail/impl/service_registry.hpp
index 1b735e1596a..2490636c0ad 100644
--- a/3rdparty/asio/include/asio/detail/impl/service_registry.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/service_registry.hpp
@@ -2,7 +2,7 @@
// detail/impl/service_registry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -64,8 +64,7 @@ inline void service_registry::init_key(
#if !defined(ASIO_NO_TYPEID)
template <typename Service>
void service_registry::init_key(execution_context::service::key& key,
- typename enable_if<
- is_base_of<typename Service::key_type, Service>::value>::type*)
+ enable_if_t<is_base_of<typename Service::key_type, Service>::value>*)
{
key.type_info_ = &typeid(typeid_wrapper<Service>);
key.id_ = 0;
diff --git a/3rdparty/asio/include/asio/detail/impl/service_registry.ipp b/3rdparty/asio/include/asio/detail/impl/service_registry.ipp
index ef1955f743c..b0133421d25 100644
--- a/3rdparty/asio/include/asio/detail/impl/service_registry.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/service_registry.ipp
@@ -2,7 +2,7 @@
// detail/impl/service_registry.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp b/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp
index 114a0b1417f..7f6be8b71a9 100644
--- a/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/signal_set_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,12 +19,17 @@
#include <cstring>
#include <stdexcept>
-#include "asio/detail/reactor.hpp"
#include "asio/detail/signal_blocker.hpp"
#include "asio/detail/signal_set_service.hpp"
#include "asio/detail/static_mutex.hpp"
#include "asio/detail/throw_exception.hpp"
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactor.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -49,12 +54,16 @@ struct signal_state
// A count of the number of objects that are registered for each signal.
std::size_t registration_count_[max_signal_number];
+
+ // The flags used for each registered signal.
+ signal_set_base::flags_t flags_[max_signal_number];
};
signal_state* get_signal_state()
{
static signal_state state = {
- ASIO_STATIC_MUTEX_INIT, -1, -1, false, 0, { 0 } };
+ ASIO_STATIC_MUTEX_INIT, -1, -1, false, 0,
+ { 0 }, { signal_set_base::flags_t() } };
return &state;
}
@@ -85,11 +94,45 @@ void asio_signal_handler(int signal_number)
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
-class signal_set_service::pipe_read_op : public reactor_op
+class signal_set_service::pipe_read_op :
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ public io_uring_operation
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ public reactor_op
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
{
public:
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ pipe_read_op()
+ : io_uring_operation(asio::error_code(), &pipe_read_op::do_prepare,
+ &pipe_read_op::do_perform, pipe_read_op::do_complete)
+ {
+ }
+
+ static void do_prepare(io_uring_operation*, ::io_uring_sqe* sqe)
+ {
+ signal_state* state = get_signal_state();
+
+ int fd = state->read_descriptor_;
+ ::io_uring_prep_poll_add(sqe, fd, POLLIN);
+ }
+
+ static bool do_perform(io_uring_operation*, bool)
+ {
+ signal_state* state = get_signal_state();
+
+ int fd = state->read_descriptor_;
+ int signal_number = 0;
+ while (::read(fd, &signal_number, sizeof(int)) == sizeof(int))
+ if (signal_number >= 0 && signal_number < max_signal_number)
+ signal_set_service::deliver_signal(signal_number);
+
+ return false;
+ }
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
pipe_read_op()
- : reactor_op(&pipe_read_op::do_perform, pipe_read_op::do_complete)
+ : reactor_op(asio::error_code(),
+ &pipe_read_op::do_perform, pipe_read_op::do_complete)
{
}
@@ -105,6 +148,7 @@ public:
return not_done;
}
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
static void do_complete(void* /*owner*/, operation* base,
const asio::error_code& /*ec*/,
@@ -118,14 +162,17 @@ public:
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
-signal_set_service::signal_set_service(
- asio::io_context& io_context)
- : service_base<signal_set_service>(io_context),
- io_context_(asio::use_service<io_context_impl>(io_context)),
+signal_set_service::signal_set_service(execution_context& context)
+ : execution_context_service_base<signal_set_service>(context),
+ scheduler_(asio::use_service<scheduler_impl>(context)),
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
- reactor_(asio::use_service<reactor>(io_context)),
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ io_uring_service_(asio::use_service<io_uring_service>(context)),
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ reactor_(asio::use_service<reactor>(context)),
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -137,7 +184,11 @@ signal_set_service::signal_set_service(
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ io_uring_service_.init_task();
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.init_task();
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -169,11 +220,10 @@ void signal_set_service::shutdown()
}
}
- io_context_.abandon_operations(ops);
+ scheduler_.abandon_operations(ops);
}
-void signal_set_service::notify_fork(
- asio::io_context::fork_event fork_ev)
+void signal_set_service::notify_fork(execution_context::fork_event fork_ev)
{
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
@@ -183,25 +233,38 @@ void signal_set_service::notify_fork(
switch (fork_ev)
{
- case asio::io_context::fork_prepare:
+ case execution_context::fork_prepare:
{
int read_descriptor = state->read_descriptor_;
state->fork_prepared_ = true;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ io_uring_service_.deregister_io_object(io_object_data_);
+ io_uring_service_.cleanup_io_object(io_object_data_);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.deregister_internal_descriptor(read_descriptor, reactor_data_);
+ reactor_.cleanup_descriptor_data(reactor_data_);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
}
break;
- case asio::io_context::fork_parent:
+ case execution_context::fork_parent:
if (state->fork_prepared_)
{
int read_descriptor = state->read_descriptor_;
state->fork_prepared_ = false;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ io_uring_service_.register_internal_io_object(io_object_data_,
+ io_uring_service::read_op, new pipe_read_op);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.register_internal_descriptor(reactor::read_op,
read_descriptor, reactor_data_, new pipe_read_op);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
}
break;
- case asio::io_context::fork_child:
+ case execution_context::fork_child:
if (state->fork_prepared_)
{
asio::detail::signal_blocker blocker;
@@ -210,8 +273,14 @@ void signal_set_service::notify_fork(
int read_descriptor = state->read_descriptor_;
state->fork_prepared_ = false;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ io_uring_service_.register_internal_io_object(io_object_data_,
+ io_uring_service::read_op, new pipe_read_op);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.register_internal_descriptor(reactor::read_op,
read_descriptor, reactor_data_, new pipe_read_op);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
}
break;
default:
@@ -241,8 +310,8 @@ void signal_set_service::destroy(
}
asio::error_code signal_set_service::add(
- signal_set_service::implementation_type& impl,
- int signal_number, asio::error_code& ec)
+ signal_set_service::implementation_type& impl, int signal_number,
+ signal_set_base::flags_t f, asio::error_code& ec)
{
// Check that the signal number is valid.
if (signal_number < 0 || signal_number >= max_signal_number)
@@ -251,6 +320,15 @@ asio::error_code signal_set_service::add(
return ec;
}
+ // Check that the specified flags are supported.
+#if !defined(ASIO_HAS_SIGACTION)
+ if (f != signal_set_base::flags::dont_care)
+ {
+ ec = asio::error::operation_not_supported;
+ return ec;
+ }
+#endif // !defined(ASIO_HAS_SIGACTION)
+
signal_state* state = get_signal_state();
static_mutex::scoped_lock lock(state->mutex_);
@@ -278,6 +356,8 @@ asio::error_code signal_set_service::add(
memset(&sa, 0, sizeof(sa));
sa.sa_handler = asio_signal_handler;
sigfillset(&sa.sa_mask);
+ if (f != signal_set_base::flags::dont_care)
+ sa.sa_flags = static_cast<int>(f);
if (::sigaction(signal_number, &sa, 0) == -1)
# else // defined(ASIO_HAS_SIGACTION)
if (::signal(signal_number, asio_signal_handler) == SIG_ERR)
@@ -292,7 +372,39 @@ asio::error_code signal_set_service::add(
delete new_registration;
return ec;
}
+# if defined(ASIO_HAS_SIGACTION)
+ state->flags_[signal_number] = f;
+# endif // defined(ASIO_HAS_SIGACTION)
}
+# if defined(ASIO_HAS_SIGACTION)
+ // Otherwise check to see if the flags have changed.
+ else if (f != signal_set_base::flags::dont_care)
+ {
+ if (f != state->flags_[signal_number])
+ {
+ using namespace std; // For memset.
+ if (state->flags_[signal_number] != signal_set_base::flags::dont_care)
+ {
+ ec = asio::error::invalid_argument;
+ delete new_registration;
+ return ec;
+ }
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = asio_signal_handler;
+ sigfillset(&sa.sa_mask);
+ sa.sa_flags = static_cast<int>(f);
+ if (::sigaction(signal_number, &sa, 0) == -1)
+ {
+ ec = asio::error_code(errno,
+ asio::error::get_system_category());
+ delete new_registration;
+ return ec;
+ }
+ state->flags_[signal_number] = f;
+ }
+ }
+# endif // defined(ASIO_HAS_SIGACTION)
#endif // defined(ASIO_HAS_SIGNAL) || defined(ASIO_HAS_SIGACTION)
// Record the new registration in the set.
@@ -361,6 +473,9 @@ asio::error_code signal_set_service::remove(
# endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
return ec;
}
+# if defined(ASIO_HAS_SIGACTION)
+ state->flags_[signal_number] = signal_set_base::flags_t();
+# endif // defined(ASIO_HAS_SIGACTION)
}
#endif // defined(ASIO_HAS_SIGNAL) || defined(ASIO_HAS_SIGACTION)
@@ -415,6 +530,9 @@ asio::error_code signal_set_service::clear(
# endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
return ec;
}
+# if defined(ASIO_HAS_SIGACTION)
+ state->flags_[reg->signal_number_] = signal_set_base::flags_t();
+# endif // defined(ASIO_HAS_SIGACTION)
}
#endif // defined(ASIO_HAS_SIGNAL) || defined(ASIO_HAS_SIGACTION)
@@ -440,7 +558,7 @@ asio::error_code signal_set_service::cancel(
signal_set_service::implementation_type& impl,
asio::error_code& ec)
{
- ASIO_HANDLER_OPERATION((io_context_.context(),
+ ASIO_HANDLER_OPERATION((scheduler_.context(),
"signal_set", &impl, 0, "cancel"));
op_queue<operation> ops;
@@ -456,12 +574,39 @@ asio::error_code signal_set_service::cancel(
}
}
- io_context_.post_deferred_completions(ops);
+ scheduler_.post_deferred_completions(ops);
ec = asio::error_code();
return ec;
}
+void signal_set_service::cancel_ops_by_key(
+ signal_set_service::implementation_type& impl, void* cancellation_key)
+{
+ op_queue<operation> ops;
+ {
+ op_queue<signal_op> other_ops;
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ while (signal_op* op = impl.queue_.front())
+ {
+ impl.queue_.pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ else
+ other_ops.push(op);
+ }
+
+ impl.queue_.push(other_ops);
+ }
+
+ scheduler_.post_deferred_completions(ops);
+}
+
void signal_set_service::deliver_signal(int signal_number)
{
signal_state* state = get_signal_state();
@@ -492,7 +637,7 @@ void signal_set_service::deliver_signal(int signal_number)
reg = reg->next_in_table_;
}
- service->io_context_.post_deferred_completions(ops);
+ service->scheduler_.post_deferred_completions(ops);
service = service->next_;
}
@@ -509,17 +654,17 @@ void signal_set_service::add_service(signal_set_service* service)
open_descriptors();
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
- // If an io_context object is thread-unsafe then it must be the only
- // io_context used to create signal_set objects.
+ // If a scheduler_ object is thread-unsafe then it must be the only
+ // scheduler used to create signal_set objects.
if (state->service_list_ != 0)
{
if (!ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
- service->io_context_.concurrency_hint())
+ service->scheduler_.concurrency_hint())
|| !ASIO_CONCURRENCY_HINT_IS_LOCKING(SCHEDULER,
- state->service_list_->io_context_.concurrency_hint()))
+ state->service_list_->scheduler_.concurrency_hint()))
{
std::logic_error ex(
- "Thread-unsafe io_context objects require "
+ "Thread-unsafe execution context objects require "
"exclusive access to signal handling.");
asio::detail::throw_exception(ex);
}
@@ -538,8 +683,14 @@ void signal_set_service::add_service(signal_set_service* service)
// Register for pipe readiness notifications.
int read_descriptor = state->read_descriptor_;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ service->io_uring_service_.register_internal_io_object(
+ service->io_object_data_, io_uring_service::read_op, new pipe_read_op);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
service->reactor_.register_internal_descriptor(reactor::read_op,
read_descriptor, service->reactor_data_, new pipe_read_op);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -558,9 +709,17 @@ void signal_set_service::remove_service(signal_set_service* service)
// Disable the pipe readiness notifications.
int read_descriptor = state->read_descriptor_;
lock.unlock();
- service->reactor_.deregister_descriptor(
- read_descriptor, service->reactor_data_, false);
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ service->io_uring_service_.deregister_io_object(service->io_object_data_);
+ service->io_uring_service_.cleanup_io_object(service->io_object_data_);
+ lock.lock();
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ service->reactor_.deregister_internal_descriptor(
+ read_descriptor, service->reactor_data_);
+ service->reactor_.cleanup_descriptor_data(service->reactor_data_);
lock.lock();
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -637,7 +796,7 @@ void signal_set_service::close_descriptors()
void signal_set_service::start_wait_op(
signal_set_service::implementation_type& impl, signal_op* op)
{
- io_context_.work_started();
+ scheduler_.work_started();
signal_state* state = get_signal_state();
static_mutex::scoped_lock lock(state->mutex_);
@@ -649,7 +808,7 @@ void signal_set_service::start_wait_op(
{
--reg->undelivered_;
op->signal_number_ = reg->signal_number_;
- io_context_.post_deferred_completion(op);
+ scheduler_.post_deferred_completion(op);
return;
}
diff --git a/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp b/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
index d9cc1c95722..7feb7ca02df 100644
--- a/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
@@ -2,7 +2,7 @@
// detail/impl/socket_ops.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -73,32 +73,39 @@ inline void clear_last_error()
#if !defined(ASIO_WINDOWS_RUNTIME)
-template <typename ReturnType>
-inline ReturnType error_wrapper(ReturnType return_value,
- asio::error_code& ec)
+inline void get_last_error(
+ asio::error_code& ec, bool is_error_condition)
{
+ if (!is_error_condition)
+ {
+ asio::error::clear(ec);
+ }
+ else
+ {
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = asio::error_code(WSAGetLastError(),
- asio::error::get_system_category());
+ ec = asio::error_code(WSAGetLastError(),
+ asio::error::get_system_category());
#else
- ec = asio::error_code(errno,
- asio::error::get_system_category());
+ ec = asio::error_code(errno,
+ asio::error::get_system_category());
#endif
- return return_value;
+ }
}
template <typename SockLenType>
inline socket_type call_accept(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+ socket_type s, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
- socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0);
+ socket_type result = ::accept(s,
+ static_cast<socket_addr_type*>(addr),
+ addrlen ? &tmp_addrlen : 0);
if (addrlen)
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
-socket_type accept(socket_type s, socket_addr_type* addr,
+socket_type accept(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -107,17 +114,16 @@ socket_type accept(socket_type s, socket_addr_type* addr,
return invalid_socket;
}
- clear_last_error();
-
- socket_type new_s = error_wrapper(call_accept(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
+ socket_type new_s = call_accept(&msghdr::msg_namelen, s, addr, addrlen);
+ get_last_error(ec, new_s == invalid_socket);
if (new_s == invalid_socket)
return new_s;
#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
int optval = 1;
- int result = error_wrapper(::setsockopt(new_s,
- SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
+ int result = ::setsockopt(new_s, SOL_SOCKET,
+ SO_NOSIGPIPE, &optval, sizeof(optval));
+ get_last_error(ec, result != 0);
if (result != 0)
{
::close(new_s);
@@ -125,12 +131,12 @@ socket_type accept(socket_type s, socket_addr_type* addr,
}
#endif
- ec = asio::error_code();
+ asio::error::clear(ec);
return new_s;
}
socket_type sync_accept(socket_type s, state_type state,
- socket_addr_type* addr, std::size_t* addrlen, asio::error_code& ec)
+ void* addr, std::size_t* addrlen, asio::error_code& ec)
{
// Accept a socket.
for (;;)
@@ -175,9 +181,8 @@ socket_type sync_accept(socket_type s, state_type state,
#if defined(ASIO_HAS_IOCP)
-void complete_iocp_accept(socket_type s,
- void* output_buffer, DWORD address_length,
- socket_addr_type* addr, std::size_t* addrlen,
+void complete_iocp_accept(socket_type s, void* output_buffer,
+ DWORD address_length, void* addr, std::size_t* addrlen,
socket_type new_socket, asio::error_code& ec)
{
// Map non-portable errors to their portable counterparts.
@@ -221,7 +226,7 @@ void complete_iocp_accept(socket_type s,
#else // defined(ASIO_HAS_IOCP)
bool non_blocking_accept(socket_type s,
- state_type state, socket_addr_type* addr, std::size_t* addrlen,
+ state_type state, void* addr, std::size_t* addrlen,
asio::error_code& ec, socket_type& new_socket)
{
for (;;)
@@ -241,8 +246,6 @@ bool non_blocking_accept(socket_type s,
if (ec == asio::error::would_block
|| ec == asio::error::try_again)
{
- if (state & user_set_non_blocking)
- return true;
// Fall through to retry operation.
}
else if (ec == asio::error::connection_aborted)
@@ -270,12 +273,13 @@ bool non_blocking_accept(socket_type s,
template <typename SockLenType>
inline int call_bind(SockLenType msghdr::*,
- socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+ socket_type s, const void* addr, std::size_t addrlen)
{
- return ::bind(s, addr, (SockLenType)addrlen);
+ return ::bind(s, static_cast<const socket_addr_type*>(addr),
+ (SockLenType)addrlen);
}
-int bind(socket_type s, const socket_addr_type* addr,
+int bind(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -284,11 +288,8 @@ int bind(socket_type s, const socket_addr_type* addr,
return socket_error_retval;
}
- clear_last_error();
- int result = error_wrapper(call_bind(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = call_bind(&msghdr::msg_namelen, s, addr, addrlen);
+ get_last_error(ec, result != 0);
return result;
}
@@ -311,12 +312,12 @@ int close(socket_type s, state_type& state,
SO_LINGER, &opt, sizeof(opt), ignored_ec);
}
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::closesocket(s), ec);
+ result = ::closesocket(s);
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::close(s), ec);
+ result = ::close(s);
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ get_last_error(ec, result != 0);
if (result != 0
&& (ec == asio::error::would_block
@@ -332,28 +333,44 @@ int close(socket_type s, state_type& state,
ioctl_arg_type arg = 0;
::ioctlsocket(s, FIONBIO, &arg);
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(__SYMBIAN32__)
+# if defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
int flags = ::fcntl(s, F_GETFL, 0);
if (flags >= 0)
::fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
-# else // defined(__SYMBIAN32__)
+# else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = 0;
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ result = ::ioctl(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ int flags = ::fcntl(s, F_GETFL, 0);
+ if (flags >= 0)
+ ::fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
+ }
+# else // defined(ENOTTY) || defined(ENOTCAPABLE)
::ioctl(s, FIONBIO, &arg);
-# endif // defined(__SYMBIAN32__)
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
+# endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
state &= ~non_blocking;
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::closesocket(s), ec);
+ result = ::closesocket(s);
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::close(s), ec);
+ result = ::close(s);
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ get_last_error(ec, result != 0);
}
}
- if (result == 0)
- ec = asio::error_code();
return result;
}
@@ -366,26 +383,47 @@ bool set_user_non_blocking(socket_type s,
return false;
}
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
-#elif defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(s, F_GETFL, 0), ec);
+ int result = ::ioctlsocket(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+#elif defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
+ int result = ::fcntl(s, F_GETFL, 0);
+ get_last_error(ec, result < 0);
if (result >= 0)
{
- clear_last_error();
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(s, F_SETFL, flag), ec);
+ result = ::fcntl(s, F_SETFL, flag);
+ get_last_error(ec, result < 0);
}
-#else
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(s, FIONBIO, &arg), ec);
-#endif
+ int result = ::ioctl(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(s, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = ::fcntl(s, F_SETFL, flag);
+ get_last_error(ec, result < 0);
+ }
+ }
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
+#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
{
- ec = asio::error_code();
if (value)
state |= user_set_non_blocking;
else
@@ -419,26 +457,47 @@ bool set_internal_non_blocking(socket_type s,
return false;
}
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
-#elif defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(s, F_GETFL, 0), ec);
+ int result = ::ioctlsocket(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+#elif defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
+ int result = ::fcntl(s, F_GETFL, 0);
+ get_last_error(ec, result < 0);
if (result >= 0)
{
- clear_last_error();
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(s, F_SETFL, flag), ec);
+ result = ::fcntl(s, F_SETFL, flag);
+ get_last_error(ec, result < 0);
}
-#else
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(s, FIONBIO, &arg), ec);
-#endif
+ int result = ::ioctl(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(s, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = ::fcntl(s, F_SETFL, flag);
+ get_last_error(ec, result < 0);
+ }
+ }
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
+#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
{
- ec = asio::error_code();
if (value)
state |= internal_non_blocking;
else
@@ -457,21 +516,20 @@ int shutdown(socket_type s, int what, asio::error_code& ec)
return socket_error_retval;
}
- clear_last_error();
- int result = error_wrapper(::shutdown(s, what), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = ::shutdown(s, what);
+ get_last_error(ec, result != 0);
return result;
}
template <typename SockLenType>
inline int call_connect(SockLenType msghdr::*,
- socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+ socket_type s, const void* addr, std::size_t addrlen)
{
- return ::connect(s, addr, (SockLenType)addrlen);
+ return ::connect(s, static_cast<const socket_addr_type*>(addr),
+ (SockLenType)addrlen);
}
-int connect(socket_type s, const socket_addr_type* addr,
+int connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -480,19 +538,21 @@ int connect(socket_type s, const socket_addr_type* addr,
return socket_error_retval;
}
- clear_last_error();
- int result = error_wrapper(call_connect(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = call_connect(&msghdr::msg_namelen, s, addr, addrlen);
+ get_last_error(ec, result != 0);
#if defined(__linux__)
- else if (ec == asio::error::try_again)
- ec = asio::error::no_buffer_space;
+ if (result != 0 && ec == asio::error::try_again)
+ {
+ if (static_cast<const socket_addr_type*>(addr)->sa_family == AF_UNIX)
+ ec = asio::error::in_progress;
+ else
+ ec = asio::error::no_buffer_space;
+ }
#endif // defined(__linux__)
return result;
}
-void sync_connect(socket_type s, const socket_addr_type* addr,
+void sync_connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
// Perform the connect operation.
@@ -602,7 +662,7 @@ bool non_blocking_connect(socket_type s, asio::error_code& ec)
asio::error::get_system_category());
}
else
- ec = asio::error_code();
+ asio::error::clear(ec);
}
return true;
@@ -619,10 +679,8 @@ int socketpair(int af, int type, int protocol,
ec = asio::error::operation_not_supported;
return socket_error_retval;
#else
- clear_last_error();
- int result = error_wrapper(::socketpair(af, type, protocol, sv), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = ::socketpair(af, type, protocol, sv);
+ get_last_error(ec, result != 0);
return result;
#endif
}
@@ -638,20 +696,18 @@ bool sockatmark(socket_type s, asio::error_code& ec)
#if defined(SIOCATMARK)
ioctl_arg_type value = 0;
# if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctlsocket(s, SIOCATMARK, &value), ec);
+ int result = ::ioctlsocket(s, SIOCATMARK, &value);
# else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctl(s, SIOCATMARK, &value), ec);
+ int result = ::ioctl(s, SIOCATMARK, &value);
# endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- if (result == 0)
- ec = asio::error_code();
+ get_last_error(ec, result < 0);
# if defined(ENOTTY)
if (ec.value() == ENOTTY)
ec = asio::error::not_socket;
# endif // defined(ENOTTY)
#else // defined(SIOCATMARK)
- int value = error_wrapper(::sockatmark(s), ec);
- if (value != -1)
- ec = asio::error_code();
+ int value = ::sockatmark(s);
+ get_last_error(ec, value < 0);
#endif // defined(SIOCATMARK)
return ec ? false : value != 0;
@@ -667,12 +723,11 @@ size_t available(socket_type s, asio::error_code& ec)
ioctl_arg_type value = 0;
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctlsocket(s, FIONREAD, &value), ec);
+ int result = ::ioctlsocket(s, FIONREAD, &value);
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctl(s, FIONREAD, &value), ec);
+ int result = ::ioctl(s, FIONREAD, &value);
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- if (result == 0)
- ec = asio::error_code();
+ get_last_error(ec, result < 0);
#if defined(ENOTTY)
if (ec.value() == ENOTTY)
ec = asio::error::not_socket;
@@ -689,10 +744,8 @@ int listen(socket_type s, int backlog, asio::error_code& ec)
return socket_error_retval;
}
- clear_last_error();
- int result = error_wrapper(::listen(s, backlog), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = ::listen(s, backlog);
+ get_last_error(ec, result != 0);
return result;
}
@@ -735,9 +788,9 @@ void init_buf(buf& b, const void* data, size_t size)
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
-inline void init_msghdr_msg_name(void*& name, socket_addr_type* addr)
+inline void init_msghdr_msg_name(void*& name, void* addr)
{
- name = addr;
+ name = static_cast<socket_addr_type*>(addr);
}
inline void init_msghdr_msg_name(void*& name, const socket_addr_type* addr)
@@ -746,43 +799,74 @@ inline void init_msghdr_msg_name(void*& name, const socket_addr_type* addr)
}
template <typename T>
-inline void init_msghdr_msg_name(T& name, socket_addr_type* addr)
+inline void init_msghdr_msg_name(T& name, void* addr)
{
- name = reinterpret_cast<T>(addr);
+ name = static_cast<T>(addr);
}
template <typename T>
-inline void init_msghdr_msg_name(T& name, const socket_addr_type* addr)
+inline void init_msghdr_msg_name(T& name, const void* addr)
{
- name = reinterpret_cast<T>(const_cast<socket_addr_type*>(addr));
+ name = static_cast<T>(const_cast<void*>(addr));
}
signed_size_type recv(socket_type s, buf* bufs, size_t count,
int flags, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Receive some data.
DWORD recv_buf_count = static_cast<DWORD>(count);
DWORD bytes_transferred = 0;
DWORD recv_flags = flags;
- int result = error_wrapper(::WSARecv(s, bufs,
- recv_buf_count, &bytes_transferred, &recv_flags, 0, 0), ec);
+ int result = ::WSARecv(s, bufs, recv_buf_count,
+ &bytes_transferred, &recv_flags, 0, 0);
+ get_last_error(ec, true);
if (ec.value() == ERROR_NETNAME_DELETED)
ec = asio::error::connection_reset;
else if (ec.value() == ERROR_PORT_UNREACHABLE)
ec = asio::error::connection_refused;
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ result = 0;
if (result != 0)
return socket_error_retval;
- ec = asio::error_code();
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
msg.msg_iov = bufs;
msg.msg_iovlen = static_cast<int>(count);
- signed_size_type result = error_wrapper(::recvmsg(s, &msg, flags), ec);
- if (result >= 0)
- ec = asio::error_code();
+ signed_size_type result = ::recvmsg(s, &msg, flags);
+ get_last_error(ec, result < 0);
+ return result;
+#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+signed_size_type recv1(socket_type s, void* data, size_t size,
+ int flags, asio::error_code& ec)
+{
+#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Receive some data.
+ WSABUF buf;
+ buf.buf = const_cast<char*>(static_cast<const char*>(data));
+ buf.len = static_cast<ULONG>(size);
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int result = ::WSARecv(s, &buf, 1,
+ &bytes_transferred, &recv_flags, 0, 0);
+ get_last_error(ec, true);
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = asio::error::connection_refused;
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ result = 0;
+ if (result != 0)
+ return socket_error_retval;
+ asio::error::clear(ec);
+ return bytes_transferred;
+#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ signed_size_type result = ::recv(s, static_cast<char*>(data), size, flags);
+ get_last_error(ec, result < 0);
return result;
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
@@ -799,7 +883,7 @@ size_t sync_recv(socket_type s, state_type state, buf* bufs,
// A request to read 0 bytes on a stream is a no-op.
if (all_empty && (state & stream_oriented))
{
- ec = asio::error_code();
+ asio::error::clear(ec);
return 0;
}
@@ -809,10 +893,51 @@ size_t sync_recv(socket_type s, state_type state, buf* bufs,
// Try to complete the operation without blocking.
signed_size_type bytes = socket_ops::recv(s, bufs, count, flags, ec);
+ // Check for EOF.
+ if ((state & stream_oriented) && bytes == 0)
+ {
+ ec = asio::error::eof;
+ return 0;
+ }
+
// Check if operation succeeded.
- if (bytes > 0)
+ if (bytes >= 0)
return bytes;
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_read(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
+size_t sync_recv1(socket_type s, state_type state, void* data,
+ size_t size, int flags, asio::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (size == 0 && (state & stream_oriented))
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::recv1(s, data, size, flags, ec);
+
// Check for EOF.
if ((state & stream_oriented) && bytes == 0)
{
@@ -820,6 +945,10 @@ size_t sync_recv(socket_type s, state_type state, buf* bufs,
return 0;
}
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
// Operation failed.
if ((state & user_set_non_blocking)
|| (ec != asio::error::would_block
@@ -850,6 +979,10 @@ void complete_iocp_recv(state_type state,
{
ec = asio::error::connection_refused;
}
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ {
+ asio::error::clear(ec);
+ }
// Check for connection closed.
else if (!ec && bytes_transferred == 0
@@ -878,6 +1011,13 @@ bool non_blocking_recv(socket_type s,
return true;
}
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
continue;
@@ -887,15 +1027,46 @@ bool non_blocking_recv(socket_type s,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_recv1(socket_type s,
+ void* data, size_t size, int flags, bool is_stream,
+ asio::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = socket_ops::recv1(s, data, size, flags, ec);
+
+ // Check for end of stream.
+ if (is_stream && bytes == 0)
+ {
+ ec = asio::error::eof;
+ return true;
+ }
+
+ // Check if operation succeeded.
if (bytes >= 0)
{
- ec = asio::error_code();
bytes_transferred = bytes;
+ return true;
}
- else
- bytes_transferred = 0;
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
@@ -903,26 +1074,27 @@ bool non_blocking_recv(socket_type s,
#endif // defined(ASIO_HAS_IOCP)
signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
- int flags, socket_addr_type* addr, std::size_t* addrlen,
- asio::error_code& ec)
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Receive some data.
DWORD recv_buf_count = static_cast<DWORD>(count);
DWORD bytes_transferred = 0;
DWORD recv_flags = flags;
int tmp_addrlen = (int)*addrlen;
- int result = error_wrapper(::WSARecvFrom(s, bufs, recv_buf_count,
- &bytes_transferred, &recv_flags, addr, &tmp_addrlen, 0, 0), ec);
+ int result = ::WSARecvFrom(s, bufs, recv_buf_count, &bytes_transferred,
+ &recv_flags, static_cast<socket_addr_type*>(addr), &tmp_addrlen, 0, 0);
+ get_last_error(ec, true);
*addrlen = (std::size_t)tmp_addrlen;
if (ec.value() == ERROR_NETNAME_DELETED)
ec = asio::error::connection_reset;
else if (ec.value() == ERROR_PORT_UNREACHABLE)
ec = asio::error::connection_refused;
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ result = 0;
if (result != 0)
return socket_error_retval;
- ec = asio::error_code();
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
@@ -930,17 +1102,60 @@ signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
msg.msg_namelen = static_cast<int>(*addrlen);
msg.msg_iov = bufs;
msg.msg_iovlen = static_cast<int>(count);
- signed_size_type result = error_wrapper(::recvmsg(s, &msg, flags), ec);
+ signed_size_type result = ::recvmsg(s, &msg, flags);
+ get_last_error(ec, result < 0);
*addrlen = msg.msg_namelen;
- if (result >= 0)
- ec = asio::error_code();
return result;
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
-size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
- size_t count, int flags, socket_addr_type* addr,
- std::size_t* addrlen, asio::error_code& ec)
+template <typename SockLenType>
+inline signed_size_type call_recvfrom(SockLenType msghdr::*, socket_type s,
+ void* data, size_t size, int flags, void* addr, std::size_t* addrlen)
+{
+ SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
+ signed_size_type result = ::recvfrom(s, static_cast<char*>(data), size,
+ flags, static_cast<socket_addr_type*>(addr), addrlen ? &tmp_addrlen : 0);
+ if (addrlen)
+ *addrlen = (std::size_t)tmp_addrlen;
+ return result;
+}
+
+signed_size_type recvfrom1(socket_type s, void* data, size_t size,
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
+{
+#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Receive some data.
+ WSABUF buf;
+ buf.buf = static_cast<char*>(data);
+ buf.len = static_cast<ULONG>(size);
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int tmp_addrlen = (int)*addrlen;
+ int result = ::WSARecvFrom(s, &buf, 1, &bytes_transferred, &recv_flags,
+ static_cast<socket_addr_type*>(addr), &tmp_addrlen, 0, 0);
+ get_last_error(ec, true);
+ *addrlen = (std::size_t)tmp_addrlen;
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = asio::error::connection_refused;
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ result = 0;
+ if (result != 0)
+ return socket_error_retval;
+ asio::error::clear(ec);
+ return bytes_transferred;
+#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ signed_size_type result = call_recvfrom(&msghdr::msg_namelen,
+ s, data, size, flags, addr, addrlen);
+ get_last_error(ec, result < 0);
+ return result;
+#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+size_t sync_recvfrom(socket_type s, state_type state, buf* bufs, size_t count,
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
{
@@ -971,6 +1186,38 @@ size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
}
}
+size_t sync_recvfrom1(socket_type s, state_type state, void* data, size_t size,
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::recvfrom1(
+ s, data, size, flags, addr, addrlen, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_read(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
#if defined(ASIO_HAS_IOCP)
void complete_iocp_recvfrom(
@@ -989,13 +1236,16 @@ void complete_iocp_recvfrom(
{
ec = asio::error::connection_refused;
}
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ {
+ asio::error::clear(ec);
+ }
}
#else // defined(ASIO_HAS_IOCP)
-bool non_blocking_recvfrom(socket_type s,
- buf* bufs, size_t count, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
+bool non_blocking_recvfrom(socket_type s, buf* bufs,
+ size_t count, int flags, void* addr, std::size_t* addrlen,
asio::error_code& ec, size_t& bytes_transferred)
{
for (;;)
@@ -1004,6 +1254,13 @@ bool non_blocking_recvfrom(socket_type s,
signed_size_type bytes = socket_ops::recvfrom(
s, bufs, count, flags, addr, addrlen, ec);
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
continue;
@@ -1013,15 +1270,40 @@ bool non_blocking_recvfrom(socket_type s,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_recvfrom1(socket_type s, void* data,
+ size_t size, int flags, void* addr, std::size_t* addrlen,
+ asio::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = socket_ops::recvfrom1(
+ s, data, size, flags, addr, addrlen, ec);
+
+ // Check if operation succeeded.
if (bytes >= 0)
{
- ec = asio::error_code();
bytes_transferred = bytes;
+ return true;
}
- else
- bytes_transferred = 0;
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
@@ -1031,7 +1313,6 @@ bool non_blocking_recvfrom(socket_type s,
signed_size_type recvmsg(socket_type s, buf* bufs, size_t count,
int in_flags, int& out_flags, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
out_flags = 0;
return socket_ops::recv(s, bufs, count, in_flags, ec);
@@ -1039,12 +1320,10 @@ signed_size_type recvmsg(socket_type s, buf* bufs, size_t count,
msghdr msg = msghdr();
msg.msg_iov = bufs;
msg.msg_iovlen = static_cast<int>(count);
- signed_size_type result = error_wrapper(::recvmsg(s, &msg, in_flags), ec);
+ signed_size_type result = ::recvmsg(s, &msg, in_flags);
+ get_last_error(ec, result < 0);
if (result >= 0)
- {
- ec = asio::error_code();
out_flags = msg.msg_flags;
- }
else
out_flags = 0;
return result;
@@ -1102,6 +1381,10 @@ void complete_iocp_recvmsg(
{
ec = asio::error::connection_refused;
}
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ {
+ asio::error::clear(ec);
+ }
}
#else // defined(ASIO_HAS_IOCP)
@@ -1116,6 +1399,13 @@ bool non_blocking_recvmsg(socket_type s,
signed_size_type bytes = socket_ops::recvmsg(
s, bufs, count, in_flags, out_flags, ec);
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
continue;
@@ -1125,15 +1415,8 @@ bool non_blocking_recvmsg(socket_type s,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
- if (bytes >= 0)
- {
- ec = asio::error_code();
- bytes_transferred = bytes;
- }
- else
- bytes_transferred = 0;
-
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
@@ -1143,32 +1426,63 @@ bool non_blocking_recvmsg(socket_type s,
signed_size_type send(socket_type s, const buf* bufs, size_t count,
int flags, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Send the data.
DWORD send_buf_count = static_cast<DWORD>(count);
DWORD bytes_transferred = 0;
DWORD send_flags = flags;
- int result = error_wrapper(::WSASend(s, const_cast<buf*>(bufs),
- send_buf_count, &bytes_transferred, send_flags, 0, 0), ec);
+ int result = ::WSASend(s, const_cast<buf*>(bufs),
+ send_buf_count, &bytes_transferred, send_flags, 0, 0);
+ get_last_error(ec, true);
if (ec.value() == ERROR_NETNAME_DELETED)
ec = asio::error::connection_reset;
else if (ec.value() == ERROR_PORT_UNREACHABLE)
ec = asio::error::connection_refused;
if (result != 0)
return socket_error_retval;
- ec = asio::error_code();
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
msg.msg_iov = const_cast<buf*>(bufs);
msg.msg_iovlen = static_cast<int>(count);
-#if defined(__linux__)
+#if defined(ASIO_HAS_MSG_NOSIGNAL)
flags |= MSG_NOSIGNAL;
-#endif // defined(__linux__)
- signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
- if (result >= 0)
- ec = asio::error_code();
+#endif // defined(ASIO_HAS_MSG_NOSIGNAL)
+ signed_size_type result = ::sendmsg(s, &msg, flags);
+ get_last_error(ec, result < 0);
+ return result;
+#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+signed_size_type send1(socket_type s, const void* data, size_t size,
+ int flags, asio::error_code& ec)
+{
+#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Send the data.
+ WSABUF buf;
+ buf.buf = const_cast<char*>(static_cast<const char*>(data));
+ buf.len = static_cast<ULONG>(size);
+ DWORD bytes_transferred = 0;
+ DWORD send_flags = flags;
+ int result = ::WSASend(s, &buf, 1,
+ &bytes_transferred, send_flags, 0, 0);
+ get_last_error(ec, true);
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = asio::error::connection_refused;
+ if (result != 0)
+ return socket_error_retval;
+ asio::error::clear(ec);
+ return bytes_transferred;
+#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(ASIO_HAS_MSG_NOSIGNAL)
+ flags |= MSG_NOSIGNAL;
+#endif // defined(ASIO_HAS_MSG_NOSIGNAL)
+ signed_size_type result = ::send(s,
+ static_cast<const char*>(data), size, flags);
+ get_last_error(ec, result < 0);
return result;
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
@@ -1185,7 +1499,7 @@ size_t sync_send(socket_type s, state_type state, const buf* bufs,
// A request to write 0 bytes to a stream is a no-op.
if (all_empty && (state & stream_oriented))
{
- ec = asio::error_code();
+ asio::error::clear(ec);
return 0;
}
@@ -1211,6 +1525,44 @@ size_t sync_send(socket_type s, state_type state, const buf* bufs,
}
}
+size_t sync_send1(socket_type s, state_type state, const void* data,
+ size_t size, int flags, asio::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes to a stream is a no-op.
+ if (size == 0 && (state & stream_oriented))
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::send1(s, data, size, flags, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_write(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
#if defined(ASIO_HAS_IOCP)
void complete_iocp_send(
@@ -1242,6 +1594,13 @@ bool non_blocking_send(socket_type s,
// Write some data.
signed_size_type bytes = socket_ops::send(s, bufs, count, flags, ec);
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
continue;
@@ -1251,40 +1610,65 @@ bool non_blocking_send(socket_type s,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_send1(socket_type s,
+ const void* data, size_t size, int flags,
+ asio::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = socket_ops::send1(s, data, size, flags, ec);
+
+ // Check if operation succeeded.
if (bytes >= 0)
{
- ec = asio::error_code();
bytes_transferred = bytes;
+ return true;
}
- else
- bytes_transferred = 0;
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
#endif // defined(ASIO_HAS_IOCP)
-signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
- int flags, const socket_addr_type* addr, std::size_t addrlen,
- asio::error_code& ec)
+signed_size_type sendto(socket_type s, const buf* bufs,
+ size_t count, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Send the data.
DWORD send_buf_count = static_cast<DWORD>(count);
DWORD bytes_transferred = 0;
- int result = error_wrapper(::WSASendTo(s, const_cast<buf*>(bufs),
- send_buf_count, &bytes_transferred, flags, addr,
- static_cast<int>(addrlen), 0, 0), ec);
+ int result = ::WSASendTo(s, const_cast<buf*>(bufs),
+ send_buf_count, &bytes_transferred, flags,
+ static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), 0, 0);
+ get_last_error(ec, true);
if (ec.value() == ERROR_NETNAME_DELETED)
ec = asio::error::connection_reset;
else if (ec.value() == ERROR_PORT_UNREACHABLE)
ec = asio::error::connection_refused;
if (result != 0)
return socket_error_retval;
- ec = asio::error_code();
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
@@ -1292,18 +1676,59 @@ signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
msg.msg_namelen = static_cast<int>(addrlen);
msg.msg_iov = const_cast<buf*>(bufs);
msg.msg_iovlen = static_cast<int>(count);
-#if defined(__linux__)
+#if defined(ASIO_HAS_MSG_NOSIGNAL)
flags |= MSG_NOSIGNAL;
-#endif // defined(__linux__)
- signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
- if (result >= 0)
- ec = asio::error_code();
+#endif // defined(ASIO_HAS_MSG_NOSIGNAL)
+ signed_size_type result = ::sendmsg(s, &msg, flags);
+ get_last_error(ec, result < 0);
+ return result;
+#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+template <typename SockLenType>
+inline signed_size_type call_sendto(SockLenType msghdr::*,
+ socket_type s, const void* data, size_t size, int flags,
+ const void* addr, std::size_t addrlen)
+{
+ return ::sendto(s, static_cast<char*>(const_cast<void*>(data)), size, flags,
+ static_cast<const socket_addr_type*>(addr), (SockLenType)addrlen);
+}
+
+signed_size_type sendto1(socket_type s, const void* data,
+ size_t size, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec)
+{
+#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Send the data.
+ WSABUF buf;
+ buf.buf = const_cast<char*>(static_cast<const char*>(data));
+ buf.len = static_cast<ULONG>(size);
+ DWORD bytes_transferred = 0;
+ int result = ::WSASendTo(s, &buf, 1, &bytes_transferred, flags,
+ static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), 0, 0);
+ get_last_error(ec, true);
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = asio::error::connection_refused;
+ if (result != 0)
+ return socket_error_retval;
+ asio::error::clear(ec);
+ return bytes_transferred;
+#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(ASIO_HAS_MSG_NOSIGNAL)
+ flags |= MSG_NOSIGNAL;
+#endif // defined(ASIO_HAS_MSG_NOSIGNAL)
+ signed_size_type result = call_sendto(&msghdr::msg_namelen,
+ s, data, size, flags, addr, addrlen);
+ get_last_error(ec, result < 0);
return result;
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
-size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
- size_t count, int flags, const socket_addr_type* addr,
+size_t sync_sendto(socket_type s, state_type state,
+ const buf* bufs, size_t count, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -1335,11 +1760,44 @@ size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
}
}
+size_t sync_sendto1(socket_type s, state_type state,
+ const void* data, size_t size, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::sendto1(
+ s, data, size, flags, addr, addrlen, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_write(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
#if !defined(ASIO_HAS_IOCP)
bool non_blocking_sendto(socket_type s,
const buf* bufs, size_t count, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
asio::error_code& ec, size_t& bytes_transferred)
{
for (;;)
@@ -1348,6 +1806,13 @@ bool non_blocking_sendto(socket_type s,
signed_size_type bytes = socket_ops::sendto(
s, bufs, count, flags, addr, addrlen, ec);
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
// Retry operation if interrupted by signal.
if (ec == asio::error::interrupted)
continue;
@@ -1357,15 +1822,41 @@ bool non_blocking_sendto(socket_type s,
|| ec == asio::error::try_again)
return false;
- // Operation is complete.
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_sendto1(socket_type s,
+ const void* data, size_t size, int flags,
+ const void* addr, std::size_t addrlen,
+ asio::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = socket_ops::sendto1(
+ s, data, size, flags, addr, addrlen, ec);
+
+ // Check if operation succeeded.
if (bytes >= 0)
{
- ec = asio::error_code();
bytes_transferred = bytes;
+ return true;
}
- else
- bytes_transferred = 0;
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
return true;
}
}
@@ -1375,10 +1866,9 @@ bool non_blocking_sendto(socket_type s,
socket_type socket(int af, int type, int protocol,
asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- socket_type s = error_wrapper(::WSASocketW(af, type, protocol, 0, 0,
- WSA_FLAG_OVERLAPPED), ec);
+ socket_type s = ::WSASocketW(af, type, protocol, 0, 0, WSA_FLAG_OVERLAPPED);
+ get_last_error(ec, s == invalid_socket);
if (s == invalid_socket)
return s;
@@ -1392,17 +1882,17 @@ socket_type socket(int af, int type, int protocol,
reinterpret_cast<const char*>(&optval), sizeof(optval));
}
- ec = asio::error_code();
-
return s;
#elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
- socket_type s = error_wrapper(::socket(af, type, protocol), ec);
+ socket_type s = ::socket(af, type, protocol);
+ get_last_error(ec, s == invalid_socket);
if (s == invalid_socket)
return s;
int optval = 1;
- int result = error_wrapper(::setsockopt(s,
- SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
+ int result = ::setsockopt(s, SOL_SOCKET,
+ SO_NOSIGPIPE, &optval, sizeof(optval));
+ get_last_error(ec, result != 0);
if (result != 0)
{
::close(s);
@@ -1411,9 +1901,8 @@ socket_type socket(int af, int type, int protocol,
return s;
#else
- int s = error_wrapper(::socket(af, type, protocol), ec);
- if (s >= 0)
- ec = asio::error_code();
+ int s = ::socket(af, type, protocol);
+ get_last_error(ec, s < 0);
return s;
#endif
}
@@ -1455,7 +1944,7 @@ int setsockopt(socket_type s, state_type& state, int level, int optname,
state |= enable_connection_aborted;
else
state &= ~enable_connection_aborted;
- ec = asio::error_code();
+ asio::error::clear(ec);
return 0;
}
@@ -1471,24 +1960,24 @@ int setsockopt(socket_type s, state_type& state, int level, int optname,
typedef int (WSAAPI *sso_t)(SOCKET, int, int, const char*, int);
if (sso_t sso = (sso_t)::GetProcAddress(winsock_module, "setsockopt"))
{
- clear_last_error();
- return error_wrapper(sso(s, level, optname,
+ int result = sso(s, level, optname,
reinterpret_cast<const char*>(optval),
- static_cast<int>(optlen)), ec);
+ static_cast<int>(optlen));
+ get_last_error(ec, result != 0);
+ return result;
}
}
ec = asio::error::fault;
return socket_error_retval;
#else // defined(__BORLANDC__)
- clear_last_error();
- int result = error_wrapper(call_setsockopt(&msghdr::msg_namelen,
- s, level, optname, optval, optlen), ec);
+ int result = call_setsockopt(&msghdr::msg_namelen,
+ s, level, optname, optval, optlen);
+ get_last_error(ec, result != 0);
if (result == 0)
{
- ec = asio::error_code();
-
#if defined(__MACH__) && defined(__APPLE__) \
- || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ || defined(__NetBSD__) || defined(__FreeBSD__) \
+ || defined(__OpenBSD__) || defined(__QNX__)
// To implement portable behaviour for SO_REUSEADDR with UDP sockets we
// need to also set SO_REUSEPORT on BSD-based platforms.
if ((state & datagram_oriented)
@@ -1540,7 +2029,7 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
}
*static_cast<int*>(optval) = (state & enable_connection_aborted) ? 1 : 0;
- ec = asio::error_code();
+ asio::error::clear(ec);
return 0;
}
@@ -1553,10 +2042,10 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
typedef int (WSAAPI *gso_t)(SOCKET, int, int, char*, int*);
if (gso_t gso = (gso_t)::GetProcAddress(winsock_module, "getsockopt"))
{
- clear_last_error();
int tmp_optlen = static_cast<int>(*optlen);
- int result = error_wrapper(gso(s, level, optname,
- reinterpret_cast<char*>(optval), &tmp_optlen), ec);
+ int result = gso(s, level, optname,
+ reinterpret_cast<char*>(optval), &tmp_optlen);
+ get_last_error(ec, result != 0);
*optlen = static_cast<size_t>(tmp_optlen);
if (result != 0 && level == IPPROTO_IPV6 && optname == IPV6_V6ONLY
&& ec.value() == WSAENOPROTOOPT && *optlen == sizeof(DWORD))
@@ -1567,7 +2056,7 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
// value is non-zero (i.e. true). This corresponds to the behavior of
// IPv6 sockets on Windows platforms pre-Vista.
*static_cast<DWORD*>(optval) = 1;
- ec = asio::error_code();
+ asio::error::clear(ec);
}
return result;
}
@@ -1575,9 +2064,9 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
ec = asio::error::fault;
return socket_error_retval;
#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- clear_last_error();
- int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
- s, level, optname, optval, optlen), ec);
+ int result = call_getsockopt(&msghdr::msg_namelen,
+ s, level, optname, optval, optlen);
+ get_last_error(ec, result != 0);
if (result != 0 && level == IPPROTO_IPV6 && optname == IPV6_V6ONLY
&& ec.value() == WSAENOPROTOOPT && *optlen == sizeof(DWORD))
{
@@ -1587,15 +2076,13 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
// non-zero (i.e. true). This corresponds to the behavior of IPv6 sockets
// on Windows platforms pre-Vista.
*static_cast<DWORD*>(optval) = 1;
- ec = asio::error_code();
+ asio::error::clear(ec);
}
- if (result == 0)
- ec = asio::error_code();
return result;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- clear_last_error();
- int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
- s, level, optname, optval, optlen), ec);
+ int result = call_getsockopt(&msghdr::msg_namelen,
+ s, level, optname, optval, optlen);
+ get_last_error(ec, result != 0);
#if defined(__linux__)
if (result == 0 && level == SOL_SOCKET && *optlen == sizeof(int)
&& (optname == SO_SNDBUF || optname == SO_RCVBUF))
@@ -1608,24 +2095,23 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
*static_cast<int*>(optval) /= 2;
}
#endif // defined(__linux__)
- if (result == 0)
- ec = asio::error_code();
return result;
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
template <typename SockLenType>
inline int call_getpeername(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+ socket_type s, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = (SockLenType)*addrlen;
- int result = ::getpeername(s, addr, &tmp_addrlen);
+ int result = ::getpeername(s,
+ static_cast<socket_addr_type*>(addr), &tmp_addrlen);
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
-int getpeername(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, bool cached, asio::error_code& ec)
+int getpeername(socket_type s, void* addr, std::size_t* addrlen,
+ bool cached, asio::error_code& ec)
{
if (s == invalid_socket)
{
@@ -1652,7 +2138,7 @@ int getpeername(socket_type s, socket_addr_type* addr,
}
// The cached value is still valid.
- ec = asio::error_code();
+ asio::error::clear(ec);
return 0;
}
#else // defined(ASIO_WINDOWS) && !defined(ASIO_WINDOWS_APP)
@@ -1661,25 +2147,23 @@ int getpeername(socket_type s, socket_addr_type* addr,
#endif // defined(ASIO_WINDOWS) && !defined(ASIO_WINDOWS_APP)
// || defined(__CYGWIN__)
- clear_last_error();
- int result = error_wrapper(call_getpeername(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = call_getpeername(&msghdr::msg_namelen, s, addr, addrlen);
+ get_last_error(ec, result != 0);
return result;
}
template <typename SockLenType>
inline int call_getsockname(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+ socket_type s, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = (SockLenType)*addrlen;
- int result = ::getsockname(s, addr, &tmp_addrlen);
+ int result = ::getsockname(s,
+ static_cast<socket_addr_type*>(addr), &tmp_addrlen);
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
-int getsockname(socket_type s, socket_addr_type* addr,
+int getsockname(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -1688,11 +2172,8 @@ int getsockname(socket_type s, socket_addr_type* addr,
return socket_error_retval;
}
- clear_last_error();
- int result = error_wrapper(call_getsockname(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = asio::error_code();
+ int result = call_getsockname(&msghdr::msg_namelen, s, addr, addrlen);
+ get_last_error(ec, result != 0);
return result;
}
@@ -1705,20 +2186,17 @@ int ioctl(socket_type s, state_type& state, int cmd,
return socket_error_retval;
}
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctlsocket(s, cmd, arg), ec);
+ int result = ::ioctlsocket(s, cmd, arg);
#elif defined(__MACH__) && defined(__APPLE__) \
|| defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- int result = error_wrapper(::ioctl(s,
- static_cast<unsigned int>(cmd), arg), ec);
+ int result = ::ioctl(s, static_cast<unsigned int>(cmd), arg);
#else
- int result = error_wrapper(::ioctl(s, cmd, arg), ec);
+ int result = ::ioctl(s, cmd, arg);
#endif
+ get_last_error(ec, result < 0);
if (result >= 0)
{
- ec = asio::error_code();
-
// When updating the non-blocking mode we always perform the ioctl syscall,
// even if the flags would otherwise indicate that the socket is already in
// the correct state. This ensures that the underlying socket is put into
@@ -1746,7 +2224,9 @@ int ioctl(socket_type s, state_type& state, int cmd,
int select(int nfds, fd_set* readfds, fd_set* writefds,
fd_set* exceptfds, timeval* timeout, asio::error_code& ec)
{
- clear_last_error();
+#if defined(__EMSCRIPTEN__)
+ exceptfds = 0;
+#endif // defined(__EMSCRIPTEN__)
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
if (!readfds && !writefds && !exceptfds && timeout)
{
@@ -1754,7 +2234,7 @@ int select(int nfds, fd_set* readfds, fd_set* writefds,
if (milliseconds == 0)
milliseconds = 1; // Force context switch.
::Sleep(milliseconds);
- ec = asio::error_code();
+ asio::error::clear(ec);
return 0;
}
@@ -1773,15 +2253,13 @@ int select(int nfds, fd_set* readfds, fd_set* writefds,
timespec ts;
ts.tv_sec = timeout ? timeout->tv_sec : 0;
ts.tv_nsec = timeout ? timeout->tv_usec * 1000 : 0;
- return error_wrapper(::pselect(nfds, readfds,
- writefds, exceptfds, timeout ? &ts : 0, 0), ec);
+ int result = ::pselect(nfds, readfds,
+ writefds, exceptfds, timeout ? &ts : 0, 0);
#else
- int result = error_wrapper(::select(nfds, readfds,
- writefds, exceptfds, timeout), ec);
- if (result >= 0)
- ec = asio::error_code();
- return result;
+ int result = ::select(nfds, readfds, writefds, exceptfds, timeout);
#endif
+ get_last_error(ec, result < 0);
+ return result;
}
int poll_read(socket_type s, state_type state,
@@ -1815,8 +2293,8 @@ int poll_read(socket_type s, state_type state,
}
else
timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(s + 1, &fds, 0, 0, timeout), ec);
+ int result = ::select(s + 1, &fds, 0, 0, timeout);
+ get_last_error(ec, result < 0);
#else // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
@@ -1825,16 +2303,14 @@ int poll_read(socket_type s, state_type state,
fds.events = POLLIN;
fds.revents = 0;
int timeout = (state & user_set_non_blocking) ? 0 : msec;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ int result = ::poll(&fds, 1, timeout);
+ get_last_error(ec, result < 0);
#endif // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
if (result == 0)
- ec = (state & user_set_non_blocking)
- ? asio::error::would_block : asio::error_code();
- else if (result > 0)
- ec = asio::error_code();
+ if (state & user_set_non_blocking)
+ ec = asio::error::would_block;
return result;
}
@@ -1869,8 +2345,8 @@ int poll_write(socket_type s, state_type state,
}
else
timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(s + 1, 0, &fds, 0, timeout), ec);
+ int result = ::select(s + 1, 0, &fds, 0, timeout);
+ get_last_error(ec, result < 0);
#else // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
@@ -1879,16 +2355,14 @@ int poll_write(socket_type s, state_type state,
fds.events = POLLOUT;
fds.revents = 0;
int timeout = (state & user_set_non_blocking) ? 0 : msec;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ int result = ::poll(&fds, 1, timeout);
+ get_last_error(ec, result < 0);
#endif // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
if (result == 0)
- ec = (state & user_set_non_blocking)
- ? asio::error::would_block : asio::error_code();
- else if (result > 0)
- ec = asio::error_code();
+ if (state & user_set_non_blocking)
+ ec = asio::error::would_block;
return result;
}
@@ -1923,8 +2397,8 @@ int poll_error(socket_type s, state_type state,
}
else
timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(s + 1, 0, 0, &fds, timeout), ec);
+ int result = ::select(s + 1, 0, 0, &fds, timeout);
+ get_last_error(ec, result < 0);
#else // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
@@ -1933,16 +2407,14 @@ int poll_error(socket_type s, state_type state,
fds.events = POLLPRI | POLLERR | POLLHUP;
fds.revents = 0;
int timeout = (state & user_set_non_blocking) ? 0 : msec;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+ int result = ::poll(&fds, 1, timeout);
+ get_last_error(ec, result < 0);
#endif // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
if (result == 0)
- ec = (state & user_set_non_blocking)
- ? asio::error::would_block : asio::error_code();
- else if (result > 0)
- ec = asio::error_code();
+ if (state & user_set_non_blocking)
+ ec = asio::error::would_block;
return result;
}
@@ -1973,11 +2445,8 @@ int poll_connect(socket_type s, int msec, asio::error_code& ec)
}
else
timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(
- s + 1, 0, &write_fds, &except_fds, timeout), ec);
- if (result >= 0)
- ec = asio::error_code();
+ int result = ::select(s + 1, 0, &write_fds, &except_fds, timeout);
+ get_last_error(ec, result < 0);
return result;
#else // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
@@ -1986,10 +2455,8 @@ int poll_connect(socket_type s, int msec, asio::error_code& ec)
fds.fd = s;
fds.events = POLLOUT;
fds.revents = 0;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, msec), ec);
- if (result >= 0)
- ec = asio::error_code();
+ int result = ::poll(&fds, 1, msec);
+ get_last_error(ec, result < 0);
return result;
#endif // defined(ASIO_WINDOWS)
// || defined(__CYGWIN__)
@@ -2074,18 +2541,20 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
DWORD string_length = static_cast<DWORD>(length);
#if defined(BOOST_NO_ANSI_APIS) || (defined(_MSC_VER) && (_MSC_VER >= 1800))
LPWSTR string_buffer = (LPWSTR)_alloca(length * sizeof(WCHAR));
- int result = error_wrapper(::WSAAddressToStringW(&address.base,
- address_length, 0, string_buffer, &string_length), ec);
+ int result = ::WSAAddressToStringW(&address.base,
+ address_length, 0, string_buffer, &string_length);
+ get_last_error(ec, true);
::WideCharToMultiByte(CP_ACP, 0, string_buffer, -1,
dest, static_cast<int>(length), 0, 0);
#else
- int result = error_wrapper(::WSAAddressToStringA(
- &address.base, address_length, 0, dest, &string_length), ec);
+ int result = ::WSAAddressToStringA(&address.base,
+ address_length, 0, dest, &string_length);
+ get_last_error(ec, true);
#endif
// Windows may set error code on success.
if (result != socket_error_retval)
- ec = asio::error_code();
+ asio::error::clear(ec);
// Windows may not set an error code on failure.
else if (result == socket_error_retval && !ec)
@@ -2093,14 +2562,14 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
return result == socket_error_retval ? 0 : dest;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
- const char* result = error_wrapper(::inet_ntop(
- af, src, dest, static_cast<int>(length)), ec);
+ const char* result = ::inet_ntop(af, src, dest, static_cast<int>(length));
+ get_last_error(ec, true);
if (result == 0 && !ec)
ec = asio::error::invalid_argument;
if (result != 0 && af == ASIO_OS_DEF(AF_INET6) && scope_id != 0)
{
using namespace std; // For strcat and sprintf.
- char if_name[IF_NAMESIZE + 1] = "%";
+ char if_name[(IF_NAMESIZE > 21 ? IF_NAMESIZE : 21) + 1] = "%";
const in6_addr_type* ipv6_address = static_cast<const in6_addr_type*>(src);
bool is_link_local = ((ipv6_address->s6_addr[0] == 0xfe)
&& ((ipv6_address->s6_addr[1] & 0xc0) == 0x80));
@@ -2108,7 +2577,11 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
&& ((ipv6_address->s6_addr[1] & 0x0f) == 0x02));
if ((!is_link_local && !is_multicast_link_local)
|| if_indextoname(static_cast<unsigned>(scope_id), if_name + 1) == 0)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(if_name + 1, sizeof(if_name) - 1, "%lu", scope_id);
+#else // defined(ASIO_HAS_SNPRINTF)
sprintf(if_name + 1, "%lu", scope_id);
+#endif // defined(ASIO_HAS_SNPRINTF)
strcat(dest, if_name);
}
return result;
@@ -2139,7 +2612,7 @@ int inet_pton(int af, const char* src, void* dest,
bytes[1] = static_cast<unsigned char>(b1);
bytes[2] = static_cast<unsigned char>(b2);
bytes[3] = static_cast<unsigned char>(b3);
- ec = asio::error_code();
+ asio::error::clear(ec);
return 1;
}
else if (af == ASIO_OS_DEF(AF_INET6))
@@ -2255,7 +2728,7 @@ int inet_pton(int af, const char* src, void* dest,
for (int i = 0; i < num_back_bytes; ++i)
bytes[16 - num_back_bytes + i] = back_bytes[i];
- ec = asio::error_code();
+ asio::error::clear(ec);
return 1;
}
else
@@ -2284,11 +2757,13 @@ int inet_pton(int af, const char* src, void* dest,
int num_wide_chars = static_cast<int>(strlen(src)) + 1;
LPWSTR wide_buffer = (LPWSTR)_alloca(num_wide_chars * sizeof(WCHAR));
::MultiByteToWideChar(CP_ACP, 0, src, -1, wide_buffer, num_wide_chars);
- int result = error_wrapper(::WSAStringToAddressW(
- wide_buffer, af, 0, &address.base, &address_length), ec);
+ int result = ::WSAStringToAddressW(wide_buffer,
+ af, 0, &address.base, &address_length);
+ get_last_error(ec, true);
#else
- int result = error_wrapper(::WSAStringToAddressA(
- const_cast<char*>(src), af, 0, &address.base, &address_length), ec);
+ int result = ::WSAStringToAddressA(const_cast<char*>(src),
+ af, 0, &address.base, &address_length);
+ get_last_error(ec, true);
#endif
if (af == ASIO_OS_DEF(AF_INET))
@@ -2296,12 +2771,12 @@ int inet_pton(int af, const char* src, void* dest,
if (result != socket_error_retval)
{
memcpy(dest, &address.v4.sin_addr, sizeof(in4_addr_type));
- ec = asio::error_code();
+ asio::error::clear(ec);
}
else if (strcmp(src, "255.255.255.255") == 0)
{
static_cast<in4_addr_type*>(dest)->s_addr = INADDR_NONE;
- ec = asio::error_code();
+ asio::error::clear(ec);
}
}
else // AF_INET6
@@ -2311,7 +2786,7 @@ int inet_pton(int af, const char* src, void* dest,
memcpy(dest, &address.v6.sin6_addr, sizeof(in6_addr_type));
if (scope_id)
*scope_id = address.v6.sin6_scope_id;
- ec = asio::error_code();
+ asio::error::clear(ec);
}
}
@@ -2320,7 +2795,7 @@ int inet_pton(int af, const char* src, void* dest,
ec = asio::error::invalid_argument;
if (result != socket_error_retval)
- ec = asio::error_code();
+ asio::error::clear(ec);
return result == socket_error_retval ? -1 : 1;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -2344,7 +2819,8 @@ int inet_pton(int af, const char* src, void* dest,
src_ptr = src_buf;
}
- int result = error_wrapper(::inet_pton(af, src_ptr, dest), ec);
+ int result = ::inet_pton(af, src_ptr, dest);
+ get_last_error(ec, true);
if (result <= 0 && !ec)
ec = asio::error::invalid_argument;
if (result > 0 && is_v6 && scope_id)
@@ -2370,7 +2846,6 @@ int inet_pton(int af, const char* src, void* dest,
int gethostname(char* name, int namelen, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS_RUNTIME)
try
{
@@ -2401,11 +2876,8 @@ int gethostname(char* name, int namelen, asio::error_code& ec)
return -1;
}
#else // defined(ASIO_WINDOWS_RUNTIME)
- int result = error_wrapper(::gethostname(name, namelen), ec);
-# if defined(ASIO_WINDOWS)
- if (result == 0)
- ec = asio::error_code();
-# endif // defined(ASIO_WINDOWS)
+ int result = ::gethostname(name, namelen);
+ get_last_error(ec, result != 0);
return result;
#endif // defined(ASIO_WINDOWS_RUNTIME)
}
@@ -2440,20 +2912,20 @@ inline asio::error_code translate_netdb_error(int error)
inline hostent* gethostbyaddr(const char* addr, int length, int af,
hostent* result, char* buffer, int buflength, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
(void)(buffer);
(void)(buflength);
- hostent* retval = error_wrapper(::gethostbyaddr(addr, length, af), ec);
+ hostent* retval = ::gethostbyaddr(addr, length, af);
+ get_last_error(ec, !retval);
if (!retval)
return 0;
- ec = asio::error_code();
*result = *retval;
return retval;
#elif defined(__sun) || defined(__QNX__)
int error = 0;
- hostent* retval = error_wrapper(::gethostbyaddr_r(addr, length, af, result,
- buffer, buflength, &error), ec);
+ hostent* retval = ::gethostbyaddr_r(addr, length,
+ af, result, buffer, buflength, &error);
+ get_last_error(ec, !retval);
if (error)
ec = translate_netdb_error(error);
return retval;
@@ -2461,8 +2933,8 @@ inline hostent* gethostbyaddr(const char* addr, int length, int af,
(void)(buffer);
(void)(buflength);
int error = 0;
- hostent* retval = error_wrapper(::getipnodebyaddr(
- addr, length, af, &error), ec);
+ hostent* retval = ::getipnodebyaddr(addr, length, af, &error);
+ get_last_error(ec, !retval);
if (error)
ec = translate_netdb_error(error);
if (!retval)
@@ -2472,8 +2944,10 @@ inline hostent* gethostbyaddr(const char* addr, int length, int af,
#else
hostent* retval = 0;
int error = 0;
- error_wrapper(::gethostbyaddr_r(addr, length, af, result, buffer,
- buflength, &retval, &error), ec);
+ clear_last_error();
+ ::gethostbyaddr_r(addr, length, af, result,
+ buffer, buflength, &retval, &error);
+ get_last_error(ec, true);
if (error)
ec = translate_netdb_error(error);
return retval;
@@ -2483,7 +2957,6 @@ inline hostent* gethostbyaddr(const char* addr, int length, int af,
inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
char* buffer, int buflength, int ai_flags, asio::error_code& ec)
{
- clear_last_error();
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
(void)(buffer);
(void)(buflength);
@@ -2493,10 +2966,10 @@ inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
ec = asio::error::address_family_not_supported;
return 0;
}
- hostent* retval = error_wrapper(::gethostbyname(name), ec);
+ hostent* retval = ::gethostbyname(name);
+ get_last_error(ec, !retval);
if (!retval)
return 0;
- ec = asio::error_code();
*result = *retval;
return result;
#elif defined(__sun) || defined(__QNX__)
@@ -2507,8 +2980,8 @@ inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
return 0;
}
int error = 0;
- hostent* retval = error_wrapper(::gethostbyname_r(name, result, buffer,
- buflength, &error), ec);
+ hostent* retval = ::gethostbyname_r(name, result, buffer, buflength, &error);
+ get_last_error(ec, !retval);
if (error)
ec = translate_netdb_error(error);
return retval;
@@ -2516,8 +2989,8 @@ inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
(void)(buffer);
(void)(buflength);
int error = 0;
- hostent* retval = error_wrapper(::getipnodebyname(
- name, af, ai_flags, &error), ec);
+ hostent* retval = ::getipnodebyname(name, af, ai_flags, &error);
+ get_last_error(ec, !retval);
if (error)
ec = translate_netdb_error(error);
if (!retval)
@@ -2533,8 +3006,9 @@ inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
}
hostent* retval = 0;
int error = 0;
- error_wrapper(::gethostbyname_r(name, result,
- buffer, buflength, &retval, &error), ec);
+ clear_last_error();
+ ::gethostbyname_r(name, result, buffer, buflength, &retval, &error);
+ get_last_error(ec, true);
if (error)
ec = translate_netdb_error(error);
return retval;
@@ -3215,7 +3689,9 @@ inline asio::error_code getnameinfo_emulation(
{
return ec = asio::error::no_buffer_space;
}
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(serv, servlen, "%u", ntohs(port));
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(serv, servlen, "%u", ntohs(port));
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(serv, "%u", ntohs(port));
@@ -3238,7 +3714,9 @@ inline asio::error_code getnameinfo_emulation(
{
return ec = asio::error::no_buffer_space;
}
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(serv, servlen, "%u", ntohs(port));
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(serv, servlen, "%u", ntohs(port));
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(serv, "%u", ntohs(port));
@@ -3250,7 +3728,7 @@ inline asio::error_code getnameinfo_emulation(
}
}
- ec = asio::error_code();
+ asio::error::clear(ec);
return ec;
}
@@ -3327,6 +3805,37 @@ asio::error_code getaddrinfo(const char* host,
return ec = translate_addrinfo_error(error);
#else
int error = ::getaddrinfo(host, service, &hints, result);
+#if defined(__MACH__) && defined(__APPLE__)
+ using namespace std; // For isdigit and atoi.
+ if (error == 0 && service && isdigit(static_cast<unsigned char>(service[0])))
+ {
+ u_short_type port = host_to_network_short(atoi(service));
+ for (addrinfo_type* ai = *result; ai; ai = ai->ai_next)
+ {
+ switch (ai->ai_family)
+ {
+ case ASIO_OS_DEF(AF_INET):
+ {
+ sockaddr_in4_type* sinptr =
+ reinterpret_cast<sockaddr_in4_type*>(ai->ai_addr);
+ if (sinptr->sin_port == 0)
+ sinptr->sin_port = port;
+ break;
+ }
+ case ASIO_OS_DEF(AF_INET6):
+ {
+ sockaddr_in6_type* sin6ptr =
+ reinterpret_cast<sockaddr_in6_type*>(ai->ai_addr);
+ if (sin6ptr->sin6_port == 0)
+ sin6ptr->sin6_port = port;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+#endif
return ec = translate_addrinfo_error(error);
#endif
}
@@ -3369,7 +3878,7 @@ void freeaddrinfo(addrinfo_type* ai)
#endif
}
-asio::error_code getnameinfo(const socket_addr_type* addr,
+asio::error_code getnameinfo(const void* addr,
std::size_t addrlen, char* host, std::size_t hostlen,
char* serv, std::size_t servlen, int flags, asio::error_code& ec)
{
@@ -3377,8 +3886,8 @@ asio::error_code getnameinfo(const socket_addr_type* addr,
# if defined(ASIO_HAS_GETADDRINFO)
// Building for Windows XP, Windows Server 2003, or later.
clear_last_error();
- int error = ::getnameinfo(addr, static_cast<socklen_t>(addrlen),
- host, static_cast<DWORD>(hostlen),
+ int error = ::getnameinfo(static_cast<const socket_addr_type*>(addr),
+ static_cast<socklen_t>(addrlen), host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
# else
@@ -3390,35 +3899,34 @@ asio::error_code getnameinfo(const socket_addr_type* addr,
if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
{
clear_last_error();
- int error = gni(addr, static_cast<int>(addrlen),
- host, static_cast<DWORD>(hostlen),
+ int error = gni(static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
}
}
clear_last_error();
- return getnameinfo_emulation(addr, addrlen,
- host, hostlen, serv, servlen, flags, ec);
+ return getnameinfo_emulation(static_cast<const socket_addr_type*>(addr),
+ addrlen, host, hostlen, serv, servlen, flags, ec);
# endif
#elif !defined(ASIO_HAS_GETADDRINFO)
using namespace std; // For memcpy.
sockaddr_storage_type tmp_addr;
memcpy(&tmp_addr, addr, addrlen);
- tmp_addr.ss_len = addrlen;
- addr = reinterpret_cast<socket_addr_type*>(&tmp_addr);
+ addr = &tmp_addr;
clear_last_error();
- return getnameinfo_emulation(addr, addrlen,
- host, hostlen, serv, servlen, flags, ec);
+ return getnameinfo_emulation(static_cast<const socket_addr_type*>(addr),
+ addrlen, host, hostlen, serv, servlen, flags, ec);
#else
clear_last_error();
- int error = ::getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags);
+ int error = ::getnameinfo(static_cast<const socket_addr_type*>(addr),
+ addrlen, host, hostlen, serv, servlen, flags);
return ec = translate_addrinfo_error(error);
#endif
}
-asio::error_code sync_getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
+asio::error_code sync_getnameinfo(const void* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec)
{
// First try resolving with the service name. If that fails try resolving
@@ -3437,7 +3945,7 @@ asio::error_code sync_getnameinfo(
asio::error_code background_getnameinfo(
const weak_cancel_token_type& cancel_token,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec)
{
diff --git a/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp
index 2f4d37771d5..a5b29581eb0 100644
--- a/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/socket_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -60,11 +60,11 @@ void socket_select_interrupter::open_descriptors()
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
addr.sin_port = 0;
- if (socket_ops::bind(acceptor.get(), (const socket_addr_type*)&addr,
+ if (socket_ops::bind(acceptor.get(), &addr,
addr_len, ec) == socket_error_retval)
asio::detail::throw_error(ec, "socket_select_interrupter");
- if (socket_ops::getsockname(acceptor.get(), (socket_addr_type*)&addr,
+ if (socket_ops::getsockname(acceptor.get(), &addr,
&addr_len, ec) == socket_error_retval)
asio::detail::throw_error(ec, "socket_select_interrupter");
@@ -83,7 +83,7 @@ void socket_select_interrupter::open_descriptors()
if (client.get() == invalid_socket)
asio::detail::throw_error(ec, "socket_select_interrupter");
- if (socket_ops::connect(client.get(), (const socket_addr_type*)&addr,
+ if (socket_ops::connect(client.get(), &addr,
addr_len, ec) == socket_error_retval)
asio::detail::throw_error(ec, "socket_select_interrupter");
@@ -155,11 +155,20 @@ bool socket_select_interrupter::reset()
socket_ops::buf b;
socket_ops::init_buf(b, data, sizeof(data));
asio::error_code ec;
- int bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
- bool was_interrupted = (bytes_read > 0);
- while (bytes_read == sizeof(data))
- bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
- return was_interrupted;
+ for (;;)
+ {
+ int bytes_read = socket_ops::recv(read_descriptor_, &b, 1, 0, ec);
+ if (bytes_read == sizeof(data))
+ continue;
+ if (bytes_read > 0)
+ return true;
+ if (bytes_read == 0)
+ return false;
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return true;
+ return false;
+ }
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp
index fedea1cf3b4..3ffb398dcf6 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/strand_executor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,19 +15,130 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/detail/call_stack.hpp"
#include "asio/detail/fenced_block.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/recycling_allocator.hpp"
#include "asio/executor_work_guard.hpp"
+#include "asio/defer.hpp"
+#include "asio/dispatch.hpp"
+#include "asio/post.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+template <typename F, typename Allocator>
+class strand_executor_service::allocator_binder
+{
+public:
+ typedef Allocator allocator_type;
+
+ allocator_binder(F&& f, const Allocator& a)
+ : f_(static_cast<F&&>(f)),
+ allocator_(a)
+ {
+ }
+
+ allocator_binder(const allocator_binder& other)
+ : f_(other.f_),
+ allocator_(other.allocator_)
+ {
+ }
+
+ allocator_binder(allocator_binder&& other)
+ : f_(static_cast<F&&>(other.f_)),
+ allocator_(static_cast<allocator_type&&>(other.allocator_))
+ {
+ }
+
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_;
+ }
+
+ void operator()()
+ {
+ f_();
+ }
+
+private:
+ F f_;
+ allocator_type allocator_;
+};
+
template <typename Executor>
-class strand_executor_service::invoker
+class strand_executor_service::invoker<Executor,
+ enable_if_t<
+ execution::is_executor<Executor>::value
+ >>
+{
+public:
+ invoker(const implementation_type& impl, Executor& ex)
+ : impl_(impl),
+ executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ invoker(const invoker& other)
+ : impl_(other.impl_),
+ executor_(other.executor_)
+ {
+ }
+
+ invoker(invoker&& other)
+ : impl_(static_cast<implementation_type&&>(other.impl_)),
+ executor_(static_cast<executor_type&&>(other.executor_))
+ {
+ }
+
+ struct on_invoker_exit
+ {
+ invoker* this_;
+
+ ~on_invoker_exit()
+ {
+ if (push_waiting_to_ready(this_->impl_))
+ {
+ recycling_allocator<void> allocator;
+ executor_type ex = this_->executor_;
+ asio::prefer(
+ asio::require(
+ static_cast<executor_type&&>(ex),
+ execution::blocking.never),
+ execution::allocator(allocator)
+ ).execute(static_cast<invoker&&>(*this_));
+ }
+ }
+ };
+
+ void operator()()
+ {
+ // Ensure the next handler, if any, is scheduled on block exit.
+ on_invoker_exit on_exit = { this };
+ (void)on_exit;
+
+ run_ready_handlers(impl_);
+ }
+
+private:
+ typedef decay_t<
+ prefer_result_t<
+ Executor,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ implementation_type impl_;
+ executor_type executor_;
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+class strand_executor_service::invoker<Executor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ >>
{
public:
invoker(const implementation_type& impl, Executor& ex)
@@ -42,13 +153,11 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
invoker(invoker&& other)
- : impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_)),
- work_(ASIO_MOVE_CAST(executor_work_guard<Executor>)(other.work_))
+ : impl_(static_cast<implementation_type&&>(other.impl_)),
+ work_(static_cast<executor_work_guard<Executor>&&>(other.work_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
struct on_invoker_exit
{
@@ -56,38 +165,22 @@ public:
~on_invoker_exit()
{
- this_->impl_->mutex_->lock();
- this_->impl_->ready_queue_.push(this_->impl_->waiting_queue_);
- bool more_handlers = this_->impl_->locked_ =
- !this_->impl_->ready_queue_.empty();
- this_->impl_->mutex_->unlock();
-
- if (more_handlers)
+ if (push_waiting_to_ready(this_->impl_))
{
Executor ex(this_->work_.get_executor());
recycling_allocator<void> allocator;
- ex.post(ASIO_MOVE_CAST(invoker)(*this_), allocator);
+ ex.post(static_cast<invoker&&>(*this_), allocator);
}
}
};
void operator()()
{
- // Indicate that this strand is executing on the current thread.
- call_stack<strand_impl>::context ctx(impl_.get());
-
// Ensure the next handler, if any, is scheduled on block exit.
on_invoker_exit on_exit = { this };
(void)on_exit;
- // Run all ready handlers. No lock is required since the ready queue is
- // accessed only within the strand.
- asio::error_code ec;
- while (scheduler_operation* o = impl_->ready_queue_.front())
- {
- impl_->ready_queue_.pop();
- o->complete(impl_.get(), ec, 0);
- }
+ run_ready_handlers(impl_);
}
private:
@@ -95,31 +188,89 @@ private:
executor_work_guard<Executor> work_;
};
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor, typename Function>
+inline void strand_executor_service::execute(const implementation_type& impl,
+ Executor& ex, Function&& function,
+ enable_if_t<
+ can_query<Executor, execution::allocator_t<void>>::value
+ >*)
+{
+ return strand_executor_service::do_execute(impl, ex,
+ static_cast<Function&&>(function),
+ asio::query(ex, execution::allocator));
+}
+
+template <typename Executor, typename Function>
+inline void strand_executor_service::execute(const implementation_type& impl,
+ Executor& ex, Function&& function,
+ enable_if_t<
+ !can_query<Executor, execution::allocator_t<void>>::value
+ >*)
+{
+ return strand_executor_service::do_execute(impl, ex,
+ static_cast<Function&&>(function),
+ std::allocator<void>());
+}
+
+template <typename Executor, typename Function, typename Allocator>
+void strand_executor_service::do_execute(const implementation_type& impl,
+ Executor& ex, Function&& function, const Allocator& a)
+{
+ typedef decay_t<Function> function_type;
+
+ // If the executor is not never-blocking, and we are already in the strand,
+ // then the function can run immediately.
+ if (asio::query(ex, execution::blocking) != execution::blocking.never
+ && running_in_this_thread(impl))
+ {
+ // Make a local, non-const copy of the function.
+ function_type tmp(static_cast<Function&&>(function));
+
+ fenced_block b(fenced_block::full);
+ static_cast<function_type&&>(tmp)();
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the function.
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
+
+ ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
+ "strand_executor", impl.get(), 0, "execute"));
+
+ // Add the function to the strand and schedule the strand if required.
+ bool first = enqueue(impl, p.p);
+ p.v = p.p = 0;
+ if (first)
+ {
+ ex.execute(invoker<Executor>(impl, ex));
+ }
+}
+
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::dispatch(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(function));
+ typedef decay_t<Function> function_type;
// If we are already in the strand then the function can run immediately.
- if (call_stack<strand_impl>::contains(impl.get()))
+ if (running_in_this_thread(impl))
{
+ // Make a local, non-const copy of the function.
+ function_type tmp(static_cast<Function&&>(function));
+
fenced_block b(fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
}
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
-
// Allocate and construct an operation to wrap the function.
- typedef executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "dispatch"));
@@ -128,27 +279,24 @@ void strand_executor_service::dispatch(const implementation_type& impl,
bool first = enqueue(impl, p.p);
p.v = p.p = 0;
if (first)
- ex.dispatch(invoker<Executor>(impl, ex), allocator);
+ {
+ asio::dispatch(ex,
+ allocator_binder<invoker<Executor>, Allocator>(
+ invoker<Executor>(impl, ex), a));
+ }
}
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::post(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(function));
-
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
- typedef executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "post"));
@@ -157,27 +305,24 @@ void strand_executor_service::post(const implementation_type& impl,
bool first = enqueue(impl, p.p);
p.v = p.p = 0;
if (first)
- ex.post(invoker<Executor>(impl, ex), allocator);
+ {
+ asio::post(ex,
+ allocator_binder<invoker<Executor>, Allocator>(
+ invoker<Executor>(impl, ex), a));
+ }
}
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::defer(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(function));
-
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
- typedef executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "defer"));
@@ -186,7 +331,11 @@ void strand_executor_service::defer(const implementation_type& impl,
bool first = enqueue(impl, p.p);
p.v = p.p = 0;
if (first)
- ex.defer(invoker<Executor>(impl, ex), allocator);
+ {
+ asio::defer(ex,
+ allocator_binder<invoker<Executor>, Allocator>(
+ invoker<Executor>(impl, ex), a));
+ }
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp
index 3baadcb07be..a2dff894cca 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/strand_executor_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -40,8 +40,11 @@ void strand_executor_service::shutdown()
strand_impl* impl = impl_list_;
while (impl)
{
+ impl->mutex_->lock();
+ impl->shutdown_ = true;
ops.push(impl->waiting_queue_);
ops.push(impl->ready_queue_);
+ impl->mutex_->unlock();
impl = impl->next_;
}
}
@@ -51,6 +54,7 @@ strand_executor_service::create_implementation()
{
implementation_type new_impl(new strand_impl);
new_impl->locked_ = false;
+ new_impl->shutdown_ = false;
asio::detail::mutex::scoped_lock lock(mutex_);
@@ -92,7 +96,13 @@ bool strand_executor_service::enqueue(const implementation_type& impl,
scheduler_operation* op)
{
impl->mutex_->lock();
- if (impl->locked_)
+ if (impl->shutdown_)
+ {
+ impl->mutex_->unlock();
+ op->destroy();
+ return false;
+ }
+ else if (impl->locked_)
{
// Some other function already holds the strand lock. Enqueue for later.
impl->waiting_queue_.push(op);
@@ -116,6 +126,30 @@ bool strand_executor_service::running_in_this_thread(
return !!call_stack<strand_impl>::contains(impl.get());
}
+bool strand_executor_service::push_waiting_to_ready(implementation_type& impl)
+{
+ impl->mutex_->lock();
+ impl->ready_queue_.push(impl->waiting_queue_);
+ bool more_handlers = impl->locked_ = !impl->ready_queue_.empty();
+ impl->mutex_->unlock();
+ return more_handlers;
+}
+
+void strand_executor_service::run_ready_handlers(implementation_type& impl)
+{
+ // Indicate that this strand is executing on the current thread.
+ call_stack<strand_impl>::context ctx(impl.get());
+
+ // Run all ready handlers. No lock is required since the ready queue is
+ // accessed only within the strand.
+ asio::error_code ec;
+ while (scheduler_operation* o = impl->ready_queue_.front())
+ {
+ impl->ready_queue_.pop();
+ o->complete(impl.get(), ec, 0);
+ }
+}
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_service.hpp b/3rdparty/asio/include/asio/detail/impl/strand_service.hpp
index 00b88a42bb1..8249c9eb8d5 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_service.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/strand_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,11 +15,9 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/detail/call_stack.hpp"
#include "asio/detail/completion_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/push_options.hpp"
@@ -33,60 +31,30 @@ inline strand_service::strand_impl::strand_impl()
{
}
-struct strand_service::on_dispatch_exit
-{
- io_context_impl* io_context_;
- strand_impl* impl_;
-
- ~on_dispatch_exit()
- {
- impl_->mutex_.lock();
- impl_->ready_queue_.push(impl_->waiting_queue_);
- bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty();
- impl_->mutex_.unlock();
-
- if (more_handlers)
- io_context_->post_immediate_completion(impl_, false);
- }
-};
-
template <typename Handler>
void strand_service::dispatch(strand_service::implementation_type& impl,
Handler& handler)
{
// If we are already in the strand then the handler can run immediately.
- if (call_stack<strand_impl>::contains(impl))
+ if (running_in_this_thread(impl))
{
fenced_block b(fenced_block::full);
- asio_handler_invoke_helpers::invoke(handler, handler);
+ static_cast<Handler&&>(handler)();
return;
}
// Allocate and construct an operation to wrap the handler.
- typedef completion_handler<Handler> op;
+ typedef completion_handler<Handler, io_context::executor_type> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, io_context_.get_executor());
ASIO_HANDLER_CREATION((this->context(),
*p.p, "strand", impl, 0, "dispatch"));
- bool dispatch_immediately = do_dispatch(impl, p.p);
operation* o = p.p;
p.v = p.p = 0;
-
- if (dispatch_immediately)
- {
- // Indicate that this strand is executing on the current thread.
- call_stack<strand_impl>::context ctx(impl);
-
- // Ensure the next handler, if any, is scheduled on block exit.
- on_dispatch_exit on_exit = { &io_context_, impl };
- (void)on_exit;
-
- completion_handler<Handler>::do_complete(
- &io_context_, o, asio::error_code(), 0);
- }
+ do_dispatch(impl, o);
}
// Request the io_context to invoke the given handler and return immediately.
@@ -98,10 +66,10 @@ void strand_service::post(strand_service::implementation_type& impl,
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
- typedef completion_handler<Handler> op;
+ typedef completion_handler<Handler, io_context::executor_type> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, io_context_.get_executor());
ASIO_HANDLER_CREATION((this->context(),
*p.p, "strand", impl, 0, "post"));
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_service.ipp b/3rdparty/asio/include/asio/detail/impl/strand_service.ipp
index 16946dcab67..af8929a00c6 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/strand_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -43,7 +43,8 @@ struct strand_service::on_do_complete_exit
strand_service::strand_service(asio::io_context& io_context)
: asio::detail::service_base<strand_service>(io_context),
- io_context_(asio::use_service<io_context_impl>(io_context)),
+ io_context_(io_context),
+ io_context_impl_(asio::use_service<io_context_impl>(io_context)),
mutex_(),
salt_(0)
{
@@ -90,18 +91,44 @@ bool strand_service::running_in_this_thread(
return call_stack<strand_impl>::contains(impl) != 0;
}
-bool strand_service::do_dispatch(implementation_type& impl, operation* op)
+struct strand_service::on_dispatch_exit
+{
+ io_context_impl* io_context_impl_;
+ strand_impl* impl_;
+
+ ~on_dispatch_exit()
+ {
+ impl_->mutex_.lock();
+ impl_->ready_queue_.push(impl_->waiting_queue_);
+ bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty();
+ impl_->mutex_.unlock();
+
+ if (more_handlers)
+ io_context_impl_->post_immediate_completion(impl_, false);
+ }
+};
+
+void strand_service::do_dispatch(implementation_type& impl, operation* op)
{
// If we are running inside the io_context, and no other handler already
// holds the strand lock, then the handler can run immediately.
- bool can_dispatch = io_context_.can_dispatch();
+ bool can_dispatch = io_context_impl_.can_dispatch();
impl->mutex_.lock();
if (can_dispatch && !impl->locked_)
{
// Immediate invocation is allowed.
impl->locked_ = true;
impl->mutex_.unlock();
- return true;
+
+ // Indicate that this strand is executing on the current thread.
+ call_stack<strand_impl>::context ctx(impl);
+
+ // Ensure the next handler, if any, is scheduled on block exit.
+ on_dispatch_exit on_exit = { &io_context_impl_, impl };
+ (void)on_exit;
+
+ op->complete(&io_context_impl_, asio::error_code(), 0);
+ return;
}
if (impl->locked_)
@@ -117,10 +144,8 @@ bool strand_service::do_dispatch(implementation_type& impl, operation* op)
impl->locked_ = true;
impl->mutex_.unlock();
impl->ready_queue_.push(op);
- io_context_.post_immediate_completion(impl, false);
+ io_context_impl_.post_immediate_completion(impl, false);
}
-
- return false;
}
void strand_service::do_post(implementation_type& impl,
@@ -140,7 +165,7 @@ void strand_service::do_post(implementation_type& impl,
impl->locked_ = true;
impl->mutex_.unlock();
impl->ready_queue_.push(op);
- io_context_.post_immediate_completion(impl, is_continuation);
+ io_context_impl_.post_immediate_completion(impl, is_continuation);
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/thread_context.ipp b/3rdparty/asio/include/asio/detail/impl/thread_context.ipp
new file mode 100644
index 00000000000..8e729776362
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/thread_context.ipp
@@ -0,0 +1,35 @@
+//
+// detail/impl/thread_context.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_THREAD_CONTEXT_IPP
+#define ASIO_DETAIL_IMPL_THREAD_CONTEXT_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+thread_info_base* thread_context::top_of_thread_call_stack()
+{
+ return thread_call_stack::top();
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IMPL_THREAD_CONTEXT_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/throw_error.ipp b/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
index d59eca2d8e2..7baf3e729e5 100644
--- a/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
@@ -2,7 +2,7 @@
// detail/impl/throw_error.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/throw_error.hpp"
-#include "asio/detail/throw_exception.hpp"
#include "asio/system_error.hpp"
#include "asio/detail/push_options.hpp"
@@ -25,31 +24,21 @@
namespace asio {
namespace detail {
-void do_throw_error(const asio::error_code& err)
+void do_throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_PARAM)
{
asio::system_error e(err);
- asio::detail::throw_exception(e);
+ asio::detail::throw_exception(e ASIO_SOURCE_LOCATION_ARG);
}
-void do_throw_error(const asio::error_code& err, const char* location)
+void do_throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_PARAM)
{
- // boostify: non-boost code starts here
-#if defined(ASIO_MSVC) && defined(ASIO_HAS_STD_SYSTEM_ERROR)
- // Microsoft's implementation of std::system_error is non-conformant in that
- // it ignores the error code's message when a "what" string is supplied. We'll
- // work around this by explicitly formatting the "what" string.
- std::string what_msg = location;
- what_msg += ": ";
- what_msg += err.message();
- asio::system_error e(err, what_msg);
- asio::detail::throw_exception(e);
-#else // defined(ASIO_MSVC) && defined(ASIO_HAS_STD_SYSTEM_ERROR)
- // boostify: non-boost code ends here
asio::system_error e(err, location);
- asio::detail::throw_exception(e);
- // boostify: non-boost code starts here
-#endif // defined(ASIO_MSVC) && defined(ASIO_HAS_STD_SYSTEM_ERROR)
- // boostify: non-boost code ends here
+ asio::detail::throw_exception(e ASIO_SOURCE_LOCATION_ARG);
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp b/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp
index 10c42956843..bdf994e3a41 100644
--- a/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp
@@ -2,7 +2,7 @@
// detail/impl/timer_queue_ptime.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -26,56 +26,62 @@
namespace asio {
namespace detail {
-timer_queue<time_traits<boost::posix_time::ptime> >::timer_queue()
+timer_queue<time_traits<boost::posix_time::ptime>>::timer_queue()
{
}
-timer_queue<time_traits<boost::posix_time::ptime> >::~timer_queue()
+timer_queue<time_traits<boost::posix_time::ptime>>::~timer_queue()
{
}
-bool timer_queue<time_traits<boost::posix_time::ptime> >::enqueue_timer(
+bool timer_queue<time_traits<boost::posix_time::ptime>>::enqueue_timer(
const time_type& time, per_timer_data& timer, wait_op* op)
{
return impl_.enqueue_timer(time, timer, op);
}
-bool timer_queue<time_traits<boost::posix_time::ptime> >::empty() const
+bool timer_queue<time_traits<boost::posix_time::ptime>>::empty() const
{
return impl_.empty();
}
-long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_msec(
+long timer_queue<time_traits<boost::posix_time::ptime>>::wait_duration_msec(
long max_duration) const
{
return impl_.wait_duration_msec(max_duration);
}
-long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_usec(
+long timer_queue<time_traits<boost::posix_time::ptime>>::wait_duration_usec(
long max_duration) const
{
return impl_.wait_duration_usec(max_duration);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::get_ready_timers(
+void timer_queue<time_traits<boost::posix_time::ptime>>::get_ready_timers(
op_queue<operation>& ops)
{
impl_.get_ready_timers(ops);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::get_all_timers(
+void timer_queue<time_traits<boost::posix_time::ptime>>::get_all_timers(
op_queue<operation>& ops)
{
impl_.get_all_timers(ops);
}
-std::size_t timer_queue<time_traits<boost::posix_time::ptime> >::cancel_timer(
+std::size_t timer_queue<time_traits<boost::posix_time::ptime>>::cancel_timer(
per_timer_data& timer, op_queue<operation>& ops, std::size_t max_cancelled)
{
return impl_.cancel_timer(timer, ops, max_cancelled);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::move_timer(
+void timer_queue<time_traits<boost::posix_time::ptime>>::cancel_timer_by_key(
+ per_timer_data* timer, op_queue<operation>& ops, void* cancellation_key)
+{
+ impl_.cancel_timer_by_key(timer, ops, cancellation_key);
+}
+
+void timer_queue<time_traits<boost::posix_time::ptime>>::move_timer(
per_timer_data& target, per_timer_data& source)
{
impl_.move_timer(target, source);
diff --git a/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp b/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp
index a6831820fdc..66420e98a7c 100644
--- a/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp
@@ -2,7 +2,7 @@
// detail/impl/timer_queue_set.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_event.ipp b/3rdparty/asio/include/asio/detail/impl/win_event.ipp
index e3d77e68d8c..9827e339769 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_event.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_event.ipp
@@ -2,7 +2,7 @@
// detail/win_event.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -32,7 +32,8 @@ win_event::win_event()
: state_(0)
{
#if defined(ASIO_WINDOWS_APP)
- events_[0] = ::CreateEventExW(0, 0, CREATE_EVENT_MANUAL_RESET, 0);
+ events_[0] = ::CreateEventExW(0, 0,
+ CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
#else // defined(ASIO_WINDOWS_APP)
events_[0] = ::CreateEventW(0, true, false, 0);
#endif // defined(ASIO_WINDOWS_APP)
@@ -45,7 +46,7 @@ win_event::win_event()
}
#if defined(ASIO_WINDOWS_APP)
- events_[1] = ::CreateEventExW(0, 0, 0, 0);
+ events_[1] = ::CreateEventExW(0, 0, 0, EVENT_ALL_ACCESS);
#else // defined(ASIO_WINDOWS_APP)
events_[1] = ::CreateEventW(0, false, false, 0);
#endif // defined(ASIO_WINDOWS_APP)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp
new file mode 100644
index 00000000000..faaab48ad52
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp
@@ -0,0 +1,280 @@
+//
+// detail/impl/win_iocp_file_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_WIN_IOCP_FILE_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_WIN_IOCP_FILE_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ && defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+
+#include <cstring>
+#include <sys/stat.h>
+#include "asio/detail/win_iocp_file_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+win_iocp_file_service::win_iocp_file_service(
+ execution_context& context)
+ : execution_context_service_base<win_iocp_file_service>(context),
+ handle_service_(context),
+ nt_flush_buffers_file_ex_(0)
+{
+ if (FARPROC nt_flush_buffers_file_ex_ptr = ::GetProcAddress(
+ ::GetModuleHandleA("NTDLL"), "NtFlushBuffersFileEx"))
+ {
+ nt_flush_buffers_file_ex_ = reinterpret_cast<nt_flush_buffers_file_ex_fn>(
+ reinterpret_cast<void*>(nt_flush_buffers_file_ex_ptr));
+ }
+}
+
+void win_iocp_file_service::shutdown()
+{
+ handle_service_.shutdown();
+}
+
+asio::error_code win_iocp_file_service::open(
+ win_iocp_file_service::implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ DWORD access = 0;
+ if ((open_flags & file_base::read_only) != 0)
+ access = GENERIC_READ;
+ else if ((open_flags & file_base::write_only) != 0)
+ access = GENERIC_WRITE;
+ else if ((open_flags & file_base::read_write) != 0)
+ access = GENERIC_READ | GENERIC_WRITE;
+
+ DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE;
+
+ DWORD disposition = 0;
+ if ((open_flags & file_base::create) != 0)
+ {
+ if ((open_flags & file_base::exclusive) != 0)
+ disposition = CREATE_NEW;
+ else
+ disposition = OPEN_ALWAYS;
+ }
+ else
+ {
+ if ((open_flags & file_base::truncate) != 0)
+ disposition = TRUNCATE_EXISTING;
+ else
+ disposition = OPEN_EXISTING;
+ }
+
+ DWORD flags = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED;
+ if (impl.is_stream_)
+ flags |= FILE_FLAG_SEQUENTIAL_SCAN;
+ else
+ flags |= FILE_FLAG_RANDOM_ACCESS;
+ if ((open_flags & file_base::sync_all_on_write) != 0)
+ flags |= FILE_FLAG_WRITE_THROUGH;
+
+ HANDLE handle = ::CreateFileA(path, access, share, 0, disposition, flags, 0);
+ if (handle != INVALID_HANDLE_VALUE)
+ {
+ if (disposition == OPEN_ALWAYS)
+ {
+ if ((open_flags & file_base::truncate) != 0)
+ {
+ if (!::SetEndOfFile(handle))
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ }
+ else if ((open_flags & file_base::append) != 0)
+ {
+ if (::SetFilePointer(handle, 0, 0, FILE_END)
+ == INVALID_SET_FILE_POINTER)
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ }
+ }
+
+ handle_service_.assign(impl, handle, ec);
+ if (ec)
+ ::CloseHandle(handle);
+ impl.offset_ = 0;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+}
+
+uint64_t win_iocp_file_service::size(
+ const win_iocp_file_service::implementation_type& impl,
+ asio::error_code& ec) const
+{
+ LARGE_INTEGER result;
+ if (::GetFileSizeEx(native_handle(impl), &result))
+ {
+ asio::error::clear(ec);
+ return static_cast<uint64_t>(result.QuadPart);
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+}
+
+asio::error_code win_iocp_file_service::resize(
+ win_iocp_file_service::implementation_type& impl,
+ uint64_t n, asio::error_code& ec)
+{
+ LARGE_INTEGER distance;
+ distance.QuadPart = n;
+ if (::SetFilePointerEx(native_handle(impl), distance, 0, FILE_BEGIN))
+ {
+ BOOL result = ::SetEndOfFile(native_handle(impl));
+ DWORD last_error = ::GetLastError();
+
+ distance.QuadPart = static_cast<LONGLONG>(impl.offset_);
+ if (!::SetFilePointerEx(native_handle(impl), distance, 0, FILE_BEGIN))
+ {
+ result = FALSE;
+ last_error = ::GetLastError();
+ }
+
+ if (result)
+ asio::error::clear(ec);
+ else
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+}
+
+asio::error_code win_iocp_file_service::sync_all(
+ win_iocp_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ BOOL result = ::FlushFileBuffers(native_handle(impl));
+ if (result)
+ {
+ asio::error::clear(ec);
+ return ec;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+}
+
+asio::error_code win_iocp_file_service::sync_data(
+ win_iocp_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (nt_flush_buffers_file_ex_)
+ {
+ io_status_block status = {};
+ if (!nt_flush_buffers_file_ex_(native_handle(impl),
+ flush_flags_file_data_sync_only, 0, 0, &status))
+ {
+ asio::error::clear(ec);
+ return ec;
+ }
+ }
+ return sync_all(impl, ec);
+}
+
+uint64_t win_iocp_file_service::seek(
+ win_iocp_file_service::implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec)
+{
+ DWORD method;
+ switch (whence)
+ {
+ case file_base::seek_set:
+ method = FILE_BEGIN;
+ break;
+ case file_base::seek_cur:
+ method = FILE_BEGIN;
+ offset = static_cast<int64_t>(impl.offset_) + offset;
+ break;
+ case file_base::seek_end:
+ method = FILE_END;
+ break;
+ default:
+ ec = asio::error::invalid_argument;
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ LARGE_INTEGER distance, new_offset;
+ distance.QuadPart = offset;
+ if (::SetFilePointerEx(native_handle(impl), distance, &new_offset, method))
+ {
+ impl.offset_ = new_offset.QuadPart;
+ asio::error::clear(ec);
+ return impl.offset_;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // && defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+
+#endif // ASIO_DETAIL_IMPL_WIN_IOCP_FILE_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
index 7e6fcb9015c..6136e27fb32 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -65,10 +65,10 @@ public:
}
};
-win_iocp_handle_service::win_iocp_handle_service(
- asio::io_context& io_context)
- : service_base<win_iocp_handle_service>(io_context),
- iocp_service_(asio::use_service<win_iocp_io_context>(io_context)),
+win_iocp_handle_service::win_iocp_handle_service(execution_context& context)
+ : execution_context_service_base<win_iocp_handle_service>(context),
+ iocp_service_(asio::use_service<win_iocp_io_context>(context)),
+ nt_set_info_(0),
mutex_(),
impl_list_(0)
{
@@ -183,11 +183,15 @@ asio::error_code win_iocp_handle_service::assign(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
if (iocp_service_.register_handle(handle, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
impl.handle_ = handle;
ec = asio::error_code();
@@ -222,9 +226,47 @@ asio::error_code win_iocp_handle_service::close(
ec = asio::error_code();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
+win_iocp_handle_service::native_handle_type win_iocp_handle_service::release(
+ win_iocp_handle_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ return INVALID_HANDLE_VALUE;
+
+ cancel(impl, ec);
+ if (ec)
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ nt_set_info_fn fn = get_nt_set_info();
+ if (fn == 0)
+ {
+ ec = asio::error::operation_not_supported;
+ ASIO_ERROR_LOCATION(ec);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ ULONG_PTR iosb[2] = { 0, 0 };
+ void* info[2] = { 0, 0 };
+ if (fn(impl.handle_, iosb, &info, sizeof(info),
+ 61 /* FileReplaceCompletionInformation */))
+ {
+ ec = asio::error::operation_not_supported;
+ ASIO_ERROR_LOCATION(ec);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ native_handle_type tmp = impl.handle_;
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ return tmp;
+}
+
asio::error_code win_iocp_handle_service::cancel(
win_iocp_handle_service::implementation_type& impl,
asio::error_code& ec)
@@ -232,6 +274,7 @@ asio::error_code win_iocp_handle_service::cancel(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -243,7 +286,8 @@ asio::error_code win_iocp_handle_service::cancel(
{
// The version of Windows supports cancellation from any thread.
typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
- cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
+ cancel_io_ex_t cancel_io_ex = reinterpret_cast<cancel_io_ex_t>(
+ reinterpret_cast<void*>(cancel_io_ex_ptr));
if (!cancel_io_ex(impl.handle_, 0))
{
DWORD last_error = ::GetLastError();
@@ -292,6 +336,7 @@ asio::error_code win_iocp_handle_service::cancel(
ec = asio::error::operation_not_supported;
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -302,6 +347,7 @@ size_t win_iocp_handle_service::do_write(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -315,6 +361,7 @@ size_t win_iocp_handle_service::do_write(
overlapped_wrapper overlapped(ec);
if (ec)
{
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -330,6 +377,7 @@ size_t win_iocp_handle_service::do_write(
{
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
}
@@ -343,6 +391,7 @@ size_t win_iocp_handle_service::do_write(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -394,6 +443,7 @@ size_t win_iocp_handle_service::do_read(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -407,6 +457,7 @@ size_t win_iocp_handle_service::do_read(
overlapped_wrapper overlapped(ec);
if (ec)
{
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -429,6 +480,7 @@ size_t win_iocp_handle_service::do_read(
ec = asio::error_code(last_error,
asio::error::get_system_category());
}
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
}
@@ -449,6 +501,7 @@ size_t win_iocp_handle_service::do_read(
ec = asio::error_code(last_error,
asio::error::get_system_category());
}
+ ASIO_ERROR_LOCATION(ec);
return (last_error == ERROR_MORE_DATA) ? bytes_transferred : 0;
}
@@ -515,6 +568,47 @@ void win_iocp_handle_service::close_for_destruction(implementation_type& impl)
}
}
+win_iocp_handle_service::nt_set_info_fn
+win_iocp_handle_service::get_nt_set_info()
+{
+ void* ptr = interlocked_compare_exchange_pointer(&nt_set_info_, 0, 0);
+ if (!ptr)
+ {
+ if (HMODULE h = ::GetModuleHandleA("NTDLL.DLL"))
+ ptr = reinterpret_cast<void*>(GetProcAddress(h, "NtSetInformationFile"));
+
+ // On failure, set nt_set_info_ to a special value to indicate that the
+ // NtSetInformationFile function is unavailable. That way we won't bother
+ // trying to look it up again.
+ interlocked_exchange_pointer(&nt_set_info_, ptr ? ptr : this);
+ }
+
+ return reinterpret_cast<nt_set_info_fn>(ptr == this ? 0 : ptr);
+}
+
+void* win_iocp_handle_service::interlocked_compare_exchange_pointer(
+ void** dest, void* exch, void* cmp)
+{
+#if defined(_M_IX86)
+ return reinterpret_cast<void*>(InterlockedCompareExchange(
+ reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(exch),
+ reinterpret_cast<LONG>(cmp)));
+#else
+ return InterlockedCompareExchangePointer(dest, exch, cmp);
+#endif
+}
+
+void* win_iocp_handle_service::interlocked_exchange_pointer(
+ void** dest, void* val)
+{
+#if defined(_M_IX86)
+ return reinterpret_cast<void*>(InterlockedExchange(
+ reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(val)));
+#else
+ return InterlockedExchangePointer(dest, val);
+#endif
+}
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp
index 4d1d75a9187..6479500184a 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_io_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,7 +22,6 @@
#include "asio/detail/completion_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/push_options.hpp"
@@ -76,11 +75,28 @@ std::size_t win_iocp_io_context::cancel_timer(timer_queue<Time_Traits>& queue,
mutex::scoped_lock lock(dispatch_mutex_);
op_queue<win_iocp_operation> ops;
std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
post_deferred_completions(ops);
return n;
}
template <typename Time_Traits>
+void win_iocp_io_context::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ // If the service has been shut down we silently ignore the cancellation.
+ if (::InterlockedExchangeAdd(&shutdown_, 0) != 0)
+ return;
+
+ mutex::scoped_lock lock(dispatch_mutex_);
+ op_queue<win_iocp_operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
void win_iocp_io_context::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& to,
typename timer_queue<Time_Traits>::per_timer_data& from)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp
index d4a16381d8d..1c7fb28b2d6 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_io_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,8 +22,8 @@
#include "asio/error.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/limits.hpp"
+#include "asio/detail/thread.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/win_iocp_io_context.hpp"
@@ -32,9 +32,25 @@
namespace asio {
namespace detail {
+struct win_iocp_io_context::thread_function
+{
+ explicit thread_function(win_iocp_io_context* s)
+ : this_(s)
+ {
+ }
+
+ void operator()()
+ {
+ asio::error_code ec;
+ this_->run(ec);
+ }
+
+ win_iocp_io_context* this_;
+};
+
struct win_iocp_io_context::work_finished_on_block_exit
{
- ~work_finished_on_block_exit()
+ ~work_finished_on_block_exit() noexcept(false)
{
io_context_->work_finished();
}
@@ -62,7 +78,7 @@ struct win_iocp_io_context::timer_thread_function
};
win_iocp_io_context::win_iocp_io_context(
- asio::execution_context& ctx, int concurrency_hint)
+ asio::execution_context& ctx, int concurrency_hint, bool own_thread)
: execution_context_service_base<win_iocp_io_context>(ctx),
iocp_(),
outstanding_work_(0),
@@ -84,6 +100,22 @@ win_iocp_io_context::win_iocp_io_context(
asio::error::get_system_category());
asio::detail::throw_error(ec, "iocp");
}
+
+ if (own_thread)
+ {
+ ::InterlockedIncrement(&outstanding_work_);
+ thread_.reset(new asio::detail::thread(thread_function(this)));
+ }
+}
+
+win_iocp_io_context::~win_iocp_io_context()
+{
+ if (thread_.get())
+ {
+ stop();
+ thread_->join();
+ thread_.reset();
+ }
}
void win_iocp_io_context::shutdown()
@@ -97,6 +129,14 @@ void win_iocp_io_context::shutdown()
::SetWaitableTimer(waitable_timer_.handle, &timeout, 1, 0, 0, FALSE);
}
+ if (thread_.get())
+ {
+ stop();
+ thread_->join();
+ thread_.reset();
+ ::InterlockedDecrement(&outstanding_work_);
+ }
+
while (::InterlockedExchangeAdd(&outstanding_work_, 0) > 0)
{
op_queue<win_iocp_operation> ops;
@@ -127,7 +167,10 @@ void win_iocp_io_context::shutdown()
}
if (timer_thread_.get())
+ {
timer_thread_->join();
+ timer_thread_.reset();
+ }
}
asio::error_code win_iocp_io_context::register_handle(
@@ -159,7 +202,7 @@ size_t win_iocp_io_context::run(asio::error_code& ec)
thread_call_stack::context ctx(this, this_thread);
size_t n = 0;
- while (do_one(INFINITE, ec))
+ while (do_one(INFINITE, this_thread, ec))
if (n != (std::numeric_limits<size_t>::max)())
++n;
return n;
@@ -177,7 +220,7 @@ size_t win_iocp_io_context::run_one(asio::error_code& ec)
win_iocp_thread_info this_thread;
thread_call_stack::context ctx(this, this_thread);
- return do_one(INFINITE, ec);
+ return do_one(INFINITE, this_thread, ec);
}
size_t win_iocp_io_context::wait_one(long usec, asio::error_code& ec)
@@ -192,7 +235,7 @@ size_t win_iocp_io_context::wait_one(long usec, asio::error_code& ec)
win_iocp_thread_info this_thread;
thread_call_stack::context ctx(this, this_thread);
- return do_one(usec < 0 ? INFINITE : ((usec - 1) / 1000 + 1), ec);
+ return do_one(usec < 0 ? INFINITE : ((usec - 1) / 1000 + 1), this_thread, ec);
}
size_t win_iocp_io_context::poll(asio::error_code& ec)
@@ -208,7 +251,7 @@ size_t win_iocp_io_context::poll(asio::error_code& ec)
thread_call_stack::context ctx(this, this_thread);
size_t n = 0;
- while (do_one(0, ec))
+ while (do_one(0, this_thread, ec))
if (n != (std::numeric_limits<size_t>::max)())
++n;
return n;
@@ -226,7 +269,7 @@ size_t win_iocp_io_context::poll_one(asio::error_code& ec)
win_iocp_thread_info this_thread;
thread_call_stack::context ctx(this, this_thread);
- return do_one(0, ec);
+ return do_one(0, this_thread, ec);
}
void win_iocp_io_context::stop()
@@ -246,6 +289,17 @@ void win_iocp_io_context::stop()
}
}
+bool win_iocp_io_context::can_dispatch()
+{
+ return thread_call_stack::contains(this) != 0;
+}
+
+void win_iocp_io_context::capture_current_exception()
+{
+ if (thread_info_base* this_thread = thread_call_stack::contains(this))
+ this_thread->capture_current_exception();
+}
+
void win_iocp_io_context::post_deferred_completion(win_iocp_operation* op)
{
// Flag the operation as ready.
@@ -355,7 +409,8 @@ void win_iocp_io_context::on_completion(win_iocp_operation* op,
}
}
-size_t win_iocp_io_context::do_one(DWORD msec, asio::error_code& ec)
+size_t win_iocp_io_context::do_one(DWORD msec,
+ win_iocp_thread_info& this_thread, asio::error_code& ec)
{
for (;;)
{
@@ -417,6 +472,7 @@ size_t win_iocp_io_context::do_one(DWORD msec, asio::error_code& ec)
(void)on_exit;
op->complete(this, result_ec, bytes_transferred);
+ this_thread.rethrow_pending_exception();
ec = asio::error_code();
return 1;
}
@@ -473,6 +529,7 @@ size_t win_iocp_io_context::do_one(DWORD msec, asio::error_code& ec)
DWORD win_iocp_io_context::get_gqcs_timeout()
{
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
OSVERSIONINFOEX osvi;
ZeroMemory(&osvi, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
@@ -485,6 +542,9 @@ DWORD win_iocp_io_context::get_gqcs_timeout()
return INFINITE;
return default_gqcs_timeout;
+#else // !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
+ return INFINITE;
+#endif // !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
}
void win_iocp_io_context::do_add_timer_queue(timer_queue_base& queue)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
index d84f4b2130b..abeb3cecb0a 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_serial_port_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -29,9 +29,9 @@ namespace asio {
namespace detail {
win_iocp_serial_port_service::win_iocp_serial_port_service(
- asio::io_context& io_context)
- : service_base<win_iocp_serial_port_service>(io_context),
- handle_service_(io_context)
+ execution_context& context)
+ : execution_context_service_base<win_iocp_serial_port_service>(context),
+ handle_service_(context)
{
}
@@ -46,6 +46,7 @@ asio::error_code win_iocp_serial_port_service::open(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -61,6 +62,7 @@ asio::error_code win_iocp_serial_port_service::open(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -75,21 +77,34 @@ asio::error_code win_iocp_serial_port_service::open(
::CloseHandle(handle);
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
// Set some default serial port parameters. This implementation does not
- // support changing these, so they might as well be in a known state.
+ // support changing all of these, so they might as well be in a known state.
dcb.fBinary = TRUE; // Win32 only supports binary mode.
- dcb.fDsrSensitivity = FALSE;
dcb.fNull = FALSE; // Do not ignore NULL characters.
dcb.fAbortOnError = FALSE; // Ignore serial framing errors.
+ dcb.BaudRate = CBR_9600; // 9600 baud by default
+ dcb.ByteSize = 8; // 8 bit bytes
+ dcb.fOutxCtsFlow = FALSE; // No flow control
+ dcb.fOutxDsrFlow = FALSE;
+ dcb.fDtrControl = DTR_CONTROL_DISABLE;
+ dcb.fDsrSensitivity = FALSE;
+ dcb.fOutX = FALSE;
+ dcb.fInX = FALSE;
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ dcb.fParity = FALSE; // No parity
+ dcb.Parity = NOPARITY;
+ dcb.StopBits = ONESTOPBIT; // One stop bit
if (!::SetCommState(handle, &dcb))
{
DWORD last_error = ::GetLastError();
::CloseHandle(handle);
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -108,6 +123,7 @@ asio::error_code win_iocp_serial_port_service::open(
::CloseHandle(handle);
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -132,6 +148,7 @@ asio::error_code win_iocp_serial_port_service::do_set_option(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -143,6 +160,7 @@ asio::error_code win_iocp_serial_port_service::do_set_option(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -165,6 +183,7 @@ asio::error_code win_iocp_serial_port_service::do_get_option(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
index 4230f5c586a..af28718c905 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_socket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -27,11 +27,12 @@ namespace asio {
namespace detail {
win_iocp_socket_service_base::win_iocp_socket_service_base(
- asio::io_context& io_context)
- : io_context_(io_context),
- iocp_service_(use_service<win_iocp_io_context>(io_context)),
+ execution_context& context)
+ : context_(context),
+ iocp_service_(use_service<win_iocp_io_context>(context)),
reactor_(0),
connect_ex_(0),
+ nt_set_info_(0),
mutex_(),
impl_list_(0)
{
@@ -44,7 +45,6 @@ void win_iocp_socket_service_base::base_shutdown()
base_implementation_type* impl = impl_list_;
while (impl)
{
- asio::error_code ignored_ec;
close_for_destruction(*impl);
impl = impl->next_;
}
@@ -72,6 +72,7 @@ void win_iocp_socket_service_base::construct(
void win_iocp_socket_service_base::base_move_construct(
win_iocp_socket_service_base::base_implementation_type& impl,
win_iocp_socket_service_base::base_implementation_type& other_impl)
+ noexcept
{
impl.socket_ = other_impl.socket_;
other_impl.socket_ = invalid_socket;
@@ -177,9 +178,16 @@ asio::error_code win_iocp_socket_service_base::close(
reinterpret_cast<void**>(&reactor_), 0, 0));
if (r)
r->deregister_descriptor(impl.socket_, impl.reactor_data_, true);
- }
- socket_ops::close(impl.socket_, impl.state_, false, ec);
+ socket_ops::close(impl.socket_, impl.state_, false, ec);
+
+ if (r)
+ r->cleanup_descriptor_data(impl.reactor_data_);
+ }
+ else
+ {
+ ec = asio::error_code();
+ }
impl.socket_ = invalid_socket;
impl.state_ = 0;
@@ -191,6 +199,39 @@ asio::error_code win_iocp_socket_service_base::close(
return ec;
}
+socket_type win_iocp_socket_service_base::release(
+ win_iocp_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ return invalid_socket;
+
+ cancel(impl, ec);
+ if (ec)
+ return invalid_socket;
+
+ nt_set_info_fn fn = get_nt_set_info();
+ if (fn == 0)
+ {
+ ec = asio::error::operation_not_supported;
+ return invalid_socket;
+ }
+
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(impl.socket_);
+ ULONG_PTR iosb[2] = { 0, 0 };
+ void* info[2] = { 0, 0 };
+ if (fn(sock_as_handle, iosb, &info, sizeof(info),
+ 61 /* FileReplaceCompletionInformation */))
+ {
+ ec = asio::error::operation_not_supported;
+ return invalid_socket;
+ }
+
+ socket_type tmp = impl.socket_;
+ impl.socket_ = invalid_socket;
+ return tmp;
+}
+
asio::error_code win_iocp_socket_service_base::cancel(
win_iocp_socket_service_base::base_implementation_type& impl,
asio::error_code& ec)
@@ -209,7 +250,8 @@ asio::error_code win_iocp_socket_service_base::cancel(
{
// The version of Windows supports cancellation from any thread.
typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
- cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
+ cancel_io_ex_t cancel_io_ex = reinterpret_cast<cancel_io_ex_t>(
+ reinterpret_cast<void*>(cancel_io_ex_ptr));
socket_type sock = impl.socket_;
HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock);
if (!cancel_io_ex(sock_as_handle, 0))
@@ -368,9 +410,8 @@ void win_iocp_socket_service_base::start_send_op(
void win_iocp_socket_service_base::start_send_to_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- const socket_addr_type* addr, int addrlen,
- socket_base::message_flags flags, operation* op)
+ WSABUF* buffers, std::size_t buffer_count, const void* addr,
+ int addrlen, socket_base::message_flags flags, operation* op)
{
update_cancellation_thread_id(impl);
iocp_service_.work_started();
@@ -381,8 +422,8 @@ void win_iocp_socket_service_base::start_send_to_op(
{
DWORD bytes_transferred = 0;
int result = ::WSASendTo(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, flags, addr, addrlen, op, 0);
+ static_cast<DWORD>(buffer_count), &bytes_transferred, flags,
+ static_cast<const socket_addr_type*>(addr), addrlen, op, 0);
DWORD last_error = ::WSAGetLastError();
if (last_error == ERROR_PORT_UNREACHABLE)
last_error = WSAECONNREFUSED;
@@ -424,29 +465,30 @@ void win_iocp_socket_service_base::start_receive_op(
}
}
-void win_iocp_socket_service_base::start_null_buffers_receive_op(
+int win_iocp_socket_service_base::start_null_buffers_receive_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- socket_base::message_flags flags, reactor_op* op)
+ socket_base::message_flags flags, reactor_op* op, operation* iocp_op)
{
if ((impl.state_ & socket_ops::stream_oriented) != 0)
{
// For stream sockets on Windows, we may issue a 0-byte overlapped
// WSARecv to wait until there is data available on the socket.
::WSABUF buf = { 0, 0 };
- start_receive_op(impl, &buf, 1, flags, false, op);
+ start_receive_op(impl, &buf, 1, flags, false, iocp_op);
+ return -1;
}
else
{
- start_reactor_op(impl,
- (flags & socket_base::message_out_of_band)
- ? select_reactor::except_op : select_reactor::read_op,
- op);
+ int op_type = (flags & socket_base::message_out_of_band)
+ ? select_reactor::except_op : select_reactor::read_op;
+ start_reactor_op(impl, op_type, op);
+ return op_type;
}
}
void win_iocp_socket_service_base::start_receive_from_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
+ WSABUF* buffers, std::size_t buffer_count, void* addr,
socket_base::message_flags flags, int* addrlen, operation* op)
{
update_cancellation_thread_id(impl);
@@ -459,8 +501,8 @@ void win_iocp_socket_service_base::start_receive_from_op(
DWORD bytes_transferred = 0;
DWORD recv_flags = flags;
int result = ::WSARecvFrom(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, &recv_flags, addr, addrlen, op, 0);
+ static_cast<DWORD>(buffer_count), &bytes_transferred, &recv_flags,
+ static_cast<socket_addr_type*>(addr), addrlen, op, 0);
DWORD last_error = ::WSAGetLastError();
if (last_error == ERROR_PORT_UNREACHABLE)
last_error = WSAECONNREFUSED;
@@ -505,11 +547,17 @@ void win_iocp_socket_service_base::start_accept_op(
void win_iocp_socket_service_base::restart_accept_op(
socket_type s, socket_holder& new_socket, int family, int type,
- int protocol, void* output_buffer, DWORD address_length, operation* op)
+ int protocol, void* output_buffer, DWORD address_length,
+ long* cancel_requested, operation* op)
{
new_socket.reset();
iocp_service_.work_started();
+ // Check if we were cancelled after the first AcceptEx completed.
+ if (cancel_requested)
+ if (::InterlockedExchangeAdd(cancel_requested, 0) == 1)
+ iocp_service_.on_completion(op, asio::error::operation_aborted);
+
asio::error_code ec;
new_socket.reset(socket_ops::socket(family, type, protocol, ec));
if (new_socket.get() == invalid_socket)
@@ -523,7 +571,19 @@ void win_iocp_socket_service_base::restart_accept_op(
if (!result && last_error != WSA_IO_PENDING)
iocp_service_.on_completion(op, last_error);
else
+ {
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ if (cancel_requested)
+ {
+ if (::InterlockedExchangeAdd(cancel_requested, 0) == 1)
+ {
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(s);
+ ::CancelIoEx(sock_as_handle, op);
+ }
+ }
+#endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
iocp_service_.on_pending(op);
+ }
}
}
@@ -545,10 +605,10 @@ void win_iocp_socket_service_base::start_reactor_op(
iocp_service_.post_immediate_completion(op, false);
}
-void win_iocp_socket_service_base::start_connect_op(
+int win_iocp_socket_service_base::start_connect_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- int family, int type, const socket_addr_type* addr,
- std::size_t addrlen, win_iocp_socket_connect_op_base* op)
+ int family, int type, const void* addr, std::size_t addrlen,
+ win_iocp_socket_connect_op_base* op, operation* iocp_op)
{
// If ConnectEx is available, use that.
if (family == ASIO_OS_DEF(AF_INET)
@@ -573,7 +633,7 @@ void win_iocp_socket_service_base::start_connect_op(
if (op->ec_ && op->ec_ != asio::error::invalid_argument)
{
iocp_service_.post_immediate_completion(op, false);
- return;
+ return -1;
}
op->connect_ex_ = true;
@@ -581,13 +641,14 @@ void win_iocp_socket_service_base::start_connect_op(
iocp_service_.work_started();
BOOL result = connect_ex(impl.socket_,
- addr, static_cast<int>(addrlen), 0, 0, 0, op);
+ static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), 0, 0, 0, iocp_op);
DWORD last_error = ::WSAGetLastError();
if (!result && last_error != WSA_IO_PENDING)
- iocp_service_.on_completion(op, last_error);
+ iocp_service_.on_completion(iocp_op, last_error);
else
- iocp_service_.on_pending(op);
- return;
+ iocp_service_.on_pending(iocp_op);
+ return -1;
}
}
@@ -607,12 +668,13 @@ void win_iocp_socket_service_base::start_connect_op(
op->ec_ = asio::error_code();
r.start_op(select_reactor::connect_op, impl.socket_,
impl.reactor_data_, op, false, false);
- return;
+ return select_reactor::connect_op;
}
}
}
r.post_immediate_completion(op, false);
+ return -1;
}
void win_iocp_socket_service_base::close_for_destruction(
@@ -631,10 +693,14 @@ void win_iocp_socket_service_base::close_for_destruction(
reinterpret_cast<void**>(&reactor_), 0, 0));
if (r)
r->deregister_descriptor(impl.socket_, impl.reactor_data_, true);
+
+ asio::error_code ignored_ec;
+ socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
+
+ if (r)
+ r->cleanup_descriptor_data(impl.reactor_data_);
}
- asio::error_code ignored_ec;
- socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
impl.socket_ = invalid_socket;
impl.state_ = 0;
impl.cancel_token_.reset();
@@ -663,7 +729,7 @@ select_reactor& win_iocp_socket_service_base::get_reactor()
reinterpret_cast<void**>(&reactor_), 0, 0));
if (!r)
{
- r = &(use_service<select_reactor>(io_context_));
+ r = &(use_service<select_reactor>(context_));
interlocked_exchange_pointer(reinterpret_cast<void**>(&reactor_), r);
}
return *r;
@@ -704,6 +770,24 @@ win_iocp_socket_service_base::get_connect_ex(
#endif // defined(ASIO_DISABLE_CONNECTEX)
}
+win_iocp_socket_service_base::nt_set_info_fn
+win_iocp_socket_service_base::get_nt_set_info()
+{
+ void* ptr = interlocked_compare_exchange_pointer(&nt_set_info_, 0, 0);
+ if (!ptr)
+ {
+ if (HMODULE h = ::GetModuleHandleA("NTDLL.DLL"))
+ ptr = reinterpret_cast<void*>(GetProcAddress(h, "NtSetInformationFile"));
+
+ // On failure, set nt_set_info_ to a special value to indicate that the
+ // NtSetInformationFile function is unavailable. That way we won't bother
+ // trying to look it up again.
+ interlocked_exchange_pointer(&nt_set_info_, ptr ? ptr : this);
+ }
+
+ return reinterpret_cast<nt_set_info_fn>(ptr == this ? 0 : ptr);
+}
+
void* win_iocp_socket_service_base::interlocked_compare_exchange_pointer(
void** dest, void* exch, void* cmp)
{
diff --git a/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp b/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp
index 2e14c4aef2e..6340b6e1256 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -44,7 +44,7 @@ int win_mutex::do_init()
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# elif defined(ASIO_WINDOWS_APP)
- if (!::InitializeCriticalSectionEx(&crit_section_, 0xFFFFFF, 0))
+ if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
return ::GetLastError();
# else
if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
@@ -57,8 +57,8 @@ int win_mutex::do_init()
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# elif defined(ASIO_WINDOWS_APP)
- if (!::InitializeCriticalSectionEx(&crit_section_, 0xFFFFFF, 0))
- return ::GetLastError();
+ if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
+ return ::GetLastError();
# else
if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
return ::GetLastError();
diff --git a/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp
index 9b3da7f0959..d7db3e3f3a1 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_object_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -27,10 +27,9 @@
namespace asio {
namespace detail {
-win_object_handle_service::win_object_handle_service(
- asio::io_context& io_context)
- : service_base<win_object_handle_service>(io_context),
- io_context_(asio::use_service<io_context_impl>(io_context)),
+win_object_handle_service::win_object_handle_service(execution_context& context)
+ : execution_context_service_base<win_object_handle_service>(context),
+ scheduler_(asio::use_service<scheduler_impl>(context)),
mutex_(),
impl_list_(0),
shutdown_(false)
@@ -52,7 +51,7 @@ void win_object_handle_service::shutdown()
lock.unlock();
- io_context_.abandon_operations(ops);
+ scheduler_.abandon_operations(ops);
}
void win_object_handle_service::construct(
@@ -178,7 +177,7 @@ void win_object_handle_service::destroy(
if (is_open(impl))
{
- ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
HANDLE wait_handle = impl.wait_handle_;
@@ -203,7 +202,7 @@ void win_object_handle_service::destroy(
::CloseHandle(impl.handle_);
impl.handle_ = INVALID_HANDLE_VALUE;
- io_context_.post_deferred_completions(ops);
+ scheduler_.post_deferred_completions(ops);
}
}
@@ -214,6 +213,7 @@ asio::error_code win_object_handle_service::assign(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -228,7 +228,7 @@ asio::error_code win_object_handle_service::close(
{
if (is_open(impl))
{
- ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
mutex::scoped_lock lock(mutex_);
@@ -264,13 +264,14 @@ asio::error_code win_object_handle_service::close(
asio::error::get_system_category());
}
- io_context_.post_deferred_completions(completed_ops);
+ scheduler_.post_deferred_completions(completed_ops);
}
else
{
ec = asio::error_code();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -280,7 +281,7 @@ asio::error_code win_object_handle_service::cancel(
{
if (is_open(impl))
{
- ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "cancel"));
mutex::scoped_lock lock(mutex_);
@@ -306,13 +307,14 @@ asio::error_code win_object_handle_service::cancel(
ec = asio::error_code();
- io_context_.post_deferred_completions(completed_ops);
+ scheduler_.post_deferred_completions(completed_ops);
}
else
{
ec = asio::error::bad_descriptor;
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -327,6 +329,7 @@ void win_object_handle_service::wait(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
break;
}
case WAIT_OBJECT_0:
@@ -340,7 +343,7 @@ void win_object_handle_service::wait(
void win_object_handle_service::start_wait_op(
win_object_handle_service::implementation_type& impl, wait_op* op)
{
- io_context_.work_started();
+ scheduler_.work_started();
if (is_open(impl))
{
@@ -358,13 +361,13 @@ void win_object_handle_service::start_wait_op(
else
{
lock.unlock();
- io_context_.post_deferred_completion(op);
+ scheduler_.post_deferred_completion(op);
}
}
else
{
op->ec_ = asio::error::bad_descriptor;
- io_context_.post_deferred_completion(op);
+ scheduler_.post_deferred_completion(op);
}
}
@@ -391,7 +394,7 @@ void win_object_handle_service::register_wait_callback(
}
lock.unlock();
- io_context_.post_deferred_completions(completed_ops);
+ scheduler_.post_deferred_completions(completed_ops);
}
}
@@ -433,9 +436,9 @@ void win_object_handle_service::wait_callback(PVOID param, BOOLEAN)
}
}
- io_context_impl& ioc = impl->owner_->io_context_;
+ scheduler_impl& sched = impl->owner_->scheduler_;
lock.unlock();
- ioc.post_deferred_completions(completed_ops);
+ sched.post_deferred_completions(completed_ops);
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp b/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp
index 359752dc266..5b459843338 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_static_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -94,7 +94,13 @@ int win_static_mutex::do_init()
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# elif defined(ASIO_WINDOWS_APP)
- ::InitializeCriticalSectionEx(&crit_section_, 0x80000000, 0);
+ if (!::InitializeCriticalSectionEx(&crit_section_, 0, 0))
+ {
+ last_error = ::GetLastError();
+ ::ReleaseMutex(mutex);
+ ::CloseHandle(mutex);
+ return last_error;
+ }
# else
if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
{
diff --git a/3rdparty/asio/include/asio/detail/impl/win_thread.ipp b/3rdparty/asio/include/asio/detail/impl/win_thread.ipp
index 4269e6b8b77..0ebc5db86b4 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_thread.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_thread.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_thread.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp b/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp
index 75a436c942f..5bc9de2c308 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -31,9 +31,9 @@ namespace detail {
DWORD win_tss_ptr_create()
{
#if defined(UNDER_CE)
- enum { out_of_indexes = 0xFFFFFFFF };
+ const DWORD out_of_indexes = 0xFFFFFFFF;
#else
- enum { out_of_indexes = TLS_OUT_OF_INDEXES };
+ const DWORD out_of_indexes = TLS_OUT_OF_INDEXES;
#endif
DWORD tss_key = ::TlsAlloc();
diff --git a/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
index f3d74cf0bd5..90a03542a9c 100644
--- a/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/winrt_ssocket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,9 +30,9 @@ namespace asio {
namespace detail {
winrt_ssocket_service_base::winrt_ssocket_service_base(
- asio::io_context& io_context)
- : io_context_(use_service<io_context_impl>(io_context)),
- async_manager_(use_service<winrt_async_manager>(io_context)),
+ execution_context& context)
+ : scheduler_(use_service<scheduler_impl>(context)),
+ async_manager_(use_service<winrt_async_manager>(context)),
mutex_(),
impl_list_(0)
{
@@ -66,6 +66,7 @@ void winrt_ssocket_service_base::construct(
void winrt_ssocket_service_base::base_move_construct(
winrt_ssocket_service_base::base_implementation_type& impl,
winrt_ssocket_service_base::base_implementation_type& other_impl)
+ noexcept
{
impl.socket_ = other_impl.socket_;
other_impl.socket_ = nullptr;
@@ -138,16 +139,29 @@ asio::error_code winrt_ssocket_service_base::close(
winrt_ssocket_service_base::base_implementation_type& impl,
asio::error_code& ec)
{
- if (impl.socket_)
- {
- delete impl.socket_;
- impl.socket_ = nullptr;
- }
-
+ delete impl.socket_;
+ impl.socket_ = nullptr;
ec = asio::error_code();
return ec;
}
+winrt_ssocket_service_base::native_handle_type
+winrt_ssocket_service_base::release(
+ winrt_ssocket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ return nullptr;
+
+ cancel(impl, ec);
+ if (ec)
+ return nullptr;
+
+ native_handle_type tmp = impl.socket_;
+ impl.socket_ = nullptr;
+ return tmp;
+}
+
std::size_t winrt_ssocket_service_base::do_get_endpoint(
const base_implementation_type& impl, bool local,
void* addr, std::size_t addr_len, asio::error_code& ec) const
@@ -168,7 +182,7 @@ std::size_t winrt_ssocket_service_base::do_get_endpoint(
: impl.socket_->Information->RemotePort);
unsigned long scope = 0;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ switch (static_cast<const socket_addr_type*>(addr)->sa_family)
{
case ASIO_OS_DEF(AF_INET):
if (addr_len < sizeof(sockaddr_in4_type))
@@ -337,7 +351,7 @@ asio::error_code winrt_ssocket_service_base::do_connect(
char addr_string[max_addr_v6_str_len];
unsigned short port;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ switch (static_cast<const socket_addr_type*>(addr)->sa_family)
{
case ASIO_OS_DEF(AF_INET):
socket_ops::inet_ntop(ASIO_OS_DEF(AF_INET),
@@ -381,13 +395,13 @@ void winrt_ssocket_service_base::start_connect_op(
if (!is_open(impl))
{
op->ec_ = asio::error::bad_descriptor;
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
char addr_string[max_addr_v6_str_len];
unsigned short port = 0;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ switch (static_cast<const socket_addr_type*>(addr)->sa_family)
{
case ASIO_OS_DEF(AF_INET):
socket_ops::inet_ntop(ASIO_OS_DEF(AF_INET),
@@ -410,7 +424,7 @@ void winrt_ssocket_service_base::start_connect_op(
if (op->ec_)
{
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
@@ -425,7 +439,7 @@ void winrt_ssocket_service_base::start_connect_op(
{
op->ec_ = asio::error_code(
e->HResult, asio::system_category());
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
}
}
@@ -476,14 +490,14 @@ void winrt_ssocket_service_base::start_send_op(
if (flags)
{
op->ec_ = asio::error::operation_not_supported;
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
if (!is_open(impl))
{
op->ec_ = asio::error::bad_descriptor;
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
@@ -494,7 +508,7 @@ void winrt_ssocket_service_base::start_send_op(
if (bufs.all_empty())
{
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
@@ -505,7 +519,7 @@ void winrt_ssocket_service_base::start_send_op(
{
op->ec_ = asio::error_code(e->HResult,
asio::system_category());
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
}
}
@@ -567,14 +581,14 @@ void winrt_ssocket_service_base::start_receive_op(
if (flags)
{
op->ec_ = asio::error::operation_not_supported;
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
if (!is_open(impl))
{
op->ec_ = asio::error::bad_descriptor;
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
@@ -585,7 +599,7 @@ void winrt_ssocket_service_base::start_receive_op(
if (bufs.all_empty())
{
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
return;
}
@@ -598,7 +612,7 @@ void winrt_ssocket_service_base::start_receive_op(
{
op->ec_ = asio::error_code(e->HResult,
asio::system_category());
- io_context_.post_immediate_completion(op, is_continuation);
+ scheduler_.post_immediate_completion(op, is_continuation);
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
index e8447316d29..9c967508e4f 100644
--- a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/impl/winrt_timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -46,12 +46,12 @@ void winrt_timer_scheduler::schedule_timer(timer_queue<Time_Traits>& queue,
if (shutdown_)
{
- io_context_.post_immediate_completion(op, false);
+ scheduler_.post_immediate_completion(op, false);
return;
}
bool earliest = queue.enqueue_timer(time, timer, op);
- io_context_.work_started();
+ scheduler_.work_started();
if (earliest)
event_.signal(lock);
}
@@ -65,7 +65,7 @@ std::size_t winrt_timer_scheduler::cancel_timer(timer_queue<Time_Traits>& queue,
op_queue<operation> ops;
std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
lock.unlock();
- io_context_.post_deferred_completions(ops);
+ scheduler_.post_deferred_completions(ops);
return n;
}
diff --git a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
index 2bc92b764b0..028b5f9f3cb 100644
--- a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
@@ -2,7 +2,7 @@
// detail/impl/winrt_timer_scheduler.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -27,10 +27,9 @@
namespace asio {
namespace detail {
-winrt_timer_scheduler::winrt_timer_scheduler(
- asio::io_context& io_context)
- : asio::detail::service_base<winrt_timer_scheduler>(io_context),
- io_context_(use_service<io_context_impl>(io_context)),
+winrt_timer_scheduler::winrt_timer_scheduler(execution_context& context)
+ : execution_context_service_base<winrt_timer_scheduler>(context),
+ scheduler_(use_service<scheduler_impl>(context)),
mutex_(),
event_(),
timer_queues_(),
@@ -64,10 +63,10 @@ void winrt_timer_scheduler::shutdown()
op_queue<operation> ops;
timer_queues_.get_all_timers(ops);
- io_context_.abandon_operations(ops);
+ scheduler_.abandon_operations(ops);
}
-void winrt_timer_scheduler::notify_fork(asio::io_context::fork_event)
+void winrt_timer_scheduler::notify_fork(execution_context::fork_event)
{
}
@@ -89,7 +88,7 @@ void winrt_timer_scheduler::run_thread()
if (!ops.empty())
{
lock.unlock();
- io_context_.post_deferred_completions(ops);
+ scheduler_.post_deferred_completions(ops);
lock.lock();
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp b/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp
index 094b58bdc54..5b5f56037ea 100644
--- a/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp
@@ -2,7 +2,7 @@
// detail/impl/winsock_init.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/initiate_defer.hpp b/3rdparty/asio/include/asio/detail/initiate_defer.hpp
new file mode 100644
index 00000000000..92abb0aa2f0
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/initiate_defer.hpp
@@ -0,0 +1,207 @@
+//
+// detail/initiate_defer.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_INITIATE_DEFER_HPP
+#define ASIO_DETAIL_INITIATE_DEFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/relationship.hpp"
+#include "asio/prefer.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class initiate_defer
+{
+public:
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex, execution::blocking.never),
+ execution::relationship.continuation,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex.defer(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+};
+
+template <typename Executor>
+class initiate_defer_with_executor
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_defer_with_executor(const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.continuation,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.continuation,
+ execution::allocator(alloc)
+ ).execute(
+ detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.defer(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.defer(detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex), alloc);
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_INITIATE_DEFER_HPP
diff --git a/3rdparty/asio/include/asio/detail/initiate_dispatch.hpp b/3rdparty/asio/include/asio/detail/initiate_dispatch.hpp
new file mode 100644
index 00000000000..ba2f68f0579
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/initiate_dispatch.hpp
@@ -0,0 +1,193 @@
+//
+// detail/initiate_dispatch.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_INITIATE_DISPATCH_HPP
+#define ASIO_DETAIL_INITIATE_DISPATCH_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/prefer.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class initiate_dispatch
+{
+public:
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(ex, execution::allocator(alloc)).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex.dispatch(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+};
+
+template <typename Executor>
+class initiate_dispatch_with_executor
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_dispatch_with_executor(const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(ex_, execution::allocator(alloc)).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(ex_, execution::allocator(alloc)).execute(
+ detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.dispatch(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.dispatch(detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex), alloc);
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_INITIATE_DISPATCH_HPP
diff --git a/3rdparty/asio/include/asio/detail/initiate_post.hpp b/3rdparty/asio/include/asio/detail/initiate_post.hpp
new file mode 100644
index 00000000000..f73c8ee0b81
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/initiate_post.hpp
@@ -0,0 +1,207 @@
+//
+// detail/initiate_post.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_INITIATE_POST_HPP
+#define ASIO_DETAIL_INITIATE_POST_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/relationship.hpp"
+#include "asio/prefer.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class initiate_post
+{
+public:
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex, execution::blocking.never),
+ execution::relationship.fork,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex.post(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+};
+
+template <typename Executor>
+class initiate_post_with_executor
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_post_with_executor(const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.fork,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.fork,
+ execution::allocator(alloc)
+ ).execute(
+ detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.post(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.post(detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex), alloc);
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_INITIATE_POST_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_control.hpp b/3rdparty/asio/include/asio/detail/io_control.hpp
index 81b3d49c71c..14daf85730a 100644
--- a/3rdparty/asio/include/asio/detail/io_control.hpp
+++ b/3rdparty/asio/include/asio/detail/io_control.hpp
@@ -2,7 +2,7 @@
// detail/io_control.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/io_object_impl.hpp b/3rdparty/asio/include/asio/detail/io_object_impl.hpp
new file mode 100644
index 00000000000..bd7312b8491
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_object_impl.hpp
@@ -0,0 +1,177 @@
+//
+// detail/io_object_impl.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_OBJECT_IMPL_HPP
+#define ASIO_DETAIL_IO_OBJECT_IMPL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <new>
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/context.hpp"
+#include "asio/io_context.hpp"
+#include "asio/query.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename IoObjectService,
+ typename Executor = io_context::executor_type>
+class io_object_impl
+{
+public:
+ // The type of the service that will be used to provide I/O operations.
+ typedef IoObjectService service_type;
+
+ // The underlying implementation type of I/O object.
+ typedef typename service_type::implementation_type implementation_type;
+
+ // The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ // Construct an I/O object using an executor.
+ explicit io_object_impl(int, const executor_type& ex)
+ : service_(&asio::use_service<IoObjectService>(
+ io_object_impl::get_context(ex))),
+ executor_(ex)
+ {
+ service_->construct(implementation_);
+ }
+
+ // Construct an I/O object using an execution context.
+ template <typename ExecutionContext>
+ explicit io_object_impl(int, int, ExecutionContext& context)
+ : service_(&asio::use_service<IoObjectService>(context)),
+ executor_(context.get_executor())
+ {
+ service_->construct(implementation_);
+ }
+
+ // Move-construct an I/O object.
+ io_object_impl(io_object_impl&& other)
+ : service_(&other.get_service()),
+ executor_(other.get_executor())
+ {
+ service_->move_construct(implementation_, other.implementation_);
+ }
+
+ // Perform converting move-construction of an I/O object on the same service.
+ template <typename Executor1>
+ io_object_impl(io_object_impl<IoObjectService, Executor1>&& other)
+ : service_(&other.get_service()),
+ executor_(other.get_executor())
+ {
+ service_->move_construct(implementation_, other.get_implementation());
+ }
+
+ // Perform converting move-construction of an I/O object on another service.
+ template <typename IoObjectService1, typename Executor1>
+ io_object_impl(io_object_impl<IoObjectService1, Executor1>&& other)
+ : service_(&asio::use_service<IoObjectService>(
+ io_object_impl::get_context(other.get_executor()))),
+ executor_(other.get_executor())
+ {
+ service_->converting_move_construct(implementation_,
+ other.get_service(), other.get_implementation());
+ }
+
+ // Destructor.
+ ~io_object_impl()
+ {
+ service_->destroy(implementation_);
+ }
+
+ // Move-assign an I/O object.
+ io_object_impl& operator=(io_object_impl&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(implementation_,
+ *other.service_, other.implementation_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ // Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return executor_;
+ }
+
+ // Get the service associated with the I/O object.
+ service_type& get_service()
+ {
+ return *service_;
+ }
+
+ // Get the service associated with the I/O object.
+ const service_type& get_service() const
+ {
+ return *service_;
+ }
+
+ // Get the underlying implementation of the I/O object.
+ implementation_type& get_implementation()
+ {
+ return implementation_;
+ }
+
+ // Get the underlying implementation of the I/O object.
+ const implementation_type& get_implementation() const
+ {
+ return implementation_;
+ }
+
+private:
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ // Disallow copying and copy assignment.
+ io_object_impl(const io_object_impl&);
+ io_object_impl& operator=(const io_object_impl&);
+
+ // The service associated with the I/O object.
+ service_type* service_;
+
+ // The underlying implementation of the I/O object.
+ implementation_type implementation_;
+
+ // The associated executor.
+ executor_type executor_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IO_OBJECT_IMPL_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp
new file mode 100644
index 00000000000..114bdb54297
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp
@@ -0,0 +1,195 @@
+//
+// detail/io_uring_descriptor_read_at_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_AT_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_AT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_descriptor_read_at_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_read_at_op_base(
+ const asio::error_code& success_ec, int descriptor,
+ descriptor_ops::state_type state, uint64_t offset,
+ const MutableBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_read_at_op_base::do_prepare,
+ &io_uring_descriptor_read_at_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ offset_(offset),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_at_op_base* o(
+ static_cast<io_uring_descriptor_read_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLIN);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_read_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ o->offset_, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_readv(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), o->offset_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_at_op_base* o(
+ static_cast<io_uring_descriptor_read_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_read_at1(o->descriptor_,
+ o->offset_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_read_at(o->descriptor_,
+ o->offset_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_ && o->bytes_transferred_ == 0)
+ o->ec_ = asio::error::eof;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ uint64_t offset_;
+ MutableBufferSequence buffers_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_read_at_op
+ : public io_uring_descriptor_read_at_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_read_at_op);
+
+ io_uring_descriptor_read_at_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state, uint64_t offset,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_descriptor_read_at_op_base<MutableBufferSequence>(
+ success_ec, descriptor, state, offset, buffers,
+ &io_uring_descriptor_read_at_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_at_op* o
+ (static_cast<io_uring_descriptor_read_at_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_AT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp
new file mode 100644
index 00000000000..9f8cf70bca3
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp
@@ -0,0 +1,190 @@
+//
+// detail/io_uring_descriptor_read_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_descriptor_read_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_read_op_base(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const MutableBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_read_op_base::do_prepare,
+ &io_uring_descriptor_read_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_op_base* o(
+ static_cast<io_uring_descriptor_read_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLIN);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_read_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_readv(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), -1);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_op_base* o(
+ static_cast<io_uring_descriptor_read_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_read1(
+ o->descriptor_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_read(
+ o->descriptor_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_ && o->bytes_transferred_ == 0)
+ o->ec_ = asio::error::eof;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_read_op
+ : public io_uring_descriptor_read_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_read_op);
+
+ io_uring_descriptor_read_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_descriptor_read_op_base<MutableBufferSequence>(success_ec,
+ descriptor, state, buffers, &io_uring_descriptor_read_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_op* o
+ (static_cast<io_uring_descriptor_read_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp
new file mode 100644
index 00000000000..04d1e36edd8
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp
@@ -0,0 +1,687 @@
+//
+// detail/io_uring_descriptor_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_DESCRIPTOR_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/buffer.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/io_uring_descriptor_read_at_op.hpp"
+#include "asio/detail/io_uring_descriptor_read_op.hpp"
+#include "asio/detail/io_uring_descriptor_write_at_op.hpp"
+#include "asio/detail/io_uring_descriptor_write_op.hpp"
+#include "asio/detail/io_uring_null_buffers_op.hpp"
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/io_uring_wait_op.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/posix/descriptor_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_descriptor_service :
+ public execution_context_service_base<io_uring_descriptor_service>
+{
+public:
+ // The native type of a descriptor.
+ typedef int native_handle_type;
+
+ // The implementation type of the descriptor.
+ class implementation_type
+ : private asio::detail::noncopyable
+ {
+ public:
+ // Default constructor.
+ implementation_type()
+ : descriptor_(-1),
+ state_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class io_uring_descriptor_service;
+
+ // The native descriptor representation.
+ int descriptor_;
+
+ // The current state of the descriptor.
+ descriptor_ops::state_type state_;
+
+ // Per I/O object data used by the io_uring_service.
+ io_uring_service::per_io_object_data io_object_data_;
+ };
+
+ // Constructor.
+ ASIO_DECL io_uring_descriptor_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Construct a new descriptor implementation.
+ ASIO_DECL void construct(implementation_type& impl);
+
+ // Move-construct a new descriptor implementation.
+ ASIO_DECL void move_construct(implementation_type& impl,
+ implementation_type& other_impl) noexcept;
+
+ // Move-assign from another descriptor implementation.
+ ASIO_DECL void move_assign(implementation_type& impl,
+ io_uring_descriptor_service& other_service,
+ implementation_type& other_impl);
+
+ // Destroy a descriptor implementation.
+ ASIO_DECL void destroy(implementation_type& impl);
+
+ // Assign a native descriptor to a descriptor implementation.
+ ASIO_DECL asio::error_code assign(implementation_type& impl,
+ const native_handle_type& native_descriptor,
+ asio::error_code& ec);
+
+ // Determine whether the descriptor is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return impl.descriptor_ != -1;
+ }
+
+ // Destroy a descriptor implementation.
+ ASIO_DECL asio::error_code close(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Get the native descriptor representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return impl.descriptor_;
+ }
+
+ // Release ownership of the native descriptor representation.
+ ASIO_DECL native_handle_type release(implementation_type& impl);
+
+ // Release ownership of the native descriptor representation.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ ec = success_ec_;
+ return release(impl);
+ }
+
+ // Cancel all operations associated with the descriptor.
+ ASIO_DECL asio::error_code cancel(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Perform an IO control command on the descriptor.
+ template <typename IO_Control_Command>
+ asio::error_code io_control(implementation_type& impl,
+ IO_Control_Command& command, asio::error_code& ec)
+ {
+ descriptor_ops::ioctl(impl.descriptor_, impl.state_,
+ command.name(), static_cast<ioctl_arg_type*>(command.data()), ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the descriptor.
+ bool non_blocking(const implementation_type& impl) const
+ {
+ return (impl.state_ & descriptor_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the descriptor.
+ asio::error_code non_blocking(implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ descriptor_ops::set_user_non_blocking(
+ impl.descriptor_, impl.state_, mode, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native descriptor implementation.
+ bool native_non_blocking(const implementation_type& impl) const
+ {
+ return (impl.state_ & descriptor_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native descriptor implementation.
+ asio::error_code native_non_blocking(implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ descriptor_ops::set_internal_non_blocking(
+ impl.descriptor_, impl.state_, mode, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Wait for the descriptor to become ready to read, ready to write, or to have
+ // pending error conditions.
+ asio::error_code wait(implementation_type& impl,
+ posix::descriptor_base::wait_type w, asio::error_code& ec)
+ {
+ switch (w)
+ {
+ case posix::descriptor_base::wait_read:
+ descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
+ break;
+ case posix::descriptor_base::wait_write:
+ descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
+ break;
+ case posix::descriptor_base::wait_error:
+ descriptor_ops::poll_error(impl.descriptor_, impl.state_, ec);
+ break;
+ default:
+ ec = asio::error::invalid_argument;
+ break;
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Asynchronously wait for the descriptor to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ posix::descriptor_base::wait_type w,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ int op_type;
+ int poll_flags;
+ switch (w)
+ {
+ case posix::descriptor_base::wait_read:
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ break;
+ case posix::descriptor_base::wait_write:
+ op_type = io_uring_service::write_op;
+ poll_flags = POLLOUT;
+ break;
+ case posix::descriptor_base::wait_error:
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI | POLLERR | POLLHUP;
+ break;
+ default:
+ op_type = -1;
+ poll_flags = -1;
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected() && op_type != -1)
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_wait"));
+
+ start_op(impl, op_type, p.p, is_continuation, op_type == -1);
+ p.v = p.p = 0;
+ }
+
+ // Write some data to the descriptor.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_write1(impl.descriptor_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_write(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be written without blocking.
+ size_t write_some(implementation_type& impl,
+ const null_buffers&, asio::error_code& ec)
+ {
+ // Wait for descriptor to become ready.
+ descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
+
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous write. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_write_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_write_some"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be written without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_, POLLOUT, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(),
+ *p.p, "descriptor", &impl, impl.descriptor_,
+ "async_write_some(null_buffers)"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Write some data to the descriptor at the specified offset.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_write_at1(impl.descriptor_,
+ impl.state_, offset, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_write_at(impl.descriptor_, impl.state_,
+ offset, bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be written without blocking.
+ size_t write_some_at(implementation_type& impl, uint64_t,
+ const null_buffers& buffers, asio::error_code& ec)
+ {
+ return write_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous write at the specified offset. The data being sent
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_write_at_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, offset, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_write_some"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be written without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex)
+ {
+ return async_write_some(impl, buffers, handler, io_ex);
+ }
+
+ // Read some data from the stream. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_read1(impl.descriptor_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_read(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be read without blocking.
+ size_t read_some(implementation_type& impl,
+ const null_buffers&, asio::error_code& ec)
+ {
+ // Wait for descriptor to become ready.
+ descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
+
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_read_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_read_some"));
+
+ start_op(impl, io_uring_service::read_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be read without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_, POLLIN, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(),
+ *p.p, "descriptor", &impl, impl.descriptor_,
+ "async_read_some(null_buffers)"));
+
+ start_op(impl, io_uring_service::read_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Read some data at the specified offset. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ if (bufs_type::is_single_buffer)
+ {
+ return descriptor_ops::sync_read_at1(impl.descriptor_,
+ impl.state_, offset, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ return descriptor_ops::sync_read_at(impl.descriptor_, impl.state_,
+ offset, bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+ }
+
+ // Wait until data can be read without blocking.
+ size_t read_some_at(implementation_type& impl, uint64_t,
+ const null_buffers& buffers, asio::error_code& ec)
+ {
+ return read_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_read_at_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, offset, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_read_some"));
+
+ start_op(impl, io_uring_service::read_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be read without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl, uint64_t,
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex)
+ {
+ return async_read_some(impl, buffers, handler, io_ex);
+ }
+
+private:
+ // Start the asynchronous operation.
+ ASIO_DECL void start_op(implementation_type& impl, int op_type,
+ io_uring_operation* op, bool is_continuation, bool noop);
+
+ // Helper class used to implement per-operation cancellation
+ class io_uring_op_cancellation
+ {
+ public:
+ io_uring_op_cancellation(io_uring_service* s,
+ io_uring_service::per_io_object_data* p, int o)
+ : io_uring_service_(s),
+ io_object_data_(p),
+ op_type_(o)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ io_uring_service_->cancel_ops_by_key(*io_object_data_, op_type_, this);
+ }
+ }
+
+ private:
+ io_uring_service* io_uring_service_;
+ io_uring_service::per_io_object_data* io_object_data_;
+ int op_type_;
+ };
+
+ // The io_uring_service that performs event demultiplexing for the service.
+ io_uring_service& io_uring_service_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_descriptor_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp
new file mode 100644
index 00000000000..10a3f7a6c3d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp
@@ -0,0 +1,189 @@
+//
+// detail/io_uring_descriptor_write_at_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_AT_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_AT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class io_uring_descriptor_write_at_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_write_at_op_base(
+ const asio::error_code& success_ec, int descriptor,
+ descriptor_ops::state_type state, uint64_t offset,
+ const ConstBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_write_at_op_base::do_prepare,
+ &io_uring_descriptor_write_at_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ offset_(offset),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_at_op_base* o(
+ static_cast<io_uring_descriptor_write_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLOUT);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_write_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ o->offset_, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_writev(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), o->offset_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_at_op_base* o(
+ static_cast<io_uring_descriptor_write_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_write_at1(o->descriptor_,
+ o->offset_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_write_at(o->descriptor_,
+ o->offset_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ uint64_t offset_;
+ ConstBufferSequence buffers_;
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_write_at_op
+ : public io_uring_descriptor_write_at_op_base<ConstBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_write_at_op);
+
+ io_uring_descriptor_write_at_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state, uint64_t offset,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : io_uring_descriptor_write_at_op_base<ConstBufferSequence>(
+ success_ec, descriptor, state, offset, buffers,
+ &io_uring_descriptor_write_at_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_at_op* o
+ (static_cast<io_uring_descriptor_write_at_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_AT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp
new file mode 100644
index 00000000000..090d644c7c8
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp
@@ -0,0 +1,185 @@
+//
+// detail/io_uring_descriptor_write_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class io_uring_descriptor_write_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_write_op_base(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const ConstBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_write_op_base::do_prepare,
+ &io_uring_descriptor_write_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_op_base* o(
+ static_cast<io_uring_descriptor_write_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLOUT);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_write_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_writev(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), -1);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_op_base* o(
+ static_cast<io_uring_descriptor_write_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_write1(
+ o->descriptor_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_write(
+ o->descriptor_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_write_op
+ : public io_uring_descriptor_write_op_base<ConstBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_write_op);
+
+ io_uring_descriptor_write_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : io_uring_descriptor_write_op_base<ConstBufferSequence>(success_ec,
+ descriptor, state, buffers, &io_uring_descriptor_write_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_op* o
+ (static_cast<io_uring_descriptor_write_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_file_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_file_service.hpp
new file mode 100644
index 00000000000..3a0a4538623
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_file_service.hpp
@@ -0,0 +1,261 @@
+//
+// detail/io_uring_file_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_FILE_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_FILE_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ && defined(ASIO_HAS_IO_URING)
+
+#include <string>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/io_uring_descriptor_service.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/file_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Extend the io_uring_descriptor_service to provide file support.
+class io_uring_file_service :
+ public execution_context_service_base<io_uring_file_service>
+{
+public:
+ typedef io_uring_descriptor_service descriptor_service;
+
+ // The native type of a file.
+ typedef descriptor_service::native_handle_type native_handle_type;
+
+ // The implementation type of the file.
+ class implementation_type : descriptor_service::implementation_type
+ {
+ private:
+ // Only this service will have access to the internal values.
+ friend class io_uring_file_service;
+
+ bool is_stream_;
+ };
+
+ ASIO_DECL io_uring_file_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Construct a new file implementation.
+ void construct(implementation_type& impl)
+ {
+ descriptor_service_.construct(impl);
+ impl.is_stream_ = false;
+ }
+
+ // Move-construct a new file implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ descriptor_service_.move_construct(impl, other_impl);
+ impl.is_stream_ = other_impl.is_stream_;
+ }
+
+ // Move-assign from another file implementation.
+ void move_assign(implementation_type& impl,
+ io_uring_file_service& other_service,
+ implementation_type& other_impl)
+ {
+ descriptor_service_.move_assign(impl,
+ other_service.descriptor_service_, other_impl);
+ impl.is_stream_ = other_impl.is_stream_;
+ }
+
+ // Destroy a file implementation.
+ void destroy(implementation_type& impl)
+ {
+ descriptor_service_.destroy(impl);
+ }
+
+ // Open the file using the specified path name.
+ ASIO_DECL asio::error_code open(implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec);
+
+ // Assign a native descriptor to a file implementation.
+ asio::error_code assign(implementation_type& impl,
+ const native_handle_type& native_descriptor,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.assign(impl, native_descriptor, ec);
+ }
+
+ // Set whether the implementation is stream-oriented.
+ void set_is_stream(implementation_type& impl, bool is_stream)
+ {
+ impl.is_stream_ = is_stream;
+ }
+
+ // Determine whether the file is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return descriptor_service_.is_open(impl);
+ }
+
+ // Destroy a file implementation.
+ asio::error_code close(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.close(impl, ec);
+ }
+
+ // Get the native file representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return descriptor_service_.native_handle(impl);
+ }
+
+ // Release ownership of the native descriptor representation.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.release(impl, ec);
+ }
+
+ // Cancel all operations associated with the file.
+ asio::error_code cancel(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.cancel(impl, ec);
+ }
+
+ // Get the size of the file.
+ ASIO_DECL uint64_t size(const implementation_type& impl,
+ asio::error_code& ec) const;
+
+ // Alter the size of the file.
+ ASIO_DECL asio::error_code resize(implementation_type& impl,
+ uint64_t n, asio::error_code& ec);
+
+ // Synchronise the file to disk.
+ ASIO_DECL asio::error_code sync_all(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Synchronise the file data to disk.
+ ASIO_DECL asio::error_code sync_data(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Seek to a position in the file.
+ ASIO_DECL uint64_t seek(implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec);
+
+ // Write the given data. Returns the number of bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.write_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_write_some(impl, buffers, handler, io_ex);
+ }
+
+ // Write the given data at the specified location. Returns the number of
+ // bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.write_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous write at the specified location. The data being
+ // written must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_write_some_at(
+ impl, offset, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.read_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_read_some(impl, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.read_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_read_some_at(
+ impl, offset, buffers, handler, io_ex);
+ }
+
+private:
+ // The implementation used for initiating asynchronous operations.
+ descriptor_service descriptor_service_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_file_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_FILE)
+ // && defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_FILE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp
new file mode 100644
index 00000000000..61fe6a6aafb
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp
@@ -0,0 +1,114 @@
+//
+// detail/io_uring_null_buffers_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_NULL_BUFFERS_OP_HPP
+#define ASIO_DETAIL_IO_URING_NULL_BUFFERS_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class io_uring_null_buffers_op : public io_uring_operation
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_null_buffers_op);
+
+ io_uring_null_buffers_op(const asio::error_code& success_ec,
+ int descriptor, int poll_flags, Handler& handler, const IoExecutor& io_ex)
+ : io_uring_operation(success_ec,
+ &io_uring_null_buffers_op::do_prepare,
+ &io_uring_null_buffers_op::do_perform,
+ &io_uring_null_buffers_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex),
+ descriptor_(descriptor),
+ poll_flags_(poll_flags)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_null_buffers_op* o(static_cast<io_uring_null_buffers_op*>(base));
+
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, o->poll_flags_);
+ }
+
+ static bool do_perform(io_uring_operation*, bool after_completion)
+ {
+ return after_completion;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_null_buffers_op* o(static_cast<io_uring_null_buffers_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+ int descriptor_;
+ int poll_flags_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IO_URING_NULL_BUFFERS_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_operation.hpp b/3rdparty/asio/include/asio/detail/io_uring_operation.hpp
new file mode 100644
index 00000000000..f2635cc4074
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_operation.hpp
@@ -0,0 +1,84 @@
+//
+// detail/io_uring_operation.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_OPERATION_HPP
+#define ASIO_DETAIL_IO_URING_OPERATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include <liburing.h>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/operation.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_operation
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ asio::error_code ec_;
+
+ // The number of bytes transferred, to be passed to the completion handler.
+ std::size_t bytes_transferred_;
+
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+
+ // Prepare the operation.
+ void prepare(::io_uring_sqe* sqe)
+ {
+ return prepare_func_(this, sqe);
+ }
+
+ // Perform actions associated with the operation. Returns true when complete.
+ bool perform(bool after_completion)
+ {
+ return perform_func_(this, after_completion);
+ }
+
+protected:
+ typedef void (*prepare_func_type)(io_uring_operation*, ::io_uring_sqe*);
+ typedef bool (*perform_func_type)(io_uring_operation*, bool);
+
+ io_uring_operation(const asio::error_code& success_ec,
+ prepare_func_type prepare_func, perform_func_type perform_func,
+ func_type complete_func)
+ : operation(complete_func),
+ ec_(success_ec),
+ bytes_transferred_(0),
+ cancellation_key_(0),
+ prepare_func_(prepare_func),
+ perform_func_(perform_func)
+ {
+ }
+
+private:
+ prepare_func_type prepare_func_;
+ perform_func_type perform_func_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_OPERATION_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_service.hpp
new file mode 100644
index 00000000000..2dd3c0bf14d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_service.hpp
@@ -0,0 +1,319 @@
+//
+// detail/io_uring_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include <liburing.h>
+#include "asio/detail/atomic_count.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/conditionally_enabled_mutex.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/limits.hpp"
+#include "asio/detail/object_pool.hpp"
+#include "asio/detail/op_queue.hpp"
+#include "asio/detail/reactor.hpp"
+#include "asio/detail/scheduler_task.hpp"
+#include "asio/detail/timer_queue_base.hpp"
+#include "asio/detail/timer_queue_set.hpp"
+#include "asio/detail/wait_op.hpp"
+#include "asio/execution_context.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_service
+ : public execution_context_service_base<io_uring_service>,
+ public scheduler_task
+{
+private:
+ // The mutex type used by this reactor.
+ typedef conditionally_enabled_mutex mutex;
+
+public:
+ enum op_types { read_op = 0, write_op = 1, except_op = 2, max_ops = 3 };
+
+ class io_object;
+
+ // An I/O queue stores operations that must run serially.
+ class io_queue : operation
+ {
+ friend class io_uring_service;
+
+ io_object* io_object_;
+ op_queue<io_uring_operation> op_queue_;
+ bool cancel_requested_;
+
+ ASIO_DECL io_queue();
+ void set_result(int r) { task_result_ = static_cast<unsigned>(r); }
+ ASIO_DECL operation* perform_io(int result);
+ ASIO_DECL static void do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred);
+ };
+
+ // Per I/O object state.
+ class io_object
+ {
+ friend class io_uring_service;
+ friend class object_pool_access;
+
+ io_object* next_;
+ io_object* prev_;
+
+ mutex mutex_;
+ io_uring_service* service_;
+ io_queue queues_[max_ops];
+ bool shutdown_;
+
+ ASIO_DECL io_object(bool locking);
+ };
+
+ // Per I/O object data.
+ typedef io_object* per_io_object_data;
+
+ // Constructor.
+ ASIO_DECL io_uring_service(asio::execution_context& ctx);
+
+ // Destructor.
+ ASIO_DECL ~io_uring_service();
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Recreate internal state following a fork.
+ ASIO_DECL void notify_fork(
+ asio::execution_context::fork_event fork_ev);
+
+ // Initialise the task.
+ ASIO_DECL void init_task();
+
+ // Register an I/O object with io_uring.
+ ASIO_DECL void register_io_object(io_object*& io_obj);
+
+ // Register an internal I/O object with io_uring.
+ ASIO_DECL void register_internal_io_object(
+ io_object*& io_obj, int op_type, io_uring_operation* op);
+
+ // Register buffers with io_uring.
+ ASIO_DECL void register_buffers(const ::iovec* v, unsigned n);
+
+ // Unregister buffers from io_uring.
+ ASIO_DECL void unregister_buffers();
+
+ // Post an operation for immediate completion.
+ void post_immediate_completion(operation* op, bool is_continuation);
+
+ // Start a new operation. The operation will be prepared and submitted to the
+ // io_uring when it is at the head of its I/O operation queue.
+ ASIO_DECL void start_op(int op_type, per_io_object_data& io_obj,
+ io_uring_operation* op, bool is_continuation);
+
+ // Cancel all operations associated with the given I/O object. The handlers
+ // associated with the I/O object will be invoked with the operation_aborted
+ // error.
+ ASIO_DECL void cancel_ops(per_io_object_data& io_obj);
+
+ // Cancel all operations associated with the given I/O object and key. The
+ // handlers associated with the object and key will be invoked with the
+ // operation_aborted error.
+ ASIO_DECL void cancel_ops_by_key(per_io_object_data& io_obj,
+ int op_type, void* cancellation_key);
+
+ // Cancel any operations that are running against the I/O object and remove
+ // its registration from the service. The service resources associated with
+ // the I/O object must be released by calling cleanup_io_object.
+ ASIO_DECL void deregister_io_object(per_io_object_data& io_obj);
+
+ // Perform any post-deregistration cleanup tasks associated with the I/O
+ // object.
+ ASIO_DECL void cleanup_io_object(per_io_object_data& io_obj);
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ 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,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source);
+
+ // Wait on io_uring once until interrupted or events are ready to be
+ // dispatched.
+ ASIO_DECL void run(long usec, op_queue<operation>& ops);
+
+ // Interrupt the io_uring wait.
+ ASIO_DECL void interrupt();
+
+private:
+ // The hint to pass to io_uring_queue_init to size its data structures.
+ enum { ring_size = 16384 };
+
+ // The number of operations to submit in a batch.
+ enum { submit_batch_size = 128 };
+
+ // The number of operations to complete in a batch.
+ enum { complete_batch_size = 128 };
+
+ // The type used for processing eventfd readiness notifications.
+ class event_fd_read_op;
+
+ // Initialise the ring.
+ ASIO_DECL void init_ring();
+
+ // Register the eventfd descriptor for readiness notifications.
+ ASIO_DECL void register_with_reactor();
+
+ // Allocate a new I/O object.
+ ASIO_DECL io_object* allocate_io_object();
+
+ // Free an existing I/O object.
+ ASIO_DECL void free_io_object(io_object* s);
+
+ // Helper function to cancel all operations associated with the given I/O
+ // object. This function must be called while the I/O object's mutex is held.
+ // Returns true if there are operations for which cancellation is pending.
+ ASIO_DECL bool do_cancel_ops(
+ per_io_object_data& io_obj, op_queue<operation>& ops);
+
+ // Helper function to add a new timer queue.
+ ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Called to recalculate and update the timeout.
+ ASIO_DECL void update_timeout();
+
+ // Get the current timeout value.
+ ASIO_DECL __kernel_timespec get_timeout() const;
+
+ // Get a new submission queue entry, flushing the queue if necessary.
+ ASIO_DECL ::io_uring_sqe* get_sqe();
+
+ // Submit pending submission queue entries.
+ ASIO_DECL void submit_sqes();
+
+ // Post an operation to submit the pending submission queue entries.
+ ASIO_DECL void post_submit_sqes_op(mutex::scoped_lock& lock);
+
+ // Push an operation to submit the pending submission queue entries.
+ ASIO_DECL void push_submit_sqes_op(op_queue<operation>& ops);
+
+ // Helper operation to submit pending submission queue entries.
+ class submit_sqes_op : operation
+ {
+ friend class io_uring_service;
+
+ io_uring_service* service_;
+
+ ASIO_DECL submit_sqes_op(io_uring_service* s);
+ ASIO_DECL static void do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred);
+ };
+
+ // The scheduler implementation used to post completions.
+ scheduler& scheduler_;
+
+ // Mutex to protect access to internal data.
+ mutex mutex_;
+
+ // The ring.
+ ::io_uring ring_;
+
+ // The count of unfinished work.
+ atomic_count outstanding_work_;
+
+ // The operation used to submit the pending submission queue entries.
+ submit_sqes_op submit_sqes_op_;
+
+ // The number of pending submission queue entries_.
+ int pending_sqes_;
+
+ // Whether there is a pending submission operation.
+ bool pending_submit_sqes_op_;
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // The timespec for the pending timeout operation. Must remain valid while the
+ // operation is outstanding.
+ __kernel_timespec timeout_;
+
+ // Mutex to protect access to the registered I/O objects.
+ mutex registration_mutex_;
+
+ // Keep track of all registered I/O objects.
+ object_pool<io_object> registered_io_objects_;
+
+ // Helper class to do post-perform_io cleanup.
+ struct perform_io_cleanup_on_block_exit;
+ friend struct perform_io_cleanup_on_block_exit;
+
+ // The reactor used to register for eventfd readiness.
+ reactor& reactor_;
+
+ // The per-descriptor reactor data used for the eventfd.
+ reactor::per_descriptor_data reactor_data_;
+
+ // The eventfd descriptor used to wait for readiness.
+ int event_fd_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/detail/impl/io_uring_service.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp
new file mode 100644
index 00000000000..dbf1a98b536
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp
@@ -0,0 +1,280 @@
+//
+// detail/io_uring_socket_accept_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_ACCEPT_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_ACCEPT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/socket_holder.hpp"
+#include "asio/detail/socket_ops.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Socket, typename Protocol>
+class io_uring_socket_accept_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_accept_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state, Socket& peer,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_accept_op_base::do_prepare,
+ &io_uring_socket_accept_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ peer_(peer),
+ protocol_(protocol),
+ peer_endpoint_(peer_endpoint),
+ addrlen_(peer_endpoint ? peer_endpoint->capacity() : 0)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_accept_op_base* o(
+ static_cast<io_uring_socket_accept_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->socket_, POLLIN);
+ }
+ else
+ {
+ ::io_uring_prep_accept(sqe, o->socket_,
+ o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
+ o->peer_endpoint_ ? &o->addrlen_ : 0, 0);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_accept_op_base* o(
+ static_cast<io_uring_socket_accept_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ socket_type new_socket = invalid_socket;
+ std::size_t addrlen = static_cast<std::size_t>(o->addrlen_);
+ bool result = socket_ops::non_blocking_accept(o->socket_,
+ o->state_, o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
+ o->peer_endpoint_ ? &addrlen : 0, o->ec_, new_socket);
+ o->new_socket_.reset(new_socket);
+ o->addrlen_ = static_cast<socklen_t>(addrlen);
+ return result;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ if (after_completion && !o->ec_)
+ o->new_socket_.reset(static_cast<int>(o->bytes_transferred_));
+
+ return after_completion;
+ }
+
+ void do_assign()
+ {
+ if (new_socket_.get() != invalid_socket)
+ {
+ if (peer_endpoint_)
+ peer_endpoint_->resize(addrlen_);
+ peer_.assign(protocol_, new_socket_.get(), ec_);
+ if (!ec_)
+ new_socket_.release();
+ }
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ socket_holder new_socket_;
+ Socket& peer_;
+ Protocol protocol_;
+ typename Protocol::endpoint* peer_endpoint_;
+ socklen_t addrlen_;
+};
+
+template <typename Socket, typename Protocol,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_accept_op :
+ public io_uring_socket_accept_op_base<Socket, Protocol>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_accept_op);
+
+ io_uring_socket_accept_op(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state, Socket& peer,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_accept_op_base<Socket, Protocol>(
+ success_ec, socket, state, peer, protocol, peer_endpoint,
+ &io_uring_socket_accept_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_accept_op* o(static_cast<io_uring_socket_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ if (owner)
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+template <typename Protocol, typename PeerIoExecutor,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_move_accept_op :
+ private Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ public io_uring_socket_accept_op_base<
+ typename Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ Protocol>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_move_accept_op);
+
+ io_uring_socket_move_accept_op(const asio::error_code& success_ec,
+ const PeerIoExecutor& peer_io_ex, socket_type socket,
+ socket_ops::state_type state, const Protocol& protocol,
+ typename Protocol::endpoint* peer_endpoint, Handler& handler,
+ const IoExecutor& io_ex)
+ : peer_socket_type(peer_io_ex),
+ io_uring_socket_accept_op_base<peer_socket_type, Protocol>(
+ success_ec, socket, state, *this, protocol, peer_endpoint,
+ &io_uring_socket_move_accept_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_move_accept_op* o(
+ static_cast<io_uring_socket_move_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ if (owner)
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::move_binder2<Handler,
+ asio::error_code, peer_socket_type>
+ handler(0, static_cast<Handler&&>(o->handler_), o->ec_,
+ static_cast<peer_socket_type&&>(*o));
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ typedef typename Protocol::socket::template
+ rebind_executor<PeerIoExecutor>::other peer_socket_type;
+
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_ACCEPT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp
new file mode 100644
index 00000000000..45d30c6bb0a
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp
@@ -0,0 +1,140 @@
+//
+// detail/io_uring_socket_connect_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_CONNECT_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_CONNECT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/socket_ops.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class io_uring_socket_connect_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_connect_op_base(const asio::error_code& success_ec,
+ socket_type socket, const typename Protocol::endpoint& endpoint,
+ func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_connect_op_base::do_prepare,
+ &io_uring_socket_connect_op_base::do_perform, complete_func),
+ socket_(socket),
+ endpoint_(endpoint)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_connect_op_base* o(
+ static_cast<io_uring_socket_connect_op_base*>(base));
+
+ ::io_uring_prep_connect(sqe, o->socket_,
+ static_cast<sockaddr*>(o->endpoint_.data()),
+ static_cast<socklen_t>(o->endpoint_.size()));
+ }
+
+ static bool do_perform(io_uring_operation*, bool after_completion)
+ {
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ typename Protocol::endpoint endpoint_;
+};
+
+template <typename Protocol, typename Handler, typename IoExecutor>
+class io_uring_socket_connect_op :
+ public io_uring_socket_connect_op_base<Protocol>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_connect_op);
+
+ io_uring_socket_connect_op(const asio::error_code& success_ec,
+ socket_type socket, const typename Protocol::endpoint& endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_connect_op_base<Protocol>(success_ec, socket,
+ endpoint, &io_uring_socket_connect_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_connect_op* o
+ (static_cast<io_uring_socket_connect_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_CONNECT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp
new file mode 100644
index 00000000000..b1936c1ab93
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp
@@ -0,0 +1,205 @@
+//
+// detail/io_uring_socket_recv_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_RECV_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_RECV_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_socket_recv_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_recv_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_recv_op_base::do_prepare,
+ &io_uring_socket_recv_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recv_op_base* o(
+ static_cast<io_uring_socket_recv_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ ::io_uring_prep_poll_add(sqe, o->socket_, except_op ? POLLPRI : POLLIN);
+ }
+ else if (o->bufs_.is_single_buffer
+ && o->bufs_.is_registered_buffer && o->flags_ == 0)
+ {
+ ::io_uring_prep_read_fixed(sqe, o->socket_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_recvmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recv_op_base* o(
+ static_cast<io_uring_socket_recv_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ if (after_completion || !except_op)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return socket_ops::non_blocking_recv1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ return socket_ops::non_blocking_recv(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_ && o->bytes_transferred_ == 0)
+ if ((o->state_ & socket_ops::stream_oriented) != 0)
+ o->ec_ = asio::error::eof;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_socket_recv_op
+ : public io_uring_socket_recv_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_recv_op);
+
+ io_uring_socket_recv_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_recv_op_base<MutableBufferSequence>(success_ec,
+ socket, state, buffers, flags, &io_uring_socket_recv_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recv_op* o
+ (static_cast<io_uring_socket_recv_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_RECV_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp
new file mode 100644
index 00000000000..dfd30e4f2a1
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp
@@ -0,0 +1,206 @@
+//
+// detail/io_uring_socket_recvfrom_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_RECVFROM_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_RECVFROM_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Endpoint>
+class io_uring_socket_recvfrom_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_recvfrom_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, Endpoint& endpoint,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_recvfrom_op_base::do_prepare,
+ &io_uring_socket_recvfrom_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ sender_endpoint_(endpoint),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ msghdr_.msg_name = static_cast<sockaddr*>(
+ static_cast<void*>(sender_endpoint_.data()));
+ msghdr_.msg_namelen = sender_endpoint_.capacity();
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvfrom_op_base* o(
+ static_cast<io_uring_socket_recvfrom_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ ::io_uring_prep_poll_add(sqe, o->socket_, except_op ? POLLPRI : POLLIN);
+ }
+ else
+ {
+ ::io_uring_prep_recvmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvfrom_op_base* o(
+ static_cast<io_uring_socket_recvfrom_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ if (after_completion || !except_op)
+ {
+ std::size_t addr_len = o->sender_endpoint_.capacity();
+ bool result;
+ if (o->bufs_.is_single_buffer)
+ {
+ result = socket_ops::non_blocking_recvfrom1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ result = socket_ops::non_blocking_recvfrom(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_);
+ }
+ if (result && !o->ec_)
+ o->sender_endpoint_.resize(addr_len);
+ }
+ }
+ else if (after_completion && !o->ec_)
+ o->sender_endpoint_.resize(o->msghdr_.msg_namelen);
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ Endpoint& sender_endpoint_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename MutableBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_recvfrom_op
+ : public io_uring_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_recvfrom_op);
+
+ io_uring_socket_recvfrom_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, Endpoint& endpoint,
+ socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>(
+ success_ec, socket, state, buffers, endpoint, flags,
+ &io_uring_socket_recvfrom_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvfrom_op* o
+ (static_cast<io_uring_socket_recvfrom_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_RECVFROM_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp
new file mode 100644
index 00000000000..778d0fa3acf
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp
@@ -0,0 +1,192 @@
+//
+// detail/io_uring_socket_recvmsg_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_RECVMSG_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_RECVMSG_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_socket_recvmsg_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_recvmsg_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_recvmsg_op_base::do_prepare,
+ &io_uring_socket_recvmsg_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ in_flags_(in_flags),
+ out_flags_(out_flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvmsg_op_base* o(
+ static_cast<io_uring_socket_recvmsg_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->in_flags_ & socket_base::message_out_of_band) != 0;
+ ::io_uring_prep_poll_add(sqe, o->socket_, except_op ? POLLPRI : POLLIN);
+ }
+ else
+ {
+ ::io_uring_prep_recvmsg(sqe, o->socket_, &o->msghdr_, o->in_flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvmsg_op_base* o(
+ static_cast<io_uring_socket_recvmsg_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->in_flags_ & socket_base::message_out_of_band) != 0;
+ if (after_completion || !except_op)
+ {
+ return socket_ops::non_blocking_recvmsg(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->in_flags_,
+ o->out_flags_, o->ec_, o->bytes_transferred_);
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_)
+ o->out_flags_ = o->msghdr_.msg_flags;
+ else
+ o->out_flags_ = 0;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags in_flags_;
+ socket_base::message_flags& out_flags_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_socket_recvmsg_op
+ : public io_uring_socket_recvmsg_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_recvmsg_op);
+
+ io_uring_socket_recvmsg_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_recvmsg_op_base<MutableBufferSequence>(success_ec,
+ socket, state, buffers, in_flags, out_flags,
+ &io_uring_socket_recvmsg_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvmsg_op* o
+ (static_cast<io_uring_socket_recvmsg_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_RECVMSG_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp
new file mode 100644
index 00000000000..2f57dae920d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp
@@ -0,0 +1,191 @@
+//
+// detail/io_uring_socket_send_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_SEND_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SEND_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class io_uring_socket_send_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_send_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_send_op_base::do_prepare,
+ &io_uring_socket_send_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_send_op_base* o(
+ static_cast<io_uring_socket_send_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->socket_, POLLOUT);
+ }
+ else if (o->bufs_.is_single_buffer
+ && o->bufs_.is_registered_buffer && o->flags_ == 0)
+ {
+ ::io_uring_prep_write_fixed(sqe, o->socket_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_sendmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_send_op_base* o(
+ static_cast<io_uring_socket_send_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return socket_ops::non_blocking_send1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ return socket_ops::non_blocking_send(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::const_buffer, ConstBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_socket_send_op
+ : public io_uring_socket_send_op_base<ConstBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_send_op);
+
+ io_uring_socket_send_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_send_op_base<ConstBufferSequence>(success_ec,
+ socket, state, buffers, flags, &io_uring_socket_send_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_send_op* o
+ (static_cast<io_uring_socket_send_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SEND_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp
new file mode 100644
index 00000000000..1866938a4b4
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp
@@ -0,0 +1,194 @@
+//
+// detail/io_uring_socket_sendto_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_SENDTO_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SENDTO_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence, typename Endpoint>
+class io_uring_socket_sendto_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_sendto_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, const Endpoint& endpoint,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_sendto_op_base::do_prepare,
+ &io_uring_socket_sendto_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ destination_(endpoint),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ msghdr_.msg_name = static_cast<sockaddr*>(
+ static_cast<void*>(destination_.data()));
+ msghdr_.msg_namelen = destination_.size();
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_sendto_op_base* o(
+ static_cast<io_uring_socket_sendto_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->socket_, POLLOUT);
+ }
+ else
+ {
+ ::io_uring_prep_sendmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_sendto_op_base* o(
+ static_cast<io_uring_socket_sendto_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return socket_ops::non_blocking_sendto1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ o->destination_.data(), o->destination_.size(),
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ return socket_ops::non_blocking_sendto(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ o->destination_.data(), o->destination_.size(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ Endpoint destination_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::const_buffer, ConstBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename ConstBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_sendto_op
+ : public io_uring_socket_sendto_op_base<ConstBufferSequence, Endpoint>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_sendto_op);
+
+ io_uring_socket_sendto_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, const Endpoint& endpoint,
+ socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_sendto_op_base<ConstBufferSequence, Endpoint>(
+ success_ec, socket, state, buffers, endpoint, flags,
+ &io_uring_socket_sendto_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_sendto_op* o
+ (static_cast<io_uring_socket_sendto_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SENDTO_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp
new file mode 100644
index 00000000000..3daa22ef797
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp
@@ -0,0 +1,629 @@
+//
+// detail/io_uring_socket_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/buffer.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/socket_base.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/io_uring_null_buffers_op.hpp"
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/io_uring_socket_accept_op.hpp"
+#include "asio/detail/io_uring_socket_connect_op.hpp"
+#include "asio/detail/io_uring_socket_recvfrom_op.hpp"
+#include "asio/detail/io_uring_socket_sendto_op.hpp"
+#include "asio/detail/io_uring_socket_service_base.hpp"
+#include "asio/detail/socket_holder.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/socket_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class io_uring_socket_service :
+ public execution_context_service_base<io_uring_socket_service<Protocol>>,
+ public io_uring_socket_service_base
+{
+public:
+ // The protocol type.
+ typedef Protocol protocol_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The native type of a socket.
+ typedef socket_type native_handle_type;
+
+ // The implementation type of the socket.
+ struct implementation_type :
+ io_uring_socket_service_base::base_implementation_type
+ {
+ // Default constructor.
+ implementation_type()
+ : protocol_(endpoint_type().protocol())
+ {
+ }
+
+ // The protocol associated with the socket.
+ protocol_type protocol_;
+ };
+
+ // Constructor.
+ io_uring_socket_service(execution_context& context)
+ : execution_context_service_base<
+ io_uring_socket_service<Protocol>>(context),
+ io_uring_socket_service_base(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ this->base_shutdown();
+ }
+
+ // Move-construct a new socket implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl) noexcept
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-assign from another socket implementation.
+ void move_assign(implementation_type& impl,
+ io_uring_socket_service_base& other_service,
+ implementation_type& other_impl)
+ {
+ this->base_move_assign(impl, other_service, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-construct a new socket implementation from another protocol type.
+ template <typename Protocol1>
+ void converting_move_construct(implementation_type& impl,
+ io_uring_socket_service<Protocol1>&,
+ typename io_uring_socket_service<
+ Protocol1>::implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = protocol_type(other_impl.protocol_);
+ other_impl.protocol_ = typename Protocol1::endpoint().protocol();
+ }
+
+ // Open a new socket implementation.
+ asio::error_code open(implementation_type& impl,
+ const protocol_type& protocol, asio::error_code& ec)
+ {
+ if (!do_open(impl, protocol.family(),
+ protocol.type(), protocol.protocol(), ec))
+ impl.protocol_ = protocol;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Assign a native socket to a socket implementation.
+ asio::error_code assign(implementation_type& impl,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ asio::error_code& ec)
+ {
+ if (!do_assign(impl, protocol.type(), native_socket, ec))
+ impl.protocol_ = protocol;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Get the native socket representation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Bind the socket to the specified local endpoint.
+ asio::error_code bind(implementation_type& impl,
+ const endpoint_type& endpoint, asio::error_code& ec)
+ {
+ socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ asio::error_code set_option(implementation_type& impl,
+ const Option& option, asio::error_code& ec)
+ {
+ socket_ops::setsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), option.size(impl.protocol_), ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ asio::error_code get_option(const implementation_type& impl,
+ Option& option, asio::error_code& ec) const
+ {
+ std::size_t size = option.size(impl.protocol_);
+ socket_ops::getsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), &size, ec);
+ if (!ec)
+ option.resize(impl.protocol_, size);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Get the local endpoint.
+ endpoint_type local_endpoint(const implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return endpoint_type();
+ }
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Get the remote endpoint.
+ endpoint_type remote_endpoint(const implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getpeername(impl.socket_,
+ endpoint.data(), &addr_len, false, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return endpoint_type();
+ }
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Disable sends or receives on the socket.
+ asio::error_code shutdown(base_implementation_type& impl,
+ socket_base::shutdown_type what, asio::error_code& ec)
+ {
+ socket_ops::shutdown(impl.socket_, what, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Send a datagram to the specified endpoint. Returns the number of bytes
+ // sent.
+ template <typename ConstBufferSequence>
+ size_t send_to(implementation_type& impl, const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = socket_ops::sync_sendto1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags,
+ destination.data(), destination.size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ n = socket_ops::sync_sendto(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags,
+ destination.data(), destination.size(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_sendto_op<ConstBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ buffers, destination, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_send_to"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, POLLOUT, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_send_to(null_buffers)"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive a datagram with the endpoint of the sender. Returns the number of
+ // bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ std::size_t addr_len = sender_endpoint.capacity();
+ std::size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = socket_ops::sync_recvfrom1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(), bufs_type::first(buffers).size(),
+ flags, sender_endpoint.data(), &addr_len, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ n = socket_ops::sync_recvfrom(impl.socket_, impl.state_, bufs.buffers(),
+ bufs.count(), flags, sender_endpoint.data(), &addr_len, ec);
+ }
+
+ if (!ec)
+ sender_endpoint.resize(addr_len);
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags,
+ asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received and
+ // the sender_endpoint object must both be valid for the lifetime of the
+ // asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type = (flags & socket_base::message_out_of_band)
+ ? io_uring_service::except_op : io_uring_service::read_op;
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_recvfrom_op<MutableBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ buffers, sender_endpoint, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive_from"));
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type;
+ int poll_flags;
+ if ((flags & socket_base::message_out_of_band) != 0)
+ {
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI;
+ }
+ else
+ {
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ }
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_from(null_buffers)"));
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Accept a new connection.
+ template <typename Socket>
+ asio::error_code accept(implementation_type& impl,
+ Socket& peer, endpoint_type* peer_endpoint, asio::error_code& ec)
+ {
+ // We cannot accept a socket that is already open.
+ if (peer.is_open())
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
+ socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
+ impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
+ peer_endpoint ? &addr_len : 0, ec));
+
+ // On success, assign new connection to peer socket object.
+ if (new_socket.get() != invalid_socket)
+ {
+ if (peer_endpoint)
+ peer_endpoint->resize(addr_len);
+ peer.assign(impl.protocol_, new_socket.get(), ec);
+ if (!ec)
+ new_socket.release();
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Start an asynchronous accept. The peer and peer_endpoint objects must be
+ // valid until the accept's handler is invoked.
+ template <typename Socket, typename Handler, typename IoExecutor>
+ void async_accept(implementation_type& impl, Socket& peer,
+ endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_accept_op<Socket, Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ peer, impl.protocol_, peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected() && !peer.is_open())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, p.p, is_continuation, peer.is_open());
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous accept. The peer_endpoint object must be valid until
+ // the accept's handler is invoked.
+ template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
+ void async_move_accept(implementation_type& impl,
+ const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_move_accept_op<Protocol,
+ PeerIoExecutor, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, peer_io_ex, impl.socket_,
+ impl.state_, impl.protocol_, peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Connect the socket to the specified endpoint.
+ asio::error_code connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint, asio::error_code& ec)
+ {
+ socket_ops::sync_connect(impl.socket_,
+ peer_endpoint.data(), peer_endpoint.size(), ec);
+ return ec;
+ }
+
+ // Start an asynchronous connect.
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_connect_op<Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_connect"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp
new file mode 100644
index 00000000000..99b075c9fe5
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp
@@ -0,0 +1,663 @@
+//
+// detail/io_uring_socket_service_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_SOCKET_SERVICE_BASE_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SERVICE_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/buffer.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/socket_base.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/io_uring_null_buffers_op.hpp"
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/io_uring_socket_recv_op.hpp"
+#include "asio/detail/io_uring_socket_recvmsg_op.hpp"
+#include "asio/detail/io_uring_socket_send_op.hpp"
+#include "asio/detail/io_uring_wait_op.hpp"
+#include "asio/detail/socket_holder.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/socket_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_socket_service_base
+{
+public:
+ // The native type of a socket.
+ typedef socket_type native_handle_type;
+
+ // The implementation type of the socket.
+ struct base_implementation_type
+ {
+ // The native socket representation.
+ socket_type socket_;
+
+ // The current state of the socket.
+ socket_ops::state_type state_;
+
+ // Per I/O object data used by the io_uring_service.
+ io_uring_service::per_io_object_data io_object_data_;
+ };
+
+ // Constructor.
+ ASIO_DECL io_uring_socket_service_base(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void base_shutdown();
+
+ // Construct a new socket implementation.
+ ASIO_DECL void construct(base_implementation_type& impl);
+
+ // Move-construct a new socket implementation.
+ ASIO_DECL void base_move_construct(base_implementation_type& impl,
+ base_implementation_type& other_impl) noexcept;
+
+ // Move-assign from another socket implementation.
+ ASIO_DECL void base_move_assign(base_implementation_type& impl,
+ io_uring_socket_service_base& other_service,
+ base_implementation_type& other_impl);
+
+ // Destroy a socket implementation.
+ ASIO_DECL void destroy(base_implementation_type& impl);
+
+ // Determine whether the socket is open.
+ bool is_open(const base_implementation_type& impl) const
+ {
+ return impl.socket_ != invalid_socket;
+ }
+
+ // Destroy a socket implementation.
+ ASIO_DECL asio::error_code close(
+ base_implementation_type& impl, asio::error_code& ec);
+
+ // Release ownership of the socket.
+ ASIO_DECL socket_type release(
+ base_implementation_type& impl, asio::error_code& ec);
+
+ // Get the native socket representation.
+ native_handle_type native_handle(base_implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Cancel all operations associated with the socket.
+ ASIO_DECL asio::error_code cancel(
+ base_implementation_type& impl, asio::error_code& ec);
+
+ // Determine whether the socket is at the out-of-band data mark.
+ bool at_mark(const base_implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ return socket_ops::sockatmark(impl.socket_, ec);
+ }
+
+ // Determine the number of bytes available for reading.
+ std::size_t available(const base_implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ return socket_ops::available(impl.socket_, ec);
+ }
+
+ // Place the socket into the state where it will listen for new connections.
+ asio::error_code listen(base_implementation_type& impl,
+ int backlog, asio::error_code& ec)
+ {
+ socket_ops::listen(impl.socket_, backlog, ec);
+ return ec;
+ }
+
+ // Perform an IO control command on the socket.
+ template <typename IO_Control_Command>
+ asio::error_code io_control(base_implementation_type& impl,
+ IO_Control_Command& command, asio::error_code& ec)
+ {
+ socket_ops::ioctl(impl.socket_, impl.state_, command.name(),
+ static_cast<ioctl_arg_type*>(command.data()), ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the socket.
+ bool non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the socket.
+ asio::error_code non_blocking(base_implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native socket implementation.
+ bool native_non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native socket implementation.
+ asio::error_code native_non_blocking(base_implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Wait for the socket to become ready to read, ready to write, or to have
+ // pending error conditions.
+ asio::error_code wait(base_implementation_type& impl,
+ socket_base::wait_type w, asio::error_code& ec)
+ {
+ switch (w)
+ {
+ case socket_base::wait_read:
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_write:
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_error:
+ socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
+ break;
+ default:
+ ec = asio::error::invalid_argument;
+ break;
+ }
+
+ return ec;
+ }
+
+ // Asynchronously wait for the socket to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(base_implementation_type& impl,
+ socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ int op_type;
+ int poll_flags;
+ switch (w)
+ {
+ case socket_base::wait_read:
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ break;
+ case socket_base::wait_write:
+ op_type = io_uring_service::write_op;
+ poll_flags = POLLOUT;
+ break;
+ case socket_base::wait_error:
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI | POLLERR | POLLHUP;
+ break;
+ default:
+ op_type = -1;
+ poll_flags = -1;
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ poll_flags, handler, io_ex);
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_wait"));
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ start_op(impl, op_type, p.p, is_continuation, op_type == -1);
+ p.v = p.p = 0;
+ }
+
+ // Send the given data to the peer.
+ template <typename ConstBufferSequence>
+ size_t send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ if (bufs_type::is_single_buffer)
+ {
+ return socket_ops::sync_send1(impl.socket_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ return socket_ops::sync_send(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ impl.state_, buffers, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_send"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation,
+ ((impl.state_ & socket_ops::stream_oriented)
+ && buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers)));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, POLLOUT, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_send(null_buffers)"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data from the peer. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ if (bufs_type::is_single_buffer)
+ {
+ return socket_ops::sync_recv1(impl.socket_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ return socket_ops::sync_recv(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type = (flags & socket_base::message_out_of_band)
+ ? io_uring_service::except_op : io_uring_service::read_op;
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_recv_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ impl.state_, buffers, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive"));
+
+ start_op(impl, op_type, p.p, is_continuation,
+ ((impl.state_ & socket_ops::stream_oriented)
+ && buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers)));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type;
+ int poll_flags;
+ if ((flags & socket_base::message_out_of_band) != 0)
+ {
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI;
+ }
+ else
+ {
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ }
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive(null_buffers)"));
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data with associated flags. Returns the number of bytes
+ // received.
+ template <typename MutableBufferSequence>
+ size_t receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, asio::error_code& ec)
+ {
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_recvmsg(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), in_flags, out_flags, ec);
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags,
+ socket_base::message_flags& out_flags, asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type = (in_flags & socket_base::message_out_of_band)
+ ? io_uring_service::except_op : io_uring_service::read_op;
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_recvmsg_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ buffers, in_flags, out_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive_with_flags"));
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type;
+ int poll_flags;
+ if ((in_flags & socket_base::message_out_of_band) != 0)
+ {
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI;
+ }
+ else
+ {
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ }
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+protected:
+ // Open a new socket implementation.
+ ASIO_DECL asio::error_code do_open(
+ base_implementation_type& impl, int af,
+ int type, int protocol, asio::error_code& ec);
+
+ // Assign a native socket to a socket implementation.
+ ASIO_DECL asio::error_code do_assign(
+ base_implementation_type& impl, int type,
+ const native_handle_type& native_socket, asio::error_code& ec);
+
+ // Start the asynchronous read or write operation.
+ ASIO_DECL void start_op(base_implementation_type& impl, int op_type,
+ io_uring_operation* op, bool is_continuation, bool noop);
+
+ // Start the asynchronous accept operation.
+ ASIO_DECL void start_accept_op(base_implementation_type& impl,
+ io_uring_operation* op, bool is_continuation, bool peer_is_open);
+
+ // Helper class used to implement per-operation cancellation
+ class io_uring_op_cancellation
+ {
+ public:
+ io_uring_op_cancellation(io_uring_service* s,
+ io_uring_service::per_io_object_data* p, int o)
+ : io_uring_service_(s),
+ io_object_data_(p),
+ op_type_(o)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ io_uring_service_->cancel_ops_by_key(*io_object_data_, op_type_, this);
+ }
+ }
+
+ private:
+ io_uring_service* io_uring_service_;
+ io_uring_service::per_io_object_data* io_object_data_;
+ int op_type_;
+ };
+
+ // The io_uring_service that performs event demultiplexing for the service.
+ io_uring_service& io_uring_service_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_socket_service_base.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SERVICE_BASE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp
new file mode 100644
index 00000000000..4dec72ce42c
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp
@@ -0,0 +1,112 @@
+//
+// detail/io_uring_wait_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IO_URING_WAIT_OP_HPP
+#define ASIO_DETAIL_IO_URING_WAIT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class io_uring_wait_op : public io_uring_operation
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_wait_op);
+
+ io_uring_wait_op(const asio::error_code& success_ec, int descriptor,
+ int poll_flags, Handler& handler, const IoExecutor& io_ex)
+ : io_uring_operation(success_ec, &io_uring_wait_op::do_prepare,
+ &io_uring_wait_op::do_perform, &io_uring_wait_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex),
+ descriptor_(descriptor),
+ poll_flags_(poll_flags)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_wait_op* o(static_cast<io_uring_wait_op*>(base));
+
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, o->poll_flags_);
+ }
+
+ static bool do_perform(io_uring_operation*, bool after_completion)
+ {
+ return after_completion;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_wait_op* o(static_cast<io_uring_wait_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+ int descriptor_;
+ int poll_flags_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IO_URING_WAIT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp b/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp
index 95f29c503fd..c64e7b16824 100644
--- a/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp
+++ b/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp
@@ -2,7 +2,7 @@
// detail/is_buffer_sequence.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,6 +24,8 @@ namespace asio {
class mutable_buffer;
class const_buffer;
+class mutable_registered_buffer;
+class const_registered_buffer;
namespace detail {
@@ -38,6 +40,8 @@ struct buffer_sequence_memfns_base
void prepare();
void commit();
void consume();
+ void grow();
+ void shrink();
};
template <typename T>
@@ -52,22 +56,22 @@ struct buffer_sequence_memfns_check
};
template <typename>
-char (&begin_memfn_helper(...))[2];
+char buffer_sequence_begin_helper(...);
template <typename T>
-char begin_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::begin>*);
+char (&buffer_sequence_begin_helper(T* t,
+ enable_if_t<!is_same<
+ decltype(asio::buffer_sequence_begin(*t)),
+ void>::value>*))[2];
template <typename>
-char (&end_memfn_helper(...))[2];
+char buffer_sequence_end_helper(...);
template <typename T>
-char end_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::end>*);
+char (&buffer_sequence_end_helper(T* t,
+ enable_if_t<!is_same<
+ decltype(asio::buffer_sequence_end(*t)),
+ void>::value>*))[2];
template <typename>
char (&size_memfn_helper(...))[2];
@@ -112,7 +116,7 @@ template <typename T>
char prepare_memfn_helper(
buffer_sequence_memfns_check<
void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::data>*);
+ &buffer_sequence_memfns_derived<T>::prepare>*);
template <typename>
char (&commit_memfn_helper(...))[2];
@@ -132,26 +136,32 @@ char consume_memfn_helper(
void (buffer_sequence_memfns_base::*)(),
&buffer_sequence_memfns_derived<T>::consume>*);
-template <typename, typename>
-char (&buffer_element_type_helper(...))[2];
+template <typename>
+char (&grow_memfn_helper(...))[2];
-#if defined(ASIO_HAS_DECL_TYPE)
+template <typename T>
+char grow_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::grow>*);
-template <typename T, typename Buffer>
-char buffer_element_type_helper(T* t,
- typename enable_if<is_convertible<
- decltype(*buffer_sequence_begin(*t)),
- Buffer>::value>::type*);
+template <typename>
+char (&shrink_memfn_helper(...))[2];
+
+template <typename T>
+char shrink_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::shrink>*);
-#else // defined(ASIO_HAS_DECL_TYPE)
+template <typename, typename>
+char (&buffer_sequence_element_type_helper(...))[2];
template <typename T, typename Buffer>
-char buffer_element_type_helper(
- typename T::const_iterator*,
- typename enable_if<is_convertible<
- typename T::value_type, Buffer>::value>::type*);
-
-#endif // defined(ASIO_HAS_DECL_TYPE)
+char buffer_sequence_element_type_helper(T* t,
+ enable_if_t<is_convertible<
+ decltype(*asio::buffer_sequence_begin(*t)),
+ Buffer>::value>*);
template <typename>
char (&const_buffers_type_typedef_helper(...))[2];
@@ -170,9 +180,9 @@ char mutable_buffers_type_typedef_helper(
template <typename T, typename Buffer>
struct is_buffer_sequence_class
: integral_constant<bool,
- sizeof(begin_memfn_helper<T>(0)) != 1 &&
- sizeof(end_memfn_helper<T>(0)) != 1 &&
- sizeof(buffer_element_type_helper<T, Buffer>(0, 0)) == 1>
+ sizeof(buffer_sequence_begin_helper<T>(0, 0)) != 1 &&
+ sizeof(buffer_sequence_end_helper<T>(0, 0)) != 1 &&
+ sizeof(buffer_sequence_element_type_helper<T, Buffer>(0, 0)) == 1>
{
};
@@ -208,8 +218,32 @@ struct is_buffer_sequence<const_buffer, mutable_buffer>
{
};
+template <>
+struct is_buffer_sequence<mutable_registered_buffer, mutable_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<mutable_registered_buffer, const_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_registered_buffer, const_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_registered_buffer, mutable_buffer>
+ : false_type
+{
+};
+
template <typename T>
-struct is_dynamic_buffer_class
+struct is_dynamic_buffer_class_v1
: integral_constant<bool,
sizeof(size_memfn_helper<T>(0)) != 1 &&
sizeof(max_size_memfn_helper<T>(0)) != 1 &&
@@ -224,9 +258,32 @@ struct is_dynamic_buffer_class
};
template <typename T>
-struct is_dynamic_buffer
+struct is_dynamic_buffer_v1
+ : conditional<is_class<T>::value,
+ is_dynamic_buffer_class_v1<T>,
+ false_type>::type
+{
+};
+
+template <typename T>
+struct is_dynamic_buffer_class_v2
+ : integral_constant<bool,
+ sizeof(size_memfn_helper<T>(0)) != 1 &&
+ sizeof(max_size_memfn_helper<T>(0)) != 1 &&
+ sizeof(capacity_memfn_helper<T>(0)) != 1 &&
+ sizeof(data_memfn_helper<T>(0)) != 1 &&
+ sizeof(consume_memfn_helper<T>(0)) != 1 &&
+ sizeof(grow_memfn_helper<T>(0)) != 1 &&
+ sizeof(shrink_memfn_helper<T>(0)) != 1 &&
+ sizeof(const_buffers_type_typedef_helper<T>(0)) == 1 &&
+ sizeof(mutable_buffers_type_typedef_helper<T>(0)) == 1>
+{
+};
+
+template <typename T>
+struct is_dynamic_buffer_v2
: conditional<is_class<T>::value,
- is_dynamic_buffer_class<T>,
+ is_dynamic_buffer_class_v2<T>,
false_type>::type
{
};
diff --git a/3rdparty/asio/include/asio/detail/is_executor.hpp b/3rdparty/asio/include/asio/detail/is_executor.hpp
index ec0ee001bbc..2636f9c66f3 100644
--- a/3rdparty/asio/include/asio/detail/is_executor.hpp
+++ b/3rdparty/asio/include/asio/detail/is_executor.hpp
@@ -2,7 +2,7 @@
// detail/is_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp
index c1f9b93131d..2e42df8b358 100644
--- a/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/keyword_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp b/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp
index 8d1c66737d5..f034410d6d5 100644
--- a/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
// detail/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -24,11 +24,12 @@
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
+#include "asio/detail/conditionally_enabled_mutex.hpp"
#include "asio/detail/limits.hpp"
-#include "asio/detail/mutex.hpp"
#include "asio/detail/object_pool.hpp"
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -50,7 +51,8 @@ namespace detail {
class scheduler;
class kqueue_reactor
- : public execution_context_service_base<kqueue_reactor>
+ : public execution_context_service_base<kqueue_reactor>,
+ public scheduler_task
{
private:
// The mutex type used by this reactor.
@@ -114,16 +116,30 @@ public:
per_descriptor_data& source_descriptor_data);
// 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(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative);
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &kqueue_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
@@ -131,15 +147,30 @@ public:
ASIO_DECL void cancel_ops(socket_type descriptor,
per_descriptor_data& 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& 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);
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ ASIO_DECL void cleanup_descriptor_data(
+ per_descriptor_data& descriptor_data);
+
// Add a new timer queue to the reactor.
template <typename Time_Traits>
void add_timer_queue(timer_queue<Time_Traits>& queue);
@@ -162,6 +193,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,
diff --git a/3rdparty/asio/include/asio/detail/limits.hpp b/3rdparty/asio/include/asio/detail/limits.hpp
index d32470d2d35..323af22b300 100644
--- a/3rdparty/asio/include/asio/detail/limits.hpp
+++ b/3rdparty/asio/include/asio/detail/limits.hpp
@@ -16,11 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_BOOST_LIMITS)
-# include <boost/limits.hpp>
-#else // defined(ASIO_HAS_BOOST_LIMITS)
-# include <limits>
-#endif // defined(ASIO_HAS_BOOST_LIMITS)
+#include <limits>
#endif // ASIO_DETAIL_LIMITS_HPP
diff --git a/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp b/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp
index a0ea47cceff..212f9c1bcd2 100644
--- a/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp
+++ b/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp
@@ -2,7 +2,7 @@
// detail/local_free_on_block_exit.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/macos_fenced_block.hpp b/3rdparty/asio/include/asio/detail/macos_fenced_block.hpp
deleted file mode 100644
index e44b900bbda..00000000000
--- a/3rdparty/asio/include/asio/detail/macos_fenced_block.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// detail/macos_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__MACH__) && defined(__APPLE__)
-
-#include <libkern/OSAtomic.h>
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class macos_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit macos_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit macos_fenced_block(full_t)
- {
- OSMemoryBarrier();
- }
-
- // Destructor.
- ~macos_fenced_block()
- {
- OSMemoryBarrier();
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__MACH__) && defined(__APPLE__)
-
-#endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/memory.hpp b/3rdparty/asio/include/asio/detail/memory.hpp
index 51f45329b62..173e49fe065 100644
--- a/3rdparty/asio/include/asio/detail/memory.hpp
+++ b/3rdparty/asio/include/asio/detail/memory.hpp
@@ -2,7 +2,7 @@
// detail/memory.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,37 +16,49 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <cstddef>
+#include <cstdlib>
#include <memory>
+#include <new>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/throw_exception.hpp"
-#if !defined(ASIO_HAS_STD_SHARED_PTR)
-# include <boost/shared_ptr.hpp>
-# include <boost/weak_ptr.hpp>
-#endif // !defined(ASIO_HAS_STD_SHARED_PTR)
-
-#if !defined(ASIO_HAS_STD_ADDRESSOF)
-# include <boost/utility/addressof.hpp>
-#endif // !defined(ASIO_HAS_STD_ADDRESSOF)
+#if !defined(ASIO_HAS_STD_ALIGNED_ALLOC) \
+ && defined(ASIO_HAS_BOOST_ALIGN)
+# include <boost/align/aligned_alloc.hpp>
+#endif // !defined(ASIO_HAS_STD_ALIGNED_ALLOC)
+ // && defined(ASIO_HAS_BOOST_ALIGN)
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_STD_SHARED_PTR)
+using std::allocate_shared;
+using std::make_shared;
using std::shared_ptr;
using std::weak_ptr;
-#else // defined(ASIO_HAS_STD_SHARED_PTR)
-using boost::shared_ptr;
-using boost::weak_ptr;
-#endif // defined(ASIO_HAS_STD_SHARED_PTR)
-
-#if defined(ASIO_HAS_STD_ADDRESSOF)
using std::addressof;
-#else // defined(ASIO_HAS_STD_ADDRESSOF)
-using boost::addressof;
-#endif // defined(ASIO_HAS_STD_ADDRESSOF)
+
+#if defined(ASIO_HAS_STD_TO_ADDRESS)
+using std::to_address;
+#else // defined(ASIO_HAS_STD_TO_ADDRESS)
+template <typename T>
+inline T* to_address(T* p) { return p; }
+template <typename T>
+inline const T* to_address(const T* p) { return p; }
+template <typename T>
+inline volatile T* to_address(volatile T* p) { return p; }
+template <typename T>
+inline const volatile T* to_address(const volatile T* p) { return p; }
+#endif // defined(ASIO_HAS_STD_TO_ADDRESS)
+
+inline void* align(std::size_t alignment,
+ std::size_t size, void*& ptr, std::size_t& space)
+{
+ return std::align(alignment, size, ptr, space);
+}
} // namespace detail
-#if defined(ASIO_HAS_NULLPTR)
using std::allocator_arg_t;
# define ASIO_USES_ALLOCATOR(t) \
namespace std { \
@@ -54,10 +66,60 @@ using std::allocator_arg_t;
struct uses_allocator<t, Allocator> : true_type {}; \
} \
/**/
-#else // defined(ASIO_HAS_NULLPTR)
-struct allocator_arg_t {};
-# define ASIO_USES_ALLOCATOR(t)
-#endif // defined(ASIO_HAS_NULLPTR)
+# define ASIO_REBIND_ALLOC(alloc, t) \
+ typename std::allocator_traits<alloc>::template rebind_alloc<t>
+ /**/
+
+inline void* aligned_new(std::size_t align, std::size_t size)
+{
+#if defined(ASIO_HAS_STD_ALIGNED_ALLOC)
+ align = (align < ASIO_DEFAULT_ALIGN) ? ASIO_DEFAULT_ALIGN : align;
+ size = (size % align == 0) ? size : size + (align - size % align);
+ void* ptr = std::aligned_alloc(align, size);
+ if (!ptr)
+ {
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ }
+ return ptr;
+#elif defined(ASIO_HAS_BOOST_ALIGN)
+ align = (align < ASIO_DEFAULT_ALIGN) ? ASIO_DEFAULT_ALIGN : align;
+ size = (size % align == 0) ? size : size + (align - size % align);
+ void* ptr = boost::alignment::aligned_alloc(align, size);
+ if (!ptr)
+ {
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ }
+ return ptr;
+#elif defined(ASIO_MSVC)
+ align = (align < ASIO_DEFAULT_ALIGN) ? ASIO_DEFAULT_ALIGN : align;
+ size = (size % align == 0) ? size : size + (align - size % align);
+ void* ptr = _aligned_malloc(size, align);
+ if (!ptr)
+ {
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ }
+ return ptr;
+#else // defined(ASIO_MSVC)
+ (void)align;
+ return ::operator new(size);
+#endif // defined(ASIO_MSVC)
+}
+
+inline void aligned_delete(void* ptr)
+{
+#if defined(ASIO_HAS_STD_ALIGNED_ALLOC)
+ std::free(ptr);
+#elif defined(ASIO_HAS_BOOST_ALIGN)
+ boost::alignment::aligned_free(ptr);
+#elif defined(ASIO_MSVC)
+ _aligned_free(ptr);
+#else // defined(ASIO_MSVC)
+ ::operator delete(ptr);
+#endif // defined(ASIO_MSVC)
+}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/mutex.hpp b/3rdparty/asio/include/asio/detail/mutex.hpp
index 9821e818093..e701c238296 100644
--- a/3rdparty/asio/include/asio/detail/mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/mutex.hpp
@@ -2,7 +2,7 @@
// detail/mutex.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_mutex.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_mutex.hpp"
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include "asio/detail/std_mutex.hpp"
#else
-# error Only Windows, POSIX and std::mutex are supported!
+# include "asio/detail/std_mutex.hpp"
#endif
namespace asio {
@@ -38,7 +36,7 @@ typedef null_mutex mutex;
typedef win_mutex mutex;
#elif defined(ASIO_HAS_PTHREADS)
typedef posix_mutex mutex;
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+#else
typedef std_mutex mutex;
#endif
diff --git a/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp b/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp
new file mode 100644
index 00000000000..940bf251b71
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp
@@ -0,0 +1,43 @@
+//
+// detail/non_const_lvalue.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_NON_CONST_LVALUE_HPP
+#define ASIO_DETAIL_NON_CONST_LVALUE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct non_const_lvalue
+{
+ explicit non_const_lvalue(T& t)
+ : value(static_cast<conditional_t<
+ is_same<T, decay_t<T>>::value, decay_t<T>&, T&&>>(t))
+ {
+ }
+
+ conditional_t<is_same<T, decay_t<T>>::value, decay_t<T>&, decay_t<T>> value;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_NON_CONST_LVALUE_HPP
diff --git a/3rdparty/asio/include/asio/detail/noncopyable.hpp b/3rdparty/asio/include/asio/detail/noncopyable.hpp
index 31f646a5655..7b80a89457a 100644
--- a/3rdparty/asio/include/asio/detail/noncopyable.hpp
+++ b/3rdparty/asio/include/asio/detail/noncopyable.hpp
@@ -2,7 +2,7 @@
// detail/noncopyable.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/null_event.hpp b/3rdparty/asio/include/asio/detail/null_event.hpp
index 465a701123b..d50724c9e5b 100644
--- a/3rdparty/asio/include/asio/detail/null_event.hpp
+++ b/3rdparty/asio/include/asio/detail/null_event.hpp
@@ -2,7 +2,7 @@
// detail/null_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -55,6 +55,12 @@ public:
{
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ template <typename Lock>
+ void unlock_and_signal_one_for_destruction(Lock&)
+ {
+ }
+
// If there's a waiter, unlock the mutex and signal it.
template <typename Lock>
bool maybe_unlock_and_signal_one(Lock&)
diff --git a/3rdparty/asio/include/asio/detail/null_fenced_block.hpp b/3rdparty/asio/include/asio/detail/null_fenced_block.hpp
index 2ec3554d001..ccf65c3ca78 100644
--- a/3rdparty/asio/include/asio/detail/null_fenced_block.hpp
+++ b/3rdparty/asio/include/asio/detail/null_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/null_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/null_global.hpp b/3rdparty/asio/include/asio/detail/null_global.hpp
index 7d3c0dfb03b..ab8b9c87e61 100644
--- a/3rdparty/asio/include/asio/detail/null_global.hpp
+++ b/3rdparty/asio/include/asio/detail/null_global.hpp
@@ -2,7 +2,7 @@
// detail/null_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/null_mutex.hpp b/3rdparty/asio/include/asio/detail/null_mutex.hpp
index 582ab1dc70d..77e759473f5 100644
--- a/3rdparty/asio/include/asio/detail/null_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/null_mutex.hpp
@@ -2,7 +2,7 @@
// detail/null_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,8 +17,6 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_HAS_THREADS)
-
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/scoped_lock.hpp"
@@ -59,6 +57,4 @@ public:
#include "asio/detail/pop_options.hpp"
-#endif // !defined(ASIO_HAS_THREADS)
-
#endif // ASIO_DETAIL_NULL_MUTEX_HPP
diff --git a/3rdparty/asio/include/asio/detail/null_reactor.hpp b/3rdparty/asio/include/asio/detail/null_reactor.hpp
index 3b6f1d47705..128f2b45329 100644
--- a/3rdparty/asio/include/asio/detail/null_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/null_reactor.hpp
@@ -2,7 +2,7 @@
// detail/null_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,9 +17,12 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+#if defined(ASIO_HAS_IOCP) \
+ || defined(ASIO_WINDOWS_RUNTIME) \
+ || defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/scheduler_operation.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/execution_context.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,9 +31,14 @@ namespace asio {
namespace detail {
class null_reactor
- : public execution_context_service_base<null_reactor>
+ : public execution_context_service_base<null_reactor>,
+ public scheduler_task
{
public:
+ struct per_descriptor_data
+ {
+ };
+
// Constructor.
null_reactor(asio::execution_context& ctx)
: execution_context_service_base<null_reactor>(ctx)
@@ -42,6 +50,11 @@ public:
{
}
+ // Initialise the task.
+ void init_task()
+ {
+ }
+
// Destroy all user-defined handler objects owned by the service.
void shutdown()
{
@@ -63,6 +76,8 @@ public:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+#endif // defined(ASIO_HAS_IOCP)
+ // || defined(ASIO_WINDOWS_RUNTIME)
+ // || defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_NULL_REACTOR_HPP
diff --git a/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp b/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp
index 9992bd6653b..1c4030799fa 100644
--- a/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp
+++ b/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/null_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/null_socket_service.hpp b/3rdparty/asio/include/asio/detail/null_socket_service.hpp
index 59df013ca7c..84e21295f63 100644
--- a/3rdparty/asio/include/asio/detail/null_socket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/null_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/null_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,7 +21,8 @@
#include "asio/buffer.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/post.hpp"
#include "asio/socket_base.hpp"
#include "asio/detail/bind_handler.hpp"
@@ -32,7 +33,7 @@ namespace detail {
template <typename Protocol>
class null_socket_service :
- public service_base<null_socket_service<Protocol> >
+ public execution_context_service_base<null_socket_service<Protocol>>
{
public:
// The protocol type.
@@ -50,9 +51,8 @@ public:
};
// Constructor.
- null_socket_service(asio::io_context& io_context)
- : service_base<null_socket_service<Protocol> >(io_context),
- io_context_(io_context)
+ null_socket_service(execution_context& context)
+ : execution_context_service_base<null_socket_service<Protocol>>(context)
{
}
@@ -80,6 +80,7 @@ public:
// Move-construct a new socket implementation from another protocol type.
template <typename Protocol1>
void converting_move_construct(implementation_type&,
+ null_socket_service<Protocol1>&,
typename null_socket_service<Protocol1>::implementation_type&)
{
}
@@ -119,6 +120,14 @@ public:
return ec;
}
+ // Release ownership of the socket.
+ native_handle_type release(implementation_type&,
+ asio::error_code& ec)
+ {
+ ec = asio::error::operation_not_supported;
+ return 0;
+ }
+
// Get the native socket representation.
native_handle_type native_handle(implementation_type&)
{
@@ -263,23 +272,25 @@ public:
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send(implementation_type&, const ConstBufferSequence&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send(implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Receive some data from the peer. Returns the number of bytes received.
@@ -301,23 +312,26 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive(implementation_type&, const MutableBufferSequence&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Wait until data can be received without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_receive(implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Receive some data with associated flags. Returns the number of bytes
@@ -342,25 +356,28 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive_with_flags(implementation_type&,
const MutableBufferSequence&, socket_base::message_flags,
- socket_base::message_flags&, Handler& handler)
+ socket_base::message_flags&, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_with_flags(implementation_type&,
- const null_buffers&, socket_base::message_flags,
- socket_base::message_flags&, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_receive_with_flags(implementation_type&, const null_buffers&,
+ socket_base::message_flags, socket_base::message_flags&,
+ Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Send a datagram to the specified endpoint. Returns the number of bytes
@@ -385,24 +402,27 @@ public:
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send_to(implementation_type&, const ConstBufferSequence&,
const endpoint_type&, socket_base::message_flags,
Handler& handler)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send_to(implementation_type&, const null_buffers&,
- const endpoint_type&, socket_base::message_flags, Handler& handler)
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Receive a datagram with the endpoint of the sender. Returns the number of
@@ -428,25 +448,28 @@ public:
// Start an asynchronous receive. The buffer for the data being received and
// the sender_endpoint object must both be valid for the lifetime of the
// asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_receive_from(implementation_type&,
- const MutableBufferSequence&, endpoint_type&,
- socket_base::message_flags, Handler& handler)
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type&, const MutableBufferSequence&,
+ endpoint_type&, socket_base::message_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_from(implementation_type&,
- const null_buffers&, endpoint_type&,
- socket_base::message_flags, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type&, const null_buffers&,
+ endpoint_type&, socket_base::message_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.post(detail::bind_handler(handler, ec, bytes_transferred));
+ asio::post(io_ex, detail::bind_handler(
+ handler, ec, bytes_transferred));
}
// Accept a new connection.
@@ -460,12 +483,12 @@ public:
// Start an asynchronous accept. The peer and peer_endpoint objects
// must be valid until the accept's handler is invoked.
- template <typename Socket, typename Handler>
- void async_accept(implementation_type&, Socket&,
- endpoint_type*, Handler& handler)
+ template <typename Socket, typename Handler, typename IoExecutor>
+ void async_accept(implementation_type&, Socket&, endpoint_type*,
+ Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
- io_context_.post(detail::bind_handler(handler, ec));
+ asio::post(io_ex, detail::bind_handler(handler, ec));
}
// Connect the socket to the specified endpoint.
@@ -477,16 +500,13 @@ public:
}
// Start an asynchronous connect.
- template <typename Handler>
- void async_connect(implementation_type&,
- const endpoint_type&, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type&, const endpoint_type&,
+ Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
- io_context_.post(detail::bind_handler(handler, ec));
+ asio::post(io_ex, detail::bind_handler(handler, ec));
}
-
-private:
- asio::io_context& io_context_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/null_static_mutex.hpp b/3rdparty/asio/include/asio/detail/null_static_mutex.hpp
index ee301206354..15d649bb0da 100644
--- a/3rdparty/asio/include/asio/detail/null_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/null_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/null_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/null_thread.hpp b/3rdparty/asio/include/asio/detail/null_thread.hpp
index eb1753faa27..aca261671c5 100644
--- a/3rdparty/asio/include/asio/detail/null_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/null_thread.hpp
@@ -2,7 +2,7 @@
// detail/null_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp
index 5277ee5d155..cf64a2bcdda 100644
--- a/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/null_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/object_pool.hpp b/3rdparty/asio/include/asio/detail/object_pool.hpp
index 82a6dd7d158..41254ce52ee 100644
--- a/3rdparty/asio/include/asio/detail/object_pool.hpp
+++ b/3rdparty/asio/include/asio/detail/object_pool.hpp
@@ -2,7 +2,7 @@
// detail/object_pool.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp b/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp
index 9b34816ec1c..2c43c1dab80 100644
--- a/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp
+++ b/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp
@@ -2,7 +2,7 @@
// detail/old_win_sdk_compat.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/op_queue.hpp b/3rdparty/asio/include/asio/detail/op_queue.hpp
index 1ab40465143..db6335f40f6 100644
--- a/3rdparty/asio/include/asio/detail/op_queue.hpp
+++ b/3rdparty/asio/include/asio/detail/op_queue.hpp
@@ -2,7 +2,7 @@
// detail/op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -138,6 +138,12 @@ public:
return front_ == 0;
}
+ // Test whether an operation is already enqueued.
+ bool is_enqueued(Operation* o) const
+ {
+ return op_queue_access::next(o) != 0 || back_ == o;
+ }
+
private:
friend class op_queue_access;
diff --git a/3rdparty/asio/include/asio/detail/operation.hpp b/3rdparty/asio/include/asio/detail/operation.hpp
index 72144d6d881..8721f397a5c 100644
--- a/3rdparty/asio/include/asio/detail/operation.hpp
+++ b/3rdparty/asio/include/asio/detail/operation.hpp
@@ -2,7 +2,7 @@
// detail/operation.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp b/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp
index b339def0c6b..f7b219644e4 100644
--- a/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/pipe_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -43,7 +43,7 @@ public:
// Interrupt the select call.
ASIO_DECL void interrupt();
- // Reset the select interrupt. Returns true if the call was interrupted.
+ // Reset the select interrupter. Returns true if the reset was successful.
ASIO_DECL bool reset();
// Get the read descriptor to be passed to select.
diff --git a/3rdparty/asio/include/asio/detail/pop_options.hpp b/3rdparty/asio/include/asio/detail/pop_options.hpp
index 880121f63eb..93cdb5abb4d 100644
--- a/3rdparty/asio/include/asio/detail/pop_options.hpp
+++ b/3rdparty/asio/include/asio/detail/pop_options.hpp
@@ -2,7 +2,7 @@
// detail/pop_options.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,9 +24,15 @@
// Intel C++
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
+# if !defined(ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility pop
+# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma pop_macro ("emit")
+# pragma pop_macro ("signal")
+# pragma pop_macro ("slot")
+
#elif defined(__clang__)
// Clang
@@ -42,9 +48,17 @@
# endif
# if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
-# pragma GCC visibility pop
+# if !defined(ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility pop
+# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+# pragma GCC diagnostic pop
+
+# pragma pop_macro ("emit")
+# pragma pop_macro ("signal")
+# pragma pop_macro ("slot")
+
#elif defined(__GNUC__)
// GNU C++
@@ -64,9 +78,17 @@
# endif
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
+# if !defined(ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility pop
+# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC diagnostic pop
+
+# pragma pop_macro ("emit")
+# pragma pop_macro ("signal")
+# pragma pop_macro ("slot")
+
#elif defined(__KCC)
// Kai C++
@@ -83,7 +105,7 @@
// Greenhills C++
-#elif defined(__BORLANDC__)
+#elif defined(__BORLANDC__) && !defined(__clang__)
// Borland C++
@@ -128,4 +150,8 @@
# endif
# endif
+# pragma pop_macro ("emit")
+# pragma pop_macro ("signal")
+# pragma pop_macro ("slot")
+
#endif
diff --git a/3rdparty/asio/include/asio/detail/posix_event.hpp b/3rdparty/asio/include/asio/detail/posix_event.hpp
index 57ddc11ca08..0c83bd31a30 100644
--- a/3rdparty/asio/include/asio/detail/posix_event.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_event.hpp
@@ -2,7 +2,7 @@
// detail/posix_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#if defined(ASIO_HAS_PTHREADS)
+#include <cstddef>
#include <pthread.h>
#include "asio/detail/assert.hpp"
#include "asio/detail/noncopyable.hpp"
@@ -70,6 +71,18 @@ public:
::pthread_cond_signal(&cond_); // Ignore EINVAL.
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ template <typename Lock>
+ void unlock_and_signal_one_for_destruction(Lock& lock)
+ {
+ ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ if (have_waiters)
+ ::pthread_cond_signal(&cond_); // Ignore EINVAL.
+ lock.unlock();
+ }
+
// If there's a waiter, unlock the mutex and signal it.
template <typename Lock>
bool maybe_unlock_and_signal_one(Lock& lock)
@@ -116,22 +129,28 @@ public:
{
state_ += 2;
timespec ts;
-#if (defined(__MACH__) && defined(__APPLE__))
+#if (defined(__MACH__) && defined(__APPLE__)) \
+ || (defined(__ANDROID__) && (__ANDROID_API__ < 21) \
+ && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
ts.tv_sec = usec / 1000000;
ts.tv_nsec = (usec % 1000000) * 1000;
::pthread_cond_timedwait_relative_np(
&cond_, &lock.mutex().mutex_, &ts); // Ignore EINVAL.
#else // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)
+ // && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
if (::clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
{
ts.tv_sec += usec / 1000000;
- ts.tv_nsec = (usec % 1000000) * 1000;
+ ts.tv_nsec += (usec % 1000000) * 1000;
ts.tv_sec += ts.tv_nsec / 1000000000;
ts.tv_nsec = ts.tv_nsec % 1000000000;
::pthread_cond_timedwait(&cond_,
&lock.mutex().mutex_, &ts); // Ignore EINVAL.
}
#endif // (defined(__MACH__) && defined(__APPLE__))
+ // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)
+ // && defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE))
state_ -= 2;
}
return (state_ & 1) != 0;
diff --git a/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp b/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp
index 5ab9c8e8591..bd28a13fb2c 100644
--- a/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/posix_fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_global.hpp b/3rdparty/asio/include/asio/detail/posix_global.hpp
index bb9373bafbe..aea71e15c82 100644
--- a/3rdparty/asio/include/asio/detail/posix_global.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_global.hpp
@@ -2,7 +2,7 @@
// detail/posix_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_mutex.hpp b/3rdparty/asio/include/asio/detail/posix_mutex.hpp
index 08b220b98fd..38ce2867ff5 100644
--- a/3rdparty/asio/include/asio/detail/posix_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_mutex.hpp
@@ -2,7 +2,7 @@
// detail/posix_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/reactive_serial_port_service.hpp b/3rdparty/asio/include/asio/detail/posix_serial_port_service.hpp
index 986e87b45fe..79309549845 100644
--- a/3rdparty/asio/include/asio/detail/reactive_serial_port_service.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_serial_port_service.hpp
@@ -1,16 +1,16 @@
//
-// detail/reactive_serial_port_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// detail/posix_serial_port_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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 ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
-#define ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
+#ifndef ASIO_DETAIL_POSIX_SERIAL_PORT_SERVICE_HPP
+#define ASIO_DETAIL_POSIX_SERIAL_PORT_SERVICE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -23,29 +23,39 @@
#include <string>
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/serial_port_base.hpp"
#include "asio/detail/descriptor_ops.hpp"
-#include "asio/detail/reactive_descriptor_service.hpp"
+
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-// Extend reactive_descriptor_service to provide serial port support.
-class reactive_serial_port_service :
- public service_base<reactive_serial_port_service>
+// Extend a descriptor_service to provide serial port support.
+class posix_serial_port_service :
+ public execution_context_service_base<posix_serial_port_service>
{
public:
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef io_uring_descriptor_service descriptor_service;
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef reactive_descriptor_service descriptor_service;
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
// The native type of a serial port.
- typedef reactive_descriptor_service::native_handle_type native_handle_type;
+ typedef descriptor_service::native_handle_type native_handle_type;
// The implementation type of the serial port.
- typedef reactive_descriptor_service::implementation_type implementation_type;
+ typedef descriptor_service::implementation_type implementation_type;
- ASIO_DECL reactive_serial_port_service(
- asio::io_context& io_context);
+ ASIO_DECL posix_serial_port_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -65,7 +75,7 @@ public:
// Move-assign from another serial port implementation.
void move_assign(implementation_type& impl,
- reactive_serial_port_service& other_service,
+ posix_serial_port_service& other_service,
implementation_type& other_impl)
{
descriptor_service_.move_assign(impl,
@@ -122,7 +132,7 @@ public:
const SettableSerialPortOption& option, asio::error_code& ec)
{
return do_set_option(impl,
- &reactive_serial_port_service::store_option<SettableSerialPortOption>,
+ &posix_serial_port_service::store_option<SettableSerialPortOption>,
&option, ec);
}
@@ -132,7 +142,7 @@ public:
GettableSerialPortOption& option, asio::error_code& ec) const
{
return do_get_option(impl,
- &reactive_serial_port_service::load_option<GettableSerialPortOption>,
+ &posix_serial_port_service::load_option<GettableSerialPortOption>,
&option, ec);
}
@@ -140,9 +150,9 @@ public:
asio::error_code send_break(implementation_type& impl,
asio::error_code& ec)
{
- errno = 0;
- descriptor_ops::error_wrapper(::tcsendbreak(
- descriptor_service_.native_handle(impl), 0), ec);
+ int result = ::tcsendbreak(descriptor_service_.native_handle(impl), 0);
+ descriptor_ops::get_last_error(ec, result < 0);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -156,11 +166,12 @@ public:
// Start an asynchronous write. The data being written must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
- descriptor_service_.async_write_some(impl, buffers, handler);
+ descriptor_service_.async_write_some(impl, buffers, handler, io_ex);
}
// Read some data. Returns the number of bytes received.
@@ -173,11 +184,13 @@ public:
// Start an asynchronous read. The buffer for the data being received must be
// valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
- descriptor_service_.async_read_some(impl, buffers, handler);
+ descriptor_service_.async_read_some(impl, buffers, handler, io_ex);
}
private:
@@ -218,7 +231,7 @@ private:
void* option, asio::error_code& ec) const;
// The implementation used for initiating asynchronous operations.
- reactive_descriptor_service descriptor_service_;
+ descriptor_service descriptor_service_;
};
} // namespace detail
@@ -227,10 +240,10 @@ private:
#include "asio/detail/pop_options.hpp"
#if defined(ASIO_HEADER_ONLY)
-# include "asio/detail/impl/reactive_serial_port_service.ipp"
+# include "asio/detail/impl/posix_serial_port_service.ipp"
#endif // defined(ASIO_HEADER_ONLY)
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#endif // defined(ASIO_HAS_SERIAL_PORT)
-#endif // ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
+#endif // ASIO_DETAIL_POSIX_SERIAL_PORT_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp b/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp
index dc476fd7387..a57c09687b8 100644
--- a/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/posix_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp b/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp
index e65d09affdf..38a44c0327a 100644
--- a/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/posix_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_thread.hpp b/3rdparty/asio/include/asio/detail/posix_thread.hpp
index a07d5b3b003..9085a0b4a7b 100644
--- a/3rdparty/asio/include/asio/detail/posix_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_thread.hpp
@@ -2,7 +2,7 @@
// detail/posix_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp
index a677d15dc5f..b0d0653bed5 100644
--- a/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/posix_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/push_options.hpp b/3rdparty/asio/include/asio/detail/push_options.hpp
index 384bab13eda..d270e9ae13c 100644
--- a/3rdparty/asio/include/asio/detail/push_options.hpp
+++ b/3rdparty/asio/include/asio/detail/push_options.hpp
@@ -2,7 +2,7 @@
// detail/push_options.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,9 +24,20 @@
// Intel C++
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
+# if !defined(ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility push (default)
+# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma push_macro ("emit")
+# undef emit
+
+# pragma push_macro ("signal")
+# undef signal
+
+# pragma push_macro ("slot")
+# undef slot
+
#elif defined(__clang__)
// Clang
@@ -44,9 +55,26 @@
# endif
# if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
-# pragma GCC visibility push (default)
+# if !defined(ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility push (default)
+# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+# if (__clang_major__ >= 6)
+# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+# endif // (__clang_major__ >= 6)
+
+# pragma push_macro ("emit")
+# undef emit
+
+# pragma push_macro ("signal")
+# undef signal
+
+# pragma push_macro ("slot")
+# undef slot
+
#elif defined(__GNUC__)
// GNU C++
@@ -68,9 +96,29 @@
# endif
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
+# if !defined(ASIO_DISABLE_VISIBILITY)
+# pragma GCC visibility push (default)
+# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)
+# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)
+# if (__GNUC__ >= 7)
+# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+# endif // (__GNUC__ >= 7)
+
+# pragma push_macro ("emit")
+# undef emit
+
+# pragma push_macro ("signal")
+# undef signal
+
+# pragma push_macro ("slot")
+# undef slot
+
#elif defined(__KCC)
// Kai C++
@@ -87,7 +135,7 @@
// Greenhills C++
-#elif defined(__BORLANDC__)
+#elif defined(__BORLANDC__) && !defined(__clang__)
// Borland C++
@@ -124,12 +172,13 @@
//
// Must remain the last #elif since some other vendors (Metrowerks, for example)
// also #define _MSC_VER
-
# pragma warning (disable:4103)
# pragma warning (push)
+# pragma warning (disable:4619) // suppress 'there is no warning number XXXX'
# pragma warning (disable:4127)
# pragma warning (disable:4180)
# pragma warning (disable:4244)
+# pragma warning (disable:4265)
# pragma warning (disable:4355)
# pragma warning (disable:4510)
# pragma warning (disable:4512)
@@ -167,4 +216,13 @@
# endif
# endif
+# pragma push_macro ("emit")
+# undef emit
+
+# pragma push_macro ("signal")
+# undef signal
+
+# pragma push_macro ("slot")
+# undef slot
+
#endif
diff --git a/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp b/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp
index 42bc3df55b5..f7c7e86916d 100644
--- a/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_descriptor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,10 +19,14 @@
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
+ && !defined(__CYGWIN__) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_immediate_executor.hpp"
#include "asio/buffer.hpp"
-#include "asio/io_context.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/descriptor_ops.hpp"
@@ -42,7 +46,7 @@ namespace asio {
namespace detail {
class reactive_descriptor_service :
- public service_base<reactive_descriptor_service>
+ public execution_context_service_base<reactive_descriptor_service>
{
public:
// The native type of a descriptor.
@@ -75,8 +79,7 @@ public:
};
// Constructor.
- ASIO_DECL reactive_descriptor_service(
- asio::io_context& io_context);
+ ASIO_DECL reactive_descriptor_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -86,7 +89,7 @@ public:
// Move-construct a new descriptor implementation.
ASIO_DECL void move_construct(implementation_type& impl,
- implementation_type& other_impl);
+ implementation_type& other_impl) noexcept;
// Move-assign from another descriptor implementation.
ASIO_DECL void move_assign(implementation_type& impl,
@@ -120,6 +123,14 @@ public:
// Release ownership of the native descriptor representation.
ASIO_DECL native_handle_type release(implementation_type& impl);
+ // Release ownership of the native descriptor representation.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ ec = success_ec_;
+ return release(impl);
+ }
+
// Cancel all operations associated with the descriptor.
ASIO_DECL asio::error_code cancel(implementation_type& impl,
asio::error_code& ec);
@@ -131,6 +142,7 @@ public:
{
descriptor_ops::ioctl(impl.descriptor_, impl.state_,
command.name(), static_cast<ioctl_arg_type*>(command.data()), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -146,6 +158,7 @@ public:
{
descriptor_ops::set_user_non_blocking(
impl.descriptor_, impl.state_, mode, ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -185,23 +198,28 @@ public:
break;
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
// Asynchronously wait for the descriptor to become ready to read, ready to
// write, or to have pending error conditions.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_wait(implementation_type& impl,
- posix::descriptor_base::wait_type w, Handler& handler)
+ posix::descriptor_base::wait_type w,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_wait_op<Handler> op;
+ typedef reactive_wait_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_wait"));
@@ -210,22 +228,31 @@ public:
switch (w)
{
case posix::descriptor_base::wait_read:
- op_type = reactor::read_op;
- break;
+ op_type = reactor::read_op;
+ break;
case posix::descriptor_base::wait_write:
- op_type = reactor::write_op;
- break;
+ op_type = reactor::write_op;
+ break;
case posix::descriptor_base::wait_error:
- op_type = reactor::except_op;
- break;
- default:
- p.p->ec_ = asio::error::invalid_argument;
- reactor_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- return;
+ op_type = reactor::except_op;
+ break;
+ default:
+ p.p->ec_ = asio::error::invalid_argument;
+ start_op(impl, reactor::read_op, p.p,
+ is_continuation, false, true, &io_ex, 0);
+ p.v = p.p = 0;
+ return;
+ }
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.descriptor_, op_type);
}
- start_op(impl, op_type, p.p, is_continuation, false, false);
+ start_op(impl, op_type, p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -234,11 +261,26 @@ public:
size_t write_some(implementation_type& impl,
const ConstBufferSequence& buffers, asio::error_code& ec)
{
- buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
- return descriptor_ops::sync_write(impl.descriptor_, impl.state_,
- bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_write1(impl.descriptor_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_write(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be written without blocking.
@@ -247,52 +289,78 @@ public:
{
// Wait for descriptor to become ready.
descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
-
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
// Start an asynchronous write. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef descriptor_write_op<ConstBufferSequence, Handler> op;
+ typedef descriptor_write_op<ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.descriptor_, buffers, handler);
+ p.p = new (p.v) op(success_ec_, impl.descriptor_, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_,
+ impl.descriptor_, reactor::write_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_write_some"));
start_op(impl, reactor::write_op, p.p, is_continuation, true,
buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers));
+ ConstBufferSequence>::all_empty(buffers), &io_ex, 0);
p.v = p.p = 0;
}
// Start an asynchronous wait until data can be written without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const null_buffers&, Handler& handler)
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_,
+ impl.descriptor_, reactor::write_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_write_some(null_buffers)"));
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -301,11 +369,26 @@ public:
size_t read_some(implementation_type& impl,
const MutableBufferSequence& buffers, asio::error_code& ec)
{
- buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
- return descriptor_ops::sync_read(impl.descriptor_, impl.state_,
- bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_read1(impl.descriptor_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_read(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be read without blocking.
@@ -314,62 +397,156 @@ public:
{
// Wait for descriptor to become ready.
descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
-
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
// Start an asynchronous read. The buffer for the data being read must be
// valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef descriptor_read_op<MutableBufferSequence, Handler> op;
+ typedef descriptor_read_op<MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.descriptor_, buffers, handler);
+ p.p = new (p.v) op(success_ec_, impl.descriptor_, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_,
+ impl.descriptor_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_read_some"));
start_op(impl, reactor::read_op, p.p, is_continuation, true,
buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers));
+ MutableBufferSequence>::all_empty(buffers), &io_ex, 0);
p.v = p.p = 0;
}
// Wait until data can be read without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const null_buffers&, Handler& handler)
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_,
+ impl.descriptor_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_read_some(null_buffers)"));
- start_op(impl, reactor::read_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::read_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
private:
// Start the asynchronous operation.
- ASIO_DECL void start_op(implementation_type& impl, int op_type,
- reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
+ ASIO_DECL void do_start_op(implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg);
+
+ // Start the asynchronous operation for handlers that are specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_op(implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop,
+ const void* io_ex, ...)
+ {
+ return do_start_op(impl, op_type, op, is_continuation,
+ is_non_blocking, noop, &Op::do_immediate, io_ex);
+ }
+
+ // Start the asynchronous operation for handlers that are not specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_op(implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ return do_start_op(impl, op_type, op, is_continuation, is_non_blocking,
+ noop, &reactor::call_post_immediate_completion, &reactor_);
+ }
+
+ // Helper class used to implement per-operation cancellation
+ class reactor_op_cancellation
+ {
+ public:
+ reactor_op_cancellation(reactor* r,
+ reactor::per_descriptor_data* p, int d, int o)
+ : reactor_(r),
+ reactor_data_(p),
+ descriptor_(d),
+ op_type_(o)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ reactor_->cancel_ops_by_key(descriptor_,
+ *reactor_data_, op_type_, this);
+ }
+ }
+
+ private:
+ reactor* reactor_;
+ reactor::per_descriptor_data* reactor_data_;
+ int descriptor_;
+ int op_type_;
+ };
// The selector that performs event demultiplexing for the service.
reactor& reactor_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
};
} // namespace detail
@@ -384,5 +561,6 @@ private:
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp b/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp
index 504e4f66b11..b9a32a91217 100644
--- a/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_null_buffers_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -27,18 +28,22 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class reactive_null_buffers_op : public reactor_op
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_null_buffers_op);
- reactive_null_buffers_op(Handler& handler)
- : reactor_op(&reactive_null_buffers_op::do_perform,
+ reactive_null_buffers_op(const asio::error_code& success_ec,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(success_ec, &reactive_null_buffers_op::do_perform,
&reactive_null_buffers_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static status do_perform(reactor_op*)
@@ -51,12 +56,17 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_null_buffers_op* o(static_cast<reactive_null_buffers_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -78,8 +88,39 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_null_buffers_op* o(static_cast<reactive_null_buffers_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp
index 11b81d5168d..5ae84fd9966 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_accept_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,8 +17,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_holder.hpp"
@@ -33,10 +34,12 @@ template <typename Socket, typename Protocol>
class reactive_socket_accept_op_base : public reactor_op
{
public:
- reactive_socket_accept_op_base(socket_type socket,
- socket_ops::state_type state, Socket& peer, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint, func_type complete_func)
- : reactor_op(&reactive_socket_accept_op_base::do_perform, complete_func),
+ reactive_socket_accept_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state, Socket& peer,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ func_type complete_func)
+ : reactor_op(success_ec,
+ &reactive_socket_accept_op_base::do_perform, complete_func),
socket_(socket),
state_(state),
peer_(peer),
@@ -48,6 +51,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_accept_op_base* o(
static_cast<reactive_socket_accept_op_base*>(base));
@@ -85,21 +89,27 @@ private:
std::size_t addrlen_;
};
-template <typename Socket, typename Protocol, typename Handler>
+template <typename Socket, typename Protocol,
+ typename Handler, typename IoExecutor>
class reactive_socket_accept_op :
public reactive_socket_accept_op_base<Socket, Protocol>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_accept_op);
- reactive_socket_accept_op(socket_type socket,
- socket_ops::state_type state, Socket& peer, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint, Handler& handler)
- : reactive_socket_accept_op_base<Socket, Protocol>(socket, state, peer,
- protocol, peer_endpoint, &reactive_socket_accept_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ reactive_socket_accept_op(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state, Socket& peer,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_accept_op_base<Socket, Protocol>(
+ success_ec, socket, state, peer, protocol, peer_endpoint,
+ &reactive_socket_accept_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -107,9 +117,9 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_accept_op* o(static_cast<reactive_socket_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
// On success, assign new connection to peer socket object.
if (owner)
@@ -117,6 +127,13 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -138,30 +155,72 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_accept_op* o(static_cast<reactive_socket_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
-#if defined(ASIO_HAS_MOVE)
-
-template <typename Protocol, typename Handler>
+template <typename Protocol, typename PeerIoExecutor,
+ typename Handler, typename IoExecutor>
class reactive_socket_move_accept_op :
- private Protocol::socket,
- public reactive_socket_accept_op_base<typename Protocol::socket, Protocol>
+ private Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ public reactive_socket_accept_op_base<
+ typename Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ Protocol>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_move_accept_op);
- reactive_socket_move_accept_op(io_context& ioc, socket_type socket,
+ reactive_socket_move_accept_op(const asio::error_code& success_ec,
+ const PeerIoExecutor& peer_io_ex, socket_type socket,
socket_ops::state_type state, const Protocol& protocol,
- typename Protocol::endpoint* peer_endpoint, Handler& handler)
- : Protocol::socket(ioc),
- reactive_socket_accept_op_base<typename Protocol::socket, Protocol>(
- socket, state, *this, protocol, peer_endpoint,
+ typename Protocol::endpoint* peer_endpoint, Handler& handler,
+ const IoExecutor& io_ex)
+ : peer_socket_type(peer_io_ex),
+ reactive_socket_accept_op_base<peer_socket_type, Protocol>(
+ success_ec, socket, state, *this, protocol, peer_endpoint,
&reactive_socket_move_accept_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -169,10 +228,10 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_move_accept_op* o(
static_cast<reactive_socket_move_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
// On success, assign new connection to peer socket object.
if (owner)
@@ -180,6 +239,13 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -187,9 +253,9 @@ public:
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
detail::move_binder2<Handler,
- asio::error_code, typename Protocol::socket>
- handler(0, ASIO_MOVE_CAST(Handler)(o->handler_), o->ec_,
- ASIO_MOVE_CAST(typename Protocol::socket)(*o));
+ asio::error_code, peer_socket_type>
+ handler(0, static_cast<Handler&&>(o->handler_), o->ec_,
+ static_cast<peer_socket_type&&>(*o));
p.h = asio::detail::addressof(handler.handler_);
p.reset();
@@ -203,12 +269,52 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_move_accept_op* o(
+ static_cast<reactive_socket_move_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::move_binder2<Handler,
+ asio::error_code, peer_socket_type>
+ handler(0, static_cast<Handler&&>(o->handler_), o->ec_,
+ static_cast<peer_socket_type&&>(*o));
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
+ typedef typename Protocol::socket::template
+ rebind_executor<PeerIoExecutor>::other peer_socket_type;
+
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp
index 428db3f8e39..03c0db2e7dd 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,8 +17,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -31,14 +32,17 @@ namespace detail {
class reactive_socket_connect_op_base : public reactor_op
{
public:
- reactive_socket_connect_op_base(socket_type socket, func_type complete_func)
- : reactor_op(&reactive_socket_connect_op_base::do_perform, complete_func),
+ reactive_socket_connect_op_base(const asio::error_code& success_ec,
+ socket_type socket, func_type complete_func)
+ : reactor_op(success_ec,
+ &reactive_socket_connect_op_base::do_perform, complete_func),
socket_(socket)
{
}
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_connect_op_base* o(
static_cast<reactive_socket_connect_op_base*>(base));
@@ -54,18 +58,22 @@ private:
socket_type socket_;
};
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class reactive_socket_connect_op : public reactive_socket_connect_op_base
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_connect_op);
- reactive_socket_connect_op(socket_type socket, Handler& handler)
- : reactive_socket_connect_op_base(socket,
+ reactive_socket_connect_op(const asio::error_code& success_ec,
+ socket_type socket, Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_connect_op_base(success_ec, socket,
&reactive_socket_connect_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -73,13 +81,20 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_connect_op* o
(static_cast<reactive_socket_connect_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -101,8 +116,42 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_connect_op* o
+ (static_cast<reactive_socket_connect_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp
index 71f0aec5369..b6533655674 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -32,10 +34,12 @@ template <typename MutableBufferSequence>
class reactive_socket_recv_op_base : public reactor_op
{
public:
- reactive_socket_recv_op_base(socket_type socket,
- socket_ops::state_type state, const MutableBufferSequence& buffers,
+ reactive_socket_recv_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers,
socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_recv_op_base::do_perform, complete_func),
+ : reactor_op(success_ec,
+ &reactive_socket_recv_op_base::do_perform, complete_func),
socket_(socket),
state_(state),
buffers_(buffers),
@@ -45,20 +49,34 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_recv_op_base* o(
static_cast<reactive_socket_recv_op_base*>(base));
- buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
- status result = socket_ops::non_blocking_recv(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
- (o->state_ & socket_ops::stream_oriented) != 0,
- o->ec_, o->bytes_transferred_) ? done : not_done;
+ status result;
+ if (bufs_type::is_single_buffer)
+ {
+ result = socket_ops::non_blocking_recv1(o->socket_,
+ bufs_type::first(o->buffers_).data(),
+ bufs_type::first(o->buffers_).size(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
+ else
+ {
+ bufs_type bufs(o->buffers_);
+ result = socket_ops::non_blocking_recv(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
if (result == done)
if ((o->state_ & socket_ops::stream_oriented) != 0)
- if (o->bytes_transferred_ < bufs.total_size())
+ if (o->bytes_transferred_ == 0)
result = done_and_exhausted;
ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_recv",
@@ -74,21 +92,25 @@ private:
socket_base::message_flags flags_;
};
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class reactive_socket_recv_op :
public reactive_socket_recv_op_base<MutableBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_recv_op);
- reactive_socket_recv_op(socket_type socket,
- socket_ops::state_type state, const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_recv_op_base<MutableBufferSequence>(socket, state,
- buffers, flags, &reactive_socket_recv_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ reactive_socket_recv_op(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_recv_op_base<MutableBufferSequence>(success_ec, socket,
+ state, buffers, flags, &reactive_socket_recv_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -96,12 +118,19 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_recv_op* o(static_cast<reactive_socket_recv_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -123,8 +152,41 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_recv_op* o(static_cast<reactive_socket_recv_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
index 309a032a7ab..b84ea61794f 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recvfrom_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -32,10 +34,12 @@ template <typename MutableBufferSequence, typename Endpoint>
class reactive_socket_recvfrom_op_base : public reactor_op
{
public:
- reactive_socket_recvfrom_op_base(socket_type socket, int protocol_type,
+ reactive_socket_recvfrom_op_base(const asio::error_code& success_ec,
+ socket_type socket, int protocol_type,
const MutableBufferSequence& buffers, Endpoint& endpoint,
socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_recvfrom_op_base::do_perform, complete_func),
+ : reactor_op(success_ec,
+ &reactive_socket_recvfrom_op_base::do_perform, complete_func),
socket_(socket),
protocol_type_(protocol_type),
buffers_(buffers),
@@ -46,17 +50,31 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_recvfrom_op_base* o(
static_cast<reactive_socket_recvfrom_op_base*>(base));
- buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence> bufs(o->buffers_);
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
std::size_t addr_len = o->sender_endpoint_.capacity();
- status result = socket_ops::non_blocking_recvfrom(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
- o->sender_endpoint_.data(), &addr_len,
- o->ec_, o->bytes_transferred_) ? done : not_done;
+ status result;
+ if (bufs_type::is_single_buffer)
+ {
+ result = socket_ops::non_blocking_recvfrom1(
+ o->socket_, bufs_type::first(o->buffers_).data(),
+ bufs_type::first(o->buffers_).size(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
+ else
+ {
+ bufs_type bufs(o->buffers_);
+ result = socket_ops::non_blocking_recvfrom(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
if (result && !o->ec_)
o->sender_endpoint_.resize(addr_len);
@@ -75,22 +93,28 @@ private:
socket_base::message_flags flags_;
};
-template <typename MutableBufferSequence, typename Endpoint, typename Handler>
+template <typename MutableBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
class reactive_socket_recvfrom_op :
public reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvfrom_op);
- reactive_socket_recvfrom_op(socket_type socket, int protocol_type,
+ reactive_socket_recvfrom_op(const asio::error_code& success_ec,
+ socket_type socket, int protocol_type,
const MutableBufferSequence& buffers, Endpoint& endpoint,
- socket_base::message_flags flags, Handler& handler)
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
: reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>(
- socket, protocol_type, buffers, endpoint, flags,
+ success_ec, socket, protocol_type, buffers, endpoint, flags,
&reactive_socket_recvfrom_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -98,13 +122,20 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_recvfrom_op* o(
static_cast<reactive_socket_recvfrom_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -126,8 +157,42 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_recvfrom_op* o(
+ static_cast<reactive_socket_recvfrom_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
index e0c801fd86d..e4c8117b675 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recvmsg_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -33,10 +35,12 @@ template <typename MutableBufferSequence>
class reactive_socket_recvmsg_op_base : public reactor_op
{
public:
- reactive_socket_recvmsg_op_base(socket_type socket,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ reactive_socket_recvmsg_op_base(const asio::error_code& success_ec,
+ socket_type socket, const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
socket_base::message_flags& out_flags, func_type complete_func)
- : reactor_op(&reactive_socket_recvmsg_op_base::do_perform, complete_func),
+ : reactor_op(success_ec,
+ &reactive_socket_recvmsg_op_base::do_perform, complete_func),
socket_(socket),
buffers_(buffers),
in_flags_(in_flags),
@@ -46,6 +50,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_recvmsg_op_base* o(
static_cast<reactive_socket_recvmsg_op_base*>(base));
@@ -70,21 +75,27 @@ private:
socket_base::message_flags& out_flags_;
};
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class reactive_socket_recvmsg_op :
public reactive_socket_recvmsg_op_base<MutableBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvmsg_op);
- reactive_socket_recvmsg_op(socket_type socket,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
- : reactive_socket_recvmsg_op_base<MutableBufferSequence>(socket, buffers,
- in_flags, out_flags, &reactive_socket_recvmsg_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ reactive_socket_recvmsg_op(const asio::error_code& success_ec,
+ socket_type socket, const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ : reactive_socket_recvmsg_op_base<MutableBufferSequence>(
+ success_ec, socket, buffers, in_flags, out_flags,
+ &reactive_socket_recvmsg_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -92,13 +103,20 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_recvmsg_op* o(
static_cast<reactive_socket_recvmsg_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -120,8 +138,42 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_recvmsg_op* o(
+ static_cast<reactive_socket_recvmsg_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp
index 708e8ea0d97..ef7ec69933b 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -32,10 +34,12 @@ template <typename ConstBufferSequence>
class reactive_socket_send_op_base : public reactor_op
{
public:
- reactive_socket_send_op_base(socket_type socket,
- socket_ops::state_type state, const ConstBufferSequence& buffers,
+ reactive_socket_send_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers,
socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_send_op_base::do_perform, complete_func),
+ : reactor_op(success_ec,
+ &reactive_socket_send_op_base::do_perform, complete_func),
socket_(socket),
state_(state),
buffers_(buffers),
@@ -45,20 +49,38 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_send_op_base* o(
static_cast<reactive_socket_send_op_base*>(base));
- buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence> bufs(o->buffers_);
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
- status result = socket_ops::non_blocking_send(o->socket_,
- bufs.buffers(), bufs.count(), o->flags_,
+ status result;
+ if (bufs_type::is_single_buffer)
+ {
+ result = socket_ops::non_blocking_send1(o->socket_,
+ bufs_type::first(o->buffers_).data(),
+ bufs_type::first(o->buffers_).size(), o->flags_,
o->ec_, o->bytes_transferred_) ? done : not_done;
- if (result == done)
- if ((o->state_ & socket_ops::stream_oriented) != 0)
- if (o->bytes_transferred_ < bufs.total_size())
- result = done_and_exhausted;
+ if (result == done)
+ if ((o->state_ & socket_ops::stream_oriented) != 0)
+ if (o->bytes_transferred_ < bufs_type::first(o->buffers_).size())
+ result = done_and_exhausted;
+ }
+ else
+ {
+ bufs_type bufs(o->buffers_);
+ result = socket_ops::non_blocking_send(o->socket_,
+ bufs.buffers(), bufs.count(), o->flags_,
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+
+ if (result == done)
+ if ((o->state_ & socket_ops::stream_oriented) != 0)
+ if (o->bytes_transferred_ < bufs.total_size())
+ result = done_and_exhausted;
+ }
ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_send",
o->ec_, o->bytes_transferred_));
@@ -73,21 +95,25 @@ private:
socket_base::message_flags flags_;
};
-template <typename ConstBufferSequence, typename Handler>
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
class reactive_socket_send_op :
public reactive_socket_send_op_base<ConstBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_send_op);
- reactive_socket_send_op(socket_type socket,
- socket_ops::state_type state, const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_send_op_base<ConstBufferSequence>(socket,
+ reactive_socket_send_op(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_send_op_base<ConstBufferSequence>(success_ec, socket,
state, buffers, flags, &reactive_socket_send_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -95,12 +121,19 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_send_op* o(static_cast<reactive_socket_send_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -122,8 +155,42 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_send_op* o(static_cast<reactive_socket_send_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp
index cab8f88a086..e1bbb70389c 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_sendto_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -32,10 +34,12 @@ template <typename ConstBufferSequence, typename Endpoint>
class reactive_socket_sendto_op_base : public reactor_op
{
public:
- reactive_socket_sendto_op_base(socket_type socket,
- const ConstBufferSequence& buffers, const Endpoint& endpoint,
- socket_base::message_flags flags, func_type complete_func)
- : reactor_op(&reactive_socket_sendto_op_base::do_perform, complete_func),
+ reactive_socket_sendto_op_base(const asio::error_code& success_ec,
+ socket_type socket, const ConstBufferSequence& buffers,
+ const Endpoint& endpoint, socket_base::message_flags flags,
+ func_type complete_func)
+ : reactor_op(success_ec,
+ &reactive_socket_sendto_op_base::do_perform, complete_func),
socket_(socket),
buffers_(buffers),
destination_(endpoint),
@@ -45,16 +49,30 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_sendto_op_base* o(
static_cast<reactive_socket_sendto_op_base*>(base));
- buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence> bufs(o->buffers_);
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
- status result = socket_ops::non_blocking_sendto(o->socket_,
+ status result;
+ if (bufs_type::is_single_buffer)
+ {
+ result = socket_ops::non_blocking_sendto1(o->socket_,
+ bufs_type::first(o->buffers_).data(),
+ bufs_type::first(o->buffers_).size(), o->flags_,
+ o->destination_.data(), o->destination_.size(),
+ o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
+ else
+ {
+ bufs_type bufs(o->buffers_);
+ result = socket_ops::non_blocking_sendto(o->socket_,
bufs.buffers(), bufs.count(), o->flags_,
o->destination_.data(), o->destination_.size(),
o->ec_, o->bytes_transferred_) ? done : not_done;
+ }
ASIO_HANDLER_REACTOR_OPERATION((*o, "non_blocking_sendto",
o->ec_, o->bytes_transferred_));
@@ -69,21 +87,27 @@ private:
socket_base::message_flags flags_;
};
-template <typename ConstBufferSequence, typename Endpoint, typename Handler>
+template <typename ConstBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
class reactive_socket_sendto_op :
public reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_sendto_op);
- reactive_socket_sendto_op(socket_type socket,
- const ConstBufferSequence& buffers, const Endpoint& endpoint,
- socket_base::message_flags flags, Handler& handler)
- : reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>(socket,
- buffers, endpoint, flags, &reactive_socket_sendto_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ reactive_socket_sendto_op(const asio::error_code& success_ec,
+ socket_type socket, const ConstBufferSequence& buffers,
+ const Endpoint& endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>(
+ success_ec, socket, buffers, endpoint, flags,
+ &reactive_socket_sendto_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -91,12 +115,19 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_sendto_op* o(static_cast<reactive_socket_sendto_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -118,8 +149,41 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_sendto_op* o(static_cast<reactive_socket_sendto_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp
index 4ba255667c1..c828e7f1f2a 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,11 +17,12 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_HAS_IOCP)
+#if !defined(ASIO_HAS_IOCP) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/buffer.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/socket_base.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/memory.hpp"
@@ -45,7 +46,7 @@ namespace detail {
template <typename Protocol>
class reactive_socket_service :
- public service_base<reactive_socket_service<Protocol> >,
+ public execution_context_service_base<reactive_socket_service<Protocol>>,
public reactive_socket_service_base
{
public:
@@ -73,9 +74,10 @@ public:
};
// Constructor.
- reactive_socket_service(asio::io_context& io_context)
- : service_base<reactive_socket_service<Protocol> >(io_context),
- reactive_socket_service_base(io_context)
+ reactive_socket_service(execution_context& context)
+ : execution_context_service_base<
+ reactive_socket_service<Protocol>>(context),
+ reactive_socket_service_base(context)
{
}
@@ -87,7 +89,7 @@ public:
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
- implementation_type& other_impl)
+ implementation_type& other_impl) noexcept
{
this->base_move_construct(impl, other_impl);
@@ -109,6 +111,7 @@ public:
// Move-construct a new socket implementation from another protocol type.
template <typename Protocol1>
void converting_move_construct(implementation_type& impl,
+ reactive_socket_service<Protocol1>&,
typename reactive_socket_service<
Protocol1>::implementation_type& other_impl)
{
@@ -125,6 +128,8 @@ public:
if (!do_open(impl, protocol.family(),
protocol.type(), protocol.protocol(), ec))
impl.protocol_ = protocol;
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -135,6 +140,8 @@ public:
{
if (!do_assign(impl, protocol.type(), native_socket, ec))
impl.protocol_ = protocol;
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -149,6 +156,8 @@ public:
const endpoint_type& endpoint, asio::error_code& ec)
{
socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -160,6 +169,8 @@ public:
socket_ops::setsockopt(impl.socket_, impl.state_,
option.level(impl.protocol_), option.name(impl.protocol_),
option.data(impl.protocol_), option.size(impl.protocol_), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -174,6 +185,8 @@ public:
option.data(impl.protocol_), &size, ec);
if (!ec)
option.resize(impl.protocol_, size);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -184,7 +197,10 @@ public:
endpoint_type endpoint;
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -197,7 +213,10 @@ public:
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getpeername(impl.socket_,
endpoint.data(), &addr_len, false, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -207,6 +226,8 @@ public:
socket_base::shutdown_type what, asio::error_code& ec)
{
socket_ops::shutdown(impl.socket_, what, ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -217,12 +238,27 @@ public:
const endpoint_type& destination, socket_base::message_flags flags,
asio::error_code& ec)
{
- buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
- return socket_ops::sync_sendto(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags,
- destination.data(), destination.size(), ec);
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = socket_ops::sync_sendto1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags,
+ destination.data(), destination.size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ n = socket_ops::sync_sendto(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags,
+ destination.data(), destination.size(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be sent without blocking.
@@ -233,52 +269,79 @@ public:
// Wait for socket to become ready.
socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send_to(implementation_type& impl,
const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- Handler& handler)
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
typedef reactive_socket_sendto_op<ConstBufferSequence,
- endpoint_type, Handler> op;
+ endpoint_type, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, buffers, destination, flags, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ buffers, destination, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::write_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send_to"));
- start_op(impl, reactor::write_op, p.p, is_continuation, true, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, true, false, &io_ex, 0);
p.v = p.p = 0;
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send_to(implementation_type& impl, const null_buffers&,
- const endpoint_type&, socket_base::message_flags, Handler& handler)
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::write_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send_to(null_buffers)"));
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -290,18 +353,29 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags,
asio::error_code& ec)
{
- buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
std::size_t addr_len = sender_endpoint.capacity();
- std::size_t bytes_recvd = socket_ops::sync_recvfrom(
- impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
- flags, sender_endpoint.data(), &addr_len, ec);
+ std::size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = socket_ops::sync_recvfrom1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(), bufs_type::first(buffers).size(),
+ flags, sender_endpoint.data(), &addr_len, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ n = socket_ops::sync_recvfrom(impl.socket_, impl.state_, bufs.buffers(),
+ bufs.count(), flags, sender_endpoint.data(), &addr_len, ec);
+ }
if (!ec)
sender_endpoint.resize(addr_len);
- return bytes_recvd;
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be received without blocking.
@@ -315,28 +389,42 @@ public:
// Reset endpoint since it can be given no sensible value at this time.
sender_endpoint = endpoint_type();
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
// Start an asynchronous receive. The buffer for the data being received and
// the sender_endpoint object must both be valid for the lifetime of the
// asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive_from(implementation_type& impl,
const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, Handler& handler)
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
typedef reactive_socket_recvfrom_op<MutableBufferSequence,
- endpoint_type, Handler> op;
+ endpoint_type, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
int protocol = impl.protocol_.type();
- p.p = new (p.v) op(impl.socket_, protocol,
- buffers, sender_endpoint, flags, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_, protocol,
+ buffers, sender_endpoint, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_receive_from"));
@@ -344,24 +432,35 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, true, false);
+ p.p, is_continuation, true, false, &io_ex, 0);
p.v = p.p = 0;
}
// Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_from(implementation_type& impl,
- const null_buffers&, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_receive_from(null_buffers)"));
@@ -372,7 +471,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -385,6 +484,7 @@ public:
if (peer.is_open())
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -403,85 +503,79 @@ public:
new_socket.release();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
-#if defined(ASIO_HAS_MOVE)
- // Accept a new connection.
- typename Protocol::socket accept(implementation_type& impl,
- io_context* peer_io_context, endpoint_type* peer_endpoint,
- asio::error_code& ec)
- {
- typename Protocol::socket peer(
- peer_io_context ? *peer_io_context : io_context_);
-
- std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
- socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
- impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
- peer_endpoint ? &addr_len : 0, ec));
-
- // On success, assign new connection to peer socket object.
- if (new_socket.get() != invalid_socket)
- {
- if (peer_endpoint)
- peer_endpoint->resize(addr_len);
- peer.assign(impl.protocol_, new_socket.get(), ec);
- if (!ec)
- new_socket.release();
- }
-
- return peer;
- }
-#endif // defined(ASIO_HAS_MOVE)
-
// Start an asynchronous accept. The peer and peer_endpoint objects must be
// valid until the accept's handler is invoked.
- template <typename Socket, typename Handler>
+ template <typename Socket, typename Handler, typename IoExecutor>
void async_accept(implementation_type& impl, Socket& peer,
- endpoint_type* peer_endpoint, Handler& handler)
+ endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_accept_op<Socket, Protocol, Handler> op;
+ typedef reactive_socket_accept_op<Socket, Protocol, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, impl.state_, peer,
- impl.protocol_, peer_endpoint, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ peer, impl.protocol_, peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected() && !peer.is_open())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_accept"));
- start_accept_op(impl, p.p, is_continuation, peer.is_open());
+ start_accept_op(impl, p.p, is_continuation, peer.is_open(), &io_ex, 0);
p.v = p.p = 0;
}
-#if defined(ASIO_HAS_MOVE)
// Start an asynchronous accept. The peer_endpoint object must be valid until
// the accept's handler is invoked.
- template <typename Handler>
- void async_accept(implementation_type& impl,
- asio::io_context* peer_io_context,
- endpoint_type* peer_endpoint, Handler& handler)
+ template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
+ void async_move_accept(implementation_type& impl,
+ const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_move_accept_op<Protocol, Handler> op;
+ typedef reactive_socket_move_accept_op<Protocol,
+ PeerIoExecutor, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(peer_io_context ? *peer_io_context : io_context_,
- impl.socket_, impl.state_, impl.protocol_, peer_endpoint, handler);
+ p.p = new (p.v) op(success_ec_, peer_io_ex, impl.socket_,
+ impl.state_, impl.protocol_, peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_accept"));
- start_accept_op(impl, p.p, is_continuation, false);
+ start_accept_op(impl, p.p, is_continuation, false, &io_ex, 0);
p.v = p.p = 0;
}
-#endif // defined(ASIO_HAS_MOVE)
// Connect the socket to the specified endpoint.
asio::error_code connect(implementation_type& impl,
@@ -489,28 +583,41 @@ public:
{
socket_ops::sync_connect(impl.socket_,
peer_endpoint.data(), peer_endpoint.size(), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
// Start an asynchronous connect.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, Handler& handler)
+ const endpoint_type& peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_connect_op<Handler> op;
+ typedef reactive_socket_connect_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::connect_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_connect"));
start_connect_op(impl, p.p, is_continuation,
- peer_endpoint.data(), peer_endpoint.size());
+ peer_endpoint.data(), peer_endpoint.size(), &io_ex, 0);
p.v = p.p = 0;
}
};
@@ -521,5 +628,6 @@ public:
#include "asio/detail/pop_options.hpp"
#endif // !defined(ASIO_HAS_IOCP)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp
index f2de9db607b..63dcacad582 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,11 +18,14 @@
#include "asio/detail/config.hpp"
#if !defined(ASIO_HAS_IOCP) \
- && !defined(ASIO_WINDOWS_RUNTIME)
+ && !defined(ASIO_WINDOWS_RUNTIME) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+#include "asio/associated_cancellation_slot.hpp"
#include "asio/buffer.hpp"
+#include "asio/cancellation_type.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/socket_base.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/memory.hpp"
@@ -62,8 +65,7 @@ public:
};
// Constructor.
- ASIO_DECL reactive_socket_service_base(
- asio::io_context& io_context);
+ ASIO_DECL reactive_socket_service_base(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void base_shutdown();
@@ -73,7 +75,7 @@ public:
// Move-construct a new socket implementation.
ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl);
+ base_implementation_type& other_impl) noexcept;
// Move-assign from another socket implementation.
ASIO_DECL void base_move_assign(base_implementation_type& impl,
@@ -93,6 +95,10 @@ public:
ASIO_DECL asio::error_code close(
base_implementation_type& impl, asio::error_code& ec);
+ // Release ownership of the socket.
+ ASIO_DECL socket_type release(
+ base_implementation_type& impl, asio::error_code& ec);
+
// Get the native socket representation.
native_handle_type native_handle(base_implementation_type& impl)
{
@@ -189,18 +195,21 @@ public:
// Asynchronously wait for the socket to become ready to read, ready to
// write, or to have pending error conditions.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_wait(base_implementation_type& impl,
- socket_base::wait_type w, Handler& handler)
+ socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_wait_op<Handler> op;
+ typedef reactive_wait_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_wait"));
@@ -208,23 +217,32 @@ public:
int op_type;
switch (w)
{
- case socket_base::wait_read:
- op_type = reactor::read_op;
- break;
- case socket_base::wait_write:
- op_type = reactor::write_op;
- break;
- case socket_base::wait_error:
- op_type = reactor::except_op;
- break;
- default:
- p.p->ec_ = asio::error::invalid_argument;
- reactor_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- return;
+ case socket_base::wait_read:
+ op_type = reactor::read_op;
+ break;
+ case socket_base::wait_write:
+ op_type = reactor::write_op;
+ break;
+ case socket_base::wait_error:
+ op_type = reactor::except_op;
+ break;
+ default:
+ p.p->ec_ = asio::error::invalid_argument;
+ start_op(impl, reactor::read_op, p.p,
+ is_continuation, false, true, &io_ex, 0);
+ p.v = p.p = 0;
+ return;
}
- start_op(impl, op_type, p.p, is_continuation, false, false);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, op_type);
+ }
+
+ start_op(impl, op_type, p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -234,11 +252,21 @@ public:
const ConstBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence> bufs(buffers);
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
- return socket_ops::sync_send(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ if (bufs_type::is_single_buffer)
+ {
+ return socket_ops::sync_send1(impl.socket_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ return socket_ops::sync_send(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
}
// Wait until data can be sent without blocking.
@@ -253,19 +281,32 @@ public:
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_send_op<ConstBufferSequence, Handler> op;
+ typedef reactive_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, impl.state_, buffers, flags, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ impl.state_, buffers, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::write_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send"));
@@ -273,28 +314,40 @@ public:
start_op(impl, reactor::write_op, p.p, is_continuation, true,
((impl.state_ & socket_ops::stream_oriented)
&& buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers)));
+ ConstBufferSequence>::all_empty(buffers)), &io_ex, 0);
p.v = p.p = 0;
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::write_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send(null_buffers)"));
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -304,11 +357,21 @@ public:
const MutableBufferSequence& buffers,
socket_base::message_flags flags, asio::error_code& ec)
{
- buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence> bufs(buffers);
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
- return socket_ops::sync_recv(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ if (bufs_type::is_single_buffer)
+ {
+ return socket_ops::sync_recv1(impl.socket_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ return socket_ops::sync_recv(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
}
// Wait until data can be received without blocking.
@@ -323,19 +386,33 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_recv_op<MutableBufferSequence, Handler> op;
+ typedef reactive_socket_recv_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, impl.state_, buffers, flags, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ impl.state_, buffers, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_receive"));
@@ -347,23 +424,35 @@ public:
(flags & socket_base::message_out_of_band) == 0,
((impl.state_ & socket_ops::stream_oriented)
&& buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers)));
+ MutableBufferSequence>::all_empty(buffers)), &io_ex, 0);
p.v = p.p = 0;
}
// Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags flags, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_receive(null_buffers)"));
@@ -371,7 +460,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -407,19 +496,34 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive_with_flags(base_implementation_type& impl,
const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_socket_recvmsg_op<MutableBufferSequence, Handler> op;
+ typedef reactive_socket_recvmsg_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, buffers, in_flags, out_flags, handler);
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ buffers, in_flags, out_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_receive_with_flags"));
@@ -428,24 +532,36 @@ public:
(in_flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
p.p, is_continuation,
- (in_flags & socket_base::message_out_of_band) == 0, false);
+ (in_flags & socket_base::message_out_of_band) == 0, false, &io_ex, 0);
p.v = p.p = 0;
}
// Wait until data can be received without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_receive_with_flags(base_implementation_type& impl,
const null_buffers&, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef reactive_null_buffers_op<Handler> op;
+ typedef reactive_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(success_ec_, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<reactor_op_cancellation>(
+ &reactor_, &impl.reactor_data_, impl.socket_, reactor::read_op);
+ }
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
@@ -457,7 +573,7 @@ public:
start_op(impl,
(in_flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -473,23 +589,149 @@ protected:
const native_handle_type& native_socket, asio::error_code& ec);
// Start the asynchronous read or write operation.
- ASIO_DECL void start_op(base_implementation_type& impl, int op_type,
- reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
+ ASIO_DECL void do_start_op(base_implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg);
+
+ // Start the asynchronous operation for handlers that are specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_op(base_implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop,
+ const void* io_ex, ...)
+ {
+ return do_start_op(impl, op_type, op, is_continuation,
+ is_non_blocking, noop, &Op::do_immediate, io_ex);
+ }
+
+ // Start the asynchronous operation for handlers that are not specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_op(base_implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ return do_start_op(impl, op_type, op, is_continuation, is_non_blocking,
+ noop, &reactor::call_post_immediate_completion, &reactor_);
+ }
// Start the asynchronous accept operation.
- ASIO_DECL void start_accept_op(base_implementation_type& impl,
- reactor_op* op, bool is_continuation, bool peer_is_open);
+ ASIO_DECL void do_start_accept_op(base_implementation_type& impl,
+ reactor_op* op, bool is_continuation, bool peer_is_open,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg);
+
+ // Start the asynchronous accept operation for handlers that are specialised
+ // for immediate completion.
+ template <typename Op>
+ void start_accept_op(base_implementation_type& impl, Op* op,
+ bool is_continuation, bool peer_is_open, const void* io_ex, ...)
+ {
+ return do_start_accept_op(impl, op, is_continuation,
+ peer_is_open, &Op::do_immediate, io_ex);
+ }
+
+ // Start the asynchronous operation for handlers that are not specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_accept_op(base_implementation_type& impl, Op* op,
+ bool is_continuation, bool peer_is_open, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ return do_start_accept_op(impl, op, is_continuation, peer_is_open,
+ &reactor::call_post_immediate_completion, &reactor_);
+ }
// Start the asynchronous connect operation.
- ASIO_DECL void start_connect_op(base_implementation_type& impl,
- reactor_op* op, bool is_continuation,
- const socket_addr_type* addr, size_t addrlen);
+ ASIO_DECL void do_start_connect_op(base_implementation_type& impl,
+ reactor_op* op, bool is_continuation, const void* addr, size_t addrlen,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg);
+
+ // Start the asynchronous operation for handlers that are specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_connect_op(base_implementation_type& impl,
+ Op* op, bool is_continuation, const void* addr,
+ size_t addrlen, const void* io_ex, ...)
+ {
+ return do_start_connect_op(impl, op, is_continuation,
+ addr, addrlen, &Op::do_immediate, io_ex);
+ }
+
+ // Start the asynchronous operation for handlers that are not specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_connect_op(base_implementation_type& impl, Op* op,
+ bool is_continuation, const void* addr, size_t addrlen, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ return do_start_connect_op(impl, op, is_continuation, addr,
+ addrlen, &reactor::call_post_immediate_completion, &reactor_);
+ }
- // The io_context that owns this socket service.
- io_context& io_context_;
+ // Helper class used to implement per-operation cancellation
+ class reactor_op_cancellation
+ {
+ public:
+ reactor_op_cancellation(reactor* r,
+ reactor::per_descriptor_data* p, socket_type d, int o)
+ : reactor_(r),
+ reactor_data_(p),
+ descriptor_(d),
+ op_type_(o)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ reactor_->cancel_ops_by_key(descriptor_,
+ *reactor_data_, op_type_, this);
+ }
+ }
+
+ private:
+ reactor* reactor_;
+ reactor::per_descriptor_data* reactor_data_;
+ socket_type descriptor_;
+ int op_type_;
+ };
// The selector that performs event demultiplexing for the service.
reactor& reactor_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
};
} // namespace detail
@@ -503,5 +745,6 @@ protected:
#endif // !defined(ASIO_HAS_IOCP)
// && !defined(ASIO_WINDOWS_RUNTIME)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp b/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp
index 99f8811cf9a..62938e2d83e 100644
--- a/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_wait_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -27,18 +28,22 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class reactive_wait_op : public reactor_op
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_wait_op);
- reactive_wait_op(Handler& handler)
- : reactor_op(&reactive_wait_op::do_perform,
+ reactive_wait_op(const asio::error_code& success_ec,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(success_ec, &reactive_wait_op::do_perform,
&reactive_wait_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static status do_perform(reactor_op*)
@@ -51,12 +56,17 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_wait_op* o(static_cast<reactive_wait_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -78,8 +88,39 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_wait_op* o(static_cast<reactive_wait_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/reactor.hpp b/3rdparty/asio/include/asio/detail/reactor.hpp
index 1f684a22e2b..054acfdab00 100644
--- a/3rdparty/asio/include/asio/detail/reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/reactor.hpp
@@ -2,7 +2,7 @@
// detail/reactor.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,18 +15,40 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/detail/reactor_fwd.hpp"
+#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_EPOLL)
+#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+# include "asio/detail/null_reactor.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/null_reactor.hpp"
+#elif defined(ASIO_HAS_EPOLL)
# include "asio/detail/epoll_reactor.hpp"
#elif defined(ASIO_HAS_KQUEUE)
# include "asio/detail/kqueue_reactor.hpp"
#elif defined(ASIO_HAS_DEV_POLL)
# include "asio/detail/dev_poll_reactor.hpp"
-#elif defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_reactor.hpp"
#else
# include "asio/detail/select_reactor.hpp"
#endif
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+typedef null_reactor reactor;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+typedef null_reactor reactor;
+#elif defined(ASIO_HAS_EPOLL)
+typedef epoll_reactor reactor;
+#elif defined(ASIO_HAS_KQUEUE)
+typedef kqueue_reactor reactor;
+#elif defined(ASIO_HAS_DEV_POLL)
+typedef dev_poll_reactor reactor;
+#else
+typedef select_reactor reactor;
+#endif
+
+} // namespace detail
+} // namespace asio
+
#endif // ASIO_DETAIL_REACTOR_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactor_fwd.hpp b/3rdparty/asio/include/asio/detail/reactor_fwd.hpp
deleted file mode 100644
index 1b25e69a281..00000000000
--- a/3rdparty/asio/include/asio/detail/reactor_fwd.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// detail/reactor_fwd.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_REACTOR_FWD_HPP
-#define ASIO_DETAIL_REACTOR_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-namespace asio {
-namespace detail {
-
-#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
-typedef class null_reactor reactor;
-#elif defined(ASIO_HAS_IOCP)
-typedef class select_reactor reactor;
-#elif defined(ASIO_HAS_EPOLL)
-typedef class epoll_reactor reactor;
-#elif defined(ASIO_HAS_KQUEUE)
-typedef class kqueue_reactor reactor;
-#elif defined(ASIO_HAS_DEV_POLL)
-typedef class dev_poll_reactor reactor;
-#else
-typedef class select_reactor reactor;
-#endif
-
-} // namespace detail
-} // namespace asio
-
-#endif // ASIO_DETAIL_REACTOR_FWD_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactor_op.hpp b/3rdparty/asio/include/asio/detail/reactor_op.hpp
index 491787b09f2..54d6cd964eb 100644
--- a/3rdparty/asio/include/asio/detail/reactor_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactor_op.hpp
@@ -2,7 +2,7 @@
// detail/reactor_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,6 +30,9 @@ public:
// The error code to be passed to the completion handler.
asio::error_code ec_;
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+
// The number of bytes transferred, to be passed to the completion handler.
std::size_t bytes_transferred_;
@@ -46,8 +49,11 @@ public:
protected:
typedef status (*perform_func_type)(reactor_op*);
- reactor_op(perform_func_type perform_func, func_type complete_func)
+ reactor_op(const asio::error_code& success_ec,
+ perform_func_type perform_func, func_type complete_func)
: operation(complete_func),
+ ec_(success_ec),
+ cancellation_key_(0),
bytes_transferred_(0),
perform_func_(perform_func)
{
diff --git a/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp b/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp
index 426adfbc94d..fae1a52d9e7 100644
--- a/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp
+++ b/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp
@@ -2,7 +2,7 @@
// detail/reactor_op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -100,6 +100,50 @@ public:
return this->cancel_operations(operations_.find(descriptor), ops, ec);
}
+ // Cancel operations associated with the descriptor identified by the
+ // supplied iterator, and the specified cancellation key. Any operations
+ // pending for the descriptor with the key will be cancelled. Returns true if
+ // any operations were cancelled, in which case the reactor's event
+ // demultiplexing function may need to be interrupted and restarted.
+ bool cancel_operations_by_key(iterator i, op_queue<operation>& ops,
+ void* cancellation_key, const asio::error_code& ec =
+ asio::error::operation_aborted)
+ {
+ bool result = false;
+ if (i != operations_.end())
+ {
+ op_queue<reactor_op> other_ops;
+ while (reactor_op* op = i->second.front())
+ {
+ i->second.pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ op->ec_ = ec;
+ ops.push(op);
+ result = true;
+ }
+ else
+ other_ops.push(op);
+ }
+ i->second.push(other_ops);
+ if (i->second.empty())
+ operations_.erase(i);
+ }
+ return result;
+ }
+
+ // Cancel all operations associated with the descriptor. Any operations
+ // pending for the descriptor will be cancelled. Returns true if any
+ // operations were cancelled, in which case the reactor's event
+ // demultiplexing function may need to be interrupted and restarted.
+ bool cancel_operations_by_key(Descriptor descriptor, op_queue<operation>& ops,
+ void* cancellation_key, const asio::error_code& ec =
+ asio::error::operation_aborted)
+ {
+ return this->cancel_operations_by_key(
+ operations_.find(descriptor), ops, cancellation_key, ec);
+ }
+
// Whether there are no operations in the queue.
bool empty() const
{
diff --git a/3rdparty/asio/include/asio/detail/recycling_allocator.hpp b/3rdparty/asio/include/asio/detail/recycling_allocator.hpp
index 2abc0a2f9aa..d556f22a399 100644
--- a/3rdparty/asio/include/asio/detail/recycling_allocator.hpp
+++ b/3rdparty/asio/include/asio/detail/recycling_allocator.hpp
@@ -2,7 +2,7 @@
// detail/recycling_allocator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -25,14 +25,16 @@
namespace asio {
namespace detail {
-template <typename T>
+template <typename T, typename Purpose = thread_info_base::default_tag>
class recycling_allocator
{
public:
+ typedef T value_type;
+
template <typename U>
struct rebind
{
- typedef recycling_allocator<U> other;
+ typedef recycling_allocator<U, Purpose> other;
};
recycling_allocator()
@@ -40,32 +42,35 @@ public:
}
template <typename U>
- recycling_allocator(const recycling_allocator<U>&)
+ recycling_allocator(const recycling_allocator<U, Purpose>&)
{
}
T* allocate(std::size_t n)
{
- typedef thread_context::thread_call_stack call_stack;
- void* p = thread_info_base::allocate(call_stack::top(), sizeof(T) * n);
+ void* p = thread_info_base::allocate(Purpose(),
+ thread_context::top_of_thread_call_stack(),
+ sizeof(T) * n, alignof(T));
return static_cast<T*>(p);
}
void deallocate(T* p, std::size_t n)
{
- typedef thread_context::thread_call_stack call_stack;
- thread_info_base::deallocate(call_stack::top(), p, sizeof(T) * n);
+ thread_info_base::deallocate(Purpose(),
+ thread_context::top_of_thread_call_stack(), p, sizeof(T) * n);
}
};
-template <>
-class recycling_allocator<void>
+template <typename Purpose>
+class recycling_allocator<void, Purpose>
{
public:
+ typedef void value_type;
+
template <typename U>
struct rebind
{
- typedef recycling_allocator<U> other;
+ typedef recycling_allocator<U, Purpose> other;
};
recycling_allocator()
@@ -73,22 +78,22 @@ public:
}
template <typename U>
- recycling_allocator(const recycling_allocator<U>&)
+ recycling_allocator(const recycling_allocator<U, Purpose>&)
{
}
};
-template <typename Allocator>
+template <typename Allocator, typename Purpose>
struct get_recycling_allocator
{
typedef Allocator type;
static type get(const Allocator& a) { return a; }
};
-template <typename T>
-struct get_recycling_allocator<std::allocator<T> >
+template <typename T, typename Purpose>
+struct get_recycling_allocator<std::allocator<T>, Purpose>
{
- typedef recycling_allocator<T> type;
+ typedef recycling_allocator<T, Purpose> type;
static type get(const std::allocator<T>&) { return type(); }
};
diff --git a/3rdparty/asio/include/asio/detail/regex_fwd.hpp b/3rdparty/asio/include/asio/detail/regex_fwd.hpp
index 447c6b13fd6..a5c6c0a9428 100644
--- a/3rdparty/asio/include/asio/detail/regex_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/regex_fwd.hpp
@@ -2,7 +2,7 @@
// detail/regex_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,9 +17,6 @@
#if defined(ASIO_HAS_BOOST_REGEX)
-#include <boost/regex_fwd.hpp>
-#include <boost/regex/v4/match_flags.hpp>
-
namespace boost {
template <class BidiIterator>
@@ -28,6 +25,9 @@ struct sub_match;
template <class BidiIterator, class Allocator>
class match_results;
+template <class CharT, class Traits>
+class basic_regex;
+
} // namespace boost
#endif // defined(ASIO_HAS_BOOST_REGEX)
diff --git a/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp b/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp
index 234ac2421f1..c7cb2c4c101 100644
--- a/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp
+++ b/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_endpoint_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,23 +16,28 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/basic_resolver_results.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/resolve_op.hpp"
#include "asio/detail/socket_ops.hpp"
+#include "asio/error.hpp"
+#include "asio/ip/basic_resolver_results.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename Protocol, typename Handler>
+template <typename Protocol, typename Handler, typename IoExecutor>
class resolve_endpoint_op : public resolve_op
{
public:
@@ -41,15 +46,22 @@ public:
typedef typename Protocol::endpoint endpoint_type;
typedef asio::ip::basic_resolver_results<Protocol> results_type;
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+
resolve_endpoint_op(socket_ops::weak_cancel_token_type cancel_token,
- const endpoint_type& endpoint, io_context_impl& ioc, Handler& handler)
+ const endpoint_type& endpoint, scheduler_impl& sched,
+ Handler& handler, const IoExecutor& io_ex)
: resolve_op(&resolve_endpoint_op::do_complete),
cancel_token_(cancel_token),
endpoint_(endpoint),
- io_context_impl_(ioc),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ scheduler_(sched),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -57,25 +69,25 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
resolve_endpoint_op* o(static_cast<resolve_endpoint_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
- if (owner && owner != &o->io_context_impl_)
+ if (owner && owner != &o->scheduler_)
{
// The operation is being run on the worker io_context. Time to perform
// the resolver operation.
// Perform the blocking endpoint resolution operation.
- char host_name[NI_MAXHOST];
- char service_name[NI_MAXSERV];
+ char host_name[NI_MAXHOST] = "";
+ char service_name[NI_MAXSERV] = "";
socket_ops::background_getnameinfo(o->cancel_token_, o->endpoint_.data(),
o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
o->endpoint_.protocol().type(), o->ec_);
o->results_ = results_type::create(o->endpoint_, host_name, service_name);
// Pass operation back to main io_context for completion.
- o->io_context_impl_.post_deferred_completion(o);
+ o->scheduler_.post_deferred_completion(o);
p.v = p.p = 0;
}
else
@@ -85,6 +97,11 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// Make a copy of the handler so that the memory can be deallocated
// before the upcall is made. Even if we're not about to make an upcall,
// a sub-object of the handler may be the true owner of the memory
@@ -109,8 +126,9 @@ public:
private:
socket_ops::weak_cancel_token_type cancel_token_;
endpoint_type endpoint_;
- io_context_impl& io_context_impl_;
+ scheduler_impl& scheduler_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
results_type results_;
};
diff --git a/3rdparty/asio/include/asio/detail/resolve_op.hpp b/3rdparty/asio/include/asio/detail/resolve_op.hpp
index 724edc557ec..5b41ad2fe68 100644
--- a/3rdparty/asio/include/asio/detail/resolve_op.hpp
+++ b/3rdparty/asio/include/asio/detail/resolve_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/resolve_query_op.hpp b/3rdparty/asio/include/asio/detail/resolve_query_op.hpp
index 0ce450b5ea5..b7f9e35cef0 100644
--- a/3rdparty/asio/include/asio/detail/resolve_query_op.hpp
+++ b/3rdparty/asio/include/asio/detail/resolve_query_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_query_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,24 +16,29 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/basic_resolver_query.hpp"
-#include "asio/ip/basic_resolver_results.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/resolve_op.hpp"
#include "asio/detail/socket_ops.hpp"
+#include "asio/error.hpp"
+#include "asio/ip/basic_resolver_query.hpp"
+#include "asio/ip/basic_resolver_results.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename Protocol, typename Handler>
+template <typename Protocol, typename Handler, typename IoExecutor>
class resolve_query_op : public resolve_op
{
public:
@@ -42,16 +47,23 @@ public:
typedef asio::ip::basic_resolver_query<Protocol> query_type;
typedef asio::ip::basic_resolver_results<Protocol> results_type;
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+
resolve_query_op(socket_ops::weak_cancel_token_type cancel_token,
- const query_type& query, io_context_impl& ioc, Handler& handler)
+ const query_type& qry, scheduler_impl& sched,
+ Handler& handler, const IoExecutor& io_ex)
: resolve_op(&resolve_query_op::do_complete),
cancel_token_(cancel_token),
- query_(query),
- io_context_impl_(ioc),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ query_(qry),
+ scheduler_(sched),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex),
addrinfo_(0)
{
- handler_work<Handler>::start(handler_);
}
~resolve_query_op()
@@ -65,11 +77,11 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
resolve_query_op* o(static_cast<resolve_query_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
- if (owner && owner != &o->io_context_impl_)
+ if (owner && owner != &o->scheduler_)
{
// The operation is being run on the worker io_context. Time to perform
// the resolver operation.
@@ -80,7 +92,7 @@ public:
o->query_.hints(), &o->addrinfo_, o->ec_);
// Pass operation back to main io_context for completion.
- o->io_context_impl_.post_deferred_completion(o);
+ o->scheduler_.post_deferred_completion(o);
p.v = p.p = 0;
}
else
@@ -90,6 +102,11 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// Make a copy of the handler so that the memory can be deallocated
// before the upcall is made. Even if we're not about to make an upcall,
// a sub-object of the handler may be the true owner of the memory
@@ -119,8 +136,9 @@ public:
private:
socket_ops::weak_cancel_token_type cancel_token_;
query_type query_;
- io_context_impl& io_context_impl_;
+ scheduler_impl& scheduler_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
asio::detail::addrinfo_type* addrinfo_;
};
diff --git a/3rdparty/asio/include/asio/detail/resolver_service.hpp b/3rdparty/asio/include/asio/detail/resolver_service.hpp
index 155e4f30225..2d1fe22b62a 100644
--- a/3rdparty/asio/include/asio/detail/resolver_service.hpp
+++ b/3rdparty/asio/include/asio/detail/resolver_service.hpp
@@ -2,7 +2,7 @@
// detail/resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -34,7 +34,7 @@ namespace detail {
template <typename Protocol>
class resolver_service :
- public service_base<resolver_service<Protocol> >,
+ public execution_context_service_base<resolver_service<Protocol>>,
public resolver_service_base
{
public:
@@ -52,9 +52,9 @@ public:
typedef asio::ip::basic_resolver_results<Protocol> results_type;
// Constructor.
- resolver_service(asio::io_context& io_context)
- : service_base<resolver_service<Protocol> >(io_context),
- resolver_service_base(io_context)
+ resolver_service(execution_context& context)
+ : execution_context_service_base<resolver_service<Protocol>>(context),
+ resolver_service_base(context)
{
}
@@ -65,37 +65,38 @@ public:
}
// Perform any fork-related housekeeping.
- void notify_fork(asio::io_context::fork_event fork_ev)
+ void notify_fork(execution_context::fork_event fork_ev)
{
this->base_notify_fork(fork_ev);
}
// Resolve a query to a list of entries.
- results_type resolve(implementation_type&, const query_type& query,
+ results_type resolve(implementation_type&, const query_type& qry,
asio::error_code& ec)
{
asio::detail::addrinfo_type* address_info = 0;
- socket_ops::getaddrinfo(query.host_name().c_str(),
- query.service_name().c_str(), query.hints(), &address_info, ec);
+ socket_ops::getaddrinfo(qry.host_name().c_str(),
+ qry.service_name().c_str(), qry.hints(), &address_info, ec);
auto_addrinfo auto_address_info(address_info);
+ ASIO_ERROR_LOCATION(ec);
return ec ? results_type() : results_type::create(
- address_info, query.host_name(), query.service_name());
+ address_info, qry.host_name(), qry.service_name());
}
// Asynchronously resolve a query to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type& impl,
- const query_type& query, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type& impl, const query_type& qry,
+ Handler& handler, const IoExecutor& io_ex)
{
// Allocate and construct an operation to wrap the handler.
- typedef resolve_query_op<Protocol, Handler> op;
+ typedef resolve_query_op<Protocol, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl, query, io_context_impl_, handler);
+ p.p = new (p.v) op(impl, qry, scheduler_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_impl_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "resolver", &impl, 0, "async_resolve"));
start_resolve_op(p.p);
@@ -112,22 +113,23 @@ public:
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
endpoint.protocol().type(), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec ? results_type() : results_type::create(
endpoint, host_name, service_name);
}
// Asynchronously resolve an endpoint to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type& impl,
- const endpoint_type& endpoint, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type& impl, const endpoint_type& endpoint,
+ Handler& handler, const IoExecutor& io_ex)
{
// Allocate and construct an operation to wrap the handler.
- typedef resolve_endpoint_op<Protocol, Handler> op;
+ typedef resolve_endpoint_op<Protocol, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl, endpoint, io_context_impl_, handler);
+ p.p = new (p.v) op(impl, endpoint, scheduler_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_impl_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "resolver", &impl, 0, "async_resolve"));
start_resolve_op(p.p);
diff --git a/3rdparty/asio/include/asio/detail/resolver_service_base.hpp b/3rdparty/asio/include/asio/detail/resolver_service_base.hpp
index e3dd4f7edd7..160793c89cb 100644
--- a/3rdparty/asio/include/asio/detail/resolver_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/resolver_service_base.hpp
@@ -2,7 +2,7 @@
// detail/resolver_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,8 +17,7 @@
#include "asio/detail/config.hpp"
#include "asio/error.hpp"
-#include "asio/executor_work_guard.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/resolve_op.hpp"
@@ -27,6 +26,12 @@
#include "asio/detail/scoped_ptr.hpp"
#include "asio/detail/thread.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -40,7 +45,7 @@ public:
typedef socket_ops::shared_cancel_token_type implementation_type;
// Constructor.
- ASIO_DECL resolver_service_base(asio::io_context& io_context);
+ ASIO_DECL resolver_service_base(execution_context& context);
// Destructor.
ASIO_DECL ~resolver_service_base();
@@ -50,7 +55,7 @@ public:
// Perform any fork-related housekeeping.
ASIO_DECL void base_notify_fork(
- asio::io_context::fork_event fork_ev);
+ execution_context::fork_event fork_ev);
// Construct a new resolver implementation.
ASIO_DECL void construct(implementation_type& impl);
@@ -67,6 +72,21 @@ public:
resolver_service_base& other_service,
implementation_type& other_impl);
+ // Move-construct a new timer implementation.
+ void converting_move_construct(implementation_type& impl,
+ resolver_service_base&, implementation_type& other_impl)
+ {
+ move_construct(impl, other_impl);
+ }
+
+ // Move-assign from another timer implementation.
+ void converting_move_assign(implementation_type& impl,
+ resolver_service_base& other_service,
+ implementation_type& other_impl)
+ {
+ move_assign(impl, other_service, other_impl);
+ }
+
// Cancel pending asynchronous operations.
ASIO_DECL void cancel(implementation_type& impl);
@@ -101,28 +121,26 @@ protected:
};
#endif // !defined(ASIO_WINDOWS_RUNTIME)
- // Helper class to run the work io_context in a thread.
- class work_io_context_runner;
+ // Helper class to run the work scheduler in a thread.
+ class work_scheduler_runner;
- // Start the work thread if it's not already running.
+ // Start the work scheduler if it's not already running.
ASIO_DECL void start_work_thread();
- // The io_context implementation used to post completions.
- io_context_impl& io_context_impl_;
+ // The scheduler implementation used to post completions.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
private:
// Mutex to protect access to internal data.
asio::detail::mutex mutex_;
- // Private io_context used for performing asynchronous host resolution.
- asio::detail::scoped_ptr<asio::io_context> work_io_context_;
-
- // The work io_context implementation used to post completions.
- io_context_impl& work_io_context_impl_;
-
- // Work for the private io_context to perform.
- asio::executor_work_guard<
- asio::io_context::executor_type> work_;
+ // Private scheduler used for performing asynchronous host resolution.
+ asio::detail::scoped_ptr<scheduler_impl> work_scheduler_;
// Thread used for running the work io_context's run loop.
asio::detail::scoped_ptr<asio::detail::thread> work_thread_;
diff --git a/3rdparty/asio/include/asio/detail/scheduler.hpp b/3rdparty/asio/include/asio/detail/scheduler.hpp
index 37814723c83..a73ec141ebc 100644
--- a/3rdparty/asio/include/asio/detail/scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/scheduler.hpp
@@ -2,7 +2,7 @@
// detail/scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,8 +23,9 @@
#include "asio/detail/conditionally_enabled_event.hpp"
#include "asio/detail/conditionally_enabled_mutex.hpp"
#include "asio/detail/op_queue.hpp"
-#include "asio/detail/reactor_fwd.hpp"
#include "asio/detail/scheduler_operation.hpp"
+#include "asio/detail/scheduler_task.hpp"
+#include "asio/detail/thread.hpp"
#include "asio/detail/thread_context.hpp"
#include "asio/detail/push_options.hpp"
@@ -41,10 +42,18 @@ class scheduler
public:
typedef scheduler_operation operation;
+ // The type of a function used to obtain a task instance.
+ typedef scheduler_task* (*get_task_func_type)(
+ asio::execution_context&);
+
// Constructor. Specifies the number of concurrent threads that are likely to
// run the scheduler. If set to 1 certain optimisation are performed.
ASIO_DECL scheduler(asio::execution_context& ctx,
- int concurrency_hint = 0);
+ int concurrency_hint = 0, bool own_thread = true,
+ get_task_func_type get_task = &scheduler::get_default_task);
+
+ // Destructor.
+ ASIO_DECL ~scheduler();
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -95,16 +104,21 @@ public:
}
// Return whether a handler can be dispatched immediately.
- bool can_dispatch()
- {
- return thread_call_stack::contains(this) != 0;
- }
+ ASIO_DECL bool can_dispatch();
+
+ /// Capture the current exception so it can be rethrown from a run function.
+ ASIO_DECL void capture_current_exception();
// Request invocation of the given operation and return immediately. Assumes
// that work_started() has not yet been called for the operation.
ASIO_DECL void post_immediate_completion(
operation* op, bool is_continuation);
+ // Request invocation of the given operations and return immediately. Assumes
+ // that work_started() has not yet been called for the operations.
+ ASIO_DECL void post_immediate_completions(std::size_t n,
+ op_queue<operation>& ops, bool is_continuation);
+
// Request invocation of the given operation and return immediately. Assumes
// that work_started() was previously called for the operation.
ASIO_DECL void post_deferred_completion(operation* op);
@@ -156,6 +170,14 @@ private:
ASIO_DECL void wake_one_thread_and_unlock(
mutex::scoped_lock& lock);
+ // Get the default task.
+ ASIO_DECL static scheduler_task* get_default_task(
+ asio::execution_context& ctx);
+
+ // Helper class to run the scheduler in its own thread.
+ class thread_function;
+ friend class thread_function;
+
// Helper class to perform task-related operations on block exit.
struct task_cleanup;
friend struct task_cleanup;
@@ -174,7 +196,10 @@ private:
event wakeup_event_;
// The task to be run by this service.
- reactor* task_;
+ scheduler_task* task_;
+
+ // The function used to get the task.
+ get_task_func_type get_task_;
// Operation object to represent the position of the task in the queue.
struct task_operation : operation
@@ -199,6 +224,9 @@ private:
// The concurrency hint used to initialise the scheduler.
const int concurrency_hint_;
+
+ // The thread that is running the scheduler.
+ asio::detail::thread* thread_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/scheduler_operation.hpp b/3rdparty/asio/include/asio/detail/scheduler_operation.hpp
index 112b3dfc3d3..1b4ceb36f5c 100644
--- a/3rdparty/asio/include/asio/detail/scheduler_operation.hpp
+++ b/3rdparty/asio/include/asio/detail/scheduler_operation.hpp
@@ -2,7 +2,7 @@
// detail/scheduler_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/scheduler_task.hpp b/3rdparty/asio/include/asio/detail/scheduler_task.hpp
new file mode 100644
index 00000000000..a1a4ec1c85f
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/scheduler_task.hpp
@@ -0,0 +1,49 @@
+//
+// detail/scheduler_task.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_SCHEDULER_TASK_HPP
+#define ASIO_DETAIL_SCHEDULER_TASK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/op_queue.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class scheduler_operation;
+
+// Base class for all tasks that may be run by a scheduler.
+class scheduler_task
+{
+public:
+ // Run the task once until interrupted or events are ready to be dispatched.
+ virtual void run(long usec, op_queue<scheduler_operation>& ops) = 0;
+
+ // Interrupt the task.
+ virtual void interrupt() = 0;
+
+protected:
+ // Prevent deletion through this type.
+ ~scheduler_task()
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_SCHEDULER_TASK_HPP
diff --git a/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp b/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp
index aa8260c1d7e..410d2866b59 100644
--- a/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp
+++ b/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp
@@ -2,7 +2,7 @@
// detail/scheduler_thread_info.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/scoped_lock.hpp b/3rdparty/asio/include/asio/detail/scoped_lock.hpp
index cf526141691..778832d6350 100644
--- a/3rdparty/asio/include/asio/detail/scoped_lock.hpp
+++ b/3rdparty/asio/include/asio/detail/scoped_lock.hpp
@@ -2,7 +2,7 @@
// detail/scoped_lock.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/scoped_ptr.hpp b/3rdparty/asio/include/asio/detail/scoped_ptr.hpp
index 3bc26f1a3ea..a517c2b947c 100644
--- a/3rdparty/asio/include/asio/detail/scoped_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/scoped_ptr.hpp
@@ -2,7 +2,7 @@
// detail/scoped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/select_interrupter.hpp b/3rdparty/asio/include/asio/detail/select_interrupter.hpp
index ecac7dbfdfd..57cb4ce8d71 100644
--- a/3rdparty/asio/include/asio/detail/select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/select_reactor.hpp b/3rdparty/asio/include/asio/detail/select_reactor.hpp
index 7f9b55b2174..7fe647b7e63 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-2024 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)
@@ -30,6 +30,7 @@
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/reactor_op_queue.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -48,6 +49,9 @@ namespace detail {
class select_reactor
: public execution_context_service_base<select_reactor>
+#if !defined(ASIO_HAS_IOCP)
+ , public scheduler_task
+#endif // !defined(ASIO_HAS_IOCP)
{
public:
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -90,29 +94,57 @@ 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(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
- per_descriptor_data&, reactor_op* op, bool is_continuation, bool);
+ per_descriptor_data&, reactor_op* op, bool is_continuation, bool,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &select_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
// 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 +173,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,
@@ -206,6 +244,28 @@ private:
// The thread that is running the reactor loop.
asio::detail::thread* thread_;
+
+ // Helper class to join and restart the reactor thread.
+ class restart_reactor : public operation
+ {
+ public:
+ restart_reactor(select_reactor* r)
+ : operation(&restart_reactor::do_complete),
+ reactor_(r)
+ {
+ }
+
+ ASIO_DECL static void do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred);
+
+ private:
+ select_reactor* reactor_;
+ };
+
+ friend class restart_reactor;
+
+ // Operation used to join and restart the reactor thread.
+ restart_reactor restart_reactor_;
#endif // defined(ASIO_HAS_IOCP)
// Whether the service has been shut down.
diff --git a/3rdparty/asio/include/asio/detail/service_registry.hpp b/3rdparty/asio/include/asio/detail/service_registry.hpp
index 06f49de48a9..991b32a4980 100644
--- a/3rdparty/asio/include/asio/detail/service_registry.hpp
+++ b/3rdparty/asio/include/asio/detail/service_registry.hpp
@@ -2,7 +2,7 @@
// detail/service_registry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -84,8 +84,7 @@ private:
// Initalise a service's key when the key_type typedef is available.
template <typename Service>
static void init_key(execution_context::service::key& key,
- typename enable_if<
- is_base_of<typename Service::key_type, Service>::value>::type*);
+ enable_if_t<is_base_of<typename Service::key_type, Service>::value>*);
#endif // !defined(ASIO_NO_TYPEID)
// Initialise a service's key based on its id.
diff --git a/3rdparty/asio/include/asio/detail/signal_blocker.hpp b/3rdparty/asio/include/asio/detail/signal_blocker.hpp
index f0fac082023..11d0b0e9633 100644
--- a/3rdparty/asio/include/asio/detail/signal_blocker.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/signal_handler.hpp b/3rdparty/asio/include/asio/detail/signal_handler.hpp
index 19fee65c0e4..6d43f578cb9 100644
--- a/3rdparty/asio/include/asio/detail/signal_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_handler.hpp
@@ -2,7 +2,7 @@
// detail/signal_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/signal_op.hpp"
@@ -29,17 +28,17 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class signal_handler : public signal_op
{
public:
ASIO_DEFINE_HANDLER_PTR(signal_handler);
- signal_handler(Handler& h)
+ signal_handler(Handler& h, const IoExecutor& io_ex)
: signal_op(&signal_handler::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h))
+ handler_(static_cast<Handler&&>(h)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -49,10 +48,14 @@ public:
// Take ownership of the handler object.
signal_handler* h(static_cast<signal_handler*>(base));
ptr p = { asio::detail::addressof(h->handler_), h, h };
- handler_work<Handler> w(h->handler_);
ASIO_HANDLER_COMPLETION((*h));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ h->work_));
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -76,6 +79,7 @@ public:
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/signal_init.hpp b/3rdparty/asio/include/asio/detail/signal_init.hpp
index 266a3e0d045..6f2c7c867e2 100644
--- a/3rdparty/asio/include/asio/detail/signal_init.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_init.hpp
@@ -2,7 +2,7 @@
// detail/signal_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/signal_op.hpp b/3rdparty/asio/include/asio/detail/signal_op.hpp
index 9921de02478..5e0071a5d62 100644
--- a/3rdparty/asio/include/asio/detail/signal_op.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_op.hpp
@@ -2,7 +2,7 @@
// detail/signal_op.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,12 +30,16 @@ public:
// The error code to be passed to the completion handler.
asio::error_code ec_;
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+
// The signal number to be passed to the completion handler.
int signal_number_;
protected:
signal_op(func_type func)
: operation(func),
+ cancellation_key_(0),
signal_number_(0)
{
}
diff --git a/3rdparty/asio/include/asio/detail/signal_set_service.hpp b/3rdparty/asio/include/asio/detail/signal_set_service.hpp
index 58ee99baf3b..142ff43851a 100644
--- a/3rdparty/asio/include/asio/detail/signal_set_service.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_set_service.hpp
@@ -2,7 +2,7 @@
// detail/signal_set_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,8 +19,11 @@
#include <cstddef>
#include <signal.h>
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/cancellation_type.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/signal_set_base.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/op_queue.hpp"
@@ -28,8 +31,18 @@
#include "asio/detail/signal_op.hpp"
#include "asio/detail/socket_types.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
#if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
-# include "asio/detail/reactor.hpp"
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactor.hpp"
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#include "asio/detail/push_options.hpp"
@@ -48,7 +61,7 @@ extern ASIO_DECL struct signal_state* get_signal_state();
extern "C" ASIO_DECL void asio_signal_handler(int signal_number);
class signal_set_service :
- public service_base<signal_set_service>
+ public execution_context_service_base<signal_set_service>
{
public:
// Type used for tracking an individual signal registration.
@@ -109,7 +122,7 @@ public:
};
// Constructor.
- ASIO_DECL signal_set_service(asio::io_context& io_context);
+ ASIO_DECL signal_set_service(execution_context& context);
// Destructor.
ASIO_DECL ~signal_set_service();
@@ -119,7 +132,7 @@ public:
// Perform fork-related housekeeping.
ASIO_DECL void notify_fork(
- asio::io_context::fork_event fork_ev);
+ asio::execution_context::fork_event fork_ev);
// Construct a new signal_set implementation.
ASIO_DECL void construct(implementation_type& impl);
@@ -128,8 +141,16 @@ public:
ASIO_DECL void destroy(implementation_type& impl);
// Add a signal to a signal_set.
+ asio::error_code add(implementation_type& impl,
+ int signal_number, asio::error_code& ec)
+ {
+ return add(impl, signal_number, signal_set_base::flags::dont_care, ec);
+ }
+
+ // Add a signal to a signal_set with the specified flags.
ASIO_DECL asio::error_code add(implementation_type& impl,
- int signal_number, asio::error_code& ec);
+ int signal_number, signal_set_base::flags_t f,
+ asio::error_code& ec);
// Remove a signal to a signal_set.
ASIO_DECL asio::error_code remove(implementation_type& impl,
@@ -143,17 +164,32 @@ public:
ASIO_DECL asio::error_code cancel(implementation_type& impl,
asio::error_code& ec);
+ // Cancel a specific operation associated with the signal set.
+ ASIO_DECL void cancel_ops_by_key(implementation_type& impl,
+ void* cancellation_key);
+
// Start an asynchronous operation to wait for a signal to be delivered.
- template <typename Handler>
- void async_wait(implementation_type& impl, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef signal_handler<Handler> op;
+ typedef signal_handler<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<signal_op_cancellation>(this, &impl);
+ }
- ASIO_HANDLER_CREATION((io_context_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "signal_set", &impl, 0, "async_wait"));
start_wait_op(impl, p.p);
@@ -179,20 +215,59 @@ private:
// Helper function to start a wait operation.
ASIO_DECL void start_wait_op(implementation_type& impl, signal_op* op);
- // The io_context instance used for dispatching handlers.
- io_context_impl& io_context_;
+ // Helper class used to implement per-operation cancellation
+ class signal_op_cancellation
+ {
+ public:
+ signal_op_cancellation(signal_set_service* s, implementation_type* i)
+ : service_(s),
+ implementation_(i)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ service_->cancel_ops_by_key(*implementation_, this);
+ }
+ }
+
+ private:
+ signal_set_service* service_;
+ implementation_type* implementation_;
+ };
+
+ // The scheduler used for dispatching handlers.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
- // The type used for registering for pipe reactor notifications.
+ // The type used for processing pipe readiness notifications.
class pipe_read_op;
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ // The io_uring service used for waiting for pipe readiness.
+ io_uring_service& io_uring_service_;
+
+ // The per I/O object data used for the pipe.
+ io_uring_service::per_io_object_data io_object_data_;
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
// The reactor used for waiting for pipe readiness.
reactor& reactor_;
// The per-descriptor reactor data used for the pipe.
reactor::per_descriptor_data reactor_data_;
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
diff --git a/3rdparty/asio/include/asio/detail/socket_holder.hpp b/3rdparty/asio/include/asio/detail/socket_holder.hpp
index 1c9e7213655..300e3736636 100644
--- a/3rdparty/asio/include/asio/detail/socket_holder.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_holder.hpp
@@ -2,7 +2,7 @@
// detail/socket_holder.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/socket_ops.hpp b/3rdparty/asio/include/asio/detail/socket_ops.hpp
index 5529a27649a..fd2dc09c094 100644
--- a/3rdparty/asio/include/asio/detail/socket_ops.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_ops.hpp
@@ -2,7 +2,7 @@
// detail/socket_ops.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -63,29 +63,27 @@ typedef weak_ptr<void> weak_cancel_token_type;
#if !defined(ASIO_WINDOWS_RUNTIME)
-ASIO_DECL socket_type accept(socket_type s, socket_addr_type* addr,
+ASIO_DECL socket_type accept(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec);
-ASIO_DECL socket_type sync_accept(socket_type s,
- state_type state, socket_addr_type* addr,
- std::size_t* addrlen, asio::error_code& ec);
+ASIO_DECL socket_type sync_accept(socket_type s, state_type state,
+ void* addr, std::size_t* addrlen, asio::error_code& ec);
#if defined(ASIO_HAS_IOCP)
-ASIO_DECL void complete_iocp_accept(socket_type s,
- void* output_buffer, DWORD address_length,
- socket_addr_type* addr, std::size_t* addrlen,
+ASIO_DECL void complete_iocp_accept(socket_type s, void* output_buffer,
+ DWORD address_length, void* addr, std::size_t* addrlen,
socket_type new_socket, asio::error_code& ec);
#else // defined(ASIO_HAS_IOCP)
ASIO_DECL bool non_blocking_accept(socket_type s,
- state_type state, socket_addr_type* addr, std::size_t* addrlen,
+ state_type state, void* addr, std::size_t* addrlen,
asio::error_code& ec, socket_type& new_socket);
#endif // defined(ASIO_HAS_IOCP)
-ASIO_DECL int bind(socket_type s, const socket_addr_type* addr,
+ASIO_DECL int bind(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec);
ASIO_DECL int close(socket_type s, state_type& state,
@@ -100,10 +98,10 @@ ASIO_DECL bool set_internal_non_blocking(socket_type s,
ASIO_DECL int shutdown(socket_type s,
int what, asio::error_code& ec);
-ASIO_DECL int connect(socket_type s, const socket_addr_type* addr,
+ASIO_DECL int connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec);
-ASIO_DECL void sync_connect(socket_type s, const socket_addr_type* addr,
+ASIO_DECL void sync_connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec);
#if defined(ASIO_HAS_IOCP)
@@ -139,9 +137,15 @@ ASIO_DECL void init_buf(buf& b, const void* data, size_t size);
ASIO_DECL signed_size_type recv(socket_type s, buf* bufs,
size_t count, int flags, asio::error_code& ec);
+ASIO_DECL signed_size_type recv1(socket_type s,
+ void* data, size_t size, int flags, asio::error_code& ec);
+
ASIO_DECL size_t sync_recv(socket_type s, state_type state, buf* bufs,
size_t count, int flags, bool all_empty, asio::error_code& ec);
+ASIO_DECL size_t sync_recv1(socket_type s, state_type state,
+ void* data, size_t size, int flags, asio::error_code& ec);
+
#if defined(ASIO_HAS_IOCP)
ASIO_DECL void complete_iocp_recv(state_type state,
@@ -154,14 +158,26 @@ ASIO_DECL bool non_blocking_recv(socket_type s,
buf* bufs, size_t count, int flags, bool is_stream,
asio::error_code& ec, size_t& bytes_transferred);
+ASIO_DECL bool non_blocking_recv1(socket_type s,
+ void* data, size_t size, int flags, bool is_stream,
+ asio::error_code& ec, size_t& bytes_transferred);
+
#endif // defined(ASIO_HAS_IOCP)
-ASIO_DECL signed_size_type recvfrom(socket_type s, buf* bufs,
- size_t count, int flags, socket_addr_type* addr,
+ASIO_DECL signed_size_type recvfrom(socket_type s,
+ buf* bufs, size_t count, int flags, void* addr,
+ std::size_t* addrlen, asio::error_code& ec);
+
+ASIO_DECL signed_size_type recvfrom1(socket_type s,
+ void* data, size_t size, int flags, void* addr,
std::size_t* addrlen, asio::error_code& ec);
ASIO_DECL size_t sync_recvfrom(socket_type s, state_type state,
- buf* bufs, size_t count, int flags, socket_addr_type* addr,
+ buf* bufs, size_t count, int flags, void* addr,
+ std::size_t* addrlen, asio::error_code& ec);
+
+ASIO_DECL size_t sync_recvfrom1(socket_type s, state_type state,
+ void* data, size_t size, int flags, void* addr,
std::size_t* addrlen, asio::error_code& ec);
#if defined(ASIO_HAS_IOCP)
@@ -172,9 +188,12 @@ ASIO_DECL void complete_iocp_recvfrom(
#else // defined(ASIO_HAS_IOCP)
-ASIO_DECL bool non_blocking_recvfrom(socket_type s,
- buf* bufs, size_t count, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
+ASIO_DECL bool non_blocking_recvfrom(socket_type s, buf* bufs,
+ size_t count, int flags, void* addr, std::size_t* addrlen,
+ asio::error_code& ec, size_t& bytes_transferred);
+
+ASIO_DECL bool non_blocking_recvfrom1(socket_type s, void* data,
+ size_t size, int flags, void* addr, std::size_t* addrlen,
asio::error_code& ec, size_t& bytes_transferred);
#endif // defined(ASIO_HAS_IOCP)
@@ -204,10 +223,16 @@ ASIO_DECL bool non_blocking_recvmsg(socket_type s,
ASIO_DECL signed_size_type send(socket_type s, const buf* bufs,
size_t count, int flags, asio::error_code& ec);
+ASIO_DECL signed_size_type send1(socket_type s,
+ const void* data, size_t size, int flags, asio::error_code& ec);
+
ASIO_DECL size_t sync_send(socket_type s, state_type state,
const buf* bufs, size_t count, int flags,
bool all_empty, asio::error_code& ec);
+ASIO_DECL size_t sync_send1(socket_type s, state_type state,
+ const void* data, size_t size, int flags, asio::error_code& ec);
+
#if defined(ASIO_HAS_IOCP)
ASIO_DECL void complete_iocp_send(
@@ -220,21 +245,36 @@ ASIO_DECL bool non_blocking_send(socket_type s,
const buf* bufs, size_t count, int flags,
asio::error_code& ec, size_t& bytes_transferred);
+ASIO_DECL bool non_blocking_send1(socket_type s,
+ const void* data, size_t size, int flags,
+ asio::error_code& ec, size_t& bytes_transferred);
+
#endif // defined(ASIO_HAS_IOCP)
-ASIO_DECL signed_size_type sendto(socket_type s, const buf* bufs,
- size_t count, int flags, const socket_addr_type* addr,
+ASIO_DECL signed_size_type sendto(socket_type s,
+ const buf* bufs, size_t count, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec);
+
+ASIO_DECL signed_size_type sendto1(socket_type s,
+ const void* data, size_t size, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec);
ASIO_DECL size_t sync_sendto(socket_type s, state_type state,
- const buf* bufs, size_t count, int flags, const socket_addr_type* addr,
+ const buf* bufs, size_t count, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec);
+
+ASIO_DECL size_t sync_sendto1(socket_type s, state_type state,
+ const void* data, size_t size, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec);
#if !defined(ASIO_HAS_IOCP)
-ASIO_DECL bool non_blocking_sendto(socket_type s,
- const buf* bufs, size_t count, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
+ASIO_DECL bool non_blocking_sendto(socket_type s, const buf* bufs,
+ size_t count, int flags, const void* addr, std::size_t addrlen,
+ asio::error_code& ec, size_t& bytes_transferred);
+
+ASIO_DECL bool non_blocking_sendto1(socket_type s, const void* data,
+ size_t size, int flags, const void* addr, std::size_t addrlen,
asio::error_code& ec, size_t& bytes_transferred);
#endif // !defined(ASIO_HAS_IOCP)
@@ -250,10 +290,10 @@ ASIO_DECL int getsockopt(socket_type s, state_type state,
int level, int optname, void* optval,
size_t* optlen, asio::error_code& ec);
-ASIO_DECL int getpeername(socket_type s, socket_addr_type* addr,
+ASIO_DECL int getpeername(socket_type s, void* addr,
std::size_t* addrlen, bool cached, asio::error_code& ec);
-ASIO_DECL int getsockname(socket_type s, socket_addr_type* addr,
+ASIO_DECL int getsockname(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec);
ASIO_DECL int ioctl(socket_type s, state_type& state,
@@ -298,19 +338,17 @@ ASIO_DECL asio::error_code background_getaddrinfo(
ASIO_DECL void freeaddrinfo(addrinfo_type* ai);
-ASIO_DECL asio::error_code getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
+ASIO_DECL asio::error_code getnameinfo(const void* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int flags, asio::error_code& ec);
-ASIO_DECL asio::error_code sync_getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
+ASIO_DECL asio::error_code sync_getnameinfo(const void* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec);
ASIO_DECL asio::error_code background_getnameinfo(
const weak_cancel_token_type& cancel_token,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec);
diff --git a/3rdparty/asio/include/asio/detail/socket_option.hpp b/3rdparty/asio/include/asio/detail/socket_option.hpp
index 02860b92373..760713daad8 100644
--- a/3rdparty/asio/include/asio/detail/socket_option.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp b/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp
index 7089640ed6d..e2432622e47 100644
--- a/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/socket_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -45,7 +45,7 @@ public:
// Interrupt the select call.
ASIO_DECL void interrupt();
- // Reset the select interrupt. Returns true if the call was interrupted.
+ // Reset the select interrupter. Returns true if the reset was successful.
ASIO_DECL bool reset();
// Get the read descriptor to be passed to select.
diff --git a/3rdparty/asio/include/asio/detail/socket_types.hpp b/3rdparty/asio/include/asio/detail/socket_types.hpp
index 60c5929e828..cf4f746a44b 100644
--- a/3rdparty/asio/include/asio/detail/socket_types.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_types.hpp
@@ -2,7 +2,7 @@
// detail/socket_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,13 +30,13 @@
# define ASIO_WSPIAPI_H_DEFINED
# endif // !defined(_WSPIAPI_H_)
# endif // defined(__BORLANDC__)
+# include <winsock2.h>
+# include <ws2tcpip.h>
# if defined(WINAPI_FAMILY)
# if ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
# include <windows.h>
# endif // ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
# endif // defined(WINAPI_FAMILY)
-# include <winsock2.h>
-# include <ws2tcpip.h>
# if !defined(ASIO_WINDOWS_APP)
# include <mswsock.h>
# endif // !defined(ASIO_WINDOWS_APP)
@@ -89,6 +89,7 @@
# include <sys/filio.h>
# include <sys/sockio.h>
# endif
+# include <signal.h>
#endif
#include "asio/detail/push_options.hpp"
@@ -152,6 +153,7 @@ typedef int signed_size_type;
# define ASIO_OS_DEF_SO_DONTROUTE 0x10
# define ASIO_OS_DEF_SO_KEEPALIVE 0x8
# define ASIO_OS_DEF_SO_LINGER 0x80
+# define ASIO_OS_DEF_SO_OOBINLINE 0x100
# define ASIO_OS_DEF_SO_SNDBUF 0x1001
# define ASIO_OS_DEF_SO_RCVBUF 0x1002
# define ASIO_OS_DEF_SO_SNDLOWAT 0x1003
@@ -177,6 +179,9 @@ typedef int signed_size_type;
# define ASIO_OS_DEF_AI_V4MAPPED 0x800
# define ASIO_OS_DEF_AI_ALL 0x100
# define ASIO_OS_DEF_AI_ADDRCONFIG 0x400
+# define ASIO_OS_DEF_SA_RESTART 0x1
+# define ASIO_OS_DEF_SA_NOCLDSTOP 0x2
+# define ASIO_OS_DEF_SA_NOCLDWAIT 0x4
#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
typedef SOCKET socket_type;
const SOCKET invalid_socket = INVALID_SOCKET;
@@ -205,6 +210,7 @@ typedef unsigned long ioctl_arg_type;
typedef u_long u_long_type;
typedef u_short u_short_type;
typedef int signed_size_type;
+struct sockaddr_un_type { u_short sun_family; char sun_path[108]; };
# define ASIO_OS_DEF(c) ASIO_OS_DEF_##c
# define ASIO_OS_DEF_AF_UNSPEC AF_UNSPEC
# define ASIO_OS_DEF_AF_INET AF_INET
@@ -236,6 +242,7 @@ typedef int signed_size_type;
# define ASIO_OS_DEF_SO_DONTROUTE SO_DONTROUTE
# define ASIO_OS_DEF_SO_KEEPALIVE SO_KEEPALIVE
# define ASIO_OS_DEF_SO_LINGER SO_LINGER
+# define ASIO_OS_DEF_SO_OOBINLINE SO_OOBINLINE
# define ASIO_OS_DEF_SO_SNDBUF SO_SNDBUF
# define ASIO_OS_DEF_SO_RCVBUF SO_RCVBUF
# define ASIO_OS_DEF_SO_SNDLOWAT SO_SNDLOWAT
@@ -282,6 +289,9 @@ const int max_iov_len = 64;
# else
const int max_iov_len = 16;
# endif
+# define ASIO_OS_DEF_SA_RESTART 0x1
+# define ASIO_OS_DEF_SA_NOCLDSTOP 0x2
+# define ASIO_OS_DEF_SA_NOCLDWAIT 0x4
#else
typedef int socket_type;
const int invalid_socket = -1;
@@ -351,6 +361,7 @@ typedef int signed_size_type;
# define ASIO_OS_DEF_SO_DONTROUTE SO_DONTROUTE
# define ASIO_OS_DEF_SO_KEEPALIVE SO_KEEPALIVE
# define ASIO_OS_DEF_SO_LINGER SO_LINGER
+# define ASIO_OS_DEF_SO_OOBINLINE SO_OOBINLINE
# define ASIO_OS_DEF_SO_SNDBUF SO_SNDBUF
# define ASIO_OS_DEF_SO_RCVBUF SO_RCVBUF
# define ASIO_OS_DEF_SO_SNDLOWAT SO_SNDLOWAT
@@ -400,6 +411,9 @@ const int max_iov_len = IOV_MAX;
// POSIX platforms are not required to define IOV_MAX.
const int max_iov_len = 16;
# endif
+# define ASIO_OS_DEF_SA_RESTART SA_RESTART
+# define ASIO_OS_DEF_SA_NOCLDSTOP SA_NOCLDSTOP
+# define ASIO_OS_DEF_SA_NOCLDWAIT SA_NOCLDWAIT
#endif
const int custom_socket_option_level = 0xA5100000;
const int enable_connection_aborted_option = 1;
diff --git a/3rdparty/asio/include/asio/detail/source_location.hpp b/3rdparty/asio/include/asio/detail/source_location.hpp
new file mode 100644
index 00000000000..14b74f91435
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/source_location.hpp
@@ -0,0 +1,45 @@
+//
+// detail/source_location.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_SOURCE_LOCATION_HPP
+#define ASIO_DETAIL_SOURCE_LOCATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_SOURCE_LOCATION)
+
+#if defined(ASIO_HAS_STD_SOURCE_LOCATION)
+# include <source_location>
+#elif defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+# include <experimental/source_location>
+#else // defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+# error ASIO_HAS_SOURCE_LOCATION is set \
+ but no source_location is available
+#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_SOURCE_LOCATION)
+using std::source_location;
+#elif defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+using std::experimental::source_location;
+#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_SOURCE_LOCATION)
+
+} // namespace detail
+} // namespace asio
+
+#endif // defined(ASIO_HAS_SOURCE_LOCATION)
+
+#endif // ASIO_DETAIL_SOURCE_LOCATION_HPP
diff --git a/3rdparty/asio/include/asio/detail/static_mutex.hpp b/3rdparty/asio/include/asio/detail/static_mutex.hpp
index 1be0a85af90..b47d087bf4a 100644
--- a/3rdparty/asio/include/asio/detail/static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_static_mutex.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_static_mutex.hpp"
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include "asio/detail/std_static_mutex.hpp"
#else
-# error Only Windows and POSIX are supported!
+# include "asio/detail/std_static_mutex.hpp"
#endif
namespace asio {
@@ -41,7 +39,7 @@ typedef win_static_mutex static_mutex;
#elif defined(ASIO_HAS_PTHREADS)
typedef posix_static_mutex static_mutex;
# define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+#else
typedef std_static_mutex static_mutex;
# define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT
#endif
diff --git a/3rdparty/asio/include/asio/detail/std_event.hpp b/3rdparty/asio/include/asio/detail/std_event.hpp
index e05fcca3316..97a347ed725 100644
--- a/3rdparty/asio/include/asio/detail/std_event.hpp
+++ b/3rdparty/asio/include/asio/detail/std_event.hpp
@@ -2,7 +2,7 @@
// detail/std_event.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#include <chrono>
#include <condition_variable>
#include "asio/detail/assert.hpp"
@@ -73,6 +70,18 @@ public:
cond_.notify_one();
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ template <typename Lock>
+ void unlock_and_signal_one_for_destruction(Lock& lock)
+ {
+ ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ if (have_waiters)
+ cond_.notify_one();
+ lock.unlock();
+ }
+
// If there's a waiter, unlock the mutex and signal it.
template <typename Lock>
bool maybe_unlock_and_signal_one(Lock& lock)
@@ -171,6 +180,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#endif // ASIO_DETAIL_STD_EVENT_HPP
diff --git a/3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp b/3rdparty/asio/include/asio/detail/std_fenced_block.hpp
index c1b599ecd8e..d1e0c603cbc 100644
--- a/3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp
+++ b/3rdparty/asio/include/asio/detail/std_fenced_block.hpp
@@ -1,25 +1,22 @@
//
-// detail/solaris_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// detail/std_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
+#ifndef ASIO_DETAIL_STD_FENCED_BLOCK_HPP
+#define ASIO_DETAIL_STD_FENCED_BLOCK_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(__sun)
-
-#include <atomic.h>
+#include <atomic>
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/push_options.hpp"
@@ -27,7 +24,7 @@
namespace asio {
namespace detail {
-class solaris_fenced_block
+class std_fenced_block
: private noncopyable
{
public:
@@ -35,20 +32,20 @@ public:
enum full_t { full };
// Constructor for a half fenced block.
- explicit solaris_fenced_block(half_t)
+ explicit std_fenced_block(half_t)
{
}
// Constructor for a full fenced block.
- explicit solaris_fenced_block(full_t)
+ explicit std_fenced_block(full_t)
{
- membar_consumer();
+ std::atomic_thread_fence(std::memory_order_acquire);
}
// Destructor.
- ~solaris_fenced_block()
+ ~std_fenced_block()
{
- membar_producer();
+ std::atomic_thread_fence(std::memory_order_release);
}
};
@@ -57,6 +54,4 @@ public:
#include "asio/detail/pop_options.hpp"
-#endif // defined(__sun)
-
-#endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
+#endif // ASIO_DETAIL_STD_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_global.hpp b/3rdparty/asio/include/asio/detail/std_global.hpp
index 416f0d3b548..49ae055ea7d 100644
--- a/3rdparty/asio/include/asio/detail/std_global.hpp
+++ b/3rdparty/asio/include/asio/detail/std_global.hpp
@@ -2,7 +2,7 @@
// detail/std_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_CALL_ONCE)
-
#include <exception>
#include <mutex>
@@ -65,6 +62,4 @@ T& std_global()
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_CALL_ONCE)
-
#endif // ASIO_DETAIL_STD_GLOBAL_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_mutex.hpp b/3rdparty/asio/include/asio/detail/std_mutex.hpp
index 31af56a36d7..06839d69ca3 100644
--- a/3rdparty/asio/include/asio/detail/std_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/std_mutex.hpp
@@ -2,7 +2,7 @@
// detail/std_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#include <mutex>
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/scoped_lock.hpp"
@@ -68,6 +65,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#endif // ASIO_DETAIL_STD_MUTEX_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_static_mutex.hpp b/3rdparty/asio/include/asio/detail/std_static_mutex.hpp
index 166ede9aee9..302b729037d 100644
--- a/3rdparty/asio/include/asio/detail/std_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/std_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/std_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#include <mutex>
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/scoped_lock.hpp"
@@ -76,6 +73,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#endif // ASIO_DETAIL_STD_STATIC_MUTEX_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_thread.hpp b/3rdparty/asio/include/asio/detail/std_thread.hpp
index f6fcec1621f..78bbab9ea10 100644
--- a/3rdparty/asio/include/asio/detail/std_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/std_thread.hpp
@@ -2,7 +2,7 @@
// detail/std_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_THREAD)
-
#include <thread>
#include "asio/detail/noncopyable.hpp"
@@ -66,6 +63,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_THREAD)
-
#endif // ASIO_DETAIL_STD_THREAD_HPP
diff --git a/3rdparty/asio/include/asio/detail/strand_executor_service.hpp b/3rdparty/asio/include/asio/detail/strand_executor_service.hpp
index 5ca77a33196..45536ed5368 100644
--- a/3rdparty/asio/include/asio/detail/strand_executor_service.hpp
+++ b/3rdparty/asio/include/asio/detail/strand_executor_service.hpp
@@ -2,7 +2,7 @@
// detail/strand_executor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,6 +23,8 @@
#include "asio/detail/op_queue.hpp"
#include "asio/detail/scheduler_operation.hpp"
#include "asio/detail/scoped_ptr.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution.hpp"
#include "asio/execution_context.hpp"
#include "asio/detail/push_options.hpp"
@@ -52,6 +54,10 @@ public:
// itself has been scheduled in order to invoke some pending handlers.
bool locked_;
+ // Indicates that the strand has been shut down and will accept no further
+ // handlers.
+ bool shutdown_;
+
// The handlers that are waiting on the strand but should not be run until
// after the next time the strand is scheduled. This queue must only be
// modified while the mutex is locked.
@@ -82,19 +88,35 @@ public:
ASIO_DECL implementation_type create_implementation();
// Request invocation of the given function.
+ template <typename Executor, typename Function>
+ static void execute(const implementation_type& impl, Executor& ex,
+ Function&& function,
+ enable_if_t<
+ can_query<Executor, execution::allocator_t<void>>::value
+ >* = 0);
+
+ // Request invocation of the given function.
+ template <typename Executor, typename Function>
+ static void execute(const implementation_type& impl, Executor& ex,
+ Function&& function,
+ enable_if_t<
+ !can_query<Executor, execution::allocator_t<void>>::value
+ >* = 0);
+
+ // Request invocation of the given function.
template <typename Executor, typename Function, typename Allocator>
static void dispatch(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
static void post(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
static void defer(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Determine whether the strand is running in the current thread.
ASIO_DECL static bool running_in_this_thread(
@@ -102,12 +124,25 @@ public:
private:
friend class strand_impl;
- template <typename Executor> class invoker;
+ template <typename F, typename Allocator> class allocator_binder;
+ template <typename Executor, typename = void> class invoker;
// Adds a function to the strand. Returns true if it acquires the lock.
ASIO_DECL static bool enqueue(const implementation_type& impl,
scheduler_operation* op);
+ // Transfers waiting handlers to the ready queue. Returns true if one or more
+ // handlers were transferred.
+ ASIO_DECL static bool push_waiting_to_ready(implementation_type& impl);
+
+ // Invokes all ready-to-run handlers.
+ ASIO_DECL static void run_ready_handlers(implementation_type& impl);
+
+ // Helper function to request invocation of the given function.
+ template <typename Executor, typename Function, typename Allocator>
+ static void do_execute(const implementation_type& impl, Executor& ex,
+ Function&& function, const Allocator& a);
+
// Mutex to protect access to the service-wide state.
mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/strand_service.hpp b/3rdparty/asio/include/asio/detail/strand_service.hpp
index c5d95e7696f..084eb0b3066 100644
--- a/3rdparty/asio/include/asio/detail/strand_service.hpp
+++ b/3rdparty/asio/include/asio/detail/strand_service.hpp
@@ -2,7 +2,7 @@
// detail/strand_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -96,11 +96,10 @@ public:
const implementation_type& impl) const;
private:
- // Helper function to dispatch a handler. Returns true if the handler should
- // be dispatched immediately.
- ASIO_DECL bool do_dispatch(implementation_type& impl, operation* op);
+ // Helper function to dispatch a handler.
+ ASIO_DECL void do_dispatch(implementation_type& impl, operation* op);
- // Helper fiunction to post a handler.
+ // Helper function to post a handler.
ASIO_DECL void do_post(implementation_type& impl,
operation* op, bool is_continuation);
@@ -108,8 +107,11 @@ private:
operation* base, const asio::error_code& ec,
std::size_t bytes_transferred);
+ // The io_context used to obtain an I/O executor.
+ io_context& io_context_;
+
// The io_context implementation used to post completions.
- io_context_impl& io_context_;
+ io_context_impl& io_context_impl_;
// Mutex to protect access to the array of implementations.
asio::detail::mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/string_view.hpp b/3rdparty/asio/include/asio/detail/string_view.hpp
index 6f4072d04fa..a4470f1e580 100644
--- a/3rdparty/asio/include/asio/detail/string_view.hpp
+++ b/3rdparty/asio/include/asio/detail/string_view.hpp
@@ -2,7 +2,7 @@
// detail/string_view.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,31 +15,33 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#if defined(ASIO_HAS_STD_STRING_VIEW)
-
#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-# include <experimental/string_view>
-#else // defined(ASIO_HAS_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
+
+#if defined(ASIO_HAS_STD_STRING_VIEW)
# include <string_view>
-#endif // defined(ASIO_HAS_EXPERIMENTAL_STRING_VIEW)
+#elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# include <experimental/string_view>
+#else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# error ASIO_HAS_STRING_VIEW is set but no string_view is available
+#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
namespace asio {
-#if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-using std::experimental::basic_string_view;
-using std::experimental::string_view;
-#else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STD_STRING_VIEW)
using std::basic_string_view;
using std::string_view;
+#elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+using std::experimental::basic_string_view;
+using std::experimental::string_view;
#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
} // namespace asio
# define ASIO_STRING_VIEW_PARAM asio::string_view
-#else // defined(ASIO_HAS_STD_STRING_VIEW)
+#else // defined(ASIO_HAS_STRING_VIEW)
# define ASIO_STRING_VIEW_PARAM const std::string&
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
#endif // ASIO_DETAIL_STRING_VIEW_HPP
diff --git a/3rdparty/asio/include/asio/detail/thread.hpp b/3rdparty/asio/include/asio/detail/thread.hpp
index cfb5bad1455..faa7fad2438 100644
--- a/3rdparty/asio/include/asio/detail/thread.hpp
+++ b/3rdparty/asio/include/asio/detail/thread.hpp
@@ -2,7 +2,7 @@
// detail/thread.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#if !defined(ASIO_HAS_THREADS)
# include "asio/detail/null_thread.hpp"
+#elif defined(ASIO_HAS_PTHREADS)
+# include "asio/detail/posix_thread.hpp"
#elif defined(ASIO_WINDOWS)
# if defined(UNDER_CE)
# include "asio/detail/wince_thread.hpp"
@@ -27,12 +29,8 @@
# else
# include "asio/detail/win_thread.hpp"
# endif
-#elif defined(ASIO_HAS_PTHREADS)
-# include "asio/detail/posix_thread.hpp"
-#elif defined(ASIO_HAS_STD_THREAD)
-# include "asio/detail/std_thread.hpp"
#else
-# error Only Windows, POSIX and std::thread are supported!
+# include "asio/detail/std_thread.hpp"
#endif
namespace asio {
@@ -40,6 +38,8 @@ namespace detail {
#if !defined(ASIO_HAS_THREADS)
typedef null_thread thread;
+#elif defined(ASIO_HAS_PTHREADS)
+typedef posix_thread thread;
#elif defined(ASIO_WINDOWS)
# if defined(UNDER_CE)
typedef wince_thread thread;
@@ -48,9 +48,7 @@ typedef winapp_thread thread;
# else
typedef win_thread thread;
# endif
-#elif defined(ASIO_HAS_PTHREADS)
-typedef posix_thread thread;
-#elif defined(ASIO_HAS_STD_THREAD)
+#else
typedef std_thread thread;
#endif
diff --git a/3rdparty/asio/include/asio/detail/thread_context.hpp b/3rdparty/asio/include/asio/detail/thread_context.hpp
index 66d20d6f541..bebfc4a43a2 100644
--- a/3rdparty/asio/include/asio/detail/thread_context.hpp
+++ b/3rdparty/asio/include/asio/detail/thread_context.hpp
@@ -2,7 +2,7 @@
// detail/thread_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,6 +30,11 @@ class thread_info_base;
class thread_context
{
public:
+ // Obtain a pointer to the top of the thread call stack. Returns null when
+ // not running inside a thread context.
+ ASIO_DECL static thread_info_base* top_of_thread_call_stack();
+
+protected:
// Per-thread call stack to track the state of each thread in the context.
typedef call_stack<thread_context, thread_info_base> thread_call_stack;
};
@@ -39,4 +44,8 @@ public:
#include "asio/detail/pop_options.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/thread_context.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
#endif // ASIO_DETAIL_THREAD_CONTEXT_HPP
diff --git a/3rdparty/asio/include/asio/detail/thread_group.hpp b/3rdparty/asio/include/asio/detail/thread_group.hpp
index 312af44c729..5ebff5e185f 100644
--- a/3rdparty/asio/include/asio/detail/thread_group.hpp
+++ b/3rdparty/asio/include/asio/detail/thread_group.hpp
@@ -2,7 +2,7 @@
// detail/thread_group.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,8 @@
#include "asio/detail/scoped_ptr.hpp"
#include "asio/detail/thread.hpp"
+#include "asio/detail/push_options.hpp"
+
namespace asio {
namespace detail {
@@ -64,6 +66,12 @@ public:
}
}
+ // Test whether the group is empty.
+ bool empty() const
+ {
+ return first_ == 0;
+ }
+
private:
// Structure used to track a single thread in the group.
struct item
@@ -86,4 +94,6 @@ private:
} // namespace detail
} // namespace asio
+#include "asio/detail/pop_options.hpp"
+
#endif // ASIO_DETAIL_THREAD_GROUP_HPP
diff --git a/3rdparty/asio/include/asio/detail/thread_info_base.hpp b/3rdparty/asio/include/asio/detail/thread_info_base.hpp
index 5fc26c30970..5a74cef776a 100644
--- a/3rdparty/asio/include/asio/detail/thread_info_base.hpp
+++ b/3rdparty/asio/include/asio/detail/thread_info_base.hpp
@@ -2,7 +2,7 @@
// detail/thread_info_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,72 +15,231 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include "asio/detail/config.hpp"
#include <climits>
#include <cstddef>
+#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
+#if !defined(ASIO_NO_EXCEPTIONS)
+# include <exception>
+# include "asio/multiple_exceptions.hpp"
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
+#ifndef ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE
+# define ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE 2
+#endif // ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE
+
class thread_info_base
: private noncopyable
{
public:
+ struct default_tag
+ {
+ enum
+ {
+ cache_size = ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE,
+ begin_mem_index = 0,
+ end_mem_index = cache_size
+ };
+ };
+
+ struct awaitable_frame_tag
+ {
+ enum
+ {
+ cache_size = ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE,
+ begin_mem_index = default_tag::end_mem_index,
+ end_mem_index = begin_mem_index + cache_size
+ };
+ };
+
+ struct executor_function_tag
+ {
+ enum
+ {
+ cache_size = ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE,
+ begin_mem_index = awaitable_frame_tag::end_mem_index,
+ end_mem_index = begin_mem_index + cache_size
+ };
+ };
+
+ struct cancellation_signal_tag
+ {
+ enum
+ {
+ cache_size = ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE,
+ begin_mem_index = executor_function_tag::end_mem_index,
+ end_mem_index = begin_mem_index + cache_size
+ };
+ };
+
+ struct parallel_group_tag
+ {
+ enum
+ {
+ cache_size = ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE,
+ begin_mem_index = cancellation_signal_tag::end_mem_index,
+ end_mem_index = begin_mem_index + cache_size
+ };
+ };
+
+ enum { max_mem_index = parallel_group_tag::end_mem_index };
+
thread_info_base()
- : reusable_memory_(0)
+#if !defined(ASIO_NO_EXCEPTIONS)
+ : has_pending_exception_(0)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
{
+ for (int i = 0; i < max_mem_index; ++i)
+ reusable_memory_[i] = 0;
}
~thread_info_base()
{
- if (reusable_memory_)
- ::operator delete(reusable_memory_);
+ for (int i = 0; i < max_mem_index; ++i)
+ {
+ // The following test for non-null pointers is technically redundant, but
+ // it is significantly faster when using a tight io_context::poll() loop
+ // in latency sensitive applications.
+ if (reusable_memory_[i])
+ aligned_delete(reusable_memory_[i]);
+ }
}
- static void* allocate(thread_info_base* this_thread, std::size_t size)
+ static void* allocate(thread_info_base* this_thread,
+ std::size_t size, std::size_t align = ASIO_DEFAULT_ALIGN)
{
- if (this_thread && this_thread->reusable_memory_)
- {
- void* const pointer = this_thread->reusable_memory_;
- this_thread->reusable_memory_ = 0;
+ return allocate(default_tag(), this_thread, size, align);
+ }
- unsigned char* const mem = static_cast<unsigned char*>(pointer);
- if (static_cast<std::size_t>(mem[0]) >= size)
+ static void deallocate(thread_info_base* this_thread,
+ void* pointer, std::size_t size)
+ {
+ deallocate(default_tag(), this_thread, pointer, size);
+ }
+
+ template <typename Purpose>
+ static void* allocate(Purpose, thread_info_base* this_thread,
+ std::size_t size, std::size_t align = ASIO_DEFAULT_ALIGN)
+ {
+ std::size_t chunks = (size + chunk_size - 1) / chunk_size;
+
+ if (this_thread)
+ {
+ for (int mem_index = Purpose::begin_mem_index;
+ mem_index < Purpose::end_mem_index; ++mem_index)
{
- mem[size] = mem[0];
- return pointer;
+ if (this_thread->reusable_memory_[mem_index])
+ {
+ void* const pointer = this_thread->reusable_memory_[mem_index];
+ unsigned char* const mem = static_cast<unsigned char*>(pointer);
+ if (static_cast<std::size_t>(mem[0]) >= chunks
+ && reinterpret_cast<std::size_t>(pointer) % align == 0)
+ {
+ this_thread->reusable_memory_[mem_index] = 0;
+ mem[size] = mem[0];
+ return pointer;
+ }
+ }
}
- ::operator delete(pointer);
+ for (int mem_index = Purpose::begin_mem_index;
+ mem_index < Purpose::end_mem_index; ++mem_index)
+ {
+ if (this_thread->reusable_memory_[mem_index])
+ {
+ void* const pointer = this_thread->reusable_memory_[mem_index];
+ this_thread->reusable_memory_[mem_index] = 0;
+ aligned_delete(pointer);
+ break;
+ }
+ }
}
- void* const pointer = ::operator new(size + 1);
+ void* const pointer = aligned_new(align, chunks * chunk_size + 1);
unsigned char* const mem = static_cast<unsigned char*>(pointer);
- mem[size] = (size <= UCHAR_MAX) ? static_cast<unsigned char>(size) : 0;
+ mem[size] = (chunks <= UCHAR_MAX) ? static_cast<unsigned char>(chunks) : 0;
return pointer;
}
- static void deallocate(thread_info_base* this_thread,
+ template <typename Purpose>
+ static void deallocate(Purpose, thread_info_base* this_thread,
void* pointer, std::size_t size)
{
- if (size <= UCHAR_MAX)
+ if (size <= chunk_size * UCHAR_MAX)
{
- if (this_thread && this_thread->reusable_memory_ == 0)
+ if (this_thread)
{
- unsigned char* const mem = static_cast<unsigned char*>(pointer);
- mem[0] = mem[size];
- this_thread->reusable_memory_ = pointer;
- return;
+ for (int mem_index = Purpose::begin_mem_index;
+ mem_index < Purpose::end_mem_index; ++mem_index)
+ {
+ if (this_thread->reusable_memory_[mem_index] == 0)
+ {
+ unsigned char* const mem = static_cast<unsigned char*>(pointer);
+ mem[0] = mem[size];
+ this_thread->reusable_memory_[mem_index] = pointer;
+ return;
+ }
+ }
}
}
- ::operator delete(pointer);
+ aligned_delete(pointer);
+ }
+
+ void capture_current_exception()
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ switch (has_pending_exception_)
+ {
+ case 0:
+ has_pending_exception_ = 1;
+ pending_exception_ = std::current_exception();
+ break;
+ case 1:
+ has_pending_exception_ = 2;
+ pending_exception_ =
+ std::make_exception_ptr<multiple_exceptions>(
+ multiple_exceptions(pending_exception_));
+ break;
+ default:
+ break;
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
+
+ void rethrow_pending_exception()
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ if (has_pending_exception_ > 0)
+ {
+ has_pending_exception_ = 0;
+ std::exception_ptr ex(
+ static_cast<std::exception_ptr&&>(
+ pending_exception_));
+ std::rethrow_exception(ex);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
private:
- void* reusable_memory_;
+#if defined(ASIO_HAS_IO_URING)
+ enum { chunk_size = 8 };
+#else // defined(ASIO_HAS_IO_URING)
+ enum { chunk_size = 4 };
+#endif // defined(ASIO_HAS_IO_URING)
+ void* reusable_memory_[max_mem_index];
+
+#if !defined(ASIO_NO_EXCEPTIONS)
+ int has_pending_exception_;
+ std::exception_ptr pending_exception_;
+#endif // !defined(ASIO_NO_EXCEPTIONS)
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/throw_error.hpp b/3rdparty/asio/include/asio/detail/throw_error.hpp
index 3c1d59cd36d..881c3128576 100644
--- a/3rdparty/asio/include/asio/detail/throw_error.hpp
+++ b/3rdparty/asio/include/asio/detail/throw_error.hpp
@@ -2,7 +2,7 @@
// detail/throw_error.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/throw_exception.hpp"
#include "asio/error_code.hpp"
#include "asio/detail/push_options.hpp"
@@ -23,22 +24,30 @@
namespace asio {
namespace detail {
-ASIO_DECL void do_throw_error(const asio::error_code& err);
+ASIO_DECL void do_throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_PARAM);
-ASIO_DECL void do_throw_error(const asio::error_code& err,
- const char* location);
+ASIO_DECL void do_throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_PARAM);
-inline void throw_error(const asio::error_code& err)
+inline void throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_DEFAULTED_PARAM)
{
if (err)
- do_throw_error(err);
+ do_throw_error(err ASIO_SOURCE_LOCATION_ARG);
}
-inline void throw_error(const asio::error_code& err,
- const char* location)
+inline void throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_DEFAULTED_PARAM)
{
if (err)
- do_throw_error(err, location);
+ do_throw_error(err, location ASIO_SOURCE_LOCATION_ARG);
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/throw_exception.hpp b/3rdparty/asio/include/asio/detail/throw_exception.hpp
index a0c3cf85eaa..e939c1093f6 100644
--- a/3rdparty/asio/include/asio/detail/throw_exception.hpp
+++ b/3rdparty/asio/include/asio/detail/throw_exception.hpp
@@ -2,7 +2,7 @@
// detail/throw_exception.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,14 +30,18 @@ using boost::throw_exception;
// Declare the throw_exception function for all targets.
template <typename Exception>
-void throw_exception(const Exception& e);
+void throw_exception(
+ const Exception& e
+ ASIO_SOURCE_LOCATION_DEFAULTED_PARAM);
// Only define the throw_exception function when exceptions are enabled.
// Otherwise, it is up to the application to provide a definition of this
// function.
# if !defined(ASIO_NO_EXCEPTIONS)
template <typename Exception>
-void throw_exception(const Exception& e)
+void throw_exception(
+ const Exception& e
+ ASIO_SOURCE_LOCATION_PARAM)
{
throw e;
}
diff --git a/3rdparty/asio/include/asio/detail/timer_queue.hpp b/3rdparty/asio/include/asio/detail/timer_queue.hpp
index 1575e03af7b..843f3614da0 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -150,7 +150,12 @@ public:
while (!heap_.empty() && !Time_Traits::less_than(now, heap_[0].time_))
{
per_timer_data* timer = heap_[0].timer_;
- ops.push(timer->op_queue_);
+ while (wait_op* op = timer->op_queue_.front())
+ {
+ timer->op_queue_.pop();
+ op->ec_ = asio::error_code();
+ ops.push(op);
+ }
remove_timer(*timer);
}
}
@@ -192,6 +197,30 @@ public:
return num_cancelled;
}
+ // Cancel and dequeue a specific operation for the given timer.
+ void cancel_timer_by_key(per_timer_data* timer,
+ op_queue<operation>& ops, void* cancellation_key)
+ {
+ if (timer->prev_ != 0 || timer == timers_)
+ {
+ op_queue<wait_op> other_ops;
+ while (wait_op* op = timer->op_queue_.front())
+ {
+ timer->op_queue_.pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ else
+ other_ops.push(op);
+ }
+ timer->op_queue_.push(other_ops);
+ if (timer->op_queue_.empty())
+ remove_timer(*timer);
+ }
+ }
+
// Move operations from one timer to another, empty timer.
void move_timer(per_timer_data& target, per_timer_data& source)
{
@@ -266,11 +295,13 @@ private:
{
if (index == heap_.size() - 1)
{
+ timer.heap_index_ = (std::numeric_limits<std::size_t>::max)();
heap_.pop_back();
}
else
{
swap_heap(index, heap_.size() - 1);
+ timer.heap_index_ = (std::numeric_limits<std::size_t>::max)();
heap_.pop_back();
if (index > 0 && Time_Traits::less_than(
heap_[index].time_, heap_[(index - 1) / 2].time_))
diff --git a/3rdparty/asio/include/asio/detail/timer_queue_base.hpp b/3rdparty/asio/include/asio/detail/timer_queue_base.hpp
index 326d05556d9..ddcf41c1371 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue_base.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue_base.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp b/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp
index 9d3cb7d0c93..937a4ad85fa 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_ptime.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -31,7 +31,7 @@ struct forwarding_posix_time_traits : time_traits<boost::posix_time::ptime> {};
// Template specialisation for the commonly used instantation.
template <>
-class timer_queue<time_traits<boost::posix_time::ptime> >
+class timer_queue<time_traits<boost::posix_time::ptime>>
: public timer_queue_base
{
public:
@@ -77,6 +77,10 @@ public:
per_timer_data& timer, op_queue<operation>& ops,
std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+ // Cancel and dequeue operations for the given timer and key.
+ ASIO_DECL void cancel_timer_by_key(per_timer_data* timer,
+ op_queue<operation>& ops, void* cancellation_key);
+
// Move operations from one timer to another, empty timer.
ASIO_DECL void move_timer(per_timer_data& target,
per_timer_data& source);
diff --git a/3rdparty/asio/include/asio/detail/timer_queue_set.hpp b/3rdparty/asio/include/asio/detail/timer_queue_set.hpp
index 38f46d1e0da..7bf50747be1 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue_set.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue_set.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_set.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/timer_scheduler.hpp b/3rdparty/asio/include/asio/detail/timer_scheduler.hpp
index 190731675e7..dd34d328c84 100644
--- a/3rdparty/asio/include/asio/detail/timer_scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,6 +22,8 @@
# include "asio/detail/winrt_timer_scheduler.hpp"
#elif defined(ASIO_HAS_IOCP)
# include "asio/detail/win_iocp_io_context.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
#elif defined(ASIO_HAS_EPOLL)
# include "asio/detail/epoll_reactor.hpp"
#elif defined(ASIO_HAS_KQUEUE)
diff --git a/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp b/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp
index cf27b8c0c93..bbb8a4e8ded 100644
--- a/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp
@@ -2,7 +2,7 @@
// detail/timer_scheduler_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,6 +24,8 @@ namespace detail {
typedef class winrt_timer_scheduler timer_scheduler;
#elif defined(ASIO_HAS_IOCP)
typedef class win_iocp_io_context timer_scheduler;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+typedef class io_uring_service timer_scheduler;
#elif defined(ASIO_HAS_EPOLL)
typedef class epoll_reactor timer_scheduler;
#elif defined(ASIO_HAS_KQUEUE)
diff --git a/3rdparty/asio/include/asio/detail/tss_ptr.hpp b/3rdparty/asio/include/asio/detail/tss_ptr.hpp
index 2d0306153d6..f7aaa2ec29c 100644
--- a/3rdparty/asio/include/asio/detail/tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/type_traits.hpp b/3rdparty/asio/include/asio/detail/type_traits.hpp
index 08665891520..a4706a5ff1c 100644
--- a/3rdparty/asio/include/asio/detail/type_traits.hpp
+++ b/3rdparty/asio/include/asio/detail/type_traits.hpp
@@ -2,7 +2,7 @@
// detail/type_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,64 +16,162 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_TYPE_TRAITS)
-# include <type_traits>
-#else // defined(ASIO_HAS_TYPE_TRAITS)
-# include <boost/type_traits/add_const.hpp>
-# include <boost/type_traits/conditional.hpp>
-# include <boost/type_traits/decay.hpp>
-# include <boost/type_traits/integral_constant.hpp>
-# include <boost/type_traits/is_base_of.hpp>
-# include <boost/type_traits/is_class.hpp>
-# include <boost/type_traits/is_const.hpp>
-# include <boost/type_traits/is_convertible.hpp>
-# include <boost/type_traits/is_function.hpp>
-# include <boost/type_traits/is_same.hpp>
-# include <boost/type_traits/remove_pointer.hpp>
-# include <boost/type_traits/remove_reference.hpp>
-# include <boost/utility/enable_if.hpp>
-# include <boost/utility/result_of.hpp>
-#endif // defined(ASIO_HAS_TYPE_TRAITS)
+#include <type_traits>
namespace asio {
-#if defined(ASIO_HAS_STD_TYPE_TRAITS)
using std::add_const;
+
+template <typename T>
+using add_const_t = typename std::add_const<T>::type;
+
+using std::add_lvalue_reference;
+
+template <typename T>
+using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type;
+
+template <std::size_t N, std::size_t A>
+struct aligned_storage
+{
+ struct type
+ {
+ alignas(A) unsigned char data[N];
+ };
+};
+
+template <std::size_t N, std::size_t A>
+using aligned_storage_t = typename aligned_storage<N, A>::type;
+
+using std::alignment_of;
+
using std::conditional;
+
+template <bool C, typename T, typename U>
+using conditional_t = typename std::conditional<C, T, U>::type;
+
using std::decay;
+
+template <typename T>
+using decay_t = typename std::decay<T>::type;
+
+using std::declval;
+
using std::enable_if;
+
+template <bool C, typename T = void>
+using enable_if_t = typename std::enable_if<C, T>::type;
+
using std::false_type;
+
using std::integral_constant;
+
using std::is_base_of;
+
using std::is_class;
+
using std::is_const;
+
+using std::is_constructible;
+
using std::is_convertible;
+
+using std::is_copy_constructible;
+
+using std::is_destructible;
+
using std::is_function;
+
+using std::is_move_constructible;
+
+using std::is_nothrow_copy_constructible;
+
+using std::is_nothrow_destructible;
+
+using std::is_object;
+
+using std::is_pointer;
+
+using std::is_reference;
+
using std::is_same;
+
+using std::is_scalar;
+
+using std::remove_cv;
+
+template <typename T>
+using remove_cv_t = typename std::remove_cv<T>::type;
+
+template <typename T>
+struct remove_cvref :
+ std::remove_cv<typename std::remove_reference<T>::type> {};
+
+template <typename T>
+using remove_cvref_t = typename remove_cvref<T>::type;
+
using std::remove_pointer;
+
+template <typename T>
+using remove_pointer_t = typename std::remove_pointer<T>::type;
+
using std::remove_reference;
+
+template <typename T>
+using remove_reference_t = typename std::remove_reference<T>::type;
+
+#if defined(ASIO_HAS_STD_INVOKE_RESULT)
+
+template <typename> struct result_of;
+
+template <typename F, typename... Args>
+struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
+
+template <typename T>
+using result_of_t = typename result_of<T>::type;
+
+#else // defined(ASIO_HAS_STD_INVOKE_RESULT)
+
using std::result_of;
+
+template <typename T>
+using result_of_t = typename std::result_of<T>::type;
+
+#endif // defined(ASIO_HAS_STD_INVOKE_RESULT)
+
using std::true_type;
-#else // defined(ASIO_HAS_STD_TYPE_TRAITS)
-using boost::add_const;
-template <bool Condition, typename Type = void>
-struct enable_if : boost::enable_if_c<Condition, Type> {};
-using boost::conditional;
-using boost::decay;
-using boost::false_type;
-using boost::integral_constant;
-using boost::is_base_of;
-using boost::is_class;
-using boost::is_const;
-using boost::is_convertible;
-using boost::is_function;
-using boost::is_same;
-using boost::remove_pointer;
-using boost::remove_reference;
-using boost::result_of;
-using boost::true_type;
-#endif // defined(ASIO_HAS_STD_TYPE_TRAITS)
+
+template <typename> struct void_type
+{
+ typedef void type;
+};
+
+template <typename T>
+using void_t = typename void_type<T>::type;
+
+template <typename...> struct conjunction : true_type {};
+
+template <typename T> struct conjunction<T> : T {};
+
+template <typename Head, typename... Tail>
+struct conjunction<Head, Tail...> :
+ conditional_t<Head::value, conjunction<Tail...>, Head> {};
+
+struct defaulted_constraint
+{
+ constexpr defaulted_constraint() {}
+};
+
+template <bool Condition, typename Type = int>
+struct constraint : std::enable_if<Condition, Type> {};
+
+template <bool Condition, typename Type = int>
+using constraint_t = typename constraint<Condition, Type>::type;
+
+template <typename T>
+struct type_identity { typedef T type; };
+
+template <typename T>
+using type_identity_t = typename type_identity<T>::type;
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/utility.hpp b/3rdparty/asio/include/asio/detail/utility.hpp
new file mode 100644
index 00000000000..72dd4d43190
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/utility.hpp
@@ -0,0 +1,83 @@
+//
+// detail/utility.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_UTILITY_HPP
+#define ASIO_DETAIL_UTILITY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <utility>
+
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
+using std::index_sequence;
+using std::index_sequence_for;
+using std::make_index_sequence;
+
+#else // defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
+template <std::size_t...>
+struct index_sequence
+{
+};
+
+template <typename T, typename U>
+struct join_index_sequences;
+
+template <std::size_t... I, std::size_t... J>
+struct join_index_sequences<index_sequence<I...>, index_sequence<J...>>
+{
+ using type = index_sequence<I..., J...>;
+};
+
+template <std::size_t First, std::size_t Last>
+struct index_pack :
+ join_index_sequences<
+ typename index_pack<First, First + (Last - First + 1) / 2 - 1>::type,
+ typename index_pack<First + (Last - First + 1) / 2, Last>::type
+ >
+{
+};
+
+template <std::size_t N>
+struct index_pack<N, N>
+{
+ using type = index_sequence<N>;
+};
+
+template <std::size_t Begin, std::size_t End>
+struct index_range : index_pack<Begin, End - 1>
+{
+};
+
+template <std::size_t N>
+struct index_range<N, N>
+{
+ using type = index_sequence<>;
+};
+
+template <typename... T>
+using index_sequence_for = typename index_range<0, sizeof...(T)>::type;
+
+template <std::size_t N>
+using make_index_sequence = typename index_range<0, N>::type;
+
+#endif // defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
+} // namespace detail
+} // namespace asio
+
+#endif // ASIO_DETAIL_UTILITY_HPP
diff --git a/3rdparty/asio/include/asio/detail/variadic_templates.hpp b/3rdparty/asio/include/asio/detail/variadic_templates.hpp
deleted file mode 100644
index 272ae28351e..00000000000
--- a/3rdparty/asio/include/asio/detail/variadic_templates.hpp
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// detail/variadic_templates.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
-#define ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# define ASIO_VARIADIC_TPARAMS(n) ASIO_VARIADIC_TPARAMS_##n
-
-# define ASIO_VARIADIC_TPARAMS_1 \
- typename T1
-# define ASIO_VARIADIC_TPARAMS_2 \
- typename T1, typename T2
-# define ASIO_VARIADIC_TPARAMS_3 \
- typename T1, typename T2, typename T3
-# define ASIO_VARIADIC_TPARAMS_4 \
- typename T1, typename T2, typename T3, typename T4
-# define ASIO_VARIADIC_TPARAMS_5 \
- typename T1, typename T2, typename T3, typename T4, typename T5
-
-# define ASIO_VARIADIC_TARGS(n) ASIO_VARIADIC_TARGS_##n
-
-# define ASIO_VARIADIC_TARGS_1 T1
-# define ASIO_VARIADIC_TARGS_2 T1, T2
-# define ASIO_VARIADIC_TARGS_3 T1, T2, T3
-# define ASIO_VARIADIC_TARGS_4 T1, T2, T3, T4
-# define ASIO_VARIADIC_TARGS_5 T1, T2, T3, T4, T5
-
-# define ASIO_VARIADIC_BYVAL_PARAMS(n) \
- ASIO_VARIADIC_BYVAL_PARAMS_##n
-
-# define ASIO_VARIADIC_BYVAL_PARAMS_1 T1 x1
-# define ASIO_VARIADIC_BYVAL_PARAMS_2 T1 x1, T2 x2
-# define ASIO_VARIADIC_BYVAL_PARAMS_3 T1 x1, T2 x2, T3 x3
-# define ASIO_VARIADIC_BYVAL_PARAMS_4 T1 x1, T2 x2, T3 x3, T4 x4
-# define ASIO_VARIADIC_BYVAL_PARAMS_5 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5
-
-# define ASIO_VARIADIC_BYVAL_ARGS(n) \
- ASIO_VARIADIC_BYVAL_ARGS_##n
-
-# define ASIO_VARIADIC_BYVAL_ARGS_1 x1
-# define ASIO_VARIADIC_BYVAL_ARGS_2 x1, x2
-# define ASIO_VARIADIC_BYVAL_ARGS_3 x1, x2, x3
-# define ASIO_VARIADIC_BYVAL_ARGS_4 x1, x2, x3, x4
-# define ASIO_VARIADIC_BYVAL_ARGS_5 x1, x2, x3, x4, x5
-
-# define ASIO_VARIADIC_MOVE_PARAMS(n) \
- ASIO_VARIADIC_MOVE_PARAMS_##n
-
-# define ASIO_VARIADIC_MOVE_PARAMS_1 \
- ASIO_MOVE_ARG(T1) x1
-# define ASIO_VARIADIC_MOVE_PARAMS_2 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2
-# define ASIO_VARIADIC_MOVE_PARAMS_3 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3
-# define ASIO_VARIADIC_MOVE_PARAMS_4 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4
-# define ASIO_VARIADIC_MOVE_PARAMS_5 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4, \
- ASIO_MOVE_ARG(T5) x5
-
-# define ASIO_VARIADIC_MOVE_ARGS(n) \
- ASIO_VARIADIC_MOVE_ARGS_##n
-
-# define ASIO_VARIADIC_MOVE_ARGS_1 \
- ASIO_MOVE_CAST(T1)(x1)
-# define ASIO_VARIADIC_MOVE_ARGS_2 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2)
-# define ASIO_VARIADIC_MOVE_ARGS_3 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3)
-# define ASIO_VARIADIC_MOVE_ARGS_4 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4)
-# define ASIO_VARIADIC_MOVE_ARGS_5 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4), \
- ASIO_MOVE_CAST(T5)(x5)
-
-# define ASIO_VARIADIC_DECAY(n) \
- ASIO_VARIADIC_DECAY_##n
-
-# define ASIO_VARIADIC_DECAY_1 \
- typename decay<T1>::type
-# define ASIO_VARIADIC_DECAY_2 \
- typename decay<T1>::type, typename decay<T2>::type
-# define ASIO_VARIADIC_DECAY_3 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type
-# define ASIO_VARIADIC_DECAY_4 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type
-# define ASIO_VARIADIC_DECAY_5 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type, \
- typename decay<T5>::type
-
-# define ASIO_VARIADIC_GENERATE(m) m(1) m(2) m(3) m(4) m(5)
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
diff --git a/3rdparty/asio/include/asio/detail/wait_handler.hpp b/3rdparty/asio/include/asio/detail/wait_handler.hpp
index 29bcfd75f1c..489a968cd77 100644
--- a/3rdparty/asio/include/asio/detail/wait_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/wait_handler.hpp
@@ -2,7 +2,7 @@
// detail/wait_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,29 +16,29 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/wait_op.hpp"
-#include "asio/io_context.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class wait_handler : public wait_op
{
public:
ASIO_DEFINE_HANDLER_PTR(wait_handler);
- wait_handler(Handler& h)
+ wait_handler(Handler& h, const IoExecutor& io_ex)
: wait_op(&wait_handler::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h))
+ handler_(static_cast<Handler&&>(h)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -48,10 +48,14 @@ public:
// Take ownership of the handler object.
wait_handler* h(static_cast<wait_handler*>(base));
ptr p = { asio::detail::addressof(h->handler_), h, h };
- handler_work<Handler> w(h->handler_);
ASIO_HANDLER_COMPLETION((*h));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ h->work_));
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -75,6 +79,7 @@ public:
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/wait_op.hpp b/3rdparty/asio/include/asio/detail/wait_op.hpp
index 68bb86fd80c..548232c1c55 100644
--- a/3rdparty/asio/include/asio/detail/wait_op.hpp
+++ b/3rdparty/asio/include/asio/detail/wait_op.hpp
@@ -2,7 +2,7 @@
// detail/wait_op.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,9 +30,13 @@ public:
// The error code to be passed to the completion handler.
asio::error_code ec_;
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+
protected:
wait_op(func_type func)
- : operation(func)
+ : operation(func),
+ cancellation_key_(0)
{
}
};
diff --git a/3rdparty/asio/include/asio/detail/win_event.hpp b/3rdparty/asio/include/asio/detail/win_event.hpp
index aa04fd5edd3..e61843e5b9d 100644
--- a/3rdparty/asio/include/asio/detail/win_event.hpp
+++ b/3rdparty/asio/include/asio/detail/win_event.hpp
@@ -2,7 +2,7 @@
// detail/win_event.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#if defined(ASIO_WINDOWS)
+#include <cstddef>
#include "asio/detail/assert.hpp"
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/socket_types.hpp"
@@ -67,6 +68,18 @@ public:
::SetEvent(events_[1]);
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ template <typename Lock>
+ void unlock_and_signal_one_for_destruction(Lock& lock)
+ {
+ ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ if (have_waiters)
+ ::SetEvent(events_[1]);
+ lock.unlock();
+ }
+
// If there's a waiter, unlock the mutex and signal it.
template <typename Lock>
bool maybe_unlock_and_signal_one(Lock& lock)
diff --git a/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp b/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp
index 7d288f6244a..0e3e63f0c25 100644
--- a/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/win_fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/win_fenced_block.hpp b/3rdparty/asio/include/asio/detail/win_fenced_block.hpp
deleted file mode 100644
index 42846ca7e96..00000000000
--- a/3rdparty/asio/include/asio/detail/win_fenced_block.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// detail/win_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-
-#include "asio/detail/socket_types.hpp"
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class win_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit win_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit win_fenced_block(full_t)
- {
-#if defined(__BORLANDC__)
- LONG barrier = 0;
- ::InterlockedExchange(&barrier, 1);
-#elif defined(ASIO_MSVC) \
- && ((ASIO_MSVC < 1400) || !defined(MemoryBarrier))
-# if defined(_M_IX86)
-# pragma warning(push)
-# pragma warning(disable:4793)
- LONG barrier;
- __asm { xchg barrier, eax }
-# pragma warning(pop)
-# endif // defined(_M_IX86)
-#else
- MemoryBarrier();
-#endif
- }
-
- // Destructor.
- ~win_fenced_block()
- {
-#if defined(__BORLANDC__)
- LONG barrier = 0;
- ::InterlockedExchange(&barrier, 1);
-#elif defined(ASIO_MSVC) \
- && ((ASIO_MSVC < 1400) || !defined(MemoryBarrier))
-# if defined(_M_IX86)
-# pragma warning(push)
-# pragma warning(disable:4793)
- LONG barrier;
- __asm { xchg barrier, eax }
-# pragma warning(pop)
-# endif // defined(_M_IX86)
-#else
- MemoryBarrier();
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-
-#endif // ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/win_global.hpp b/3rdparty/asio/include/asio/detail/win_global.hpp
index 92ebdadfa8b..771f3fcba4b 100644
--- a/3rdparty/asio/include/asio/detail/win_global.hpp
+++ b/3rdparty/asio/include/asio/detail/win_global.hpp
@@ -2,7 +2,7 @@
// detail/win_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -35,7 +35,7 @@ struct win_global_impl
static win_global_impl instance_;
static static_mutex mutex_;
- static T* ptr_;
+ T* ptr_;
static tss_ptr<T> tss_ptr_;
};
@@ -46,9 +46,6 @@ template <typename T>
static_mutex win_global_impl<T>::mutex_ = ASIO_STATIC_MUTEX_INIT;
template <typename T>
-T* win_global_impl<T>::ptr_ = 0;
-
-template <typename T>
tss_ptr<T> win_global_impl<T>::tss_ptr_;
template <typename T>
@@ -58,8 +55,9 @@ T& win_global()
{
win_global_impl<T>::mutex_.init();
static_mutex::scoped_lock lock(win_global_impl<T>::mutex_);
- win_global_impl<T>::ptr_ = new T;
- win_global_impl<T>::tss_ptr_ = win_global_impl<T>::ptr_;
+ if (win_global_impl<T>::instance_.ptr_ == 0)
+ win_global_impl<T>::instance_.ptr_ = new T;
+ win_global_impl<T>::tss_ptr_ = win_global_impl<T>::instance_.ptr_;
}
return *win_global_impl<T>::tss_ptr_;
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp
new file mode 100644
index 00000000000..f10a8d3cdf4
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp
@@ -0,0 +1,287 @@
+//
+// detail/win_iocp_file_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_WIN_IOCP_FILE_SERVICE_HPP
+#define ASIO_DETAIL_WIN_IOCP_FILE_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IOCP) && defined(ASIO_HAS_FILE)
+
+#include <string>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/win_iocp_handle_service.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/file_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Extend win_iocp_handle_service to provide file support.
+class win_iocp_file_service :
+ public execution_context_service_base<win_iocp_file_service>
+{
+public:
+ // The native type of a file.
+ typedef win_iocp_handle_service::native_handle_type native_handle_type;
+
+ // The implementation type of the file.
+ class implementation_type : win_iocp_handle_service::implementation_type
+ {
+ private:
+ // Only this service will have access to the internal values.
+ friend class win_iocp_file_service;
+
+ uint64_t offset_;
+ bool is_stream_;
+ };
+
+ // Constructor.
+ ASIO_DECL win_iocp_file_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Construct a new file implementation.
+ void construct(implementation_type& impl)
+ {
+ handle_service_.construct(impl);
+ impl.offset_ = 0;
+ impl.is_stream_ = false;
+ }
+
+ // Move-construct a new file implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ handle_service_.move_construct(impl, other_impl);
+ impl.offset_ = other_impl.offset_;
+ impl.is_stream_ = other_impl.is_stream_;
+ other_impl.offset_ = 0;
+ }
+
+ // Move-assign from another file implementation.
+ void move_assign(implementation_type& impl,
+ win_iocp_file_service& other_service,
+ implementation_type& other_impl)
+ {
+ handle_service_.move_assign(impl,
+ other_service.handle_service_, other_impl);
+ impl.offset_ = other_impl.offset_;
+ impl.is_stream_ = other_impl.is_stream_;
+ other_impl.offset_ = 0;
+ }
+
+ // Destroy a file implementation.
+ void destroy(implementation_type& impl)
+ {
+ handle_service_.destroy(impl);
+ }
+
+ // Set whether the implementation is stream-oriented.
+ void set_is_stream(implementation_type& impl, bool is_stream)
+ {
+ impl.is_stream_ = is_stream;
+ }
+
+ // Open the file using the specified path name.
+ ASIO_DECL asio::error_code open(implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec);
+
+ // Assign a native handle to a file implementation.
+ asio::error_code assign(implementation_type& impl,
+ const native_handle_type& native_handle,
+ asio::error_code& ec)
+ {
+ return handle_service_.assign(impl, native_handle, ec);
+ }
+
+ // Determine whether the file is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return handle_service_.is_open(impl);
+ }
+
+ // Destroy a file implementation.
+ asio::error_code close(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return handle_service_.close(impl, ec);
+ }
+
+ // Get the native file representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return handle_service_.native_handle(impl);
+ }
+
+ // Release ownership of a file.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return handle_service_.release(impl, ec);
+ }
+
+ // Cancel all operations associated with the file.
+ asio::error_code cancel(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return handle_service_.cancel(impl, ec);
+ }
+
+ // Get the size of the file.
+ ASIO_DECL uint64_t size(const implementation_type& impl,
+ asio::error_code& ec) const;
+
+ // Alter the size of the file.
+ ASIO_DECL asio::error_code resize(implementation_type& impl,
+ uint64_t n, asio::error_code& ec);
+
+ // Synchronise the file to disk.
+ ASIO_DECL asio::error_code sync_all(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Synchronise the file data to disk.
+ ASIO_DECL asio::error_code sync_data(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Seek to a position in the file.
+ ASIO_DECL uint64_t seek(implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec);
+
+ // Write the given data. Returns the number of bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ return handle_service_.write_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ handle_service_.async_write_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+ // Write the given data at the specified location. Returns the number of
+ // bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return handle_service_.write_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous write at the specified location. The data being
+ // written must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ handle_service_.async_write_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ return handle_service_.read_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ handle_service_.async_read_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return handle_service_.read_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ handle_service_.async_read_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+private:
+ // The implementation used for initiating asynchronous operations.
+ win_iocp_handle_service handle_service_;
+
+ // Emulation of Windows IO_STATUS_BLOCK structure.
+ struct io_status_block
+ {
+ union u
+ {
+ LONG Status;
+ void* Pointer;
+ };
+ ULONG_PTR Information;
+ };
+
+ // Emulation of flag passed to NtFlushBuffersFileEx.
+ enum { flush_flags_file_data_sync_only = 4 };
+
+ // The type of a NtFlushBuffersFileEx function pointer.
+ typedef LONG (NTAPI *nt_flush_buffers_file_ex_fn)(
+ HANDLE, ULONG, void*, ULONG, io_status_block*);
+
+ // The NTFlushBuffersFileEx function pointer.
+ nt_flush_buffers_file_ex_fn nt_flush_buffers_file_ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/win_iocp_file_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IOCP) && defined(ASIO_HAS_FILE)
+
+#endif // ASIO_DETAIL_WIN_IOCP_FILE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp
index c3ff79b0959..9721bda1c21 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -20,33 +20,33 @@
#if defined(ASIO_HAS_IOCP)
-#include "asio/error.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
+#include "asio/error.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class win_iocp_handle_read_op : public operation
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_read_op);
- win_iocp_handle_read_op(
- const MutableBufferSequence& buffers, Handler& handler)
+ win_iocp_handle_read_op(const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_handle_read_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -56,12 +56,17 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_handle_read_op* o(static_cast<win_iocp_handle_read_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
if (owner)
{
@@ -75,6 +80,8 @@ public:
if (ec.value() == ERROR_HANDLE_EOF)
ec = asio::error::eof;
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -99,6 +106,7 @@ public:
private:
MutableBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp
index a1d07bd0531..9e2486b4b79 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -20,8 +20,9 @@
#if defined(ASIO_HAS_IOCP)
+#include "asio/associated_cancellation_slot.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
@@ -38,7 +39,7 @@ namespace asio {
namespace detail {
class win_iocp_handle_service :
- public service_base<win_iocp_handle_service>
+ public execution_context_service_base<win_iocp_handle_service>
{
public:
// The native type of a stream handle.
@@ -75,7 +76,7 @@ public:
implementation_type* prev_;
};
- ASIO_DECL win_iocp_handle_service(asio::io_context& io_context);
+ ASIO_DECL win_iocp_handle_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -109,6 +110,10 @@ public:
ASIO_DECL asio::error_code close(implementation_type& impl,
asio::error_code& ec);
+ // Release ownership of a handle.
+ ASIO_DECL native_handle_type release(implementation_type& impl,
+ asio::error_code& ec);
+
// Get the native handle representation.
native_handle_type native_handle(const implementation_type& impl) const
{
@@ -142,43 +147,61 @@ public:
// Start an asynchronous write. The data being written must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_write_op<ConstBufferSequence, Handler> op;
+ typedef win_iocp_handle_write_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
+ operation* o = p.p = new (p.v) op(buffers, handler, io_ex);
ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
reinterpret_cast<uintmax_t>(impl.handle_), "async_write_some"));
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.handle_, o);
+
start_write_op(impl, 0,
buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::first(buffers), p.p);
+ ConstBufferSequence>::first(buffers), o);
p.v = p.p = 0;
}
// Start an asynchronous write at a specified offset. The data being written
// must be valid for the lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
- void async_write_some_at(implementation_type& impl, uint64_t offset,
- const ConstBufferSequence& buffers, Handler& handler)
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_write_op<ConstBufferSequence, Handler> op;
+ typedef win_iocp_handle_write_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
+ operation* o = p.p = new (p.v) op(buffers, handler, io_ex);
ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
reinterpret_cast<uintmax_t>(impl.handle_), "async_write_some_at"));
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.handle_, o);
+
start_write_op(impl, offset,
buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::first(buffers), p.p);
+ ConstBufferSequence>::first(buffers), o);
p.v = p.p = 0;
}
@@ -204,44 +227,64 @@ public:
// Start an asynchronous read. The buffer for the data being received must be
// valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_read_op<MutableBufferSequence, Handler> op;
+ typedef win_iocp_handle_read_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
+ operation* o = p.p = new (p.v) op(buffers, handler, io_ex);
ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
reinterpret_cast<uintmax_t>(impl.handle_), "async_read_some"));
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.handle_, o);
+
start_read_op(impl, 0,
buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence>::first(buffers), p.p);
+ MutableBufferSequence>::first(buffers), o);
p.v = p.p = 0;
}
// Start an asynchronous read at a specified offset. The buffer for the data
// being received must be valid for the lifetime of the asynchronous
// operation.
- template <typename MutableBufferSequence, typename Handler>
- void async_read_some_at(implementation_type& impl, uint64_t offset,
- const MutableBufferSequence& buffers, Handler& handler)
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_handle_read_op<MutableBufferSequence, Handler> op;
+ typedef win_iocp_handle_read_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
+ operation* o = p.p = new (p.v) op(buffers, handler, io_ex);
ASIO_HANDLER_CREATION((iocp_service_.context(), *p.p, "handle", &impl,
reinterpret_cast<uintmax_t>(impl.handle_), "async_read_some_at"));
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.handle_, o);
+
start_read_op(impl, offset,
buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence>::first(buffers), p.p);
+ MutableBufferSequence>::first(buffers), o);
p.v = p.p = 0;
}
@@ -251,22 +294,24 @@ private:
const null_buffers& buffers, asio::error_code& ec);
size_t write_some_at(implementation_type& impl, uint64_t offset,
const null_buffers& buffers, asio::error_code& ec);
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const null_buffers& buffers, Handler& handler);
- template <typename Handler>
+ const null_buffers& buffers, Handler& handler,
+ const IoExecutor& io_ex);
+ template <typename Handler, typename IoExecutor>
void async_write_some_at(implementation_type& impl, uint64_t offset,
- const null_buffers& buffers, Handler& handler);
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex);
size_t read_some(implementation_type& impl,
const null_buffers& buffers, asio::error_code& ec);
size_t read_some_at(implementation_type& impl, uint64_t offset,
const null_buffers& buffers, asio::error_code& ec);
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const null_buffers& buffers, Handler& handler);
- template <typename Handler>
+ const null_buffers& buffers, Handler& handler,
+ const IoExecutor& io_ex);
+ template <typename Handler, typename IoExecutor>
void async_read_some_at(implementation_type& impl, uint64_t offset,
- const null_buffers& buffers, Handler& handler);
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex);
// Helper class for waiting for synchronous operations to complete.
class overlapped_wrapper;
@@ -298,10 +343,73 @@ private:
// destroyed.
ASIO_DECL void close_for_destruction(implementation_type& impl);
+ // The type of a NtSetInformationFile function pointer.
+ typedef LONG (NTAPI *nt_set_info_fn)(HANDLE, ULONG_PTR*, void*, ULONG, ULONG);
+
+ // Helper function to get the NtSetInformationFile function pointer. If no
+ // NtSetInformationFile pointer has been obtained yet, one is obtained using
+ // GetProcAddress and the pointer is cached. Returns a null pointer if
+ // NtSetInformationFile is not available.
+ ASIO_DECL nt_set_info_fn get_nt_set_info();
+
+ // Helper function to emulate InterlockedCompareExchangePointer functionality
+ // for:
+ // - very old Platform SDKs; and
+ // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
+ ASIO_DECL void* interlocked_compare_exchange_pointer(
+ void** dest, void* exch, void* cmp);
+
+ // Helper function to emulate InterlockedExchangePointer functionality for:
+ // - very old Platform SDKs; and
+ // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
+ ASIO_DECL void* interlocked_exchange_pointer(void** dest, void* val);
+
+ // Helper class used to implement per operation cancellation.
+ class iocp_op_cancellation : public operation
+ {
+ public:
+ iocp_op_cancellation(HANDLE h, operation* target)
+ : operation(&iocp_op_cancellation::do_complete),
+ handle_(h),
+ target_(target)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ iocp_op_cancellation* o = static_cast<iocp_op_cancellation*>(base);
+ o->target_->complete(owner, result_ec, bytes_transferred);
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ ::CancelIoEx(handle_, this);
+ }
+#else // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ (void)type;
+#endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ }
+
+ private:
+ HANDLE handle_;
+ operation* target_;
+ };
+
// The IOCP service used for running asynchronous operations and dispatching
// handlers.
win_iocp_io_context& iocp_service_;
+ // Pointer to NtSetInformationFile implementation.
+ void* nt_set_info_;
+
// Mutex to protect access to the linked list of implementations.
mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp
index 36019c88aa4..6a5b7e78338 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -20,44 +20,52 @@
#if defined(ASIO_HAS_IOCP)
-#include "asio/error.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
+#include "asio/error.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename ConstBufferSequence, typename Handler>
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
class win_iocp_handle_write_op : public operation
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_handle_write_op);
- win_iocp_handle_write_op(const ConstBufferSequence& buffers, Handler& handler)
+ win_iocp_handle_write_op(const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_handle_write_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
- const asio::error_code& ec, std::size_t bytes_transferred)
+ const asio::error_code& result_ec, std::size_t bytes_transferred)
{
+ asio::error_code ec(result_ec);
+
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_handle_write_op* o(static_cast<win_iocp_handle_write_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
if (owner)
{
@@ -67,6 +75,8 @@ public:
}
#endif // defined(ASIO_ENABLE_BUFFER_DEBUGGING)
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -91,6 +101,7 @@ public:
private:
ConstBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp b/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp
index 8b6803db792..1de94df7854 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_io_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -48,7 +48,10 @@ public:
// Constructor. Specifies a concurrency hint that is passed through to the
// underlying I/O completion port.
ASIO_DECL win_iocp_io_context(asio::execution_context& ctx,
- int concurrency_hint = -1);
+ int concurrency_hint = -1, bool own_thread = true);
+
+ // Destructor.
+ ASIO_DECL ~win_iocp_io_context();
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -106,10 +109,10 @@ public:
}
// Return whether a handler can be dispatched immediately.
- bool can_dispatch()
- {
- return thread_call_stack::contains(this) != 0;
- }
+ ASIO_DECL bool can_dispatch();
+
+ /// Capture the current exception so it can be rethrown from a run function.
+ ASIO_DECL void capture_current_exception();
// Request invocation of the given operation and return immediately. Assumes
// that work_started() has not yet been called for the operation.
@@ -194,6 +197,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,
@@ -218,7 +227,8 @@ private:
// Dequeues at most one operation from the I/O completion port, and then
// executes it. Returns the number of operations that were dequeued (i.e.
// either 0 or 1).
- ASIO_DECL size_t do_one(DWORD msec, asio::error_code& ec);
+ ASIO_DECL size_t do_one(DWORD msec,
+ win_iocp_thread_info& this_thread, asio::error_code& ec);
// Helper to calculate the GetQueuedCompletionStatus timeout.
ASIO_DECL static DWORD get_gqcs_timeout();
@@ -262,11 +272,13 @@ private:
enum
{
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
// Timeout to use with GetQueuedCompletionStatus on older versions of
// Windows. Some versions of windows have a "bug" where a call to
// GetQueuedCompletionStatus can appear stuck even though there are events
// waiting on the queue. Using a timeout helps to work around the issue.
default_gqcs_timeout = 500,
+#endif // !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
// Maximum waitable timer timeout, in milliseconds.
max_timeout_msec = 5 * 60 * 1000,
@@ -287,6 +299,10 @@ private:
// Timeout to use with GetQueuedCompletionStatus.
const DWORD gqcs_timeout_;
+ // Helper class to run the scheduler in its own thread.
+ struct thread_function;
+ friend struct thread_function;
+
// Function object for processing timeouts in a background thread.
struct timer_thread_function;
friend struct timer_thread_function;
@@ -311,6 +327,9 @@ private:
// The concurrency hint used to initialise the io_context.
const int concurrency_hint_;
+
+ // The thread that is running the io_context.
+ scoped_ptr<thread> thread_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
index f9e296debc1..07751b9234b 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_null_buffers_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,10 +20,9 @@
#if defined(ASIO_HAS_IOCP)
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -34,20 +33,21 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class win_iocp_null_buffers_op : public reactor_op
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_null_buffers_op);
win_iocp_null_buffers_op(socket_ops::weak_cancel_token_type cancel_token,
- Handler& handler)
- : reactor_op(&win_iocp_null_buffers_op::do_perform,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(asio::error_code(),
+ &win_iocp_null_buffers_op::do_perform,
&win_iocp_null_buffers_op::do_complete),
cancel_token_(cancel_token),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static status do_perform(reactor_op*)
@@ -62,12 +62,17 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_null_buffers_op* o(static_cast<win_iocp_null_buffers_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// The reactor may have stored a result in the operation object.
if (o->ec_)
ec = o->ec_;
@@ -85,6 +90,8 @@ public:
ec = asio::error::connection_refused;
}
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -109,6 +116,7 @@ public:
private:
socket_ops::weak_cancel_token_type cancel_token_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp b/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp
index 9f888b19498..a935f87b882 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -51,6 +51,16 @@ public:
func_(0, this, asio::error_code(), 0);
}
+ void reset()
+ {
+ Internal = 0;
+ InternalHigh = 0;
+ Offset = 0;
+ OffsetHigh = 0;
+ hEvent = 0;
+ ready_ = 0;
+ }
+
protected:
typedef void (*func_type)(
void*, win_iocp_operation*,
@@ -68,16 +78,6 @@ protected:
{
}
- void reset()
- {
- Internal = 0;
- InternalHigh = 0;
- Offset = 0;
- OffsetHigh = 0;
- hEvent = 0;
- ready_ = 0;
- }
-
private:
friend class op_queue_access;
friend class win_iocp_io_context;
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp
index fde9a92c70a..dc65ad08311 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_overlapped_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,42 +19,51 @@
#if defined(ASIO_HAS_IOCP)
-#include "asio/error.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
+#include "asio/error.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class win_iocp_overlapped_op : public operation
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_overlapped_op);
- win_iocp_overlapped_op(Handler& handler)
+ win_iocp_overlapped_op(Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_overlapped_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
- const asio::error_code& ec, std::size_t bytes_transferred)
+ const asio::error_code& result_ec, std::size_t bytes_transferred)
{
+ asio::error_code ec(result_ec);
+
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_overlapped_op* o(static_cast<win_iocp_overlapped_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -78,6 +87,7 @@ public:
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
index 22025fd5fad..596705a38c6 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,6 +20,7 @@
#if defined(ASIO_HAS_IOCP)
#include "asio/io_context.hpp"
+#include "asio/query.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
@@ -44,13 +45,13 @@ public:
}
// Construct an win_iocp_overlapped_ptr to contain the specified handler.
- template <typename Handler>
- explicit win_iocp_overlapped_ptr(
- asio::io_context& io_context, ASIO_MOVE_ARG(Handler) handler)
+ template <typename Executor, typename Handler>
+ explicit win_iocp_overlapped_ptr(const Executor& ex,
+ Handler&& handler)
: ptr_(0),
iocp_service_(0)
{
- this->reset(io_context, ASIO_MOVE_CAST(Handler)(handler));
+ this->reset(ex, static_cast<Handler&&>(handler));
}
// Destructor automatically frees the OVERLAPPED object unless released.
@@ -73,22 +74,24 @@ public:
// Reset to contain the specified handler, freeing any current OVERLAPPED
// object.
- template <typename Handler>
- void reset(asio::io_context& io_context, Handler handler)
+ template <typename Executor, typename Handler>
+ void reset(const Executor& ex, Handler handler)
{
- typedef win_iocp_overlapped_op<Handler> op;
+ win_iocp_io_context* iocp_service = this->get_iocp_service(ex);
+
+ typedef win_iocp_overlapped_op<Handler, Executor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, ex);
- ASIO_HANDLER_CREATION((io_context, *p.p,
- "io_context", &io_context.impl_, 0, "overlapped"));
+ ASIO_HANDLER_CREATION((ex.context(), *p.p,
+ "iocp_service", iocp_service, 0, "overlapped"));
- io_context.impl_.work_started();
+ iocp_service->work_started();
reset();
ptr_ = p.p;
p.v = p.p = 0;
- iocp_service_ = &io_context.impl_;
+ iocp_service_ = iocp_service;
}
// Get the contained OVERLAPPED object.
@@ -129,6 +132,31 @@ public:
}
private:
+ template <typename Executor>
+ static win_iocp_io_context* get_iocp_service(const Executor& ex,
+ enable_if_t<
+ can_query<const Executor&, execution::context_t>::value
+ >* = 0)
+ {
+ return &use_service<win_iocp_io_context>(
+ asio::query(ex, execution::context));
+ }
+
+ template <typename Executor>
+ static win_iocp_io_context* get_iocp_service(const Executor& ex,
+ enable_if_t<
+ !can_query<const Executor&, execution::context_t>::value
+ >* = 0)
+ {
+ return &use_service<win_iocp_io_context>(ex.context());
+ }
+
+ static win_iocp_io_context* get_iocp_service(
+ const io_context::executor_type& ex)
+ {
+ return &asio::query(ex, execution::context).impl_;
+ }
+
win_iocp_operation* ptr_;
win_iocp_io_context* iocp_service_;
};
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
index 53856460c72..e0e12e91d5f 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -22,7 +22,7 @@
#include <string>
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/win_iocp_handle_service.hpp"
#include "asio/detail/push_options.hpp"
@@ -32,7 +32,7 @@ namespace detail {
// Extend win_iocp_handle_service to provide serial port support.
class win_iocp_serial_port_service :
- public service_base<win_iocp_serial_port_service>
+ public execution_context_service_base<win_iocp_serial_port_service>
{
public:
// The native type of a serial port.
@@ -42,8 +42,7 @@ public:
typedef win_iocp_handle_service::implementation_type implementation_type;
// Constructor.
- ASIO_DECL win_iocp_serial_port_service(
- asio::io_context& io_context);
+ ASIO_DECL win_iocp_serial_port_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -138,6 +137,7 @@ public:
asio::error_code& ec)
{
ec = asio::error::operation_not_supported;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -151,11 +151,12 @@ public:
// Start an asynchronous write. The data being written must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
- handle_service_.async_write_some(impl, buffers, handler);
+ handle_service_.async_write_some(impl, buffers, handler, io_ex);
}
// Read some data. Returns the number of bytes received.
@@ -168,11 +169,13 @@ public:
// Start an asynchronous read. The buffer for the data being received must be
// valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
- handle_service_.async_read_some(impl, buffers, handler);
+ handle_service_.async_read_some(impl, buffers, handler, io_ex);
}
private:
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
index 937f4c0f6f3..f4aa850be80 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_accept_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,10 +20,9 @@
#if defined(ASIO_HAS_IOCP)
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -35,7 +34,8 @@
namespace asio {
namespace detail {
-template <typename Socket, typename Protocol, typename Handler>
+template <typename Socket, typename Protocol,
+ typename Handler, typename IoExecutor>
class win_iocp_socket_accept_op : public operation
{
public:
@@ -44,7 +44,7 @@ public:
win_iocp_socket_accept_op(win_iocp_socket_service_base& socket_service,
socket_type socket, Socket& peer, const Protocol& protocol,
typename Protocol::endpoint* peer_endpoint,
- bool enable_connection_aborted, Handler& handler)
+ bool enable_connection_aborted, Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_socket_accept_op::do_complete),
socket_service_(socket_service),
socket_(socket),
@@ -52,9 +52,11 @@ public:
protocol_(protocol),
peer_endpoint_(peer_endpoint),
enable_connection_aborted_(enable_connection_aborted),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ proxy_op_(0),
+ cancel_requested_(0),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
socket_holder& new_socket()
@@ -72,6 +74,12 @@ public:
return sizeof(sockaddr_storage_type) + 16;
}
+ void enable_cancellation(long* cancel_requested, operation* proxy_op)
+ {
+ cancel_requested_ = cancel_requested;
+ proxy_op_ = proxy_op;
+ }
+
static void do_complete(void* owner, operation* base,
const asio::error_code& result_ec,
std::size_t /*bytes_transferred*/)
@@ -79,9 +87,9 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_accept_op* o(static_cast<win_iocp_socket_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
if (owner)
{
@@ -98,10 +106,13 @@ public:
&& !o->enable_connection_aborted_)
{
o->reset();
+ if (o->proxy_op_)
+ o->proxy_op_->reset();
o->socket_service_.restart_accept_op(o->socket_,
o->new_socket_, o->protocol_.family(),
o->protocol_.type(), o->protocol_.protocol(),
- o->output_buffer(), o->address_length(), o);
+ o->output_buffer(), o->address_length(),
+ o->cancel_requested_, o->proxy_op_ ? o->proxy_op_ : o);
p.v = p.p = 0;
return;
}
@@ -124,6 +135,13 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -154,12 +172,14 @@ private:
typename Protocol::endpoint* peer_endpoint_;
unsigned char output_buffer_[(sizeof(sockaddr_storage_type) + 16) * 2];
bool enable_connection_aborted_;
+ operation* proxy_op_;
+ long* cancel_requested_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
-#if defined(ASIO_HAS_MOVE)
-
-template <typename Protocol, typename Handler>
+template <typename Protocol, typename PeerIoExecutor,
+ typename Handler, typename IoExecutor>
class win_iocp_socket_move_accept_op : public operation
{
public:
@@ -167,19 +187,21 @@ public:
win_iocp_socket_move_accept_op(
win_iocp_socket_service_base& socket_service, socket_type socket,
- const Protocol& protocol, asio::io_context& peer_io_context,
+ const Protocol& protocol, const PeerIoExecutor& peer_io_ex,
typename Protocol::endpoint* peer_endpoint,
- bool enable_connection_aborted, Handler& handler)
+ bool enable_connection_aborted, Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_socket_move_accept_op::do_complete),
socket_service_(socket_service),
socket_(socket),
- peer_(peer_io_context),
+ peer_(peer_io_ex),
protocol_(protocol),
peer_endpoint_(peer_endpoint),
enable_connection_aborted_(enable_connection_aborted),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ cancel_requested_(0),
+ proxy_op_(0),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
socket_holder& new_socket()
@@ -197,6 +219,12 @@ public:
return sizeof(sockaddr_storage_type) + 16;
}
+ void enable_cancellation(long* cancel_requested, operation* proxy_op)
+ {
+ cancel_requested_ = cancel_requested;
+ proxy_op_ = proxy_op;
+ }
+
static void do_complete(void* owner, operation* base,
const asio::error_code& result_ec,
std::size_t /*bytes_transferred*/)
@@ -204,10 +232,10 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_move_accept_op* o(
static_cast<win_iocp_socket_move_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
if (owner)
{
@@ -224,10 +252,13 @@ public:
&& !o->enable_connection_aborted_)
{
o->reset();
+ if (o->proxy_op_)
+ o->proxy_op_->reset();
o->socket_service_.restart_accept_op(o->socket_,
o->new_socket_, o->protocol_.family(),
o->protocol_.type(), o->protocol_.protocol(),
- o->output_buffer(), o->address_length(), o);
+ o->output_buffer(), o->address_length(),
+ o->cancel_requested_, o->proxy_op_ ? o->proxy_op_ : o);
p.v = p.p = 0;
return;
}
@@ -250,6 +281,13 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -257,9 +295,9 @@ public:
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
detail::move_binder2<Handler,
- asio::error_code, typename Protocol::socket>
- handler(0, ASIO_MOVE_CAST(Handler)(o->handler_), ec,
- ASIO_MOVE_CAST(typename Protocol::socket)(o->peer_));
+ asio::error_code, peer_socket_type>
+ handler(0, static_cast<Handler&&>(o->handler_), ec,
+ static_cast<peer_socket_type&&>(o->peer_));
p.h = asio::detail::addressof(handler.handler_);
p.reset();
@@ -274,19 +312,23 @@ public:
}
private:
+ typedef typename Protocol::socket::template
+ rebind_executor<PeerIoExecutor>::other peer_socket_type;
+
win_iocp_socket_service_base& socket_service_;
socket_type socket_;
socket_holder new_socket_;
- typename Protocol::socket peer_;
+ peer_socket_type peer_;
Protocol protocol_;
typename Protocol::endpoint* peer_endpoint_;
unsigned char output_buffer_[(sizeof(sockaddr_storage_type) + 16) * 2];
bool enable_connection_aborted_;
+ long* cancel_requested_;
+ operation* proxy_op_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
index 4edd869c479..104ee87bb24 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,7 +22,7 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -37,7 +37,8 @@ class win_iocp_socket_connect_op_base : public reactor_op
{
public:
win_iocp_socket_connect_op_base(socket_type socket, func_type complete_func)
- : reactor_op(&win_iocp_socket_connect_op_base::do_perform, complete_func),
+ : reactor_op(asio::error_code(),
+ &win_iocp_socket_connect_op_base::do_perform, complete_func),
socket_(socket),
connect_ex_(false)
{
@@ -45,6 +46,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
win_iocp_socket_connect_op_base* o(
static_cast<win_iocp_socket_connect_op_base*>(base));
@@ -56,18 +58,19 @@ public:
bool connect_ex_;
};
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class win_iocp_socket_connect_op : public win_iocp_socket_connect_op_base
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_connect_op);
- win_iocp_socket_connect_op(socket_type socket, Handler& handler)
+ win_iocp_socket_connect_op(socket_type socket,
+ Handler& handler, const IoExecutor& io_ex)
: win_iocp_socket_connect_op_base(socket,
&win_iocp_socket_connect_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -77,10 +80,10 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_connect_op* o(
static_cast<win_iocp_socket_connect_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
if (owner)
{
@@ -92,6 +95,13 @@ public:
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -115,6 +125,7 @@ public:
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
index 98b000548d9..874a12aa7d0 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -34,7 +34,7 @@
namespace asio {
namespace detail {
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class win_iocp_socket_recv_op : public operation
{
public:
@@ -42,14 +42,15 @@ public:
win_iocp_socket_recv_op(socket_ops::state_type state,
socket_ops::weak_cancel_token_type cancel_token,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
: operation(&win_iocp_socket_recv_op::do_complete),
state_(state),
cancel_token_(cancel_token),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -59,12 +60,17 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_recv_op* o(static_cast<win_iocp_socket_recv_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
// Check whether buffers are still valid.
if (owner)
@@ -79,6 +85,8 @@ public:
MutableBufferSequence>::all_empty(o->buffers_),
ec, bytes_transferred);
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -105,6 +113,7 @@ private:
socket_ops::weak_cancel_token_type cancel_token_;
MutableBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
index a7af87846d7..b4b98aa0148 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recvfrom_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -34,7 +34,8 @@
namespace asio {
namespace detail {
-template <typename MutableBufferSequence, typename Endpoint, typename Handler>
+template <typename MutableBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
class win_iocp_socket_recvfrom_op : public operation
{
public:
@@ -42,15 +43,16 @@ public:
win_iocp_socket_recvfrom_op(Endpoint& endpoint,
socket_ops::weak_cancel_token_type cancel_token,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
: operation(&win_iocp_socket_recvfrom_op::do_complete),
endpoint_(endpoint),
endpoint_size_(static_cast<int>(endpoint.capacity())),
cancel_token_(cancel_token),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
int& endpoint_size()
@@ -65,13 +67,18 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_recvfrom_op* o(
static_cast<win_iocp_socket_recvfrom_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
// Check whether buffers are still valid.
if (owner)
@@ -86,6 +93,8 @@ public:
// Record the size of the endpoint returned by the operation.
o->endpoint_.resize(o->endpoint_size_);
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -113,6 +122,7 @@ private:
socket_ops::weak_cancel_token_type cancel_token_;
MutableBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
index 9e5952f6ce6..85e4b78dc20 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
@@ -1,8 +1,8 @@
//
// detail/win_iocp_socket_recvmsg_op.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -35,7 +35,7 @@
namespace asio {
namespace detail {
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class win_iocp_socket_recvmsg_op : public operation
{
public:
@@ -44,14 +44,15 @@ public:
win_iocp_socket_recvmsg_op(
socket_ops::weak_cancel_token_type cancel_token,
const MutableBufferSequence& buffers,
- socket_base::message_flags& out_flags, Handler& handler)
+ socket_base::message_flags& out_flags,
+ Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_socket_recvmsg_op::do_complete),
cancel_token_(cancel_token),
buffers_(buffers),
out_flags_(out_flags),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -61,13 +62,18 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_recvmsg_op* o(
static_cast<win_iocp_socket_recvmsg_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
// Check whether buffers are still valid.
if (owner)
@@ -80,6 +86,8 @@ public:
socket_ops::complete_iocp_recvmsg(o->cancel_token_, ec);
o->out_flags_ = 0;
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -106,6 +114,7 @@ private:
MutableBufferSequence buffers_;
socket_base::message_flags& out_flags_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp
index 15c88a55014..c7043c4875e 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -34,20 +34,21 @@
namespace asio {
namespace detail {
-template <typename ConstBufferSequence, typename Handler>
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
class win_iocp_socket_send_op : public operation
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_socket_send_op);
win_iocp_socket_send_op(socket_ops::weak_cancel_token_type cancel_token,
- const ConstBufferSequence& buffers, Handler& handler)
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
: operation(&win_iocp_socket_send_op::do_complete),
cancel_token_(cancel_token),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
@@ -57,12 +58,17 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_send_op* o(static_cast<win_iocp_socket_send_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
// Check whether buffers are still valid.
if (owner)
@@ -74,6 +80,8 @@ public:
socket_ops::complete_iocp_send(o->cancel_token_, ec);
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -99,6 +107,7 @@ private:
socket_ops::weak_cancel_token_type cancel_token_;
ConstBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp
index 9040f7c9b96..faeaffa4c36 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,13 +21,12 @@
#include <cstring>
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/socket_base.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/operation.hpp"
@@ -51,7 +50,7 @@ namespace detail {
template <typename Protocol>
class win_iocp_socket_service :
- public service_base<win_iocp_socket_service<Protocol> >,
+ public execution_context_service_base<win_iocp_socket_service<Protocol>>,
public win_iocp_socket_service_base
{
public:
@@ -129,9 +128,10 @@ public:
};
// Constructor.
- win_iocp_socket_service(asio::io_context& io_context)
- : service_base<win_iocp_socket_service<Protocol> >(io_context),
- win_iocp_socket_service_base(io_context)
+ win_iocp_socket_service(execution_context& context)
+ : execution_context_service_base<
+ win_iocp_socket_service<Protocol>>(context),
+ win_iocp_socket_service_base(context)
{
}
@@ -143,7 +143,7 @@ public:
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
- implementation_type& other_impl)
+ implementation_type& other_impl) noexcept
{
this->base_move_construct(impl, other_impl);
@@ -177,6 +177,7 @@ public:
// Move-construct a new socket implementation from another protocol type.
template <typename Protocol1>
void converting_move_construct(implementation_type& impl,
+ win_iocp_socket_service<Protocol1>&,
typename win_iocp_socket_service<
Protocol1>::implementation_type& other_impl)
{
@@ -203,6 +204,8 @@ public:
impl.have_remote_endpoint_ = false;
impl.remote_endpoint_ = endpoint_type();
}
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -217,6 +220,8 @@ public:
impl.have_remote_endpoint_ = native_socket.have_remote_endpoint();
impl.remote_endpoint_ = native_socket.remote_endpoint();
}
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -233,6 +238,8 @@ public:
const endpoint_type& endpoint, asio::error_code& ec)
{
socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -244,6 +251,8 @@ public:
socket_ops::setsockopt(impl.socket_, impl.state_,
option.level(impl.protocol_), option.name(impl.protocol_),
option.data(impl.protocol_), option.size(impl.protocol_), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -258,6 +267,8 @@ public:
option.data(impl.protocol_), &size, ec);
if (!ec)
option.resize(impl.protocol_, size);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -268,7 +279,10 @@ public:
endpoint_type endpoint;
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -281,7 +295,10 @@ public:
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getpeername(impl.socket_, endpoint.data(),
&addr_len, impl.have_remote_endpoint_, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -304,9 +321,12 @@ public:
buffer_sequence_adapter<asio::const_buffer,
ConstBufferSequence> bufs(buffers);
- return socket_ops::sync_sendto(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags,
+ size_t n = socket_ops::sync_sendto(impl.socket_,
+ impl.state_, bufs.buffers(), bufs.count(), flags,
destination.data(), destination.size(), ec);
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be sent without blocking.
@@ -316,50 +336,61 @@ public:
{
// Wait for socket to become ready.
socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
-
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send_to(implementation_type& impl,
const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags, Handler& handler)
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_send_op<ConstBufferSequence, Handler> op;
+ typedef win_iocp_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, buffers, handler);
+ operation* o = p.p = new (p.v) op(
+ impl.cancel_token_, buffers, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_send_to"));
buffer_sequence_adapter<asio::const_buffer,
ConstBufferSequence> bufs(buffers);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.socket_, o);
+
start_send_to_op(impl, bufs.buffers(), bufs.count(),
destination.data(), static_cast<int>(destination.size()),
- flags, p.p);
+ flags, o);
p.v = p.p = 0;
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send_to(implementation_type& impl, const null_buffers&,
- const endpoint_type&, socket_base::message_flags, Handler& handler)
+ const endpoint_type&, socket_base::message_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
+ reactor_op* o = p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_send_to(null_buffers)"));
- start_reactor_op(impl, select_reactor::write_op, p.p);
+ start_reactor_op(impl, select_reactor::write_op, o);
p.v = p.p = 0;
}
@@ -375,14 +406,15 @@ public:
MutableBufferSequence> bufs(buffers);
std::size_t addr_len = sender_endpoint.capacity();
- std::size_t bytes_recvd = socket_ops::sync_recvfrom(
- impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
- flags, sender_endpoint.data(), &addr_len, ec);
+ std::size_t n = socket_ops::sync_recvfrom(impl.socket_,
+ impl.state_, bufs.buffers(), bufs.count(), flags,
+ sender_endpoint.data(), &addr_len, ec);
if (!ec)
sender_endpoint.resize(addr_len);
- return bytes_recvd;
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be received without blocking.
@@ -396,55 +428,85 @@ public:
// Reset endpoint since it can be given no sensible value at this time.
sender_endpoint = endpoint_type();
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
// Start an asynchronous receive. The buffer for the data being received and
// the sender_endpoint object must both be valid for the lifetime of the
// asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive_from(implementation_type& impl,
const MutableBufferSequence& buffers, endpoint_type& sender_endp,
- socket_base::message_flags flags, Handler& handler)
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_recvfrom_op<
- MutableBufferSequence, endpoint_type, Handler> op;
+ typedef win_iocp_socket_recvfrom_op<MutableBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(sender_endp, impl.cancel_token_, buffers, handler);
+ operation* o = p.p = new (p.v) op(sender_endp,
+ impl.cancel_token_, buffers, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_receive_from"));
buffer_sequence_adapter<asio::mutable_buffer,
MutableBufferSequence> bufs(buffers);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.socket_, o);
+
start_receive_from_op(impl, bufs.buffers(), bufs.count(),
- sender_endp.data(), flags, &p.p->endpoint_size(), p.p);
+ sender_endp.data(), flags, &p.p->endpoint_size(), o);
p.v = p.p = 0;
}
// Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive_from(implementation_type& impl,
- const null_buffers&, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_receive_from(null_buffers)"));
// Reset endpoint since it can be given no sensible value at this time.
sender_endpoint = endpoint_type();
- start_null_buffers_receive_op(impl, flags, p.p);
+ // Optionally register for per-operation cancellation.
+ operation* iocp_op = p.p;
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ = iocp_op =
+ &slot.template emplace<reactor_op_cancellation>(
+ impl.socket_, iocp_op);
+ }
+
+ int op_type = start_null_buffers_receive_op(impl, flags, p.p, iocp_op);
p.v = p.p = 0;
+
+ // Update cancellation method if the reactor was used.
+ if (slot.is_connected() && op_type != -1)
+ {
+ static_cast<reactor_op_cancellation*>(iocp_op)->use_reactor(
+ &get_reactor(), &impl.reactor_data_, op_type);
+ }
}
// Accept a new connection.
@@ -456,6 +518,7 @@ public:
if (peer.is_open())
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -474,90 +537,87 @@ public:
new_socket.release();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
-#if defined(ASIO_HAS_MOVE)
- // Accept a new connection.
- typename Protocol::socket accept(implementation_type& impl,
- io_context* peer_io_context, endpoint_type* peer_endpoint,
- asio::error_code& ec)
- {
- typename Protocol::socket peer(
- peer_io_context ? *peer_io_context : io_context_);
-
- std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
- socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
- impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
- peer_endpoint ? &addr_len : 0, ec));
-
- // On success, assign new connection to peer socket object.
- if (new_socket.get() != invalid_socket)
- {
- if (peer_endpoint)
- peer_endpoint->resize(addr_len);
- peer.assign(impl.protocol_, new_socket.get(), ec);
- if (!ec)
- new_socket.release();
- }
-
- return peer;
- }
-#endif // defined(ASIO_HAS_MOVE)
-
// Start an asynchronous accept. The peer and peer_endpoint objects
// must be valid until the accept's handler is invoked.
- template <typename Socket, typename Handler>
+ template <typename Socket, typename Handler, typename IoExecutor>
void async_accept(implementation_type& impl, Socket& peer,
- endpoint_type* peer_endpoint, Handler& handler)
+ endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_accept_op<Socket, protocol_type, Handler> op;
+ typedef win_iocp_socket_accept_op<Socket,
+ protocol_type, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
bool enable_connection_aborted =
(impl.state_ & socket_ops::enable_connection_aborted) != 0;
- p.p = new (p.v) op(*this, impl.socket_, peer, impl.protocol_,
- peer_endpoint, enable_connection_aborted, handler);
+ operation* o = p.p = new (p.v) op(*this, impl.socket_, peer, impl.protocol_,
+ peer_endpoint, enable_connection_aborted, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_accept"));
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ accept_op_cancellation* c =
+ &slot.template emplace<accept_op_cancellation>(impl.socket_, o);
+ p.p->enable_cancellation(c->get_cancel_requested(), c);
+ o = c;
+ }
+
start_accept_op(impl, peer.is_open(), p.p->new_socket(),
impl.protocol_.family(), impl.protocol_.type(),
impl.protocol_.protocol(), p.p->output_buffer(),
- p.p->address_length(), p.p);
+ p.p->address_length(), o);
p.v = p.p = 0;
}
-#if defined(ASIO_HAS_MOVE)
// Start an asynchronous accept. The peer and peer_endpoint objects
// must be valid until the accept's handler is invoked.
- template <typename Handler>
- void async_accept(implementation_type& impl,
- asio::io_context* peer_io_context,
- endpoint_type* peer_endpoint, Handler& handler)
+ template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
+ void async_move_accept(implementation_type& impl,
+ const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_move_accept_op<protocol_type, Handler> op;
+ typedef win_iocp_socket_move_accept_op<
+ protocol_type, PeerIoExecutor, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
bool enable_connection_aborted =
(impl.state_ & socket_ops::enable_connection_aborted) != 0;
- p.p = new (p.v) op(*this, impl.socket_, impl.protocol_,
- peer_io_context ? *peer_io_context : io_context_,
- peer_endpoint, enable_connection_aborted, handler);
+ operation* o = p.p = new (p.v) op(*this, impl.socket_, impl.protocol_,
+ peer_io_ex, peer_endpoint, enable_connection_aborted,
+ handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_accept"));
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ accept_op_cancellation* c =
+ &slot.template emplace<accept_op_cancellation>(impl.socket_, o);
+ p.p->enable_cancellation(c->get_cancel_requested(), c);
+ o = c;
+ }
+
start_accept_op(impl, false, p.p->new_socket(),
impl.protocol_.family(), impl.protocol_.type(),
impl.protocol_.protocol(), p.p->output_buffer(),
- p.p->address_length(), p.p);
+ p.p->address_length(), o);
p.v = p.p = 0;
}
-#endif // defined(ASIO_HAS_MOVE)
// Connect the socket to the specified endpoint.
asio::error_code connect(implementation_type& impl,
@@ -565,26 +625,48 @@ public:
{
socket_ops::sync_connect(impl.socket_,
peer_endpoint.data(), peer_endpoint.size(), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
// Start an asynchronous connect.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, Handler& handler)
+ const endpoint_type& peer_endpoint, Handler& handler,
+ const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_connect_op<Handler> op;
+ typedef win_iocp_socket_connect_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.socket_, handler);
+ p.p = new (p.v) op(impl.socket_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_connect"));
- start_connect_op(impl, impl.protocol_.family(), impl.protocol_.type(),
- peer_endpoint.data(), static_cast<int>(peer_endpoint.size()), p.p);
+ // Optionally register for per-operation cancellation.
+ operation* iocp_op = p.p;
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ = iocp_op =
+ &slot.template emplace<reactor_op_cancellation>(
+ impl.socket_, iocp_op);
+ }
+
+ int op_type = start_connect_op(impl, impl.protocol_.family(),
+ impl.protocol_.type(), peer_endpoint.data(),
+ static_cast<int>(peer_endpoint.size()), p.p, iocp_op);
p.v = p.p = 0;
+
+ // Update cancellation method if the reactor was used.
+ if (slot.is_connected() && op_type != -1)
+ {
+ static_cast<reactor_op_cancellation*>(iocp_op)->use_reactor(
+ &get_reactor(), &impl.reactor_data_, op_type);
+ }
}
};
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp
index 9f22adc9808..a157143e35b 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,14 +19,14 @@
#if defined(ASIO_HAS_IOCP)
+#include "asio/associated_cancellation_slot.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/socket_base.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/operation.hpp"
@@ -85,8 +85,7 @@ public:
};
// Constructor.
- ASIO_DECL win_iocp_socket_service_base(
- asio::io_context& io_context);
+ ASIO_DECL win_iocp_socket_service_base(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void base_shutdown();
@@ -96,7 +95,7 @@ public:
// Move-construct a new socket implementation.
ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl);
+ base_implementation_type& other_impl) noexcept;
// Move-assign from another socket implementation.
ASIO_DECL void base_move_assign(base_implementation_type& impl,
@@ -116,6 +115,10 @@ public:
ASIO_DECL asio::error_code close(
base_implementation_type& impl, asio::error_code& ec);
+ // Release ownership of the socket.
+ ASIO_DECL socket_type release(
+ base_implementation_type& impl, asio::error_code& ec);
+
// Cancel all operations associated with the socket.
ASIO_DECL asio::error_code cancel(
base_implementation_type& impl, asio::error_code& ec);
@@ -206,31 +209,46 @@ public:
// Asynchronously wait for the socket to become ready to read, ready to
// write, or to have pending error conditions.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_wait(base_implementation_type& impl,
- socket_base::wait_type w, Handler& handler)
+ socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_wait_op<Handler> op;
+ typedef win_iocp_wait_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_wait"));
+ // Optionally register for per-operation cancellation.
+ operation* iocp_op = p.p;
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ = iocp_op =
+ &slot.template emplace<reactor_op_cancellation>(
+ impl.socket_, iocp_op);
+ }
+
+ int op_type = -1;
switch (w)
{
case socket_base::wait_read:
- start_null_buffers_receive_op(impl, 0, p.p);
+ op_type = start_null_buffers_receive_op(impl, 0, p.p, iocp_op);
break;
case socket_base::wait_write:
+ op_type = select_reactor::write_op;
start_reactor_op(impl, select_reactor::write_op, p.p);
break;
case socket_base::wait_error:
+ op_type = select_reactor::read_op;
start_reactor_op(impl, select_reactor::except_op, p.p);
break;
default:
@@ -240,6 +258,13 @@ public:
}
p.v = p.p = 0;
+
+ // Update cancellation method if the reactor was used.
+ if (slot.is_connected() && op_type != -1)
+ {
+ static_cast<reactor_op_cancellation*>(iocp_op)->use_reactor(
+ &get_reactor(), &impl.reactor_data_, op_type);
+ }
}
// Send the given data to the peer. Returns the number of bytes sent.
@@ -267,41 +292,50 @@ public:
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_send_op<ConstBufferSequence, Handler> op;
+ typedef win_iocp_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, buffers, handler);
+ operation* o = p.p = new (p.v) op(
+ impl.cancel_token_, buffers, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_send"));
buffer_sequence_adapter<asio::const_buffer,
ConstBufferSequence> bufs(buffers);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.socket_, o);
+
start_send_op(impl, bufs.buffers(), bufs.count(), flags,
(impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(),
- p.p);
+ o);
p.v = p.p = 0;
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_send(null_buffers)"));
start_reactor_op(impl, select_reactor::write_op, p.p);
@@ -333,45 +367,75 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_recv_op<MutableBufferSequence, Handler> op;
+ typedef win_iocp_socket_recv_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.state_, impl.cancel_token_, buffers, handler);
+ operation* o = p.p = new (p.v) op(impl.state_,
+ impl.cancel_token_, buffers, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_receive"));
buffer_sequence_adapter<asio::mutable_buffer,
MutableBufferSequence> bufs(buffers);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.socket_, o);
+
start_receive_op(impl, bufs.buffers(), bufs.count(), flags,
(impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(),
- p.p);
+ o);
p.v = p.p = 0;
}
// Wait until data can be received without blocking.
- template <typename Handler>
- void async_receive(base_implementation_type& impl, const null_buffers&,
- socket_base::message_flags flags, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_receive(null_buffers)"));
- start_null_buffers_receive_op(impl, flags, p.p);
+ // Optionally register for per-operation cancellation.
+ operation* iocp_op = p.p;
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ = iocp_op =
+ &slot.template emplace<reactor_op_cancellation>(
+ impl.socket_, iocp_op);
+ }
+
+ int op_type = start_null_buffers_receive_op(impl, flags, p.p, iocp_op);
p.v = p.p = 0;
+
+ // Update cancellation method if the reactor was used.
+ if (slot.is_connected() && op_type != -1)
+ {
+ static_cast<reactor_op_cancellation*>(iocp_op)->use_reactor(
+ &get_reactor(), &impl.reactor_data_, op_type);
+ }
}
// Receive some data with associated flags. Returns the number of bytes
@@ -406,53 +470,85 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive_with_flags(base_implementation_type& impl,
const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_socket_recvmsg_op<MutableBufferSequence, Handler> op;
+ typedef win_iocp_socket_recvmsg_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, buffers, out_flags, handler);
+ operation* o = p.p = new (p.v) op(impl.cancel_token_,
+ buffers, out_flags, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_receive_with_flags"));
buffer_sequence_adapter<asio::mutable_buffer,
MutableBufferSequence> bufs(buffers);
- start_receive_op(impl, bufs.buffers(), bufs.count(), in_flags, false, p.p);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ o = &slot.template emplace<iocp_op_cancellation>(impl.socket_, o);
+
+ start_receive_op(impl, bufs.buffers(), bufs.count(), in_flags, false, o);
p.v = p.p = 0;
}
// Wait until data can be received without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_receive_with_flags(base_implementation_type& impl,
const null_buffers&, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, Handler& handler)
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
- typedef win_iocp_null_buffers_op<Handler> op;
+ typedef win_iocp_null_buffers_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(impl.cancel_token_, handler);
+ p.p = new (p.v) op(impl.cancel_token_, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_, *p.p, "socket",
+ ASIO_HANDLER_CREATION((context_, *p.p, "socket",
&impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
// Reset out_flags since it can be given no sensible value at this time.
out_flags = 0;
- start_null_buffers_receive_op(impl, in_flags, p.p);
+ // Optionally register for per-operation cancellation.
+ operation* iocp_op = p.p;
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ = iocp_op =
+ &slot.template emplace<reactor_op_cancellation>(
+ impl.socket_, iocp_op);
+ }
+
+ int op_type = start_null_buffers_receive_op(impl, in_flags, p.p, iocp_op);
p.v = p.p = 0;
+
+ // Update cancellation method if the reactor was used.
+ if (slot.is_connected() && op_type != -1)
+ {
+ static_cast<reactor_op_cancellation*>(iocp_op)->use_reactor(
+ &get_reactor(), &impl.reactor_data_, op_type);
+ }
}
// Helper function to restart an asynchronous accept operation.
ASIO_DECL void restart_accept_op(socket_type s,
- socket_holder& new_socket, int family, int type, int protocol,
- void* output_buffer, DWORD address_length, operation* op);
+ socket_holder& new_socket, int family, int type,
+ int protocol, void* output_buffer, DWORD address_length,
+ long* cancel_requested, operation* op);
protected:
// Open a new socket implementation.
@@ -472,9 +568,8 @@ protected:
// Helper function to start an asynchronous send_to operation.
ASIO_DECL void start_send_to_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- const socket_addr_type* addr, int addrlen,
- socket_base::message_flags flags, operation* op);
+ WSABUF* buffers, std::size_t buffer_count, const void* addr,
+ int addrlen, socket_base::message_flags flags, operation* op);
// Helper function to start an asynchronous receive operation.
ASIO_DECL void start_receive_op(base_implementation_type& impl,
@@ -482,13 +577,13 @@ protected:
socket_base::message_flags flags, bool noop, operation* op);
// Helper function to start an asynchronous null_buffers receive operation.
- ASIO_DECL void start_null_buffers_receive_op(
- base_implementation_type& impl,
- socket_base::message_flags flags, reactor_op* op);
+ ASIO_DECL int start_null_buffers_receive_op(
+ base_implementation_type& impl, socket_base::message_flags flags,
+ reactor_op* op, operation* iocp_op);
// Helper function to start an asynchronous receive_from operation.
ASIO_DECL void start_receive_from_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
+ WSABUF* buffers, std::size_t buffer_count, void* addr,
socket_base::message_flags flags, int* addrlen, operation* op);
// Helper function to start an asynchronous accept operation.
@@ -501,9 +596,9 @@ protected:
int op_type, reactor_op* op);
// Start the asynchronous connect operation using the reactor.
- ASIO_DECL void start_connect_op(base_implementation_type& impl,
- int family, int type, const socket_addr_type* remote_addr,
- std::size_t remote_addrlen, win_iocp_socket_connect_op_base* op);
+ ASIO_DECL int start_connect_op(base_implementation_type& impl,
+ int family, int type, const void* remote_addr, std::size_t remote_addrlen,
+ win_iocp_socket_connect_op_base* op, operation* iocp_op);
// Helper function to close a socket when the associated object is being
// destroyed.
@@ -514,8 +609,8 @@ protected:
base_implementation_type& impl);
// Helper function to get the reactor. If no reactor has been created yet, a
- // new one is obtained from the io_context and a pointer to it is cached in
- // this service.
+ // new one is obtained from the execution context and a pointer to it is
+ // cached in this service.
ASIO_DECL select_reactor& get_reactor();
// The type of a ConnectEx function pointer, as old SDKs may not provide it.
@@ -528,6 +623,15 @@ protected:
ASIO_DECL connect_ex_fn get_connect_ex(
base_implementation_type& impl, int type);
+ // The type of a NtSetInformationFile function pointer.
+ typedef LONG (NTAPI *nt_set_info_fn)(HANDLE, ULONG_PTR*, void*, ULONG, ULONG);
+
+ // Helper function to get the NtSetInformationFile function pointer. If no
+ // NtSetInformationFile pointer has been obtained yet, one is obtained using
+ // GetProcAddress and the pointer is cached. Returns a null pointer if
+ // NtSetInformationFile is not available.
+ ASIO_DECL nt_set_info_fn get_nt_set_info();
+
// Helper function to emulate InterlockedCompareExchangePointer functionality
// for:
// - very old Platform SDKs; and
@@ -540,8 +644,155 @@ protected:
// - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
ASIO_DECL void* interlocked_exchange_pointer(void** dest, void* val);
- // The io_context used to obtain the reactor, if required.
- asio::io_context& io_context_;
+ // Helper class used to implement per operation cancellation.
+ class iocp_op_cancellation : public operation
+ {
+ public:
+ iocp_op_cancellation(SOCKET s, operation* target)
+ : operation(&iocp_op_cancellation::do_complete),
+ socket_(s),
+ target_(target)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ iocp_op_cancellation* o = static_cast<iocp_op_cancellation*>(base);
+ o->target_->complete(owner, result_ec, bytes_transferred);
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(socket_);
+ ::CancelIoEx(sock_as_handle, this);
+ }
+#else // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ (void)type;
+#endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ }
+
+ private:
+ SOCKET socket_;
+ operation* target_;
+ };
+
+ // Helper class used to implement per operation cancellation.
+ class accept_op_cancellation : public operation
+ {
+ public:
+ accept_op_cancellation(SOCKET s, operation* target)
+ : operation(&iocp_op_cancellation::do_complete),
+ socket_(s),
+ target_(target),
+ cancel_requested_(0)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ accept_op_cancellation* o = static_cast<accept_op_cancellation*>(base);
+ o->target_->complete(owner, result_ec, bytes_transferred);
+ }
+
+ long* get_cancel_requested()
+ {
+ return &cancel_requested_;
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(socket_);
+ ::CancelIoEx(sock_as_handle, this);
+ }
+#else // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ (void)type;
+#endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ }
+
+ private:
+ SOCKET socket_;
+ operation* target_;
+ long cancel_requested_;
+ };
+
+ // Helper class used to implement per operation cancellation.
+ class reactor_op_cancellation : public operation
+ {
+ public:
+ reactor_op_cancellation(SOCKET s, operation* base)
+ : operation(&reactor_op_cancellation::do_complete),
+ socket_(s),
+ target_(base),
+ reactor_(0),
+ reactor_data_(0),
+ op_type_(-1)
+ {
+ }
+
+ void use_reactor(select_reactor* r,
+ select_reactor::per_descriptor_data* p, int o)
+ {
+ reactor_ = r;
+ reactor_data_ = p;
+ op_type_ = o;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& result_ec,
+ std::size_t bytes_transferred)
+ {
+ reactor_op_cancellation* o = static_cast<reactor_op_cancellation*>(base);
+ o->target_->complete(owner, result_ec, bytes_transferred);
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ if (reactor_)
+ {
+ reactor_->cancel_ops_by_key(socket_,
+ *reactor_data_, op_type_, this);
+ }
+ else
+ {
+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ HANDLE sock_as_handle = reinterpret_cast<HANDLE>(socket_);
+ ::CancelIoEx(sock_as_handle, this);
+#endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
+ }
+ }
+ }
+
+ private:
+ SOCKET socket_;
+ operation* target_;
+ select_reactor* reactor_;
+ select_reactor::per_descriptor_data* reactor_data_;
+ int op_type_;
+ };
+
+ // The execution context used to obtain the reactor, if required.
+ execution_context& context_;
// The IOCP service used for running asynchronous operations and dispatching
// handlers.
@@ -554,6 +805,9 @@ protected:
// Pointer to ConnectEx implementation.
void* connect_ex_;
+ // Pointer to NtSetInformationFile implementation.
+ void* nt_set_info_;
+
// Mutex to protect access to the linked list of implementations.
asio::detail::mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp b/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp
index ae13dd47100..3f1e0126779 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_thread_info.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp
index d5178d04734..882f16e73cf 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_wait_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -34,20 +34,21 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class win_iocp_wait_op : public reactor_op
{
public:
ASIO_DEFINE_HANDLER_PTR(win_iocp_wait_op);
win_iocp_wait_op(socket_ops::weak_cancel_token_type cancel_token,
- Handler& handler)
- : reactor_op(&win_iocp_wait_op::do_perform,
+ Handler& handler, const IoExecutor& io_ex)
+ : reactor_op(asio::error_code(),
+ &win_iocp_wait_op::do_perform,
&win_iocp_wait_op::do_complete),
cancel_token_(cancel_token),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static status do_perform(reactor_op*)
@@ -62,12 +63,17 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_wait_op* o(static_cast<win_iocp_wait_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// The reactor may have stored a result in the operation object.
if (o->ec_)
ec = o->ec_;
@@ -85,6 +91,8 @@ public:
ec = asio::error::connection_refused;
}
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -109,6 +117,7 @@ public:
private:
socket_ops::weak_cancel_token_type cancel_token_;
Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/win_mutex.hpp b/3rdparty/asio/include/asio/detail/win_mutex.hpp
index 350a02dce2a..77603ec9750 100644
--- a/3rdparty/asio/include/asio/detail/win_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/win_mutex.hpp
@@ -2,7 +2,7 @@
// detail/win_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp b/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp
index 59605549f42..8e01b72f4f6 100644
--- a/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp
@@ -2,7 +2,7 @@
// detail/win_object_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -20,11 +20,16 @@
#if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/wait_handler.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
#include "asio/detail/push_options.hpp"
@@ -32,7 +37,7 @@ namespace asio {
namespace detail {
class win_object_handle_service :
- public service_base<win_object_handle_service>
+ public execution_context_service_base<win_object_handle_service>
{
public:
// The native type of an object handle.
@@ -79,8 +84,7 @@ public:
};
// Constructor.
- ASIO_DECL win_object_handle_service(
- asio::io_context& io_context);
+ ASIO_DECL win_object_handle_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -129,16 +133,17 @@ public:
asio::error_code& ec);
/// Start an asynchronous wait.
- template <typename Handler>
- void async_wait(implementation_type& impl, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ Handler& handler, const IoExecutor& io_ex)
{
// Allocate and construct an operation to wrap the handler.
- typedef wait_handler<Handler> op;
+ typedef wait_handler<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_.context(), *p.p, "object_handle",
+ ASIO_HANDLER_CREATION((scheduler_.context(), *p.p, "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "async_wait"));
start_wait_op(impl, p.p);
@@ -157,8 +162,13 @@ private:
static ASIO_DECL VOID CALLBACK wait_callback(
PVOID param, BOOLEAN timeout);
- // The io_context implementation used to post completions.
- io_context_impl& io_context_;
+ // The scheduler used to post completions.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
// Mutex to protect access to internal state.
mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/win_static_mutex.hpp b/3rdparty/asio/include/asio/detail/win_static_mutex.hpp
index 6f0e75b4109..736ef0e3f2c 100644
--- a/3rdparty/asio/include/asio/detail/win_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/win_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/win_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/win_thread.hpp b/3rdparty/asio/include/asio/detail/win_thread.hpp
index ab2ba8d95bc..c1e7b8e618a 100644
--- a/3rdparty/asio/include/asio/detail/win_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/win_thread.hpp
@@ -2,7 +2,7 @@
// detail/win_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp
index 490c705783d..95a87717bad 100644
--- a/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/win_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/winapp_thread.hpp b/3rdparty/asio/include/asio/detail/winapp_thread.hpp
index 4d13109bdf0..efa662dfe6f 100644
--- a/3rdparty/asio/include/asio/detail/winapp_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/winapp_thread.hpp
@@ -2,7 +2,7 @@
// detail/winapp_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,8 +19,8 @@
#if defined(ASIO_WINDOWS) && defined(ASIO_WINDOWS_APP)
-#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/scoped_ptr.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
@@ -40,7 +40,7 @@ public:
template <typename Function>
winapp_thread(Function f, unsigned int = 0)
{
- std::auto_ptr<func_base> arg(new func<Function>(f));
+ scoped_ptr<func_base> arg(new func<Function>(f));
DWORD thread_id = 0;
thread_ = ::CreateThread(0, 0, winapp_thread_function,
arg.get(), 0, &thread_id);
@@ -108,7 +108,7 @@ private:
inline DWORD WINAPI winapp_thread_function(LPVOID arg)
{
- std::auto_ptr<winapp_thread::func_base> func(
+ scoped_ptr<winapp_thread::func_base> func(
static_cast<winapp_thread::func_base*>(arg));
func->run();
return 0;
diff --git a/3rdparty/asio/include/asio/detail/wince_thread.hpp b/3rdparty/asio/include/asio/detail/wince_thread.hpp
index 5e0d4ec0250..3c6b8543c21 100644
--- a/3rdparty/asio/include/asio/detail/wince_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/wince_thread.hpp
@@ -2,7 +2,7 @@
// detail/wince_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,8 +19,8 @@
#if defined(ASIO_WINDOWS) && defined(UNDER_CE)
-#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/scoped_ptr.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
@@ -40,7 +40,7 @@ public:
template <typename Function>
wince_thread(Function f, unsigned int = 0)
{
- std::auto_ptr<func_base> arg(new func<Function>(f));
+ scoped_ptr<func_base> arg(new func<Function>(f));
DWORD thread_id = 0;
thread_ = ::CreateThread(0, 0, wince_thread_function,
arg.get(), 0, &thread_id);
@@ -108,7 +108,7 @@ private:
inline DWORD WINAPI wince_thread_function(LPVOID arg)
{
- std::auto_ptr<wince_thread::func_base> func(
+ scoped_ptr<wince_thread::func_base> func(
static_cast<wince_thread::func_base*>(arg));
func->run();
return 0;
diff --git a/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp b/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp
index 921dfdd6274..9d0f9023c8c 100644
--- a/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp
@@ -2,7 +2,7 @@
// detail/winrt_async_manager.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,13 @@
#include "asio/detail/atomic_count.hpp"
#include "asio/detail/winrt_async_op.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
#include "asio/detail/push_options.hpp"
@@ -31,13 +37,13 @@ namespace asio {
namespace detail {
class winrt_async_manager
- : public asio::detail::service_base<winrt_async_manager>
+ : public execution_context_service_base<winrt_async_manager>
{
public:
// Constructor.
- winrt_async_manager(asio::io_context& io_context)
- : asio::detail::service_base<winrt_async_manager>(io_context),
- io_context_(use_service<io_context_impl>(io_context)),
+ winrt_async_manager(execution_context& context)
+ : execution_context_service_base<winrt_async_manager>(context),
+ scheduler_(use_service<scheduler_impl>(context)),
outstanding_ops_(1)
{
}
@@ -185,12 +191,12 @@ public:
asio::system_category());
break;
}
- io_context_.post_deferred_completion(handler);
+ scheduler_.post_deferred_completion(handler);
if (--outstanding_ops_ == 0)
promise_.set_value();
});
- io_context_.work_started();
+ scheduler_.work_started();
++outstanding_ops_;
action->Completed = on_completed;
}
@@ -222,12 +228,12 @@ public:
asio::system_category());
break;
}
- io_context_.post_deferred_completion(handler);
+ scheduler_.post_deferred_completion(handler);
if (--outstanding_ops_ == 0)
promise_.set_value();
});
- io_context_.work_started();
+ scheduler_.work_started();
++outstanding_ops_;
operation->Completed = on_completed;
}
@@ -263,19 +269,24 @@ public:
asio::system_category());
break;
}
- io_context_.post_deferred_completion(handler);
+ scheduler_.post_deferred_completion(handler);
if (--outstanding_ops_ == 0)
promise_.set_value();
});
- io_context_.work_started();
+ scheduler_.work_started();
++outstanding_ops_;
operation->Completed = on_completed;
}
private:
- // The io_context implementation used to post completed handlers.
- io_context_impl& io_context_;
+ // The scheduler implementation used to post completed handlers.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
// Count of outstanding operations.
atomic_count outstanding_ops_;
diff --git a/3rdparty/asio/include/asio/detail/winrt_async_op.hpp b/3rdparty/asio/include/asio/detail/winrt_async_op.hpp
index 2b18b431f56..a34989841bc 100644
--- a/3rdparty/asio/include/asio/detail/winrt_async_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_async_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_async_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp b/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp
index a197c3d3757..3cbd00e61f2 100644
--- a/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_resolve_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,7 +22,7 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
#include "asio/ip/basic_resolver_results.hpp"
@@ -33,7 +33,7 @@
namespace asio {
namespace detail {
-template <typename Protocol, typename Handler>
+template <typename Protocol, typename Handler, typename IoExecutor>
class winrt_resolve_op :
public winrt_async_op<
Windows::Foundation::Collections::IVectorView<
@@ -46,27 +46,33 @@ public:
typedef asio::ip::basic_resolver_query<Protocol> query_type;
typedef asio::ip::basic_resolver_results<Protocol> results_type;
- winrt_resolve_op(const query_type& query, Handler& handler)
+ winrt_resolve_op(const query_type& query,
+ Handler& handler, const IoExecutor& io_ex)
: winrt_async_op<
Windows::Foundation::Collections::IVectorView<
Windows::Networking::EndpointPair^>^>(
&winrt_resolve_op::do_complete),
query_(query),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_resolve_op* o(static_cast<winrt_resolve_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
results_type results = results_type();
if (!o->ec_)
{
@@ -106,6 +112,7 @@ public:
private:
query_type query_;
Handler handler_;
+ handler_work<Handler, IoExecutor> executor_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp b/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp
index 8e38331c234..02dddf08226 100644
--- a/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp
@@ -2,7 +2,7 @@
// detail/winrt_resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,6 +21,7 @@
#include "asio/ip/basic_resolver_query.hpp"
#include "asio/ip/basic_resolver_results.hpp"
+#include "asio/post.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/socket_ops.hpp"
@@ -28,6 +29,12 @@
#include "asio/detail/winrt_resolve_op.hpp"
#include "asio/detail/winrt_utils.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -35,7 +42,7 @@ namespace detail {
template <typename Protocol>
class winrt_resolver_service :
- public service_base<winrt_resolver_service<Protocol> >
+ public execution_context_service_base<winrt_resolver_service<Protocol>>
{
public:
// The implementation type of the resolver. A cancellation token is used to
@@ -53,10 +60,11 @@ public:
typedef asio::ip::basic_resolver_results<Protocol> results_type;
// Constructor.
- winrt_resolver_service(asio::io_context& io_context)
- : service_base<winrt_resolver_service<Protocol> >(io_context),
- io_context_(use_service<io_context_impl>(io_context)),
- async_manager_(use_service<winrt_async_manager>(io_context))
+ winrt_resolver_service(execution_context& context)
+ : execution_context_service_base<
+ winrt_resolver_service<Protocol>>(context),
+ scheduler_(use_service<scheduler_impl>(context)),
+ async_manager_(use_service<winrt_async_manager>(context))
{
}
@@ -71,7 +79,7 @@ public:
}
// Perform any fork-related housekeeping.
- void notify_fork(asio::io_context::fork_event)
+ void notify_fork(execution_context::fork_event)
{
}
@@ -130,20 +138,20 @@ public:
}
// Asynchronously resolve a query to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type& impl,
- const query_type& query, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type& impl, const query_type& query,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
- typedef winrt_resolve_op<Protocol, Handler> op;
+ typedef winrt_resolve_op<Protocol, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(query, handler);
+ p.p = new (p.v) op(query, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "resolver", &impl, 0, "async_resolve"));
(void)impl;
@@ -159,7 +167,7 @@ public:
{
p.p->ec_ = asio::error_code(
e->HResult, asio::system_category());
- io_context_.post_immediate_completion(p.p, is_continuation);
+ scheduler_.post_immediate_completion(p.p, is_continuation);
p.v = p.p = 0;
}
}
@@ -173,18 +181,24 @@ public:
}
// Asynchronously resolve an endpoint to a list of entries.
- template <typename Handler>
- void async_resolve(implementation_type&,
- const endpoint_type&, Handler& handler)
+ template <typename Handler, typename IoExecutor>
+ void async_resolve(implementation_type&, const endpoint_type&,
+ Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const results_type results;
- io_context_.get_io_context().post(
- detail::bind_handler(handler, ec, results));
+ asio::post(io_ex, detail::bind_handler(handler, ec, results));
}
private:
- io_context_impl& io_context_;
+ // The scheduler implementation used for delivering completions.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
+
winrt_async_manager& async_manager_;
};
diff --git a/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp
index 94b4048250d..008062e1b6e 100644
--- a/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
#include "asio/error.hpp"
@@ -33,30 +33,35 @@
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class winrt_socket_connect_op :
public winrt_async_op<void>
{
public:
ASIO_DEFINE_HANDLER_PTR(winrt_socket_connect_op);
- winrt_socket_connect_op(Handler& handler)
+ winrt_socket_connect_op(Handler& handler, const IoExecutor& io_ex)
: winrt_async_op<void>(&winrt_socket_connect_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_socket_connect_op* o(static_cast<winrt_socket_connect_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -80,6 +85,7 @@ public:
private:
Handler handler_;
+ handler_work<Handler, IoExecutor> executor_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp
index d19f1f734f3..4b1d9f895f3 100644
--- a/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
#include "asio/error.hpp"
@@ -33,32 +33,38 @@
namespace asio {
namespace detail {
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
class winrt_socket_recv_op :
public winrt_async_op<Windows::Storage::Streams::IBuffer^>
{
public:
ASIO_DEFINE_HANDLER_PTR(winrt_socket_recv_op);
- winrt_socket_recv_op(const MutableBufferSequence& buffers, Handler& handler)
+ winrt_socket_recv_op(const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
: winrt_async_op<Windows::Storage::Streams::IBuffer^>(
&winrt_socket_recv_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_socket_recv_op* o(static_cast<winrt_socket_recv_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
// Check whether buffers are still valid.
if (owner)
@@ -100,6 +106,7 @@ public:
private:
MutableBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> executor_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp
index 6d16ef3f5cd..eb21ef7e902 100644
--- a/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,7 +23,7 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
#include "asio/error.hpp"
@@ -33,31 +33,37 @@
namespace asio {
namespace detail {
-template <typename ConstBufferSequence, typename Handler>
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
class winrt_socket_send_op :
public winrt_async_op<unsigned int>
{
public:
ASIO_DEFINE_HANDLER_PTR(winrt_socket_send_op);
- winrt_socket_send_op(const ConstBufferSequence& buffers, Handler& handler)
+ winrt_socket_send_op(const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
: winrt_async_op<unsigned int>(&winrt_socket_send_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
{
- handler_work<Handler>::start(handler_);
}
static void do_complete(void* owner, operation* base,
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_socket_send_op* o(static_cast<winrt_socket_send_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
- handler_work<Handler> w(o->handler_);
ASIO_HANDLER_COMPLETION((*o));
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
// Check whether buffers are still valid.
if (owner)
@@ -91,6 +97,7 @@ public:
private:
ConstBufferSequence buffers_;
Handler handler_;
+ handler_work<Handler, IoExecutor> executor_;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp b/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp
index 6f72bbec4d6..6b45ed4fb0c 100644
--- a/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp
@@ -2,7 +2,7 @@
// detail/winrt_ssocket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,7 +20,7 @@
#if defined(ASIO_WINDOWS_RUNTIME)
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_socket_connect_op.hpp"
#include "asio/detail/winrt_ssocket_service_base.hpp"
@@ -33,7 +33,7 @@ namespace detail {
template <typename Protocol>
class winrt_ssocket_service :
- public service_base<winrt_ssocket_service<Protocol> >,
+ public execution_context_service_base<winrt_ssocket_service<Protocol>>,
public winrt_ssocket_service_base
{
public:
@@ -61,9 +61,9 @@ public:
};
// Constructor.
- winrt_ssocket_service(asio::io_context& io_context)
- : service_base<winrt_ssocket_service<Protocol> >(io_context),
- winrt_ssocket_service_base(io_context)
+ winrt_ssocket_service(execution_context& context)
+ : execution_context_service_base<winrt_ssocket_service<Protocol>>(context),
+ winrt_ssocket_service_base(context)
{
}
@@ -75,7 +75,7 @@ public:
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
- implementation_type& other_impl)
+ implementation_type& other_impl) noexcept
{
this->base_move_construct(impl, other_impl);
@@ -97,6 +97,7 @@ public:
// Move-construct a new socket implementation from another protocol type.
template <typename Protocol1>
void converting_move_construct(implementation_type& impl,
+ winrt_ssocket_service<Protocol1>&,
typename winrt_ssocket_service<
Protocol1>::implementation_type& other_impl)
{
@@ -177,6 +178,14 @@ public:
return endpoint;
}
+ // Disable sends or receives on the socket.
+ asio::error_code shutdown(implementation_type&,
+ socket_base::shutdown_type, asio::error_code& ec)
+ {
+ ec = asio::error::operation_not_supported;
+ return ec;
+ }
+
// Set a socket option.
template <typename Option>
asio::error_code set_option(implementation_type& impl,
@@ -209,20 +218,21 @@ public:
}
// Start an asynchronous connect.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, Handler& handler)
+ const endpoint_type& peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
- typedef winrt_socket_connect_op<Handler> op;
+ typedef winrt_socket_connect_op<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(handler);
+ p.p = new (p.v) op(handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "socket", &impl, 0, "async_connect"));
start_connect_op(impl, peer_endpoint.data(), p.p, is_continuation);
diff --git a/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp b/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp
index 9192ffbc138..c752da80e2a 100644
--- a/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/winrt_ssocket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,7 +21,7 @@
#include "asio/buffer.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/socket_base.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/memory.hpp"
@@ -30,6 +30,12 @@
#include "asio/detail/winrt_socket_recv_op.hpp"
#include "asio/detail/winrt_socket_send_op.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -61,8 +67,7 @@ public:
};
// Constructor.
- ASIO_DECL winrt_ssocket_service_base(
- asio::io_context& io_context);
+ ASIO_DECL winrt_ssocket_service_base(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void base_shutdown();
@@ -72,7 +77,7 @@ public:
// Move-construct a new socket implementation.
ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl);
+ base_implementation_type& other_impl) noexcept;
// Move-assign from another socket implementation.
ASIO_DECL void base_move_assign(base_implementation_type& impl,
@@ -92,6 +97,10 @@ public:
ASIO_DECL asio::error_code close(
base_implementation_type& impl, asio::error_code& ec);
+ // Release ownership of the socket.
+ ASIO_DECL native_handle_type release(
+ base_implementation_type& impl, asio::error_code& ec);
+
// Get the native socket representation.
native_handle_type native_handle(base_implementation_type& impl)
{
@@ -159,14 +168,6 @@ public:
return ec;
}
- // Disable sends or receives on the socket.
- asio::error_code shutdown(base_implementation_type&,
- socket_base::shutdown_type, asio::error_code& ec)
- {
- ec = asio::error::operation_not_supported;
- return ec;
- }
-
// Send the given data to the peer.
template <typename ConstBufferSequence>
std::size_t send(base_implementation_type& impl,
@@ -188,21 +189,21 @@ public:
// Start an asynchronous send. The data being sent must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_send(base_implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
- typedef winrt_socket_send_op<ConstBufferSequence, Handler> op;
+ typedef winrt_socket_send_op<ConstBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
+ p.p = new (p.v) op(buffers, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "socket", &impl, 0, "async_send"));
start_send_op(impl,
@@ -213,13 +214,13 @@ public:
}
// Start an asynchronous wait until data can be sent without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_send(base_implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.get_io_context().post(
+ asio::post(io_ex,
detail::bind_handler(handler, ec, bytes_transferred));
}
@@ -244,21 +245,22 @@ public:
// Start an asynchronous receive. The buffer for the data being received
// must be valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_receive(base_implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, Handler& handler)
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
{
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
- typedef winrt_socket_recv_op<MutableBufferSequence, Handler> op;
+ typedef winrt_socket_recv_op<MutableBufferSequence, Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
- p.p = new (p.v) op(buffers, handler);
+ p.p = new (p.v) op(buffers, handler, io_ex);
- ASIO_HANDLER_CREATION((io_context_.context(),
+ ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "socket", &impl, 0, "async_receive"));
start_receive_op(impl,
@@ -269,13 +271,13 @@ public:
}
// Wait until data can be received without blocking.
- template <typename Handler>
+ template <typename Handler, typename IoExecutor>
void async_receive(base_implementation_type&, const null_buffers&,
- socket_base::message_flags, Handler& handler)
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
{
asio::error_code ec = asio::error::operation_not_supported;
const std::size_t bytes_transferred = 0;
- io_context_.get_io_context().post(
+ asio::post(io_ex,
detail::bind_handler(handler, ec, bytes_transferred));
}
@@ -328,8 +330,13 @@ protected:
winrt_async_op<Windows::Storage::Streams::IBuffer^>* op,
bool is_continuation);
- // The io_context implementation used for delivering completions.
- io_context_impl& io_context_;
+ // The scheduler implementation used for delivering completions.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
// The manager that keeps track of outstanding operations.
winrt_async_manager& async_manager_;
diff --git a/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp b/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp
index f3ffe6113e8..aadd581f75d 100644
--- a/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/winrt_timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,7 +28,13 @@
#include "asio/detail/timer_queue_base.hpp"
#include "asio/detail/timer_queue_set.hpp"
#include "asio/detail/wait_op.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/scheduler.hpp"
+#endif // defined(ASIO_HAS_IOCP)
#if defined(ASIO_HAS_IOCP)
# include "asio/detail/thread.hpp"
@@ -40,11 +46,11 @@ namespace asio {
namespace detail {
class winrt_timer_scheduler
- : public asio::detail::service_base<winrt_timer_scheduler>
+ : public execution_context_service_base<winrt_timer_scheduler>
{
public:
// Constructor.
- ASIO_DECL winrt_timer_scheduler(asio::io_context& io_context);
+ ASIO_DECL winrt_timer_scheduler(execution_context& context);
// Destructor.
ASIO_DECL ~winrt_timer_scheduler();
@@ -53,8 +59,7 @@ public:
ASIO_DECL void shutdown();
// Recreate internal descriptors following a fork.
- ASIO_DECL void notify_fork(
- asio::io_context::fork_event fork_ev);
+ ASIO_DECL void notify_fork(execution_context::fork_event fork_ev);
// Initialise the task. No effect as this class uses its own thread.
ASIO_DECL void init_task();
@@ -100,8 +105,13 @@ private:
// Helper function to remove a timer queue.
ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
- // The io_context implementation used to post completions.
- io_context_impl& io_context_;
+ // The scheduler implementation used to post completions.
+#if defined(ASIO_HAS_IOCP)
+ typedef class win_iocp_io_context scheduler_impl;
+#else
+ typedef class scheduler scheduler_impl;
+#endif
+ scheduler_impl& scheduler_;
// Mutex used to protect internal variables.
asio::detail::mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/winrt_utils.hpp b/3rdparty/asio/include/asio/detail/winrt_utils.hpp
index 52f714300ac..f33786ccf8b 100644
--- a/3rdparty/asio/include/asio/detail/winrt_utils.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_utils.hpp
@@ -2,7 +2,7 @@
// detail/winrt_utils.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -82,7 +82,8 @@ inline Windows::Storage::Streams::IBuffer^ buffer_dup(
const ConstBufferSequence& buffers)
{
using Microsoft::WRL::ComPtr;
- std::size_t size = asio::buffer_size(buffers);
+ using asio::buffer_size;
+ std::size_t size = buffer_size(buffers);
auto b = ref new Windows::Storage::Streams::Buffer(size);
ComPtr<IInspectable> insp = reinterpret_cast<IInspectable*>(b);
ComPtr<Windows::Storage::Streams::IBufferByteAccess> bacc;
diff --git a/3rdparty/asio/include/asio/detail/winsock_init.hpp b/3rdparty/asio/include/asio/detail/winsock_init.hpp
index b88cd518c98..7914560ab64 100644
--- a/3rdparty/asio/include/asio/detail/winsock_init.hpp
+++ b/3rdparty/asio/include/asio/detail/winsock_init.hpp
@@ -2,7 +2,7 @@
// detail/winsock_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -47,7 +47,7 @@ protected:
ASIO_DECL static void throw_on_error(data& d);
};
-template <int Major = 2, int Minor = 0>
+template <int Major = 2, int Minor = 2>
class winsock_init : private winsock_init_base
{
public:
diff --git a/3rdparty/asio/include/asio/detail/work_dispatcher.hpp b/3rdparty/asio/include/asio/detail/work_dispatcher.hpp
index 460fbd6c03e..2a473e45af6 100644
--- a/3rdparty/asio/include/asio/detail/work_dispatcher.hpp
+++ b/3rdparty/asio/include/asio/detail/work_dispatcher.hpp
@@ -2,7 +2,7 @@
// detail/work_dispatcher.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,26 +16,97 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/associated_executor.hpp"
#include "asio/associated_allocator.hpp"
#include "asio/executor_work_guard.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/prefer.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename Executor, typename = void>
+struct is_work_dispatcher_required : true_type
+{
+};
+
+template <typename Handler, typename Executor>
+struct is_work_dispatcher_required<Handler, Executor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >> : false_type
+{
+};
+
+template <typename Handler, typename Executor, typename = void>
class work_dispatcher
{
public:
- work_dispatcher(Handler& handler)
- : work_((get_associated_executor)(handler)),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ template <typename CompletionHandler>
+ work_dispatcher(CompletionHandler&& handler,
+ const Executor& handler_ex)
+ : handler_(static_cast<CompletionHandler&&>(handler)),
+ executor_(asio::prefer(handler_ex,
+ execution::outstanding_work.tracked))
+ {
+ }
+
+ work_dispatcher(const work_dispatcher& other)
+ : handler_(other.handler_),
+ executor_(other.executor_)
+ {
+ }
+
+ work_dispatcher(work_dispatcher&& other)
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ executor_(static_cast<work_executor_type&&>(other.executor_))
+ {
+ }
+
+ void operator()()
+ {
+ associated_allocator_t<Handler> alloc((get_associated_allocator)(handler_));
+ asio::prefer(executor_, execution::allocator(alloc)).execute(
+ asio::detail::bind_handler(
+ static_cast<Handler&&>(handler_)));
+ }
+
+private:
+ typedef decay_t<
+ prefer_result_t<const Executor&,
+ execution::outstanding_work_t::tracked_t
+ >
+ > work_executor_type;
+
+ Handler handler_;
+ work_executor_type executor_;
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Handler, typename Executor>
+class work_dispatcher<Handler, Executor,
+ enable_if_t<!execution::is_executor<Executor>::value>>
+{
+public:
+ template <typename CompletionHandler>
+ work_dispatcher(CompletionHandler&& handler, const Executor& handler_ex)
+ : work_(handler_ex),
+ handler_(static_cast<CompletionHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
work_dispatcher(const work_dispatcher& other)
: work_(other.work_),
handler_(other.handler_)
@@ -43,27 +114,27 @@ public:
}
work_dispatcher(work_dispatcher&& other)
- : work_(ASIO_MOVE_CAST(executor_work_guard<
- typename associated_executor<Handler>::type>)(other.work_)),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ : work_(static_cast<executor_work_guard<Executor>&&>(other.work_)),
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- typename associated_executor<Handler>::type ex(work_.get_executor());
- typename associated_allocator<Handler>::type alloc(
- (get_associated_allocator)(handler_));
- ex.dispatch(ASIO_MOVE_CAST(Handler)(handler_), alloc);
+ associated_allocator_t<Handler> alloc((get_associated_allocator)(handler_));
+ work_.get_executor().dispatch(
+ asio::detail::bind_handler(
+ static_cast<Handler&&>(handler_)), alloc);
work_.reset();
}
private:
- executor_work_guard<typename associated_executor<Handler>::type> work_;
+ executor_work_guard<Executor> work_;
Handler handler_;
};
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/wrapped_handler.hpp b/3rdparty/asio/include/asio/detail/wrapped_handler.hpp
index aff903ed38f..fce9abfab43 100644
--- a/3rdparty/asio/include/asio/detail/wrapped_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/wrapped_handler.hpp
@@ -2,7 +2,7 @@
// detail/wrapped_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/push_options.hpp"
@@ -52,11 +50,10 @@ public:
wrapped_handler(Dispatcher dispatcher, Handler& handler)
: dispatcher_(dispatcher),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
wrapped_handler(const wrapped_handler& other)
: dispatcher_(other.dispatcher_),
handler_(other.handler_)
@@ -65,14 +62,13 @@ public:
wrapped_handler(wrapped_handler&& other)
: dispatcher_(other.dispatcher_),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- dispatcher_.dispatch(ASIO_MOVE_CAST(Handler)(handler_));
+ dispatcher_.dispatch(static_cast<Handler&&>(handler_));
}
void operator()() const
@@ -161,7 +157,7 @@ class rewrapped_handler
public:
explicit rewrapped_handler(Handler& handler, const Context& context)
: context_(context),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler))
{
}
@@ -171,7 +167,6 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
rewrapped_handler(const rewrapped_handler& other)
: context_(other.context_),
handler_(other.handler_)
@@ -179,11 +174,10 @@ public:
}
rewrapped_handler(rewrapped_handler&& other)
- : context_(ASIO_MOVE_CAST(Context)(other.context_)),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ : context_(static_cast<Context&&>(other.context_)),
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
@@ -201,64 +195,12 @@ public:
};
template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline void* asio_handler_allocate(std::size_t size,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
inline bool asio_handler_is_continuation(
wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
{
return IsContinuation()(this_handler->dispatcher_, this_handler->handler_);
}
-template <typename Function, typename Dispatcher,
- typename Handler, typename IsContinuation>
-inline void asio_handler_invoke(Function& function,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- this_handler->dispatcher_.dispatch(
- rewrapped_handler<Function, Handler>(
- function, this_handler->handler_));
-}
-
-template <typename Function, typename Dispatcher,
- typename Handler, typename IsContinuation>
-inline void asio_handler_invoke(const Function& function,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- this_handler->dispatcher_.dispatch(
- rewrapped_handler<Function, Handler>(
- function, this_handler->handler_));
-}
-
-template <typename Handler, typename Context>
-inline void* asio_handler_allocate(std::size_t size,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->context_);
-}
-
-template <typename Handler, typename Context>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->context_);
-}
-
template <typename Dispatcher, typename Context>
inline bool asio_handler_is_continuation(
rewrapped_handler<Dispatcher, Context>* this_handler)
@@ -267,22 +209,6 @@ inline bool asio_handler_is_continuation(
this_handler->context_);
}
-template <typename Function, typename Handler, typename Context>
-inline void asio_handler_invoke(Function& function,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->context_);
-}
-
-template <typename Function, typename Handler, typename Context>
-inline void asio_handler_invoke(const Function& function,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->context_);
-}
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/dispatch.hpp b/3rdparty/asio/include/asio/dispatch.hpp
index 2addadcb806..9eb60a4103d 100644
--- a/3rdparty/asio/include/asio/dispatch.hpp
+++ b/3rdparty/asio/include/asio/dispatch.hpp
@@ -2,7 +2,7 @@
// dispatch.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,8 +17,10 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/initiate_dispatch.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
+#include "asio/execution/executor.hpp"
#include "asio/is_executor.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,81 +30,168 @@ namespace asio {
/// Submits a completion token or function object for execution.
/**
* This function submits an object for execution using the object's associated
- * executor. The function object is queued for execution, and is never called
- * from the current thread prior to returning from <tt>dispatch()</tt>.
+ * executor. The function object may be called from the current thread prior to
+ * returning from <tt>dispatch()</tt>. Otherwise, it is queued for execution.
*
- * This function has the following effects:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{}, token)</tt>, where @c Init is a function object type defined
+ * as:
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * }; @endcode
*
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * The function call operator of @c Init:
+ *
+ * @li Obtains the handler's associated executor object @c ex of type @c Ex by
+ * performing @code auto ex = get_associated_executor(handler); @endcode
*
* @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(ex, execution::allocator(alloc)).execute(
+ * std::forward<CompletionHandler>(completion_handler)); @endcode
*
- * @li Performs <tt>ex.dispatch(std::move(handler), alloc)</tt>.
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.dispatch(
+ * std::forward<CompletionHandler>(completion_handler),
+ * alloc); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- ASIO_MOVE_ARG(CompletionToken) token);
+template <ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
+inline auto dispatch(NullaryToken&& token)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_dispatch>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_dispatch(), token);
+}
/// Submits a completion token or function object for execution.
/**
* This function submits an object for execution using the specified executor.
- * The function object is queued for execution, and is never called from the
- * current thread prior to returning from <tt>dispatch()</tt>.
- *
- * This function has the following effects:
+ * The function object may be called from the current thread prior to returning
+ * from <tt>dispatch()</tt>. Otherwise, it is queued for execution.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param ex The target executor.
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{ex}, token)</tt>, where @c Init is a function object type
+ * defined as:
*
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * using executor_type = Executor;
+ * explicit Init(const Executor& ex) : ex_(ex) {}
+ * executor_type get_executor() const noexcept { return ex_; }
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * private:
+ * Executor ex_; // exposition only
+ * }; @endcode
*
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
+ * The function call operator of @c Init:
*
- * @li Performs <tt>Executor(ex).dispatch(std::move(f), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex1 of type @c Ex1 by
+ * performing @code auto ex1 = get_associated_executor(handler, ex); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is true, constructs a
+ * function object @c f with a member @c executor_ that is initialised with
+ * <tt>prefer(ex1, execution::outstanding_work.tracked)</tt>, a member @c
+ * handler_ that is a decay-copy of @c completion_handler, and a function call
+ * operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * prefer(executor_, execution::allocator(a)).execute(std::move(handler_));
+ * @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is false, constructs a
+ * function object @c f with a member @c work_ that is initialised with
+ * <tt>make_work_guard(ex1)</tt>, a member @c handler_ that is a decay-copy of
+ * @c completion_handler, and a function call operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * work_.get_executor().dispatch(std::move(handler_), a);
+ * work_.reset(); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(ex, execution::allocator(alloc)).execute(std::move(f)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.dispatch(std::move(f), alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename Executor, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type* = 0);
+template <typename Executor,
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<Executor>>
+inline auto dispatch(const Executor& ex,
+ NullaryToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
+ execution::is_executor<Executor>::value || is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_dispatch_with_executor<Executor>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_dispatch_with_executor<Executor>(ex), token);
+}
/// Submits a completion token or function object for execution.
/**
+ * @param ctx An execution context, from which the target executor is obtained.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
+ *
* @returns <tt>dispatch(ctx.get_executor(),
- * forward<CompletionToken>(token))</tt>.
+ * forward<NullaryToken>(token))</tt>.
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename ExecutionContext, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
+template <typename ExecutionContext,
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+inline auto dispatch(ExecutionContext& ctx,
+ NullaryToken&& token = default_completion_token_t<
+ typename ExecutionContext::executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_dispatch_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_dispatch_with_executor<
+ typename ExecutionContext::executor_type>(
+ ctx.get_executor()), token);
+}
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/dispatch.hpp"
-
#endif // ASIO_DISPATCH_HPP
diff --git a/3rdparty/asio/include/asio/error.hpp b/3rdparty/asio/include/asio/error.hpp
index 5d5767a4e55..d676ee8aa7d 100644
--- a/3rdparty/asio/include/asio/error.hpp
+++ b/3rdparty/asio/include/asio/error.hpp
@@ -2,7 +2,7 @@
// error.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -223,6 +223,41 @@ enum misc_errors
fd_set_failure
};
+// boostify: non-boost code starts here
+#if !defined(ASIO_ERROR_LOCATION)
+# define ASIO_ERROR_LOCATION(e) (void)0
+#endif // !defined(ASIO_ERROR_LOCATION)
+
+// boostify: non-boost code ends here
+#if !defined(ASIO_ERROR_LOCATION) \
+ && !defined(ASIO_DISABLE_ERROR_LOCATION) \
+ && defined(ASIO_HAS_BOOST_CONFIG) \
+ && (BOOST_VERSION >= 107900)
+
+# define ASIO_ERROR_LOCATION(e) \
+ do { \
+ BOOST_STATIC_CONSTEXPR boost::source_location loc \
+ = BOOST_CURRENT_LOCATION; \
+ (e).assign((e), &loc); \
+ } while (false)
+
+#else // !defined(ASIO_ERROR_LOCATION)
+ // && !defined(ASIO_DISABLE_ERROR_LOCATION)
+ // && defined(ASIO_HAS_BOOST_CONFIG)
+ // && (BOOST_VERSION >= 107900)
+
+# define ASIO_ERROR_LOCATION(e) (void)0
+
+#endif // !defined(ASIO_ERROR_LOCATION)
+ // && !defined(ASIO_DISABLE_ERROR_LOCATION)
+ // && defined(ASIO_HAS_BOOST_CONFIG)
+ // && (BOOST_VERSION >= 107900)
+
+inline void clear(asio::error_code& ec)
+{
+ ec.assign(0, ec.category());
+}
+
inline const asio::error_category& get_system_category()
{
return asio::system_category();
@@ -253,19 +288,22 @@ inline const asio::error_category& get_addrinfo_category()
extern ASIO_DECL
const asio::error_category& get_misc_category();
-static const asio::error_category& system_category
+static const asio::error_category&
+ system_category ASIO_UNUSED_VARIABLE
= asio::error::get_system_category();
-static const asio::error_category& netdb_category
+static const asio::error_category&
+ netdb_category ASIO_UNUSED_VARIABLE
= asio::error::get_netdb_category();
-static const asio::error_category& addrinfo_category
+static const asio::error_category&
+ addrinfo_category ASIO_UNUSED_VARIABLE
= asio::error::get_addrinfo_category();
-static const asio::error_category& misc_category
+static const asio::error_category&
+ misc_category ASIO_UNUSED_VARIABLE
= asio::error::get_misc_category();
} // namespace error
} // namespace asio
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace std {
template<> struct is_error_code_enum<asio::error::basic_errors>
@@ -289,7 +327,6 @@ template<> struct is_error_code_enum<asio::error::misc_errors>
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace asio {
namespace error {
@@ -332,7 +369,7 @@ namespace socket_errc {
namespace resolver_errc {
// Simulates the proposed resolver_errc scoped enum.
using error::host_not_found;
- using error::host_not_found_try_again;
+ const error::netdb_errors try_again = error::host_not_found_try_again;
using error::service_not_found;
} // namespace resolver_errc
} // namespace asio
diff --git a/3rdparty/asio/include/asio/error_code.hpp b/3rdparty/asio/include/asio/error_code.hpp
index 09a2acb2f6b..5cb07f48c42 100644
--- a/3rdparty/asio/include/asio/error_code.hpp
+++ b/3rdparty/asio/include/asio/error_code.hpp
@@ -2,7 +2,7 @@
// error_code.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,167 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <system_error>
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <string>
-# include "asio/detail/noncopyable.hpp"
-# if !defined(ASIO_NO_IOSTREAM)
-# include <iosfwd>
-# endif // !defined(ASIO_NO_IOSTREAM)
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
+#include <system_error>
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
typedef std::error_category error_category;
-
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-/// Base class for all error categories.
-class error_category : private noncopyable
-{
-public:
- /// Destructor.
- virtual ~error_category()
- {
- }
-
- /// Returns a string naming the error gategory.
- virtual const char* name() const = 0;
-
- /// Returns a string describing the error denoted by @c value.
- virtual std::string message(int value) const = 0;
-
- /// Equality operator to compare two error categories.
- bool operator==(const error_category& rhs) const
- {
- return this == &rhs;
- }
-
- /// Inequality operator to compare two error categories.
- bool operator!=(const error_category& rhs) const
- {
- return !(*this == rhs);
- }
-};
-
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
+typedef std::error_code error_code;
/// Returns the error category used for the system errors produced by asio.
extern ASIO_DECL const error_category& system_category();
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-typedef std::error_code error_code;
-
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-/// Class to represent an error code value.
-class error_code
-{
-public:
- /// Default constructor.
- error_code()
- : value_(0),
- category_(&system_category())
- {
- }
-
- /// Construct with specific error code and category.
- error_code(int v, const error_category& c)
- : value_(v),
- category_(&c)
- {
- }
-
- /// Construct from an error code enum.
- template <typename ErrorEnum>
- error_code(ErrorEnum e)
- {
- *this = make_error_code(e);
- }
-
- /// Get the error value.
- int value() const
- {
- return value_;
- }
-
- /// Get the error category.
- const error_category& category() const
- {
- return *category_;
- }
-
- /// Get the message associated with the error.
- std::string message() const
- {
- return category_->message(value_);
- }
-
- struct unspecified_bool_type_t
- {
- };
-
- typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
-
- static void unspecified_bool_true(unspecified_bool_type_t) {}
-
- /// Operator returns non-null if there is a non-success error code.
- operator unspecified_bool_type() const
- {
- if (value_ == 0)
- return 0;
- else
- return &error_code::unspecified_bool_true;
- }
-
- /// Operator to test if the error represents success.
- bool operator!() const
- {
- return value_ == 0;
- }
-
- /// Equality operator to compare two error objects.
- friend bool operator==(const error_code& e1, const error_code& e2)
- {
- return e1.value_ == e2.value_ && e1.category_ == e2.category_;
- }
-
- /// Inequality operator to compare two error objects.
- friend bool operator!=(const error_code& e1, const error_code& e2)
- {
- return e1.value_ != e2.value_ || e1.category_ != e2.category_;
- }
-
-private:
- // The value associated with the error code.
- int value_;
-
- // The category associated with the error code.
- const error_category* category_;
-};
-
-# if !defined(ASIO_NO_IOSTREAM)
-
-/// Output an error code.
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const error_code& ec)
-{
- os << ec.category().name() << ':' << ec.value();
- return os;
-}
-
-# endif // !defined(ASIO_NO_IOSTREAM)
-
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/execution.hpp b/3rdparty/asio/include/asio/execution.hpp
new file mode 100644
index 00000000000..fa773259fad
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution.hpp
@@ -0,0 +1,33 @@
+//
+// execution.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_HPP
+#define ASIO_EXECUTION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/any_executor.hpp"
+#include "asio/execution/bad_executor.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/blocking_adaptation.hpp"
+#include "asio/execution/context.hpp"
+#include "asio/execution/context_as.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/invocable_archetype.hpp"
+#include "asio/execution/mapping.hpp"
+#include "asio/execution/occupancy.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/execution/prefer_only.hpp"
+#include "asio/execution/relationship.hpp"
+
+#endif // ASIO_EXECUTION_HPP
diff --git a/3rdparty/asio/include/asio/execution/allocator.hpp b/3rdparty/asio/include/asio/execution/allocator.hpp
new file mode 100644
index 00000000000..cdb6a4a9203
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/allocator.hpp
@@ -0,0 +1,278 @@
+//
+// execution/allocator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_ALLOCATOR_HPP
+#define ASIO_EXECUTION_ALLOCATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property to describe which allocator an executor will use to allocate the
+/// memory required to store a submitted function object.
+template <typename ProtoAllocator>
+struct allocator_t
+{
+ /// The allocator_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The allocator_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The allocator_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// Default constructor.
+ constexpr allocator_t();
+
+ /// Obtain the allocator stored in the allocator_t property object.
+ /**
+ * Present only if @c ProtoAllocator is non-void.
+ */
+ constexpr ProtoAllocator value() const;
+
+ /// Create an allocator_t object with a different allocator.
+ /**
+ * Present only if @c ProtoAllocator is void.
+ */
+ template <typename OtherAllocator>
+ allocator_t<OtherAllocator operator()(const OtherAllocator& a);
+};
+
+/// A special value used for accessing the allocator_t property.
+constexpr allocator_t<void> allocator;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+template <typename ProtoAllocator>
+struct allocator_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, allocator_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(allocator_t::static_query<E>())>
+ static constexpr const T static_query_v = allocator_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ constexpr ProtoAllocator value() const
+ {
+ return a_;
+ }
+
+private:
+ friend struct allocator_t<void>;
+
+ explicit constexpr allocator_t(const ProtoAllocator& a)
+ : a_(a)
+ {
+ }
+
+ ProtoAllocator a_;
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <typename ProtoAllocator> template <typename E, typename T>
+const T allocator_t<ProtoAllocator>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <>
+struct allocator_t<void>
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+
+ constexpr allocator_t()
+ {
+ }
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, allocator_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(allocator_t::static_query<E>())>
+ static constexpr const T static_query_v = allocator_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ template <typename OtherProtoAllocator>
+ constexpr allocator_t<OtherProtoAllocator> operator()(
+ const OtherProtoAllocator& a) const
+ {
+ return allocator_t<OtherProtoAllocator>(a);
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <typename E, typename T>
+const T allocator_t<void>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+constexpr allocator_t<void> allocator;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename ProtoAllocator>
+struct is_applicable_property<T, execution::allocator_t<ProtoAllocator>>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T, typename ProtoAllocator>
+struct static_query<T, execution::allocator_t<ProtoAllocator>,
+ enable_if_t<
+ execution::allocator_t<ProtoAllocator>::template
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::allocator_t<ProtoAllocator>::template
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::allocator_t<ProtoAllocator>::template
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_ALLOCATOR_HPP
diff --git a/3rdparty/asio/include/asio/execution/any_executor.hpp b/3rdparty/asio/include/asio/execution/any_executor.hpp
new file mode 100644
index 00000000000..a057543b139
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/any_executor.hpp
@@ -0,0 +1,1933 @@
+//
+// execution/any_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_ANY_EXECUTOR_HPP
+#define ASIO_EXECUTION_ANY_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <new>
+#include <typeinfo>
+#include "asio/detail/assert.hpp"
+#include "asio/detail/atomic_count.hpp"
+#include "asio/detail/cstddef.hpp"
+#include "asio/detail/executor_function.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/scoped_ptr.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/throw_exception.hpp"
+#include "asio/execution/bad_executor.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// Polymorphic executor wrapper.
+template <typename... SupportableProperties>
+class any_executor
+{
+public:
+ /// Default constructor.
+ any_executor() noexcept;
+
+ /// Construct in an empty state. Equivalent effects to default constructor.
+ any_executor(nullptr_t) noexcept;
+
+ /// Copy constructor.
+ any_executor(const any_executor& e) noexcept;
+
+ /// Move constructor.
+ any_executor(any_executor&& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ template <class... OtherSupportableProperties>
+ any_executor(any_executor<OtherSupportableProperties...> e);
+
+ /// Construct to point to the same target as another any_executor.
+ template <class... OtherSupportableProperties>
+ any_executor(std::nothrow_t,
+ any_executor<OtherSupportableProperties...> e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ any_executor(std::nothrow_t, const any_executor& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ any_executor(std::nothrow_t, any_executor&& e) noexcept;
+
+ /// Construct a polymorphic wrapper for the specified executor.
+ template <typename Executor>
+ any_executor(Executor e);
+
+ /// Construct a polymorphic wrapper for the specified executor.
+ template <typename Executor>
+ any_executor(std::nothrow_t, Executor e) noexcept;
+
+ /// Assignment operator.
+ any_executor& operator=(const any_executor& e) noexcept;
+
+ /// Move assignment operator.
+ any_executor& operator=(any_executor&& e) noexcept;
+
+ /// Assignment operator that sets the polymorphic wrapper to the empty state.
+ any_executor& operator=(nullptr_t);
+
+ /// Assignment operator to create a polymorphic wrapper for the specified
+ /// executor.
+ template <typename Executor>
+ any_executor& operator=(Executor e);
+
+ /// Destructor.
+ ~any_executor();
+
+ /// Swap targets with another polymorphic wrapper.
+ void swap(any_executor& other) noexcept;
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require and asio::prefer customisation points.
+ *
+ * For example:
+ * @code execution::any_executor<execution::blocking_t::possibly_t> ex = ...;
+ * auto ex2 = asio::requre(ex, execution::blocking.possibly); @endcode
+ */
+ template <typename Property>
+ any_executor require(Property) const;
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::prefer customisation point.
+ *
+ * For example:
+ * @code execution::any_executor<execution::blocking_t::possibly_t> ex = ...;
+ * auto ex2 = asio::prefer(ex, execution::blocking.possibly); @endcode
+ */
+ template <typename Property>
+ any_executor prefer(Property) const;
+
+ /// Obtain the value associated with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code execution::any_executor<execution::occupancy_t> ex = ...;
+ * size_t n = asio::query(ex, execution::occupancy); @endcode
+ */
+ template <typename Property>
+ typename Property::polymorphic_query_result_type query(Property) const;
+
+ /// Execute the function on the target executor.
+ /**
+ * Throws asio::bad_executor if the polymorphic wrapper has no target.
+ */
+ template <typename Function>
+ void execute(Function&& f) const;
+
+ /// Obtain the underlying execution context.
+ /**
+ * This function is provided for backward compatibility. It is automatically
+ * defined when the @c SupportableProperties... list includes a property of
+ * type <tt>execution::context_as<U></tt>, for some type <tt>U</tt>.
+ */
+ automatically_determined context() const;
+
+ /// Determine whether the wrapper has a target executor.
+ /**
+ * @returns @c true if the polymorphic wrapper has a target executor,
+ * otherwise false.
+ */
+ explicit operator bool() const noexcept;
+
+ /// Get the type of the target executor.
+ const type_info& target_type() const noexcept;
+
+ /// Get a pointer to the target executor.
+ template <typename Executor> Executor* target() noexcept;
+
+ /// Get a pointer to the target executor.
+ template <typename Executor> const Executor* target() const noexcept;
+};
+
+/// Equality operator.
+/**
+ * @relates any_executor
+ */
+template <typename... SupportableProperties>
+bool operator==(const any_executor<SupportableProperties...>& a,
+ const any_executor<SupportableProperties...>& b) noexcept;
+
+/// Equality operator.
+/**
+ * @relates any_executor
+ */
+template <typename... SupportableProperties>
+bool operator==(const any_executor<SupportableProperties...>& a,
+ nullptr_t) noexcept;
+
+/// Equality operator.
+/**
+ * @relates any_executor
+ */
+template <typename... SupportableProperties>
+bool operator==(nullptr_t,
+ const any_executor<SupportableProperties...>& b) noexcept;
+
+/// Inequality operator.
+/**
+ * @relates any_executor
+ */
+template <typename... SupportableProperties>
+bool operator!=(const any_executor<SupportableProperties...>& a,
+ const any_executor<SupportableProperties...>& b) noexcept;
+
+/// Inequality operator.
+/**
+ * @relates any_executor
+ */
+template <typename... SupportableProperties>
+bool operator!=(const any_executor<SupportableProperties...>& a,
+ nullptr_t) noexcept;
+
+/// Inequality operator.
+/**
+ * @relates any_executor
+ */
+template <typename... SupportableProperties>
+bool operator!=(nullptr_t,
+ const any_executor<SupportableProperties...>& b) noexcept;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+#if !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
+#define ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL
+
+template <typename... SupportableProperties>
+class any_executor;
+
+#endif // !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
+
+template <typename U>
+struct context_as_t;
+
+namespace detail {
+
+// Traits used to detect whether a property is requirable or preferable, taking
+// into account that T::is_requirable or T::is_preferable may not not be well
+// formed.
+
+template <typename T, typename = void>
+struct is_requirable : false_type {};
+
+template <typename T>
+struct is_requirable<T, enable_if_t<T::is_requirable>> : true_type {};
+
+template <typename T, typename = void>
+struct is_preferable : false_type {};
+
+template <typename T>
+struct is_preferable<T, enable_if_t<T::is_preferable>> : true_type {};
+
+// Trait used to detect context_as property, for backward compatibility.
+
+template <typename T>
+struct is_context_as : false_type {};
+
+template <typename U>
+struct is_context_as<context_as_t<U>> : true_type {};
+
+// Helper template to:
+// - Check if a target can supply the supportable properties.
+// - Find the first convertible-from-T property in the list.
+
+template <std::size_t I, typename Props>
+struct supportable_properties;
+
+template <std::size_t I, typename Prop>
+struct supportable_properties<I, void(Prop)>
+{
+ template <typename T>
+ struct is_valid_target : integral_constant<bool,
+ (
+ is_requirable<Prop>::value
+ ? can_require<T, Prop>::value
+ : true
+ )
+ &&
+ (
+ is_preferable<Prop>::value
+ ? can_prefer<T, Prop>::value
+ : true
+ )
+ &&
+ (
+ !is_requirable<Prop>::value && !is_preferable<Prop>::value
+ ? can_query<T, Prop>::value
+ : true
+ )
+ >
+ {
+ };
+
+ struct found
+ {
+ static constexpr bool value = true;
+ typedef Prop type;
+ typedef typename Prop::polymorphic_query_result_type query_result_type;
+ static constexpr std::size_t index = I;
+ };
+
+ struct not_found
+ {
+ static constexpr bool value = false;
+ };
+
+ template <typename T>
+ struct find_convertible_property :
+ conditional_t<
+ is_same<T, Prop>::value || is_convertible<T, Prop>::value,
+ found,
+ not_found
+ > {};
+
+ template <typename T>
+ struct find_convertible_requirable_property :
+ conditional_t<
+ is_requirable<Prop>::value
+ && (is_same<T, Prop>::value || is_convertible<T, Prop>::value),
+ found,
+ not_found
+ > {};
+
+ template <typename T>
+ struct find_convertible_preferable_property :
+ conditional_t<
+ is_preferable<Prop>::value
+ && (is_same<T, Prop>::value || is_convertible<T, Prop>::value),
+ found,
+ not_found
+ > {};
+
+ struct find_context_as_property :
+ conditional_t<
+ is_context_as<Prop>::value,
+ found,
+ not_found
+ > {};
+};
+
+template <std::size_t I, typename Head, typename... Tail>
+struct supportable_properties<I, void(Head, Tail...)>
+{
+ template <typename T>
+ struct is_valid_target : integral_constant<bool,
+ (
+ supportable_properties<I,
+ void(Head)>::template is_valid_target<T>::value
+ &&
+ supportable_properties<I + 1,
+ void(Tail...)>::template is_valid_target<T>::value
+ )
+ >
+ {
+ };
+
+ template <typename T>
+ struct find_convertible_property :
+ conditional_t<
+ is_convertible<T, Head>::value,
+ typename supportable_properties<I, void(Head)>::found,
+ typename supportable_properties<I + 1,
+ void(Tail...)>::template find_convertible_property<T>
+ > {};
+
+ template <typename T>
+ struct find_convertible_requirable_property :
+ conditional_t<
+ is_requirable<Head>::value
+ && is_convertible<T, Head>::value,
+ typename supportable_properties<I, void(Head)>::found,
+ typename supportable_properties<I + 1,
+ void(Tail...)>::template find_convertible_requirable_property<T>
+ > {};
+
+ template <typename T>
+ struct find_convertible_preferable_property :
+ conditional_t<
+ is_preferable<Head>::value
+ && is_convertible<T, Head>::value,
+ typename supportable_properties<I, void(Head)>::found,
+ typename supportable_properties<I + 1,
+ void(Tail...)>::template find_convertible_preferable_property<T>
+ > {};
+
+ struct find_context_as_property :
+ conditional_t<
+ is_context_as<Head>::value,
+ typename supportable_properties<I, void(Head)>::found,
+ typename supportable_properties<I + 1,
+ void(Tail...)>::find_context_as_property
+ > {};
+};
+
+template <typename T, typename Props>
+struct is_valid_target_executor :
+ conditional_t<
+ is_executor<T>::value,
+ typename supportable_properties<0, Props>::template is_valid_target<T>,
+ false_type
+ >
+{
+};
+
+template <typename Props>
+struct is_valid_target_executor<int, Props> : false_type
+{
+};
+
+class shared_target_executor
+{
+public:
+ template <typename E>
+ shared_target_executor(E&& e, decay_t<E>*& target)
+ {
+ impl<decay_t<E>>* i =
+ new impl<decay_t<E>>(static_cast<E&&>(e));
+ target = &i->ex_;
+ impl_ = i;
+ }
+
+ template <typename E>
+ shared_target_executor(std::nothrow_t, E&& e, decay_t<E>*& target) noexcept
+ {
+ impl<decay_t<E>>* i =
+ new (std::nothrow) impl<decay_t<E>>(static_cast<E&&>(e));
+ target = i ? &i->ex_ : 0;
+ impl_ = i;
+ }
+
+ shared_target_executor(const shared_target_executor& other) noexcept
+ : impl_(other.impl_)
+ {
+ if (impl_)
+ asio::detail::ref_count_up(impl_->ref_count_);
+ }
+
+ shared_target_executor(shared_target_executor&& other) noexcept
+ : impl_(other.impl_)
+ {
+ other.impl_ = 0;
+ }
+
+ ~shared_target_executor()
+ {
+ if (impl_)
+ if (asio::detail::ref_count_down(impl_->ref_count_))
+ delete impl_;
+ }
+
+ void* get() const noexcept
+ {
+ return impl_ ? impl_->get() : 0;
+ }
+
+private:
+ shared_target_executor& operator=(
+ const shared_target_executor& other) = delete;
+
+ shared_target_executor& operator=(
+ shared_target_executor&& other) = delete;
+
+ struct impl_base
+ {
+ impl_base() : ref_count_(1) {}
+ virtual ~impl_base() {}
+ virtual void* get() = 0;
+ asio::detail::atomic_count ref_count_;
+ };
+
+ template <typename Executor>
+ struct impl : impl_base
+ {
+ impl(Executor ex) : ex_(static_cast<Executor&&>(ex)) {}
+ virtual void* get() { return &ex_; }
+ Executor ex_;
+ };
+
+ impl_base* impl_;
+};
+
+class any_executor_base
+{
+public:
+ any_executor_base() noexcept
+ : object_fns_(0),
+ target_(0),
+ target_fns_(0)
+ {
+ }
+
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_executor_base(Executor ex, false_type)
+ : target_fns_(target_fns_table<Executor>(
+ any_executor_base::query_blocking(ex,
+ can_query<const Executor&, const execution::blocking_t&>())
+ == execution::blocking.always))
+ {
+ any_executor_base::construct_object(ex,
+ integral_constant<bool,
+ sizeof(Executor) <= sizeof(object_type)
+ && alignment_of<Executor>::value <= alignment_of<object_type>::value
+ >());
+ }
+
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_executor_base(std::nothrow_t, Executor ex, false_type) noexcept
+ : target_fns_(target_fns_table<Executor>(
+ any_executor_base::query_blocking(ex,
+ can_query<const Executor&, const execution::blocking_t&>())
+ == execution::blocking.always))
+ {
+ any_executor_base::construct_object(std::nothrow, ex,
+ integral_constant<bool,
+ sizeof(Executor) <= sizeof(object_type)
+ && alignment_of<Executor>::value <= alignment_of<object_type>::value
+ >());
+ if (target_ == 0)
+ {
+ object_fns_ = 0;
+ target_fns_ = 0;
+ }
+ }
+
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_executor_base(Executor other, true_type)
+ : object_fns_(object_fns_table<shared_target_executor>()),
+ target_fns_(other.target_fns_)
+ {
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ static_cast<Executor&&>(other), p);
+ target_ = p->template target<void>();
+ }
+
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_executor_base(std::nothrow_t,
+ Executor other, true_type) noexcept
+ : object_fns_(object_fns_table<shared_target_executor>()),
+ target_fns_(other.target_fns_)
+ {
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ std::nothrow, static_cast<Executor&&>(other), p);
+ if (p)
+ target_ = p->template target<void>();
+ else
+ {
+ target_ = 0;
+ object_fns_ = 0;
+ target_fns_ = 0;
+ }
+ }
+
+ any_executor_base(const any_executor_base& other) noexcept
+ {
+ if (!!other)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ object_fns_->copy(*this, other);
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
+ }
+
+ ~any_executor_base() noexcept
+ {
+ if (!!*this)
+ object_fns_->destroy(*this);
+ }
+
+ any_executor_base& operator=(
+ const any_executor_base& other) noexcept
+ {
+ if (this != &other)
+ {
+ if (!!*this)
+ object_fns_->destroy(*this);
+ if (!!other)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ object_fns_->copy(*this, other);
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
+ }
+ return *this;
+ }
+
+ any_executor_base& operator=(nullptr_t) noexcept
+ {
+ if (target_)
+ object_fns_->destroy(*this);
+ target_ = 0;
+ object_fns_ = 0;
+ target_fns_ = 0;
+ return *this;
+ }
+
+ any_executor_base(any_executor_base&& other) noexcept
+ {
+ if (other.target_)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ other.object_fns_ = 0;
+ other.target_fns_ = 0;
+ object_fns_->move(*this, other);
+ other.target_ = 0;
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
+ }
+
+ any_executor_base& operator=(
+ any_executor_base&& other) noexcept
+ {
+ if (this != &other)
+ {
+ if (!!*this)
+ object_fns_->destroy(*this);
+ if (!!other)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ other.object_fns_ = 0;
+ other.target_fns_ = 0;
+ object_fns_->move(*this, other);
+ other.target_ = 0;
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
+ }
+ return *this;
+ }
+
+ void swap(any_executor_base& other) noexcept
+ {
+ if (this != &other)
+ {
+ any_executor_base tmp(static_cast<any_executor_base&&>(other));
+ other = static_cast<any_executor_base&&>(*this);
+ *this = static_cast<any_executor_base&&>(tmp);
+ }
+ }
+
+ template <typename F>
+ void execute(F&& f) const
+ {
+ if (target_)
+ {
+ if (target_fns_->blocking_execute != 0)
+ {
+ asio::detail::non_const_lvalue<F> f2(f);
+ target_fns_->blocking_execute(*this, function_view(f2.value));
+ }
+ else
+ {
+ target_fns_->execute(*this,
+ function(static_cast<F&&>(f), std::allocator<void>()));
+ }
+ }
+ else
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ }
+
+ template <typename Executor>
+ Executor* target()
+ {
+ return target_ && (is_same<Executor, void>::value
+ || target_fns_->target_type() == target_type_ex<Executor>())
+ ? static_cast<Executor*>(target_) : 0;
+ }
+
+ template <typename Executor>
+ const Executor* target() const
+ {
+ return target_ && (is_same<Executor, void>::value
+ || target_fns_->target_type() == target_type_ex<Executor>())
+ ? static_cast<const Executor*>(target_) : 0;
+ }
+
+#if !defined(ASIO_NO_TYPEID)
+ const std::type_info& target_type() const
+ {
+ return target_ ? target_fns_->target_type() : typeid(void);
+ }
+#else // !defined(ASIO_NO_TYPEID)
+ const void* target_type() const
+ {
+ return target_ ? target_fns_->target_type() : 0;
+ }
+#endif // !defined(ASIO_NO_TYPEID)
+
+ struct unspecified_bool_type_t {};
+ typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
+ static void unspecified_bool_true(unspecified_bool_type_t) {}
+
+ operator unspecified_bool_type() const noexcept
+ {
+ return target_ ? &any_executor_base::unspecified_bool_true : 0;
+ }
+
+ bool operator!() const noexcept
+ {
+ return target_ == 0;
+ }
+
+protected:
+ bool equality_helper(const any_executor_base& other) const noexcept
+ {
+ if (target_ == other.target_)
+ return true;
+ if (target_ && !other.target_)
+ return false;
+ if (!target_ && other.target_)
+ return false;
+ if (target_fns_ != other.target_fns_)
+ return false;
+ return target_fns_->equal(*this, other);
+ }
+
+ template <typename Ex>
+ Ex& object()
+ {
+ return *static_cast<Ex*>(static_cast<void*>(&object_));
+ }
+
+ template <typename Ex>
+ const Ex& object() const
+ {
+ return *static_cast<const Ex*>(static_cast<const void*>(&object_));
+ }
+
+ struct object_fns
+ {
+ void (*destroy)(any_executor_base&);
+ void (*copy)(any_executor_base&, const any_executor_base&);
+ void (*move)(any_executor_base&, any_executor_base&);
+ const void* (*target)(const any_executor_base&);
+ };
+
+ static void destroy_shared(any_executor_base& ex)
+ {
+ typedef shared_target_executor type;
+ ex.object<type>().~type();
+ }
+
+ static void copy_shared(any_executor_base& ex1, const any_executor_base& ex2)
+ {
+ typedef shared_target_executor type;
+ new (&ex1.object_) type(ex2.object<type>());
+ ex1.target_ = ex2.target_;
+ }
+
+ static void move_shared(any_executor_base& ex1, any_executor_base& ex2)
+ {
+ typedef shared_target_executor type;
+ new (&ex1.object_) type(static_cast<type&&>(ex2.object<type>()));
+ ex1.target_ = ex2.target_;
+ ex2.object<type>().~type();
+ }
+
+ static const void* target_shared(const any_executor_base& ex)
+ {
+ typedef shared_target_executor type;
+ return ex.object<type>().get();
+ }
+
+ template <typename Obj>
+ static const object_fns* object_fns_table(
+ enable_if_t<
+ is_same<Obj, shared_target_executor>::value
+ >* = 0)
+ {
+ static const object_fns fns =
+ {
+ &any_executor_base::destroy_shared,
+ &any_executor_base::copy_shared,
+ &any_executor_base::move_shared,
+ &any_executor_base::target_shared
+ };
+ return &fns;
+ }
+
+ template <typename Obj>
+ static void destroy_object(any_executor_base& ex)
+ {
+ ex.object<Obj>().~Obj();
+ }
+
+ template <typename Obj>
+ static void copy_object(any_executor_base& ex1, const any_executor_base& ex2)
+ {
+ new (&ex1.object_) Obj(ex2.object<Obj>());
+ ex1.target_ = &ex1.object<Obj>();
+ }
+
+ template <typename Obj>
+ static void move_object(any_executor_base& ex1, any_executor_base& ex2)
+ {
+ new (&ex1.object_) Obj(static_cast<Obj&&>(ex2.object<Obj>()));
+ ex1.target_ = &ex1.object<Obj>();
+ ex2.object<Obj>().~Obj();
+ }
+
+ template <typename Obj>
+ static const void* target_object(const any_executor_base& ex)
+ {
+ return &ex.object<Obj>();
+ }
+
+ template <typename Obj>
+ static const object_fns* object_fns_table(
+ enable_if_t<
+ !is_same<Obj, void>::value
+ && !is_same<Obj, shared_target_executor>::value
+ >* = 0)
+ {
+ static const object_fns fns =
+ {
+ &any_executor_base::destroy_object<Obj>,
+ &any_executor_base::copy_object<Obj>,
+ &any_executor_base::move_object<Obj>,
+ &any_executor_base::target_object<Obj>
+ };
+ return &fns;
+ }
+
+ typedef asio::detail::executor_function function;
+ typedef asio::detail::executor_function_view function_view;
+
+ struct target_fns
+ {
+#if !defined(ASIO_NO_TYPEID)
+ const std::type_info& (*target_type)();
+#else // !defined(ASIO_NO_TYPEID)
+ const void* (*target_type)();
+#endif // !defined(ASIO_NO_TYPEID)
+ bool (*equal)(const any_executor_base&, const any_executor_base&);
+ void (*execute)(const any_executor_base&, function&&);
+ void (*blocking_execute)(const any_executor_base&, function_view);
+ };
+
+#if !defined(ASIO_NO_TYPEID)
+ template <typename Ex>
+ static const std::type_info& target_type_ex()
+ {
+ return typeid(Ex);
+ }
+#else // !defined(ASIO_NO_TYPEID)
+ template <typename Ex>
+ static const void* target_type_ex()
+ {
+ static int unique_id;
+ return &unique_id;
+ }
+#endif // !defined(ASIO_NO_TYPEID)
+
+ template <typename Ex>
+ static bool equal_ex(const any_executor_base& ex1,
+ const any_executor_base& ex2)
+ {
+ const Ex* p1 = ex1.target<Ex>();
+ const Ex* p2 = ex2.target<Ex>();
+ ASIO_ASSUME(p1 != 0 && p2 != 0);
+ return *p1 == *p2;
+ }
+
+ template <typename Ex>
+ static void execute_ex(const any_executor_base& ex, function&& f)
+ {
+ const Ex* p = ex.target<Ex>();
+ ASIO_ASSUME(p != 0);
+ p->execute(static_cast<function&&>(f));
+ }
+
+ template <typename Ex>
+ static void blocking_execute_ex(const any_executor_base& ex, function_view f)
+ {
+ const Ex* p = ex.target<Ex>();
+ ASIO_ASSUME(p != 0);
+ p->execute(f);
+ }
+
+ template <typename Ex>
+ static const target_fns* target_fns_table(bool is_always_blocking,
+ enable_if_t<
+ !is_same<Ex, void>::value
+ >* = 0)
+ {
+ static const target_fns fns_with_execute =
+ {
+ &any_executor_base::target_type_ex<Ex>,
+ &any_executor_base::equal_ex<Ex>,
+ &any_executor_base::execute_ex<Ex>,
+ 0
+ };
+
+ static const target_fns fns_with_blocking_execute =
+ {
+ &any_executor_base::target_type_ex<Ex>,
+ &any_executor_base::equal_ex<Ex>,
+ 0,
+ &any_executor_base::blocking_execute_ex<Ex>
+ };
+
+ return is_always_blocking ? &fns_with_blocking_execute : &fns_with_execute;
+ }
+
+#if defined(ASIO_MSVC)
+# pragma warning (push)
+# pragma warning (disable:4702)
+#endif // defined(ASIO_MSVC)
+
+ static void query_fn_void(void*, const void*, const void*)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void*, const void* ex, const void* prop,
+ enable_if_t<
+ asio::can_query<const Ex&, const Prop&>::value
+ && is_same<typename Prop::polymorphic_query_result_type, void>::value
+ >*)
+ {
+ asio::query(*static_cast<const Ex*>(ex),
+ *static_cast<const Prop*>(prop));
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void*, const void*, const void*,
+ enable_if_t<
+ !asio::can_query<const Ex&, const Prop&>::value
+ && is_same<typename Prop::polymorphic_query_result_type, void>::value
+ >*)
+ {
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void* result, const void* ex, const void* prop,
+ enable_if_t<
+ asio::can_query<const Ex&, const Prop&>::value
+ && !is_same<typename Prop::polymorphic_query_result_type, void>::value
+ && is_reference<typename Prop::polymorphic_query_result_type>::value
+ >*)
+ {
+ *static_cast<remove_reference_t<
+ typename Prop::polymorphic_query_result_type>**>(result)
+ = &static_cast<typename Prop::polymorphic_query_result_type>(
+ asio::query(*static_cast<const Ex*>(ex),
+ *static_cast<const Prop*>(prop)));
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void*, const void*, const void*,
+ enable_if_t<
+ !asio::can_query<const Ex&, const Prop&>::value
+ && !is_same<typename Prop::polymorphic_query_result_type, void>::value
+ && is_reference<typename Prop::polymorphic_query_result_type>::value
+ >*)
+ {
+ std::terminate(); // Combination should not be possible.
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void* result, const void* ex, const void* prop,
+ enable_if_t<
+ asio::can_query<const Ex&, const Prop&>::value
+ && !is_same<typename Prop::polymorphic_query_result_type, void>::value
+ && is_scalar<typename Prop::polymorphic_query_result_type>::value
+ >*)
+ {
+ *static_cast<typename Prop::polymorphic_query_result_type*>(result)
+ = static_cast<typename Prop::polymorphic_query_result_type>(
+ asio::query(*static_cast<const Ex*>(ex),
+ *static_cast<const Prop*>(prop)));
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void* result, const void*, const void*,
+ enable_if_t<
+ !asio::can_query<const Ex&, const Prop&>::value
+ && !is_same<typename Prop::polymorphic_query_result_type, void>::value
+ && is_scalar<typename Prop::polymorphic_query_result_type>::value
+ >*)
+ {
+ *static_cast<typename Prop::polymorphic_query_result_type*>(result)
+ = typename Prop::polymorphic_query_result_type();
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void* result, const void* ex, const void* prop,
+ enable_if_t<
+ asio::can_query<const Ex&, const Prop&>::value
+ && !is_same<typename Prop::polymorphic_query_result_type, void>::value
+ && !is_reference<typename Prop::polymorphic_query_result_type>::value
+ && !is_scalar<typename Prop::polymorphic_query_result_type>::value
+ >*)
+ {
+ *static_cast<typename Prop::polymorphic_query_result_type**>(result)
+ = new typename Prop::polymorphic_query_result_type(
+ asio::query(*static_cast<const Ex*>(ex),
+ *static_cast<const Prop*>(prop)));
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_non_void(void* result, const void*, const void*, ...)
+ {
+ *static_cast<typename Prop::polymorphic_query_result_type**>(result)
+ = new typename Prop::polymorphic_query_result_type();
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_impl(void* result, const void* ex, const void* prop,
+ enable_if_t<
+ is_same<Ex, void>::value
+ >*)
+ {
+ query_fn_void(result, ex, prop);
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn_impl(void* result, const void* ex, const void* prop,
+ enable_if_t<
+ !is_same<Ex, void>::value
+ >*)
+ {
+ query_fn_non_void<Ex, Prop>(result, ex, prop, 0);
+ }
+
+ template <typename Ex, class Prop>
+ static void query_fn(void* result, const void* ex, const void* prop)
+ {
+ query_fn_impl<Ex, Prop>(result, ex, prop, 0);
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly require_fn_impl(const void*, const void*,
+ enable_if_t<
+ is_same<Ex, void>::value
+ >*)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ return Poly();
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly require_fn_impl(const void* ex, const void* prop,
+ enable_if_t<
+ !is_same<Ex, void>::value && Prop::is_requirable
+ >*)
+ {
+ return asio::require(*static_cast<const Ex*>(ex),
+ *static_cast<const Prop*>(prop));
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly require_fn_impl(const void*, const void*, ...)
+ {
+ return Poly();
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly require_fn(const void* ex, const void* prop)
+ {
+ return require_fn_impl<Poly, Ex, Prop>(ex, prop, 0);
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly prefer_fn_impl(const void*, const void*,
+ enable_if_t<
+ is_same<Ex, void>::value
+ >*)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ return Poly();
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly prefer_fn_impl(const void* ex, const void* prop,
+ enable_if_t<
+ !is_same<Ex, void>::value && Prop::is_preferable
+ >*)
+ {
+ return asio::prefer(*static_cast<const Ex*>(ex),
+ *static_cast<const Prop*>(prop));
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly prefer_fn_impl(const void*, const void*, ...)
+ {
+ return Poly();
+ }
+
+ template <typename Poly, typename Ex, class Prop>
+ static Poly prefer_fn(const void* ex, const void* prop)
+ {
+ return prefer_fn_impl<Poly, Ex, Prop>(ex, prop, 0);
+ }
+
+ template <typename Poly>
+ struct prop_fns
+ {
+ void (*query)(void*, const void*, const void*);
+ Poly (*require)(const void*, const void*);
+ Poly (*prefer)(const void*, const void*);
+ };
+
+#if defined(ASIO_MSVC)
+# pragma warning (pop)
+#endif // defined(ASIO_MSVC)
+
+private:
+ template <typename Executor>
+ static execution::blocking_t query_blocking(const Executor& ex, true_type)
+ {
+ return asio::query(ex, execution::blocking);
+ }
+
+ template <typename Executor>
+ static execution::blocking_t query_blocking(const Executor&, false_type)
+ {
+ return execution::blocking_t();
+ }
+
+ template <typename Executor>
+ void construct_object(Executor& ex, true_type)
+ {
+ object_fns_ = object_fns_table<Executor>();
+ target_ = new (&object_) Executor(static_cast<Executor&&>(ex));
+ }
+
+ template <typename Executor>
+ void construct_object(Executor& ex, false_type)
+ {
+ object_fns_ = object_fns_table<shared_target_executor>();
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ static_cast<Executor&&>(ex), p);
+ target_ = p;
+ }
+
+ template <typename Executor>
+ void construct_object(std::nothrow_t,
+ Executor& ex, true_type) noexcept
+ {
+ object_fns_ = object_fns_table<Executor>();
+ target_ = new (&object_) Executor(static_cast<Executor&&>(ex));
+ }
+
+ template <typename Executor>
+ void construct_object(std::nothrow_t,
+ Executor& ex, false_type) noexcept
+ {
+ object_fns_ = object_fns_table<shared_target_executor>();
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ std::nothrow, static_cast<Executor&&>(ex), p);
+ target_ = p;
+ }
+
+/*private:*/public:
+// template <typename...> friend class any_executor;
+
+ typedef aligned_storage<
+ sizeof(asio::detail::shared_ptr<void>) + sizeof(void*),
+ alignment_of<asio::detail::shared_ptr<void>>::value
+ >::type object_type;
+
+ object_type object_;
+ const object_fns* object_fns_;
+ void* target_;
+ const target_fns* target_fns_;
+};
+
+template <typename Derived, typename Property, typename = void>
+struct any_executor_context
+{
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Derived, typename Property>
+struct any_executor_context<Derived, Property, enable_if_t<Property::value>>
+{
+ typename Property::query_result_type context() const
+ {
+ return static_cast<const Derived*>(this)->query(typename Property::type());
+ }
+};
+
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+} // namespace detail
+
+template <>
+class any_executor<> : public detail::any_executor_base
+{
+public:
+ any_executor() noexcept
+ : detail::any_executor_base()
+ {
+ }
+
+ any_executor(nullptr_t) noexcept
+ : detail::any_executor_base()
+ {
+ }
+
+ template <typename Executor>
+ any_executor(Executor ex,
+ enable_if_t<
+ conditional_t<
+ !is_same<Executor, any_executor>::value
+ && !is_base_of<detail::any_executor_base, Executor>::value,
+ is_executor<Executor>,
+ false_type
+ >::value
+ >* = 0)
+ : detail::any_executor_base(
+ static_cast<Executor&&>(ex), false_type())
+ {
+ }
+
+ template <typename Executor>
+ any_executor(std::nothrow_t, Executor ex,
+ enable_if_t<
+ conditional_t<
+ !is_same<Executor, any_executor>::value
+ && !is_base_of<detail::any_executor_base, Executor>::value,
+ is_executor<Executor>,
+ false_type
+ >::value
+ >* = 0) noexcept
+ : detail::any_executor_base(std::nothrow,
+ static_cast<Executor&&>(ex), false_type())
+ {
+ }
+
+ template <typename... OtherSupportableProperties>
+ any_executor(any_executor<OtherSupportableProperties...> other)
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other))
+ {
+ }
+
+ template <typename... OtherSupportableProperties>
+ any_executor(std::nothrow_t,
+ any_executor<OtherSupportableProperties...> other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other))
+ {
+ }
+
+ any_executor(const any_executor& other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other))
+ {
+ }
+
+ any_executor(std::nothrow_t, const any_executor& other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other))
+ {
+ }
+
+ any_executor& operator=(const any_executor& other) noexcept
+ {
+ if (this != &other)
+ {
+ detail::any_executor_base::operator=(
+ static_cast<const detail::any_executor_base&>(other));
+ }
+ return *this;
+ }
+
+ any_executor& operator=(nullptr_t p) noexcept
+ {
+ detail::any_executor_base::operator=(p);
+ return *this;
+ }
+
+ any_executor(any_executor&& other) noexcept
+ : detail::any_executor_base(
+ static_cast<any_executor_base&&>(
+ static_cast<any_executor_base&>(other)))
+ {
+ }
+
+ any_executor(std::nothrow_t, any_executor&& other) noexcept
+ : detail::any_executor_base(
+ static_cast<any_executor_base&&>(
+ static_cast<any_executor_base&>(other)))
+ {
+ }
+
+ any_executor& operator=(any_executor&& other) noexcept
+ {
+ if (this != &other)
+ {
+ detail::any_executor_base::operator=(
+ static_cast<detail::any_executor_base&&>(
+ static_cast<detail::any_executor_base&>(other)));
+ }
+ return *this;
+ }
+
+ void swap(any_executor& other) noexcept
+ {
+ detail::any_executor_base::swap(
+ static_cast<detail::any_executor_base&>(other));
+ }
+
+ using detail::any_executor_base::execute;
+ using detail::any_executor_base::target;
+ using detail::any_executor_base::target_type;
+ using detail::any_executor_base::operator unspecified_bool_type;
+ using detail::any_executor_base::operator!;
+
+ bool equality_helper(const any_executor& other) const noexcept
+ {
+ return any_executor_base::equality_helper(other);
+ }
+
+ template <typename AnyExecutor1, typename AnyExecutor2>
+ friend enable_if_t<
+ is_base_of<any_executor, AnyExecutor1>::value
+ || is_base_of<any_executor, AnyExecutor2>::value,
+ bool
+ > operator==(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
+ {
+ return static_cast<const any_executor&>(a).equality_helper(b);
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator==(const AnyExecutor& a, nullptr_t) noexcept
+ {
+ return !a;
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator==(nullptr_t, const AnyExecutor& b) noexcept
+ {
+ return !b;
+ }
+
+ template <typename AnyExecutor1, typename AnyExecutor2>
+ friend enable_if_t<
+ is_base_of<any_executor, AnyExecutor1>::value
+ || is_base_of<any_executor, AnyExecutor2>::value,
+ bool
+ > operator!=(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
+ {
+ return !static_cast<const any_executor&>(a).equality_helper(b);
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator!=(const AnyExecutor& a, nullptr_t) noexcept
+ {
+ return !!a;
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator!=(nullptr_t, const AnyExecutor& b) noexcept
+ {
+ return !!b;
+ }
+};
+
+inline void swap(any_executor<>& a, any_executor<>& b) noexcept
+{
+ return a.swap(b);
+}
+
+template <typename... SupportableProperties>
+class any_executor :
+ public detail::any_executor_base,
+ public detail::any_executor_context<
+ any_executor<SupportableProperties...>,
+ typename detail::supportable_properties<
+ 0, void(SupportableProperties...)>::find_context_as_property>
+{
+public:
+ any_executor() noexcept
+ : detail::any_executor_base(),
+ prop_fns_(prop_fns_table<void>())
+ {
+ }
+
+ any_executor(nullptr_t) noexcept
+ : detail::any_executor_base(),
+ prop_fns_(prop_fns_table<void>())
+ {
+ }
+
+ template <typename Executor>
+ any_executor(Executor ex,
+ enable_if_t<
+ conditional_t<
+ !is_same<Executor, any_executor>::value
+ && !is_base_of<detail::any_executor_base, Executor>::value,
+ detail::is_valid_target_executor<
+ Executor, void(SupportableProperties...)>,
+ false_type
+ >::value
+ >* = 0)
+ : detail::any_executor_base(
+ static_cast<Executor&&>(ex), false_type()),
+ prop_fns_(prop_fns_table<Executor>())
+ {
+ }
+
+ template <typename Executor>
+ any_executor(std::nothrow_t, Executor ex,
+ enable_if_t<
+ conditional_t<
+ !is_same<Executor, any_executor>::value
+ && !is_base_of<detail::any_executor_base, Executor>::value,
+ detail::is_valid_target_executor<
+ Executor, void(SupportableProperties...)>,
+ false_type
+ >::value
+ >* = 0) noexcept
+ : detail::any_executor_base(std::nothrow,
+ static_cast<Executor&&>(ex), false_type()),
+ prop_fns_(prop_fns_table<Executor>())
+ {
+ if (this->template target<void>() == 0)
+ prop_fns_ = prop_fns_table<void>();
+ }
+
+ template <typename... OtherSupportableProperties>
+ any_executor(any_executor<OtherSupportableProperties...> other,
+ enable_if_t<
+ conditional_t<
+ !is_same<
+ any_executor<OtherSupportableProperties...>,
+ any_executor
+ >::value,
+ typename detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template is_valid_target<
+ any_executor<OtherSupportableProperties...>>,
+ false_type
+ >::value
+ >* = 0)
+ : detail::any_executor_base(
+ static_cast<any_executor<OtherSupportableProperties...>&&>(other),
+ true_type()),
+ prop_fns_(prop_fns_table<any_executor<OtherSupportableProperties...>>())
+ {
+ }
+
+ template <typename... OtherSupportableProperties>
+ any_executor(std::nothrow_t,
+ any_executor<OtherSupportableProperties...> other,
+ enable_if_t<
+ conditional_t<
+ !is_same<
+ any_executor<OtherSupportableProperties...>,
+ any_executor
+ >::value,
+ typename detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template is_valid_target<
+ any_executor<OtherSupportableProperties...>>,
+ false_type
+ >::value
+ >* = 0) noexcept
+ : detail::any_executor_base(std::nothrow,
+ static_cast<any_executor<OtherSupportableProperties...>&&>(other),
+ true_type()),
+ prop_fns_(prop_fns_table<any_executor<OtherSupportableProperties...>>())
+ {
+ if (this->template target<void>() == 0)
+ prop_fns_ = prop_fns_table<void>();
+ }
+
+ any_executor(const any_executor& other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other)),
+ prop_fns_(other.prop_fns_)
+ {
+ }
+
+ any_executor(std::nothrow_t, const any_executor& other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other)),
+ prop_fns_(other.prop_fns_)
+ {
+ }
+
+ any_executor& operator=(const any_executor& other) noexcept
+ {
+ if (this != &other)
+ {
+ prop_fns_ = other.prop_fns_;
+ detail::any_executor_base::operator=(
+ static_cast<const detail::any_executor_base&>(other));
+ }
+ return *this;
+ }
+
+ any_executor& operator=(nullptr_t p) noexcept
+ {
+ prop_fns_ = prop_fns_table<void>();
+ detail::any_executor_base::operator=(p);
+ return *this;
+ }
+
+ any_executor(any_executor&& other) noexcept
+ : detail::any_executor_base(
+ static_cast<any_executor_base&&>(
+ static_cast<any_executor_base&>(other))),
+ prop_fns_(other.prop_fns_)
+ {
+ other.prop_fns_ = prop_fns_table<void>();
+ }
+
+ any_executor(std::nothrow_t, any_executor&& other) noexcept
+ : detail::any_executor_base(
+ static_cast<any_executor_base&&>(
+ static_cast<any_executor_base&>(other))),
+ prop_fns_(other.prop_fns_)
+ {
+ other.prop_fns_ = prop_fns_table<void>();
+ }
+
+ any_executor& operator=(any_executor&& other) noexcept
+ {
+ if (this != &other)
+ {
+ prop_fns_ = other.prop_fns_;
+ detail::any_executor_base::operator=(
+ static_cast<detail::any_executor_base&&>(
+ static_cast<detail::any_executor_base&>(other)));
+ }
+ return *this;
+ }
+
+ void swap(any_executor& other) noexcept
+ {
+ if (this != &other)
+ {
+ detail::any_executor_base::swap(
+ static_cast<detail::any_executor_base&>(other));
+ const prop_fns<any_executor>* tmp_prop_fns = other.prop_fns_;
+ other.prop_fns_ = prop_fns_;
+ prop_fns_ = tmp_prop_fns;
+ }
+ }
+
+ using detail::any_executor_base::execute;
+ using detail::any_executor_base::target;
+ using detail::any_executor_base::target_type;
+ using detail::any_executor_base::operator unspecified_bool_type;
+ using detail::any_executor_base::operator!;
+
+ bool equality_helper(const any_executor& other) const noexcept
+ {
+ return any_executor_base::equality_helper(other);
+ }
+
+ template <typename AnyExecutor1, typename AnyExecutor2>
+ friend enable_if_t<
+ is_base_of<any_executor, AnyExecutor1>::value
+ || is_base_of<any_executor, AnyExecutor2>::value,
+ bool
+ > operator==(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
+ {
+ return static_cast<const any_executor&>(a).equality_helper(b);
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator==(const AnyExecutor& a, nullptr_t) noexcept
+ {
+ return !a;
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator==(nullptr_t, const AnyExecutor& b) noexcept
+ {
+ return !b;
+ }
+
+ template <typename AnyExecutor1, typename AnyExecutor2>
+ friend enable_if_t<
+ is_base_of<any_executor, AnyExecutor1>::value
+ || is_base_of<any_executor, AnyExecutor2>::value,
+ bool
+ > operator!=(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
+ {
+ return !static_cast<const any_executor&>(a).equality_helper(b);
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator!=(const AnyExecutor& a, nullptr_t) noexcept
+ {
+ return !!a;
+ }
+
+ template <typename AnyExecutor>
+ friend enable_if_t<
+ is_same<AnyExecutor, any_executor>::value,
+ bool
+ > operator!=(nullptr_t, const AnyExecutor& b) noexcept
+ {
+ return !!b;
+ }
+
+ template <typename T>
+ struct find_convertible_property :
+ detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_property<T> {};
+
+ template <typename Property>
+ void query(const Property& p,
+ enable_if_t<
+ is_same<
+ typename find_convertible_property<Property>::query_result_type,
+ void
+ >::value
+ >* = 0) const
+ {
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ typedef find_convertible_property<Property> found;
+ prop_fns_[found::index].query(0, object_fns_->target(*this),
+ &static_cast<const typename found::type&>(p));
+ }
+
+ template <typename Property>
+ typename find_convertible_property<Property>::query_result_type
+ query(const Property& p,
+ enable_if_t<
+ !is_same<
+ typename find_convertible_property<Property>::query_result_type,
+ void
+ >::value
+ &&
+ is_reference<
+ typename find_convertible_property<Property>::query_result_type
+ >::value
+ >* = 0) const
+ {
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ typedef find_convertible_property<Property> found;
+ remove_reference_t<typename found::query_result_type>* result = 0;
+ prop_fns_[found::index].query(&result, object_fns_->target(*this),
+ &static_cast<const typename found::type&>(p));
+ return *result;
+ }
+
+ template <typename Property>
+ typename find_convertible_property<Property>::query_result_type
+ query(const Property& p,
+ enable_if_t<
+ !is_same<
+ typename find_convertible_property<Property>::query_result_type,
+ void
+ >::value
+ &&
+ is_scalar<
+ typename find_convertible_property<Property>::query_result_type
+ >::value
+ >* = 0) const
+ {
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ typedef find_convertible_property<Property> found;
+ typename found::query_result_type result;
+ prop_fns_[found::index].query(&result, object_fns_->target(*this),
+ &static_cast<const typename found::type&>(p));
+ return result;
+ }
+
+ template <typename Property>
+ typename find_convertible_property<Property>::query_result_type
+ query(const Property& p,
+ enable_if_t<
+ !is_same<
+ typename find_convertible_property<Property>::query_result_type,
+ void
+ >::value
+ &&
+ !is_reference<
+ typename find_convertible_property<Property>::query_result_type
+ >::value
+ &&
+ !is_scalar<
+ typename find_convertible_property<Property>::query_result_type
+ >::value
+ >* = 0) const
+ {
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ typedef find_convertible_property<Property> found;
+ typename found::query_result_type* result;
+ prop_fns_[found::index].query(&result, object_fns_->target(*this),
+ &static_cast<const typename found::type&>(p));
+ return *asio::detail::scoped_ptr<
+ typename found::query_result_type>(result);
+ }
+
+ template <typename T>
+ struct find_convertible_requirable_property :
+ detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_requirable_property<T> {};
+
+ template <typename Property>
+ any_executor require(const Property& p,
+ enable_if_t<
+ find_convertible_requirable_property<Property>::value
+ >* = 0) const
+ {
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ typedef find_convertible_requirable_property<Property> found;
+ return prop_fns_[found::index].require(object_fns_->target(*this),
+ &static_cast<const typename found::type&>(p));
+ }
+
+ template <typename T>
+ struct find_convertible_preferable_property :
+ detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_preferable_property<T> {};
+
+ template <typename Property>
+ any_executor prefer(const Property& p,
+ enable_if_t<
+ find_convertible_preferable_property<Property>::value
+ >* = 0) const
+ {
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
+ typedef find_convertible_preferable_property<Property> found;
+ return prop_fns_[found::index].prefer(object_fns_->target(*this),
+ &static_cast<const typename found::type&>(p));
+ }
+
+//private:
+ template <typename Ex>
+ static const prop_fns<any_executor>* prop_fns_table()
+ {
+ static const prop_fns<any_executor> fns[] =
+ {
+ {
+ &detail::any_executor_base::query_fn<
+ Ex, SupportableProperties>,
+ &detail::any_executor_base::require_fn<
+ any_executor, Ex, SupportableProperties>,
+ &detail::any_executor_base::prefer_fn<
+ any_executor, Ex, SupportableProperties>
+ }...
+ };
+ return fns;
+ }
+
+ const prop_fns<any_executor>* prop_fns_;
+};
+
+template <typename... SupportableProperties>
+inline void swap(any_executor<SupportableProperties...>& a,
+ any_executor<SupportableProperties...>& b) noexcept
+{
+ return a.swap(b);
+}
+
+} // namespace execution
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename... SupportableProperties>
+struct equality_comparable<execution::any_executor<SupportableProperties...>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F, typename... SupportableProperties>
+struct execute_member<execution::any_executor<SupportableProperties...>, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Prop, typename... SupportableProperties>
+struct query_member<
+ execution::any_executor<SupportableProperties...>, Prop,
+ enable_if_t<
+ execution::detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_property<Prop>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef typename execution::detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_property<Prop>::query_result_type result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Prop, typename... SupportableProperties>
+struct require_member<
+ execution::any_executor<SupportableProperties...>, Prop,
+ enable_if_t<
+ execution::detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_requirable_property<Prop>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef execution::any_executor<SupportableProperties...> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename Prop, typename... SupportableProperties>
+struct prefer_member<
+ execution::any_executor<SupportableProperties...>, Prop,
+ enable_if_t<
+ execution::detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template
+ find_convertible_preferable_property<Prop>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef execution::any_executor<SupportableProperties...> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_ANY_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/execution/bad_executor.hpp b/3rdparty/asio/include/asio/execution/bad_executor.hpp
new file mode 100644
index 00000000000..791951684fe
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/bad_executor.hpp
@@ -0,0 +1,46 @@
+//
+// execution/bad_executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_BAD_EXECUTOR_HPP
+#define ASIO_EXECUTION_BAD_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <exception>
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace execution {
+
+/// Exception thrown when trying to access an empty polymorphic executor.
+class bad_executor
+ : public std::exception
+{
+public:
+ /// Constructor.
+ ASIO_DECL bad_executor() noexcept;
+
+ /// Obtain message associated with exception.
+ ASIO_DECL virtual const char* what() const noexcept;
+};
+
+} // namespace execution
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/execution/impl/bad_executor.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_EXECUTION_BAD_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/execution/blocking.hpp b/3rdparty/asio/include/asio/execution/blocking.hpp
new file mode 100644
index 00000000000..e120299bded
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/blocking.hpp
@@ -0,0 +1,1360 @@
+//
+// execution/blocking.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_BLOCKING_HPP
+#define ASIO_EXECUTION_BLOCKING_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "asio/traits/execute_member.hpp"
+#include "asio/traits/query_free.hpp"
+#include "asio/traits/query_member.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property to describe what guarantees an executor makes about the blocking
+/// behaviour of their execution functions.
+struct blocking_t
+{
+ /// The blocking_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The top-level blocking_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The top-level blocking_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_t polymorphic_query_result_type;
+
+ /// A sub-property that indicates that invocation of an executor's execution
+ /// function may block pending completion of one or more invocations of the
+ /// submitted function object.
+ struct possibly_t
+ {
+ /// The blocking_t::possibly_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The blocking_t::possibly_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The blocking_t::possibly_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr possibly_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns possibly_t();
+ */
+ static constexpr blocking_t value();
+ };
+
+ /// A sub-property that indicates that invocation of an executor's execution
+ /// function shall block until completion of all invocations of the submitted
+ /// function object.
+ struct always_t
+ {
+ /// The blocking_t::always_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The blocking_t::always_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The blocking_t::always_t property can be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr always_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns always_t();
+ */
+ static constexpr blocking_t value();
+ };
+
+ /// A sub-property that indicates that invocation of an executor's execution
+ /// function shall not block pending completion of the invocations of the
+ /// submitted function object.
+ struct never_t
+ {
+ /// The blocking_t::never_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The blocking_t::never_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The blocking_t::never_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr never_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns never_t();
+ */
+ static constexpr blocking_t value();
+ };
+
+ /// A special value used for accessing the blocking_t::possibly_t property.
+ static constexpr possibly_t possibly;
+
+ /// A special value used for accessing the blocking_t::always_t property.
+ static constexpr always_t always;
+
+ /// A special value used for accessing the blocking_t::never_t property.
+ static constexpr never_t never;
+
+ /// Default constructor.
+ constexpr blocking_t();
+
+ /// Construct from a sub-property value.
+ constexpr blocking_t(possibly_t);
+
+ /// Construct from a sub-property value.
+ constexpr blocking_t(always_t);
+
+ /// Construct from a sub-property value.
+ constexpr blocking_t(never_t);
+
+ /// Compare property values for equality.
+ friend constexpr bool operator==(
+ const blocking_t& a, const blocking_t& b) noexcept;
+
+ /// Compare property values for inequality.
+ friend constexpr bool operator!=(
+ const blocking_t& a, const blocking_t& b) noexcept;
+};
+
+/// A special value used for accessing the blocking_t property.
+constexpr blocking_t blocking;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+namespace blocking {
+
+template <int I> struct possibly_t;
+template <int I> struct always_t;
+template <int I> struct never_t;
+
+} // namespace blocking
+namespace blocking_adaptation {
+
+template <int I> struct allowed_t;
+
+template <typename Executor, typename Function>
+void blocking_execute(
+ Executor&& ex,
+ Function&& func);
+
+} // namespace blocking_adaptation
+
+template <int I = 0>
+struct blocking_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+ typedef blocking_t polymorphic_query_result_type;
+
+ typedef detail::blocking::possibly_t<I> possibly_t;
+ typedef detail::blocking::always_t<I> always_t;
+ typedef detail::blocking::never_t<I> never_t;
+
+ constexpr blocking_t()
+ : value_(-1)
+ {
+ }
+
+ constexpr blocking_t(possibly_t)
+ : value_(0)
+ {
+ }
+
+ constexpr blocking_t(always_t)
+ : value_(1)
+ {
+ }
+
+ constexpr blocking_t(never_t)
+ : value_(2)
+ {
+ }
+
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto query(P&& p) const
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<typename proxy<T>::type, blocking_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, blocking_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, possibly_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, possibly_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, possibly_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, always_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, possibly_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, always_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, always_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, never_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, possibly_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, always_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, never_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, never_t>::value();
+ }
+
+ template <typename E, typename T = decltype(blocking_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = blocking_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ friend constexpr bool operator==(
+ const blocking_t& a, const blocking_t& b)
+ {
+ return a.value_ == b.value_;
+ }
+
+ friend constexpr bool operator!=(
+ const blocking_t& a, const blocking_t& b)
+ {
+ return a.value_ != b.value_;
+ }
+
+ struct convertible_from_blocking_t
+ {
+ constexpr convertible_from_blocking_t(blocking_t) {}
+ };
+
+ template <typename Executor>
+ friend constexpr blocking_t query(
+ const Executor& ex, convertible_from_blocking_t,
+ enable_if_t<
+ can_query<const Executor&, possibly_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, blocking_t<>::possibly_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, possibly_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, possibly_t());
+ }
+
+ template <typename Executor>
+ friend constexpr blocking_t query(
+ const Executor& ex, convertible_from_blocking_t,
+ enable_if_t<
+ !can_query<const Executor&, possibly_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, always_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, blocking_t<>::always_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, always_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, always_t());
+ }
+
+ template <typename Executor>
+ friend constexpr blocking_t query(
+ const Executor& ex, convertible_from_blocking_t,
+ enable_if_t<
+ !can_query<const Executor&, possibly_t>::value
+ >* = 0,
+ enable_if_t<
+ !can_query<const Executor&, always_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, never_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, blocking_t<>::never_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, never_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, never_t());
+ }
+
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(possibly_t, possibly);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(always_t, always);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(never_t, never);
+
+private:
+ int value_;
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T blocking_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+const typename blocking_t<I>::possibly_t blocking_t<I>::possibly;
+
+template <int I>
+const typename blocking_t<I>::always_t blocking_t<I>::always;
+
+template <int I>
+const typename blocking_t<I>::never_t blocking_t<I>::never;
+
+namespace blocking {
+
+template <int I = 0>
+struct possibly_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef blocking_t<I> polymorphic_query_result_type;
+
+ constexpr possibly_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename blocking_t<I>::template proxy<T>::type, possibly_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename blocking_t<I>::template static_proxy<T>::type, possibly_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr possibly_t static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::query_free<T, possibly_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !can_query<T, always_t<I>>::value
+ >* = 0,
+ enable_if_t<
+ !can_query<T, never_t<I>>::value
+ >* = 0) noexcept
+ {
+ return possibly_t();
+ }
+
+ template <typename E, typename T = decltype(possibly_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = possibly_t::static_query<E>();
+#endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr blocking_t<I> value()
+ {
+ return possibly_t();
+ }
+
+ friend constexpr bool operator==(
+ const possibly_t&, const possibly_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(
+ const possibly_t&, const possibly_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(
+ const possibly_t&, const always_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(
+ const possibly_t&, const always_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(
+ const possibly_t&, const never_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(
+ const possibly_t&, const never_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T possibly_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename Executor>
+class adapter
+{
+public:
+ adapter(int, const Executor& e) noexcept
+ : executor_(e)
+ {
+ }
+
+ adapter(const adapter& other) noexcept
+ : executor_(other.executor_)
+ {
+ }
+
+ adapter(adapter&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_))
+ {
+ }
+
+ template <int I>
+ static constexpr always_t<I> query(blocking_t<I>) noexcept
+ {
+ return always_t<I>();
+ }
+
+ template <int I>
+ static constexpr always_t<I> query(possibly_t<I>) noexcept
+ {
+ return always_t<I>();
+ }
+
+ template <int I>
+ static constexpr always_t<I> query(always_t<I>) noexcept
+ {
+ return always_t<I>();
+ }
+
+ template <int I>
+ static constexpr always_t<I> query(never_t<I>) noexcept
+ {
+ return always_t<I>();
+ }
+
+ template <typename Property>
+ enable_if_t<
+ can_query<const Executor&, Property>::value,
+ query_result_t<const Executor&, Property>
+ > query(const Property& p) const
+ noexcept(is_nothrow_query<const Executor&, Property>::value)
+ {
+ return asio::query(executor_, p);
+ }
+
+ template <int I>
+ enable_if_t<
+ can_require<const Executor&, possibly_t<I>>::value,
+ require_result_t<const Executor&, possibly_t<I>>
+ > require(possibly_t<I>) const noexcept
+ {
+ return asio::require(executor_, possibly_t<I>());
+ }
+
+ template <int I>
+ enable_if_t<
+ can_require<const Executor&, never_t<I>>::value,
+ require_result_t<const Executor&, never_t<I>>
+ > require(never_t<I>) const noexcept
+ {
+ return asio::require(executor_, never_t<I>());
+ }
+
+ template <typename Property>
+ enable_if_t<
+ can_require<const Executor&, Property>::value,
+ adapter<decay_t<require_result_t<const Executor&, Property>>>
+ > require(const Property& p) const
+ noexcept(is_nothrow_require<const Executor&, Property>::value)
+ {
+ return adapter<decay_t<require_result_t<const Executor&, Property>>>(
+ 0, asio::require(executor_, p));
+ }
+
+ template <typename Property>
+ enable_if_t<
+ can_prefer<const Executor&, Property>::value,
+ adapter<decay_t<prefer_result_t<const Executor&, Property>>>
+ > prefer(const Property& p) const
+ noexcept(is_nothrow_prefer<const Executor&, Property>::value)
+ {
+ return adapter<decay_t<prefer_result_t<const Executor&, Property>>>(
+ 0, asio::prefer(executor_, p));
+ }
+
+ template <typename Function>
+ enable_if_t<
+ traits::execute_member<const Executor&, Function>::is_valid
+ > execute(Function&& f) const
+ {
+ blocking_adaptation::blocking_execute(
+ executor_, static_cast<Function&&>(f));
+ }
+
+ friend bool operator==(const adapter& a, const adapter& b) noexcept
+ {
+ return a.executor_ == b.executor_;
+ }
+
+ friend bool operator!=(const adapter& a, const adapter& b) noexcept
+ {
+ return a.executor_ != b.executor_;
+ }
+
+private:
+ Executor executor_;
+};
+
+template <int I = 0>
+struct always_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = false;
+ typedef blocking_t<I> polymorphic_query_result_type;
+
+ constexpr always_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename blocking_t<I>::template proxy<T>::type, always_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename blocking_t<I>::template static_proxy<T>::type, always_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(always_t::static_query<E>())>
+ static constexpr const T static_query_v = always_t::static_query<E>();
+#endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr blocking_t<I> value()
+ {
+ return always_t();
+ }
+
+ friend constexpr bool operator==(
+ const always_t&, const always_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(
+ const always_t&, const always_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(
+ const always_t&, const possibly_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(
+ const always_t&, const possibly_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(
+ const always_t&, const never_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(
+ const always_t&, const never_t<I>&)
+ {
+ return true;
+ }
+
+ template <typename Executor>
+ friend adapter<Executor> require(
+ const Executor& e, const always_t&,
+ enable_if_t<
+ is_executor<Executor>::value
+ >* = 0,
+ enable_if_t<
+ traits::static_require<
+ const Executor&,
+ blocking_adaptation::allowed_t<0>
+ >::is_valid
+ >* = 0)
+ {
+ return adapter<Executor>(0, e);
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T always_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+struct never_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef blocking_t<I> polymorphic_query_result_type;
+
+ constexpr never_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename blocking_t<I>::template proxy<T>::type, never_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename blocking_t<I>::template static_proxy<T>::type, never_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(never_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = never_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr blocking_t<I> value()
+ {
+ return never_t();
+ }
+
+ friend constexpr bool operator==(const never_t&, const never_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const never_t&, const never_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const never_t&, const possibly_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const never_t&, const possibly_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(const never_t&, const always_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const never_t&, const always_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T never_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace blocking
+} // namespace detail
+
+typedef detail::blocking_t<> blocking_t;
+
+constexpr blocking_t blocking;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_t::possibly_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_t::always_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_t::never_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T>
+struct query_free_default<T, execution::blocking_t,
+ enable_if_t<
+ can_query<T, execution::blocking_t::possibly_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_t::possibly_t>::value;
+
+ typedef execution::blocking_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::blocking_t,
+ enable_if_t<
+ !can_query<T, execution::blocking_t::possibly_t>::value
+ && can_query<T, execution::blocking_t::always_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_t::always_t>::value;
+
+ typedef execution::blocking_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::blocking_t,
+ enable_if_t<
+ !can_query<T, execution::blocking_t::possibly_t>::value
+ && !can_query<T, execution::blocking_t::always_t>::value
+ && can_query<T, execution::blocking_t::never_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_t::never_t>::value;
+
+ typedef execution::blocking_t result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::blocking_t,
+ enable_if_t<
+ execution::detail::blocking_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::blocking_t::query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t,
+ enable_if_t<
+ !execution::detail::blocking_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking_t<0>::
+ query_member<T>::is_valid
+ && traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::blocking_t::possibly_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T, execution::blocking_t::possibly_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t,
+ enable_if_t<
+ !execution::detail::blocking_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
+ && traits::static_query<T, execution::blocking_t::always_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::blocking_t::always_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T, execution::blocking_t::always_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t,
+ enable_if_t<
+ !execution::detail::blocking_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
+ && !traits::static_query<T, execution::blocking_t::always_t>::is_valid
+ && traits::static_query<T, execution::blocking_t::never_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::blocking_t::never_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T, execution::blocking_t::never_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t::possibly_t,
+ enable_if_t<
+ execution::detail::blocking::possibly_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking::possibly_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::blocking::possibly_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t::possibly_t,
+ enable_if_t<
+ !execution::detail::blocking::possibly_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking::possibly_t<0>::
+ query_member<T>::is_valid
+ && !traits::query_free<T, execution::blocking_t::possibly_t>::is_valid
+ && !can_query<T, execution::blocking_t::always_t>::value
+ && !can_query<T, execution::blocking_t::never_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::blocking_t::possibly_t result_type;
+
+ static constexpr result_type value()
+ {
+ return result_type();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t::always_t,
+ enable_if_t<
+ execution::detail::blocking::always_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking::always_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::blocking::always_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_t::never_t,
+ enable_if_t<
+ execution::detail::blocking::never_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking::never_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::blocking::never_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename T>
+struct require_free_default<T, execution::blocking_t::always_t,
+ enable_if_t<
+ is_same<T, decay_t<T>>::value
+ && execution::is_executor<T>::value
+ && traits::static_require<
+ const T&,
+ execution::detail::blocking_adaptation::allowed_t<0>
+ >::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef execution::detail::blocking::adapter<T> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename Executor>
+struct equality_comparable<
+ execution::detail::blocking::adapter<Executor>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Executor, typename Function>
+struct execute_member<
+ execution::detail::blocking::adapter<Executor>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking::adapter<Executor>,
+ execution::detail::blocking_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_t::always_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking::adapter<Executor>,
+ execution::detail::blocking::always_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_t::always_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking::adapter<Executor>,
+ execution::detail::blocking::possibly_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_t::always_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking::adapter<Executor>,
+ execution::detail::blocking::never_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_t::always_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct query_member<
+ execution::detail::blocking::adapter<Executor>, Property,
+ enable_if_t<
+ can_query<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<Executor, Property>::value;
+ typedef query_result_t<Executor, Property> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Executor, int I>
+struct require_member<
+ execution::detail::blocking::adapter<Executor>,
+ execution::detail::blocking::possibly_t<I>,
+ enable_if_t<
+ can_require<
+ const Executor&,
+ execution::detail::blocking::possibly_t<I>
+ >::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<const Executor&,
+ execution::detail::blocking::possibly_t<I>>::value;
+ typedef require_result_t<const Executor&,
+ execution::detail::blocking::possibly_t<I>> result_type;
+};
+
+template <typename Executor, int I>
+struct require_member<
+ execution::detail::blocking::adapter<Executor>,
+ execution::detail::blocking::never_t<I>,
+ enable_if_t<
+ can_require<
+ const Executor&,
+ execution::detail::blocking::never_t<I>
+ >::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<const Executor&,
+ execution::detail::blocking::never_t<I>>::value;
+ typedef require_result_t<const Executor&,
+ execution::detail::blocking::never_t<I>> result_type;
+};
+
+template <typename Executor, typename Property>
+struct require_member<
+ execution::detail::blocking::adapter<Executor>, Property,
+ enable_if_t<
+ can_require<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<Executor, Property>::value;
+ typedef execution::detail::blocking::adapter<
+ decay_t<require_result_t<Executor, Property>>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct prefer_member<
+ execution::detail::blocking::adapter<Executor>, Property,
+ enable_if_t<
+ can_prefer<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<Executor, Property>::value;
+ typedef execution::detail::blocking::adapter<
+ decay_t<prefer_result_t<Executor, Property>>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_BLOCKING_HPP
diff --git a/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp b/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp
new file mode 100644
index 00000000000..a2769b254a5
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp
@@ -0,0 +1,1080 @@
+//
+// execution/blocking_adaptation.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_BLOCKING_ADAPTATION_HPP
+#define ASIO_EXECUTION_BLOCKING_ADAPTATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/event.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "asio/traits/prefer_member.hpp"
+#include "asio/traits/query_free.hpp"
+#include "asio/traits/query_member.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/require_member.hpp"
+#include "asio/traits/static_query.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property to describe whether automatic adaptation of an executor is
+/// allowed in order to apply the blocking_adaptation_t::allowed_t property.
+struct blocking_adaptation_t
+{
+ /// The blocking_adaptation_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The top-level blocking_adaptation_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The top-level blocking_adaptation_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_adaptation_t polymorphic_query_result_type;
+
+ /// A sub-property that indicates that automatic adaptation is not allowed.
+ struct disallowed_t
+ {
+ /// The blocking_adaptation_t::disallowed_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The blocking_adaptation_t::disallowed_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The blocking_adaptation_t::disallowed_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_adaptation_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr disallowed_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns disallowed_t();
+ */
+ static constexpr blocking_adaptation_t value();
+ };
+
+ /// A sub-property that indicates that automatic adaptation is allowed.
+ struct allowed_t
+ {
+ /// The blocking_adaptation_t::allowed_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The blocking_adaptation_t::allowed_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The blocking_adaptation_t::allowed_t property can be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef blocking_adaptation_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr allowed_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns allowed_t();
+ */
+ static constexpr blocking_adaptation_t value();
+ };
+
+ /// A special value used for accessing the blocking_adaptation_t::disallowed_t
+ /// property.
+ static constexpr disallowed_t disallowed;
+
+ /// A special value used for accessing the blocking_adaptation_t::allowed_t
+ /// property.
+ static constexpr allowed_t allowed;
+
+ /// Default constructor.
+ constexpr blocking_adaptation_t();
+
+ /// Construct from a sub-property value.
+ constexpr blocking_adaptation_t(disallowed_t);
+
+ /// Construct from a sub-property value.
+ constexpr blocking_adaptation_t(allowed_t);
+
+ /// Compare property values for equality.
+ friend constexpr bool operator==(
+ const blocking_adaptation_t& a, const blocking_adaptation_t& b) noexcept;
+
+ /// Compare property values for inequality.
+ friend constexpr bool operator!=(
+ const blocking_adaptation_t& a, const blocking_adaptation_t& b) noexcept;
+};
+
+/// A special value used for accessing the blocking_adaptation_t property.
+constexpr blocking_adaptation_t blocking_adaptation;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+namespace blocking_adaptation {
+
+template <int I> struct disallowed_t;
+template <int I> struct allowed_t;
+
+} // namespace blocking_adaptation
+
+template <int I = 0>
+struct blocking_adaptation_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+ typedef blocking_adaptation_t polymorphic_query_result_type;
+
+ typedef detail::blocking_adaptation::disallowed_t<I> disallowed_t;
+ typedef detail::blocking_adaptation::allowed_t<I> allowed_t;
+
+ constexpr blocking_adaptation_t()
+ : value_(-1)
+ {
+ }
+
+ constexpr blocking_adaptation_t(disallowed_t)
+ : value_(0)
+ {
+ }
+
+ constexpr blocking_adaptation_t(allowed_t)
+ : value_(1)
+ {
+ }
+
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto query(P&& p) const
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<typename proxy<T>::type, blocking_adaptation_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, blocking_adaptation_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, disallowed_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, disallowed_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, disallowed_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, allowed_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, disallowed_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, allowed_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, allowed_t>::value();
+ }
+
+ template <typename E,
+ typename T = decltype(blocking_adaptation_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = blocking_adaptation_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ friend constexpr bool operator==(
+ const blocking_adaptation_t& a, const blocking_adaptation_t& b)
+ {
+ return a.value_ == b.value_;
+ }
+
+ friend constexpr bool operator!=(
+ const blocking_adaptation_t& a, const blocking_adaptation_t& b)
+ {
+ return a.value_ != b.value_;
+ }
+
+ struct convertible_from_blocking_adaptation_t
+ {
+ constexpr convertible_from_blocking_adaptation_t(
+ blocking_adaptation_t)
+ {
+ }
+ };
+
+ template <typename Executor>
+ friend constexpr blocking_adaptation_t query(
+ const Executor& ex, convertible_from_blocking_adaptation_t,
+ enable_if_t<
+ can_query<const Executor&, disallowed_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&,
+ blocking_adaptation_t<>::disallowed_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, disallowed_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, disallowed_t());
+ }
+
+ template <typename Executor>
+ friend constexpr blocking_adaptation_t query(
+ const Executor& ex, convertible_from_blocking_adaptation_t,
+ enable_if_t<
+ !can_query<const Executor&, disallowed_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, allowed_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&,
+ blocking_adaptation_t<>::allowed_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, allowed_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, allowed_t());
+ }
+
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(disallowed_t, disallowed);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(allowed_t, allowed);
+
+private:
+ int value_;
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T blocking_adaptation_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+const typename blocking_adaptation_t<I>::disallowed_t
+blocking_adaptation_t<I>::disallowed;
+
+template <int I>
+const typename blocking_adaptation_t<I>::allowed_t
+blocking_adaptation_t<I>::allowed;
+
+namespace blocking_adaptation {
+
+template <int I = 0>
+struct disallowed_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef blocking_adaptation_t<I> polymorphic_query_result_type;
+
+ constexpr disallowed_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename blocking_adaptation_t<I>::template proxy<T>::type,
+ disallowed_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename blocking_adaptation_t<I>::template static_proxy<T>::type,
+ disallowed_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr disallowed_t static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::query_free<T, disallowed_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !can_query<T, allowed_t<I>>::value
+ >* = 0) noexcept
+ {
+ return disallowed_t();
+ }
+
+ template <typename E, typename T = decltype(disallowed_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = disallowed_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr blocking_adaptation_t<I> value()
+ {
+ return disallowed_t();
+ }
+
+ friend constexpr bool operator==(const disallowed_t&, const disallowed_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const disallowed_t&, const disallowed_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const disallowed_t&, const allowed_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const disallowed_t&, const allowed_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T disallowed_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename Executor>
+class adapter
+{
+public:
+ adapter(int, const Executor& e) noexcept
+ : executor_(e)
+ {
+ }
+
+ adapter(const adapter& other) noexcept
+ : executor_(other.executor_)
+ {
+ }
+
+ adapter(adapter&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_))
+ {
+ }
+
+ template <int I>
+ static constexpr allowed_t<I> query(blocking_adaptation_t<I>) noexcept
+ {
+ return allowed_t<I>();
+ }
+
+ template <int I>
+ static constexpr allowed_t<I> query(allowed_t<I>) noexcept
+ {
+ return allowed_t<I>();
+ }
+
+ template <int I>
+ static constexpr allowed_t<I> query(disallowed_t<I>) noexcept
+ {
+ return allowed_t<I>();
+ }
+
+ template <typename Property>
+ enable_if_t<
+ can_query<const Executor&, Property>::value,
+ query_result_t<const Executor&, Property>
+ > query(const Property& p) const
+ noexcept(is_nothrow_query<const Executor&, Property>::value)
+ {
+ return asio::query(executor_, p);
+ }
+
+ template <int I>
+ Executor require(disallowed_t<I>) const noexcept
+ {
+ return executor_;
+ }
+
+ template <typename Property>
+ enable_if_t<
+ can_require<const Executor&, Property>::value,
+ adapter<decay_t<require_result_t<const Executor&, Property>>>
+ > require(const Property& p) const
+ noexcept(is_nothrow_require<const Executor&, Property>::value)
+ {
+ return adapter<decay_t<require_result_t<const Executor&, Property>>>(
+ 0, asio::require(executor_, p));
+ }
+
+ template <typename Property>
+ enable_if_t<
+ can_prefer<const Executor&, Property>::value,
+ adapter<decay_t<prefer_result_t<const Executor&, Property>>>
+ > prefer(const Property& p) const
+ noexcept(is_nothrow_prefer<const Executor&, Property>::value)
+ {
+ return adapter<decay_t<prefer_result_t<const Executor&, Property>>>(
+ 0, asio::prefer(executor_, p));
+ }
+
+ template <typename Function>
+ enable_if_t<
+ traits::execute_member<const Executor&, Function>::is_valid
+ > execute(Function&& f) const
+ {
+ executor_.execute(static_cast<Function&&>(f));
+ }
+
+ friend bool operator==(const adapter& a, const adapter& b) noexcept
+ {
+ return a.executor_ == b.executor_;
+ }
+
+ friend bool operator!=(const adapter& a, const adapter& b) noexcept
+ {
+ return a.executor_ != b.executor_;
+ }
+
+private:
+ Executor executor_;
+};
+
+template <int I = 0>
+struct allowed_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = false;
+ typedef blocking_adaptation_t<I> polymorphic_query_result_type;
+
+ constexpr allowed_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename blocking_adaptation_t<I>::template proxy<T>::type,
+ allowed_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename blocking_adaptation_t<I>::template static_proxy<T>::type,
+ allowed_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(allowed_t::static_query<E>())>
+ static constexpr const T static_query_v = allowed_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr blocking_adaptation_t<I> value()
+ {
+ return allowed_t();
+ }
+
+ friend constexpr bool operator==(const allowed_t&, const allowed_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const allowed_t&, const allowed_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const allowed_t&, const disallowed_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const allowed_t&, const disallowed_t<I>&)
+ {
+ return true;
+ }
+
+ template <typename Executor>
+ friend adapter<Executor> require(
+ const Executor& e, const allowed_t&,
+ enable_if_t<
+ is_executor<Executor>::value
+ >* = 0)
+ {
+ return adapter<Executor>(0, e);
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T allowed_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename Function>
+class blocking_execute_state
+{
+public:
+ template <typename F>
+ blocking_execute_state(F&& f)
+ : func_(static_cast<F&&>(f)),
+ is_complete_(false)
+ {
+ }
+
+ template <typename Executor>
+ void execute_and_wait(Executor&& ex)
+ {
+ handler h = { this };
+ ex.execute(h);
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ while (!is_complete_)
+ event_.wait(lock);
+ }
+
+ struct cleanup
+ {
+ ~cleanup()
+ {
+ asio::detail::mutex::scoped_lock lock(state_->mutex_);
+ state_->is_complete_ = true;
+ state_->event_.unlock_and_signal_one_for_destruction(lock);
+ }
+
+ blocking_execute_state* state_;
+ };
+
+ struct handler
+ {
+ void operator()()
+ {
+ cleanup c = { state_ };
+ state_->func_();
+ }
+
+ blocking_execute_state* state_;
+ };
+
+ Function func_;
+ asio::detail::mutex mutex_;
+ asio::detail::event event_;
+ bool is_complete_;
+};
+
+template <typename Executor, typename Function>
+void blocking_execute(
+ Executor&& ex,
+ Function&& func)
+{
+ typedef decay_t<Function> func_t;
+ blocking_execute_state<func_t> state(static_cast<Function&&>(func));
+ state.execute_and_wait(ex);
+}
+
+} // namespace blocking_adaptation
+} // namespace detail
+
+typedef detail::blocking_adaptation_t<> blocking_adaptation_t;
+
+constexpr blocking_adaptation_t blocking_adaptation;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_adaptation_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_adaptation_t::disallowed_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::blocking_adaptation_t::allowed_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T>
+struct query_free_default<T, execution::blocking_adaptation_t,
+ enable_if_t<
+ can_query<T, execution::blocking_adaptation_t::disallowed_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_adaptation_t::disallowed_t>::value;
+
+ typedef execution::blocking_adaptation_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::blocking_adaptation_t,
+ enable_if_t<
+ !can_query<T, execution::blocking_adaptation_t::disallowed_t>::value
+ && can_query<T, execution::blocking_adaptation_t::allowed_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_adaptation_t::allowed_t>::value;
+
+ typedef execution::blocking_adaptation_t result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::blocking_adaptation_t,
+ enable_if_t<
+ execution::detail::blocking_adaptation_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking_adaptation_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::blocking_adaptation_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_adaptation_t,
+ enable_if_t<
+ !execution::detail::blocking_adaptation_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking_adaptation_t<0>::
+ query_member<T>::is_valid
+ && traits::static_query<T,
+ execution::blocking_adaptation_t::disallowed_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::blocking_adaptation_t::disallowed_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T,
+ execution::blocking_adaptation_t::disallowed_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_adaptation_t,
+ enable_if_t<
+ !execution::detail::blocking_adaptation_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking_adaptation_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T,
+ execution::blocking_adaptation_t::disallowed_t>::is_valid
+ && traits::static_query<T,
+ execution::blocking_adaptation_t::allowed_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::blocking_adaptation_t::allowed_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T,
+ execution::blocking_adaptation_t::allowed_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
+ enable_if_t<
+ execution::detail::blocking_adaptation::disallowed_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking_adaptation::disallowed_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::blocking_adaptation::disallowed_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
+ enable_if_t<
+ !execution::detail::blocking_adaptation::disallowed_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::blocking_adaptation::disallowed_t<0>::
+ query_member<T>::is_valid
+ && !traits::query_free<T,
+ execution::blocking_adaptation_t::disallowed_t>::is_valid
+ && !can_query<T, execution::blocking_adaptation_t::allowed_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::blocking_adaptation_t::disallowed_t result_type;
+
+ static constexpr result_type value()
+ {
+ return result_type();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::blocking_adaptation_t::allowed_t,
+ enable_if_t<
+ execution::detail::blocking_adaptation::allowed_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::blocking_adaptation::allowed_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::blocking_adaptation::allowed_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename T>
+struct require_free_default<T, execution::blocking_adaptation_t::allowed_t,
+ enable_if_t<
+ is_same<T, decay_t<T>>::value
+ && execution::is_executor<T>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef execution::detail::blocking_adaptation::adapter<T> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename Executor>
+struct equality_comparable<
+ execution::detail::blocking_adaptation::adapter<Executor>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Executor, typename Function>
+struct execute_member<
+ execution::detail::blocking_adaptation::adapter<Executor>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking_adaptation::adapter<Executor>,
+ execution::detail::blocking_adaptation_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_adaptation_t::allowed_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking_adaptation::adapter<Executor>,
+ execution::detail::blocking_adaptation::allowed_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_adaptation_t::allowed_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+template <typename Executor, int I>
+struct query_static_constexpr_member<
+ execution::detail::blocking_adaptation::adapter<Executor>,
+ execution::detail::blocking_adaptation::disallowed_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_adaptation_t::allowed_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct query_member<
+ execution::detail::blocking_adaptation::adapter<Executor>, Property,
+ enable_if_t<
+ can_query<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<Executor, Property>::value;
+ typedef query_result_t<Executor, Property> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Executor, int I>
+struct require_member<
+ execution::detail::blocking_adaptation::adapter<Executor>,
+ execution::detail::blocking_adaptation::disallowed_t<I>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Executor result_type;
+};
+
+template <typename Executor, typename Property>
+struct require_member<
+ execution::detail::blocking_adaptation::adapter<Executor>, Property,
+ enable_if_t<
+ can_require<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<Executor, Property>::value;
+ typedef execution::detail::blocking_adaptation::adapter<
+ decay_t<require_result_t<Executor, Property>>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct prefer_member<
+ execution::detail::blocking_adaptation::adapter<Executor>, Property,
+ enable_if_t<
+ can_prefer<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<Executor, Property>::value;
+ typedef execution::detail::blocking_adaptation::adapter<
+ decay_t<prefer_result_t<Executor, Property>>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_BLOCKING_ADAPTATION_HPP
diff --git a/3rdparty/asio/include/asio/execution/context.hpp b/3rdparty/asio/include/asio/execution/context.hpp
new file mode 100644
index 00000000000..a9df9c1c4b6
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/context.hpp
@@ -0,0 +1,191 @@
+//
+// execution/context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_CONTEXT2_HPP
+#define ASIO_EXECUTION_CONTEXT2_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+
+#if defined(ASIO_HAS_STD_ANY)
+# include <any>
+#endif // defined(ASIO_HAS_STD_ANY)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property that is used to obtain the execution context that is associated
+/// with an executor.
+struct context_t
+{
+ /// The context_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The context_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The context_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef std::any polymorphic_query_result_type;
+};
+
+/// A special value used for accessing the context_t property.
+constexpr context_t context;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+
+template <int I = 0>
+struct context_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+
+#if defined(ASIO_HAS_STD_ANY)
+ typedef std::any polymorphic_query_result_type;
+#endif // defined(ASIO_HAS_STD_ANY)
+
+ constexpr context_t()
+ {
+ }
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, context_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(context_t::static_query<E>())>
+ static constexpr const T static_query_v = context_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T context_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace detail
+
+typedef detail::context_t<> context_t;
+
+constexpr context_t context;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::context_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::context_t,
+ enable_if_t<
+ execution::detail::context_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::context_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::context_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_CONTEXT2_HPP
diff --git a/3rdparty/asio/include/asio/execution/context_as.hpp b/3rdparty/asio/include/asio/execution/context_as.hpp
new file mode 100644
index 00000000000..f51fb1dc4c7
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/context_as.hpp
@@ -0,0 +1,190 @@
+//
+// execution/context_as.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_CONTEXT_AS_HPP
+#define ASIO_EXECUTION_CONTEXT_AS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/context.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/query.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property that is used to obtain the execution context that is associated
+/// with an executor.
+template <typename U>
+struct context_as_t
+{
+ /// The context_as_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The context_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The context_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef T polymorphic_query_result_type;
+};
+
+/// A special value used for accessing the context_as_t property.
+template <typename U>
+constexpr context_as_t context_as;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+template <typename T>
+struct context_as_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename U>
+ static constexpr bool is_applicable_property_v = is_executor<U>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+
+ typedef T polymorphic_query_result_type;
+
+ constexpr context_as_t()
+ {
+ }
+
+ constexpr context_as_t(context_t)
+ {
+ }
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename E>
+ static constexpr
+ typename context_t::query_static_constexpr_member<E>::result_type
+ static_query()
+ noexcept(context_t::query_static_constexpr_member<E>::is_noexcept)
+ {
+ return context_t::query_static_constexpr_member<E>::value();
+ }
+
+ template <typename E, typename U = decltype(context_as_t::static_query<E>())>
+ static constexpr const U static_query_v
+ = context_as_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ template <typename Executor, typename U>
+ friend constexpr U query(
+ const Executor& ex, const context_as_t<U>&,
+ enable_if_t<
+ is_same<T, U>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, const context_t&>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, const context_t&>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, const context_t&>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, context);
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <typename T> template <typename E, typename U>
+const U context_as_t<T>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES) \
+ || defined(GENERATING_DOCUMENTATION)
+template <typename T>
+constexpr context_as_t<T> context_as{};
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename U>
+struct is_applicable_property<T, execution::context_as_t<U>>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T, typename U>
+struct static_query<T, execution::context_as_t<U>,
+ enable_if_t<
+ static_query<T, execution::context_t>::is_valid
+ >> : static_query<T, execution::context_t>
+{
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T, typename U>
+struct query_free<T, execution::context_as_t<U>,
+ enable_if_t<
+ can_query<const T&, const execution::context_t&>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<const T&, const execution::context_t&>::value;
+
+ typedef U result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_CONTEXT_AS_HPP
diff --git a/3rdparty/asio/include/asio/execution/executor.hpp b/3rdparty/asio/include/asio/execution/executor.hpp
new file mode 100644
index 00000000000..1f34981fa78
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/executor.hpp
@@ -0,0 +1,116 @@
+//
+// execution/executor.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_EXECUTOR_HPP
+#define ASIO_EXECUTION_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/invocable_archetype.hpp"
+#include "asio/traits/equality_comparable.hpp"
+#include "asio/traits/execute_member.hpp"
+
+#if defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) \
+ && defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+# define ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT 1
+#endif // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+ // && defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace execution {
+namespace detail {
+
+template <typename T, typename F,
+ typename = void, typename = void, typename = void, typename = void,
+ typename = void, typename = void, typename = void, typename = void>
+struct is_executor_of_impl : false_type
+{
+};
+
+template <typename T, typename F>
+struct is_executor_of_impl<T, F,
+ enable_if_t<
+ traits::execute_member<add_const_t<T>, F>::is_valid
+ >,
+ void_t<
+ result_of_t<decay_t<F>&()>
+ >,
+ enable_if_t<
+ is_constructible<decay_t<F>, F>::value
+ >,
+ enable_if_t<
+ is_move_constructible<decay_t<F>>::value
+ >,
+ enable_if_t<
+ is_nothrow_copy_constructible<T>::value
+ >,
+ enable_if_t<
+ is_nothrow_destructible<T>::value
+ >,
+ enable_if_t<
+ traits::equality_comparable<T>::is_valid
+ >,
+ enable_if_t<
+ traits::equality_comparable<T>::is_noexcept
+ >> : true_type
+{
+};
+
+} // namespace detail
+
+/// The is_executor trait detects whether a type T satisfies the
+/// execution::executor concept.
+/**
+ * Class template @c is_executor is a UnaryTypeTrait that is derived from @c
+ * true_type if the type @c T meets the concept definition for an executor,
+ * otherwise @c false_type.
+ */
+template <typename T>
+struct is_executor :
+#if defined(GENERATING_DOCUMENTATION)
+ integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ detail::is_executor_of_impl<T, invocable_archetype>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+constexpr const bool is_executor_v = is_executor<T>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+#if defined(ASIO_HAS_CONCEPTS)
+
+template <typename T>
+ASIO_CONCEPT executor = is_executor<T>::value;
+
+#define ASIO_EXECUTION_EXECUTOR ::asio::execution::executor
+
+#else // defined(ASIO_HAS_CONCEPTS)
+
+#define ASIO_EXECUTION_EXECUTOR typename
+
+#endif // defined(ASIO_HAS_CONCEPTS)
+
+} // namespace execution
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp b/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp
new file mode 100644
index 00000000000..4e185acb059
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp
@@ -0,0 +1,40 @@
+//
+// exection/impl/bad_executor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_IMPL_BAD_EXECUTOR_IPP
+#define ASIO_EXECUTION_IMPL_BAD_EXECUTOR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/execution/bad_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace execution {
+
+bad_executor::bad_executor() noexcept
+{
+}
+
+const char* bad_executor::what() const noexcept
+{
+ return "bad executor";
+}
+
+} // namespace execution
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_IMPL_BAD_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/execution/invocable_archetype.hpp b/3rdparty/asio/include/asio/execution/invocable_archetype.hpp
new file mode 100644
index 00000000000..50223279e1f
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/invocable_archetype.hpp
@@ -0,0 +1,43 @@
+//
+// execution/invocable_archetype.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_INVOCABLE_ARCHETYPE_HPP
+#define ASIO_EXECUTION_INVOCABLE_ARCHETYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace execution {
+
+/// An archetypal function object used for determining adherence to the
+/// execution::executor concept.
+struct invocable_archetype
+{
+ /// Function call operator.
+ template <typename... Args>
+ void operator()(Args&&...)
+ {
+ }
+};
+
+} // namespace execution
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_INVOCABLE_ARCHETYPE_HPP
+
diff --git a/3rdparty/asio/include/asio/execution/mapping.hpp b/3rdparty/asio/include/asio/execution/mapping.hpp
new file mode 100644
index 00000000000..4c6e1791869
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/mapping.hpp
@@ -0,0 +1,1002 @@
+//
+// execution/mapping.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_MAPPING_HPP
+#define ASIO_EXECUTION_MAPPING_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/query.hpp"
+#include "asio/traits/query_free.hpp"
+#include "asio/traits/query_member.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property to describe what guarantees an executor makes about the mapping
+/// of execution agents on to threads of execution.
+struct mapping_t
+{
+ /// The mapping_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The top-level mapping_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The top-level mapping_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef mapping_t polymorphic_query_result_type;
+
+ /// A sub-property that indicates that execution agents are mapped on to
+ /// threads of execution.
+ struct thread_t
+ {
+ /// The mapping_t::thread_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The mapping_t::thread_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The mapping_t::thread_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef mapping_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr thread_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns thread_t();
+ */
+ static constexpr mapping_t value();
+ };
+
+ /// A sub-property that indicates that execution agents are mapped on to
+ /// new threads of execution.
+ struct new_thread_t
+ {
+ /// The mapping_t::new_thread_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The mapping_t::new_thread_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The mapping_t::new_thread_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef mapping_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr new_thread_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns new_thread_t();
+ */
+ static constexpr mapping_t value();
+ };
+
+ /// A sub-property that indicates that the mapping of execution agents is
+ /// implementation-defined.
+ struct other_t
+ {
+ /// The mapping_t::other_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The mapping_t::other_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The mapping_t::other_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef mapping_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr other_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns other_t();
+ */
+ static constexpr mapping_t value();
+ };
+
+ /// A special value used for accessing the mapping_t::thread_t property.
+ static constexpr thread_t thread;
+
+ /// A special value used for accessing the mapping_t::new_thread_t property.
+ static constexpr new_thread_t new_thread;
+
+ /// A special value used for accessing the mapping_t::other_t property.
+ static constexpr other_t other;
+
+ /// Default constructor.
+ constexpr mapping_t();
+
+ /// Construct from a sub-property value.
+ constexpr mapping_t(thread_t);
+
+ /// Construct from a sub-property value.
+ constexpr mapping_t(new_thread_t);
+
+ /// Construct from a sub-property value.
+ constexpr mapping_t(other_t);
+
+ /// Compare property values for equality.
+ friend constexpr bool operator==(
+ const mapping_t& a, const mapping_t& b) noexcept;
+
+ /// Compare property values for inequality.
+ friend constexpr bool operator!=(
+ const mapping_t& a, const mapping_t& b) noexcept;
+};
+
+/// A special value used for accessing the mapping_t property.
+constexpr mapping_t mapping;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+namespace mapping {
+
+template <int I> struct thread_t;
+template <int I> struct new_thread_t;
+template <int I> struct other_t;
+
+} // namespace mapping
+
+template <int I = 0>
+struct mapping_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+ typedef mapping_t polymorphic_query_result_type;
+
+ typedef detail::mapping::thread_t<I> thread_t;
+ typedef detail::mapping::new_thread_t<I> new_thread_t;
+ typedef detail::mapping::other_t<I> other_t;
+
+ constexpr mapping_t()
+ : value_(-1)
+ {
+ }
+
+ constexpr mapping_t(thread_t)
+ : value_(0)
+ {
+ }
+
+ constexpr mapping_t(new_thread_t)
+ : value_(1)
+ {
+ }
+
+ constexpr mapping_t(other_t)
+ : value_(2)
+ {
+ }
+
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto query(P&& p) const
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<typename proxy<T>::type, mapping_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, mapping_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, thread_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, thread_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, thread_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, new_thread_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, thread_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, new_thread_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, new_thread_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, other_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, thread_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, new_thread_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, other_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, other_t>::value();
+ }
+
+ template <typename E, typename T = decltype(mapping_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = mapping_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ friend constexpr bool operator==(
+ const mapping_t& a, const mapping_t& b)
+ {
+ return a.value_ == b.value_;
+ }
+
+ friend constexpr bool operator!=(
+ const mapping_t& a, const mapping_t& b)
+ {
+ return a.value_ != b.value_;
+ }
+
+ struct convertible_from_mapping_t
+ {
+ constexpr convertible_from_mapping_t(mapping_t) {}
+ };
+
+ template <typename Executor>
+ friend constexpr mapping_t query(
+ const Executor& ex, convertible_from_mapping_t,
+ enable_if_t<
+ can_query<const Executor&, thread_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, mapping_t<>::thread_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, thread_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, thread_t());
+ }
+
+ template <typename Executor>
+ friend constexpr mapping_t query(
+ const Executor& ex, convertible_from_mapping_t,
+ enable_if_t<
+ !can_query<const Executor&, thread_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, new_thread_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(
+ is_nothrow_query<const Executor&, mapping_t<>::new_thread_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, new_thread_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, new_thread_t());
+ }
+
+ template <typename Executor>
+ friend constexpr mapping_t query(
+ const Executor& ex, convertible_from_mapping_t,
+ enable_if_t<
+ !can_query<const Executor&, thread_t>::value
+ >* = 0,
+ enable_if_t<
+ !can_query<const Executor&, new_thread_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, other_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, mapping_t<>::other_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, other_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, other_t());
+ }
+
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(thread_t, thread);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(new_thread_t, new_thread);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(other_t, other);
+
+private:
+ int value_;
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T mapping_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+const typename mapping_t<I>::thread_t mapping_t<I>::thread;
+
+template <int I>
+const typename mapping_t<I>::new_thread_t mapping_t<I>::new_thread;
+
+template <int I>
+const typename mapping_t<I>::other_t mapping_t<I>::other;
+
+namespace mapping {
+
+template <int I = 0>
+struct thread_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef mapping_t<I> polymorphic_query_result_type;
+
+ constexpr thread_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename mapping_t<I>::template proxy<T>::type, thread_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename mapping_t<I>::template static_proxy<T>::type, thread_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr thread_t static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::query_free<T, thread_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !can_query<T, new_thread_t<I>>::value
+ >* = 0,
+ enable_if_t<
+ !can_query<T, other_t<I>>::value
+ >* = 0) noexcept
+ {
+ return thread_t();
+ }
+
+ template <typename E, typename T = decltype(thread_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = thread_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr mapping_t<I> value()
+ {
+ return thread_t();
+ }
+
+ friend constexpr bool operator==(const thread_t&, const thread_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const thread_t&, const thread_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const thread_t&, const new_thread_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const thread_t&, const new_thread_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(const thread_t&, const other_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const thread_t&, const other_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T thread_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I = 0>
+struct new_thread_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef mapping_t<I> polymorphic_query_result_type;
+
+ constexpr new_thread_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename mapping_t<I>::template proxy<T>::type, new_thread_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename mapping_t<I>::template static_proxy<T>::type, new_thread_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(new_thread_t::static_query<E>())>
+ static constexpr const T static_query_v = new_thread_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr mapping_t<I> value()
+ {
+ return new_thread_t();
+ }
+
+ friend constexpr bool operator==(const new_thread_t&, const new_thread_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const new_thread_t&, const new_thread_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const new_thread_t&, const thread_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const new_thread_t&, const thread_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(const new_thread_t&, const other_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const new_thread_t&, const other_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T new_thread_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+struct other_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef mapping_t<I> polymorphic_query_result_type;
+
+ constexpr other_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename mapping_t<I>::template proxy<T>::type, other_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename mapping_t<I>::template static_proxy<T>::type, other_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(other_t::static_query<E>())>
+ static constexpr const T static_query_v = other_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr mapping_t<I> value()
+ {
+ return other_t();
+ }
+
+ friend constexpr bool operator==(const other_t&, const other_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const other_t&, const other_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const other_t&, const thread_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const other_t&, const thread_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(const other_t&, const new_thread_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const other_t&, const new_thread_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T other_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace mapping
+} // namespace detail
+
+typedef detail::mapping_t<> mapping_t;
+
+constexpr mapping_t mapping;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::mapping_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::mapping_t::thread_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::mapping_t::new_thread_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::mapping_t::other_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T>
+struct query_free_default<T, execution::mapping_t,
+ enable_if_t<
+ can_query<T, execution::mapping_t::thread_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::mapping_t::thread_t>::value;
+
+ typedef execution::mapping_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::mapping_t,
+ enable_if_t<
+ !can_query<T, execution::mapping_t::thread_t>::value
+ && can_query<T, execution::mapping_t::new_thread_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::mapping_t::new_thread_t>::value;
+
+ typedef execution::mapping_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::mapping_t,
+ enable_if_t<
+ !can_query<T, execution::mapping_t::thread_t>::value
+ && !can_query<T, execution::mapping_t::new_thread_t>::value
+ && can_query<T, execution::mapping_t::other_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::mapping_t::other_t>::value;
+
+ typedef execution::mapping_t result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::mapping_t,
+ enable_if_t<
+ execution::detail::mapping_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::mapping_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::mapping_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t,
+ enable_if_t<
+ !execution::detail::mapping_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::mapping_t<0>::
+ query_member<T>::is_valid
+ && traits::static_query<T, execution::mapping_t::thread_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::mapping_t::thread_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T, execution::mapping_t::thread_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t,
+ enable_if_t<
+ !execution::detail::mapping_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::mapping_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T, execution::mapping_t::thread_t>::is_valid
+ && traits::static_query<T, execution::mapping_t::new_thread_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::mapping_t::new_thread_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T, execution::mapping_t::new_thread_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t,
+ enable_if_t<
+ !execution::detail::mapping_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::mapping_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T, execution::mapping_t::thread_t>::is_valid
+ && !traits::static_query<T, execution::mapping_t::new_thread_t>::is_valid
+ && traits::static_query<T, execution::mapping_t::other_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::mapping_t::other_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T, execution::mapping_t::other_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t::thread_t,
+ enable_if_t<
+ execution::detail::mapping::thread_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::mapping::thread_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::mapping::thread_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t::thread_t,
+ enable_if_t<
+ !execution::detail::mapping::thread_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::mapping::thread_t<0>::
+ query_member<T>::is_valid
+ && !traits::query_free<T, execution::mapping_t::thread_t>::is_valid
+ && !can_query<T, execution::mapping_t::new_thread_t>::value
+ && !can_query<T, execution::mapping_t::other_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::mapping_t::thread_t result_type;
+
+ static constexpr result_type value()
+ {
+ return result_type();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t::new_thread_t,
+ enable_if_t<
+ execution::detail::mapping::new_thread_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::mapping::new_thread_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::mapping::new_thread_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::mapping_t::other_t,
+ enable_if_t<
+ execution::detail::mapping::other_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::mapping::other_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::mapping::other_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_MAPPING_HPP
diff --git a/3rdparty/asio/include/asio/execution/occupancy.hpp b/3rdparty/asio/include/asio/execution/occupancy.hpp
new file mode 100644
index 00000000000..c986c88113d
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/occupancy.hpp
@@ -0,0 +1,184 @@
+//
+// execution/occupancy.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_OCCUPANCY_HPP
+#define ASIO_EXECUTION_OCCUPANCY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property that gives an estimate of the number of execution agents that
+/// should occupy the associated execution context.
+struct occupancy_t
+{
+ /// The occupancy_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The occupancy_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The occupancy_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef std::size_t polymorphic_query_result_type;
+};
+
+/// A special value used for accessing the occupancy_t property.
+constexpr occupancy_t occupancy;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+
+template <int I = 0>
+struct occupancy_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+ typedef std::size_t polymorphic_query_result_type;
+
+ constexpr occupancy_t()
+ {
+ }
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, occupancy_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(occupancy_t::static_query<E>())>
+ static constexpr const T static_query_v = occupancy_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T occupancy_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace detail
+
+typedef detail::occupancy_t<> occupancy_t;
+
+constexpr occupancy_t occupancy;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::occupancy_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::occupancy_t,
+ enable_if_t<
+ execution::detail::occupancy_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::occupancy_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::occupancy_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_OCCUPANCY_HPP
diff --git a/3rdparty/asio/include/asio/execution/outstanding_work.hpp b/3rdparty/asio/include/asio/execution/outstanding_work.hpp
new file mode 100644
index 00000000000..600792b95b4
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/outstanding_work.hpp
@@ -0,0 +1,753 @@
+//
+// execution/outstanding_work.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_OUTSTANDING_WORK_HPP
+#define ASIO_EXECUTION_OUTSTANDING_WORK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/query.hpp"
+#include "asio/traits/query_free.hpp"
+#include "asio/traits/query_member.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property to describe whether task submission is likely in the future.
+struct outstanding_work_t
+{
+ /// The outstanding_work_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The top-level outstanding_work_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The top-level outstanding_work_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef outstanding_work_t polymorphic_query_result_type;
+
+ /// A sub-property that indicates that the executor does not represent likely
+ /// future submission of a function object.
+ struct untracked_t
+ {
+ /// The outstanding_work_t::untracked_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The outstanding_work_t::untracked_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The outstanding_work_t::untracked_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef outstanding_work_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr untracked_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns untracked_t();
+ */
+ static constexpr outstanding_work_t value();
+ };
+
+ /// A sub-property that indicates that the executor represents likely
+ /// future submission of a function object.
+ struct tracked_t
+ {
+ /// The outstanding_work_t::untracked_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The outstanding_work_t::tracked_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The outstanding_work_t::tracked_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef outstanding_work_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr tracked_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns tracked_t();
+ */
+ static constexpr outstanding_work_t value();
+ };
+
+ /// A special value used for accessing the outstanding_work_t::untracked_t
+ /// property.
+ static constexpr untracked_t untracked;
+
+ /// A special value used for accessing the outstanding_work_t::tracked_t
+ /// property.
+ static constexpr tracked_t tracked;
+
+ /// Default constructor.
+ constexpr outstanding_work_t();
+
+ /// Construct from a sub-property value.
+ constexpr outstanding_work_t(untracked_t);
+
+ /// Construct from a sub-property value.
+ constexpr outstanding_work_t(tracked_t);
+
+ /// Compare property values for equality.
+ friend constexpr bool operator==(
+ const outstanding_work_t& a, const outstanding_work_t& b) noexcept;
+
+ /// Compare property values for inequality.
+ friend constexpr bool operator!=(
+ const outstanding_work_t& a, const outstanding_work_t& b) noexcept;
+};
+
+/// A special value used for accessing the outstanding_work_t property.
+constexpr outstanding_work_t outstanding_work;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+namespace outstanding_work {
+
+template <int I> struct untracked_t;
+template <int I> struct tracked_t;
+
+} // namespace outstanding_work
+
+template <int I = 0>
+struct outstanding_work_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+ typedef outstanding_work_t polymorphic_query_result_type;
+
+ typedef detail::outstanding_work::untracked_t<I> untracked_t;
+ typedef detail::outstanding_work::tracked_t<I> tracked_t;
+
+ constexpr outstanding_work_t()
+ : value_(-1)
+ {
+ }
+
+ constexpr outstanding_work_t(untracked_t)
+ : value_(0)
+ {
+ }
+
+ constexpr outstanding_work_t(tracked_t)
+ : value_(1)
+ {
+ }
+
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto query(P&& p) const
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<typename proxy<T>::type, outstanding_work_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, outstanding_work_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, untracked_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, untracked_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, untracked_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, tracked_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, untracked_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, tracked_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, tracked_t>::value();
+ }
+
+ template <typename E,
+ typename T = decltype(outstanding_work_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = outstanding_work_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ friend constexpr bool operator==(
+ const outstanding_work_t& a, const outstanding_work_t& b)
+ {
+ return a.value_ == b.value_;
+ }
+
+ friend constexpr bool operator!=(
+ const outstanding_work_t& a, const outstanding_work_t& b)
+ {
+ return a.value_ != b.value_;
+ }
+
+ struct convertible_from_outstanding_work_t
+ {
+ constexpr convertible_from_outstanding_work_t(outstanding_work_t)
+ {
+ }
+ };
+
+ template <typename Executor>
+ friend constexpr outstanding_work_t query(
+ const Executor& ex, convertible_from_outstanding_work_t,
+ enable_if_t<
+ can_query<const Executor&, untracked_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&,
+ outstanding_work_t<>::untracked_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, untracked_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, untracked_t());
+ }
+
+ template <typename Executor>
+ friend constexpr outstanding_work_t query(
+ const Executor& ex, convertible_from_outstanding_work_t,
+ enable_if_t<
+ !can_query<const Executor&, untracked_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, tracked_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&,
+ outstanding_work_t<>::tracked_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, tracked_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, tracked_t());
+ }
+
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(untracked_t, untracked);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(tracked_t, tracked);
+
+private:
+ int value_;
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T outstanding_work_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+const typename outstanding_work_t<I>::untracked_t
+outstanding_work_t<I>::untracked;
+
+template <int I>
+const typename outstanding_work_t<I>::tracked_t
+outstanding_work_t<I>::tracked;
+
+namespace outstanding_work {
+
+template <int I = 0>
+struct untracked_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef outstanding_work_t<I> polymorphic_query_result_type;
+
+ constexpr untracked_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename outstanding_work_t<I>::template proxy<T>::type, untracked_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename outstanding_work_t<I>::template static_proxy<T>::type,
+ untracked_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr untracked_t static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::query_free<T, untracked_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !can_query<T, tracked_t<I>>::value
+ >* = 0) noexcept
+ {
+ return untracked_t();
+ }
+
+ template <typename E, typename T = decltype(untracked_t::static_query<E>())>
+ static constexpr const T static_query_v = untracked_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr outstanding_work_t<I> value()
+ {
+ return untracked_t();
+ }
+
+ friend constexpr bool operator==(const untracked_t&, const untracked_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const untracked_t&, const untracked_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const untracked_t&, const tracked_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const untracked_t&, const tracked_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T untracked_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I = 0>
+struct tracked_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef outstanding_work_t<I> polymorphic_query_result_type;
+
+ constexpr tracked_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename outstanding_work_t<I>::template proxy<T>::type, tracked_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename outstanding_work_t<I>::template static_proxy<T>::type,
+ tracked_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E, typename T = decltype(tracked_t::static_query<E>())>
+ static constexpr const T static_query_v = tracked_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr outstanding_work_t<I> value()
+ {
+ return tracked_t();
+ }
+
+ friend constexpr bool operator==(const tracked_t&, const tracked_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const tracked_t&, const tracked_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const tracked_t&, const untracked_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const tracked_t&, const untracked_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T tracked_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace outstanding_work
+} // namespace detail
+
+typedef detail::outstanding_work_t<> outstanding_work_t;
+
+constexpr outstanding_work_t outstanding_work;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::outstanding_work_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::outstanding_work_t::untracked_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::outstanding_work_t::tracked_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T>
+struct query_free_default<T, execution::outstanding_work_t,
+ enable_if_t<
+ can_query<T, execution::outstanding_work_t::untracked_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::outstanding_work_t::untracked_t>::value;
+
+ typedef execution::outstanding_work_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::outstanding_work_t,
+ enable_if_t<
+ !can_query<T, execution::outstanding_work_t::untracked_t>::value
+ && can_query<T, execution::outstanding_work_t::tracked_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::outstanding_work_t::tracked_t>::value;
+
+ typedef execution::outstanding_work_t result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::outstanding_work_t,
+ enable_if_t<
+ execution::detail::outstanding_work_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::outstanding_work_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::outstanding_work_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::outstanding_work_t,
+ enable_if_t<
+ !execution::detail::outstanding_work_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::outstanding_work_t<0>::
+ query_member<T>::is_valid
+ && traits::static_query<T,
+ execution::outstanding_work_t::untracked_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::outstanding_work_t::untracked_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T,
+ execution::outstanding_work_t::untracked_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::outstanding_work_t,
+ enable_if_t<
+ !execution::detail::outstanding_work_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::outstanding_work_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T,
+ execution::outstanding_work_t::untracked_t>::is_valid
+ && traits::static_query<T,
+ execution::outstanding_work_t::tracked_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::outstanding_work_t::tracked_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T,
+ execution::outstanding_work_t::tracked_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::outstanding_work_t::untracked_t,
+ enable_if_t<
+ execution::detail::outstanding_work::untracked_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::outstanding_work::untracked_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::outstanding_work::untracked_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::outstanding_work_t::untracked_t,
+ enable_if_t<
+ !execution::detail::outstanding_work::untracked_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::outstanding_work::untracked_t<0>::
+ query_member<T>::is_valid
+ && !traits::query_free<T,
+ execution::outstanding_work_t::untracked_t>::is_valid
+ && !can_query<T, execution::outstanding_work_t::tracked_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::outstanding_work_t::untracked_t result_type;
+
+ static constexpr result_type value()
+ {
+ return result_type();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::outstanding_work_t::tracked_t,
+ enable_if_t<
+ execution::detail::outstanding_work::tracked_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::outstanding_work::tracked_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::outstanding_work::tracked_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_OUTSTANDING_WORK_HPP
diff --git a/3rdparty/asio/include/asio/execution/prefer_only.hpp b/3rdparty/asio/include/asio/execution/prefer_only.hpp
new file mode 100644
index 00000000000..1a990ebf392
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/prefer_only.hpp
@@ -0,0 +1,328 @@
+//
+// execution/prefer_only.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_PREFER_ONLY_HPP
+#define ASIO_EXECUTION_PREFER_ONLY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/traits/static_query.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property adapter that is used with the polymorphic executor wrapper
+/// to mark properties as preferable, but not requirable.
+template <typename Property>
+struct prefer_only
+{
+ /// The prefer_only adapter applies to the same types as the nested property.
+ template <typename T>
+ static constexpr bool is_applicable_property_v =
+ is_applicable_property<T, Property>::value;
+
+ /// The context_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The context_t property can be preferred, it the underlying property can
+ /// be preferred.
+ /**
+ * @c true if @c Property::is_preferable is @c true, otherwise @c false.
+ */
+ static constexpr bool is_preferable = automatically_determined;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef typename Property::polymorphic_query_result_type
+ polymorphic_query_result_type;
+};
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+
+template <typename InnerProperty, typename = void>
+struct prefer_only_is_preferable
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <typename InnerProperty>
+struct prefer_only_is_preferable<InnerProperty,
+ enable_if_t<
+ InnerProperty::is_preferable
+ >
+ >
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <typename InnerProperty, typename = void>
+struct prefer_only_polymorphic_query_result_type
+{
+};
+
+template <typename InnerProperty>
+struct prefer_only_polymorphic_query_result_type<InnerProperty,
+ void_t<
+ typename InnerProperty::polymorphic_query_result_type
+ >
+ >
+{
+ typedef typename InnerProperty::polymorphic_query_result_type
+ polymorphic_query_result_type;
+};
+
+template <typename InnerProperty, typename = void>
+struct prefer_only_property
+{
+ InnerProperty property;
+
+ prefer_only_property(const InnerProperty& p)
+ : property(p)
+ {
+ }
+};
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+template <typename InnerProperty>
+struct prefer_only_property<InnerProperty,
+ void_t<
+ decltype(asio::declval<const InnerProperty>().value())
+ >
+ >
+{
+ InnerProperty property;
+
+ prefer_only_property(const InnerProperty& p)
+ : property(p)
+ {
+ }
+
+ constexpr auto value() const
+ noexcept(noexcept(asio::declval<const InnerProperty>().value()))
+ -> decltype(asio::declval<const InnerProperty>().value())
+ {
+ return property.value();
+ }
+};
+
+#else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+struct prefer_only_memfns_base
+{
+ void value();
+};
+
+template <typename T>
+struct prefer_only_memfns_derived
+ : T, prefer_only_memfns_base
+{
+};
+
+template <typename T, T>
+struct prefer_only_memfns_check
+{
+};
+
+template <typename>
+char (&prefer_only_value_memfn_helper(...))[2];
+
+template <typename T>
+char prefer_only_value_memfn_helper(
+ prefer_only_memfns_check<
+ void (prefer_only_memfns_base::*)(),
+ &prefer_only_memfns_derived<T>::value>*);
+
+template <typename InnerProperty>
+struct prefer_only_property<InnerProperty,
+ enable_if_t<
+ sizeof(prefer_only_value_memfn_helper<InnerProperty>(0)) != 1
+ && !is_same<typename InnerProperty::polymorphic_query_result_type,
+ void>::value
+ >
+ >
+{
+ InnerProperty property;
+
+ prefer_only_property(const InnerProperty& p)
+ : property(p)
+ {
+ }
+
+ constexpr typename InnerProperty::polymorphic_query_result_type
+ value() const
+ {
+ return property.value();
+ }
+};
+
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+} // namespace detail
+
+template <typename InnerProperty>
+struct prefer_only :
+ detail::prefer_only_is_preferable<InnerProperty>,
+ detail::prefer_only_polymorphic_query_result_type<InnerProperty>,
+ detail::prefer_only_property<InnerProperty>
+{
+ static constexpr bool is_requirable = false;
+
+ constexpr prefer_only(const InnerProperty& p)
+ : detail::prefer_only_property<InnerProperty>(p)
+ {
+ }
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, InnerProperty>::result_type
+ static_query()
+ noexcept(traits::static_query<T, InnerProperty>::is_noexcept)
+ {
+ return traits::static_query<T, InnerProperty>::value();
+ }
+
+ template <typename E, typename T = decltype(prefer_only::static_query<E>())>
+ static constexpr const T static_query_v
+ = prefer_only::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ template <typename Executor, typename Property>
+ friend constexpr
+ prefer_result_t<const Executor&, const InnerProperty&>
+ prefer(const Executor& ex, const prefer_only<Property>& p,
+ enable_if_t<
+ is_same<Property, InnerProperty>::value
+ >* = 0,
+ enable_if_t<
+ can_prefer<const Executor&, const InnerProperty&>::value
+ >* = 0)
+#if !defined(ASIO_MSVC) \
+ && !defined(__clang__) // Clang crashes if noexcept is used here.
+ noexcept(is_nothrow_prefer<const Executor&, const InnerProperty&>::value)
+#endif // !defined(ASIO_MSVC)
+ // && !defined(__clang__)
+ {
+ return asio::prefer(ex, p.property);
+ }
+
+ template <typename Executor, typename Property>
+ friend constexpr
+ query_result_t<const Executor&, const InnerProperty&>
+ query(const Executor& ex, const prefer_only<Property>& p,
+ enable_if_t<
+ is_same<Property, InnerProperty>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, const InnerProperty&>::value
+ >* = 0)
+#if !defined(ASIO_MSVC) \
+ && !defined(__clang__) // Clang crashes if noexcept is used here.
+ noexcept(is_nothrow_query<const Executor&, const InnerProperty&>::value)
+#endif // !defined(ASIO_MSVC)
+ // && !defined(__clang__)
+ {
+ return asio::query(ex, p.property);
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <typename InnerProperty> template <typename E, typename T>
+const T prefer_only<InnerProperty>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace execution
+
+template <typename T, typename InnerProperty>
+struct is_applicable_property<T, execution::prefer_only<InnerProperty>>
+ : is_applicable_property<T, InnerProperty>
+{
+};
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T, typename InnerProperty>
+struct static_query<T, execution::prefer_only<InnerProperty>> :
+ static_query<T, const InnerProperty&>
+{
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename T, typename InnerProperty>
+struct prefer_free_default<T, execution::prefer_only<InnerProperty>,
+ enable_if_t<
+ can_prefer<const T&, const InnerProperty&>::value
+ >
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<const T&, const InnerProperty&>::value;
+
+ typedef prefer_result_t<const T&, const InnerProperty&> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T, typename InnerProperty>
+struct query_free<T, execution::prefer_only<InnerProperty>,
+ enable_if_t<
+ can_query<const T&, const InnerProperty&>::value
+ >
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<const T&, const InnerProperty&>::value;
+
+ typedef query_result_t<const T&, const InnerProperty&> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_PREFER_ONLY_HPP
diff --git a/3rdparty/asio/include/asio/execution/relationship.hpp b/3rdparty/asio/include/asio/execution/relationship.hpp
new file mode 100644
index 00000000000..e4f27555e24
--- /dev/null
+++ b/3rdparty/asio/include/asio/execution/relationship.hpp
@@ -0,0 +1,751 @@
+//
+// execution/relationship.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXECUTION_RELATIONSHIP_HPP
+#define ASIO_EXECUTION_RELATIONSHIP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/query.hpp"
+#include "asio/traits/query_free.hpp"
+#include "asio/traits/query_member.hpp"
+#include "asio/traits/query_static_constexpr_member.hpp"
+#include "asio/traits/static_query.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+
+/// A property to describe whether submitted tasks represent continuations of
+/// the calling context.
+struct relationship_t
+{
+ /// The relationship_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The top-level relationship_t property cannot be required.
+ static constexpr bool is_requirable = false;
+
+ /// The top-level relationship_t property cannot be preferred.
+ static constexpr bool is_preferable = false;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef relationship_t polymorphic_query_result_type;
+
+ /// A sub-property that indicates that the executor does not represent a
+ /// continuation of the calling context.
+ struct fork_t
+ {
+ /// The relationship_t::fork_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The relationship_t::fork_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The relationship_t::fork_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef relationship_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr fork_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns fork_t();
+ */
+ static constexpr relationship_t value();
+ };
+
+ /// A sub-property that indicates that the executor represents a continuation
+ /// of the calling context.
+ struct continuation_t
+ {
+ /// The relationship_t::continuation_t property applies to executors.
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
+
+ /// The relationship_t::continuation_t property can be required.
+ static constexpr bool is_requirable = true;
+
+ /// The relationship_t::continuation_t property can be preferred.
+ static constexpr bool is_preferable = true;
+
+ /// The type returned by queries against an @c any_executor.
+ typedef relationship_t polymorphic_query_result_type;
+
+ /// Default constructor.
+ constexpr continuation_t();
+
+ /// Get the value associated with a property object.
+ /**
+ * @returns continuation_t();
+ */
+ static constexpr relationship_t value();
+ };
+
+ /// A special value used for accessing the relationship_t::fork_t property.
+ static constexpr fork_t fork;
+
+ /// A special value used for accessing the relationship_t::continuation_t
+ /// property.
+ static constexpr continuation_t continuation;
+
+ /// Default constructor.
+ constexpr relationship_t();
+
+ /// Construct from a sub-property value.
+ constexpr relationship_t(fork_t);
+
+ /// Construct from a sub-property value.
+ constexpr relationship_t(continuation_t);
+
+ /// Compare property values for equality.
+ friend constexpr bool operator==(
+ const relationship_t& a, const relationship_t& b) noexcept;
+
+ /// Compare property values for inequality.
+ friend constexpr bool operator!=(
+ const relationship_t& a, const relationship_t& b) noexcept;
+};
+
+/// A special value used for accessing the relationship_t property.
+constexpr relationship_t relationship;
+
+} // namespace execution
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace execution {
+namespace detail {
+namespace relationship {
+
+template <int I> struct fork_t;
+template <int I> struct continuation_t;
+
+} // namespace relationship
+
+template <int I = 0>
+struct relationship_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
+ typedef relationship_t polymorphic_query_result_type;
+
+ typedef detail::relationship::fork_t<I> fork_t;
+ typedef detail::relationship::continuation_t<I> continuation_t;
+
+ constexpr relationship_t()
+ : value_(-1)
+ {
+ }
+
+ constexpr relationship_t(fork_t)
+ : value_(0)
+ {
+ }
+
+ constexpr relationship_t(continuation_t)
+ : value_(1)
+ {
+ }
+
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto query(P&& p) const
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct static_proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ static constexpr auto query(P&& p)
+ noexcept(
+ noexcept(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
+ )
+ {
+ return T::query(static_cast<P&&>(p));
+ }
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+ };
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<typename proxy<T>::type, relationship_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename static_proxy<T>::type, relationship_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr
+ typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, fork_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, fork_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, fork_t>::value();
+ }
+
+ template <typename T>
+ static constexpr
+ typename traits::static_query<T, continuation_t>::result_type
+ static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::static_query<T, fork_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ traits::static_query<T, continuation_t>::is_valid
+ >* = 0) noexcept
+ {
+ return traits::static_query<T, continuation_t>::value();
+ }
+
+ template <typename E,
+ typename T = decltype(relationship_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = relationship_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ friend constexpr bool operator==(
+ const relationship_t& a, const relationship_t& b)
+ {
+ return a.value_ == b.value_;
+ }
+
+ friend constexpr bool operator!=(
+ const relationship_t& a, const relationship_t& b)
+ {
+ return a.value_ != b.value_;
+ }
+
+ struct convertible_from_relationship_t
+ {
+ constexpr convertible_from_relationship_t(relationship_t)
+ {
+ }
+ };
+
+ template <typename Executor>
+ friend constexpr relationship_t query(
+ const Executor& ex, convertible_from_relationship_t,
+ enable_if_t<
+ can_query<const Executor&, fork_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&, relationship_t<>::fork_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, fork_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, fork_t());
+ }
+
+ template <typename Executor>
+ friend constexpr relationship_t query(
+ const Executor& ex, convertible_from_relationship_t,
+ enable_if_t<
+ !can_query<const Executor&, fork_t>::value
+ >* = 0,
+ enable_if_t<
+ can_query<const Executor&, continuation_t>::value
+ >* = 0)
+#if !defined(__clang__) // Clang crashes if noexcept is used here.
+#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
+ noexcept(is_nothrow_query<const Executor&,
+ relationship_t<>::continuation_t>::value)
+#else // defined(ASIO_MSVC)
+ noexcept(is_nothrow_query<const Executor&, continuation_t>::value)
+#endif // defined(ASIO_MSVC)
+#endif // !defined(__clang__)
+ {
+ return asio::query(ex, continuation_t());
+ }
+
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(fork_t, fork);
+ ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(continuation_t, continuation);
+
+private:
+ int value_;
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T relationship_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I>
+const typename relationship_t<I>::fork_t relationship_t<I>::fork;
+
+template <int I>
+const typename relationship_t<I>::continuation_t
+relationship_t<I>::continuation;
+
+namespace relationship {
+
+template <int I = 0>
+struct fork_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef relationship_t<I> polymorphic_query_result_type;
+
+ constexpr fork_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename relationship_t<I>::template proxy<T>::type, fork_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename relationship_t<I>::template static_proxy<T>::type, fork_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename T>
+ static constexpr fork_t static_query(
+ enable_if_t<
+ !query_static_constexpr_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !query_member<T>::is_valid
+ >* = 0,
+ enable_if_t<
+ !traits::query_free<T, fork_t>::is_valid
+ >* = 0,
+ enable_if_t<
+ !can_query<T, continuation_t<I>>::value
+ >* = 0) noexcept
+ {
+ return fork_t();
+ }
+
+ template <typename E, typename T = decltype(fork_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = fork_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr relationship_t<I> value()
+ {
+ return fork_t();
+ }
+
+ friend constexpr bool operator==(const fork_t&, const fork_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const fork_t&, const fork_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const fork_t&, const continuation_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const fork_t&, const continuation_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T fork_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <int I = 0>
+struct continuation_t
+{
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+ typedef relationship_t<I> polymorphic_query_result_type;
+
+ constexpr continuation_t()
+ {
+ }
+
+ template <typename T>
+ struct query_member :
+ traits::query_member<
+ typename relationship_t<I>::template proxy<T>::type, continuation_t> {};
+
+ template <typename T>
+ struct query_static_constexpr_member :
+ traits::query_static_constexpr_member<
+ typename relationship_t<I>::template static_proxy<T>::type,
+ continuation_t> {};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+ template <typename T>
+ static constexpr typename query_static_constexpr_member<T>::result_type
+ static_query()
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
+ {
+ return query_static_constexpr_member<T>::value();
+ }
+
+ template <typename E,
+ typename T = decltype(continuation_t::static_query<E>())>
+ static constexpr const T static_query_v
+ = continuation_t::static_query<E>();
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+ static constexpr relationship_t<I> value()
+ {
+ return continuation_t();
+ }
+
+ friend constexpr bool operator==(const continuation_t&, const continuation_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const continuation_t&, const continuation_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const continuation_t&, const fork_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const continuation_t&, const fork_t<I>&)
+ {
+ return true;
+ }
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+template <int I> template <typename E, typename T>
+const T continuation_t<I>::static_query_v;
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace relationship
+} // namespace detail
+
+typedef detail::relationship_t<> relationship_t;
+
+constexpr relationship_t relationship;
+
+} // namespace execution
+
+#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct is_applicable_property<T, execution::relationship_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::relationship_t::fork_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+template <typename T>
+struct is_applicable_property<T, execution::relationship_t::continuation_t>
+ : integral_constant<bool, execution::is_executor<T>::value>
+{
+};
+
+#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T>
+struct query_free_default<T, execution::relationship_t,
+ enable_if_t<
+ can_query<T, execution::relationship_t::fork_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::relationship_t::fork_t>::value;
+
+ typedef execution::relationship_t result_type;
+};
+
+template <typename T>
+struct query_free_default<T, execution::relationship_t,
+ enable_if_t<
+ !can_query<T, execution::relationship_t::fork_t>::value
+ && can_query<T, execution::relationship_t::continuation_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::relationship_t::continuation_t>::value;
+
+ typedef execution::relationship_t result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
+ || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+template <typename T>
+struct static_query<T, execution::relationship_t,
+ enable_if_t<
+ execution::detail::relationship_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::relationship_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::relationship_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::relationship_t,
+ enable_if_t<
+ !execution::detail::relationship_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::relationship_t<0>::
+ query_member<T>::is_valid
+ && traits::static_query<T,
+ execution::relationship_t::fork_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::relationship_t::fork_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T,
+ execution::relationship_t::fork_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::relationship_t,
+ enable_if_t<
+ !execution::detail::relationship_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::relationship_t<0>::
+ query_member<T>::is_valid
+ && !traits::static_query<T,
+ execution::relationship_t::fork_t>::is_valid
+ && traits::static_query<T,
+ execution::relationship_t::continuation_t>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename traits::static_query<T,
+ execution::relationship_t::continuation_t>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return traits::static_query<T,
+ execution::relationship_t::continuation_t>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::relationship_t::fork_t,
+ enable_if_t<
+ execution::detail::relationship::fork_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::relationship::fork_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::relationship::fork_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::relationship_t::fork_t,
+ enable_if_t<
+ !execution::detail::relationship::fork_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ && !execution::detail::relationship::fork_t<0>::
+ query_member<T>::is_valid
+ && !traits::query_free<T,
+ execution::relationship_t::fork_t>::is_valid
+ && !can_query<T, execution::relationship_t::continuation_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::relationship_t::fork_t result_type;
+
+ static constexpr result_type value()
+ {
+ return result_type();
+ }
+};
+
+template <typename T>
+struct static_query<T, execution::relationship_t::continuation_t,
+ enable_if_t<
+ execution::detail::relationship::continuation_t<0>::
+ query_static_constexpr_member<T>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef typename execution::detail::relationship::continuation_t<0>::
+ query_static_constexpr_member<T>::result_type result_type;
+
+ static constexpr result_type value()
+ {
+ return execution::detail::relationship::continuation_t<0>::
+ query_static_constexpr_member<T>::value();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+ // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
+
+} // namespace traits
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXECUTION_RELATIONSHIP_HPP
diff --git a/3rdparty/asio/include/asio/execution_context.hpp b/3rdparty/asio/include/asio/execution_context.hpp
index 0d91195410e..bce8d431607 100644
--- a/3rdparty/asio/include/asio/execution_context.hpp
+++ b/3rdparty/asio/include/asio/execution_context.hpp
@@ -2,7 +2,7 @@
// execution_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,7 +20,6 @@
#include <stdexcept>
#include <typeinfo>
#include "asio/detail/noncopyable.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
@@ -109,13 +108,14 @@ public:
class id;
class service;
-protected:
+public:
/// Constructor.
ASIO_DECL execution_context();
/// Destructor.
ASIO_DECL ~execution_context();
+protected:
/// Shuts down all services in the context.
/**
* This function is implemented as follows:
@@ -223,8 +223,6 @@ public:
template <typename Service>
friend Service& use_service(io_context& ioc);
-#if defined(GENERATING_DOCUMENTATION)
-
/// Creates a service object and adds it to the execution_context.
/**
* This function is used to add a service to the execution_context.
@@ -240,27 +238,6 @@ public:
template <typename Service, typename... Args>
friend Service& make_service(execution_context& e, Args&&... args);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Service, typename... Args>
- friend Service& make_service(execution_context& e,
- ASIO_MOVE_ARG(Args)... args);
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Service>
- friend Service& make_service(execution_context& e);
-
-#define ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
- template <typename Service, ASIO_VARIADIC_TPARAMS(n)> \
- friend Service& make_service(execution_context& e, \
- ASIO_VARIADIC_MOVE_PARAMS(n)); \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_MAKE_SERVICE_DEF)
-#undef ASIO_PRIVATE_MAKE_SERVICE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
/// (Deprecated: Use make_service().) Add a service object to the
/// execution_context.
/**
diff --git a/3rdparty/asio/include/asio/executor.hpp b/3rdparty/asio/include/asio/executor.hpp
index f22b99191f6..c056525460a 100644
--- a/3rdparty/asio/include/asio/executor.hpp
+++ b/3rdparty/asio/include/asio/executor.hpp
@@ -2,7 +2,7 @@
// executor.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,8 +16,13 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+#include <new>
#include <typeinfo>
#include "asio/detail/cstddef.hpp"
+#include "asio/detail/executor_function.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/throw_exception.hpp"
#include "asio/execution_context.hpp"
@@ -32,11 +37,11 @@ class bad_executor
{
public:
/// Constructor.
- ASIO_DECL bad_executor() ASIO_NOEXCEPT;
+ ASIO_DECL bad_executor() noexcept;
/// Obtain message associated with exception.
ASIO_DECL virtual const char* what() const
- ASIO_NOEXCEPT_OR_NOTHROW;
+ noexcept;
};
/// Polymorphic wrapper for executors.
@@ -44,36 +49,53 @@ class executor
{
public:
/// Default constructor.
- executor() ASIO_NOEXCEPT
+ executor() noexcept
: impl_(0)
{
}
/// Construct from nullptr.
- executor(nullptr_t) ASIO_NOEXCEPT
+ executor(nullptr_t) noexcept
: impl_(0)
{
}
/// Copy constructor.
- executor(const executor& other) ASIO_NOEXCEPT
+ executor(const executor& other) noexcept
: impl_(other.clone())
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- executor(executor&& other) ASIO_NOEXCEPT
+ executor(executor&& other) noexcept
: impl_(other.impl_)
{
other.impl_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a polymorphic wrapper for the specified executor.
template <typename Executor>
executor(Executor e);
+ /// Construct a polymorphic executor that points to the same target as
+ /// another polymorphic executor.
+ executor(std::nothrow_t, const executor& other) noexcept
+ : impl_(other.clone())
+ {
+ }
+
+ /// Construct a polymorphic executor that moves the target from another
+ /// polymorphic executor.
+ executor(std::nothrow_t, executor&& other) noexcept
+ : impl_(other.impl_)
+ {
+ other.impl_ = 0;
+ }
+
+ /// Construct a polymorphic wrapper for the specified executor.
+ template <typename Executor>
+ executor(std::nothrow_t, Executor e) noexcept;
+
/// Allocator-aware constructor to create a polymorphic wrapper for the
/// specified executor.
template <typename Executor, typename Allocator>
@@ -86,26 +108,24 @@ public:
}
/// Assignment operator.
- executor& operator=(const executor& other) ASIO_NOEXCEPT
+ executor& operator=(const executor& other) noexcept
{
destroy();
impl_ = other.clone();
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
// Move assignment operator.
- executor& operator=(executor&& other) ASIO_NOEXCEPT
+ executor& operator=(executor&& other) noexcept
{
destroy();
impl_ = other.impl_;
other.impl_ = 0;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assignment operator for nullptr_t.
- executor& operator=(nullptr_t) ASIO_NOEXCEPT
+ executor& operator=(nullptr_t) noexcept
{
destroy();
impl_ = 0;
@@ -115,9 +135,9 @@ public:
/// Assignment operator to create a polymorphic wrapper for the specified
/// executor.
template <typename Executor>
- executor& operator=(ASIO_MOVE_ARG(Executor) e) ASIO_NOEXCEPT
+ executor& operator=(Executor&& e) noexcept
{
- executor tmp(ASIO_MOVE_CAST(Executor)(e));
+ executor tmp(static_cast<Executor&&>(e));
destroy();
impl_ = tmp.impl_;
tmp.impl_ = 0;
@@ -125,19 +145,19 @@ public:
}
/// Obtain the underlying execution context.
- execution_context& context() const ASIO_NOEXCEPT
+ execution_context& context() const noexcept
{
return get_impl()->context();
}
/// Inform the executor that it has some outstanding work to do.
- void on_work_started() const ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
get_impl()->on_work_started();
}
/// Inform the executor that some work is no longer outstanding.
- void on_work_finished() const ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
get_impl()->on_work_finished();
}
@@ -156,7 +176,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ void dispatch(Function&& f, const Allocator& a) const;
/// Request the executor to invoke the given function object.
/**
@@ -172,7 +192,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ void post(Function&& f, const Allocator& a) const;
/// Request the executor to invoke the given function object.
/**
@@ -188,14 +208,14 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ void defer(Function&& f, const Allocator& a) const;
struct unspecified_bool_type_t {};
typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
static void unspecified_bool_true(unspecified_bool_type_t) {}
/// Operator to test if the executor contains a valid target.
- operator unspecified_bool_type() const ASIO_NOEXCEPT
+ operator unspecified_bool_type() const noexcept
{
return impl_ ? &executor::unspecified_bool_true : 0;
}
@@ -206,12 +226,12 @@ public:
* otherwise, <tt>typeid(void)</tt>.
*/
#if !defined(ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
- const std::type_info& target_type() const ASIO_NOEXCEPT
+ const std::type_info& target_type() const noexcept
{
return impl_ ? impl_->target_type() : typeid(void);
}
#else // !defined(ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
- const void* target_type() const ASIO_NOEXCEPT
+ const void* target_type() const noexcept
{
return impl_ ? impl_->target_type() : 0;
}
@@ -223,7 +243,7 @@ public:
* executor target; otherwise, a null pointer.
*/
template <typename Executor>
- Executor* target() ASIO_NOEXCEPT;
+ Executor* target() noexcept;
/// Obtain a pointer to the target executor object.
/**
@@ -231,11 +251,11 @@ public:
* executor target; otherwise, a null pointer.
*/
template <typename Executor>
- const Executor* target() const ASIO_NOEXCEPT;
+ const Executor* target() const noexcept;
/// Compare two executors for equality.
friend bool operator==(const executor& a,
- const executor& b) ASIO_NOEXCEPT
+ const executor& b) noexcept
{
if (a.impl_ == b.impl_)
return true;
@@ -246,14 +266,14 @@ public:
/// Compare two executors for inequality.
friend bool operator!=(const executor& a,
- const executor& b) ASIO_NOEXCEPT
+ const executor& b) noexcept
{
return !(a == b);
}
private:
#if !defined(GENERATING_DOCUMENTATION)
- class function;
+ typedef detail::executor_function function;
template <typename, typename> class impl;
#if !defined(ASIO_NO_TYPEID)
@@ -277,18 +297,18 @@ private:
class impl_base
{
public:
- virtual impl_base* clone() const ASIO_NOEXCEPT = 0;
- virtual void destroy() ASIO_NOEXCEPT = 0;
- virtual execution_context& context() ASIO_NOEXCEPT = 0;
- virtual void on_work_started() ASIO_NOEXCEPT = 0;
- virtual void on_work_finished() ASIO_NOEXCEPT = 0;
- virtual void dispatch(ASIO_MOVE_ARG(function)) = 0;
- virtual void post(ASIO_MOVE_ARG(function)) = 0;
- virtual void defer(ASIO_MOVE_ARG(function)) = 0;
- virtual type_id_result_type target_type() const ASIO_NOEXCEPT = 0;
- virtual void* target() ASIO_NOEXCEPT = 0;
- virtual const void* target() const ASIO_NOEXCEPT = 0;
- virtual bool equals(const impl_base* e) const ASIO_NOEXCEPT = 0;
+ virtual impl_base* clone() const noexcept = 0;
+ virtual void destroy() noexcept = 0;
+ virtual execution_context& context() noexcept = 0;
+ virtual void on_work_started() noexcept = 0;
+ virtual void on_work_finished() noexcept = 0;
+ virtual void dispatch(function&&) = 0;
+ virtual void post(function&&) = 0;
+ virtual void defer(function&&) = 0;
+ virtual type_id_result_type target_type() const noexcept = 0;
+ virtual void* target() noexcept = 0;
+ virtual const void* target() const noexcept = 0;
+ virtual bool equals(const impl_base* e) const noexcept = 0;
protected:
impl_base(bool fast_dispatch) : fast_dispatch_(fast_dispatch) {}
@@ -311,13 +331,13 @@ private:
}
// Helper function to clone another implementation.
- impl_base* clone() const ASIO_NOEXCEPT
+ impl_base* clone() const noexcept
{
return impl_ ? impl_->clone() : 0;
}
// Helper function to destroy an implementation.
- void destroy() ASIO_NOEXCEPT
+ void destroy() noexcept
{
if (impl_)
impl_->destroy();
@@ -338,4 +358,6 @@ ASIO_USES_ALLOCATOR(asio::executor)
# include "asio/impl/executor.ipp"
#endif // defined(ASIO_HEADER_ONLY)
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
#endif // ASIO_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/executor_work_guard.hpp b/3rdparty/asio/include/asio/executor_work_guard.hpp
index a791dcd41f3..72787ccdc83 100644
--- a/3rdparty/asio/include/asio/executor_work_guard.hpp
+++ b/3rdparty/asio/include/asio/executor_work_guard.hpp
@@ -1,8 +1,8 @@
//
// executor_work_guard.hpp
-// ~~~~~~~~~~~~~~~~~
+// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,16 +16,28 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+
#include "asio/associated_executor.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/execution.hpp"
#include "asio/is_executor.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-/// An object of type @c executor_work_guard controls ownership of executor work
-/// within a scope.
+#if !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
+#define ASIO_EXECUTOR_WORK_GUARD_DECL
+
+template <typename Executor, typename = void, typename = void>
+class executor_work_guard;
+
+#endif // !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// An object of type @c executor_work_guard controls ownership of outstanding
+/// executor work within a scope.
template <typename Executor>
class executor_work_guard
{
@@ -37,15 +49,58 @@ public:
/**
* Stores a copy of @c e and calls <tt>on_work_started()</tt> on it.
*/
- explicit executor_work_guard(const executor_type& e) ASIO_NOEXCEPT
+ explicit executor_work_guard(const executor_type& e) noexcept;
+
+ /// Copy constructor.
+ executor_work_guard(const executor_work_guard& other) noexcept;
+
+ /// Move constructor.
+ executor_work_guard(executor_work_guard&& other) noexcept;
+
+ /// Destructor.
+ /**
+ * Unless the object has already been reset, or is in a moved-from state,
+ * calls <tt>on_work_finished()</tt> on the stored executor.
+ */
+ ~executor_work_guard();
+
+ /// Obtain the associated executor.
+ executor_type get_executor() const noexcept;
+
+ /// Whether the executor_work_guard object owns some outstanding work.
+ bool owns_work() const noexcept;
+
+ /// Indicate that the work is no longer outstanding.
+ /**
+ * Unless the object has already been reset, or is in a moved-from state,
+ * calls <tt>on_work_finished()</tt> on the stored executor.
+ */
+ void reset() noexcept;
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+class executor_work_guard<Executor,
+ enable_if_t<
+ is_executor<Executor>::value
+ >>
+{
+public:
+ typedef Executor executor_type;
+
+ explicit executor_work_guard(const executor_type& e) noexcept
: executor_(e),
owns_(true)
{
executor_.on_work_started();
}
- /// Copy constructor.
- executor_work_guard(const executor_work_guard& other) ASIO_NOEXCEPT
+ executor_work_guard(const executor_work_guard& other) noexcept
: executor_(other.executor_),
owns_(other.owns_)
{
@@ -53,45 +108,30 @@ public:
executor_.on_work_started();
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- executor_work_guard(executor_work_guard&& other)
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_)),
+ executor_work_guard(executor_work_guard&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
owns_(other.owns_)
{
other.owns_ = false;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Destructor.
- /**
- * Unless the object has already been reset, or is in a moved-from state,
- * calls <tt>on_work_finished()</tt> on the stored executor.
- */
~executor_work_guard()
{
if (owns_)
executor_.on_work_finished();
}
- /// Obtain the associated executor.
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return executor_;
}
- /// Whether the executor_work_guard object owns some outstanding work.
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return owns_;
}
- /// Indicate that the work is no longer outstanding.
- /*
- * Unless the object has already been reset, or is in a moved-from state,
- * calls <tt>on_work_finished()</tt> on the stored executor.
- */
- void reset() ASIO_NOEXCEPT
+ void reset() noexcept
{
if (owns_)
{
@@ -108,56 +148,209 @@ private:
bool owns_;
};
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+class executor_work_guard<Executor,
+ enable_if_t<
+ !is_executor<Executor>::value
+ >,
+ enable_if_t<
+ execution::is_executor<Executor>::value
+ >>
+{
+public:
+ typedef Executor executor_type;
+
+ explicit executor_work_guard(const executor_type& e) noexcept
+ : executor_(e),
+ owns_(true)
+ {
+ new (&work_) work_type(asio::prefer(executor_,
+ execution::outstanding_work.tracked));
+ }
+
+ executor_work_guard(const executor_work_guard& other) noexcept
+ : executor_(other.executor_),
+ owns_(other.owns_)
+ {
+ if (owns_)
+ {
+ new (&work_) work_type(asio::prefer(executor_,
+ execution::outstanding_work.tracked));
+ }
+ }
+
+ executor_work_guard(executor_work_guard&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
+ owns_(other.owns_)
+ {
+ if (owns_)
+ {
+ new (&work_) work_type(
+ static_cast<work_type&&>(
+ *static_cast<work_type*>(
+ static_cast<void*>(&other.work_))));
+ other.owns_ = false;
+ }
+ }
+
+ ~executor_work_guard()
+ {
+ if (owns_)
+ static_cast<work_type*>(static_cast<void*>(&work_))->~work_type();
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ bool owns_work() const noexcept
+ {
+ return owns_;
+ }
+
+ void reset() noexcept
+ {
+ if (owns_)
+ {
+ static_cast<work_type*>(static_cast<void*>(&work_))->~work_type();
+ owns_ = false;
+ }
+ }
+
+private:
+ // Disallow assignment.
+ executor_work_guard& operator=(const executor_work_guard&);
+
+ typedef decay_t<
+ prefer_result_t<
+ const executor_type&,
+ execution::outstanding_work_t::tracked_t
+ >
+ > work_type;
+
+ executor_type executor_;
+ aligned_storage_t<sizeof(work_type), alignment_of<work_type>::value> work_;
+ bool owns_;
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
/// Create an @ref executor_work_guard object.
+/**
+ * @param ex An executor.
+ *
+ * @returns A work guard constructed with the specified executor.
+ */
template <typename Executor>
-inline executor_work_guard<Executor> make_work_guard(const Executor& ex,
- typename enable_if<is_executor<Executor>::value>::type* = 0)
+ASIO_NODISCARD inline executor_work_guard<Executor>
+make_work_guard(const Executor& ex,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
{
return executor_work_guard<Executor>(ex);
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param ctx An execution context, from which an executor will be obtained.
+ *
+ * @returns A work guard constructed with the execution context's executor,
+ * obtained by performing <tt>ctx.get_executor()</tt>.
+ */
template <typename ExecutionContext>
-inline executor_work_guard<typename ExecutionContext::executor_type>
+ASIO_NODISCARD inline
+executor_work_guard<typename ExecutionContext::executor_type>
make_work_guard(ExecutionContext& ctx,
- typename enable_if<
- is_convertible<ExecutionContext&, execution_context&>::value>::type* = 0)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
{
return executor_work_guard<typename ExecutionContext::executor_type>(
ctx.get_executor());
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param t An arbitrary object, such as a completion handler, for which the
+ * associated executor will be obtained.
+ *
+ * @returns A work guard constructed with the associated executor of the object
+ * @c t, which is obtained as if by calling <tt>get_associated_executor(t)</tt>.
+ */
template <typename T>
-inline executor_work_guard<typename associated_executor<T>::type>
-make_work_guard(const T& t,
- typename enable_if<!is_executor<T>::value &&
- !is_convertible<T&, execution_context&>::value>::type* = 0)
+ASIO_NODISCARD inline
+executor_work_guard<
+ typename constraint_t<
+ !is_executor<T>::value
+ && !execution::is_executor<T>::value
+ && !is_convertible<T&, execution_context&>::value,
+ associated_executor<T>
+ >::type>
+make_work_guard(const T& t)
{
- return executor_work_guard<typename associated_executor<T>::type>(
+ return executor_work_guard<associated_executor_t<T>>(
associated_executor<T>::get(t));
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param t An arbitrary object, such as a completion handler, for which the
+ * associated executor will be obtained.
+ *
+ * @param ex An executor to be used as the candidate object when determining the
+ * associated executor.
+ *
+ * @returns A work guard constructed with the associated executor of the object
+ * @c t, which is obtained as if by calling <tt>get_associated_executor(t,
+ * ex)</tt>.
+ */
template <typename T, typename Executor>
-inline executor_work_guard<typename associated_executor<T, Executor>::type>
+ASIO_NODISCARD inline
+executor_work_guard<associated_executor_t<T, Executor>>
make_work_guard(const T& t, const Executor& ex,
- typename enable_if<is_executor<Executor>::value>::type* = 0)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
{
- return executor_work_guard<typename associated_executor<T, Executor>::type>(
+ return executor_work_guard<associated_executor_t<T, Executor>>(
associated_executor<T, Executor>::get(t, ex));
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param t An arbitrary object, such as a completion handler, for which the
+ * associated executor will be obtained.
+ *
+ * @param ctx An execution context, from which an executor is obtained to use as
+ * the candidate object for determining the associated executor.
+ *
+ * @returns A work guard constructed with the associated executor of the object
+ * @c t, which is obtained as if by calling <tt>get_associated_executor(t,
+ * ctx.get_executor())</tt>.
+ */
template <typename T, typename ExecutionContext>
-inline executor_work_guard<typename associated_executor<T,
- typename ExecutionContext::executor_type>::type>
+ASIO_NODISCARD inline executor_work_guard<
+ associated_executor_t<T, typename ExecutionContext::executor_type>>
make_work_guard(const T& t, ExecutionContext& ctx,
- typename enable_if<!is_executor<T>::value &&
- !is_convertible<T&, execution_context&>::value>::type* = 0)
+ constraint_t<
+ !is_executor<T>::value
+ > = 0,
+ constraint_t<
+ !execution::is_executor<T>::value
+ > = 0,
+ constraint_t<
+ !is_convertible<T&, execution_context&>::value
+ > = 0,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
{
- return executor_work_guard<typename associated_executor<T,
- typename ExecutionContext::executor_type>::type>(
+ return executor_work_guard<
+ associated_executor_t<T, typename ExecutionContext::executor_type>>(
associated_executor<T, typename ExecutionContext::executor_type>::get(
t, ctx.get_executor()));
}
diff --git a/3rdparty/asio/include/asio/experimental/append.hpp b/3rdparty/asio/include/asio/experimental/append.hpp
new file mode 100644
index 00000000000..6a1f280cdd9
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/append.hpp
@@ -0,0 +1,36 @@
+//
+// experimental/append.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_APPEND_HPP
+#define ASIO_EXPERIMENTAL_APPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/append.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::append_t;
+using asio::append;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/experimental/as_single.hpp b/3rdparty/asio/include/asio/experimental/as_single.hpp
new file mode 100644
index 00000000000..6282c14f142
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/as_single.hpp
@@ -0,0 +1,132 @@
+//
+// experimental/as_single.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_AS_SINGLE_HPP
+#define ASIO_EXPERIMENTAL_AS_SINGLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+/// A @ref completion_token adapter used to specify that the completion handler
+/// arguments should be combined into a single argument.
+/**
+ * The as_single_t class is used to indicate that any arguments to the
+ * completion handler should be combined and passed as a single argument.
+ * If there is already one argument, that argument is passed as-is. If
+ * there is more than argument, the arguments are first moved into a
+ * @c std::tuple and that tuple is then passed to the completion handler.
+ */
+template <typename CompletionToken>
+class as_single_t
+{
+public:
+ /// Tag type used to prevent the "default" constructor from being used for
+ /// conversions.
+ struct default_constructor_tag {};
+
+ /// Default constructor.
+ /**
+ * This constructor is only valid if the underlying completion token is
+ * default constructible and move constructible. The underlying completion
+ * token is itself defaulted as an argument to allow it to capture a source
+ * location.
+ */
+ constexpr as_single_t(
+ default_constructor_tag = default_constructor_tag(),
+ CompletionToken token = CompletionToken())
+ : token_(static_cast<CompletionToken&&>(token))
+ {
+ }
+
+ /// Constructor.
+ template <typename T>
+ constexpr explicit as_single_t(
+ T&& completion_token)
+ : token_(static_cast<T&&>(completion_token))
+ {
+ }
+
+ /// Adapts an executor to add the @c as_single_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c as_single_t as the default completion token type.
+ typedef as_single_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ executor_with_default(const InnerExecutor& ex) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+
+ /// Convert the specified executor to the inner executor type, then use
+ /// that to construct the adapted executor.
+ template <typename OtherExecutor>
+ executor_with_default(const OtherExecutor& ex,
+ constraint_t<
+ is_convertible<OtherExecutor, InnerExecutor>::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c as_single_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c as_single_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+//private:
+ CompletionToken token_;
+};
+
+/// Adapt a @ref completion_token to specify that the completion handler
+/// arguments should be combined into a single argument.
+template <typename CompletionToken>
+ASIO_NODISCARD inline
+constexpr as_single_t<decay_t<CompletionToken>>
+as_single(CompletionToken&& completion_token)
+{
+ return as_single_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token));
+}
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/as_single.hpp"
+
+#endif // ASIO_EXPERIMENTAL_AS_SINGLE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/as_tuple.hpp b/3rdparty/asio/include/asio/experimental/as_tuple.hpp
new file mode 100644
index 00000000000..02f23f2909b
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/as_tuple.hpp
@@ -0,0 +1,36 @@
+//
+// experimental/as_tuple.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_AS_TUPLE_HPP
+#define ASIO_EXPERIMENTAL_AS_TUPLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/as_tuple.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::as_tuple_t;
+using asio::as_tuple;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp b/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp
new file mode 100644
index 00000000000..45799daaa5f
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp
@@ -0,0 +1,536 @@
+//
+// experimental/awaitable_operators.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_AWAITABLE_OPERATORS_HPP
+#define ASIO_EXPERIMENTAL_AWAITABLE_OPERATORS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <optional>
+#include <stdexcept>
+#include <tuple>
+#include <variant>
+#include "asio/awaitable.hpp"
+#include "asio/co_spawn.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/experimental/deferred.hpp"
+#include "asio/experimental/parallel_group.hpp"
+#include "asio/multiple_exceptions.hpp"
+#include "asio/this_coro.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace awaitable_operators {
+namespace detail {
+
+template <typename T, typename Executor>
+awaitable<T, Executor> awaitable_wrap(awaitable<T, Executor> a,
+ constraint_t<is_constructible<T>::value>* = 0)
+{
+ return a;
+}
+
+template <typename T, typename Executor>
+awaitable<std::optional<T>, Executor> awaitable_wrap(awaitable<T, Executor> a,
+ constraint_t<!is_constructible<T>::value>* = 0)
+{
+ co_return std::optional<T>(co_await std::move(a));
+}
+
+template <typename T>
+T& awaitable_unwrap(conditional_t<true, T, void>& r,
+ constraint_t<is_constructible<T>::value>* = 0)
+{
+ return r;
+}
+
+template <typename T>
+T& awaitable_unwrap(std::optional<conditional_t<true, T, void>>& r,
+ constraint_t<!is_constructible<T>::value>* = 0)
+{
+ return *r;
+}
+
+} // namespace detail
+
+/// Wait for both operations to succeed.
+/**
+ * If one operations fails, the other is cancelled as the AND-condition can no
+ * longer be satisfied.
+ */
+template <typename Executor>
+awaitable<void, Executor> operator&&(
+ awaitable<void, Executor> t, awaitable<void, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, ex1] =
+ co_await make_parallel_group(
+ co_spawn(ex, std::move(t), deferred),
+ co_spawn(ex, std::move(u), deferred)
+ ).async_wait(
+ wait_for_one_error(),
+ deferred
+ );
+
+ if (ex0 && ex1)
+ throw multiple_exceptions(ex0);
+ if (ex0)
+ std::rethrow_exception(ex0);
+ if (ex1)
+ std::rethrow_exception(ex1);
+ co_return;
+}
+
+/// Wait for both operations to succeed.
+/**
+ * If one operations fails, the other is cancelled as the AND-condition can no
+ * longer be satisfied.
+ */
+template <typename U, typename Executor>
+awaitable<U, Executor> operator&&(
+ awaitable<void, Executor> t, awaitable<U, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, std::move(t), deferred),
+ co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
+ ).async_wait(
+ wait_for_one_error(),
+ deferred
+ );
+
+ if (ex0 && ex1)
+ throw multiple_exceptions(ex0);
+ if (ex0)
+ std::rethrow_exception(ex0);
+ if (ex1)
+ std::rethrow_exception(ex1);
+ co_return std::move(detail::awaitable_unwrap<U>(r1));
+}
+
+/// Wait for both operations to succeed.
+/**
+ * If one operations fails, the other is cancelled as the AND-condition can no
+ * longer be satisfied.
+ */
+template <typename T, typename Executor>
+awaitable<T, Executor> operator&&(
+ awaitable<T, Executor> t, awaitable<void, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, std::move(u), deferred)
+ ).async_wait(
+ wait_for_one_error(),
+ deferred
+ );
+
+ if (ex0 && ex1)
+ throw multiple_exceptions(ex0);
+ if (ex0)
+ std::rethrow_exception(ex0);
+ if (ex1)
+ std::rethrow_exception(ex1);
+ co_return std::move(detail::awaitable_unwrap<T>(r0));
+}
+
+/// Wait for both operations to succeed.
+/**
+ * If one operations fails, the other is cancelled as the AND-condition can no
+ * longer be satisfied.
+ */
+template <typename T, typename U, typename Executor>
+awaitable<std::tuple<T, U>, Executor> operator&&(
+ awaitable<T, Executor> t, awaitable<U, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
+ ).async_wait(
+ wait_for_one_error(),
+ deferred
+ );
+
+ if (ex0 && ex1)
+ throw multiple_exceptions(ex0);
+ if (ex0)
+ std::rethrow_exception(ex0);
+ if (ex1)
+ std::rethrow_exception(ex1);
+ co_return std::make_tuple(
+ std::move(detail::awaitable_unwrap<T>(r0)),
+ std::move(detail::awaitable_unwrap<U>(r1)));
+}
+
+/// Wait for both operations to succeed.
+/**
+ * If one operations fails, the other is cancelled as the AND-condition can no
+ * longer be satisfied.
+ */
+template <typename... T, typename Executor>
+awaitable<std::tuple<T..., std::monostate>, Executor> operator&&(
+ awaitable<std::tuple<T...>, Executor> t, awaitable<void, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, std::move(u), deferred)
+ ).async_wait(
+ wait_for_one_error(),
+ deferred
+ );
+
+ if (ex0 && ex1)
+ throw multiple_exceptions(ex0);
+ if (ex0)
+ std::rethrow_exception(ex0);
+ if (ex1)
+ std::rethrow_exception(ex1);
+ co_return std::move(detail::awaitable_unwrap<std::tuple<T...>>(r0));
+}
+
+/// Wait for both operations to succeed.
+/**
+ * If one operations fails, the other is cancelled as the AND-condition can no
+ * longer be satisfied.
+ */
+template <typename... T, typename U, typename Executor>
+awaitable<std::tuple<T..., U>, Executor> operator&&(
+ awaitable<std::tuple<T...>, Executor> t, awaitable<U, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
+ ).async_wait(
+ wait_for_one_error(),
+ deferred
+ );
+
+ if (ex0 && ex1)
+ throw multiple_exceptions(ex0);
+ if (ex0)
+ std::rethrow_exception(ex0);
+ if (ex1)
+ std::rethrow_exception(ex1);
+ co_return std::tuple_cat(
+ std::move(detail::awaitable_unwrap<std::tuple<T...>>(r0)),
+ std::make_tuple(std::move(detail::awaitable_unwrap<U>(r1))));
+}
+
+/// Wait for one operation to succeed.
+/**
+ * If one operations succeeds, the other is cancelled as the OR-condition is
+ * already satisfied.
+ */
+template <typename Executor>
+awaitable<std::variant<std::monostate, std::monostate>, Executor> operator||(
+ awaitable<void, Executor> t, awaitable<void, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, ex1] =
+ co_await make_parallel_group(
+ co_spawn(ex, std::move(t), deferred),
+ co_spawn(ex, std::move(u), deferred)
+ ).async_wait(
+ wait_for_one_success(),
+ deferred
+ );
+
+ if (order[0] == 0)
+ {
+ if (!ex0)
+ co_return std::variant<std::monostate, std::monostate>{
+ std::in_place_index<0>};
+ if (!ex1)
+ co_return std::variant<std::monostate, std::monostate>{
+ std::in_place_index<1>};
+ throw multiple_exceptions(ex0);
+ }
+ else
+ {
+ if (!ex1)
+ co_return std::variant<std::monostate, std::monostate>{
+ std::in_place_index<1>};
+ if (!ex0)
+ co_return std::variant<std::monostate, std::monostate>{
+ std::in_place_index<0>};
+ throw multiple_exceptions(ex1);
+ }
+}
+
+/// Wait for one operation to succeed.
+/**
+ * If one operations succeeds, the other is cancelled as the OR-condition is
+ * already satisfied.
+ */
+template <typename U, typename Executor>
+awaitable<std::variant<std::monostate, U>, Executor> operator||(
+ awaitable<void, Executor> t, awaitable<U, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, std::move(t), deferred),
+ co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
+ ).async_wait(
+ wait_for_one_success(),
+ deferred
+ );
+
+ if (order[0] == 0)
+ {
+ if (!ex0)
+ co_return std::variant<std::monostate, U>{
+ std::in_place_index<0>};
+ if (!ex1)
+ co_return std::variant<std::monostate, U>{
+ std::in_place_index<1>,
+ std::move(detail::awaitable_unwrap<U>(r1))};
+ throw multiple_exceptions(ex0);
+ }
+ else
+ {
+ if (!ex1)
+ co_return std::variant<std::monostate, U>{
+ std::in_place_index<1>,
+ std::move(detail::awaitable_unwrap<U>(r1))};
+ if (!ex0)
+ co_return std::variant<std::monostate, U>{
+ std::in_place_index<0>};
+ throw multiple_exceptions(ex1);
+ }
+}
+
+/// Wait for one operation to succeed.
+/**
+ * If one operations succeeds, the other is cancelled as the OR-condition is
+ * already satisfied.
+ */
+template <typename T, typename Executor>
+awaitable<std::variant<T, std::monostate>, Executor> operator||(
+ awaitable<T, Executor> t, awaitable<void, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, std::move(u), deferred)
+ ).async_wait(
+ wait_for_one_success(),
+ deferred
+ );
+
+ if (order[0] == 0)
+ {
+ if (!ex0)
+ co_return std::variant<T, std::monostate>{
+ std::in_place_index<0>,
+ std::move(detail::awaitable_unwrap<T>(r0))};
+ if (!ex1)
+ co_return std::variant<T, std::monostate>{
+ std::in_place_index<1>};
+ throw multiple_exceptions(ex0);
+ }
+ else
+ {
+ if (!ex1)
+ co_return std::variant<T, std::monostate>{
+ std::in_place_index<1>};
+ if (!ex0)
+ co_return std::variant<T, std::monostate>{
+ std::in_place_index<0>,
+ std::move(detail::awaitable_unwrap<T>(r0))};
+ throw multiple_exceptions(ex1);
+ }
+}
+
+/// Wait for one operation to succeed.
+/**
+ * If one operations succeeds, the other is cancelled as the OR-condition is
+ * already satisfied.
+ */
+template <typename T, typename U, typename Executor>
+awaitable<std::variant<T, U>, Executor> operator||(
+ awaitable<T, Executor> t, awaitable<U, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
+ ).async_wait(
+ wait_for_one_success(),
+ deferred
+ );
+
+ if (order[0] == 0)
+ {
+ if (!ex0)
+ co_return std::variant<T, U>{
+ std::in_place_index<0>,
+ std::move(detail::awaitable_unwrap<T>(r0))};
+ if (!ex1)
+ co_return std::variant<T, U>{
+ std::in_place_index<1>,
+ std::move(detail::awaitable_unwrap<U>(r1))};
+ throw multiple_exceptions(ex0);
+ }
+ else
+ {
+ if (!ex1)
+ co_return std::variant<T, U>{
+ std::in_place_index<1>,
+ std::move(detail::awaitable_unwrap<U>(r1))};
+ if (!ex0)
+ co_return std::variant<T, U>{
+ std::in_place_index<0>,
+ std::move(detail::awaitable_unwrap<T>(r0))};
+ throw multiple_exceptions(ex1);
+ }
+}
+
+namespace detail {
+
+template <typename... T>
+struct widen_variant
+{
+ template <std::size_t I, typename SourceVariant>
+ static std::variant<T...> call(SourceVariant& source)
+ {
+ if (source.index() == I)
+ return std::variant<T...>{
+ std::in_place_index<I>, std::move(std::get<I>(source))};
+ else if constexpr (I + 1 < std::variant_size_v<SourceVariant>)
+ return call<I + 1>(source);
+ else
+ throw std::logic_error("empty variant");
+ }
+};
+
+} // namespace detail
+
+/// Wait for one operation to succeed.
+/**
+ * If one operations succeeds, the other is cancelled as the OR-condition is
+ * already satisfied.
+ */
+template <typename... T, typename Executor>
+awaitable<std::variant<T..., std::monostate>, Executor> operator||(
+ awaitable<std::variant<T...>, Executor> t, awaitable<void, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, std::move(u), deferred)
+ ).async_wait(
+ wait_for_one_success(),
+ deferred
+ );
+
+ using widen = detail::widen_variant<T..., std::monostate>;
+ if (order[0] == 0)
+ {
+ if (!ex0)
+ co_return widen::template call<0>(
+ detail::awaitable_unwrap<std::variant<T...>>(r0));
+ if (!ex1)
+ co_return std::variant<T..., std::monostate>{
+ std::in_place_index<sizeof...(T)>};
+ throw multiple_exceptions(ex0);
+ }
+ else
+ {
+ if (!ex1)
+ co_return std::variant<T..., std::monostate>{
+ std::in_place_index<sizeof...(T)>};
+ if (!ex0)
+ co_return widen::template call<0>(
+ detail::awaitable_unwrap<std::variant<T...>>(r0));
+ throw multiple_exceptions(ex1);
+ }
+}
+
+/// Wait for one operation to succeed.
+/**
+ * If one operations succeeds, the other is cancelled as the OR-condition is
+ * already satisfied.
+ */
+template <typename... T, typename U, typename Executor>
+awaitable<std::variant<T..., U>, Executor> operator||(
+ awaitable<std::variant<T...>, Executor> t, awaitable<U, Executor> u)
+{
+ auto ex = co_await this_coro::executor;
+
+ auto [order, ex0, r0, ex1, r1] =
+ co_await make_parallel_group(
+ co_spawn(ex, detail::awaitable_wrap(std::move(t)), deferred),
+ co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
+ ).async_wait(
+ wait_for_one_success(),
+ deferred
+ );
+
+ using widen = detail::widen_variant<T..., U>;
+ if (order[0] == 0)
+ {
+ if (!ex0)
+ co_return widen::template call<0>(
+ detail::awaitable_unwrap<std::variant<T...>>(r0));
+ if (!ex1)
+ co_return std::variant<T..., U>{
+ std::in_place_index<sizeof...(T)>,
+ std::move(detail::awaitable_unwrap<U>(r1))};
+ throw multiple_exceptions(ex0);
+ }
+ else
+ {
+ if (!ex1)
+ co_return std::variant<T..., U>{
+ std::in_place_index<sizeof...(T)>,
+ std::move(detail::awaitable_unwrap<U>(r1))};
+ if (!ex0)
+ co_return widen::template call<0>(
+ detail::awaitable_unwrap<std::variant<T...>>(r0));
+ throw multiple_exceptions(ex1);
+ }
+}
+
+} // namespace awaitable_operators
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_AWAITABLE_OPERATORS_HPP
diff --git a/3rdparty/asio/include/asio/experimental/basic_channel.hpp b/3rdparty/asio/include/asio/experimental/basic_channel.hpp
new file mode 100644
index 00000000000..6ca1438a093
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/basic_channel.hpp
@@ -0,0 +1,513 @@
+//
+// experimental/basic_channel.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_BASIC_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_BASIC_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/null_mutex.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/experimental/detail/channel_send_functions.hpp"
+#include "asio/experimental/detail/channel_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+} // namespace detail
+
+/// A channel for messages.
+/**
+ * The basic_channel class template is used for sending messages between
+ * different parts of the same application. A <em>message</em> is defined as a
+ * collection of arguments to be passed to a completion handler, and the set of
+ * messages supported by a channel is specified by its @c Traits and
+ * <tt>Signatures...</tt> template parameters. Messages may be sent and received
+ * using asynchronous or non-blocking synchronous operations.
+ *
+ * Unless customising the traits, applications will typically use the @c
+ * experimental::channel alias template. For example:
+ * @code void send_loop(int i, steady_timer& timer,
+ * channel<void(error_code, int)>& ch)
+ * {
+ * if (i < 10)
+ * {
+ * timer.expires_after(chrono::seconds(1));
+ * timer.async_wait(
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * ch.async_send(error_code(), i,
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * send_loop(i + 1, timer, ch);
+ * }
+ * });
+ * }
+ * });
+ * }
+ * else
+ * {
+ * ch.close();
+ * }
+ * }
+ *
+ * void receive_loop(channel<void(error_code, int)>& ch)
+ * {
+ * ch.async_receive(
+ * [&ch](error_code error, int i)
+ * {
+ * if (!error)
+ * {
+ * std::cout << "Received " << i << "\n";
+ * receive_loop(ch);
+ * }
+ * });
+ * } @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * The basic_channel class template is not thread-safe, and would typically be
+ * used for passing messages between application code that runs on the same
+ * thread or in the same strand. Consider using @ref basic_concurrent_channel,
+ * and its alias template @c experimental::concurrent_channel, to pass messages
+ * between code running in different threads.
+ */
+template <typename Executor, typename Traits, typename... Signatures>
+class basic_channel
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::channel_send_functions<
+ basic_channel<Executor, Traits, Signatures...>,
+ Executor, Signatures...>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+private:
+ class initiate_async_send;
+ class initiate_async_receive;
+ typedef detail::channel_service<asio::detail::null_mutex> service_type;
+ typedef typename service_type::template implementation_type<
+ Traits, Signatures...>::payload_type payload_type;
+
+ template <typename... PayloadSignatures,
+ ASIO_COMPLETION_TOKEN_FOR(PayloadSignatures...) CompletionToken>
+ auto do_async_receive(detail::channel_payload<PayloadSignatures...>*,
+ CompletionToken&& token)
+ -> decltype(
+ async_initiate<CompletionToken, PayloadSignatures...>(
+ declval<initiate_async_receive>(), token))
+ {
+ return async_initiate<CompletionToken, PayloadSignatures...>(
+ initiate_async_receive(this), token);
+ }
+
+public:
+ /// The type of the executor associated with the channel.
+ typedef Executor executor_type;
+
+ /// Rebinds the channel type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The channel type when rebound to the specified executor.
+ typedef basic_channel<Executor1, Traits, Signatures...> other;
+ };
+
+ /// The traits type associated with the channel.
+ typedef typename Traits::template rebind<Signatures...>::other traits_type;
+
+ /// Construct a basic_channel.
+ /**
+ * This constructor creates and channel.
+ *
+ * @param ex The I/O executor that the channel will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ basic_channel(const executor_type& ex, std::size_t max_buffer_size = 0)
+ : service_(&asio::use_service<service_type>(
+ basic_channel::get_context(ex))),
+ impl_(),
+ executor_(ex)
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Construct and open a basic_channel.
+ /**
+ * This constructor creates and opens a channel.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the channel will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ template <typename ExecutionContext>
+ basic_channel(ExecutionContext& context, std::size_t max_buffer_size = 0,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : service_(&asio::use_service<service_type>(context)),
+ impl_(),
+ executor_(context.get_executor())
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Move-construct a basic_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_channel 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_channel(const executor_type&) constructor.
+ */
+ basic_channel(basic_channel&& other)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_channel 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_channel(const executor_type&)
+ * constructor.
+ */
+ basic_channel& operator=(basic_channel&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ // All channels have access to each other's implementations.
+ template <typename, typename, typename...>
+ friend class basic_channel;
+
+ /// Move-construct a basic_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_channel 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_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_channel(
+ basic_channel<Executor1, Traits, Signatures...>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_channel 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_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_channel&
+ > operator=(basic_channel<Executor1, Traits, Signatures...>&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ /// Destructor.
+ ~basic_channel()
+ {
+ service_->destroy(impl_);
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return executor_;
+ }
+
+ /// Get the capacity of the channel's buffer.
+ std::size_t capacity() noexcept
+ {
+ return service_->capacity(impl_);
+ }
+
+ /// Determine whether the channel is open.
+ bool is_open() const noexcept
+ {
+ return service_->is_open(impl_);
+ }
+
+ /// Reset the channel to its initial state.
+ void reset()
+ {
+ service_->reset(impl_);
+ }
+
+ /// Close the channel.
+ void close()
+ {
+ service_->close(impl_);
+ }
+
+ /// Cancel all asynchronous operations waiting on the channel.
+ /**
+ * All outstanding send operations will complete with the error
+ * @c asio::experimental::error::channel_cancelled. Outstanding receive
+ * operations complete with the result as determined by the channel traits.
+ */
+ void cancel()
+ {
+ service_->cancel(impl_);
+ }
+
+ /// Determine whether a message can be received without blocking.
+ bool ready() const noexcept
+ {
+ return service_->ready(impl_);
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+
+ /// Try to send a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send(Args&&... args);
+
+ /// Try to send a message without blocking, using dispatch semantics to call
+ /// the receive operation's completion handler.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * The receive operation's completion handler may be called from inside this
+ * function.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send_via_dispatch(Args&&... args);
+
+ /// Try to send a number of messages without blocking.
+ /**
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n(std::size_t count, Args&&... args);
+
+ /// Try to send a number of messages without blocking, using dispatch
+ /// semantics to call the receive operations' completion handlers.
+ /**
+ * The receive operations' completion handlers may be called from inside this
+ * function.
+ *
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n_via_dispatch(std::size_t count, Args&&... args);
+
+ /// Asynchronously send a message.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ */
+ template <typename... Args,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_send(Args&&... args,
+ CompletionToken&& token);
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Try to receive a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename Handler>
+ bool try_receive(Handler&& handler)
+ {
+ return service_->try_receive(impl_, static_cast<Handler&&>(handler));
+ }
+
+ /// Asynchronously receive a message.
+ /**
+ * @par Completion Signature
+ * As determined by the <tt>Signatures...</tt> template parameter and the
+ * channel traits.
+ */
+ template <typename CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_receive(
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+#if !defined(GENERATING_DOCUMENTATION)
+ -> decltype(
+ this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token)))
+#endif // !defined(GENERATING_DOCUMENTATION)
+ {
+ return this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token));
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_channel(const basic_channel&) = delete;
+ basic_channel& operator=(const basic_channel&) = delete;
+
+ template <typename, typename, typename...>
+ friend class detail::channel_send_functions;
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename SendHandler>
+ void operator()(SendHandler&& handler,
+ payload_type&& payload) const
+ {
+ asio::detail::non_const_lvalue<SendHandler> handler2(handler);
+ self_->service_->async_send(self_->impl_,
+ static_cast<payload_type&&>(payload),
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_channel* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReceiveHandler>
+ void operator()(ReceiveHandler&& handler) const
+ {
+ asio::detail::non_const_lvalue<ReceiveHandler> handler2(handler);
+ self_->service_->async_receive(self_->impl_,
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_channel* self_;
+ };
+
+ // The service associated with the I/O object.
+ service_type* service_;
+
+ // The underlying implementation of the I/O object.
+ typename service_type::template implementation_type<
+ Traits, Signatures...> impl_;
+
+ // The associated executor.
+ Executor executor_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_BASIC_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp b/3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp
new file mode 100644
index 00000000000..9dbfea39527
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp
@@ -0,0 +1,513 @@
+//
+// experimental/basic_concurrent_channel.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_BASIC_CONCURRENT_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_BASIC_CONCURRENT_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/experimental/detail/channel_send_functions.hpp"
+#include "asio/experimental/detail/channel_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+} // namespace detail
+
+/// A channel for messages.
+/**
+ * The basic_concurrent_channel class template is used for sending messages
+ * between different parts of the same application. A <em>message</em> is
+ * defined as a collection of arguments to be passed to a completion handler,
+ * and the set of messages supported by a channel is specified by its @c Traits
+ * and <tt>Signatures...</tt> template parameters. Messages may be sent and
+ * received using asynchronous or non-blocking synchronous operations.
+ *
+ * Unless customising the traits, applications will typically use the @c
+ * experimental::concurrent_channel alias template. For example:
+ * @code void send_loop(int i, steady_timer& timer,
+ * concurrent_channel<void(error_code, int)>& ch)
+ * {
+ * if (i < 10)
+ * {
+ * timer.expires_after(chrono::seconds(1));
+ * timer.async_wait(
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * ch.async_send(error_code(), i,
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * send_loop(i + 1, timer, ch);
+ * }
+ * });
+ * }
+ * });
+ * }
+ * else
+ * {
+ * ch.close();
+ * }
+ * }
+ *
+ * void receive_loop(concurent_channel<void(error_code, int)>& ch)
+ * {
+ * ch.async_receive(
+ * [&ch](error_code error, int i)
+ * {
+ * if (!error)
+ * {
+ * std::cout << "Received " << i << "\n";
+ * receive_loop(ch);
+ * }
+ * });
+ * } @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * The basic_concurrent_channel class template is thread-safe, and would
+ * typically be used for passing messages between application code that run on
+ * different threads. Consider using @ref basic_channel, and its alias template
+ * @c experimental::channel, to pass messages between code running in a single
+ * thread or on the same strand.
+ */
+template <typename Executor, typename Traits, typename... Signatures>
+class basic_concurrent_channel
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::channel_send_functions<
+ basic_concurrent_channel<Executor, Traits, Signatures...>,
+ Executor, Signatures...>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+private:
+ class initiate_async_send;
+ class initiate_async_receive;
+ typedef detail::channel_service<asio::detail::mutex> service_type;
+ typedef typename service_type::template implementation_type<
+ Traits, Signatures...>::payload_type payload_type;
+
+ template <typename... PayloadSignatures,
+ ASIO_COMPLETION_TOKEN_FOR(PayloadSignatures...) CompletionToken>
+ auto do_async_receive(detail::channel_payload<PayloadSignatures...>*,
+ CompletionToken&& token)
+ -> decltype(
+ async_initiate<CompletionToken, PayloadSignatures...>(
+ declval<initiate_async_receive>(), token))
+ {
+ return async_initiate<CompletionToken, PayloadSignatures...>(
+ initiate_async_receive(this), token);
+ }
+
+public:
+ /// The type of the executor associated with the channel.
+ typedef Executor executor_type;
+
+ /// Rebinds the channel type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The channel type when rebound to the specified executor.
+ typedef basic_concurrent_channel<Executor1, Traits, Signatures...> other;
+ };
+
+ /// The traits type associated with the channel.
+ typedef typename Traits::template rebind<Signatures...>::other traits_type;
+
+ /// Construct a basic_concurrent_channel.
+ /**
+ * This constructor creates and channel.
+ *
+ * @param ex The I/O executor that the channel will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ basic_concurrent_channel(const executor_type& ex,
+ std::size_t max_buffer_size = 0)
+ : service_(&asio::use_service<service_type>(
+ basic_concurrent_channel::get_context(ex))),
+ impl_(),
+ executor_(ex)
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Construct and open a basic_concurrent_channel.
+ /**
+ * This constructor creates and opens a channel.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the channel will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ template <typename ExecutionContext>
+ basic_concurrent_channel(ExecutionContext& context,
+ std::size_t max_buffer_size = 0,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : service_(&asio::use_service<service_type>(context)),
+ impl_(),
+ executor_(context.get_executor())
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Move-construct a basic_concurrent_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_concurrent_channel 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_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ basic_concurrent_channel(basic_concurrent_channel&& other)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_concurrent_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_concurrent_channel 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_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ basic_concurrent_channel& operator=(basic_concurrent_channel&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ // All channels have access to each other's implementations.
+ template <typename, typename, typename...>
+ friend class basic_concurrent_channel;
+
+ /// Move-construct a basic_concurrent_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_concurrent_channel 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_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_concurrent_channel(
+ basic_concurrent_channel<Executor1, Traits, Signatures...>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_concurrent_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_concurrent_channel 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_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_concurrent_channel&
+ > operator=(
+ basic_concurrent_channel<Executor1, Traits, Signatures...>&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ /// Destructor.
+ ~basic_concurrent_channel()
+ {
+ service_->destroy(impl_);
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return executor_;
+ }
+
+ /// Get the capacity of the channel's buffer.
+ std::size_t capacity() noexcept
+ {
+ return service_->capacity(impl_);
+ }
+
+ /// Determine whether the channel is open.
+ bool is_open() const noexcept
+ {
+ return service_->is_open(impl_);
+ }
+
+ /// Reset the channel to its initial state.
+ void reset()
+ {
+ service_->reset(impl_);
+ }
+
+ /// Close the channel.
+ void close()
+ {
+ service_->close(impl_);
+ }
+
+ /// Cancel all asynchronous operations waiting on the channel.
+ /**
+ * All outstanding send operations will complete with the error
+ * @c asio::experimental::error::channel_cancelled. Outstanding receive
+ * operations complete with the result as determined by the channel traits.
+ */
+ void cancel()
+ {
+ service_->cancel(impl_);
+ }
+
+ /// Determine whether a message can be received without blocking.
+ bool ready() const noexcept
+ {
+ return service_->ready(impl_);
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+
+ /// Try to send a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send(Args&&... args);
+
+ /// Try to send a message without blocking, using dispatch semantics to call
+ /// the receive operation's completion handler.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * The receive operation's completion handler may be called from inside this
+ * function.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send_via_dispatch(Args&&... args);
+
+ /// Try to send a number of messages without blocking.
+ /**
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n(std::size_t count, Args&&... args);
+
+ /// Try to send a number of messages without blocking, using dispatch
+ /// semantics to call the receive operations' completion handlers.
+ /**
+ * The receive operations' completion handlers may be called from inside this
+ * function.
+ *
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n_via_dispatch(std::size_t count, Args&&... args);
+
+ /// Asynchronously send a message.
+ template <typename... Args,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_send(Args&&... args,
+ CompletionToken&& token);
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Try to receive a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename Handler>
+ bool try_receive(Handler&& handler)
+ {
+ return service_->try_receive(impl_, static_cast<Handler&&>(handler));
+ }
+
+ /// Asynchronously receive a message.
+ template <typename CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_receive(
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+#if !defined(GENERATING_DOCUMENTATION)
+ -> decltype(
+ this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token)))
+#endif // !defined(GENERATING_DOCUMENTATION)
+ {
+ return this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token));
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_concurrent_channel(
+ const basic_concurrent_channel&) = delete;
+ basic_concurrent_channel& operator=(
+ const basic_concurrent_channel&) = delete;
+
+ template <typename, typename, typename...>
+ friend class detail::channel_send_functions;
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_concurrent_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename SendHandler>
+ void operator()(SendHandler&& handler,
+ payload_type&& payload) const
+ {
+ asio::detail::non_const_lvalue<SendHandler> handler2(handler);
+ self_->service_->async_send(self_->impl_,
+ static_cast<payload_type&&>(payload),
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_concurrent_channel* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_concurrent_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReceiveHandler>
+ void operator()(ReceiveHandler&& handler) const
+ {
+ asio::detail::non_const_lvalue<ReceiveHandler> handler2(handler);
+ self_->service_->async_receive(self_->impl_,
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_concurrent_channel* self_;
+ };
+
+ // The service associated with the I/O object.
+ service_type* service_;
+
+ // The underlying implementation of the I/O object.
+ typename service_type::template implementation_type<
+ Traits, Signatures...> impl_;
+
+ // The associated executor.
+ Executor executor_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_BASIC_CONCURRENT_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp b/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp
new file mode 100644
index 00000000000..6b1b46dd759
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp
@@ -0,0 +1,152 @@
+//
+// experimental/cancellation_condition.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_CANCELLATION_CONDITION_HPP
+#define ASIO_EXPERIMENTAL_CANCELLATION_CONDITION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <exception>
+#include "asio/cancellation_type.hpp"
+#include "asio/error_code.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+/// Wait for all operations to complete.
+class wait_for_all
+{
+public:
+ template <typename... Args>
+ constexpr cancellation_type_t operator()(Args&&...) const noexcept
+ {
+ return cancellation_type::none;
+ }
+};
+
+/// Wait until an operation completes, then cancel the others.
+class wait_for_one
+{
+public:
+ constexpr explicit wait_for_one(
+ cancellation_type_t cancel_type = cancellation_type::all)
+ : cancel_type_(cancel_type)
+ {
+ }
+
+ template <typename... Args>
+ constexpr cancellation_type_t operator()(Args&&...) const noexcept
+ {
+ return cancel_type_;
+ }
+
+private:
+ cancellation_type_t cancel_type_;
+};
+
+/// Wait until an operation completes without an error, then cancel the others.
+/**
+ * If no operation completes without an error, waits for completion of all
+ * operations.
+ */
+class wait_for_one_success
+{
+public:
+ constexpr explicit wait_for_one_success(
+ cancellation_type_t cancel_type = cancellation_type::all)
+ : cancel_type_(cancel_type)
+ {
+ }
+
+ constexpr cancellation_type_t
+ operator()() const noexcept
+ {
+ return cancel_type_;
+ }
+
+ template <typename E, typename... Args>
+ constexpr constraint_t<
+ !is_same<decay_t<E>, asio::error_code>::value
+ && !is_same<decay_t<E>, std::exception_ptr>::value,
+ cancellation_type_t
+ > operator()(const E&, Args&&...) const noexcept
+ {
+ return cancel_type_;
+ }
+
+ template <typename E, typename... Args>
+ constexpr constraint_t<
+ is_same<decay_t<E>, asio::error_code>::value
+ || is_same<decay_t<E>, std::exception_ptr>::value,
+ cancellation_type_t
+ > operator()(const E& e, Args&&...) const noexcept
+ {
+ return !!e ? cancellation_type::none : cancel_type_;
+ }
+
+private:
+ cancellation_type_t cancel_type_;
+};
+
+/// Wait until an operation completes with an error, then cancel the others.
+/**
+ * If no operation completes with an error, waits for completion of all
+ * operations.
+ */
+class wait_for_one_error
+{
+public:
+ constexpr explicit wait_for_one_error(
+ cancellation_type_t cancel_type = cancellation_type::all)
+ : cancel_type_(cancel_type)
+ {
+ }
+
+ constexpr cancellation_type_t operator()() const noexcept
+ {
+ return cancellation_type::none;
+ }
+
+ template <typename E, typename... Args>
+ constexpr constraint_t<
+ !is_same<decay_t<E>, asio::error_code>::value
+ && !is_same<decay_t<E>, std::exception_ptr>::value,
+ cancellation_type_t
+ > operator()(const E&, Args&&...) const noexcept
+ {
+ return cancellation_type::none;
+ }
+
+ template <typename E, typename... Args>
+ constexpr constraint_t<
+ is_same<decay_t<E>, asio::error_code>::value
+ || is_same<decay_t<E>, std::exception_ptr>::value,
+ cancellation_type_t
+ > operator()(const E& e, Args&&...) const noexcept
+ {
+ return !!e ? cancel_type_ : cancellation_type::none;
+ }
+
+private:
+ cancellation_type_t cancel_type_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CANCELLATION_CONDITION_HPP
diff --git a/3rdparty/asio/include/asio/experimental/channel.hpp b/3rdparty/asio/include/asio/experimental/channel.hpp
new file mode 100644
index 00000000000..c808bb4aafd
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/channel.hpp
@@ -0,0 +1,70 @@
+//
+// experimental/channel.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/experimental/basic_channel.hpp"
+#include "asio/experimental/channel_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename ExecutorOrSignature, typename = void>
+struct channel_type
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_channel<any_io_executor, channel_traits<>,
+ ExecutorOrSignature, Signatures...> type;
+ };
+};
+
+template <typename ExecutorOrSignature>
+struct channel_type<ExecutorOrSignature,
+ enable_if_t<
+ is_executor<ExecutorOrSignature>::value
+ || execution::is_executor<ExecutorOrSignature>::value
+ >>
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_channel<ExecutorOrSignature,
+ channel_traits<>, Signatures...> type;
+ };
+};
+
+} // namespace detail
+
+/// Template type alias for common use of channel.
+template <typename ExecutorOrSignature, typename... Signatures>
+using channel = typename detail::channel_type<
+ ExecutorOrSignature>::template inner<Signatures...>::type;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/channel_error.hpp b/3rdparty/asio/include/asio/experimental/channel_error.hpp
new file mode 100644
index 00000000000..dd419757cc3
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/channel_error.hpp
@@ -0,0 +1,82 @@
+//
+// experimental/channel_error.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
+#define ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/error_code.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace error {
+
+enum channel_errors
+{
+ /// The channel was closed.
+ channel_closed = 1,
+
+ /// The channel was cancelled.
+ channel_cancelled = 2
+};
+
+extern ASIO_DECL
+const asio::error_category& get_channel_category();
+
+static const asio::error_category&
+ channel_category ASIO_UNUSED_VARIABLE
+ = asio::experimental::error::get_channel_category();
+
+} // namespace error
+namespace channel_errc {
+ // Simulates a scoped enum.
+ using error::channel_closed;
+ using error::channel_cancelled;
+} // namespace channel_errc
+} // namespace experimental
+} // namespace asio
+
+namespace std {
+
+template<> struct is_error_code_enum<
+ asio::experimental::error::channel_errors>
+{
+ static const bool value = true;
+};
+
+} // namespace std
+
+namespace asio {
+namespace experimental {
+namespace error {
+
+inline asio::error_code make_error_code(channel_errors e)
+{
+ return asio::error_code(
+ static_cast<int>(e), get_channel_category());
+}
+
+} // namespace error
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/experimental/impl/channel_error.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
diff --git a/3rdparty/asio/include/asio/experimental/channel_traits.hpp b/3rdparty/asio/include/asio/experimental/channel_traits.hpp
new file mode 100644
index 00000000000..bccff9876e4
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/channel_traits.hpp
@@ -0,0 +1,301 @@
+//
+// experimental/channel_traits.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_CHANNEL_TRAITS_HPP
+#define ASIO_EXPERIMENTAL_CHANNEL_TRAITS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <deque>
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/experimental/channel_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+template <typename... Signatures>
+struct channel_traits
+{
+ /// Rebind the traits to a new set of signatures.
+ /**
+ * This nested structure must have a single nested type @c other that
+ * aliases a traits type with the specified set of signatures.
+ */
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef user_defined other;
+ };
+
+ /// Determine the container for the specified elements.
+ /**
+ * This nested structure must have a single nested type @c other that
+ * aliases a container type for the specified element type.
+ */
+ template <typename Element>
+ struct container
+ {
+ typedef user_defined type;
+ };
+
+ /// The signature of a channel cancellation notification.
+ typedef void receive_cancelled_signature(...);
+
+ /// Invoke the specified handler with a cancellation notification.
+ template <typename F>
+ static void invoke_receive_cancelled(F f);
+
+ /// The signature of a channel closed notification.
+ typedef void receive_closed_signature(...);
+
+ /// Invoke the specified handler with a closed notification.
+ template <typename F>
+ static void invoke_receive_closed(F f);
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+/// Traits used for customising channel behaviour.
+template <typename... Signatures>
+struct channel_traits
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+};
+
+template <typename R>
+struct channel_traits<R(asio::error_code)>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e);
+ }
+
+ typedef R receive_closed_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e);
+ }
+};
+
+template <typename R, typename... Args, typename... Signatures>
+struct channel_traits<R(asio::error_code, Args...), Signatures...>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code, Args...);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e, decay_t<Args>()...);
+ }
+
+ typedef R receive_closed_signature(asio::error_code, Args...);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e, decay_t<Args>()...);
+ }
+};
+
+template <typename R>
+struct channel_traits<R(std::exception_ptr)>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(std::exception_ptr);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)));
+ }
+
+ typedef R receive_closed_signature(std::exception_ptr);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)));
+ }
+};
+
+template <typename R, typename... Args, typename... Signatures>
+struct channel_traits<R(std::exception_ptr, Args...), Signatures...>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(std::exception_ptr, Args...);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)),
+ decay_t<Args>()...);
+ }
+
+ typedef R receive_closed_signature(std::exception_ptr, Args...);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)),
+ decay_t<Args>()...);
+ }
+};
+
+template <typename R>
+struct channel_traits<R()>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e);
+ }
+
+ typedef R receive_closed_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e);
+ }
+};
+
+template <typename R, typename T>
+struct channel_traits<R(T)>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e);
+ }
+
+ typedef R receive_closed_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e);
+ }
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CHANNEL_TRAITS_HPP
diff --git a/3rdparty/asio/include/asio/experimental/co_composed.hpp b/3rdparty/asio/include/asio/experimental/co_composed.hpp
new file mode 100644
index 00000000000..dd1b82939cd
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/co_composed.hpp
@@ -0,0 +1,145 @@
+//
+// experimental/co_composed.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
+#define ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+/// Creates an initiation function object that may be used to launch a
+/// coroutine-based composed asynchronous operation.
+/**
+ * The experimental::co_composed utility simplifies the implementation of
+ * composed asynchronous operations by automatically adapting a coroutine to be
+ * an initiation function object for use with @c async_initiate. When awaiting
+ * asynchronous operations, the coroutine automatically uses a conforming
+ * intermediate completion handler.
+ *
+ * @param implementation A function object that contains the coroutine-based
+ * implementation of the composed asynchronous operation. The first argument to
+ * the function object represents the state of the operation, and may be used
+ * to test for cancellation. The remaining arguments are those passed to @c
+ * async_initiate after the completion token.
+ *
+ * @param io_objects_or_executors Zero or more I/O objects or I/O executors for
+ * which outstanding work must be maintained while the operation is incomplete.
+ *
+ * @par Per-Operation Cancellation
+ * By default, terminal per-operation cancellation is enabled for composed
+ * operations that use experimental::co_composed. To disable cancellation for
+ * the composed operation, or to alter its supported cancellation types, call
+ * the state's @c reset_cancellation_state function.
+ *
+ * @par Examples
+ * The following example illustrates manual error handling and explicit checks
+ * for cancellation. The completion handler is invoked via a @c co_yield to the
+ * state's @c complete function, which never returns.
+ *
+ * @code template <typename CompletionToken>
+ * auto async_echo(tcp::socket& socket,
+ * CompletionToken&& token)
+ * {
+ * return asio::async_initiate<
+ * CompletionToken, void(std::error_code)>(
+ * asio::experimental::co_composed(
+ * [](auto state, tcp::socket& socket) -> void
+ * {
+ * state.reset_cancellation_state(
+ * asio::enable_terminal_cancellation());
+ *
+ * while (!state.cancelled())
+ * {
+ * char data[1024];
+ * auto [e1, n1] =
+ * co_await socket.async_read_some(
+ * asio::buffer(data),
+ * asio::as_tuple(asio::deferred));
+ *
+ * if (e1)
+ * co_yield state.complete(e1);
+ *
+ * if (!!state.cancelled())
+ * co_yield state.complete(
+ * make_error_code(asio::error::operation_aborted));
+ *
+ * auto [e2, n2] =
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n1),
+ * asio::as_tuple(asio::deferred));
+ *
+ * if (e2)
+ * co_yield state.complete(e2);
+ * }
+ * }, socket),
+ * token, std::ref(socket));
+ * } @endcode
+ *
+ * This next example shows exception-based error handling and implicit checks
+ * for cancellation. The completion handler is invoked after returning from the
+ * coroutine via @c co_return. Valid @c co_return values are specified using
+ * completion signatures passed to the @c co_composed function.
+ *
+ * @code template <typename CompletionToken>
+ * auto async_echo(tcp::socket& socket,
+ * CompletionToken&& token)
+ * {
+ * return asio::async_initiate<
+ * CompletionToken, void(std::error_code)>(
+ * asio::experimental::co_composed<
+ * void(std::error_code)>(
+ * [](auto state, tcp::socket& socket) -> void
+ * {
+ * try
+ * {
+ * state.throw_if_cancelled(true);
+ * state.reset_cancellation_state(
+ * asio::enable_terminal_cancellation());
+ *
+ * for (;;)
+ * {
+ * char data[1024];
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::deferred);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::deferred);
+ * }
+ * }
+ * catch (const std::system_error& e)
+ * {
+ * co_return {e.code()};
+ * }
+ * }, socket),
+ * token, std::ref(socket));
+ * } @endcode
+ */
+template <completion_signature... Signatures,
+ typename Implementation, typename... IoObjectsOrExecutors>
+auto co_composed(Implementation&& implementation,
+ IoObjectsOrExecutors&&... io_objects_or_executors);
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/co_composed.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/co_spawn.hpp b/3rdparty/asio/include/asio/experimental/co_spawn.hpp
new file mode 100644
index 00000000000..8ef59283178
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/co_spawn.hpp
@@ -0,0 +1,187 @@
+//
+// experimental/co_spawn.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_CO_SPAWN_HPP
+#define ASIO_EXPERIMENTAL_CO_SPAWN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <utility>
+#include "asio/compose.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/experimental/coro.hpp"
+#include "asio/experimental/deferred.hpp"
+#include "asio/experimental/prepend.hpp"
+#include "asio/redirect_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename T, typename U, typename Executor>
+struct coro_spawn_op
+{
+ coro<T, U, Executor> c;
+
+ void operator()(auto& self)
+ {
+ auto op = c.async_resume(deferred);
+ std::move(op)((prepend)(std::move(self), 0));
+ }
+
+ void operator()(auto& self, int, auto... res)
+ {
+ self.complete(std::move(res)...);
+ }
+};
+
+} // namespace detail
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename T, typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(coro<void, T, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr, T)>(
+ detail::coro_spawn_op<void, T, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename T, typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(coro<void(), T, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr, T)>(
+ detail::coro_spawn_op<void(), T, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename T, typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void(T))
+co_spawn(coro<void() noexcept, T, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(T)>(
+ detail::coro_spawn_op<void() noexcept, T, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(coro<void, void, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr)>(
+ detail::coro_spawn_op<void, void, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(coro<void(), void, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr)>(
+ detail::coro_spawn_op<void(), void, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void())
+co_spawn(coro<void() noexcept, void, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void()>(
+ detail::coro_spawn_op<void() noexcept, void, Executor>{std::move(c)},
+ token, exec);
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif //ASIO_EXPERIMENTAL_CO_SPAWN_HPP
diff --git a/3rdparty/asio/include/asio/experimental/concurrent_channel.hpp b/3rdparty/asio/include/asio/experimental/concurrent_channel.hpp
new file mode 100644
index 00000000000..b326be96d31
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/concurrent_channel.hpp
@@ -0,0 +1,70 @@
+//
+// experimental/concurrent_channel.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_CONCURRENT_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_CONCURRENT_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/experimental/basic_concurrent_channel.hpp"
+#include "asio/experimental/channel_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename ExecutorOrSignature, typename = void>
+struct concurrent_channel_type
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_concurrent_channel<any_io_executor, channel_traits<>,
+ ExecutorOrSignature, Signatures...> type;
+ };
+};
+
+template <typename ExecutorOrSignature>
+struct concurrent_channel_type<ExecutorOrSignature,
+ enable_if_t<
+ is_executor<ExecutorOrSignature>::value
+ || execution::is_executor<ExecutorOrSignature>::value
+ >>
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_concurrent_channel<ExecutorOrSignature,
+ channel_traits<>, Signatures...> type;
+ };
+};
+
+} // namespace detail
+
+/// Template type alias for common use of channel.
+template <typename ExecutorOrSignature, typename... Signatures>
+using concurrent_channel = typename detail::concurrent_channel_type<
+ ExecutorOrSignature>::template inner<Signatures...>::type;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CONCURRENT_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/coro.hpp b/3rdparty/asio/include/asio/experimental/coro.hpp
new file mode 100644
index 00000000000..de909d29a6b
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/coro.hpp
@@ -0,0 +1,293 @@
+//
+// experimental/coro.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_CORO_HPP
+#define ASIO_EXPERIMENTAL_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/dispatch.hpp"
+#include "asio/error.hpp"
+#include "asio/error_code.hpp"
+#include "asio/experimental/coro_traits.hpp"
+#include "asio/experimental/detail/coro_promise_allocator.hpp"
+#include "asio/experimental/detail/partial_promise.hpp"
+#include "asio/post.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Signature, typename Return,
+ typename Executor, typename Allocator>
+struct coro_promise;
+
+template <typename T, typename Coroutine>
+struct coro_with_arg;
+
+} // namespace detail
+
+/// The main type of a resumable coroutine.
+/**
+ * Template parameter @c Yield specifies type or signature used by co_yield,
+ * @c Return specifies the type used for co_return, and @c Executor specifies
+ * the underlying executor type.
+ */
+template <typename Yield = void, typename Return = void,
+ typename Executor = any_io_executor,
+ typename Allocator = std::allocator<void>>
+struct coro
+{
+ /// The traits of the coroutine. See asio::experimental::coro_traits
+ /// for details.
+ using traits = coro_traits<Yield, Return, Executor>;
+
+ /// The value that can be passed into a symmetrical cororoutine. @c void if
+ /// asymmetrical.
+ using input_type = typename traits::input_type;
+
+ /// The type that can be passed out through a co_yield.
+ using yield_type = typename traits::yield_type;
+
+ /// The type that can be passed out through a co_return.
+ using return_type = typename traits::return_type;
+
+ /// The type received by a co_await or async_resume. Its a combination of
+ /// yield and return.
+ using result_type = typename traits::result_type;
+
+ /// The signature used by the async_resume.
+ using signature_type = typename traits::signature_type;
+
+ /// Whether or not the coroutine is noexcept.
+ constexpr static bool is_noexcept = traits::is_noexcept;
+
+ /// The error type of the coroutine. Void for noexcept
+ using error_type = typename traits::error_type;
+
+ /// Completion handler type used by async_resume.
+ using completion_handler = typename traits::completion_handler;
+
+ /// The internal promise-type of the coroutine.
+ using promise_type = detail::coro_promise<Yield, Return, Executor, Allocator>;
+
+#if !defined(GENERATING_DOCUMENTATION)
+ template <typename T, typename Coroutine>
+ friend struct detail::coro_with_arg;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// The executor type.
+ using executor_type = Executor;
+
+ /// The allocator type.
+ using allocator_type = Allocator;
+
+#if !defined(GENERATING_DOCUMENTATION)
+ friend struct detail::coro_promise<Yield, Return, Executor, Allocator>;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// The default constructor, gives an invalid coroutine.
+ coro() = default;
+
+ /// Move constructor.
+ coro(coro&& lhs) noexcept
+ : coro_(std::exchange(lhs.coro_, nullptr))
+ {
+ }
+
+ coro(const coro&) = delete;
+
+ /// Move assignment.
+ coro& operator=(coro&& lhs) noexcept
+ {
+ std::swap(coro_, lhs.coro_);
+ return *this;
+ }
+
+ coro& operator=(const coro&) = delete;
+
+ /// Destructor. Destroys the coroutine, if it holds a valid one.
+ /**
+ * @note This does not cancel an active coroutine. Destructing a resumable
+ * coroutine, i.e. one with a call to async_resume that has not completed, is
+ * undefined behaviour.
+ */
+ ~coro()
+ {
+ if (coro_ != nullptr)
+ {
+ struct destroyer
+ {
+ detail::coroutine_handle<promise_type> handle;
+
+ destroyer(const detail::coroutine_handle<promise_type>& handle)
+ : handle(handle)
+ { }
+
+ destroyer(destroyer&& lhs)
+ : handle(std::exchange(lhs.handle, nullptr))
+ {
+ }
+
+ destroyer(const destroyer&) = delete;
+
+ void operator()() {}
+
+ ~destroyer()
+ {
+ if (handle)
+ handle.destroy();
+ }
+ };
+
+ auto handle =
+ detail::coroutine_handle<promise_type>::from_promise(*coro_);
+ if (handle)
+ asio::dispatch(coro_->get_executor(), destroyer{handle});
+ }
+ }
+
+ /// Get the used executor.
+ executor_type get_executor() const
+ {
+ if (coro_)
+ return coro_->get_executor();
+
+ if constexpr (std::is_default_constructible_v<Executor>)
+ return Executor{};
+ else
+ throw std::logic_error("Coroutine has no executor");
+ }
+
+ /// Get the used allocator.
+ allocator_type get_allocator() const
+ {
+ if (coro_)
+ return coro_->get_allocator();
+
+ if constexpr (std::is_default_constructible_v<Allocator>)
+ return Allocator{};
+ else
+ throw std::logic_error(
+ "Coroutine has no available allocator without a constructed promise");
+ }
+
+ /// Resume the coroutine.
+ /**
+ * @param token The completion token of the async resume.
+ *
+ * @attention Calling an invalid coroutine with a noexcept signature is
+ * undefined behaviour.
+ *
+ * @note This overload is only available for coroutines without an input
+ * value.
+ */
+ template <typename CompletionToken>
+ requires std::is_void_v<input_type>
+ auto async_resume(CompletionToken&& token) &
+ {
+ return async_initiate<CompletionToken,
+ typename traits::completion_handler>(
+ initiate_async_resume(this), token);
+ }
+
+ /// Resume the coroutine.
+ /**
+ * @param token The completion token of the async resume.
+ *
+ * @attention Calling an invalid coroutine with a noexcept signature is
+ * undefined behaviour.
+ *
+ * @note This overload is only available for coroutines with an input value.
+ */
+ template <typename CompletionToken, detail::convertible_to<input_type> T>
+ auto async_resume(T&& ip, CompletionToken&& token) &
+ {
+ return async_initiate<CompletionToken,
+ typename traits::completion_handler>(
+ initiate_async_resume(this), token, std::forward<T>(ip));
+ }
+
+ /// Operator used for coroutines without input value.
+ auto operator co_await() requires (std::is_void_v<input_type>)
+ {
+ return awaitable_t{*this};
+ }
+
+ /// Operator used for coroutines with input value.
+ /**
+ * @param ip The input value
+ *
+ * @returns An awaitable handle.
+ *
+ * @code
+ * coro<void> push_values(coro<double(int)> c)
+ * {
+ * std::optional<double> res = co_await c(42);
+ * }
+ * @endcode
+ */
+ template <detail::convertible_to<input_type> T>
+ auto operator()(T&& ip)
+ {
+ return detail::coro_with_arg<std::decay_t<T>, coro>{
+ std::forward<T>(ip), *this};
+ }
+
+ /// Check whether the coroutine is open, i.e. can be resumed.
+ bool is_open() const
+ {
+ if (coro_)
+ {
+ auto handle =
+ detail::coroutine_handle<promise_type>::from_promise(*coro_);
+ return handle && !handle.done();
+ }
+ else
+ return false;
+ }
+
+ /// Check whether the coroutine is open, i.e. can be resumed.
+ explicit operator bool() const { return is_open(); }
+
+private:
+ struct awaitable_t;
+
+ struct initiate_async_resume;
+
+ explicit coro(promise_type* const cr) : coro_(cr) {}
+
+ promise_type* coro_{nullptr};
+};
+
+/// A generator is a coro that returns void and yields value.
+template<typename T, typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
+using generator = coro<T, void, Executor, Allocator>;
+
+/// A task is a coro that does not yield values
+template<typename T, typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
+using task = coro<void(), T, Executor, Allocator>;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/coro.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/coro_traits.hpp b/3rdparty/asio/include/asio/experimental/coro_traits.hpp
new file mode 100644
index 00000000000..7da904b1273
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/coro_traits.hpp
@@ -0,0 +1,228 @@
+//
+// experimental/detail/coro_traits.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_DETAIL_CORO_TRAITS_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CORO_TRAITS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <optional>
+#include <variant>
+#include "asio/any_io_executor.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <class From, class To>
+concept convertible_to = std::is_convertible_v<From, To>;
+
+template <typename T>
+concept decays_to_executor = execution::executor<std::decay_t<T>>;
+
+template <typename T, typename Executor = any_io_executor>
+concept execution_context = requires (T& t)
+{
+ {t.get_executor()} -> convertible_to<Executor>;
+};
+
+template <typename Yield, typename Return>
+struct coro_result
+{
+ using type = std::variant<Yield, Return>;
+};
+
+template <typename Yield>
+struct coro_result<Yield, void>
+{
+ using type = std::optional<Yield>;
+};
+
+template <typename Return>
+struct coro_result<void, Return>
+{
+ using type = Return;
+};
+
+template <typename YieldReturn>
+struct coro_result<YieldReturn, YieldReturn>
+{
+ using type = YieldReturn;
+};
+
+template <>
+struct coro_result<void, void>
+{
+ using type = void;
+};
+
+template <typename Yield, typename Return>
+using coro_result_t = typename coro_result<Yield, Return>::type;
+
+template <typename Result, bool IsNoexcept>
+struct coro_handler;
+
+template <>
+struct coro_handler<void, false>
+{
+ using type = void(std::exception_ptr);
+};
+
+template <>
+struct coro_handler<void, true>
+{
+ using type = void();
+};
+
+template <typename T>
+struct coro_handler<T, false>
+{
+ using type = void(std::exception_ptr, T);
+};
+
+template <typename T>
+struct coro_handler<T, true>
+{
+ using type = void(T);
+};
+
+template <typename Result, bool IsNoexcept>
+using coro_handler_t = typename coro_handler<Result, IsNoexcept>::type;
+
+} // namespace detail
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// The traits describing the resumable coroutine behaviour.
+/**
+ * Template parameter @c Yield specifies type or signature used by co_yield,
+ * @c Return specifies the type used for co_return, and @c Executor specifies
+ * the underlying executor type.
+ */
+template <typename Yield, typename Return, typename Executor>
+struct coro_traits
+{
+ /// The value that can be passed into a symmetrical cororoutine. @c void if
+ /// asymmetrical.
+ using input_type = argument_dependent;
+
+ /// The type that can be passed out through a co_yield.
+ using yield_type = argument_dependent;
+
+ /// The type that can be passed out through a co_return.
+ using return_type = argument_dependent;
+
+ /// The type received by a co_await or async_resume. It's a combination of
+ /// yield and return.
+ using result_type = argument_dependent;
+
+ /// The signature used by the async_resume.
+ using signature_type = argument_dependent;
+
+ /// Whether or not the coroutine is noexcept.
+ constexpr static bool is_noexcept = argument_dependent;
+
+ /// The error type of the coroutine. @c void for noexcept.
+ using error_type = argument_dependent;
+
+ /// Completion handler type used by async_resume.
+ using completion_handler = argument_dependent;
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+template <typename Yield, typename Return, typename Executor>
+struct coro_traits
+{
+ using input_type = void;
+ using yield_type = Yield;
+ using return_type = Return;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
+ using signature_type = result_type();
+ constexpr static bool is_noexcept = false;
+ using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
+};
+
+template <typename T, typename Return, typename Executor>
+struct coro_traits<T(), Return, Executor>
+{
+ using input_type = void;
+ using yield_type = T;
+ using return_type = Return;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
+ using signature_type = result_type();
+ constexpr static bool is_noexcept = false;
+ using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
+};
+
+template <typename T, typename Return, typename Executor>
+struct coro_traits<T() noexcept, Return, Executor>
+{
+ using input_type = void;
+ using yield_type = T;
+ using return_type = Return;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
+ using signature_type = result_type();
+ constexpr static bool is_noexcept = true;
+ using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
+};
+
+template <typename T, typename U, typename Return, typename Executor>
+struct coro_traits<T(U), Return, Executor>
+{
+ using input_type = U;
+ using yield_type = T;
+ using return_type = Return;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
+ using signature_type = result_type(input_type);
+ constexpr static bool is_noexcept = false;
+ using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
+};
+
+template <typename T, typename U, typename Return, typename Executor>
+struct coro_traits<T(U) noexcept, Return, Executor>
+{
+ using input_type = U;
+ using yield_type = T;
+ using return_type = Return;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
+ using signature_type = result_type(input_type);
+ constexpr static bool is_noexcept = true;
+ using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
+};
+
+template <typename Executor>
+struct coro_traits<void() noexcept, void, Executor>
+{
+ using input_type = void;
+ using yield_type = void;
+ using return_type = void;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
+ using signature_type = result_type(input_type);
+ constexpr static bool is_noexcept = true;
+ using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace experimental
+} // namespace asio
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CORO_TRAITS_HPP
diff --git a/3rdparty/asio/include/asio/experimental/deferred.hpp b/3rdparty/asio/include/asio/experimental/deferred.hpp
new file mode 100644
index 00000000000..c722ad1a2de
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/deferred.hpp
@@ -0,0 +1,36 @@
+//
+// experimental/deferred.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DEFERRED_HPP
+#define ASIO_EXPERIMENTAL_DEFERRED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/deferred.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::deferred_t;
+using asio::deferred;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp
new file mode 100644
index 00000000000..0152c2e76ff
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp
@@ -0,0 +1,77 @@
+//
+// experimental/detail/channel_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/experimental/detail/channel_payload.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Payload, typename Handler>
+class channel_handler
+{
+public:
+ channel_handler(Payload&& p, Handler& h)
+ : payload_(static_cast<Payload&&>(p)),
+ handler_(static_cast<Handler&&>(h))
+ {
+ }
+
+ void operator()()
+ {
+ payload_.receive(handler_);
+ }
+
+//private:
+ Payload payload_;
+ Handler handler_;
+};
+
+} // namespace detail
+} // namespace experimental
+
+template <template <typename, typename> class Associator,
+ typename Payload, typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ experimental::detail::channel_handler<Payload, Handler>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::channel_handler<Payload, Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const experimental::detail::channel_handler<Payload, Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_message.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_message.hpp
new file mode 100644
index 00000000000..16446f0c1bb
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_message.hpp
@@ -0,0 +1,129 @@
+//
+// experimental/detail/channel_message.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Signature>
+class channel_message;
+
+template <typename R>
+class channel_message<R()>
+{
+public:
+ channel_message(int)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)();
+ }
+};
+
+template <typename R, typename Arg0>
+class channel_message<R(Arg0)>
+{
+public:
+ template <typename T0>
+ channel_message(int, T0&& t0)
+ : arg0_(static_cast<T0&&>(t0))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)(
+ static_cast<arg0_type&&>(arg0_));
+ }
+
+private:
+ typedef decay_t<Arg0> arg0_type;
+ arg0_type arg0_;
+};
+
+template <typename R, typename Arg0, typename Arg1>
+class channel_message<R(Arg0, Arg1)>
+{
+public:
+ template <typename T0, typename T1>
+ channel_message(int, T0&& t0, T1&& t1)
+ : arg0_(static_cast<T0&&>(t0)),
+ arg1_(static_cast<T1&&>(t1))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)(
+ static_cast<arg0_type&&>(arg0_),
+ static_cast<arg1_type&&>(arg1_));
+ }
+
+private:
+ typedef decay_t<Arg0> arg0_type;
+ arg0_type arg0_;
+ typedef decay_t<Arg1> arg1_type;
+ arg1_type arg1_;
+};
+
+template <typename R, typename... Args>
+class channel_message<R(Args...)>
+{
+public:
+ template <typename... T>
+ channel_message(int, T&&... t)
+ : args_(static_cast<T&&>(t)...)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& h)
+ {
+ this->do_receive(h, asio::detail::index_sequence_for<Args...>());
+ }
+
+private:
+ template <typename Handler, std::size_t... I>
+ void do_receive(Handler& h, asio::detail::index_sequence<I...>)
+ {
+ static_cast<Handler&&>(h)(
+ std::get<I>(static_cast<args_type&&>(args_))...);
+ }
+
+ typedef std::tuple<decay_t<Args>...> args_type;
+ args_type args_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp
new file mode 100644
index 00000000000..1231f1f87c1
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp
@@ -0,0 +1,361 @@
+//
+// experimental/detail/channel_operation.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_OPERATION_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_OPERATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/detail/initiate_post.hpp"
+#include "asio/detail/initiate_dispatch.hpp"
+#include "asio/detail/op_queue.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/executor_work_guard.hpp"
+#include "asio/prefer.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+// Base class for all channel operations. A function pointer is used instead of
+// virtual functions to avoid the associated overhead.
+class channel_operation ASIO_INHERIT_TRACKED_HANDLER
+{
+public:
+ template <typename Executor, typename = void, typename = void>
+ class handler_work_base;
+
+ template <typename Handler, typename IoExecutor, typename = void>
+ class handler_work;
+
+ void destroy()
+ {
+ func_(this, destroy_op, 0);
+ }
+
+protected:
+ enum action
+ {
+ destroy_op = 0,
+ immediate_op = 1,
+ post_op = 2,
+ dispatch_op = 3,
+ cancel_op = 4,
+ close_op = 5
+ };
+
+ typedef void (*func_type)(channel_operation*, action, void*);
+
+ channel_operation(func_type func)
+ : next_(0),
+ func_(func),
+ cancellation_key_(0)
+ {
+ }
+
+ // Prevents deletion through this type.
+ ~channel_operation()
+ {
+ }
+
+ friend class asio::detail::op_queue_access;
+ channel_operation* next_;
+ func_type func_;
+
+public:
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+};
+
+template <typename Executor, typename, typename>
+class channel_operation::handler_work_base
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ handler_work_base(int, const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ template <typename IoExecutor, typename Function, typename Handler>
+ void post(const IoExecutor& io_exec, Function& function, Handler&)
+ {
+ (asio::detail::initiate_post_with_executor<IoExecutor>(io_exec))(
+ static_cast<Function&&>(function));
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ asio::prefer(executor_,
+ execution::allocator(allocator)
+ ).execute(static_cast<Function&&>(function));
+ }
+
+private:
+ executor_type executor_;
+};
+
+template <typename Executor>
+class channel_operation::handler_work_base<Executor,
+ enable_if_t<
+ execution::is_executor<Executor>::value
+ >,
+ enable_if_t<
+ can_require<Executor, execution::blocking_t::never_t>::value
+ >
+ >
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ handler_work_base(int, const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ template <typename IoExecutor, typename Function, typename Handler>
+ void post(const IoExecutor&, Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ asio::prefer(
+ asio::require(executor_, execution::blocking.never),
+ execution::allocator(allocator)
+ ).execute(static_cast<Function&&>(function));
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ asio::prefer(executor_,
+ execution::allocator(allocator)
+ ).execute(static_cast<Function&&>(function));
+ }
+
+private:
+ executor_type executor_;
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+class channel_operation::handler_work_base<Executor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ >
+ >
+{
+public:
+ typedef Executor executor_type;
+
+ handler_work_base(int, const Executor& ex)
+ : work_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return work_.get_executor();
+ }
+
+ template <typename IoExecutor, typename Function, typename Handler>
+ void post(const IoExecutor&, Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ work_.get_executor().post(
+ static_cast<Function&&>(function), allocator);
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ work_.get_executor().dispatch(
+ static_cast<Function&&>(function), allocator);
+ }
+
+private:
+ executor_work_guard<Executor> work_;
+};
+
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Handler, typename IoExecutor, typename>
+class channel_operation::handler_work :
+ channel_operation::handler_work_base<IoExecutor>,
+ channel_operation::handler_work_base<
+ associated_executor_t<Handler, IoExecutor>, IoExecutor>
+{
+public:
+ typedef channel_operation::handler_work_base<IoExecutor> base1_type;
+
+ typedef channel_operation::handler_work_base<
+ associated_executor_t<Handler, IoExecutor>, IoExecutor>
+ base2_type;
+
+ handler_work(Handler& handler, const IoExecutor& io_ex) noexcept
+ : base1_type(0, io_ex),
+ base2_type(0, (get_associated_executor)(handler, io_ex))
+ {
+ }
+
+ template <typename Function>
+ void post(Function& function, Handler& handler)
+ {
+ base2_type::post(base1_type::get_executor(), function, handler);
+ }
+
+ template <typename Function>
+ void dispatch(Function& function, Handler& handler)
+ {
+ base2_type::dispatch(function, handler);
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler& handler, ...)
+ {
+ typedef associated_immediate_executor_t<Handler,
+ typename base1_type::executor_type> immediate_ex_type;
+
+ immediate_ex_type immediate_ex = (get_associated_immediate_executor)(
+ handler, base1_type::get_executor());
+
+ (asio::detail::initiate_dispatch_with_executor<immediate_ex_type>(
+ immediate_ex))(static_cast<Function&&>(function));
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler&,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ conditional_t<false, Function, Handler>,
+ typename base1_type::executor_type>::
+ asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ (asio::detail::initiate_post_with_executor<
+ typename base1_type::executor_type>(
+ base1_type::get_executor()))(
+ static_cast<Function&&>(function));
+ }
+};
+
+template <typename Handler, typename IoExecutor>
+class channel_operation::handler_work<
+ Handler, IoExecutor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ IoExecutor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >
+ > : handler_work_base<IoExecutor>
+{
+public:
+ typedef channel_operation::handler_work_base<IoExecutor> base1_type;
+
+ handler_work(Handler&, const IoExecutor& io_ex) noexcept
+ : base1_type(0, io_ex)
+ {
+ }
+
+ template <typename Function>
+ void post(Function& function, Handler& handler)
+ {
+ base1_type::post(base1_type::get_executor(), function, handler);
+ }
+
+ template <typename Function>
+ void dispatch(Function& function, Handler& handler)
+ {
+ base1_type::dispatch(function, handler);
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler& handler, ...)
+ {
+ typedef associated_immediate_executor_t<Handler,
+ typename base1_type::executor_type> immediate_ex_type;
+
+ immediate_ex_type immediate_ex = (get_associated_immediate_executor)(
+ handler, base1_type::get_executor());
+
+ (asio::detail::initiate_dispatch_with_executor<immediate_ex_type>(
+ immediate_ex))(static_cast<Function&&>(function));
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler& handler,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ conditional_t<false, Function, Handler>,
+ typename base1_type::executor_type>::
+ asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ base1_type::post(base1_type::get_executor(), function, handler);
+ }
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_OPERATION_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp
new file mode 100644
index 00000000000..31614cd5dbc
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp
@@ -0,0 +1,222 @@
+//
+// experimental/detail/channel_payload.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error_code.hpp"
+#include "asio/experimental/detail/channel_message.hpp"
+
+#if defined(ASIO_HAS_STD_VARIANT)
+# include <variant>
+#else // defined(ASIO_HAS_STD_VARIANT)
+# include <new>
+#endif // defined(ASIO_HAS_STD_VARIANT)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename... Signatures>
+class channel_payload;
+
+template <typename R>
+class channel_payload<R()>
+{
+public:
+ explicit channel_payload(channel_message<R()>)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)();
+ }
+};
+
+template <typename Signature>
+class channel_payload<Signature>
+{
+public:
+ channel_payload(channel_message<Signature>&& m)
+ : message_(static_cast<channel_message<Signature>&&>(m))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ message_.receive(handler);
+ }
+
+private:
+ channel_message<Signature> message_;
+};
+
+#if defined(ASIO_HAS_STD_VARIANT)
+
+template <typename... Signatures>
+class channel_payload
+{
+public:
+ template <typename Signature>
+ channel_payload(channel_message<Signature>&& m)
+ : message_(static_cast<channel_message<Signature>&&>(m))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ std::visit(
+ [&](auto& message)
+ {
+ message.receive(handler);
+ }, message_);
+ }
+
+private:
+ std::variant<channel_message<Signatures>...> message_;
+};
+
+#else // defined(ASIO_HAS_STD_VARIANT)
+
+template <typename R1, typename R2>
+class channel_payload<R1(), R2(asio::error_code)>
+{
+public:
+ typedef channel_message<R1()> void_message_type;
+ typedef channel_message<R2(asio::error_code)> error_message_type;
+
+ channel_payload(void_message_type&&)
+ : message_(0, asio::error_code()),
+ empty_(true)
+ {
+ }
+
+ channel_payload(error_message_type&& m)
+ : message_(static_cast<error_message_type&&>(m)),
+ empty_(false)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ if (empty_)
+ channel_message<R1()>(0).receive(handler);
+ else
+ message_.receive(handler);
+ }
+
+private:
+ error_message_type message_;
+ bool empty_;
+};
+
+template <typename Sig1, typename Sig2>
+class channel_payload<Sig1, Sig2>
+{
+public:
+ typedef channel_message<Sig1> message_1_type;
+ typedef channel_message<Sig2> message_2_type;
+
+ channel_payload(message_1_type&& m)
+ : index_(1)
+ {
+ new (&storage_.message_1_) message_1_type(static_cast<message_1_type&&>(m));
+ }
+
+ channel_payload(message_2_type&& m)
+ : index_(2)
+ {
+ new (&storage_.message_2_) message_2_type(static_cast<message_2_type&&>(m));
+ }
+
+ channel_payload(channel_payload&& other)
+ : index_(other.index_)
+ {
+ switch (index_)
+ {
+ case 1:
+ new (&storage_.message_1_) message_1_type(
+ static_cast<message_1_type&&>(other.storage_.message_1_));
+ break;
+ case 2:
+ new (&storage_.message_2_) message_2_type(
+ static_cast<message_2_type&&>(other.storage_.message_2_));
+ break;
+ default:
+ break;
+ }
+ }
+
+ ~channel_payload()
+ {
+ switch (index_)
+ {
+ case 1:
+ storage_.message_1_.~message_1_type();
+ break;
+ case 2:
+ storage_.message_2_.~message_2_type();
+ break;
+ default:
+ break;
+ }
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ switch (index_)
+ {
+ case 1:
+ storage_.message_1_.receive(handler);
+ break;
+ case 2:
+ storage_.message_2_.receive(handler);
+ break;
+ default:
+ break;
+ }
+ }
+
+private:
+ union storage
+ {
+ storage() {}
+ ~storage() {}
+
+ char dummy_;
+ message_1_type message_1_;
+ message_2_type message_2_;
+ } storage_;
+ unsigned char index_;
+};
+
+#endif // defined(ASIO_HAS_STD_VARIANT)
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp
new file mode 100644
index 00000000000..89d8ac2a5ab
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp
@@ -0,0 +1,127 @@
+//
+// experimental/detail/channel_receive_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_RECEIVE_OP_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_RECEIVE_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/error.hpp"
+#include "asio/experimental/detail/channel_handler.hpp"
+#include "asio/experimental/detail/channel_operation.hpp"
+#include "asio/experimental/detail/channel_payload.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Payload>
+class channel_receive : public channel_operation
+{
+public:
+ void immediate(Payload payload)
+ {
+ func_(this, immediate_op, &payload);
+ }
+
+ void post(Payload payload)
+ {
+ func_(this, post_op, &payload);
+ }
+
+ void dispatch(Payload payload)
+ {
+ func_(this, dispatch_op, &payload);
+ }
+
+protected:
+ channel_receive(func_type func)
+ : channel_operation(func)
+ {
+ }
+};
+
+template <typename Payload, typename Handler, typename IoExecutor>
+class channel_receive_op : public channel_receive<Payload>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(channel_receive_op);
+
+ template <typename... Args>
+ channel_receive_op(Handler& handler, const IoExecutor& io_ex)
+ : channel_receive<Payload>(&channel_receive_op::do_action),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_action(channel_operation* base,
+ channel_operation::action a, void* v)
+ {
+ // Take ownership of the operation object.
+ channel_receive_op* o(static_cast<channel_receive_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ channel_operation::handler_work<Handler, IoExecutor> w(
+ static_cast<channel_operation::handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the handler is posted. Even if we're not about to post the handler, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ if (a != channel_operation::destroy_op)
+ {
+ Payload* payload = static_cast<Payload*>(v);
+ channel_handler<Payload, Handler> handler(
+ static_cast<Payload&&>(*payload), o->handler_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+ ASIO_HANDLER_INVOCATION_BEGIN(());
+ if (a == channel_operation::immediate_op)
+ w.immediate(handler, handler.handler_, 0);
+ else if (a == channel_operation::dispatch_op)
+ w.dispatch(handler, handler.handler_);
+ else
+ w.post(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ else
+ {
+ asio::detail::binder0<Handler> handler(o->handler_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+ }
+ }
+
+private:
+ Handler handler_;
+ channel_operation::handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_RECEIVE_OP_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp
new file mode 100644
index 00000000000..108dffec934
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp
@@ -0,0 +1,192 @@
+//
+// experimental/detail/channel_send_functions.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_FUNCTIONS_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_FUNCTIONS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error_code.hpp"
+#include "asio/experimental/detail/channel_message.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Derived, typename Executor, typename... Signatures>
+class channel_send_functions;
+
+template <typename Derived, typename Executor, typename R, typename... Args>
+class channel_send_functions<Derived, Executor, R(Args...)>
+{
+public:
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send(Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send<message_type>(
+ self->impl_, false, static_cast<Args2&&>(args)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send_via_dispatch(Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send<message_type>(
+ self->impl_, true, static_cast<Args2&&>(args)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ std::size_t
+ > try_send_n(std::size_t count, Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send_n<message_type>(
+ self->impl_, count, false, static_cast<Args2&&>(args)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ std::size_t
+ > try_send_n_via_dispatch(std::size_t count, Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send_n<message_type>(
+ self->impl_, count, true, static_cast<Args2&&>(args)...);
+ }
+
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+ auto async_send(Args... args,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+ -> decltype(
+ async_initiate<CompletionToken, void (asio::error_code)>(
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::initiate_async_send>(), token,
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::payload_type>()))
+ {
+ typedef typename Derived::payload_type payload_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return async_initiate<CompletionToken, void (asio::error_code)>(
+ typename Derived::initiate_async_send(self), token,
+ payload_type(message_type(0, static_cast<Args&&>(args)...)));
+ }
+};
+
+template <typename Derived, typename Executor,
+ typename R, typename... Args, typename... Signatures>
+class channel_send_functions<Derived, Executor, R(Args...), Signatures...> :
+ public channel_send_functions<Derived, Executor, Signatures...>
+{
+public:
+ using channel_send_functions<Derived, Executor, Signatures...>::try_send;
+ using channel_send_functions<Derived, Executor, Signatures...>::async_send;
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send(Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send<message_type>(
+ self->impl_, false, static_cast<Args2&&>(args)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send_via_dispatch(Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send<message_type>(
+ self->impl_, true, static_cast<Args2&&>(args)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ std::size_t
+ > try_send_n(std::size_t count, Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send_n<message_type>(
+ self->impl_, count, false, static_cast<Args2&&>(args)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ std::size_t
+ > try_send_n_via_dispatch(std::size_t count, Args2&&... args)
+ {
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return self->service_->template try_send_n<message_type>(
+ self->impl_, count, true, static_cast<Args2&&>(args)...);
+ }
+
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+ auto async_send(Args... args,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+ -> decltype(
+ async_initiate<CompletionToken, void (asio::error_code)>(
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::initiate_async_send>(), token,
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::payload_type>()))
+ {
+ typedef typename Derived::payload_type payload_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return async_initiate<CompletionToken, void (asio::error_code)>(
+ typename Derived::initiate_async_send(self), token,
+ payload_type(message_type(0, static_cast<Args&&>(args)...)));
+ }
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_FUNCTIONS_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp
new file mode 100644
index 00000000000..4326c23253e
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp
@@ -0,0 +1,148 @@
+//
+// experimental/detail/channel_send_op.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_OP_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/error.hpp"
+#include "asio/experimental/channel_error.hpp"
+#include "asio/experimental/detail/channel_operation.hpp"
+#include "asio/experimental/detail/channel_payload.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Payload>
+class channel_send : public channel_operation
+{
+public:
+ Payload get_payload()
+ {
+ return static_cast<Payload&&>(payload_);
+ }
+
+ void immediate()
+ {
+ func_(this, immediate_op, 0);
+ }
+
+ void post()
+ {
+ func_(this, post_op, 0);
+ }
+
+ void cancel()
+ {
+ func_(this, cancel_op, 0);
+ }
+
+ void close()
+ {
+ func_(this, close_op, 0);
+ }
+
+protected:
+ channel_send(func_type func, Payload&& payload)
+ : channel_operation(func),
+ payload_(static_cast<Payload&&>(payload))
+ {
+ }
+
+private:
+ Payload payload_;
+};
+
+template <typename Payload, typename Handler, typename IoExecutor>
+class channel_send_op : public channel_send<Payload>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(channel_send_op);
+
+ channel_send_op(Payload&& payload,
+ Handler& handler, const IoExecutor& io_ex)
+ : channel_send<Payload>(&channel_send_op::do_action,
+ static_cast<Payload&&>(payload)),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_action(channel_operation* base,
+ channel_operation::action a, void*)
+ {
+ // Take ownership of the operation object.
+ channel_send_op* o(static_cast<channel_send_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ channel_operation::handler_work<Handler, IoExecutor> w(
+ static_cast<channel_operation::handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ asio::error_code ec;
+ switch (a)
+ {
+ case channel_operation::cancel_op:
+ ec = error::channel_cancelled;
+ break;
+ case channel_operation::close_op:
+ ec = error::channel_closed;
+ break;
+ default:
+ break;
+ }
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the handler is posted. Even if we're not about to post the handler, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ asio::detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, ec);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Post the completion if required.
+ if (a != channel_operation::destroy_op)
+ {
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ if (a == channel_operation::immediate_op)
+ w.immediate(handler, handler.handler_, 0);
+ else
+ w.post(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ channel_operation::handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_OP_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_service.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_service.hpp
new file mode 100644
index 00000000000..12324414613
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_service.hpp
@@ -0,0 +1,677 @@
+//
+// experimental/detail/channel_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SERVICE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/detail/op_queue.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/experimental/detail/channel_message.hpp"
+#include "asio/experimental/detail/channel_receive_op.hpp"
+#include "asio/experimental/detail/channel_send_op.hpp"
+#include "asio/experimental/detail/has_signature.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Mutex>
+class channel_service
+ : public asio::detail::execution_context_service_base<
+ channel_service<Mutex>>
+{
+public:
+ // Possible states for a channel end.
+ enum state
+ {
+ buffer = 0,
+ waiter = 1,
+ block = 2,
+ closed = 3
+ };
+
+ // The base implementation type of all channels.
+ struct base_implementation_type
+ {
+ // Default constructor.
+ base_implementation_type()
+ : receive_state_(block),
+ send_state_(block),
+ max_buffer_size_(0),
+ next_(0),
+ prev_(0)
+ {
+ }
+
+ // The current state of the channel.
+ state receive_state_ : 16;
+ state send_state_ : 16;
+
+ // The maximum number of elements that may be buffered in the channel.
+ std::size_t max_buffer_size_;
+
+ // The operations that are waiting on the channel.
+ asio::detail::op_queue<channel_operation> waiters_;
+
+ // Pointers to adjacent channel implementations in linked list.
+ base_implementation_type* next_;
+ base_implementation_type* prev_;
+
+ // The mutex type to protect the internal implementation.
+ mutable Mutex mutex_;
+ };
+
+ // The implementation for a specific value type.
+ template <typename Traits, typename... Signatures>
+ struct implementation_type;
+
+ // Constructor.
+ channel_service(asio::execution_context& ctx);
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown();
+
+ // Construct a new channel implementation.
+ void construct(base_implementation_type& impl, std::size_t max_buffer_size);
+
+ // Destroy a channel implementation.
+ template <typename Traits, typename... Signatures>
+ void destroy(implementation_type<Traits, Signatures...>& impl);
+
+ // Move-construct a new channel implementation.
+ template <typename Traits, typename... Signatures>
+ void move_construct(implementation_type<Traits, Signatures...>& impl,
+ implementation_type<Traits, Signatures...>& other_impl);
+
+ // Move-assign from another channel implementation.
+ template <typename Traits, typename... Signatures>
+ void move_assign(implementation_type<Traits, Signatures...>& impl,
+ channel_service& other_service,
+ implementation_type<Traits, Signatures...>& other_impl);
+
+ // Get the capacity of the channel.
+ std::size_t capacity(
+ const base_implementation_type& impl) const noexcept;
+
+ // Determine whether the channel is open.
+ bool is_open(const base_implementation_type& impl) const noexcept;
+
+ // Reset the channel to its initial state.
+ template <typename Traits, typename... Signatures>
+ void reset(implementation_type<Traits, Signatures...>& impl);
+
+ // Close the channel.
+ template <typename Traits, typename... Signatures>
+ void close(implementation_type<Traits, Signatures...>& impl);
+
+ // Cancel all operations associated with the channel.
+ template <typename Traits, typename... Signatures>
+ void cancel(implementation_type<Traits, Signatures...>& impl);
+
+ // Cancel the operation associated with the channel that has the given key.
+ template <typename Traits, typename... Signatures>
+ void cancel_by_key(implementation_type<Traits, Signatures...>& impl,
+ void* cancellation_key);
+
+ // Determine whether a value can be read from the channel without blocking.
+ bool ready(const base_implementation_type& impl) const noexcept;
+
+ // Synchronously send a new value into the channel.
+ template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+ bool try_send(implementation_type<Traits, Signatures...>& impl,
+ bool via_dispatch, Args&&... args);
+
+ // Synchronously send a number of new values into the channel.
+ template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+ std::size_t try_send_n(implementation_type<Traits, Signatures...>& impl,
+ std::size_t count, bool via_dispatch, Args&&... args);
+
+ // Asynchronously send a new value into the channel.
+ template <typename Traits, typename... Signatures,
+ typename Handler, typename IoExecutor>
+ void async_send(implementation_type<Traits, Signatures...>& impl,
+ typename implementation_type<Traits,
+ Signatures...>::payload_type&& payload,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef channel_send_op<
+ typename implementation_type<Traits, Signatures...>::payload_type,
+ Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(static_cast<typename implementation_type<
+ Traits, Signatures...>::payload_type&&>(payload), handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<op_cancellation<Traits, Signatures...>>(
+ this, &impl);
+ }
+
+ ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "channel", &impl, 0, "async_send"));
+
+ start_send_op(impl, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Synchronously receive a value from the channel.
+ template <typename Traits, typename... Signatures, typename Handler>
+ bool try_receive(implementation_type<Traits, Signatures...>& impl,
+ Handler&& handler);
+
+ // Asynchronously receive a value from the channel.
+ template <typename Traits, typename... Signatures,
+ typename Handler, typename IoExecutor>
+ void async_receive(implementation_type<Traits, Signatures...>& impl,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef channel_receive_op<
+ typename implementation_type<Traits, Signatures...>::payload_type,
+ Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<op_cancellation<Traits, Signatures...>>(
+ this, &impl);
+ }
+
+ ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "channel", &impl, 0, "async_receive"));
+
+ start_receive_op(impl, p.p);
+ p.v = p.p = 0;
+ }
+
+private:
+ // Helper function object to handle a closed notification.
+ template <typename Payload, typename Signature>
+ struct post_receive
+ {
+ explicit post_receive(channel_receive<Payload>* op)
+ : op_(op)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ op_->post(
+ channel_message<Signature>(0,
+ static_cast<Args&&>(args)...));
+ }
+
+ channel_receive<Payload>* op_;
+ };
+
+ // Destroy a base channel implementation.
+ void base_destroy(base_implementation_type& impl);
+
+ // Helper function to start an asynchronous put operation.
+ template <typename Traits, typename... Signatures>
+ void start_send_op(implementation_type<Traits, Signatures...>& impl,
+ channel_send<typename implementation_type<
+ Traits, Signatures...>::payload_type>* send_op);
+
+ // Helper function to start an asynchronous get operation.
+ template <typename Traits, typename... Signatures>
+ void start_receive_op(implementation_type<Traits, Signatures...>& impl,
+ channel_receive<typename implementation_type<
+ Traits, Signatures...>::payload_type>* receive_op);
+
+ // Helper class used to implement per-operation cancellation.
+ template <typename Traits, typename... Signatures>
+ class op_cancellation
+ {
+ public:
+ op_cancellation(channel_service* s,
+ implementation_type<Traits, Signatures...>* impl)
+ : service_(s),
+ impl_(impl)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ service_->cancel_by_key(*impl_, this);
+ }
+ }
+
+ private:
+ channel_service* service_;
+ implementation_type<Traits, Signatures...>* impl_;
+ };
+
+ // Mutex to protect access to the linked list of implementations.
+ asio::detail::mutex mutex_;
+
+ // The head of a linked list of all implementations.
+ base_implementation_type* impl_list_;
+};
+
+// The implementation for a specific value type.
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+struct channel_service<Mutex>::implementation_type : base_implementation_type
+{
+ // The traits type associated with the channel.
+ typedef typename Traits::template rebind<Signatures...>::other traits_type;
+
+ // Type of an element stored in the buffer.
+ typedef conditional_t<
+ has_signature<
+ typename traits_type::receive_cancelled_signature,
+ Signatures...
+ >::value,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ Signatures...
+ >::value,
+ channel_payload<Signatures...>,
+ channel_payload<
+ Signatures...,
+ typename traits_type::receive_closed_signature
+ >
+ >,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ Signatures...,
+ typename traits_type::receive_cancelled_signature
+ >::value,
+ channel_payload<
+ Signatures...,
+ typename traits_type::receive_cancelled_signature
+ >,
+ channel_payload<
+ Signatures...,
+ typename traits_type::receive_cancelled_signature,
+ typename traits_type::receive_closed_signature
+ >
+ >
+ > payload_type;
+
+ // Move from another buffer.
+ void buffer_move_from(implementation_type& other)
+ {
+ buffer_ = static_cast<
+ typename traits_type::template container<payload_type>::type&&>(
+ other.buffer_);
+ other.buffer_clear();
+ }
+
+ // Get number of buffered elements.
+ std::size_t buffer_size() const
+ {
+ return buffer_.size();
+ }
+
+ // Push a new value to the back of the buffer.
+ void buffer_push(payload_type payload)
+ {
+ buffer_.push_back(static_cast<payload_type&&>(payload));
+ }
+
+ // Push new values to the back of the buffer.
+ std::size_t buffer_push_n(std::size_t count, payload_type payload)
+ {
+ std::size_t i = 0;
+ for (; i < count && buffer_.size() < this->max_buffer_size_; ++i)
+ buffer_.push_back(payload);
+ return i;
+ }
+
+ // Get the element at the front of the buffer.
+ payload_type buffer_front()
+ {
+ return static_cast<payload_type&&>(buffer_.front());
+ }
+
+ // Pop a value from the front of the buffer.
+ void buffer_pop()
+ {
+ buffer_.pop_front();
+ }
+
+ // Clear all buffered values.
+ void buffer_clear()
+ {
+ buffer_.clear();
+ }
+
+private:
+ // Buffered values.
+ typename traits_type::template container<payload_type>::type buffer_;
+};
+
+// The implementation for a void value type.
+template <typename Mutex>
+template <typename Traits, typename R>
+struct channel_service<Mutex>::implementation_type<Traits, R()>
+ : channel_service::base_implementation_type
+{
+ // The traits type associated with the channel.
+ typedef typename Traits::template rebind<R()>::other traits_type;
+
+ // Type of an element stored in the buffer.
+ typedef conditional_t<
+ has_signature<
+ typename traits_type::receive_cancelled_signature,
+ R()
+ >::value,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R()
+ >::value,
+ channel_payload<R()>,
+ channel_payload<
+ R(),
+ typename traits_type::receive_closed_signature
+ >
+ >,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R(),
+ typename traits_type::receive_cancelled_signature
+ >::value,
+ channel_payload<
+ R(),
+ typename traits_type::receive_cancelled_signature
+ >,
+ channel_payload<
+ R(),
+ typename traits_type::receive_cancelled_signature,
+ typename traits_type::receive_closed_signature
+ >
+ >
+ > payload_type;
+
+ // Construct with empty buffer.
+ implementation_type()
+ : buffer_(0)
+ {
+ }
+
+ // Move from another buffer.
+ void buffer_move_from(implementation_type& other)
+ {
+ buffer_ = other.buffer_;
+ other.buffer_ = 0;
+ }
+
+ // Get number of buffered elements.
+ std::size_t buffer_size() const
+ {
+ return buffer_;
+ }
+
+ // Push a new value to the back of the buffer.
+ void buffer_push(payload_type)
+ {
+ ++buffer_;
+ }
+
+ // Push new values to the back of the buffer.
+ std::size_t buffer_push_n(std::size_t count, payload_type)
+ {
+ std::size_t available = this->max_buffer_size_ - buffer_;
+ count = (count < available) ? count : available;
+ buffer_ += count;
+ return count;
+ }
+
+ // Get the element at the front of the buffer.
+ payload_type buffer_front()
+ {
+ return payload_type(channel_message<R()>(0));
+ }
+
+ // Pop a value from the front of the buffer.
+ void buffer_pop()
+ {
+ --buffer_;
+ }
+
+ // Clear all values from the buffer.
+ void buffer_clear()
+ {
+ buffer_ = 0;
+ }
+
+private:
+ // Number of buffered "values".
+ std::size_t buffer_;
+};
+
+// The implementation for an error_code signature.
+template <typename Mutex>
+template <typename Traits, typename R>
+struct channel_service<Mutex>::implementation_type<
+ Traits, R(asio::error_code)>
+ : channel_service::base_implementation_type
+{
+ // The traits type associated with the channel.
+ typedef typename Traits::template rebind<R(asio::error_code)>::other
+ traits_type;
+
+ // Type of an element stored in the buffer.
+ typedef conditional_t<
+ has_signature<
+ typename traits_type::receive_cancelled_signature,
+ R(asio::error_code)
+ >::value,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R(asio::error_code)
+ >::value,
+ channel_payload<R(asio::error_code)>,
+ channel_payload<
+ R(asio::error_code),
+ typename traits_type::receive_closed_signature
+ >
+ >,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R(asio::error_code),
+ typename traits_type::receive_cancelled_signature
+ >::value,
+ channel_payload<
+ R(asio::error_code),
+ typename traits_type::receive_cancelled_signature
+ >,
+ channel_payload<
+ R(asio::error_code),
+ typename traits_type::receive_cancelled_signature,
+ typename traits_type::receive_closed_signature
+ >
+ >
+ > payload_type;
+
+ // Construct with empty buffer.
+ implementation_type()
+ : size_(0)
+ {
+ first_.count_ = 0;
+ }
+
+ // Move from another buffer.
+ void buffer_move_from(implementation_type& other)
+ {
+ size_ = other.buffer_;
+ other.size_ = 0;
+ first_ = other.first_;
+ other.first.count_ = 0;
+ rest_ = static_cast<
+ typename traits_type::template container<buffered_value>::type&&>(
+ other.rest_);
+ other.buffer_clear();
+ }
+
+ // Get number of buffered elements.
+ std::size_t buffer_size() const
+ {
+ return size_;
+ }
+
+ // Push a new value to the back of the buffer.
+ void buffer_push(payload_type payload)
+ {
+ buffered_value& last = rest_.empty() ? first_ : rest_.back();
+ if (last.count_ == 0)
+ {
+ value_handler handler{last.value_};
+ payload.receive(handler);
+ last.count_ = 1;
+ }
+ else
+ {
+ asio::error_code value{last.value_};
+ value_handler handler{value};
+ payload.receive(handler);
+ if (last.value_ == value)
+ ++last.count_;
+ else
+ rest_.push_back({value, 1});
+ }
+ ++size_;
+ }
+
+ // Push new values to the back of the buffer.
+ std::size_t buffer_push_n(std::size_t count, payload_type payload)
+ {
+ std::size_t available = this->max_buffer_size_ - size_;
+ count = (count < available) ? count : available;
+ if (count > 0)
+ {
+ buffered_value& last = rest_.empty() ? first_ : rest_.back();
+ if (last.count_ == 0)
+ {
+ payload.receive(value_handler{last.value_});
+ last.count_ = count;
+ }
+ else
+ {
+ asio::error_code value{last.value_};
+ payload.receive(value_handler{value});
+ if (last.value_ == value)
+ last.count_ += count;
+ else
+ rest_.push_back({value, count});
+ }
+ size_ += count;
+ }
+ return count;
+ }
+
+ // Get the element at the front of the buffer.
+ payload_type buffer_front()
+ {
+ return payload_type({0, first_.value_});
+ }
+
+ // Pop a value from the front of the buffer.
+ void buffer_pop()
+ {
+ --size_;
+ if (--first_.count_ == 0 && !rest_.empty())
+ {
+ first_ = rest_.front();
+ rest_.pop_front();
+ }
+ }
+
+ // Clear all values from the buffer.
+ void buffer_clear()
+ {
+ size_ = 0;
+ first_.count_ == 0;
+ rest_.clear();
+ }
+
+private:
+ struct buffered_value
+ {
+ asio::error_code value_;
+ std::size_t count_;
+ };
+
+ struct value_handler
+ {
+ asio::error_code& target_;
+
+ template <typename... Args>
+ void operator()(const asio::error_code& value, Args&&...)
+ {
+ target_ = value;
+ }
+ };
+
+ buffered_value& last_value()
+ {
+ return rest_.empty() ? first_ : rest_.back();
+ }
+
+ // Total number of buffered values.
+ std::size_t size_;
+
+ // The first buffered value is maintained as a separate data member to avoid
+ // allocating space in the container in the common case.
+ buffered_value first_;
+
+ // The rest of the buffered values.
+ typename traits_type::template container<buffered_value>::type rest_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/detail/impl/channel_service.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp b/3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp
new file mode 100644
index 00000000000..52809134cb0
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp
@@ -0,0 +1,169 @@
+//
+// experimental/detail/coro_completion_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_DETAIL_CORO_COMPLETION_HANDLER_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CORO_COMPLETION_HANDLER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/deferred.hpp"
+#include "asio/experimental/coro.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Promise, typename... Args>
+struct coro_completion_handler
+{
+ coro_completion_handler(coroutine_handle<Promise> h,
+ std::optional<std::tuple<Args...>>& result)
+ : self(h),
+ result(result)
+ {
+ }
+
+ coro_completion_handler(coro_completion_handler&&) = default;
+
+ coroutine_handle<Promise> self;
+
+ std::optional<std::tuple<Args...>>& result;
+
+ using promise_type = Promise;
+
+ void operator()(Args... args)
+ {
+ result.emplace(std::move(args)...);
+ self.resume();
+ }
+
+ using allocator_type = typename promise_type::allocator_type;
+ allocator_type get_allocator() const noexcept
+ {
+ return self.promise().get_allocator();
+ }
+
+ using executor_type = typename promise_type::executor_type;
+ executor_type get_executor() const noexcept
+ {
+ return self.promise().get_executor();
+ }
+
+ using cancellation_slot_type = typename promise_type::cancellation_slot_type;
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return self.promise().get_cancellation_slot();
+ }
+};
+
+template <typename Signature>
+struct coro_completion_handler_type;
+
+template <typename... Args>
+struct coro_completion_handler_type<void(Args...)>
+{
+ using type = std::tuple<Args...>;
+
+ template <typename Promise>
+ using completion_handler = coro_completion_handler<Promise, Args...>;
+};
+
+template <typename Signature>
+using coro_completion_handler_type_t =
+ typename coro_completion_handler_type<Signature>::type;
+
+inline void coro_interpret_result(std::tuple<>&&)
+{
+}
+
+template <typename... Args>
+inline auto coro_interpret_result(std::tuple<Args...>&& args)
+{
+ return std::move(args);
+}
+
+template <typename... Args>
+auto coro_interpret_result(std::tuple<std::exception_ptr, Args...>&& args)
+{
+ if (std::get<0>(args))
+ std::rethrow_exception(std::get<0>(args));
+
+ return std::apply(
+ [](auto, auto&&... rest)
+ {
+ return std::make_tuple(std::move(rest)...);
+ }, std::move(args));
+}
+
+template <typename... Args>
+auto coro_interpret_result(
+ std::tuple<asio::error_code, Args...>&& args)
+{
+ if (std::get<0>(args))
+ asio::detail::throw_exception(
+ asio::system_error(std::get<0>(args)));
+
+ return std::apply(
+ [](auto, auto&&... rest)
+ {
+ return std::make_tuple(std::move(rest)...);
+ }, std::move(args));
+}
+
+template <typename Arg>
+inline auto coro_interpret_result(std::tuple<Arg>&& args)
+{
+ return std::get<0>(std::move(args));
+}
+
+template <typename Arg>
+auto coro_interpret_result(std::tuple<std::exception_ptr, Arg>&& args)
+{
+ if (std::get<0>(args))
+ std::rethrow_exception(std::get<0>(args));
+ return std::get<1>(std::move(args));
+}
+
+inline auto coro_interpret_result(
+ std::tuple<asio::error_code>&& args)
+{
+ if (std::get<0>(args))
+ asio::detail::throw_exception(
+ asio::system_error(std::get<0>(args)));
+}
+
+inline auto coro_interpret_result(std::tuple<std::exception_ptr>&& args)
+{
+ if (std::get<0>(args))
+ std::rethrow_exception(std::get<0>(args));
+}
+
+template <typename Arg>
+auto coro_interpret_result(std::tuple<asio::error_code, Arg>&& args)
+{
+ if (std::get<0>(args))
+ asio::detail::throw_exception(
+ asio::system_error(std::get<0>(args)));
+ return std::get<1>(std::move(args));
+}
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CORO_COMPLETION_HANDLER_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp b/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp
new file mode 100644
index 00000000000..328646968f3
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp
@@ -0,0 +1,141 @@
+//
+// experimental/detail/coro_promise_allocator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_DETAIL_CORO_PROMISE_ALLOCATOR_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CORO_PROMISE_ALLOCATOR_HPP
+
+#include "asio/detail/config.hpp"
+#include "asio/experimental/coro_traits.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+/// Allocate the memory and put the allocator behind the coro memory
+template <typename AllocatorType>
+void* allocate_coroutine(const std::size_t size, AllocatorType alloc_)
+{
+ using alloc_type = typename std::allocator_traits<AllocatorType>::template
+ rebind_alloc<unsigned char>;
+ alloc_type alloc{alloc_};
+
+ const auto align_needed = size % alignof(alloc_type);
+ const auto align_offset = align_needed != 0
+ ? alignof(alloc_type) - align_needed : 0ull;
+ const auto alloc_size = size + sizeof(alloc_type) + align_offset;
+ const auto raw =
+ std::allocator_traits<alloc_type>::allocate(alloc, alloc_size);
+ new(raw + size + align_offset) alloc_type(std::move(alloc));
+
+ return raw;
+}
+
+/// Deallocate the memory and destroy the allocator in the coro memory.
+template <typename AllocatorType>
+void deallocate_coroutine(void* raw_, const std::size_t size)
+{
+ using alloc_type = typename std::allocator_traits<AllocatorType>::template
+ rebind_alloc<unsigned char>;
+
+ const auto raw = static_cast<unsigned char *>(raw_);
+
+ const auto align_needed = size % alignof(alloc_type);
+ const auto align_offset = align_needed != 0
+ ? alignof(alloc_type) - align_needed : 0ull;
+ const auto alloc_size = size + sizeof(alloc_type) + align_offset;
+
+ auto alloc_p = reinterpret_cast<alloc_type *>(raw + size + align_offset);
+ auto alloc = std::move(*alloc_p);
+ alloc_p->~alloc_type();
+ std::allocator_traits<alloc_type>::deallocate(alloc, raw, alloc_size);
+}
+
+template <typename T>
+constexpr std::size_t variadic_first(std::size_t = 0u)
+{
+ return std::numeric_limits<std::size_t>::max();
+}
+
+
+template <typename T, typename First, typename... Args>
+constexpr std::size_t variadic_first(std::size_t pos = 0u)
+{
+ if constexpr (std::is_same_v<std::decay_t<First>, T>)
+ return pos;
+ else
+ return variadic_first<T, Args...>(pos+1);
+}
+
+template <std::size_t Idx, typename First, typename... Args>
+ requires (Idx <= sizeof...(Args))
+constexpr decltype(auto) get_variadic(First&& first, Args&&... args)
+{
+ if constexpr (Idx == 0u)
+ return static_cast<First>(first);
+ else
+ return get_variadic<Idx-1u>(static_cast<Args>(args)...);
+}
+
+template <std::size_t Idx>
+constexpr decltype(auto) get_variadic();
+
+template <typename Allocator>
+struct coro_promise_allocator
+{
+ using allocator_type = Allocator;
+ allocator_type get_allocator() const {return alloc_;}
+
+ template <typename... Args>
+ void* operator new(const std::size_t size, Args & ... args)
+ {
+ return allocate_coroutine(size,
+ get_variadic<variadic_first<std::allocator_arg_t,
+ std::decay_t<Args>...>() + 1u>(args...));
+ }
+
+ void operator delete(void* raw, const std::size_t size)
+ {
+ deallocate_coroutine<allocator_type>(raw, size);
+ }
+
+ template <typename... Args>
+ coro_promise_allocator(Args&& ... args)
+ : alloc_(
+ get_variadic<variadic_first<std::allocator_arg_t,
+ std::decay_t<Args>...>() + 1u>(args...))
+ {
+ }
+
+private:
+ allocator_type alloc_;
+};
+
+template <>
+struct coro_promise_allocator<std::allocator<void>>
+{
+ using allocator_type = std::allocator<void>;
+
+ template <typename... Args>
+ coro_promise_allocator(Args&&...)
+ {
+ }
+
+ allocator_type get_allocator() const
+ {
+ return {};
+ }
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CORO_PROMISE_ALLOCATOR_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/has_signature.hpp b/3rdparty/asio/include/asio/experimental/detail/has_signature.hpp
new file mode 100644
index 00000000000..ea5dac8c69b
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/has_signature.hpp
@@ -0,0 +1,54 @@
+//
+// experimental/detail/has_signature.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename S, typename... Signatures>
+struct has_signature;
+
+template <typename S, typename... Signatures>
+struct has_signature;
+
+template <typename S>
+struct has_signature<S> : false_type
+{
+};
+
+template <typename S, typename... Signatures>
+struct has_signature<S, S, Signatures...> : true_type
+{
+};
+
+template <typename S, typename Head, typename... Tail>
+struct has_signature<S, Head, Tail...> : has_signature<S, Tail...>
+{
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp b/3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp
new file mode 100644
index 00000000000..797c9f433c7
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp
@@ -0,0 +1,621 @@
+//
+// experimental/detail/impl/channel_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_DETAIL_IMPL_CHANNEL_SERVICE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_IMPL_CHANNEL_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Mutex>
+inline channel_service<Mutex>::channel_service(
+ asio::execution_context& ctx)
+ : asio::detail::execution_context_service_base<channel_service>(ctx),
+ mutex_(),
+ impl_list_(0)
+{
+}
+
+template <typename Mutex>
+inline void channel_service<Mutex>::shutdown()
+{
+ // Abandon all pending operations.
+ asio::detail::op_queue<channel_operation> ops;
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ base_implementation_type* impl = impl_list_;
+ while (impl)
+ {
+ ops.push(impl->waiters_);
+ impl = impl->next_;
+ }
+}
+
+template <typename Mutex>
+inline void channel_service<Mutex>::construct(
+ channel_service<Mutex>::base_implementation_type& impl,
+ std::size_t max_buffer_size)
+{
+ impl.max_buffer_size_ = max_buffer_size;
+ impl.receive_state_ = block;
+ impl.send_state_ = max_buffer_size ? buffer : block;
+
+ // Insert implementation into linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::destroy(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ cancel(impl);
+ base_destroy(impl);
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::move_construct(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_service<Mutex>::implementation_type<
+ Traits, Signatures...>& other_impl)
+{
+ impl.max_buffer_size_ = other_impl.max_buffer_size_;
+ impl.receive_state_ = other_impl.receive_state_;
+ other_impl.receive_state_ = block;
+ impl.send_state_ = other_impl.send_state_;
+ other_impl.send_state_ = other_impl.max_buffer_size_ ? buffer : block;
+ impl.buffer_move_from(other_impl);
+
+ // Insert implementation into linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::move_assign(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_service& other_service,
+ channel_service<Mutex>::implementation_type<
+ Traits, Signatures...>& other_impl)
+{
+ cancel(impl);
+
+ if (this != &other_service)
+ {
+ // Remove implementation from linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+ }
+
+ impl.max_buffer_size_ = other_impl.max_buffer_size_;
+ impl.receive_state_ = other_impl.receive_state_;
+ other_impl.receive_state_ = block;
+ impl.send_state_ = other_impl.send_state_;
+ other_impl.send_state_ = other_impl.max_buffer_size_ ? buffer : block;
+ impl.buffer_move_from(other_impl);
+
+ if (this != &other_service)
+ {
+ // Insert implementation into linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(other_service.mutex_);
+ impl.next_ = other_service.impl_list_;
+ impl.prev_ = 0;
+ if (other_service.impl_list_)
+ other_service.impl_list_->prev_ = &impl;
+ other_service.impl_list_ = &impl;
+ }
+}
+
+template <typename Mutex>
+inline void channel_service<Mutex>::base_destroy(
+ channel_service<Mutex>::base_implementation_type& impl)
+{
+ // Remove implementation from linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+}
+
+template <typename Mutex>
+inline std::size_t channel_service<Mutex>::capacity(
+ const channel_service<Mutex>::base_implementation_type& impl)
+ const noexcept
+{
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ return impl.max_buffer_size_;
+}
+
+template <typename Mutex>
+inline bool channel_service<Mutex>::is_open(
+ const channel_service<Mutex>::base_implementation_type& impl)
+ const noexcept
+{
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ return impl.send_state_ != closed;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::reset(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ cancel(impl);
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ impl.receive_state_ = block;
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ impl.buffer_clear();
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::close(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ if (impl.receive_state_ == block)
+ {
+ while (channel_operation* op = impl.waiters_.front())
+ {
+ impl.waiters_.pop();
+ traits_type::invoke_receive_closed(
+ post_receive<payload_type,
+ typename traits_type::receive_closed_signature>(
+ static_cast<channel_receive<payload_type>*>(op)));
+ }
+ }
+
+ impl.send_state_ = closed;
+ if (impl.receive_state_ != buffer)
+ impl.receive_state_ = closed;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::cancel(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ while (channel_operation* op = impl.waiters_.front())
+ {
+ if (impl.send_state_ == block)
+ {
+ impl.waiters_.pop();
+ static_cast<channel_send<payload_type>*>(op)->cancel();
+ }
+ else
+ {
+ impl.waiters_.pop();
+ traits_type::invoke_receive_cancelled(
+ post_receive<payload_type,
+ typename traits_type::receive_cancelled_signature>(
+ static_cast<channel_receive<payload_type>*>(op)));
+ }
+ }
+
+ if (impl.receive_state_ == waiter)
+ impl.receive_state_ = block;
+ if (impl.send_state_ == waiter)
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::cancel_by_key(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ void* cancellation_key)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ asio::detail::op_queue<channel_operation> other_ops;
+ while (channel_operation* op = impl.waiters_.front())
+ {
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ if (impl.send_state_ == block)
+ {
+ impl.waiters_.pop();
+ static_cast<channel_send<payload_type>*>(op)->cancel();
+ }
+ else
+ {
+ impl.waiters_.pop();
+ traits_type::invoke_receive_cancelled(
+ post_receive<payload_type,
+ typename traits_type::receive_cancelled_signature>(
+ static_cast<channel_receive<payload_type>*>(op)));
+ }
+ }
+ else
+ {
+ impl.waiters_.pop();
+ other_ops.push(op);
+ }
+ }
+ impl.waiters_.push(other_ops);
+
+ if (impl.waiters_.empty())
+ {
+ if (impl.receive_state_ == waiter)
+ impl.receive_state_ = block;
+ if (impl.send_state_ == waiter)
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ }
+}
+
+template <typename Mutex>
+inline bool channel_service<Mutex>::ready(
+ const channel_service<Mutex>::base_implementation_type& impl)
+ const noexcept
+{
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ return impl.receive_state_ != block;
+}
+
+template <typename Mutex>
+template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+bool channel_service<Mutex>::try_send(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ bool via_dispatch, Args&&... args)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.send_state_)
+ {
+ case block:
+ {
+ return false;
+ }
+ case buffer:
+ {
+ impl.buffer_push(Message(0, static_cast<Args&&>(args)...));
+ impl.receive_state_ = buffer;
+ if (impl.buffer_size() == impl.max_buffer_size_)
+ impl.send_state_ = block;
+ return true;
+ }
+ case waiter:
+ {
+ payload_type payload(Message(0, static_cast<Args&&>(args)...));
+ channel_receive<payload_type>* receive_op =
+ static_cast<channel_receive<payload_type>*>(impl.waiters_.front());
+ impl.waiters_.pop();
+ if (impl.waiters_.empty())
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ lock.unlock();
+ if (via_dispatch)
+ receive_op->dispatch(static_cast<payload_type&&>(payload));
+ else
+ receive_op->post(static_cast<payload_type&&>(payload));
+ return true;
+ }
+ case closed:
+ default:
+ {
+ return false;
+ }
+ }
+}
+
+template <typename Mutex>
+template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+std::size_t channel_service<Mutex>::try_send_n(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ std::size_t count, bool via_dispatch, Args&&... args)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ if (count == 0)
+ return 0;
+
+ switch (impl.send_state_)
+ {
+ case block:
+ return 0;
+ case buffer:
+ case waiter:
+ break;
+ case closed:
+ default:
+ return 0;
+ }
+
+ payload_type payload(Message(0, static_cast<Args&&>(args)...));
+
+ for (std::size_t i = 0; i < count; ++i)
+ {
+ switch (impl.send_state_)
+ {
+ case block:
+ {
+ return i;
+ }
+ case buffer:
+ {
+ i += impl.buffer_push_n(count - i,
+ static_cast<payload_type&&>(payload));
+ impl.receive_state_ = buffer;
+ if (impl.buffer_size() == impl.max_buffer_size_)
+ impl.send_state_ = block;
+ return i;
+ }
+ case waiter:
+ {
+ channel_receive<payload_type>* receive_op =
+ static_cast<channel_receive<payload_type>*>(impl.waiters_.front());
+ impl.waiters_.pop();
+ if (impl.waiters_.empty())
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ lock.unlock();
+ if (via_dispatch)
+ receive_op->dispatch(payload);
+ else
+ receive_op->post(payload);
+ break;
+ }
+ case closed:
+ default:
+ {
+ return i;
+ }
+ }
+ }
+
+ return count;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::start_send_op(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_send<typename implementation_type<
+ Traits, Signatures...>::payload_type>* send_op)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.send_state_)
+ {
+ case block:
+ {
+ impl.waiters_.push(send_op);
+ if (impl.receive_state_ == block)
+ impl.receive_state_ = waiter;
+ return;
+ }
+ case buffer:
+ {
+ impl.buffer_push(send_op->get_payload());
+ impl.receive_state_ = buffer;
+ if (impl.buffer_size() == impl.max_buffer_size_)
+ impl.send_state_ = block;
+ send_op->immediate();
+ break;
+ }
+ case waiter:
+ {
+ channel_receive<payload_type>* receive_op =
+ static_cast<channel_receive<payload_type>*>(impl.waiters_.front());
+ impl.waiters_.pop();
+ if (impl.waiters_.empty())
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ receive_op->post(send_op->get_payload());
+ send_op->immediate();
+ break;
+ }
+ case closed:
+ default:
+ {
+ send_op->close();
+ break;
+ }
+ }
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures, typename Handler>
+bool channel_service<Mutex>::try_receive(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ Handler&& handler)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.receive_state_)
+ {
+ case block:
+ {
+ return false;
+ }
+ case buffer:
+ {
+ payload_type payload(impl.buffer_front());
+ if (channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front()))
+ {
+ impl.buffer_pop();
+ impl.buffer_push(send_op->get_payload());
+ impl.waiters_.pop();
+ send_op->post();
+ }
+ else
+ {
+ impl.buffer_pop();
+ if (impl.buffer_size() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ impl.send_state_ = (impl.send_state_ == closed) ? closed : buffer;
+ }
+ lock.unlock();
+ asio::detail::non_const_lvalue<Handler> handler2(handler);
+ channel_handler<payload_type, decay_t<Handler>>(
+ static_cast<payload_type&&>(payload), handler2.value)();
+ return true;
+ }
+ case waiter:
+ {
+ channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front());
+ payload_type payload = send_op->get_payload();
+ impl.waiters_.pop();
+ if (impl.waiters_.front() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ send_op->post();
+ lock.unlock();
+ asio::detail::non_const_lvalue<Handler> handler2(handler);
+ channel_handler<payload_type, decay_t<Handler>>(
+ static_cast<payload_type&&>(payload), handler2.value)();
+ return true;
+ }
+ case closed:
+ default:
+ {
+ return false;
+ }
+ }
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::start_receive_op(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_receive<typename implementation_type<
+ Traits, Signatures...>::payload_type>* receive_op)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.receive_state_)
+ {
+ case block:
+ {
+ impl.waiters_.push(receive_op);
+ if (impl.send_state_ != closed)
+ impl.send_state_ = waiter;
+ return;
+ }
+ case buffer:
+ {
+ payload_type payload(
+ static_cast<payload_type&&>(impl.buffer_front()));
+ if (channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front()))
+ {
+ impl.buffer_pop();
+ impl.buffer_push(send_op->get_payload());
+ impl.waiters_.pop();
+ send_op->post();
+ }
+ else
+ {
+ impl.buffer_pop();
+ if (impl.buffer_size() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ impl.send_state_ = (impl.send_state_ == closed) ? closed : buffer;
+ }
+ receive_op->immediate(static_cast<payload_type&&>(payload));
+ break;
+ }
+ case waiter:
+ {
+ channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front());
+ payload_type payload = send_op->get_payload();
+ impl.waiters_.pop();
+ if (impl.waiters_.front() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ send_op->post();
+ receive_op->immediate(static_cast<payload_type&&>(payload));
+ break;
+ }
+ case closed:
+ default:
+ {
+ traits_type::invoke_receive_closed(
+ post_receive<payload_type,
+ typename traits_type::receive_closed_signature>(receive_op));
+ break;
+ }
+ }
+}
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_IMPL_CHANNEL_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp b/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp
new file mode 100644
index 00000000000..8495af2f0ba
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp
@@ -0,0 +1,197 @@
+//
+// experimental/detail/partial_promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_DETAIL_PARTIAL_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_PARTIAL_PROMISE_HPP
+
+#include "asio/detail/config.hpp"
+#include "asio/append.hpp"
+#include "asio/awaitable.hpp"
+#include "asio/experimental/coro_traits.hpp"
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+# include <coroutine>
+#else // defined(ASIO_HAS_STD_COROUTINE)
+# include <experimental/coroutine>
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+
+using std::coroutine_handle;
+using std::coroutine_traits;
+using std::suspend_never;
+using std::suspend_always;
+using std::noop_coroutine;
+
+#else // defined(ASIO_HAS_STD_COROUTINE)
+
+using std::experimental::coroutine_handle;
+using std::experimental::coroutine_traits;
+using std::experimental::suspend_never;
+using std::experimental::suspend_always;
+using std::experimental::noop_coroutine;
+
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+struct partial_coro
+{
+ coroutine_handle<void> handle{nullptr};
+};
+
+template <typename Allocator>
+struct partial_promise_base
+{
+ template <typename Executor, typename Token, typename... Args>
+ void* operator new(const std::size_t size, Executor&, Token& tk, Args&...)
+ {
+ return allocate_coroutine<Allocator>(size, get_associated_allocator(tk));
+ }
+
+ void operator delete(void* raw, const std::size_t size)
+ {
+ deallocate_coroutine<Allocator>(raw, size);
+ }
+};
+
+template <>
+struct partial_promise_base<std::allocator<void>>
+{
+};
+
+template <typename Allocator>
+struct partial_promise : partial_promise_base<Allocator>
+{
+ auto initial_suspend() noexcept
+ {
+ return asio::detail::suspend_always{};
+ }
+
+ auto final_suspend() noexcept
+ {
+ struct awaitable_t
+ {
+ partial_promise *p;
+
+ constexpr bool await_ready() noexcept { return true; }
+
+ auto await_suspend(asio::detail::coroutine_handle<>) noexcept
+ {
+ p->get_return_object().handle.destroy();
+ }
+
+ constexpr void await_resume() noexcept {}
+ };
+
+ return awaitable_t{this};
+ }
+
+ void return_void() {}
+
+ partial_coro get_return_object()
+ {
+ return partial_coro{coroutine_handle<partial_promise>::from_promise(*this)};
+ }
+
+ void unhandled_exception()
+ {
+ assert(false);
+ }
+};
+
+
+
+}; // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+
+namespace std {
+
+template <typename Executor, typename Completion, typename... Args>
+struct coroutine_traits<
+ asio::experimental::detail::partial_coro,
+ Executor, Completion, Args...>
+{
+ using promise_type =
+ asio::experimental::detail::partial_promise<
+ asio::associated_allocator_t<Completion>>;
+};
+
+} // namespace std
+
+#else // defined(ASIO_HAS_STD_COROUTINE)
+
+namespace std { namespace experimental {
+
+template <typename Executor, typename Completion, typename... Args>
+struct coroutine_traits<
+ asio::experimental::detail::partial_coro,
+ Executor, Completion, Args...>
+{
+ using promise_type =
+ asio::experimental::detail::partial_promise<
+ asio::associated_allocator_t<Completion>>;
+};
+
+}} // namespace std::experimental
+
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <execution::executor Executor,
+ typename CompletionToken, typename... Args>
+partial_coro post_coroutine(Executor exec,
+ CompletionToken token, Args&&... args) noexcept
+{
+ post(exec, asio::append(std::move(token), std::move(args)...));
+ co_return;
+}
+
+template <detail::execution_context Context,
+ typename CompletionToken, typename... Args>
+partial_coro post_coroutine(Context& ctx,
+ CompletionToken token, Args&&... args) noexcept
+{
+ post(ctx, asio::append(std::move(token), std::move(args)...));
+ co_return;
+}
+
+template <execution::executor Executor,
+ typename CompletionToken, typename... Args>
+partial_coro dispatch_coroutine(Executor exec,
+ CompletionToken token, Args&&... args) noexcept
+{
+ dispatch(exec, asio::append(std::move(token), std::move(args)...));
+ co_return;
+}
+
+template <detail::execution_context Context,
+ typename CompletionToken, typename... Args>
+partial_coro dispatch_coroutine(Context& ctx,
+ CompletionToken token, Args &&... args) noexcept
+{
+ dispatch(ctx, asio::append(std::move(token), std::move(args)...));
+ co_return;
+}
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_PARTIAL_PROMISE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/as_single.hpp b/3rdparty/asio/include/asio/experimental/impl/as_single.hpp
new file mode 100644
index 00000000000..d183cf5679e
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/as_single.hpp
@@ -0,0 +1,176 @@
+//
+// experimental/impl/as_single.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_EXPERIMENTAL_AS_SINGLE_HPP
+#define ASIO_IMPL_EXPERIMENTAL_AS_SINGLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+// Class to adapt a as_single_t as a completion handler.
+template <typename Handler>
+class as_single_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename CompletionToken>
+ as_single_handler(as_single_t<CompletionToken> e)
+ : handler_(static_cast<CompletionToken&&>(e.token_))
+ {
+ }
+
+ template <typename RedirectedHandler>
+ as_single_handler(RedirectedHandler&& h)
+ : handler_(static_cast<RedirectedHandler&&>(h))
+ {
+ }
+
+ void operator()()
+ {
+ static_cast<Handler&&>(handler_)();
+ }
+
+ template <typename Arg>
+ void operator()(Arg&& arg)
+ {
+ static_cast<Handler&&>(handler_)(static_cast<Arg&&>(arg));
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ std::make_tuple(static_cast<Args&&>(args)...));
+ }
+
+//private:
+ Handler handler_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ as_single_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature>
+struct as_single_signature
+{
+ typedef Signature type;
+};
+
+template <typename R>
+struct as_single_signature<R()>
+{
+ typedef R type();
+};
+
+template <typename R, typename Arg>
+struct as_single_signature<R(Arg)>
+{
+ typedef R type(Arg);
+};
+
+template <typename R, typename... Args>
+struct as_single_signature<R(Args...)>
+{
+ typedef R type(std::tuple<decay_t<Args>...>);
+};
+
+} // namespace detail
+} // namespace experimental
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename Signature>
+struct async_result<experimental::as_single_t<CompletionToken>, Signature>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ experimental::detail::as_single_handler<decay_t<Handler>>(
+ static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename experimental::detail::as_single_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken,
+ typename experimental::detail::as_single_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ experimental::detail::as_single_handler<Handler>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::as_single_handler<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const experimental::detail::as_single_handler<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_EXPERIMENTAL_AS_SINGLE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/channel_error.ipp b/3rdparty/asio/include/asio/experimental/impl/channel_error.ipp
new file mode 100644
index 00000000000..3f4b9829774
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/channel_error.ipp
@@ -0,0 +1,61 @@
+//
+// experimental/impl/channel_error.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
+#define ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/experimental/channel_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace error {
+namespace detail {
+
+class channel_category : public asio::error_category
+{
+public:
+ const char* name() const noexcept
+ {
+ return "asio.channel";
+ }
+
+ std::string message(int value) const
+ {
+ switch (value)
+ {
+ case channel_closed: return "Channel closed";
+ case channel_cancelled: return "Channel cancelled";
+ default: return "asio.channel error";
+ }
+ }
+};
+
+} // namespace detail
+
+const asio::error_category& get_channel_category()
+{
+ static detail::channel_category instance;
+ return instance;
+}
+
+} // namespace error
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/co_composed.hpp b/3rdparty/asio/include/asio/experimental/impl/co_composed.hpp
new file mode 100644
index 00000000000..3eef2e2ee2c
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/co_composed.hpp
@@ -0,0 +1,1174 @@
+//
+// experimental/impl/co_composed.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
+#define ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <new>
+#include <tuple>
+#include <variant>
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/detail/composed_work.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+# include <coroutine>
+#else // defined(ASIO_HAS_STD_COROUTINE)
+# include <experimental/coroutine>
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+# include "asio/detail/source_location.hpp"
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+using std::coroutine_handle;
+using std::suspend_always;
+using std::suspend_never;
+#else // defined(ASIO_HAS_STD_COROUTINE)
+using std::experimental::coroutine_handle;
+using std::experimental::suspend_always;
+using std::experimental::suspend_never;
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+using asio::detail::composed_io_executors;
+using asio::detail::composed_work;
+using asio::detail::composed_work_guard;
+using asio::detail::get_composed_io_executor;
+using asio::detail::make_composed_io_executors;
+using asio::detail::recycling_allocator;
+using asio::detail::throw_error;
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state;
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_handler_base;
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_promise;
+
+template <completion_signature... Signatures>
+class co_composed_returns
+{
+};
+
+struct co_composed_on_suspend
+{
+ void (*fn_)(void*) = nullptr;
+ void* arg_ = nullptr;
+};
+
+template <typename... T>
+struct co_composed_completion : std::tuple<T&&...>
+{
+ template <typename... U>
+ co_composed_completion(U&&... u) noexcept
+ : std::tuple<T&&...>(std::forward<U>(u)...)
+ {
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename Signature>
+class co_composed_state_return_overload;
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_state_return_overload<
+ Executors, Handler, Return, R(Args...)>
+{
+public:
+ using derived_type = co_composed_state<Executors, Handler, Return>;
+ using promise_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<Args...>;
+
+ void on_cancellation_complete_with(Args... args)
+ {
+ derived_type& state = *static_cast<derived_type*>(this);
+ state.return_value_ = std::make_tuple(std::move(args)...);
+ state.cancellation_on_suspend_fn(
+ [](void* p)
+ {
+ auto& promise = *static_cast<promise_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+ return_type result(
+ std::move(std::get<return_type>(promise.state().return_value_)));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::apply(std::move(handler), std::move(result));
+ });
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state_return;
+
+template <typename Executors, typename Handler, typename... Signatures>
+class co_composed_state_return<
+ Executors, Handler, co_composed_returns<Signatures...>>
+ : public co_composed_state_return_overload<Executors,
+ Handler, co_composed_returns<Signatures...>, Signatures>...
+{
+public:
+ using co_composed_state_return_overload<Executors,
+ Handler, co_composed_returns<Signatures...>,
+ Signatures>::on_cancellation_complete_with...;
+
+private:
+ template <typename, typename, typename, typename>
+ friend class co_composed_promise_return_overload;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+
+ std::variant<std::monostate,
+ typename co_composed_state_return_overload<
+ Executors, Handler, co_composed_returns<Signatures...>,
+ Signatures>::return_type...> return_value_;
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl;
+
+template <typename Executors, typename Handler, typename Return>
+struct co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return>
+{
+ static constexpr void (*fn())(void*)
+ {
+ return nullptr;
+ }
+};
+
+template <typename Executors, typename Handler, typename Return,
+ typename R, typename... Args, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, R(Args...), Signatures...>
+{
+ static constexpr void (*fn())(void*)
+ {
+ return co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, Signatures...>::fn();
+ }
+};
+
+template <typename Executors, typename Handler, typename Return,
+ typename R, typename... Args, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl<Executors,
+ Handler, Return, R(asio::error_code, Args...), Signatures...>
+{
+ using promise_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<asio::error_code, Args...>;
+
+ static constexpr void (*fn())(void*)
+ {
+ if constexpr ((is_constructible<Args>::value && ...))
+ {
+ return [](void* p)
+ {
+ auto& promise = *static_cast<promise_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::move(handler)(
+ asio::error_code(asio::error::operation_aborted),
+ Args{}...);
+ };
+ }
+ else
+ {
+ return co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, Signatures...>::fn();
+ }
+ }
+};
+
+template <typename Executors, typename Handler, typename Return,
+ typename R, typename... Args, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl<Executors,
+ Handler, Return, R(std::exception_ptr, Args...), Signatures...>
+{
+ using promise_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<std::exception_ptr, Args...>;
+
+ static constexpr void (*fn())(void*)
+ {
+ if constexpr ((is_constructible<Args>::value && ...))
+ {
+ return [](void* p)
+ {
+ auto& promise = *static_cast<promise_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::move(handler)(
+ std::make_exception_ptr(
+ asio::system_error(
+ asio::error::operation_aborted, "co_await")),
+ Args{}...);
+ };
+ }
+ else
+ {
+ return co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, Signatures...>::fn();
+ }
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+struct co_composed_state_default_cancellation_on_suspend;
+
+template <typename Executors, typename Handler, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend<
+ Executors, Handler, co_composed_returns<Signatures...>>
+ : co_composed_state_default_cancellation_on_suspend_impl<Executors,
+ Handler, co_composed_returns<Signatures...>, Signatures...>
+{
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state_cancellation
+{
+public:
+ using cancellation_slot_type = cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancellation_state_.slot();
+ }
+
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return cancellation_state_;
+ }
+
+ void reset_cancellation_state()
+ {
+ cancellation_state_ = cancellation_state(
+ (get_associated_cancellation_slot)(
+ static_cast<co_composed_state<Executors, Handler, Return>*>(
+ this)->handler()));
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter filter)
+ {
+ cancellation_state_ = cancellation_state(
+ (get_associated_cancellation_slot)(
+ static_cast<co_composed_state<Executors, Handler, Return>*>(
+ this)->handler()), filter, filter);
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter, OutFilter&& out_filter)
+ {
+ cancellation_state_ = cancellation_state(
+ (get_associated_cancellation_slot)(
+ static_cast<co_composed_state<Executors, Handler, Return>*>(
+ this)->handler()),
+ std::forward<InFilter>(in_filter),
+ std::forward<OutFilter>(out_filter));
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_state_.cancelled();
+ }
+
+ void clear_cancellation_slot() noexcept
+ {
+ cancellation_state_.slot().clear();
+ }
+
+ [[nodiscard]] bool throw_if_cancelled() const noexcept
+ {
+ return throw_if_cancelled_;
+ }
+
+ void throw_if_cancelled(bool b) noexcept
+ {
+ throw_if_cancelled_ = b;
+ }
+
+ [[nodiscard]] bool complete_if_cancelled() const noexcept
+ {
+ return complete_if_cancelled_;
+ }
+
+ void complete_if_cancelled(bool b) noexcept
+ {
+ complete_if_cancelled_ = b;
+ }
+
+private:
+ template <typename, typename, typename>
+ friend class co_composed_promise;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+
+ void cancellation_on_suspend_fn(void (*fn)(void*))
+ {
+ cancellation_on_suspend_fn_ = fn;
+ }
+
+ void check_for_cancellation_on_transform()
+ {
+ if (throw_if_cancelled_ && !!cancelled())
+ throw_error(asio::error::operation_aborted, "co_await");
+ }
+
+ bool check_for_cancellation_on_suspend(
+ co_composed_promise<Executors, Handler, Return>& promise) noexcept
+ {
+ if (complete_if_cancelled_ && !!cancelled() && cancellation_on_suspend_fn_)
+ {
+ promise.state().work_.reset();
+ promise.state().on_suspend_->fn_ = cancellation_on_suspend_fn_;
+ promise.state().on_suspend_->arg_ = &promise;
+ return false;
+ }
+ return true;
+ }
+
+ cancellation_state cancellation_state_;
+ void (*cancellation_on_suspend_fn_)(void*) =
+ co_composed_state_default_cancellation_on_suspend<
+ Executors, Handler, Return>::fn();
+ bool throw_if_cancelled_ = false;
+ bool complete_if_cancelled_ = true;
+};
+
+template <typename Executors, typename Handler, typename Return>
+ requires is_same<
+ typename associated_cancellation_slot<
+ Handler, cancellation_slot
+ >::asio_associated_cancellation_slot_is_unspecialised,
+ void>::value
+class co_composed_state_cancellation<Executors, Handler, Return>
+{
+public:
+ void reset_cancellation_state()
+ {
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter)
+ {
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&&, OutFilter&&)
+ {
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_type::none;
+ }
+
+ void clear_cancellation_slot() noexcept
+ {
+ }
+
+ [[nodiscard]] bool throw_if_cancelled() const noexcept
+ {
+ return false;
+ }
+
+ void throw_if_cancelled(bool) noexcept
+ {
+ }
+
+ [[nodiscard]] bool complete_if_cancelled() const noexcept
+ {
+ return false;
+ }
+
+ void complete_if_cancelled(bool) noexcept
+ {
+ }
+
+private:
+ template <typename, typename, typename>
+ friend class co_composed_promise;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+
+ void cancellation_on_suspend_fn(void (*)(void*))
+ {
+ }
+
+ void check_for_cancellation_on_transform() noexcept
+ {
+ }
+
+ bool check_for_cancellation_on_suspend(
+ co_composed_promise<Executors, Handler, Return>&) noexcept
+ {
+ return true;
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state
+ : public co_composed_state_return<Executors, Handler, Return>,
+ public co_composed_state_cancellation<Executors, Handler, Return>
+{
+public:
+ using io_executor_type = typename composed_work_guard<
+ typename composed_work<Executors>::head_type>::executor_type;
+
+ template <typename H>
+ co_composed_state(composed_io_executors<Executors>&& executors,
+ H&& h, co_composed_on_suspend& on_suspend)
+ : work_(std::move(executors)),
+ handler_(std::forward<H>(h)),
+ on_suspend_(&on_suspend)
+ {
+ this->reset_cancellation_state(enable_terminal_cancellation());
+ }
+
+ io_executor_type get_io_executor() const noexcept
+ {
+ return work_.head_.get_executor();
+ }
+
+ template <typename... Args>
+ [[nodiscard]] co_composed_completion<Args...> complete(Args&&... args)
+ requires requires { declval<Handler>()(std::forward<Args>(args)...); }
+ {
+ return co_composed_completion<Args...>(std::forward<Args>(args)...);
+ }
+
+ const Handler& handler() const noexcept
+ {
+ return handler_;
+ }
+
+private:
+ template <typename, typename, typename>
+ friend class co_composed_handler_base;
+ template <typename, typename, typename>
+ friend class co_composed_promise;
+ template <typename, typename, typename, typename>
+ friend class co_composed_promise_return_overload;
+ template <typename, typename, typename>
+ friend class co_composed_state_cancellation;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+ template <typename, typename, typename, typename...>
+ friend struct co_composed_state_default_cancellation_on_suspend_impl;
+
+ composed_work<Executors> work_;
+ Handler handler_;
+ co_composed_on_suspend* on_suspend_;
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_handler_cancellation
+{
+public:
+ using cancellation_slot_type = cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return static_cast<
+ const co_composed_handler_base<Executors, Handler, Return>*>(
+ this)->promise().state().get_cancellation_slot();
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+ requires is_same<
+ typename associated_cancellation_slot<
+ Handler, cancellation_slot
+ >::asio_associated_cancellation_slot_is_unspecialised,
+ void>::value
+class co_composed_handler_cancellation<Executors, Handler, Return>
+{
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_handler_base :
+ public co_composed_handler_cancellation<Executors, Handler, Return>
+{
+public:
+ co_composed_handler_base(
+ co_composed_promise<Executors, Handler, Return>& p) noexcept
+ : p_(&p)
+ {
+ }
+
+ co_composed_handler_base(co_composed_handler_base&& other) noexcept
+ : p_(std::exchange(other.p_, nullptr))
+ {
+ }
+
+ ~co_composed_handler_base()
+ {
+ if (p_) [[unlikely]]
+ p_->destroy();
+ }
+
+ co_composed_promise<Executors, Handler, Return>& promise() const noexcept
+ {
+ return *p_;
+ }
+
+protected:
+ void resume(void* result)
+ {
+ co_composed_on_suspend on_suspend{};
+ std::exchange(p_, nullptr)->resume(p_, result, on_suspend);
+ if (on_suspend.fn_)
+ on_suspend.fn_(on_suspend.arg_);
+ }
+
+private:
+ co_composed_promise<Executors, Handler, Return>* p_;
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename Signature>
+class co_composed_handler;
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_handler<Executors, Handler, Return, R(Args...)>
+ : public co_composed_handler_base<Executors, Handler, Return>
+{
+public:
+ using co_composed_handler_base<Executors,
+ Handler, Return>::co_composed_handler_base;
+
+ using result_type = std::tuple<decay_t<Args>...>;
+
+ template <typename... T>
+ void operator()(T&&... args)
+ {
+ result_type result(std::forward<T>(args)...);
+ this->resume(&result);
+ }
+
+ static auto on_resume(void* result)
+ {
+ auto& args = *static_cast<result_type*>(result);
+ if constexpr (sizeof...(Args) == 0)
+ return;
+ else if constexpr (sizeof...(Args) == 1)
+ return std::move(std::get<0>(args));
+ else
+ return std::move(args);
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_handler<Executors, Handler,
+ Return, R(asio::error_code, Args...)>
+ : public co_composed_handler_base<Executors, Handler, Return>
+{
+public:
+ using co_composed_handler_base<Executors,
+ Handler, Return>::co_composed_handler_base;
+
+ using args_type = std::tuple<decay_t<Args>...>;
+ using result_type = std::tuple<asio::error_code, args_type>;
+
+ template <typename... T>
+ void operator()(const asio::error_code& ec, T&&... args)
+ {
+ result_type result(ec, args_type(std::forward<T>(args)...));
+ this->resume(&result);
+ }
+
+ static auto on_resume(void* result)
+ {
+ auto& [ec, args] = *static_cast<result_type*>(result);
+ throw_error(ec);
+ if constexpr (sizeof...(Args) == 0)
+ return;
+ else if constexpr (sizeof...(Args) == 1)
+ return std::move(std::get<0>(args));
+ else
+ return std::move(args);
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_handler<Executors, Handler,
+ Return, R(std::exception_ptr, Args...)>
+ : public co_composed_handler_base<Executors, Handler, Return>
+{
+public:
+ using co_composed_handler_base<Executors,
+ Handler, Return>::co_composed_handler_base;
+
+ using args_type = std::tuple<decay_t<Args>...>;
+ using result_type = std::tuple<std::exception_ptr, args_type>;
+
+ template <typename... T>
+ void operator()(std::exception_ptr ex, T&&... args)
+ {
+ result_type result(std::move(ex), args_type(std::forward<T>(args)...));
+ this->resume(&result);
+ }
+
+ static auto on_resume(void* result)
+ {
+ auto& [ex, args] = *static_cast<result_type*>(result);
+ if (ex)
+ std::rethrow_exception(ex);
+ if constexpr (sizeof...(Args) == 0)
+ return;
+ else if constexpr (sizeof...(Args) == 1)
+ return std::move(std::get<0>(args));
+ else
+ return std::move(args);
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_promise_return;
+
+template <typename Executors, typename Handler>
+class co_composed_promise_return<Executors, Handler, co_composed_returns<>>
+{
+public:
+ auto final_suspend() noexcept
+ {
+ return suspend_never();
+ }
+
+ void return_void() noexcept
+ {
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename Signature>
+class co_composed_promise_return_overload;
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_promise_return_overload<
+ Executors, Handler, Return, R(Args...)>
+{
+public:
+ using derived_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<Args...>;
+
+ void return_value(std::tuple<Args...>&& value)
+ {
+ derived_type& promise = *static_cast<derived_type*>(this);
+ promise.state().return_value_ = std::move(value);
+ promise.state().work_.reset();
+ promise.state().on_suspend_->arg_ = this;
+ promise.state().on_suspend_->fn_ =
+ [](void* p)
+ {
+ auto& promise = *static_cast<derived_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+ return_type result(
+ std::move(std::get<return_type>(promise.state().return_value_)));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::apply(std::move(handler), std::move(result));
+ };
+ }
+};
+
+template <typename Executors, typename Handler, typename... Signatures>
+class co_composed_promise_return<Executors,
+ Handler, co_composed_returns<Signatures...>>
+ : public co_composed_promise_return_overload<Executors,
+ Handler, co_composed_returns<Signatures...>, Signatures>...
+{
+public:
+ auto final_suspend() noexcept
+ {
+ return suspend_always();
+ }
+
+ using co_composed_promise_return_overload<Executors, Handler,
+ co_composed_returns<Signatures...>, Signatures>::return_value...;
+
+private:
+ template <typename, typename, typename, typename>
+ friend class co_composed_promise_return_overload;
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_promise
+ : public co_composed_promise_return<Executors, Handler, Return>
+{
+public:
+ template <typename... Args>
+ void* operator new(std::size_t size,
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ {
+ block_allocator_type allocator(
+ (get_associated_allocator)(state.handler_,
+ recycling_allocator<void>()));
+
+ block* base_ptr = std::allocator_traits<block_allocator_type>::allocate(
+ allocator, blocks(sizeof(allocator_type)) + blocks(size));
+
+ new (static_cast<void*>(base_ptr)) allocator_type(std::move(allocator));
+
+ return base_ptr + blocks(sizeof(allocator_type));
+ }
+
+ template <typename C, typename... Args>
+ void* operator new(std::size_t size, C&&,
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ {
+ return co_composed_promise::operator new(size, state);
+ }
+
+ void operator delete(void* ptr, std::size_t size)
+ {
+ block* base_ptr = static_cast<block*>(ptr) - blocks(sizeof(allocator_type));
+
+ allocator_type* allocator_ptr = std::launder(
+ static_cast<allocator_type*>(static_cast<void*>(base_ptr)));
+
+ block_allocator_type block_allocator(std::move(*allocator_ptr));
+ allocator_ptr->~allocator_type();
+
+ std::allocator_traits<block_allocator_type>::deallocate(block_allocator,
+ base_ptr, blocks(sizeof(allocator_type)) + blocks(size));
+ }
+
+ template <typename... Args>
+ co_composed_promise(
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ : state_(state)
+ {
+ }
+
+ template <typename C, typename... Args>
+ co_composed_promise(C&&,
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ : state_(state)
+ {
+ }
+
+ void destroy() noexcept
+ {
+ coroutine_handle<co_composed_promise>::from_promise(*this).destroy();
+ }
+
+ void resume(co_composed_promise*& owner, void* result,
+ co_composed_on_suspend& on_suspend)
+ {
+ state_.on_suspend_ = &on_suspend;
+ state_.clear_cancellation_slot();
+ owner_ = &owner;
+ result_ = result;
+ coroutine_handle<co_composed_promise>::from_promise(*this).resume();
+ }
+
+ co_composed_state<Executors, Handler, Return>& state() noexcept
+ {
+ return state_;
+ }
+
+ void get_return_object() noexcept
+ {
+ }
+
+ auto initial_suspend() noexcept
+ {
+ return suspend_never();
+ }
+
+ void unhandled_exception()
+ {
+ if (owner_)
+ *owner_ = this;
+ throw;
+ }
+
+ template <async_operation Op>
+ auto await_transform(Op&& op
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , asio::detail::source_location location
+ = asio::detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ {
+ class [[nodiscard]] awaitable
+ {
+ public:
+ awaitable(Op&& op, co_composed_promise& promise
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , const asio::detail::source_location& location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ : op_(std::forward<Op>(op)),
+ promise_(promise)
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location_(location)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+ }
+
+ constexpr bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<co_composed_promise>)
+ {
+ if (promise_.state_.check_for_cancellation_on_suspend(promise_))
+ {
+ promise_.state_.on_suspend_->arg_ = this;
+ promise_.state_.on_suspend_->fn_ =
+ [](void* p)
+ {
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ ASIO_HANDLER_LOCATION((
+ static_cast<awaitable*>(p)->location_.file_name(),
+ static_cast<awaitable*>(p)->location_.line(),
+ static_cast<awaitable*>(p)->location_.function_name()));
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ std::forward<Op>(static_cast<awaitable*>(p)->op_)(
+ co_composed_handler<Executors, Handler,
+ Return, completion_signature_of_t<Op>>(
+ static_cast<awaitable*>(p)->promise_));
+ };
+ }
+ }
+
+ auto await_resume()
+ {
+ return co_composed_handler<Executors, Handler, Return,
+ completion_signature_of_t<Op>>::on_resume(promise_.result_);
+ }
+
+ private:
+ Op&& op_;
+ co_composed_promise& promise_;
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ asio::detail::source_location location_;
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ };
+
+ state_.check_for_cancellation_on_transform();
+ return awaitable{std::forward<Op>(op), *this
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ };
+ }
+
+ template <typename... Args>
+ auto yield_value(co_composed_completion<Args...>&& result)
+ {
+ class [[nodiscard]] awaitable
+ {
+ public:
+ awaitable(co_composed_completion<Args...>&& result,
+ co_composed_promise& promise)
+ : result_(std::move(result)),
+ promise_(promise)
+ {
+ }
+
+ constexpr bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<co_composed_promise>)
+ {
+ promise_.state_.work_.reset();
+ promise_.state_.on_suspend_->arg_ = this;
+ promise_.state_.on_suspend_->fn_ =
+ [](void* p)
+ {
+ awaitable& a = *static_cast<awaitable*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(a.promise_);
+
+ Handler handler(std::move(a.promise_.state_.handler_));
+ std::tuple<decay_t<Args>...> result(
+ std::move(static_cast<std::tuple<Args&&...>>(a.result_)));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::apply(std::move(handler), std::move(result));
+ };
+ }
+
+ void await_resume() noexcept
+ {
+ }
+
+ private:
+ co_composed_completion<Args...> result_;
+ co_composed_promise& promise_;
+ };
+
+ return awaitable{std::move(result), *this};
+ }
+
+private:
+ using allocator_type =
+ associated_allocator_t<Handler, recycling_allocator<void>>;
+
+ union block
+ {
+ std::max_align_t max_align;
+ alignas(allocator_type) char pad[alignof(allocator_type)];
+ };
+
+ using block_allocator_type =
+ typename std::allocator_traits<allocator_type>
+ ::template rebind_alloc<block>;
+
+ static constexpr std::size_t blocks(std::size_t size)
+ {
+ return (size + sizeof(block) - 1) / sizeof(block);
+ }
+
+ co_composed_state<Executors, Handler, Return>& state_;
+ co_composed_promise** owner_ = nullptr;
+ void* result_ = nullptr;
+};
+
+template <typename Implementation, typename Executors, typename... Signatures>
+class initiate_co_composed
+{
+public:
+ using executor_type = typename composed_io_executors<Executors>::head_type;
+
+ template <typename I>
+ initiate_co_composed(I&& impl, composed_io_executors<Executors>&& executors)
+ : implementation_(std::forward<I>(impl)),
+ executors_(std::move(executors))
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executors_.head_;
+ }
+
+ template <typename Handler, typename... InitArgs>
+ void operator()(Handler&& handler, InitArgs&&... init_args) const &
+ {
+ using handler_type = decay_t<Handler>;
+ using returns_type = co_composed_returns<Signatures...>;
+ co_composed_on_suspend on_suspend{};
+ implementation_(
+ co_composed_state<Executors, handler_type, returns_type>(
+ executors_, std::forward<Handler>(handler), on_suspend),
+ std::forward<InitArgs>(init_args)...);
+ if (on_suspend.fn_)
+ on_suspend.fn_(on_suspend.arg_);
+ }
+
+ template <typename Handler, typename... InitArgs>
+ void operator()(Handler&& handler, InitArgs&&... init_args) &&
+ {
+ using handler_type = decay_t<Handler>;
+ using returns_type = co_composed_returns<Signatures...>;
+ co_composed_on_suspend on_suspend{};
+ std::move(implementation_)(
+ co_composed_state<Executors, handler_type, returns_type>(
+ std::move(executors_), std::forward<Handler>(handler), on_suspend),
+ std::forward<InitArgs>(init_args)...);
+ if (on_suspend.fn_)
+ on_suspend.fn_(on_suspend.arg_);
+ }
+
+private:
+ Implementation implementation_;
+ composed_io_executors<Executors> executors_;
+};
+
+template <typename... Signatures, typename Implementation, typename Executors>
+inline initiate_co_composed<Implementation, Executors, Signatures...>
+make_initiate_co_composed(Implementation&& implementation,
+ composed_io_executors<Executors>&& executors)
+{
+ return initiate_co_composed<
+ decay_t<Implementation>, Executors, Signatures...>(
+ std::forward<Implementation>(implementation), std::move(executors));
+}
+
+} // namespace detail
+
+template <completion_signature... Signatures,
+ typename Implementation, typename... IoObjectsOrExecutors>
+inline auto co_composed(Implementation&& implementation,
+ IoObjectsOrExecutors&&... io_objects_or_executors)
+{
+ return detail::make_initiate_co_composed<Signatures...>(
+ std::forward<Implementation>(implementation),
+ detail::make_composed_io_executors(
+ detail::get_composed_io_executor(
+ std::forward<IoObjectsOrExecutors>(
+ io_objects_or_executors))...));
+}
+
+} // namespace experimental
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename Executors, typename Handler, typename Return,
+ typename Signature, typename DefaultCandidate>
+struct associator<Associator,
+ experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(
+ h.promise().state().handler());
+ }
+
+ static auto get(
+ const experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(
+ Associator<Handler, DefaultCandidate>::get(
+ h.promise().state().handler(), c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(
+ h.promise().state().handler(), c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#if !defined(GENERATING_DOCUMENTATION)
+# if defined(ASIO_HAS_STD_COROUTINE)
+namespace std {
+# else // defined(ASIO_HAS_STD_COROUTINE)
+namespace std { namespace experimental {
+# endif // defined(ASIO_HAS_STD_COROUTINE)
+
+template <typename C, typename Executors,
+ typename Handler, typename Return, typename... Args>
+struct coroutine_traits<void, C&,
+ asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
+{
+ using promise_type =
+ asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
+};
+
+template <typename C, typename Executors,
+ typename Handler, typename Return, typename... Args>
+struct coroutine_traits<void, C&&,
+ asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
+{
+ using promise_type =
+ asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename... Args>
+struct coroutine_traits<void,
+ asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
+{
+ using promise_type =
+ asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
+};
+
+# if defined(ASIO_HAS_STD_COROUTINE)
+} // namespace std
+# else // defined(ASIO_HAS_STD_COROUTINE)
+}} // namespace std::experimental
+# endif // defined(ASIO_HAS_STD_COROUTINE)
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/coro.hpp b/3rdparty/asio/include/asio/experimental/impl/coro.hpp
new file mode 100644
index 00000000000..872d1a0255c
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/coro.hpp
@@ -0,0 +1,1222 @@
+//
+// experimental/impl/coro.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_CORO_HPP
+#define ASIO_EXPERIMENTAL_IMPL_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/append.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/bind_allocator.hpp"
+#include "asio/deferred.hpp"
+#include "asio/experimental/detail/coro_completion_handler.hpp"
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro;
+
+namespace detail {
+
+struct coro_cancellation_source
+{
+ cancellation_slot slot;
+ cancellation_state state;
+ bool throw_if_cancelled_ = true;
+
+ void reset_cancellation_state()
+ {
+ state = cancellation_state(slot);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter)
+ {
+ state = cancellation_state(slot, static_cast<Filter&&>(filter));
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter)
+ {
+ state = cancellation_state(slot,
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ bool throw_if_cancelled() const
+ {
+ return throw_if_cancelled_;
+ }
+
+ void throw_if_cancelled(bool value)
+ {
+ throw_if_cancelled_ = value;
+ }
+};
+
+template <typename Signature, typename Return,
+ typename Executor, typename Allocator>
+struct coro_promise;
+
+template <typename T>
+struct is_noexcept : std::false_type
+{
+};
+
+template <typename Return, typename... Args>
+struct is_noexcept<Return(Args...)> : std::false_type
+{
+};
+
+template <typename Return, typename... Args>
+struct is_noexcept<Return(Args...) noexcept> : std::true_type
+{
+};
+
+template <typename T>
+constexpr bool is_noexcept_v = is_noexcept<T>::value;
+
+template <typename T>
+struct coro_error;
+
+template <>
+struct coro_error<asio::error_code>
+{
+ static asio::error_code invalid()
+ {
+ return asio::error::fault;
+ }
+
+ static asio::error_code cancelled()
+ {
+ return asio::error::operation_aborted;
+ }
+
+ static asio::error_code interrupted()
+ {
+ return asio::error::interrupted;
+ }
+
+ static asio::error_code done()
+ {
+ return asio::error::broken_pipe;
+ }
+};
+
+template <>
+struct coro_error<std::exception_ptr>
+{
+ static std::exception_ptr invalid()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::invalid()));
+ }
+
+ static std::exception_ptr cancelled()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::cancelled()));
+ }
+
+ static std::exception_ptr interrupted()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::interrupted()));
+ }
+
+ static std::exception_ptr done()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::done()));
+ }
+};
+
+template <typename T, typename Coroutine >
+struct coro_with_arg
+{
+ using coro_t = Coroutine;
+ T value;
+ coro_t& coro;
+
+ struct awaitable_t
+ {
+ T value;
+ coro_t& coro;
+
+ constexpr static bool await_ready() { return false; }
+
+ template <typename Y, typename R, typename E, typename A>
+ auto await_suspend(coroutine_handle<coro_promise<Y, R, E, A>> h)
+ -> coroutine_handle<>
+ {
+ auto& hp = h.promise();
+
+ if constexpr (!coro_promise<Y, R, E, A>::is_noexcept)
+ {
+ if ((hp.cancel->state.cancelled() != cancellation_type::none)
+ && hp.cancel->throw_if_cancelled_)
+ {
+ asio::detail::throw_error(
+ asio::error::operation_aborted, "coro-cancelled");
+ }
+ }
+
+ if (hp.get_executor() == coro.get_executor())
+ {
+ coro.coro_->awaited_from = h;
+ coro.coro_->reset_error();
+ coro.coro_->input_ = std::move(value);
+ coro.coro_->cancel = hp.cancel;
+ return coro.coro_->get_handle();
+ }
+ else
+ {
+ coro.coro_->awaited_from =
+ dispatch_coroutine(
+ asio::prefer(hp.get_executor(),
+ execution::outstanding_work.tracked),
+ [h]() mutable { h.resume(); }).handle;
+
+ coro.coro_->reset_error();
+ coro.coro_->input_ = std::move(value);
+
+ struct cancel_handler
+ {
+ using src = std::pair<cancellation_signal,
+ detail::coro_cancellation_source>;
+
+ std::shared_ptr<src> st = std::make_shared<src>();
+
+ cancel_handler(E e, coro_t& coro) : e(e), coro_(coro.coro_)
+ {
+ st->second.state =
+ cancellation_state(st->second.slot = st->first.slot());
+ }
+
+ E e;
+ typename coro_t::promise_type* coro_;
+
+ void operator()(cancellation_type ct)
+ {
+ asio::dispatch(e, [ct, st = st]() mutable
+ {
+ auto & [sig, state] = *st;
+ sig.emit(ct);
+ });
+ }
+ };
+
+ if (hp.cancel->state.slot().is_connected())
+ {
+ hp.cancel->state.slot().template emplace<cancel_handler>(
+ coro.get_executor(), coro);
+ }
+
+ auto hh = detail::coroutine_handle<
+ typename coro_t::promise_type>::from_promise(*coro.coro_);
+
+ return dispatch_coroutine(
+ coro.coro_->get_executor(), [hh]() mutable { hh.resume(); }).handle;
+ }
+ }
+
+ auto await_resume() -> typename coro_t::result_type
+ {
+ coro.coro_->cancel = nullptr;
+ coro.coro_->rethrow_if();
+ return std::move(coro.coro_->result_);
+ }
+ };
+
+ template <typename CompletionToken>
+ auto async_resume(CompletionToken&& token) &&
+ {
+ return coro.async_resume(std::move(value),
+ std::forward<CompletionToken>(token));
+ }
+
+ auto operator co_await() &&
+ {
+ return awaitable_t{std::move(value), coro};
+ }
+};
+
+template <bool IsNoexcept>
+struct coro_promise_error;
+
+template <>
+struct coro_promise_error<false>
+{
+ std::exception_ptr error_;
+
+ void reset_error()
+ {
+ error_ = std::exception_ptr{};
+ }
+
+ void unhandled_exception()
+ {
+ error_ = std::current_exception();
+ }
+
+ void rethrow_if()
+ {
+ if (error_)
+ std::rethrow_exception(error_);
+ }
+};
+
+#if defined(__GNUC__)
+# pragma GCC diagnostic push
+# if defined(__clang__)
+# pragma GCC diagnostic ignored "-Wexceptions"
+# else
+# pragma GCC diagnostic ignored "-Wterminate"
+# endif
+#elif defined(_MSC_VER)
+# pragma warning(push)
+# pragma warning (disable:4297)
+#endif
+
+template <>
+struct coro_promise_error<true>
+{
+ void reset_error()
+ {
+ }
+
+ void unhandled_exception() noexcept
+ {
+ throw;
+ }
+
+ void rethrow_if()
+ {
+ }
+};
+
+#if defined(__GNUC__)
+# pragma GCC diagnostic pop
+#elif defined(_MSC_VER)
+# pragma warning(pop)
+#endif
+
+template <typename T = void>
+struct yield_input
+{
+ T& value;
+ coroutine_handle<> awaited_from{noop_coroutine()};
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ template <typename U>
+ coroutine_handle<> await_suspend(coroutine_handle<U>) noexcept
+ {
+ return std::exchange(awaited_from, noop_coroutine());
+ }
+
+ T await_resume() const noexcept
+ {
+ return std::move(value);
+ }
+};
+
+template <>
+struct yield_input<void>
+{
+ coroutine_handle<> awaited_from{noop_coroutine()};
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ auto await_suspend(coroutine_handle<>) noexcept
+ {
+ return std::exchange(awaited_from, noop_coroutine());
+ }
+
+ constexpr void await_resume() const noexcept
+ {
+ }
+};
+
+struct coro_awaited_from
+{
+ coroutine_handle<> awaited_from{noop_coroutine()};
+
+ auto final_suspend() noexcept
+ {
+ struct suspendor
+ {
+ coroutine_handle<> awaited_from;
+
+ constexpr static bool await_ready() noexcept
+ {
+ return false;
+ }
+
+ auto await_suspend(coroutine_handle<>) noexcept
+ {
+ return std::exchange(awaited_from, noop_coroutine());
+ }
+
+ constexpr static void await_resume() noexcept
+ {
+ }
+ };
+
+ return suspendor{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ ~coro_awaited_from()
+ {
+ awaited_from.resume();
+ }//must be on the right executor
+};
+
+template <typename Yield, typename Input, typename Return>
+struct coro_promise_exchange : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, Return>;
+
+ result_type result_;
+ Input input_;
+
+ auto yield_value(Yield&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<Input>{std::move(input_),
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(const Yield& y)
+ {
+ result_ = y;
+ return yield_input<Input>{std::move(input_),
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_value(const Return& r)
+ {
+ result_ = r;
+ }
+
+ void return_value(Return&& r)
+ {
+ result_ = std::move(r);
+ }
+};
+
+template <typename YieldReturn>
+struct coro_promise_exchange<YieldReturn, void, YieldReturn> : coro_awaited_from
+{
+ using result_type = coro_result_t<YieldReturn, YieldReturn>;
+
+ result_type result_;
+
+ auto yield_value(const YieldReturn& y)
+ {
+ result_ = y;
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(YieldReturn&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_value(const YieldReturn& r)
+ {
+ result_ = r;
+ }
+
+ void return_value(YieldReturn&& r)
+ {
+ result_ = std::move(r);
+ }
+};
+
+template <typename Yield, typename Return>
+struct coro_promise_exchange<Yield, void, Return> : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, Return>;
+
+ result_type result_;
+
+ auto yield_value(const Yield& y)
+ {
+ result_.template emplace<0>(y);
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(Yield&& y)
+ {
+ result_.template emplace<0>(std::move(y));
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_value(const Return& r)
+ {
+ result_.template emplace<1>(r);
+ }
+
+ void return_value(Return&& r)
+ {
+ result_.template emplace<1>(std::move(r));
+ }
+};
+
+template <typename Yield, typename Input>
+struct coro_promise_exchange<Yield, Input, void> : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, void>;
+
+ result_type result_;
+ Input input_;
+
+ auto yield_value(Yield&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<Input>{input_,
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(const Yield& y)
+ {
+ result_ = y;
+ return yield_input<Input>{input_,
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_void()
+ {
+ result_.reset();
+ }
+};
+
+template <typename Return>
+struct coro_promise_exchange<void, void, Return> : coro_awaited_from
+{
+ using result_type = coro_result_t<void, Return>;
+
+ result_type result_;
+
+ void yield_value();
+
+ void return_value(const Return& r)
+ {
+ result_ = r;
+ }
+
+ void return_value(Return&& r)
+ {
+ result_ = std::move(r);
+ }
+};
+
+template <>
+struct coro_promise_exchange<void, void, void> : coro_awaited_from
+{
+ void return_void() {}
+
+ void yield_value();
+};
+
+template <typename Yield>
+struct coro_promise_exchange<Yield, void, void> : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, void>;
+
+ result_type result_;
+
+ auto yield_value(const Yield& y)
+ {
+ result_ = y;
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(Yield&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_void()
+ {
+ result_.reset();
+ }
+};
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro_promise final :
+ coro_promise_allocator<Allocator>,
+ coro_promise_error<coro_traits<Yield, Return, Executor>::is_noexcept>,
+ coro_promise_exchange<
+ typename coro_traits<Yield, Return, Executor>::yield_type,
+ typename coro_traits<Yield, Return, Executor>::input_type,
+ typename coro_traits<Yield, Return, Executor>::return_type>
+{
+ using coro_type = coro<Yield, Return, Executor, Allocator>;
+
+ auto handle()
+ {
+ return coroutine_handle<coro_promise>::from_promise(this);
+ }
+
+ using executor_type = Executor;
+
+ executor_type executor_;
+
+ std::optional<coro_cancellation_source> cancel_source;
+ coro_cancellation_source * cancel;
+
+ using cancellation_slot_type = asio::cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancel ? cancel->slot : cancellation_slot_type{};
+ }
+
+ using allocator_type =
+ typename std::allocator_traits<associated_allocator_t<Executor>>::
+ template rebind_alloc<std::byte>;
+ using traits = coro_traits<Yield, Return, Executor>;
+
+ using input_type = typename traits::input_type;
+ using yield_type = typename traits::yield_type;
+ using return_type = typename traits::return_type;
+ using error_type = typename traits::error_type;
+ using result_type = typename traits::result_type;
+ constexpr static bool is_noexcept = traits::is_noexcept;
+
+ auto get_executor() const -> Executor
+ {
+ return executor_;
+ }
+
+ auto get_handle()
+ {
+ return coroutine_handle<coro_promise>::from_promise(*this);
+ }
+
+ template <typename... Args>
+ coro_promise(Executor executor, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ executor, std::forward<Args>(args)...),
+ executor_(std::move(executor))
+ {
+ }
+
+ template <typename First, typename... Args>
+ coro_promise(First&& f, Executor executor, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ f, executor, std::forward<Args>(args)...),
+ executor_(std::move(executor))
+ {
+ }
+
+ template <typename First, detail::execution_context Context, typename... Args>
+ coro_promise(First&& f, Context&& ctx, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ f, ctx, std::forward<Args>(args)...),
+ executor_(ctx.get_executor())
+ {
+ }
+
+ template <detail::execution_context Context, typename... Args>
+ coro_promise(Context&& ctx, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ ctx, std::forward<Args>(args)...),
+ executor_(ctx.get_executor())
+ {
+ }
+
+ auto get_return_object()
+ {
+ return coro<Yield, Return, Executor, Allocator>{this};
+ }
+
+ auto initial_suspend() noexcept
+ {
+ return suspend_always{};
+ }
+
+ using coro_promise_exchange<
+ typename coro_traits<Yield, Return, Executor>::yield_type,
+ typename coro_traits<Yield, Return, Executor>::input_type,
+ typename coro_traits<Yield, Return, Executor>::return_type>::yield_value;
+
+ auto await_transform(this_coro::executor_t) const
+ {
+ struct exec_helper
+ {
+ const executor_type& value;
+
+ constexpr static bool await_ready() noexcept
+ {
+ return true;
+ }
+
+ constexpr static void await_suspend(coroutine_handle<>) noexcept
+ {
+ }
+
+ executor_type await_resume() const noexcept
+ {
+ return value;
+ }
+ };
+
+ return exec_helper{executor_};
+ }
+
+ auto await_transform(this_coro::cancellation_state_t) const
+ {
+ struct exec_helper
+ {
+ const asio::cancellation_state& value;
+
+ constexpr static bool await_ready() noexcept
+ {
+ return true;
+ }
+
+ constexpr static void await_suspend(coroutine_handle<>) noexcept
+ {
+ }
+
+ asio::cancellation_state await_resume() const noexcept
+ {
+ return value;
+ }
+ };
+ assert(cancel);
+ return exec_helper{cancel->state};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ auto await_transform(this_coro::reset_cancellation_state_0_t) noexcept
+ {
+ struct result
+ {
+ detail::coro_cancellation_source * src_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume() const
+ {
+ return src_->reset_cancellation_state();
+ }
+ };
+
+ return result{cancel};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ template <typename Filter>
+ auto await_transform(
+ this_coro::reset_cancellation_state_1_t<Filter> reset) noexcept
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+ Filter filter_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return src_->reset_cancellation_state(
+ static_cast<Filter&&>(filter_));
+ }
+ };
+
+ return result{cancel, static_cast<Filter&&>(reset.filter)};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ template <typename InFilter, typename OutFilter>
+ auto await_transform(
+ this_coro::reset_cancellation_state_2_t<InFilter, OutFilter> reset)
+ noexcept
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+ InFilter in_filter_;
+ OutFilter out_filter_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return src_->reset_cancellation_state(
+ static_cast<InFilter&&>(in_filter_),
+ static_cast<OutFilter&&>(out_filter_));
+ }
+ };
+
+ return result{cancel,
+ static_cast<InFilter&&>(reset.in_filter),
+ static_cast<OutFilter&&>(reset.out_filter)};
+ }
+
+ // This await transformation determines whether cancellation is propagated as
+ // an exception.
+ auto await_transform(this_coro::throw_if_cancelled_0_t) noexcept
+ requires (!is_noexcept)
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return src_->throw_if_cancelled();
+ }
+ };
+
+ return result{cancel};
+ }
+
+ // This await transformation sets whether cancellation is propagated as an
+ // exception.
+ auto await_transform(
+ this_coro::throw_if_cancelled_1_t throw_if_cancelled) noexcept
+ requires (!is_noexcept)
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+ bool value_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ src_->throw_if_cancelled(value_);
+ }
+ };
+
+ return result{cancel, throw_if_cancelled.value};
+ }
+
+ template <typename Yield_, typename Return_,
+ typename Executor_, typename Allocator_>
+ auto await_transform(coro<Yield_, Return_, Executor_, Allocator_>& kr)
+ -> decltype(auto)
+ {
+ return kr;
+ }
+
+ template <typename Yield_, typename Return_,
+ typename Executor_, typename Allocator_>
+ auto await_transform(coro<Yield_, Return_, Executor_, Allocator_>&& kr)
+ {
+ return std::move(kr);
+ }
+
+ template <typename T_, typename Coroutine >
+ auto await_transform(coro_with_arg<T_, Coroutine>&& kr) -> decltype(auto)
+ {
+ return std::move(kr);
+ }
+
+ template <typename T_>
+ requires requires(T_ t) {{ t.async_wait(deferred) }; }
+ auto await_transform(T_& t) -> decltype(auto)
+ {
+ return await_transform(t.async_wait(deferred));
+ }
+
+ template <typename Op>
+ auto await_transform(Op&& op,
+ constraint_t<is_async_operation<Op>::value> = 0)
+ {
+ if ((cancel->state.cancelled() != cancellation_type::none)
+ && cancel->throw_if_cancelled_)
+ {
+ asio::detail::throw_error(
+ asio::error::operation_aborted, "coro-cancelled");
+ }
+ using signature = completion_signature_of_t<Op>;
+ using result_type = detail::coro_completion_handler_type_t<signature>;
+ using handler_type =
+ typename detail::coro_completion_handler_type<signature>::template
+ completion_handler<coro_promise>;
+
+ struct aw_t
+ {
+ Op op;
+ std::optional<result_type> result;
+
+ constexpr static bool await_ready()
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<coro_promise> h)
+ {
+ std::move(op)(handler_type{h, result});
+ }
+
+ auto await_resume()
+ {
+ if constexpr (is_noexcept)
+ {
+ if constexpr (std::tuple_size_v<result_type> == 0u)
+ return;
+ else if constexpr (std::tuple_size_v<result_type> == 1u)
+ return std::get<0>(std::move(result).value());
+ else
+ return std::move(result).value();
+ }
+ else
+ return detail::coro_interpret_result(std::move(result).value());
+ }
+ };
+
+ return aw_t{std::move(op), {}};
+ }
+};
+
+} // namespace detail
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro<Yield, Return, Executor, Allocator>::awaitable_t
+{
+ coro& coro_;
+
+ constexpr static bool await_ready() { return false; }
+
+ template <typename Y, typename R, typename E, typename A>
+ auto await_suspend(
+ detail::coroutine_handle<detail::coro_promise<Y, R, E, A>> h)
+ -> detail::coroutine_handle<>
+ {
+ auto& hp = h.promise();
+
+ if constexpr (!detail::coro_promise<Y, R, E, A>::is_noexcept)
+ {
+ if ((hp.cancel->state.cancelled() != cancellation_type::none)
+ && hp.cancel->throw_if_cancelled_)
+ {
+ asio::detail::throw_error(
+ asio::error::operation_aborted, "coro-cancelled");
+ }
+ }
+
+ if (hp.get_executor() == coro_.get_executor())
+ {
+ coro_.coro_->awaited_from = h;
+ coro_.coro_->cancel = hp.cancel;
+ coro_.coro_->reset_error();
+
+ return coro_.coro_->get_handle();
+ }
+ else
+ {
+ coro_.coro_->awaited_from = detail::dispatch_coroutine(
+ asio::prefer(hp.get_executor(),
+ execution::outstanding_work.tracked),
+ [h]() mutable
+ {
+ h.resume();
+ }).handle;
+
+ coro_.coro_->reset_error();
+
+ struct cancel_handler
+ {
+ std::shared_ptr<std::pair<cancellation_signal,
+ detail::coro_cancellation_source>> st = std::make_shared<
+ std::pair<cancellation_signal, detail::coro_cancellation_source>>();
+
+ cancel_handler(E e, coro& coro) : e(e), coro_(coro.coro_)
+ {
+ st->second.state = cancellation_state(
+ st->second.slot = st->first.slot());
+ }
+
+ E e;
+ typename coro::promise_type* coro_;
+
+ void operator()(cancellation_type ct)
+ {
+ asio::dispatch(e,
+ [ct, st = st]() mutable
+ {
+ auto & [sig, state] = *st;
+ sig.emit(ct);
+ });
+ }
+ };
+
+ if (hp.cancel->state.slot().is_connected())
+ {
+ hp.cancel->state.slot().template emplace<cancel_handler>(
+ coro_.get_executor(), coro_);
+ }
+
+ auto hh = detail::coroutine_handle<
+ detail::coro_promise<Yield, Return, Executor, Allocator>>::from_promise(
+ *coro_.coro_);
+
+ return detail::dispatch_coroutine(
+ coro_.coro_->get_executor(),
+ [hh]() mutable { hh.resume(); }).handle;
+ }
+ }
+
+ auto await_resume() -> result_type
+ {
+ coro_.coro_->cancel = nullptr;
+ coro_.coro_->rethrow_if();
+ if constexpr (!std::is_void_v<result_type>)
+ return std::move(coro_.coro_->result_);
+ }
+};
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro<Yield, Return, Executor, Allocator>::initiate_async_resume
+{
+ typedef Executor executor_type;
+ typedef Allocator allocator_type;
+ typedef asio::cancellation_slot cancellation_slot_type;
+
+ explicit initiate_async_resume(coro* self)
+ : coro_(self->coro_)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return coro_->get_executor();
+ }
+
+ allocator_type get_allocator() const noexcept
+ {
+ return coro_->get_allocator();
+ }
+
+ template <typename E, typename WaitHandler>
+ auto handle(E exec, WaitHandler&& handler,
+ std::true_type /* error is noexcept */,
+ std::true_type /* result is void */) //noexcept
+ {
+ return [this, the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ assert(the_coro);
+
+ auto ch = detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ assert(ch && !ch.done());
+
+ the_coro->awaited_from = post_coroutine(std::move(exec), std::move(h));
+ the_coro->reset_error();
+ ch.resume();
+ };
+ }
+
+ template <typename E, typename WaitHandler>
+ requires (!std::is_void_v<result_type>)
+ auto handle(E exec, WaitHandler&& handler,
+ std::true_type /* error is noexcept */,
+ std::false_type /* result is void */) //noexcept
+ {
+ return [the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ assert(the_coro);
+
+ auto ch = detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ assert(ch && !ch.done());
+
+ the_coro->awaited_from = detail::post_coroutine(
+ exec, std::move(h), the_coro->result_).handle;
+ the_coro->reset_error();
+ ch.resume();
+ };
+ }
+
+ template <typename E, typename WaitHandler>
+ auto handle(E exec, WaitHandler&& handler,
+ std::false_type /* error is noexcept */,
+ std::true_type /* result is void */)
+ {
+ return [the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ if (!the_coro)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid()));
+
+ auto ch = detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ if (!ch)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid()));
+ else if (ch.done())
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::done()));
+ else
+ {
+ the_coro->awaited_from = detail::post_coroutine(
+ exec, std::move(h), the_coro->error_).handle;
+ the_coro->reset_error();
+ ch.resume();
+ }
+ };
+ }
+
+ template <typename E, typename WaitHandler>
+ auto handle(E exec, WaitHandler&& handler,
+ std::false_type /* error is noexcept */,
+ std::false_type /* result is void */)
+ {
+ return [the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ if (!the_coro)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid(), result_type{}));
+
+ auto ch =
+ detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ if (!ch)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid(), result_type{}));
+ else if (ch.done())
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::done(), result_type{}));
+ else
+ {
+ the_coro->awaited_from = detail::post_coroutine(
+ exec, std::move(h), the_coro->error_, the_coro->result_).handle;
+ the_coro->reset_error();
+ ch.resume();
+ }
+ };
+ }
+
+ template <typename WaitHandler>
+ void operator()(WaitHandler&& handler)
+ {
+ const auto exec = asio::prefer(
+ get_associated_executor(handler, get_executor()),
+ execution::outstanding_work.tracked);
+
+ coro_->cancel = &coro_->cancel_source.emplace();
+ coro_->cancel->state = cancellation_state(
+ coro_->cancel->slot = get_associated_cancellation_slot(handler));
+ asio::dispatch(get_executor(),
+ handle(exec, std::forward<WaitHandler>(handler),
+ std::integral_constant<bool, is_noexcept>{},
+ std::is_void<result_type>{}));
+ }
+
+ template <typename WaitHandler, typename Input>
+ void operator()(WaitHandler&& handler, Input&& input)
+ {
+ const auto exec = asio::prefer(
+ get_associated_executor(handler, get_executor()),
+ execution::outstanding_work.tracked);
+
+ coro_->cancel = &coro_->cancel_source.emplace();
+ coro_->cancel->state = cancellation_state(
+ coro_->cancel->slot = get_associated_cancellation_slot(handler));
+ asio::dispatch(get_executor(),
+ [h = handle(exec, std::forward<WaitHandler>(handler),
+ std::integral_constant<bool, is_noexcept>{},
+ std::is_void<result_type>{}),
+ in = std::forward<Input>(input), the_coro = coro_]() mutable
+ {
+ the_coro->input_ = std::move(in);
+ std::move(h)();
+ });
+ }
+
+private:
+ typename coro::promise_type* coro_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp b/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp
new file mode 100644
index 00000000000..75e8a151876
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp
@@ -0,0 +1,788 @@
+//
+// experimental/impl/parallel_group.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_EXPERIMENTAL_PARALLEL_GROUP_HPP
+#define ASIO_IMPL_EXPERIMENTAL_PARALLEL_GROUP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <atomic>
+#include <deque>
+#include <memory>
+#include <new>
+#include <tuple>
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/dispatch.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+// Stores the result from an individual asynchronous operation.
+template <typename T, typename = void>
+struct parallel_group_op_result
+{
+public:
+ parallel_group_op_result()
+ : has_value_(false)
+ {
+ }
+
+ parallel_group_op_result(parallel_group_op_result&& other)
+ : has_value_(other.has_value_)
+ {
+ if (has_value_)
+ new (&u_.value_) T(std::move(other.get()));
+ }
+
+ ~parallel_group_op_result()
+ {
+ if (has_value_)
+ u_.value_.~T();
+ }
+
+ T& get() noexcept
+ {
+ return u_.value_;
+ }
+
+ template <typename... Args>
+ void emplace(Args&&... args)
+ {
+ new (&u_.value_) T(std::forward<Args>(args)...);
+ has_value_ = true;
+ }
+
+private:
+ union u
+ {
+ u() {}
+ ~u() {}
+ char c_;
+ T value_;
+ } u_;
+ bool has_value_;
+};
+
+// Proxy completion handler for the group of parallel operatations. Unpacks and
+// concatenates the individual operations' results, and invokes the user's
+// completion handler.
+template <typename Handler, typename... Ops>
+struct parallel_group_completion_handler
+{
+ typedef decay_t<
+ prefer_result_t<
+ associated_executor_t<Handler>,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ parallel_group_completion_handler(Handler&& h)
+ : handler_(std::move(h)),
+ executor_(
+ asio::prefer(
+ asio::get_associated_executor(handler_),
+ execution::outstanding_work.tracked))
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ void operator()()
+ {
+ this->invoke(asio::detail::make_index_sequence<sizeof...(Ops)>());
+ }
+
+ template <std::size_t... I>
+ void invoke(asio::detail::index_sequence<I...>)
+ {
+ this->invoke(std::tuple_cat(std::move(std::get<I>(args_).get())...));
+ }
+
+ template <typename... Args>
+ void invoke(std::tuple<Args...>&& args)
+ {
+ this->invoke(std::move(args),
+ asio::detail::index_sequence_for<Args...>());
+ }
+
+ template <typename... Args, std::size_t... I>
+ void invoke(std::tuple<Args...>&& args,
+ asio::detail::index_sequence<I...>)
+ {
+ std::move(handler_)(completion_order_, std::move(std::get<I>(args))...);
+ }
+
+ Handler handler_;
+ executor_type executor_;
+ std::array<std::size_t, sizeof...(Ops)> completion_order_{};
+ std::tuple<
+ parallel_group_op_result<
+ typename parallel_op_signature_as_tuple<
+ completion_signature_of_t<Ops>
+ >::type
+ >...
+ > args_{};
+};
+
+// Shared state for the parallel group.
+template <typename Condition, typename Handler, typename... Ops>
+struct parallel_group_state
+{
+ parallel_group_state(Condition&& c, Handler&& h)
+ : cancellation_condition_(std::move(c)),
+ handler_(std::move(h))
+ {
+ }
+
+ // The number of operations that have completed so far. Used to determine the
+ // order of completion.
+ std::atomic<unsigned int> completed_{0};
+
+ // The non-none cancellation type that resulted from a cancellation condition.
+ // Stored here for use by the group's initiating function.
+ std::atomic<cancellation_type_t> cancel_type_{cancellation_type::none};
+
+ // The number of cancellations that have been requested, either on completion
+ // of the operations within the group, or via the cancellation slot for the
+ // group operation. Initially set to the number of operations to prevent
+ // cancellation signals from being emitted until after all of the group's
+ // operations' initiating functions have completed.
+ std::atomic<unsigned int> cancellations_requested_{sizeof...(Ops)};
+
+ // The number of operations that are yet to complete. Used to determine when
+ // it is safe to invoke the user's completion handler.
+ std::atomic<unsigned int> outstanding_{sizeof...(Ops)};
+
+ // The cancellation signals for each operation in the group.
+ asio::cancellation_signal cancellation_signals_[sizeof...(Ops)];
+
+ // The cancellation condition is used to determine whether the results from an
+ // individual operation warrant a cancellation request for the whole group.
+ Condition cancellation_condition_;
+
+ // The proxy handler to be invoked once all operations in the group complete.
+ parallel_group_completion_handler<Handler, Ops...> handler_;
+};
+
+// Handler for an individual operation within the parallel group.
+template <std::size_t I, typename Condition, typename Handler, typename... Ops>
+struct parallel_group_op_handler
+{
+ typedef asio::cancellation_slot cancellation_slot_type;
+
+ parallel_group_op_handler(
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state)
+ : state_(std::move(state))
+ {
+ }
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return state_->cancellation_signals_[I].slot();
+ }
+
+ template <typename... Args>
+ void operator()(Args... args)
+ {
+ // Capture this operation into the completion order.
+ state_->handler_.completion_order_[state_->completed_++] = I;
+
+ // Determine whether the results of this operation require cancellation of
+ // the whole group.
+ cancellation_type_t cancel_type = state_->cancellation_condition_(args...);
+
+ // Capture the result of the operation into the proxy completion handler.
+ std::get<I>(state_->handler_.args_).emplace(std::move(args)...);
+
+ if (cancel_type != cancellation_type::none)
+ {
+ // Save the type for potential use by the group's initiating function.
+ state_->cancel_type_ = cancel_type;
+
+ // If we are the first operation to request cancellation, emit a signal
+ // for each operation in the group.
+ if (state_->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < sizeof...(Ops); ++i)
+ if (i != I)
+ state_->cancellation_signals_[i].emit(cancel_type);
+ }
+
+ // If this is the last outstanding operation, invoke the user's handler.
+ if (--state_->outstanding_ == 0)
+ asio::dispatch(std::move(state_->handler_));
+ }
+
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state_;
+};
+
+// Handler for an individual operation within the parallel group that has an
+// explicitly specified executor.
+template <typename Executor, std::size_t I,
+ typename Condition, typename Handler, typename... Ops>
+struct parallel_group_op_handler_with_executor :
+ parallel_group_op_handler<I, Condition, Handler, Ops...>
+{
+ typedef parallel_group_op_handler<I, Condition, Handler, Ops...> base_type;
+ typedef asio::cancellation_slot cancellation_slot_type;
+ typedef Executor executor_type;
+
+ parallel_group_op_handler_with_executor(
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state,
+ executor_type ex)
+ : parallel_group_op_handler<I, Condition, Handler, Ops...>(std::move(state))
+ {
+ cancel_proxy_ =
+ &this->state_->cancellation_signals_[I].slot().template
+ emplace<cancel_proxy>(this->state_, std::move(ex));
+ }
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancel_proxy_->signal_.slot();
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return cancel_proxy_->executor_;
+ }
+
+ // Proxy handler that forwards the emitted signal to the correct executor.
+ struct cancel_proxy
+ {
+ cancel_proxy(
+ std::shared_ptr<parallel_group_state<
+ Condition, Handler, Ops...>> state,
+ executor_type ex)
+ : state_(std::move(state)),
+ executor_(std::move(ex))
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (auto state = state_.lock())
+ {
+ asio::cancellation_signal* sig = &signal_;
+ asio::dispatch(executor_,
+ [state, sig, type]{ sig->emit(type); });
+ }
+ }
+
+ std::weak_ptr<parallel_group_state<Condition, Handler, Ops...>> state_;
+ asio::cancellation_signal signal_;
+ executor_type executor_;
+ };
+
+ cancel_proxy* cancel_proxy_;
+};
+
+// Helper to launch an operation using the correct executor, if any.
+template <std::size_t I, typename Op, typename = void>
+struct parallel_group_op_launcher
+{
+ template <typename Condition, typename Handler, typename... Ops>
+ static void launch(Op& op,
+ const std::shared_ptr<parallel_group_state<
+ Condition, Handler, Ops...>>& state)
+ {
+ typedef associated_executor_t<Op> ex_type;
+ ex_type ex = asio::get_associated_executor(op);
+ std::move(op)(
+ parallel_group_op_handler_with_executor<ex_type, I,
+ Condition, Handler, Ops...>(state, std::move(ex)));
+ }
+};
+
+// Specialised launcher for operations that specify no executor.
+template <std::size_t I, typename Op>
+struct parallel_group_op_launcher<I, Op,
+ enable_if_t<
+ is_same<
+ typename associated_executor<
+ Op>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ template <typename Condition, typename Handler, typename... Ops>
+ static void launch(Op& op,
+ const std::shared_ptr<parallel_group_state<
+ Condition, Handler, Ops...>>& state)
+ {
+ std::move(op)(
+ parallel_group_op_handler<I, Condition, Handler, Ops...>(state));
+ }
+};
+
+template <typename Condition, typename Handler, typename... Ops>
+struct parallel_group_cancellation_handler
+{
+ parallel_group_cancellation_handler(
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state)
+ : state_(std::move(state))
+ {
+ }
+
+ void operator()(cancellation_type_t cancel_type)
+ {
+ // If we are the first place to request cancellation, i.e. no operation has
+ // yet completed and requested cancellation, emit a signal for each
+ // operation in the group.
+ if (cancel_type != cancellation_type::none)
+ if (auto state = state_.lock())
+ if (state->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < sizeof...(Ops); ++i)
+ state->cancellation_signals_[i].emit(cancel_type);
+ }
+
+ std::weak_ptr<parallel_group_state<Condition, Handler, Ops...>> state_;
+};
+
+template <typename Condition, typename Handler,
+ typename... Ops, std::size_t... I>
+void parallel_group_launch(Condition cancellation_condition, Handler handler,
+ std::tuple<Ops...>& ops, asio::detail::index_sequence<I...>)
+{
+ // Get the user's completion handler's cancellation slot, so that we can allow
+ // cancellation of the entire group.
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Create the shared state for the operation.
+ typedef parallel_group_state<Condition, Handler, Ops...> state_type;
+ std::shared_ptr<state_type> state = std::allocate_shared<state_type>(
+ asio::detail::recycling_allocator<state_type,
+ asio::detail::thread_info_base::parallel_group_tag>(),
+ std::move(cancellation_condition), std::move(handler));
+
+ // Initiate each individual operation in the group.
+ int fold[] = { 0,
+ ( parallel_group_op_launcher<I, Ops>::launch(std::get<I>(ops), state),
+ 0 )...
+ };
+ (void)fold;
+
+ // Check if any of the operations has already requested cancellation, and if
+ // so, emit a signal for each operation in the group.
+ if ((state->cancellations_requested_ -= sizeof...(Ops)) > 0)
+ for (auto& signal : state->cancellation_signals_)
+ signal.emit(state->cancel_type_);
+
+ // Register a handler with the user's completion handler's cancellation slot.
+ if (slot.is_connected())
+ slot.template emplace<
+ parallel_group_cancellation_handler<
+ Condition, Handler, Ops...>>(state);
+}
+
+// Proxy completion handler for the ranged group of parallel operatations.
+// Unpacks and recombines the individual operations' results, and invokes the
+// user's completion handler.
+template <typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_completion_handler
+{
+ typedef decay_t<
+ prefer_result_t<
+ associated_executor_t<Handler>,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ typedef typename parallel_op_signature_as_tuple<
+ completion_signature_of_t<Op>
+ >::type op_tuple_type;
+
+ typedef parallel_group_op_result<op_tuple_type> op_result_type;
+
+ ranged_parallel_group_completion_handler(Handler&& h,
+ std::size_t size, const Allocator& allocator)
+ : handler_(std::move(h)),
+ executor_(
+ asio::prefer(
+ asio::get_associated_executor(handler_),
+ execution::outstanding_work.tracked)),
+ allocator_(allocator),
+ completion_order_(size, 0,
+ ASIO_REBIND_ALLOC(Allocator, std::size_t)(allocator)),
+ args_(ASIO_REBIND_ALLOC(Allocator, op_result_type)(allocator))
+ {
+ for (std::size_t i = 0; i < size; ++i)
+ args_.emplace_back();
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ void operator()()
+ {
+ this->invoke(
+ asio::detail::make_index_sequence<
+ std::tuple_size<op_tuple_type>::value>());
+ }
+
+ template <std::size_t... I>
+ void invoke(asio::detail::index_sequence<I...>)
+ {
+ typedef typename parallel_op_signature_as_tuple<
+ typename ranged_parallel_group_signature<
+ completion_signature_of_t<Op>,
+ Allocator
+ >::raw_type
+ >::type vectors_type;
+
+ // Construct all result vectors using the supplied allocator.
+ vectors_type vectors{
+ typename std::tuple_element<I, vectors_type>::type(
+ ASIO_REBIND_ALLOC(Allocator, int)(allocator_))...};
+
+ // Reserve sufficient space in each of the result vectors.
+ int reserve_fold[] = { 0,
+ ( std::get<I>(vectors).reserve(completion_order_.size()),
+ 0 )...
+ };
+ (void)reserve_fold;
+
+ // Copy the results from all operations into the result vectors.
+ for (std::size_t idx = 0; idx < completion_order_.size(); ++idx)
+ {
+ int pushback_fold[] = { 0,
+ ( std::get<I>(vectors).push_back(
+ std::move(std::get<I>(args_[idx].get()))),
+ 0 )...
+ };
+ (void)pushback_fold;
+ }
+
+ std::move(handler_)(std::move(completion_order_),
+ std::move(std::get<I>(vectors))...);
+ }
+
+ Handler handler_;
+ executor_type executor_;
+ Allocator allocator_;
+ std::vector<std::size_t,
+ ASIO_REBIND_ALLOC(Allocator, std::size_t)> completion_order_;
+ std::deque<op_result_type,
+ ASIO_REBIND_ALLOC(Allocator, op_result_type)> args_;
+};
+
+// Shared state for the parallel group.
+template <typename Condition, typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_state
+{
+ ranged_parallel_group_state(Condition&& c, Handler&& h,
+ std::size_t size, const Allocator& allocator)
+ : cancellations_requested_(size),
+ outstanding_(size),
+ cancellation_signals_(
+ ASIO_REBIND_ALLOC(Allocator,
+ asio::cancellation_signal)(allocator)),
+ cancellation_condition_(std::move(c)),
+ handler_(std::move(h), size, allocator)
+ {
+ for (std::size_t i = 0; i < size; ++i)
+ cancellation_signals_.emplace_back();
+ }
+
+ // The number of operations that have completed so far. Used to determine the
+ // order of completion.
+ std::atomic<unsigned int> completed_{0};
+
+ // The non-none cancellation type that resulted from a cancellation condition.
+ // Stored here for use by the group's initiating function.
+ std::atomic<cancellation_type_t> cancel_type_{cancellation_type::none};
+
+ // The number of cancellations that have been requested, either on completion
+ // of the operations within the group, or via the cancellation slot for the
+ // group operation. Initially set to the number of operations to prevent
+ // cancellation signals from being emitted until after all of the group's
+ // operations' initiating functions have completed.
+ std::atomic<unsigned int> cancellations_requested_;
+
+ // The number of operations that are yet to complete. Used to determine when
+ // it is safe to invoke the user's completion handler.
+ std::atomic<unsigned int> outstanding_;
+
+ // The cancellation signals for each operation in the group.
+ std::deque<asio::cancellation_signal,
+ ASIO_REBIND_ALLOC(Allocator, asio::cancellation_signal)>
+ cancellation_signals_;
+
+ // The cancellation condition is used to determine whether the results from an
+ // individual operation warrant a cancellation request for the whole group.
+ Condition cancellation_condition_;
+
+ // The proxy handler to be invoked once all operations in the group complete.
+ ranged_parallel_group_completion_handler<Handler, Op, Allocator> handler_;
+};
+
+// Handler for an individual operation within the parallel group.
+template <typename Condition, typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_op_handler
+{
+ typedef asio::cancellation_slot cancellation_slot_type;
+
+ ranged_parallel_group_op_handler(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state,
+ std::size_t idx)
+ : state_(std::move(state)),
+ idx_(idx)
+ {
+ }
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return state_->cancellation_signals_[idx_].slot();
+ }
+
+ template <typename... Args>
+ void operator()(Args... args)
+ {
+ // Capture this operation into the completion order.
+ state_->handler_.completion_order_[state_->completed_++] = idx_;
+
+ // Determine whether the results of this operation require cancellation of
+ // the whole group.
+ cancellation_type_t cancel_type = state_->cancellation_condition_(args...);
+
+ // Capture the result of the operation into the proxy completion handler.
+ state_->handler_.args_[idx_].emplace(std::move(args)...);
+
+ if (cancel_type != cancellation_type::none)
+ {
+ // Save the type for potential use by the group's initiating function.
+ state_->cancel_type_ = cancel_type;
+
+ // If we are the first operation to request cancellation, emit a signal
+ // for each operation in the group.
+ if (state_->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < state_->cancellation_signals_.size(); ++i)
+ if (i != idx_)
+ state_->cancellation_signals_[i].emit(cancel_type);
+ }
+
+ // If this is the last outstanding operation, invoke the user's handler.
+ if (--state_->outstanding_ == 0)
+ asio::dispatch(std::move(state_->handler_));
+ }
+
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state_;
+ std::size_t idx_;
+};
+
+// Handler for an individual operation within the parallel group that has an
+// explicitly specified executor.
+template <typename Executor, typename Condition,
+ typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_op_handler_with_executor :
+ ranged_parallel_group_op_handler<Condition, Handler, Op, Allocator>
+{
+ typedef ranged_parallel_group_op_handler<
+ Condition, Handler, Op, Allocator> base_type;
+ typedef asio::cancellation_slot cancellation_slot_type;
+ typedef Executor executor_type;
+
+ ranged_parallel_group_op_handler_with_executor(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state,
+ executor_type ex, std::size_t idx)
+ : ranged_parallel_group_op_handler<Condition, Handler, Op, Allocator>(
+ std::move(state), idx)
+ {
+ cancel_proxy_ =
+ &this->state_->cancellation_signals_[idx].slot().template
+ emplace<cancel_proxy>(this->state_, std::move(ex));
+ }
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancel_proxy_->signal_.slot();
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return cancel_proxy_->executor_;
+ }
+
+ // Proxy handler that forwards the emitted signal to the correct executor.
+ struct cancel_proxy
+ {
+ cancel_proxy(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state,
+ executor_type ex)
+ : state_(std::move(state)),
+ executor_(std::move(ex))
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (auto state = state_.lock())
+ {
+ asio::cancellation_signal* sig = &signal_;
+ asio::dispatch(executor_,
+ [state, sig, type]{ sig->emit(type); });
+ }
+ }
+
+ std::weak_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state_;
+ asio::cancellation_signal signal_;
+ executor_type executor_;
+ };
+
+ cancel_proxy* cancel_proxy_;
+};
+
+template <typename Condition, typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_cancellation_handler
+{
+ ranged_parallel_group_cancellation_handler(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state)
+ : state_(std::move(state))
+ {
+ }
+
+ void operator()(cancellation_type_t cancel_type)
+ {
+ // If we are the first place to request cancellation, i.e. no operation has
+ // yet completed and requested cancellation, emit a signal for each
+ // operation in the group.
+ if (cancel_type != cancellation_type::none)
+ if (auto state = state_.lock())
+ if (state->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < state->cancellation_signals_.size(); ++i)
+ state->cancellation_signals_[i].emit(cancel_type);
+ }
+
+ std::weak_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state_;
+};
+
+template <typename Condition, typename Handler,
+ typename Range, typename Allocator>
+void ranged_parallel_group_launch(Condition cancellation_condition,
+ Handler handler, Range&& range, const Allocator& allocator)
+{
+ // Get the user's completion handler's cancellation slot, so that we can allow
+ // cancellation of the entire group.
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // The type of the asynchronous operation.
+ typedef decay_t<decltype(*declval<typename Range::iterator>())> op_type;
+
+ // Create the shared state for the operation.
+ typedef ranged_parallel_group_state<Condition,
+ Handler, op_type, Allocator> state_type;
+ std::shared_ptr<state_type> state = std::allocate_shared<state_type>(
+ asio::detail::recycling_allocator<state_type,
+ asio::detail::thread_info_base::parallel_group_tag>(),
+ std::move(cancellation_condition),
+ std::move(handler), range.size(), allocator);
+
+ std::size_t idx = 0;
+ for (auto&& op : std::forward<Range>(range))
+ {
+ typedef associated_executor_t<op_type> ex_type;
+ ex_type ex = asio::get_associated_executor(op);
+ std::move(op)(
+ ranged_parallel_group_op_handler_with_executor<
+ ex_type, Condition, Handler, op_type, Allocator>(
+ state, std::move(ex), idx++));
+ }
+
+ // Check if any of the operations has already requested cancellation, and if
+ // so, emit a signal for each operation in the group.
+ if ((state->cancellations_requested_ -= range.size()) > 0)
+ for (auto& signal : state->cancellation_signals_)
+ signal.emit(state->cancel_type_);
+
+ // Register a handler with the user's completion handler's cancellation slot.
+ if (slot.is_connected())
+ slot.template emplace<
+ ranged_parallel_group_cancellation_handler<
+ Condition, Handler, op_type, Allocator>>(state);
+}
+
+} // namespace detail
+} // namespace experimental
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Ops, typename DefaultCandidate>
+struct associator<Associator,
+ experimental::detail::parallel_group_completion_handler<Handler, Ops...>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::parallel_group_completion_handler<
+ Handler, Ops...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const experimental::detail::parallel_group_completion_handler<
+ Handler, Ops...>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+template <template <typename, typename> class Associator, typename Handler,
+ typename Op, typename Allocator, typename DefaultCandidate>
+struct associator<Associator,
+ experimental::detail::ranged_parallel_group_completion_handler<
+ Handler, Op, Allocator>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::ranged_parallel_group_completion_handler<
+ Handler, Op, Allocator>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const experimental::detail::ranged_parallel_group_completion_handler<
+ Handler, Op, Allocator>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_EXPERIMENTAL_PARALLEL_GROUP_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/promise.hpp b/3rdparty/asio/include/asio/experimental/impl/promise.hpp
new file mode 100644
index 00000000000..a80cf110baa
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/promise.hpp
@@ -0,0 +1,255 @@
+//
+// experimental/impl/promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_IMPL_PROMISE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/detail/utility.hpp"
+#include "asio/error.hpp"
+#include "asio/system_error.hpp"
+#include <tuple>
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template<typename Signature = void(),
+ typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
+struct promise;
+
+namespace detail {
+
+template<typename Signature, typename Executor, typename Allocator>
+struct promise_impl;
+
+template<typename... Ts, typename Executor, typename Allocator>
+struct promise_impl<void(Ts...), Executor, Allocator>
+{
+ using result_type = std::tuple<Ts...>;
+
+ promise_impl(Allocator allocator, Executor executor)
+ : allocator(std::move(allocator)), executor(std::move(executor))
+ {
+ }
+
+ promise_impl(const promise_impl&) = delete;
+
+ ~promise_impl()
+ {
+ if (completion)
+ this->cancel_();
+
+ if (done)
+ reinterpret_cast<result_type*>(&result)->~result_type();
+ }
+
+ aligned_storage_t<sizeof(result_type), alignof(result_type)> result;
+ std::atomic<bool> done{false};
+ cancellation_signal cancel;
+ Allocator allocator;
+ Executor executor;
+
+ template<typename Func, std::size_t... Idx>
+ void apply_impl(Func f, asio::detail::index_sequence<Idx...>)
+ {
+ auto& result_type = *reinterpret_cast<promise_impl::result_type*>(&result);
+ f(std::get<Idx>(std::move(result_type))...);
+ }
+
+ using allocator_type = Allocator;
+ allocator_type get_allocator() {return allocator;}
+
+ using executor_type = Executor;
+ executor_type get_executor() {return executor;}
+
+ template<typename Func>
+ void apply(Func f)
+ {
+ apply_impl(std::forward<Func>(f),
+ asio::detail::make_index_sequence<sizeof...(Ts)>{});
+ }
+
+ struct completion_base
+ {
+ virtual void invoke(Ts&&...ts) = 0;
+ };
+
+ template<typename Alloc, typename WaitHandler_>
+ struct completion_impl final : completion_base
+ {
+ WaitHandler_ handler;
+ Alloc allocator;
+ void invoke(Ts&&... ts)
+ {
+ auto h = std::move(handler);
+
+ using alloc_t = typename std::allocator_traits<
+ typename asio::decay<Alloc>::type>::template
+ rebind_alloc<completion_impl>;
+
+ alloc_t alloc_{allocator};
+ this->~completion_impl();
+ std::allocator_traits<alloc_t>::deallocate(alloc_, this, 1u);
+ std::move(h)(std::forward<Ts>(ts)...);
+ }
+
+ template<typename Alloc_, typename Handler_>
+ completion_impl(Alloc_&& alloc, Handler_&& wh)
+ : handler(std::forward<Handler_>(wh)),
+ allocator(std::forward<Alloc_>(alloc))
+ {
+ }
+ };
+
+ completion_base* completion = nullptr;
+ typename asio::aligned_storage<sizeof(void*) * 4,
+ alignof(completion_base)>::type completion_opt;
+
+ template<typename Alloc, typename Handler>
+ void set_completion(Alloc&& alloc, Handler&& handler)
+ {
+ if (completion)
+ cancel_();
+
+ using impl_t = completion_impl<
+ typename asio::decay<Alloc>::type, Handler>;
+ using alloc_t = typename std::allocator_traits<
+ typename asio::decay<Alloc>::type>::template rebind_alloc<impl_t>;
+
+ alloc_t alloc_{alloc};
+ auto p = std::allocator_traits<alloc_t>::allocate(alloc_, 1u);
+ completion = new (p) impl_t(std::forward<Alloc>(alloc),
+ std::forward<Handler>(handler));
+ }
+
+ template<typename... T_>
+ void complete(T_&&... ts)
+ {
+ assert(completion);
+ std::exchange(completion, nullptr)->invoke(std::forward<T_>(ts)...);
+ }
+
+ template<std::size_t... Idx>
+ void complete_with_result_impl(asio::detail::index_sequence<Idx...>)
+ {
+ auto& result_type = *reinterpret_cast<promise_impl::result_type*>(&result);
+ this->complete(std::get<Idx>(std::move(result_type))...);
+ }
+
+ void complete_with_result()
+ {
+ complete_with_result_impl(
+ asio::detail::make_index_sequence<sizeof...(Ts)>{});
+ }
+
+ template<typename... T_>
+ void cancel_impl_(std::exception_ptr*, T_*...)
+ {
+ complete(
+ std::make_exception_ptr(
+ asio::system_error(
+ asio::error::operation_aborted)),
+ T_{}...);
+ }
+
+ template<typename... T_>
+ void cancel_impl_(asio::error_code*, T_*...)
+ {
+ complete(asio::error::operation_aborted, T_{}...);
+ }
+
+ template<typename... T_>
+ void cancel_impl_(T_*...)
+ {
+ complete(T_{}...);
+ }
+
+ void cancel_()
+ {
+ cancel_impl_(static_cast<Ts*>(nullptr)...);
+ }
+};
+
+template<typename Signature = void(),
+ typename Executor = asio::any_io_executor,
+ typename Allocator = any_io_executor>
+struct promise_handler;
+
+template<typename... Ts, typename Executor, typename Allocator>
+struct promise_handler<void(Ts...), Executor, Allocator>
+{
+ using promise_type = promise<void(Ts...), Executor, Allocator>;
+
+ promise_handler(
+ Allocator allocator, Executor executor) // get_associated_allocator(exec)
+ : impl_(
+ std::allocate_shared<promise_impl<void(Ts...), Executor, Allocator>>(
+ allocator, allocator, executor))
+ {
+ }
+
+ std::shared_ptr<promise_impl<void(Ts...), Executor, Allocator>> impl_;
+
+ using cancellation_slot_type = cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return impl_->cancel.slot();
+ }
+
+ using allocator_type = Allocator;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return impl_->get_allocator();
+ }
+
+ using executor_type = Executor;
+
+ Executor get_executor() const noexcept
+ {
+ return impl_->get_executor();
+ }
+
+ auto make_promise() -> promise<void(Ts...), executor_type, allocator_type>
+ {
+ return promise<void(Ts...), executor_type, allocator_type>{impl_};
+ }
+
+ void operator()(std::remove_reference_t<Ts>... ts)
+ {
+ assert(impl_);
+
+ using result_type = typename promise_impl<
+ void(Ts...), allocator_type, executor_type>::result_type ;
+
+ new (&impl_->result) result_type(std::move(ts)...);
+ impl_->done = true;
+
+ if (impl_->completion)
+ impl_->complete_with_result();
+ }
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_PROMISE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/use_coro.hpp b/3rdparty/asio/include/asio/experimental/impl/use_coro.hpp
new file mode 100644
index 00000000000..ab5a2e68959
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/use_coro.hpp
@@ -0,0 +1,214 @@
+//
+// experimental/impl/use_coro.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_USE_CORO_HPP
+#define ASIO_EXPERIMENTAL_IMPL_USE_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/deferred.hpp"
+#include "asio/experimental/coro.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Allocator, typename R>
+struct async_result<experimental::use_coro_t<Allocator>, R()>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, void,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_await deferred_async_operation<R(), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(asio::detail::initiation_archetype<R()>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(asio::error_code)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, void,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_await deferred_async_operation<
+ R(asio::error_code), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<R(asio::error_code)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(std::exception_ptr)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_await deferred_async_operation<
+ R(std::exception_ptr), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<R(std::exception_ptr)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R, typename T>
+struct async_result<experimental::use_coro_t<Allocator>, R(T)>
+{
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, T,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_return co_await deferred_async_operation<R(T), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(asio::detail::initiation_archetype<R(T)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, T,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R, typename T>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(asio::error_code, T)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_return co_await deferred_async_operation<
+ R(asio::error_code, T), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<
+ R(asio::error_code, T)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T, asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R, typename T>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(std::exception_ptr, T)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_return co_await deferred_async_operation<
+ R(std::exception_ptr, T), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<R(std::exception_ptr, T)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T, asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_USE_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/use_promise.hpp b/3rdparty/asio/include/asio/experimental/impl/use_promise.hpp
new file mode 100644
index 00000000000..259edb394bf
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/use_promise.hpp
@@ -0,0 +1,66 @@
+//
+// experimental/impl/use_promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <memory>
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename Allocator>
+struct use_promise_t;
+
+namespace detail {
+
+template<typename Signature, typename Executor, typename Allocator>
+struct promise_handler;
+
+} // namespace detail
+} // namespace experimental
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Allocator, typename R, typename... Args>
+struct async_result<experimental::use_promise_t<Allocator>, R(Args...)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_promise_t<Allocator> up, InitArgs... args)
+ -> experimental::promise<void(decay_t<Args>...),
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ using handler_type = experimental::detail::promise_handler<
+ void(decay_t<Args>...),
+ asio::associated_executor_t<Initiation>, Allocator>;
+
+ handler_type ht{up.get_allocator(), get_associated_executor(initiation)};
+ std::move(initiation)(ht, std::move(args)...);
+ return ht.make_promise();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/parallel_group.hpp b/3rdparty/asio/include/asio/experimental/parallel_group.hpp
new file mode 100644
index 00000000000..967fc8802db
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/parallel_group.hpp
@@ -0,0 +1,457 @@
+//
+// experimental/parallel_group.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_PARALLEL_GROUP_HPP
+#define ASIO_EXPERIMENTAL_PARALLEL_GROUP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <vector>
+#include "asio/async_result.hpp"
+#include "asio/detail/array.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+#include "asio/experimental/cancellation_condition.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+// Helper trait for getting a tuple from a completion signature.
+
+template <typename Signature>
+struct parallel_op_signature_as_tuple;
+
+template <typename R, typename... Args>
+struct parallel_op_signature_as_tuple<R(Args...)>
+{
+ typedef std::tuple<decay_t<Args>...> type;
+};
+
+// Helper trait for concatenating completion signatures.
+
+template <std::size_t N, typename Offsets, typename... Signatures>
+struct parallel_group_signature;
+
+template <std::size_t N, typename R0, typename... Args0>
+struct parallel_group_signature<N, R0(Args0...)>
+{
+ typedef asio::detail::array<std::size_t, N> order_type;
+ typedef R0 raw_type(Args0...);
+ typedef R0 type(order_type, Args0...);
+};
+
+template <std::size_t N,
+ typename R0, typename... Args0,
+ typename R1, typename... Args1>
+struct parallel_group_signature<N, R0(Args0...), R1(Args1...)>
+{
+ typedef asio::detail::array<std::size_t, N> order_type;
+ typedef R0 raw_type(Args0..., Args1...);
+ typedef R0 type(order_type, Args0..., Args1...);
+};
+
+template <std::size_t N, typename Sig0,
+ typename Sig1, typename... SigN>
+struct parallel_group_signature<N, Sig0, Sig1, SigN...>
+{
+ typedef asio::detail::array<std::size_t, N> order_type;
+ typedef typename parallel_group_signature<N,
+ typename parallel_group_signature<N, Sig0, Sig1>::raw_type,
+ SigN...>::raw_type raw_type;
+ typedef typename parallel_group_signature<N,
+ typename parallel_group_signature<N, Sig0, Sig1>::raw_type,
+ SigN...>::type type;
+};
+
+template <typename Condition, typename Handler,
+ typename... Ops, std::size_t... I>
+void parallel_group_launch(Condition cancellation_condition, Handler handler,
+ std::tuple<Ops...>& ops, asio::detail::index_sequence<I...>);
+
+// Helper trait for determining ranged parallel group completion signatures.
+
+template <typename Signature, typename Allocator>
+struct ranged_parallel_group_signature;
+
+template <typename R, typename... Args, typename Allocator>
+struct ranged_parallel_group_signature<R(Args...), Allocator>
+{
+ typedef std::vector<std::size_t,
+ ASIO_REBIND_ALLOC(Allocator, std::size_t)> order_type;
+ typedef R raw_type(
+ std::vector<Args, ASIO_REBIND_ALLOC(Allocator, Args)>...);
+ typedef R type(order_type,
+ std::vector<Args, ASIO_REBIND_ALLOC(Allocator, Args)>...);
+};
+
+template <typename Condition, typename Handler,
+ typename Range, typename Allocator>
+void ranged_parallel_group_launch(Condition cancellation_condition,
+ Handler handler, Range&& range, const Allocator& allocator);
+
+char (&parallel_group_has_iterator_helper(...))[2];
+
+template <typename T>
+char parallel_group_has_iterator_helper(T*, typename T::iterator* = 0);
+
+template <typename T>
+struct parallel_group_has_iterator_typedef
+{
+ enum { value = (sizeof((parallel_group_has_iterator_helper)((T*)(0))) == 1) };
+};
+
+} // namespace detail
+
+/// Type trait used to determine whether a type is a range of asynchronous
+/// operations that can be used with with @c make_parallel_group.
+template <typename T>
+struct is_async_operation_range
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true if the type may be used as a range of
+ /// asynchronous operations.
+ static const bool value;
+#else
+ enum
+ {
+ value = detail::parallel_group_has_iterator_typedef<T>::value
+ };
+#endif
+};
+
+/// A group of asynchronous operations that may be launched in parallel.
+/**
+ * See the documentation for asio::experimental::make_parallel_group for
+ * a usage example.
+ */
+template <typename... Ops>
+class parallel_group
+{
+private:
+ struct initiate_async_wait
+ {
+ template <typename Handler, typename Condition>
+ void operator()(Handler&& h, Condition&& c, std::tuple<Ops...>&& ops) const
+ {
+ detail::parallel_group_launch(
+ std::forward<Condition>(c), std::forward<Handler>(h),
+ ops, asio::detail::index_sequence_for<Ops...>());
+ }
+ };
+
+ std::tuple<Ops...> ops_;
+
+public:
+ /// Constructor.
+ explicit parallel_group(Ops... ops)
+ : ops_(std::move(ops)...)
+ {
+ }
+
+ /// The completion signature for the group of operations.
+ typedef typename detail::parallel_group_signature<sizeof...(Ops),
+ completion_signature_of_t<Ops>...>::type signature;
+
+ /// Initiate an asynchronous wait for the group of operations.
+ /**
+ * Launches the group and asynchronously waits for completion.
+ *
+ * @param cancellation_condition A function object, called on completion of
+ * an operation within the group, that is used to determine whether to cancel
+ * the remaining operations. The function object is passed the arguments of
+ * the completed operation's handler. To trigger cancellation of the remaining
+ * operations, it must return a asio::cancellation_type value other
+ * than <tt>asio::cancellation_type::none</tt>.
+ *
+ * @param token A @ref completion_token whose signature is comprised of
+ * a @c std::array<std::size_t, N> indicating the completion order of the
+ * operations, followed by all operations' completion handler arguments.
+ *
+ * The library provides the following @c cancellation_condition types:
+ *
+ * @li asio::experimental::wait_for_all
+ * @li asio::experimental::wait_for_one
+ * @li asio::experimental::wait_for_one_error
+ * @li asio::experimental::wait_for_one_success
+ */
+ template <typename CancellationCondition,
+ ASIO_COMPLETION_TOKEN_FOR(signature) CompletionToken>
+ auto async_wait(CancellationCondition cancellation_condition,
+ CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, signature>(
+ declval<initiate_async_wait>(), token,
+ std::move(cancellation_condition), std::move(ops_)))
+ {
+ return asio::async_initiate<CompletionToken, signature>(
+ initiate_async_wait(), token,
+ std::move(cancellation_condition), std::move(ops_));
+ }
+};
+
+/// Create a group of operations that may be launched in parallel.
+/**
+ * For example:
+ * @code asio::experimental::make_parallel_group(
+ * [&](auto token)
+ * {
+ * return in.async_read_some(asio::buffer(data), token);
+ * },
+ * [&](auto token)
+ * {
+ * return timer.async_wait(token);
+ * }
+ * ).async_wait(
+ * asio::experimental::wait_for_all(),
+ * [](
+ * std::array<std::size_t, 2> completion_order,
+ * std::error_code ec1, std::size_t n1,
+ * std::error_code ec2
+ * )
+ * {
+ * switch (completion_order[0])
+ * {
+ * case 0:
+ * {
+ * std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ * }
+ * break;
+ * case 1:
+ * {
+ * std::cout << "timer finished: " << ec2 << "\n";
+ * }
+ * break;
+ * }
+ * }
+ * );
+ * @endcode
+ */
+template <typename... Ops>
+ASIO_NODISCARD inline parallel_group<Ops...>
+make_parallel_group(Ops... ops)
+{
+ return parallel_group<Ops...>(std::move(ops)...);
+}
+
+/// A range-based group of asynchronous operations that may be launched in
+/// parallel.
+/**
+ * See the documentation for asio::experimental::make_parallel_group for
+ * a usage example.
+ */
+template <typename Range, typename Allocator = std::allocator<void>>
+class ranged_parallel_group
+{
+private:
+ struct initiate_async_wait
+ {
+ template <typename Handler, typename Condition>
+ void operator()(Handler&& h, Condition&& c,
+ Range&& range, const Allocator& allocator) const
+ {
+ detail::ranged_parallel_group_launch(std::move(c),
+ std::move(h), std::forward<Range>(range), allocator);
+ }
+ };
+
+ Range range_;
+ Allocator allocator_;
+
+public:
+ /// Constructor.
+ explicit ranged_parallel_group(Range range,
+ const Allocator& allocator = Allocator())
+ : range_(std::move(range)),
+ allocator_(allocator)
+ {
+ }
+
+ /// The completion signature for the group of operations.
+ typedef typename detail::ranged_parallel_group_signature<
+ completion_signature_of_t<
+ decay_t<decltype(*std::declval<typename Range::iterator>())>>,
+ Allocator>::type signature;
+
+ /// Initiate an asynchronous wait for the group of operations.
+ /**
+ * Launches the group and asynchronously waits for completion.
+ *
+ * @param cancellation_condition A function object, called on completion of
+ * an operation within the group, that is used to determine whether to cancel
+ * the remaining operations. The function object is passed the arguments of
+ * the completed operation's handler. To trigger cancellation of the remaining
+ * operations, it must return a asio::cancellation_type value other
+ * than <tt>asio::cancellation_type::none</tt>.
+ *
+ * @param token A @ref completion_token whose signature is comprised of
+ * a @c std::vector<std::size_t, Allocator> indicating the completion order of
+ * the operations, followed by a vector for each of the completion signature's
+ * arguments.
+ *
+ * The library provides the following @c cancellation_condition types:
+ *
+ * @li asio::experimental::wait_for_all
+ * @li asio::experimental::wait_for_one
+ * @li asio::experimental::wait_for_one_error
+ * @li asio::experimental::wait_for_one_success
+ */
+ template <typename CancellationCondition,
+ ASIO_COMPLETION_TOKEN_FOR(signature) CompletionToken>
+ auto async_wait(CancellationCondition cancellation_condition,
+ CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, signature>(
+ declval<initiate_async_wait>(), token,
+ std::move(cancellation_condition),
+ std::move(range_), allocator_))
+ {
+ return asio::async_initiate<CompletionToken, signature>(
+ initiate_async_wait(), token,
+ std::move(cancellation_condition),
+ std::move(range_), allocator_);
+ }
+};
+
+/// Create a group of operations that may be launched in parallel.
+/**
+ * @param range A range containing the operations to be launched.
+ *
+ * For example:
+ * @code
+ * using op_type = decltype(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * std::vector<op_type> ops;
+ *
+ * ops.push_back(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * ops.push_back(
+ * socket2.async_read_some(
+ * asio::buffer(data2),
+ * asio::deferred
+ * )
+ * );
+ *
+ * asio::experimental::make_parallel_group(ops).async_wait(
+ * asio::experimental::wait_for_all(),
+ * [](
+ * std::vector<std::size_t> completion_order,
+ * std::vector<std::error_code> e,
+ * std::vector<std::size_t> n
+ * )
+ * {
+ * for (std::size_t i = 0; i < completion_order.size(); ++i)
+ * {
+ * std::size_t idx = completion_order[i];
+ * std::cout << "socket " << idx << " finished: ";
+ * std::cout << e[idx] << ", " << n[idx] << "\n";
+ * }
+ * }
+ * );
+ * @endcode
+ */
+template <typename Range>
+ASIO_NODISCARD inline ranged_parallel_group<decay_t<Range>>
+make_parallel_group(Range&& range,
+ constraint_t<
+ is_async_operation_range<decay_t<Range>>::value
+ > = 0)
+{
+ return ranged_parallel_group<decay_t<Range>>(std::forward<Range>(range));
+}
+
+/// Create a group of operations that may be launched in parallel.
+/**
+ * @param allocator Specifies the allocator to be used with the result vectors.
+ *
+ * @param range A range containing the operations to be launched.
+ *
+ * For example:
+ * @code
+ * using op_type = decltype(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * std::vector<op_type> ops;
+ *
+ * ops.push_back(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * ops.push_back(
+ * socket2.async_read_some(
+ * asio::buffer(data2),
+ * asio::deferred
+ * )
+ * );
+ *
+ * asio::experimental::make_parallel_group(
+ * std::allocator_arg_t,
+ * my_allocator,
+ * ops
+ * ).async_wait(
+ * asio::experimental::wait_for_all(),
+ * [](
+ * std::vector<std::size_t> completion_order,
+ * std::vector<std::error_code> e,
+ * std::vector<std::size_t> n
+ * )
+ * {
+ * for (std::size_t i = 0; i < completion_order.size(); ++i)
+ * {
+ * std::size_t idx = completion_order[i];
+ * std::cout << "socket " << idx << " finished: ";
+ * std::cout << e[idx] << ", " << n[idx] << "\n";
+ * }
+ * }
+ * );
+ * @endcode
+ */
+template <typename Allocator, typename Range>
+ASIO_NODISCARD inline ranged_parallel_group<decay_t<Range>, Allocator>
+make_parallel_group(allocator_arg_t, const Allocator& allocator, Range&& range,
+ constraint_t<
+ is_async_operation_range<decay_t<Range>>::value
+ > = 0)
+{
+ return ranged_parallel_group<decay_t<Range>, Allocator>(
+ std::forward<Range>(range), allocator);
+}
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/parallel_group.hpp"
+
+#endif // ASIO_EXPERIMENTAL_PARALLEL_GROUP_HPP
diff --git a/3rdparty/asio/include/asio/experimental/prepend.hpp b/3rdparty/asio/include/asio/experimental/prepend.hpp
new file mode 100644
index 00000000000..503981f776f
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/prepend.hpp
@@ -0,0 +1,36 @@
+//
+// experimental/prepend.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_EXPERIMENTAL_PREPEND_HPP
+#define ASIO_EXPERIMENTAL_PREPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/prepend.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::prepend_t;
+using asio::prepend;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/experimental/promise.hpp b/3rdparty/asio/include/asio/experimental/promise.hpp
new file mode 100644
index 00000000000..2bcf66b4e30
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/promise.hpp
@@ -0,0 +1,224 @@
+//
+// experimental/promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_PROMISE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/bind_executor.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/dispatch.hpp"
+#include "asio/experimental/impl/promise.hpp"
+#include "asio/post.hpp"
+
+#include <algorithm>
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename T>
+struct is_promise : std::false_type {};
+
+template <typename ... Ts>
+struct is_promise<promise<Ts...>> : std::true_type {};
+
+template <typename T>
+constexpr bool is_promise_v = is_promise<T>::value;
+
+template <typename ... Ts>
+struct promise_value_type
+{
+ using type = std::tuple<Ts...>;
+};
+
+template <typename T>
+struct promise_value_type<T>
+{
+ using type = T;
+};
+
+template <>
+struct promise_value_type<>
+{
+ using type = std::tuple<>;
+};
+
+#if defined(GENERATING_DOCUMENTATION)
+/// A disposable handle for an eager operation.
+/**
+ * @tparam Signature The signature of the operation.
+ *
+ * @tparam Executor The executor to be used by the promise (taken from the
+ * operation).
+ *
+ * @tparam Allocator The allocator used for the promise. Can be set through
+ * use_allocator.
+ *
+ * A promise can be used to initiate an asynchronous option that can be
+ * completed later. If the promise gets destroyed before completion, the
+ * operation gets a cancel signal and the result is ignored.
+ *
+ * A promise fulfills the requirements of async_operation.
+ *
+ * @par Examples
+ * Reading and writing from one coroutine.
+ * @code
+ * awaitable<void> read_write_some(asio::ip::tcp::socket & sock,
+ * asio::mutable_buffer read_buf, asio::const_buffer to_write)
+ * {
+ * auto p = asio::async_read(read_buf, asio::use_awaitable);
+ * co_await asio::async_write_some(to_write, asio::deferred);
+ * co_await p;
+ * }
+ * @endcode
+ */
+template<typename Signature = void(),
+ typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
+struct promise
+#else
+template <typename ... Ts, typename Executor, typename Allocator>
+struct promise<void(Ts...), Executor, Allocator>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+ /// The value that's returned by the promise.
+ using value_type = typename promise_value_type<Ts...>::type;
+
+ /// Cancel the promise. Usually done through the destructor.
+ void cancel(cancellation_type level = cancellation_type::all)
+ {
+ if (impl_ && !impl_->done)
+ {
+ asio::dispatch(impl_->executor,
+ [level, impl = impl_]{ impl->cancel.emit(level); });
+ }
+ }
+
+ /// Check if the promise is completed already.
+ bool completed() const noexcept
+ {
+ return impl_ && impl_->done;
+ }
+
+ /// Wait for the promise to become ready.
+ template <ASIO_COMPLETION_TOKEN_FOR(void(Ts...)) CompletionToken>
+ inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void(Ts...))
+ operator()(CompletionToken&& token)
+ {
+ assert(impl_);
+
+ return async_initiate<CompletionToken, void(Ts...)>(
+ initiate_async_wait{impl_}, token);
+ }
+
+ promise() = delete;
+ promise(const promise& ) = delete;
+ promise(promise&& ) noexcept = default;
+
+ /// Destruct the promise and cancel the operation.
+ /**
+ * It is safe to destruct a promise of a promise that didn't complete.
+ */
+ ~promise() { cancel(); }
+
+
+private:
+#if !defined(GENERATING_DOCUMENTATION)
+ template <typename, typename, typename> friend struct promise;
+ friend struct detail::promise_handler<void(Ts...), Executor, Allocator>;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ std::shared_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> impl_;
+
+ promise(
+ std::shared_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> impl)
+ : impl_(impl)
+ {
+ }
+
+ struct initiate_async_wait
+ {
+ std::shared_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> self_;
+
+ template <typename WaitHandler>
+ void operator()(WaitHandler&& handler) const
+ {
+ const auto alloc = get_associated_allocator(
+ handler, self_->get_allocator());
+
+ auto cancel = get_associated_cancellation_slot(handler);
+
+ if (self_->done)
+ {
+ auto exec = asio::get_associated_executor(
+ handler, self_->get_executor());
+
+ asio::post(exec,
+ [self = std::move(self_),
+ handler = std::forward<WaitHandler>(handler)]() mutable
+ {
+ self->apply(std::move(handler));
+ });
+ }
+ else
+ {
+ if (cancel.is_connected())
+ {
+ struct cancel_handler
+ {
+ std::weak_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> self;
+
+ cancel_handler(
+ std::weak_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> self)
+ : self(std::move(self))
+ {
+ }
+
+ void operator()(cancellation_type level) const
+ {
+ if (auto p = self.lock())
+ {
+ p->cancel.emit(level);
+ p->cancel_();
+ }
+ }
+ };
+ cancel.template emplace<cancel_handler>(self_);
+ }
+
+ self_->set_completion(alloc, std::forward<WaitHandler>(handler));
+ }
+ }
+ };
+};
+
+} // namespace experimental
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_PROMISE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/use_coro.hpp b/3rdparty/asio/include/asio/experimental/use_coro.hpp
new file mode 100644
index 00000000000..d9e0544106c
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/use_coro.hpp
@@ -0,0 +1,189 @@
+//
+// experimental/use_coro.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_USE_CORO_HPP
+#define ASIO_EXPERIMENTAL_USE_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <memory>
+#include "asio/deferred.hpp"
+#include "asio/detail/source_location.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+class any_io_executor;
+
+namespace experimental {
+
+/// A @ref completion_token that creates another coro for the task completion.
+/**
+ * The @c use_coro_t class, with its value @c use_coro, is used to represent an
+ * operation that can be awaited by the current resumable coroutine. This
+ * completion token may be passed as a handler to an asynchronous operation.
+ * For example:
+ *
+ * @code coro<void> my_coroutine(tcp::socket my_socket)
+ * {
+ * std::size_t n = co_await my_socket.async_read_some(buffer, use_coro);
+ * ...
+ * } @endcode
+ *
+ * When used with co_await, the initiating function (@c async_read_some in the
+ * above example) suspends the current coroutine. The coroutine is resumed when
+ * the asynchronous operation completes, and the result of the operation is
+ * returned.
+ *
+ * Note that this token is not the most efficient (use @c asio::deferred
+ * for that) but does provide type erasure, as it will always return a @c coro.
+ */
+template <typename Allocator = std::allocator<void>>
+struct use_coro_t
+{
+
+ /// The allocator type. The allocator is used when constructing the
+ /// @c std::promise object for a given asynchronous operation.
+ typedef Allocator allocator_type;
+
+ /// Default constructor.
+ constexpr use_coro_t(
+ allocator_type allocator = allocator_type{}
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , asio::detail::source_location location =
+ asio::detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ : allocator_(allocator)
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , file_name_(location.file_name()),
+ line_(location.line()),
+ function_name_(location.function_name())
+# else // defined(ASIO_HAS_SOURCE_LOCATION)
+ , file_name_(0),
+ line_(0),
+ function_name_(0)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+ }
+
+
+ /// Specify an alternate allocator.
+ template <typename OtherAllocator>
+ use_coro_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
+ {
+ return use_future_t<OtherAllocator>(allocator);
+ }
+
+ /// Obtain allocator.
+ allocator_type get_allocator() const
+ {
+ return allocator_;
+ }
+
+ /// Constructor used to specify file name, line, and function name.
+ constexpr use_coro_t(const char* file_name,
+ int line, const char* function_name,
+ allocator_type allocator = allocator_type{}) :
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+ file_name_(file_name),
+ line_(line),
+ function_name_(function_name),
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ allocator_(allocator)
+ {
+#if !defined(ASIO_ENABLE_HANDLER_TRACKING)
+ (void)file_name;
+ (void)line;
+ (void)function_name;
+#endif // !defined(ASIO_ENABLE_HANDLER_TRACKING)
+ }
+
+ /// Adapts an executor to add the @c use_coro_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c use_coro_t as the default completion token type.
+ typedef use_coro_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c use_coro_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c use_coro_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+ const char* file_name_;
+ int line_;
+ const char* function_name_;
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+
+private:
+ Allocator allocator_;
+};
+
+/// A @ref completion_token object that represents the currently executing
+/// resumable coroutine.
+/**
+ * See the documentation for asio::use_coro_t for a usage example.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+constexpr use_coro_t<> use_coro;
+#else
+constexpr use_coro_t<> use_coro(0, 0, 0);
+#endif
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/use_coro.hpp"
+#include "asio/experimental/coro.hpp"
+
+#endif // ASIO_EXPERIMENTAL_USE_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/use_promise.hpp b/3rdparty/asio/include/asio/experimental/use_promise.hpp
new file mode 100644
index 00000000000..cf19aca59d5
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/use_promise.hpp
@@ -0,0 +1,111 @@
+//
+// experimental/use_promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_USE_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_USE_PROMISE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <memory>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename Allocator = std::allocator<void>>
+struct use_promise_t
+{
+ /// The allocator type. The allocator is used when constructing the
+ /// @c promise object for a given asynchronous operation.
+ typedef Allocator allocator_type;
+
+ /// Construct using default-constructed allocator.
+ constexpr use_promise_t()
+ {
+ }
+
+ /// Construct using specified allocator.
+ explicit use_promise_t(const Allocator& allocator)
+ : allocator_(allocator)
+ {
+ }
+
+ /// Obtain allocator.
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Adapts an executor to add the @c use_promise_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c use_promise_t as the default completion token type.
+ typedef use_promise_t<Allocator> default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ executor_with_default(const InnerExecutor& ex) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+
+ /// Convert the specified executor to the inner executor type, then use
+ /// that to construct the adapted executor.
+ template <typename OtherExecutor>
+ executor_with_default(const OtherExecutor& ex,
+ constraint_t<
+ is_convertible<OtherExecutor, InnerExecutor>::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Function helper to adapt an I/O object to use @c use_promise_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+ /// Specify an alternate allocator.
+ template <typename OtherAllocator>
+ use_promise_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
+ {
+ return use_promise_t<OtherAllocator>(allocator);
+ }
+
+private:
+ Allocator allocator_;
+};
+
+constexpr use_promise_t<> use_promise;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/use_promise.hpp"
+
+#endif // ASIO_EXPERIMENTAL_USE_CORO_HPP
diff --git a/3rdparty/asio/include/asio/file_base.hpp b/3rdparty/asio/include/asio/file_base.hpp
new file mode 100644
index 00000000000..5e8ac4f2ed5
--- /dev/null
+++ b/3rdparty/asio/include/asio/file_base.hpp
@@ -0,0 +1,166 @@
+//
+// file_base.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_FILE_BASE_HPP
+#define ASIO_FILE_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_WINDOWS)
+# include <fcntl.h>
+#endif // !defined(ASIO_WINDOWS)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// The file_base class is used as a base for the basic_stream_file and
+/// basic_random_access_file class templates so that we have a common place to
+/// define flags.
+class file_base
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// A bitmask type (C++ Std [lib.bitmask.types]).
+ typedef unspecified flags;
+
+ /// Open the file for reading.
+ static const flags read_only = implementation_defined;
+
+ /// Open the file for writing.
+ static const flags write_only = implementation_defined;
+
+ /// Open the file for reading and writing.
+ static const flags read_write = implementation_defined;
+
+ /// Open the file in append mode.
+ static const flags append = implementation_defined;
+
+ /// Create the file if it does not exist.
+ static const flags create = implementation_defined;
+
+ /// Ensure a new file is created. Must be combined with @c create.
+ static const flags exclusive = implementation_defined;
+
+ /// Open the file with any existing contents truncated.
+ static const flags truncate = implementation_defined;
+
+ /// Open the file so that write operations automatically synchronise the file
+ /// data and metadata to disk.
+ static const flags sync_all_on_write = implementation_defined;
+#else
+ enum flags
+ {
+#if defined(ASIO_WINDOWS)
+ read_only = 1,
+ write_only = 2,
+ read_write = 4,
+ append = 8,
+ create = 16,
+ exclusive = 32,
+ truncate = 64,
+ sync_all_on_write = 128
+#else // defined(ASIO_WINDOWS)
+ read_only = O_RDONLY,
+ write_only = O_WRONLY,
+ read_write = O_RDWR,
+ append = O_APPEND,
+ create = O_CREAT,
+ exclusive = O_EXCL,
+ truncate = O_TRUNC,
+ sync_all_on_write = O_SYNC
+#endif // defined(ASIO_WINDOWS)
+ };
+
+ // Implement bitmask operations as shown in C++ Std [lib.bitmask.types].
+
+ friend flags operator&(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
+ }
+
+ friend flags operator|(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
+ }
+
+ friend flags operator^(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
+ }
+
+ friend flags operator~(flags x)
+ {
+ return static_cast<flags>(~static_cast<unsigned int>(x));
+ }
+
+ friend flags& operator&=(flags& x, flags y)
+ {
+ x = x & y;
+ return x;
+ }
+
+ friend flags& operator|=(flags& x, flags y)
+ {
+ x = x | y;
+ return x;
+ }
+
+ friend flags& operator^=(flags& x, flags y)
+ {
+ x = x ^ y;
+ return x;
+ }
+#endif
+
+ /// Basis for seeking in a file.
+ enum seek_basis
+ {
+#if defined(GENERATING_DOCUMENTATION)
+ /// Seek to an absolute position.
+ seek_set = implementation_defined,
+
+ /// Seek to an offset relative to the current file position.
+ seek_cur = implementation_defined,
+
+ /// Seek to an offset relative to the end of the file.
+ seek_end = implementation_defined
+#else
+ seek_set = SEEK_SET,
+ seek_cur = SEEK_CUR,
+ seek_end = SEEK_END
+#endif
+ };
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~file_base()
+ {
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_FILE_BASE_HPP
diff --git a/3rdparty/asio/include/asio/generic/basic_endpoint.hpp b/3rdparty/asio/include/asio/generic/basic_endpoint.hpp
index 1faf4a174b5..e7e1f6d4103 100644
--- a/3rdparty/asio/include/asio/generic/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/generic/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// generic/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -54,7 +54,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint()
+ basic_endpoint() noexcept
{
}
@@ -78,13 +78,11 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
basic_endpoint(basic_endpoint&& other)
: impl_(other.impl_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another endpoint.
basic_endpoint& operator=(const basic_endpoint& other)
@@ -93,14 +91,12 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another endpoint.
basic_endpoint& operator=(basic_endpoint&& other)
{
impl_ = other.impl_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// The protocol associated with the endpoint.
protocol_type protocol() const
diff --git a/3rdparty/asio/include/asio/generic/datagram_protocol.hpp b/3rdparty/asio/include/asio/generic/datagram_protocol.hpp
index 21a39de204f..6e81cd6a084 100644
--- a/3rdparty/asio/include/asio/generic/datagram_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/datagram_protocol.hpp
@@ -2,7 +2,7 @@
// generic/datagram_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -73,19 +73,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_DGRAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/generic/detail/endpoint.hpp b/3rdparty/asio/include/asio/generic/detail/endpoint.hpp
index 8de7b2aaed3..fdbcde92e5a 100644
--- a/3rdparty/asio/include/asio/generic/detail/endpoint.hpp
+++ b/3rdparty/asio/include/asio/generic/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// generic/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp b/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp
index 1a66fb95665..3e88c21098b 100644
--- a/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp
+++ b/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// generic/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -94,7 +94,8 @@ void endpoint::init(const void* sock_addr,
using namespace std; // For memset and memcpy.
memset(&data_.generic, 0, sizeof(asio::detail::sockaddr_storage_type));
- memcpy(&data_.generic, sock_addr, sock_addr_size);
+ if (sock_addr_size > 0)
+ memcpy(&data_.generic, sock_addr, sock_addr_size);
size_ = sock_addr_size;
protocol_ = sock_protocol;
diff --git a/3rdparty/asio/include/asio/generic/raw_protocol.hpp b/3rdparty/asio/include/asio/generic/raw_protocol.hpp
index 9a7407335c5..fc81cdd1ee9 100644
--- a/3rdparty/asio/include/asio/generic/raw_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/raw_protocol.hpp
@@ -2,7 +2,7 @@
// generic/raw_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -73,19 +73,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_RAW);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp b/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp
index d01d9cb2baa..e0342a47836 100644
--- a/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp
@@ -2,7 +2,7 @@
// generic/seq_packet_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -72,19 +72,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_SEQPACKET);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/generic/stream_protocol.hpp b/3rdparty/asio/include/asio/generic/stream_protocol.hpp
index 6917c199c51..270006e60ed 100644
--- a/3rdparty/asio/include/asio/generic/stream_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/stream_protocol.hpp
@@ -2,7 +2,7 @@
// generic/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -74,19 +74,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_STREAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/handler_alloc_hook.hpp b/3rdparty/asio/include/asio/handler_alloc_hook.hpp
deleted file mode 100644
index a05ad4cc097..00000000000
--- a/3rdparty/asio/include/asio/handler_alloc_hook.hpp
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// handler_alloc_hook.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_HANDLER_ALLOC_HOOK_HPP
-#define ASIO_HANDLER_ALLOC_HOOK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <cstddef>
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default allocation function for handlers.
-/**
- * Asynchronous operations may need to allocate temporary objects. Since
- * asynchronous operations have a handler function object, these temporary
- * objects can be said to be associated with the handler.
- *
- * Implement asio_handler_allocate and asio_handler_deallocate for your own
- * handlers to provide custom allocation for these temporary objects.
- *
- * The default implementation of these allocation hooks uses <tt>::operator
- * new</tt> and <tt>::operator delete</tt>.
- *
- * @note All temporary objects associated with a handler will be deallocated
- * before the upcall to the handler is performed. This allows the same memory to
- * be reused for a subsequent asynchronous operation initiated by the handler.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * void* asio_handler_allocate(std::size_t size, my_handler* context)
- * {
- * return ::operator new(size);
- * }
- *
- * void asio_handler_deallocate(void* pointer, std::size_t size,
- * my_handler* context)
- * {
- * ::operator delete(pointer);
- * }
- * @endcode
- */
-ASIO_DECL void* asio_handler_allocate(
- std::size_t size, ...);
-
-/// Default deallocation function for handlers.
-/**
- * Implement asio_handler_allocate and asio_handler_deallocate for your own
- * handlers to provide custom allocation for the associated temporary objects.
- *
- * The default implementation of these allocation hooks uses <tt>::operator
- * new</tt> and <tt>::operator delete</tt>.
- *
- * @sa asio_handler_allocate.
- */
-ASIO_DECL void asio_handler_deallocate(
- void* pointer, std::size_t size, ...);
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#if defined(ASIO_HEADER_ONLY)
-# include "asio/impl/handler_alloc_hook.ipp"
-#endif // defined(ASIO_HEADER_ONLY)
-
-#endif // ASIO_HANDLER_ALLOC_HOOK_HPP
diff --git a/3rdparty/asio/include/asio/handler_continuation_hook.hpp b/3rdparty/asio/include/asio/handler_continuation_hook.hpp
index bea0cdc5ed8..8c5c65243de 100644
--- a/3rdparty/asio/include/asio/handler_continuation_hook.hpp
+++ b/3rdparty/asio/include/asio/handler_continuation_hook.hpp
@@ -2,7 +2,7 @@
// handler_continuation_hook.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/handler_invoke_hook.hpp b/3rdparty/asio/include/asio/handler_invoke_hook.hpp
deleted file mode 100644
index 65c0d08c9d5..00000000000
--- a/3rdparty/asio/include/asio/handler_invoke_hook.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// handler_invoke_hook.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_HANDLER_INVOKE_HOOK_HPP
-#define ASIO_HANDLER_INVOKE_HOOK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/** @defgroup asio_handler_invoke asio::asio_handler_invoke
- *
- * @brief Default invoke function for handlers.
- *
- * Completion handlers for asynchronous operations are invoked by the
- * io_context associated with the corresponding object (e.g. a socket or
- * deadline_timer). Certain guarantees are made on when the handler may be
- * invoked, in particular that a handler can only be invoked from a thread that
- * is currently calling @c run() on the corresponding io_context object.
- * Handlers may subsequently be invoked through other objects (such as
- * io_context::strand objects) that provide additional guarantees.
- *
- * When asynchronous operations are composed from other asynchronous
- * operations, all intermediate handlers should be invoked using the same
- * method as the final handler. This is required to ensure that user-defined
- * objects are not accessed in a way that may violate the guarantees. This
- * hooking function ensures that the invoked method used for the final handler
- * is accessible at each intermediate step.
- *
- * Implement asio_handler_invoke for your own handlers to specify a custom
- * invocation strategy.
- *
- * This default implementation invokes the function object like so:
- * @code function(); @endcode
- * If necessary, the default implementation makes a copy of the function object
- * so that the non-const operator() can be used.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * template <typename Function>
- * void asio_handler_invoke(Function function, my_handler* context)
- * {
- * context->strand_.dispatch(function);
- * }
- * @endcode
- */
-/*@{*/
-
-/// Default handler invocation hook used for non-const function objects.
-template <typename Function>
-inline void asio_handler_invoke(Function& function, ...)
-{
- function();
-}
-
-/// Default handler invocation hook used for const function objects.
-template <typename Function>
-inline void asio_handler_invoke(const Function& function, ...)
-{
- Function tmp(function);
- tmp();
-}
-
-/*@}*/
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_HANDLER_INVOKE_HOOK_HPP
diff --git a/3rdparty/asio/include/asio/handler_type.hpp b/3rdparty/asio/include/asio/handler_type.hpp
deleted file mode 100644
index 49e71231f4d..00000000000
--- a/3rdparty/asio/include/asio/handler_type.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// handler_type.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_HANDLER_TYPE_HPP
-#define ASIO_HANDLER_TYPE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// (Deprecated: Use two-parameter version of async_result.) Default handler
-/// type traits provided for all completion token types.
-/**
- * The handler_type traits class is used for determining the concrete handler
- * type to be used for an asynchronous operation. It allows the handler type to
- * be determined at the point where the specific completion handler signature
- * is known.
- *
- * This template may be specialised for user-defined completion token types.
- */
-template <typename CompletionToken, typename Signature, typename = void>
-struct handler_type
-{
- /// The handler type for the specific signature.
- typedef typename conditional<
- is_same<CompletionToken, typename decay<CompletionToken>::type>::value,
- decay<CompletionToken>,
- handler_type<typename decay<CompletionToken>::type, Signature>
- >::type::type type;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_HANDLER_TYPE_HPP
diff --git a/3rdparty/asio/include/asio/high_resolution_timer.hpp b/3rdparty/asio/include/asio/high_resolution_timer.hpp
index dd9d4859802..50e8030a225 100644
--- a/3rdparty/asio/include/asio/high_resolution_timer.hpp
+++ b/3rdparty/asio/include/asio/high_resolution_timer.hpp
@@ -2,7 +2,7 @@
// high_resolution_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#include "asio/basic_waitable_timer.hpp"
#include "asio/detail/chrono.hpp"
@@ -39,6 +36,4 @@ typedef basic_waitable_timer<
} // namespace asio
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#endif // ASIO_HIGH_RESOLUTION_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/impl/any_completion_executor.ipp b/3rdparty/asio/include/asio/impl/any_completion_executor.ipp
new file mode 100644
index 00000000000..fdad007dab1
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/any_completion_executor.ipp
@@ -0,0 +1,126 @@
+//
+// impl/any_completion_executor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_ANY_COMPLETION_EXECUTOR_IPP
+#define ASIO_IMPL_ANY_COMPLETION_EXECUTOR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/any_completion_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+any_completion_executor::any_completion_executor() noexcept
+ : base_type()
+{
+}
+
+any_completion_executor::any_completion_executor(nullptr_t) noexcept
+ : base_type(nullptr_t())
+{
+}
+
+any_completion_executor::any_completion_executor(
+ const any_completion_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_completion_executor::any_completion_executor(std::nothrow_t,
+ const any_completion_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_completion_executor::any_completion_executor(
+ any_completion_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_completion_executor::any_completion_executor(std::nothrow_t,
+ any_completion_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_completion_executor& any_completion_executor::operator=(
+ const any_completion_executor& e) noexcept
+{
+ base_type::operator=(static_cast<const base_type&>(e));
+ return *this;
+}
+
+any_completion_executor& any_completion_executor::operator=(
+ any_completion_executor&& e) noexcept
+{
+ base_type::operator=(static_cast<base_type&&>(e));
+ return *this;
+}
+
+any_completion_executor& any_completion_executor::operator=(nullptr_t)
+{
+ base_type::operator=(nullptr_t());
+ return *this;
+}
+
+any_completion_executor::~any_completion_executor()
+{
+}
+
+void any_completion_executor::swap(
+ any_completion_executor& other) noexcept
+{
+ static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::tracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::untracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::fork_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::continuation_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_IMPL_ANY_COMPLETION_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/impl/any_io_executor.ipp b/3rdparty/asio/include/asio/impl/any_io_executor.ipp
new file mode 100644
index 00000000000..338ad4d3ae2
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/any_io_executor.ipp
@@ -0,0 +1,134 @@
+//
+// impl/any_io_executor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_ANY_IO_EXECUTOR_IPP
+#define ASIO_IMPL_ANY_IO_EXECUTOR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/any_io_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+any_io_executor::any_io_executor() noexcept
+ : base_type()
+{
+}
+
+any_io_executor::any_io_executor(nullptr_t) noexcept
+ : base_type(nullptr_t())
+{
+}
+
+any_io_executor::any_io_executor(const any_io_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_io_executor::any_io_executor(std::nothrow_t,
+ const any_io_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_io_executor::any_io_executor(any_io_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_io_executor::any_io_executor(std::nothrow_t, any_io_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_io_executor& any_io_executor::operator=(const any_io_executor& e) noexcept
+{
+ base_type::operator=(static_cast<const base_type&>(e));
+ return *this;
+}
+
+any_io_executor& any_io_executor::operator=(any_io_executor&& e) noexcept
+{
+ base_type::operator=(static_cast<base_type&&>(e));
+ return *this;
+}
+
+any_io_executor& any_io_executor::operator=(nullptr_t)
+{
+ base_type::operator=(nullptr_t());
+ return *this;
+}
+
+any_io_executor::~any_io_executor()
+{
+}
+
+void any_io_executor::swap(any_io_executor& other) noexcept
+{
+ static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
+}
+
+template <>
+any_io_executor any_io_executor::require(
+ const execution::blocking_t::never_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).require(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::blocking_t::possibly_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::tracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::untracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::fork_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::continuation_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_IMPL_ANY_IO_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/impl/append.hpp b/3rdparty/asio/include/asio/impl/append.hpp
new file mode 100644
index 00000000000..cfa54191fcd
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/append.hpp
@@ -0,0 +1,162 @@
+//
+// impl/append.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_APPEND_HPP
+#define ASIO_IMPL_APPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt an append_t as a completion handler.
+template <typename Handler, typename... Values>
+class append_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename H>
+ append_handler(H&& handler, std::tuple<Values...> values)
+ : handler_(static_cast<H&&>(handler)),
+ values_(static_cast<std::tuple<Values...>&&>(values))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ this->invoke(
+ index_sequence_for<Values...>{},
+ static_cast<Args&&>(args)...);
+ }
+
+ template <std::size_t... I, typename... Args>
+ void invoke(index_sequence<I...>, Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<Args&&>(args)...,
+ static_cast<Values&&>(std::get<I>(values_))...);
+ }
+
+//private:
+ Handler handler_;
+ std::tuple<Values...> values_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ append_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature, typename... Values>
+struct append_signature;
+
+template <typename R, typename... Args, typename... Values>
+struct append_signature<R(Args...), Values...>
+{
+ typedef R type(decay_t<Args>..., Values...);
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Values, typename Signature>
+struct async_result<append_t<CompletionToken, Values...>, Signature>
+ : async_result<CompletionToken,
+ typename detail::append_signature<
+ Signature, Values...>::type>
+{
+ typedef typename detail::append_signature<
+ Signature, Values...>::type signature;
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler,
+ std::tuple<Values...> values, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ detail::append_handler<decay_t<Handler>, Values...>(
+ static_cast<Handler&&>(handler),
+ static_cast<std::tuple<Values...>&&>(values)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken, signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken, signature>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Values, typename DefaultCandidate>
+struct associator<Associator,
+ detail::append_handler<Handler, Values...>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::append_handler<Handler, Values...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::append_handler<Handler, Values...>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/impl/as_tuple.hpp b/3rdparty/asio/include/asio/impl/as_tuple.hpp
new file mode 100644
index 00000000000..6d47510b997
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/as_tuple.hpp
@@ -0,0 +1,245 @@
+//
+// impl/as_tuple.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_AS_TUPLE_HPP
+#define ASIO_IMPL_AS_TUPLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a as_tuple_t as a completion handler.
+template <typename Handler>
+class as_tuple_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename CompletionToken>
+ as_tuple_handler(as_tuple_t<CompletionToken> e)
+ : handler_(static_cast<CompletionToken&&>(e.token_))
+ {
+ }
+
+ template <typename RedirectedHandler>
+ as_tuple_handler(RedirectedHandler&& h)
+ : handler_(static_cast<RedirectedHandler&&>(h))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ std::make_tuple(static_cast<Args&&>(args)...));
+ }
+
+//private:
+ Handler handler_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ as_tuple_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature>
+struct as_tuple_signature;
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...)>
+{
+ typedef R type(std::tuple<decay_t<Args>...>);
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) &>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) &;
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) &&>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) &&;
+};
+
+#if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) noexcept>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) noexcept;
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) & noexcept>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) & noexcept;
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) && noexcept>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) && noexcept;
+};
+
+#endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Signatures>
+struct async_result<as_tuple_t<CompletionToken>, Signatures...>
+ : async_result<CompletionToken,
+ typename detail::as_tuple_signature<Signatures>::type...>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ detail::as_tuple_handler<decay_t<Handler>>(
+ static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signatures>::type...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...))
+ {
+ return async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signatures>::type...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...);
+ }
+};
+
+#if defined(ASIO_MSVC)
+
+// Workaround for MSVC internal compiler error.
+
+template <typename CompletionToken, typename Signature>
+struct async_result<as_tuple_t<CompletionToken>, Signature>
+ : async_result<CompletionToken,
+ typename detail::as_tuple_signature<Signature>::type>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ detail::as_tuple_handler<decay_t<Handler>>(
+ static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...))
+ {
+ return async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...);
+ }
+};
+
+#endif // defined(ASIO_MSVC)
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::as_tuple_handler<Handler>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::as_tuple_handler<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::as_tuple_handler<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/impl/awaitable.hpp b/3rdparty/asio/include/asio/impl/awaitable.hpp
new file mode 100644
index 00000000000..c5ea2649171
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/awaitable.hpp
@@ -0,0 +1,1196 @@
+//
+// impl/awaitable.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_AWAITABLE_HPP
+#define ASIO_IMPL_AWAITABLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <exception>
+#include <new>
+#include <tuple>
+#include "asio/cancellation_signal.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/detail/thread_context.hpp"
+#include "asio/detail/thread_info_base.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/post.hpp"
+#include "asio/system_error.hpp"
+#include "asio/this_coro.hpp"
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+# include "asio/detail/source_location.hpp"
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+struct awaitable_thread_has_context_switched {};
+template <typename, typename> class awaitable_async_op_handler;
+template <typename, typename, typename> class awaitable_async_op;
+
+// An awaitable_thread represents a thread-of-execution that is composed of one
+// or more "stack frames", with each frame represented by an awaitable_frame.
+// All execution occurs in the context of the awaitable_thread's executor. An
+// awaitable_thread continues to "pump" the stack frames by repeatedly resuming
+// the top stack frame until the stack is empty, or until ownership of the
+// stack is transferred to another awaitable_thread object.
+//
+// +------------------------------------+
+// | top_of_stack_ |
+// | V
+// +--------------+---+ +-----------------+
+// | | | |
+// | awaitable_thread |<---------------------------+ awaitable_frame |
+// | | attached_thread_ | |
+// +--------------+---+ (Set only when +---+-------------+
+// | frames are being |
+// | actively pumped | caller_
+// | by a thread, and |
+// | then only for V
+// | the top frame.) +-----------------+
+// | | |
+// | | awaitable_frame |
+// | | |
+// | +---+-------------+
+// | |
+// | | caller_
+// | :
+// | :
+// | |
+// | V
+// | +-----------------+
+// | bottom_of_stack_ | |
+// +------------------------------->| awaitable_frame |
+// | |
+// +-----------------+
+
+template <typename Executor>
+class awaitable_frame_base
+{
+public:
+#if !defined(ASIO_DISABLE_AWAITABLE_FRAME_RECYCLING)
+ void* operator new(std::size_t size)
+ {
+ return asio::detail::thread_info_base::allocate(
+ asio::detail::thread_info_base::awaitable_frame_tag(),
+ asio::detail::thread_context::top_of_thread_call_stack(),
+ size);
+ }
+
+ void operator delete(void* pointer, std::size_t size)
+ {
+ asio::detail::thread_info_base::deallocate(
+ asio::detail::thread_info_base::awaitable_frame_tag(),
+ asio::detail::thread_context::top_of_thread_call_stack(),
+ pointer, size);
+ }
+#endif // !defined(ASIO_DISABLE_AWAITABLE_FRAME_RECYCLING)
+
+ // The frame starts in a suspended state until the awaitable_thread object
+ // pumps the stack.
+ auto initial_suspend() noexcept
+ {
+ return suspend_always();
+ }
+
+ // On final suspension the frame is popped from the top of the stack.
+ auto final_suspend() noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ this->this_->pop_frame();
+ }
+
+ void await_resume() const noexcept
+ {
+ }
+ };
+
+ return result{this};
+ }
+
+ void set_except(std::exception_ptr e) noexcept
+ {
+ pending_exception_ = e;
+ }
+
+ void set_error(const asio::error_code& ec)
+ {
+ this->set_except(std::make_exception_ptr(asio::system_error(ec)));
+ }
+
+ void unhandled_exception()
+ {
+ set_except(std::current_exception());
+ }
+
+ void rethrow_exception()
+ {
+ if (pending_exception_)
+ {
+ std::exception_ptr ex = std::exchange(pending_exception_, nullptr);
+ std::rethrow_exception(ex);
+ }
+ }
+
+ void clear_cancellation_slot()
+ {
+ this->attached_thread_->entry_point()->cancellation_state_.slot().clear();
+ }
+
+ template <typename T>
+ auto await_transform(awaitable<T, Executor> a) const
+ {
+ if (attached_thread_->entry_point()->throw_if_cancelled_)
+ if (!!attached_thread_->get_cancellation_state().cancelled())
+ throw_error(asio::error::operation_aborted, "co_await");
+ return a;
+ }
+
+ template <typename Op>
+ auto await_transform(Op&& op,
+ constraint_t<is_async_operation<Op>::value> = 0
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , detail::source_location location = detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ {
+ if (attached_thread_->entry_point()->throw_if_cancelled_)
+ if (!!attached_thread_->get_cancellation_state().cancelled())
+ throw_error(asio::error::operation_aborted, "co_await");
+
+ return awaitable_async_op<
+ completion_signature_of_t<Op>, decay_t<Op>, Executor>{
+ std::forward<Op>(op), this
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ };
+ }
+
+ // This await transformation obtains the associated executor of the thread of
+ // execution.
+ auto await_transform(this_coro::executor_t) noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume() const noexcept
+ {
+ return this_->attached_thread_->get_executor();
+ }
+ };
+
+ return result{this};
+ }
+
+ // This await transformation obtains the associated cancellation state of the
+ // thread of execution.
+ auto await_transform(this_coro::cancellation_state_t) noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume() const noexcept
+ {
+ return this_->attached_thread_->get_cancellation_state();
+ }
+ };
+
+ return result{this};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ auto await_transform(this_coro::reset_cancellation_state_0_t) noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume() const
+ {
+ return this_->attached_thread_->reset_cancellation_state();
+ }
+ };
+
+ return result{this};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ template <typename Filter>
+ auto await_transform(
+ this_coro::reset_cancellation_state_1_t<Filter> reset) noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+ Filter filter_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return this_->attached_thread_->reset_cancellation_state(
+ static_cast<Filter&&>(filter_));
+ }
+ };
+
+ return result{this, static_cast<Filter&&>(reset.filter)};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ template <typename InFilter, typename OutFilter>
+ auto await_transform(
+ this_coro::reset_cancellation_state_2_t<InFilter, OutFilter> reset)
+ noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+ InFilter in_filter_;
+ OutFilter out_filter_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return this_->attached_thread_->reset_cancellation_state(
+ static_cast<InFilter&&>(in_filter_),
+ static_cast<OutFilter&&>(out_filter_));
+ }
+ };
+
+ return result{this,
+ static_cast<InFilter&&>(reset.in_filter),
+ static_cast<OutFilter&&>(reset.out_filter)};
+ }
+
+ // This await transformation determines whether cancellation is propagated as
+ // an exception.
+ auto await_transform(this_coro::throw_if_cancelled_0_t)
+ noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return this_->attached_thread_->throw_if_cancelled();
+ }
+ };
+
+ return result{this};
+ }
+
+ // This await transformation sets whether cancellation is propagated as an
+ // exception.
+ auto await_transform(this_coro::throw_if_cancelled_1_t throw_if_cancelled)
+ noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+ bool value_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ this_->attached_thread_->throw_if_cancelled(value_);
+ }
+ };
+
+ return result{this, throw_if_cancelled.value};
+ }
+
+ // This await transformation is used to run an async operation's initiation
+ // function object after the coroutine has been suspended. This ensures that
+ // immediate resumption of the coroutine in another thread does not cause a
+ // race condition.
+ template <typename Function>
+ auto await_transform(Function f,
+ enable_if_t<
+ is_convertible<
+ result_of_t<Function(awaitable_frame_base*)>,
+ awaitable_thread<Executor>*
+ >::value
+ >* = nullptr)
+ {
+ struct result
+ {
+ Function function_;
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ this_->after_suspend(
+ [](void* arg)
+ {
+ result* r = static_cast<result*>(arg);
+ r->function_(r->this_);
+ }, this);
+ }
+
+ void await_resume() const noexcept
+ {
+ }
+ };
+
+ return result{std::move(f), this};
+ }
+
+ // Access the awaitable thread's has_context_switched_ flag.
+ auto await_transform(detail::awaitable_thread_has_context_switched) noexcept
+ {
+ struct result
+ {
+ awaitable_frame_base* this_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ bool& await_resume() const noexcept
+ {
+ return this_->attached_thread_->entry_point()->has_context_switched_;
+ }
+ };
+
+ return result{this};
+ }
+
+ void attach_thread(awaitable_thread<Executor>* handler) noexcept
+ {
+ attached_thread_ = handler;
+ }
+
+ awaitable_thread<Executor>* detach_thread() noexcept
+ {
+ attached_thread_->entry_point()->has_context_switched_ = true;
+ return std::exchange(attached_thread_, nullptr);
+ }
+
+ void push_frame(awaitable_frame_base<Executor>* caller) noexcept
+ {
+ caller_ = caller;
+ attached_thread_ = caller_->attached_thread_;
+ attached_thread_->entry_point()->top_of_stack_ = this;
+ caller_->attached_thread_ = nullptr;
+ }
+
+ void pop_frame() noexcept
+ {
+ if (caller_)
+ caller_->attached_thread_ = attached_thread_;
+ attached_thread_->entry_point()->top_of_stack_ = caller_;
+ attached_thread_ = nullptr;
+ caller_ = nullptr;
+ }
+
+ struct resume_context
+ {
+ void (*after_suspend_fn_)(void*) = nullptr;
+ void *after_suspend_arg_ = nullptr;
+ };
+
+ void resume()
+ {
+ resume_context context;
+ resume_context_ = &context;
+ coro_.resume();
+ if (context.after_suspend_fn_)
+ context.after_suspend_fn_(context.after_suspend_arg_);
+ }
+
+ void after_suspend(void (*fn)(void*), void* arg)
+ {
+ resume_context_->after_suspend_fn_ = fn;
+ resume_context_->after_suspend_arg_ = arg;
+ }
+
+ void destroy()
+ {
+ coro_.destroy();
+ }
+
+protected:
+ coroutine_handle<void> coro_ = nullptr;
+ awaitable_thread<Executor>* attached_thread_ = nullptr;
+ awaitable_frame_base<Executor>* caller_ = nullptr;
+ std::exception_ptr pending_exception_ = nullptr;
+ resume_context* resume_context_ = nullptr;
+};
+
+template <typename T, typename Executor>
+class awaitable_frame
+ : public awaitable_frame_base<Executor>
+{
+public:
+ awaitable_frame() noexcept
+ {
+ }
+
+ awaitable_frame(awaitable_frame&& other) noexcept
+ : awaitable_frame_base<Executor>(std::move(other))
+ {
+ }
+
+ ~awaitable_frame()
+ {
+ if (has_result_)
+ std::launder(static_cast<T*>(static_cast<void*>(result_)))->~T();
+ }
+
+ awaitable<T, Executor> get_return_object() noexcept
+ {
+ this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
+ return awaitable<T, Executor>(this);
+ };
+
+ template <typename U>
+ void return_value(U&& u)
+ {
+ new (&result_) T(std::forward<U>(u));
+ has_result_ = true;
+ }
+
+ template <typename... Us>
+ void return_values(Us&&... us)
+ {
+ this->return_value(std::forward_as_tuple(std::forward<Us>(us)...));
+ }
+
+ T get()
+ {
+ this->caller_ = nullptr;
+ this->rethrow_exception();
+ return std::move(*std::launder(
+ static_cast<T*>(static_cast<void*>(result_))));
+ }
+
+private:
+ alignas(T) unsigned char result_[sizeof(T)];
+ bool has_result_ = false;
+};
+
+template <typename Executor>
+class awaitable_frame<void, Executor>
+ : public awaitable_frame_base<Executor>
+{
+public:
+ awaitable<void, Executor> get_return_object()
+ {
+ this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
+ return awaitable<void, Executor>(this);
+ };
+
+ void return_void()
+ {
+ }
+
+ void get()
+ {
+ this->caller_ = nullptr;
+ this->rethrow_exception();
+ }
+};
+
+struct awaitable_thread_entry_point {};
+
+template <typename Executor>
+class awaitable_frame<awaitable_thread_entry_point, Executor>
+ : public awaitable_frame_base<Executor>
+{
+public:
+ awaitable_frame()
+ : top_of_stack_(0),
+ has_executor_(false),
+ has_context_switched_(false),
+ throw_if_cancelled_(true)
+ {
+ }
+
+ ~awaitable_frame()
+ {
+ if (has_executor_)
+ u_.executor_.~Executor();
+ }
+
+ awaitable<awaitable_thread_entry_point, Executor> get_return_object()
+ {
+ this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
+ return awaitable<awaitable_thread_entry_point, Executor>(this);
+ };
+
+ void return_void()
+ {
+ }
+
+ void get()
+ {
+ this->caller_ = nullptr;
+ this->rethrow_exception();
+ }
+
+private:
+ template <typename> friend class awaitable_frame_base;
+ template <typename, typename> friend class awaitable_async_op_handler;
+ template <typename, typename> friend class awaitable_handler_base;
+ template <typename> friend class awaitable_thread;
+
+ union u
+ {
+ u() {}
+ ~u() {}
+ char c_;
+ Executor executor_;
+ } u_;
+
+ awaitable_frame_base<Executor>* top_of_stack_;
+ asio::cancellation_slot parent_cancellation_slot_;
+ asio::cancellation_state cancellation_state_;
+ bool has_executor_;
+ bool has_context_switched_;
+ bool throw_if_cancelled_;
+};
+
+template <typename Executor>
+class awaitable_thread
+{
+public:
+ typedef Executor executor_type;
+ typedef cancellation_slot cancellation_slot_type;
+
+ // Construct from the entry point of a new thread of execution.
+ awaitable_thread(awaitable<awaitable_thread_entry_point, Executor> p,
+ const Executor& ex, cancellation_slot parent_cancel_slot,
+ cancellation_state cancel_state)
+ : bottom_of_stack_(std::move(p))
+ {
+ bottom_of_stack_.frame_->top_of_stack_ = bottom_of_stack_.frame_;
+ new (&bottom_of_stack_.frame_->u_.executor_) Executor(ex);
+ bottom_of_stack_.frame_->has_executor_ = true;
+ bottom_of_stack_.frame_->parent_cancellation_slot_ = parent_cancel_slot;
+ bottom_of_stack_.frame_->cancellation_state_ = cancel_state;
+ }
+
+ // Transfer ownership from another awaitable_thread.
+ awaitable_thread(awaitable_thread&& other) noexcept
+ : bottom_of_stack_(std::move(other.bottom_of_stack_))
+ {
+ }
+
+ // Clean up with a last ditch effort to ensure the thread is unwound within
+ // the context of the executor.
+ ~awaitable_thread()
+ {
+ if (bottom_of_stack_.valid())
+ {
+ // Coroutine "stack unwinding" must be performed through the executor.
+ auto* bottom_frame = bottom_of_stack_.frame_;
+ (post)(bottom_frame->u_.executor_,
+ [a = std::move(bottom_of_stack_)]() mutable
+ {
+ (void)awaitable<awaitable_thread_entry_point, Executor>(
+ std::move(a));
+ });
+ }
+ }
+
+ awaitable_frame<awaitable_thread_entry_point, Executor>* entry_point()
+ {
+ return bottom_of_stack_.frame_;
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return bottom_of_stack_.frame_->u_.executor_;
+ }
+
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return bottom_of_stack_.frame_->cancellation_state_;
+ }
+
+ void reset_cancellation_state()
+ {
+ bottom_of_stack_.frame_->cancellation_state_ =
+ cancellation_state(bottom_of_stack_.frame_->parent_cancellation_slot_);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter)
+ {
+ bottom_of_stack_.frame_->cancellation_state_ =
+ cancellation_state(bottom_of_stack_.frame_->parent_cancellation_slot_,
+ static_cast<Filter&&>(filter));
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter)
+ {
+ bottom_of_stack_.frame_->cancellation_state_ =
+ cancellation_state(bottom_of_stack_.frame_->parent_cancellation_slot_,
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ bool throw_if_cancelled() const
+ {
+ return bottom_of_stack_.frame_->throw_if_cancelled_;
+ }
+
+ void throw_if_cancelled(bool value)
+ {
+ bottom_of_stack_.frame_->throw_if_cancelled_ = value;
+ }
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return bottom_of_stack_.frame_->cancellation_state_.slot();
+ }
+
+ // Launch a new thread of execution.
+ void launch()
+ {
+ bottom_of_stack_.frame_->top_of_stack_->attach_thread(this);
+ pump();
+ }
+
+protected:
+ template <typename> friend class awaitable_frame_base;
+
+ // Repeatedly resume the top stack frame until the stack is empty or until it
+ // has been transferred to another resumable_thread object.
+ void pump()
+ {
+ do
+ bottom_of_stack_.frame_->top_of_stack_->resume();
+ while (bottom_of_stack_.frame_ && bottom_of_stack_.frame_->top_of_stack_);
+
+ if (bottom_of_stack_.frame_)
+ {
+ awaitable<awaitable_thread_entry_point, Executor> a(
+ std::move(bottom_of_stack_));
+ a.frame_->rethrow_exception();
+ }
+ }
+
+ awaitable<awaitable_thread_entry_point, Executor> bottom_of_stack_;
+};
+
+template <typename Signature, typename Executor>
+class awaitable_async_op_handler;
+
+template <typename R, typename Executor>
+class awaitable_async_op_handler<R(), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type {};
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type&)
+ : awaitable_thread<Executor>(std::move(*h))
+ {
+ }
+
+ void operator()()
+ {
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static void resume(result_type&)
+ {
+ }
+};
+
+template <typename R, typename Executor>
+class awaitable_async_op_handler<R(asio::error_code), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef asio::error_code* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec)
+ {
+ result_ = &ec;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static void resume(result_type& result)
+ {
+ throw_error(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename Executor>
+class awaitable_async_op_handler<R(std::exception_ptr), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef std::exception_ptr* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(std::exception_ptr ex)
+ {
+ result_ = &ex;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static void resume(result_type& result)
+ {
+ if (*result)
+ {
+ std::exception_ptr ex = std::exchange(*result, nullptr);
+ std::rethrow_exception(ex);
+ }
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename T, typename Executor>
+class awaitable_async_op_handler<R(T), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef T* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(T result)
+ {
+ result_ = &result;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static T resume(result_type& result)
+ {
+ return std::move(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename T, typename Executor>
+class awaitable_async_op_handler<R(asio::error_code, T), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ asio::error_code* ec_;
+ T* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec, T value)
+ {
+ result_.ec_ = &ec;
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static T resume(result_type& result)
+ {
+ throw_error(*result.ec_);
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename T, typename Executor>
+class awaitable_async_op_handler<R(std::exception_ptr, T), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ std::exception_ptr* ex_;
+ T* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(std::exception_ptr ex, T value)
+ {
+ result_.ex_ = &ex;
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static T resume(result_type& result)
+ {
+ if (*result.ex_)
+ {
+ std::exception_ptr ex = std::exchange(*result.ex_, nullptr);
+ std::rethrow_exception(ex);
+ }
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename... Ts, typename Executor>
+class awaitable_async_op_handler<R(Ts...), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef std::tuple<Ts...>* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ std::tuple<Ts...> result(std::forward<Args>(args)...);
+ result_ = &result;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static std::tuple<Ts...> resume(result_type& result)
+ {
+ return std::move(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename... Ts, typename Executor>
+class awaitable_async_op_handler<R(asio::error_code, Ts...), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ asio::error_code* ec_;
+ std::tuple<Ts...>* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(asio::error_code ec, Args&&... args)
+ {
+ result_.ec_ = &ec;
+ std::tuple<Ts...> value(std::forward<Args>(args)...);
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static std::tuple<Ts...> resume(result_type& result)
+ {
+ throw_error(*result.ec_);
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename... Ts, typename Executor>
+class awaitable_async_op_handler<R(std::exception_ptr, Ts...), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ std::exception_ptr* ex_;
+ std::tuple<Ts...>* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(std::exception_ptr ex, Args&&... args)
+ {
+ result_.ex_ = &ex;
+ std::tuple<Ts...> value(std::forward<Args>(args)...);
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static std::tuple<Ts...> resume(result_type& result)
+ {
+ if (*result.ex_)
+ {
+ std::exception_ptr ex = std::exchange(*result.ex_, nullptr);
+ std::rethrow_exception(ex);
+ }
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Signature, typename Op, typename Executor>
+class awaitable_async_op
+{
+public:
+ typedef awaitable_async_op_handler<Signature, Executor> handler_type;
+
+ awaitable_async_op(Op&& o, awaitable_frame_base<Executor>* frame
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , const detail::source_location& location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ : op_(std::forward<Op>(o)),
+ frame_(frame),
+ result_()
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location_(location)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+ }
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<void>)
+ {
+ frame_->after_suspend(
+ [](void* arg)
+ {
+ awaitable_async_op* self = static_cast<awaitable_async_op*>(arg);
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ ASIO_HANDLER_LOCATION((self->location_.file_name(),
+ self->location_.line(), self->location_.function_name()));
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ std::forward<Op&&>(self->op_)(
+ handler_type(self->frame_->detach_thread(), self->result_));
+ }, this);
+ }
+
+ auto await_resume()
+ {
+ return handler_type::resume(result_);
+ }
+
+private:
+ Op&& op_;
+ awaitable_frame_base<Executor>* frame_;
+ typename handler_type::result_type result_;
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ detail::source_location location_;
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+};
+
+} // namespace detail
+} // namespace asio
+
+#if !defined(GENERATING_DOCUMENTATION)
+# if defined(ASIO_HAS_STD_COROUTINE)
+
+namespace std {
+
+template <typename T, typename Executor, typename... Args>
+struct coroutine_traits<asio::awaitable<T, Executor>, Args...>
+{
+ typedef asio::detail::awaitable_frame<T, Executor> promise_type;
+};
+
+} // namespace std
+
+# else // defined(ASIO_HAS_STD_COROUTINE)
+
+namespace std { namespace experimental {
+
+template <typename T, typename Executor, typename... Args>
+struct coroutine_traits<asio::awaitable<T, Executor>, Args...>
+{
+ typedef asio::detail::awaitable_frame<T, Executor> promise_type;
+};
+
+}} // namespace std::experimental
+
+# endif // defined(ASIO_HAS_STD_COROUTINE)
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_AWAITABLE_HPP
diff --git a/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp b/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp
index c1a2e145490..9a1d78b465e 100644
--- a/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp
+++ b/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,12 +15,11 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/associator.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
@@ -65,11 +64,10 @@ namespace detail
std::size_t previous_size, ReadHandler& handler)
: storage_(storage),
previous_size_(previous_size),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
buffered_fill_handler(const buffered_fill_handler& other)
: storage_(other.storage_),
previous_size_(other.previous_size_),
@@ -80,16 +78,15 @@ namespace detail
buffered_fill_handler(buffered_fill_handler&& other)
: storage_(other.storage_),
previous_size_(other.previous_size_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
const std::size_t bytes_transferred)
{
storage_.resize(previous_size_ + bytes_transferred);
- handler_(ec, bytes_transferred);
+ static_cast<ReadHandler&&>(handler_)(ec, bytes_transferred);
}
//private:
@@ -99,22 +96,6 @@ namespace detail
};
template <typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename ReadHandler>
inline bool asio_handler_is_continuation(
buffered_fill_handler<ReadHandler>* this_handler)
{
@@ -122,78 +103,88 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_fill_handler<ReadHandler>* this_handler)
+ template <typename Stream>
+ class initiate_async_buffered_fill
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
- template <typename Function, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_buffered_fill(
+ remove_reference_t<Stream>& next_layer)
+ : next_layer_(next_layer)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+ template <typename ReadHandler>
+ void operator()(ReadHandler&& handler,
+ buffered_stream_storage* storage) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ std::size_t previous_size = storage->size();
+ storage->resize(storage->capacity());
+ next_layer_.async_read_some(
+ buffer(
+ storage->data() + previous_size,
+ storage->size() - previous_size),
+ buffered_fill_handler<decay_t<ReadHandler>>(
+ *storage, previous_size, handler2.value));
+ }
+
+ private:
+ remove_reference_t<Stream>& next_layer_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::buffered_fill_handler<ReadHandler>, Allocator>
+template <template <typename, typename> class Associator,
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::buffered_fill_handler<ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(const detail::buffered_fill_handler<ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::buffered_fill_handler<ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::buffered_fill_handler<ReadHandler>, Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(const detail::buffered_fill_handler<ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const detail::buffered_fill_handler<ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename Stream>
-template <typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-buffered_read_stream<Stream>::async_fill(
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler>
+inline auto buffered_read_stream<Stream>::async_fill(ReadHandler&& handler)
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_fill<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- std::size_t previous_size = storage_.size();
- storage_.resize(storage_.capacity());
- next_layer_.async_read_some(
- buffer(
- storage_.data() + previous_size,
- storage_.size() - previous_size),
- detail::buffered_fill_handler<ASIO_HANDLER_TYPE(
- ReadHandler, void (asio::error_code, std::size_t))>(
- storage_, previous_size, init.completion_handler));
-
- return init.result.get();
+ return async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_buffered_fill<Stream>(next_layer_),
+ handler, &storage_);
}
template <typename Stream>
@@ -201,7 +192,8 @@ template <typename MutableBufferSequence>
std::size_t buffered_read_stream<Stream>::read_some(
const MutableBufferSequence& buffers)
{
- if (asio::buffer_size(buffers) == 0)
+ using asio::buffer_size;
+ if (buffer_size(buffers) == 0)
return 0;
if (storage_.empty())
@@ -217,7 +209,8 @@ std::size_t buffered_read_stream<Stream>::read_some(
{
ec = asio::error_code();
- if (asio::buffer_size(buffers) == 0)
+ using asio::buffer_size;
+ if (buffer_size(buffers) == 0)
return 0;
if (storage_.empty() && !this->fill(ec))
@@ -236,39 +229,37 @@ namespace detail
const MutableBufferSequence& buffers, ReadHandler& handler)
: storage_(storage),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- buffered_read_some_handler(const buffered_read_some_handler& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(other.handler_)
- {
- }
+ buffered_read_some_handler(const buffered_read_some_handler& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(other.handler_)
+ {
+ }
- buffered_read_some_handler(buffered_read_some_handler&& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
+ buffered_read_some_handler(buffered_read_some_handler&& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
void operator()(const asio::error_code& ec, std::size_t)
{
if (ec || storage_.empty())
{
const std::size_t length = 0;
- handler_(ec, length);
+ static_cast<ReadHandler&&>(handler_)(ec, length);
}
else
{
const std::size_t bytes_copied = asio::buffer_copy(
buffers_, storage_.data(), storage_.size());
storage_.consume(bytes_copied);
- handler_(ec, bytes_copied);
+ static_cast<ReadHandler&&>(handler_)(ec, bytes_copied);
}
}
@@ -279,24 +270,6 @@ namespace detail
};
template <typename MutableBufferSequence, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename MutableBufferSequence, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename MutableBufferSequence, typename ReadHandler>
inline bool asio_handler_is_continuation(
buffered_read_some_handler<
MutableBufferSequence, ReadHandler>* this_handler)
@@ -305,97 +278,102 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename MutableBufferSequence,
- typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
+ template <typename Stream>
+ class initiate_async_buffered_read_some
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
- template <typename Function, typename MutableBufferSequence,
- typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_buffered_read_some(
+ remove_reference_t<Stream>& next_layer)
+ : next_layer_(next_layer)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ buffered_stream_storage* storage,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ using asio::buffer_size;
+ non_const_lvalue<ReadHandler> handler2(handler);
+ if (buffer_size(buffers) == 0 || !storage->empty())
+ {
+ next_layer_.async_read_some(ASIO_MUTABLE_BUFFER(0, 0),
+ buffered_read_some_handler<MutableBufferSequence,
+ decay_t<ReadHandler>>(
+ *storage, buffers, handler2.value));
+ }
+ else
+ {
+ initiate_async_buffered_fill<Stream>(this->next_layer_)(
+ buffered_read_some_handler<MutableBufferSequence,
+ decay_t<ReadHandler>>(
+ *storage, buffers, handler2.value),
+ storage);
+ }
+ }
+
+ private:
+ remove_reference_t<Stream>& next_layer_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename MutableBufferSequence,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
+template <template <typename, typename> class Associator,
+ typename MutableBufferSequence, typename ReadHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
detail::buffered_read_some_handler<MutableBufferSequence, ReadHandler>,
- Allocator>
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ MutableBufferSequence, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename MutableBufferSequence,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::buffered_read_some_handler<MutableBufferSequence, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
+ static auto get(
const detail::buffered_read_some_handler<
MutableBufferSequence, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename Stream>
-template <typename MutableBufferSequence, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-buffered_read_stream<Stream>::async_read_some(
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadHandler>
+inline auto buffered_read_stream<Stream>::async_read_some(
+ const MutableBufferSequence& buffers, ReadHandler&& handler)
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_read_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- if (asio::buffer_size(buffers) == 0 || !storage_.empty())
- {
- next_layer_.async_read_some(ASIO_MUTABLE_BUFFER(0, 0),
- detail::buffered_read_some_handler<
- MutableBufferSequence, ASIO_HANDLER_TYPE(
- ReadHandler, void (asio::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
- else
- {
- this->async_fill(detail::buffered_read_some_handler<
- MutableBufferSequence, ASIO_HANDLER_TYPE(
- ReadHandler, void (asio::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
-
- return init.result.get();
+ return async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_buffered_read_some<Stream>(next_layer_),
+ handler, &storage_, buffers);
}
template <typename Stream>
diff --git a/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp b/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp
index 4ce6e5ebf04..5bf58278ca6 100644
--- a/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp
+++ b/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,12 +15,10 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/associator.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/push_options.hpp"
@@ -54,11 +52,10 @@ namespace detail
buffered_flush_handler(detail::buffered_stream_storage& storage,
WriteHandler& handler)
: storage_(storage),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
buffered_flush_handler(const buffered_flush_handler& other)
: storage_(other.storage_),
handler_(other.handler_)
@@ -67,16 +64,15 @@ namespace detail
buffered_flush_handler(buffered_flush_handler&& other)
: storage_(other.storage_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
const std::size_t bytes_written)
{
storage_.consume(bytes_written);
- handler_(ec, bytes_written);
+ static_cast<WriteHandler&&>(handler_)(ec, bytes_written);
}
//private:
@@ -85,22 +81,6 @@ namespace detail
};
template <typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename WriteHandler>
inline bool asio_handler_is_continuation(
buffered_flush_handler<WriteHandler>* this_handler)
{
@@ -108,73 +88,83 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_flush_handler<WriteHandler>* this_handler)
+ template <typename Stream>
+ class initiate_async_buffered_flush
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
- template <typename Function, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_buffered_flush(
+ remove_reference_t<Stream>& next_layer)
+ : next_layer_(next_layer)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+ template <typename WriteHandler>
+ void operator()(WriteHandler&& handler,
+ buffered_stream_storage* storage) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ async_write(next_layer_, buffer(storage->data(), storage->size()),
+ buffered_flush_handler<decay_t<WriteHandler>>(
+ *storage, handler2.value));
+ }
+
+ private:
+ remove_reference_t<Stream>& next_layer_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::buffered_flush_handler<WriteHandler>, Allocator>
+template <template <typename, typename> class Associator,
+ typename WriteHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::buffered_flush_handler<WriteHandler>,
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(const detail::buffered_flush_handler<WriteHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
+ const detail::buffered_flush_handler<WriteHandler>& h) noexcept
{
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::buffered_flush_handler<WriteHandler>, Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
- static type get(const detail::buffered_flush_handler<WriteHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const detail::buffered_flush_handler<WriteHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename Stream>
-template <typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-buffered_write_stream<Stream>::async_flush(
- ASIO_MOVE_ARG(WriteHandler) handler)
+template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler>
+inline auto buffered_write_stream<Stream>::async_flush(WriteHandler&& handler)
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_flush<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- async_write(next_layer_, buffer(storage_.data(), storage_.size()),
- detail::buffered_flush_handler<ASIO_HANDLER_TYPE(
- WriteHandler, void (asio::error_code, std::size_t))>(
- storage_, init.completion_handler));
-
- return init.result.get();
+ return async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_buffered_flush<Stream>(next_layer_),
+ handler, &storage_);
}
template <typename Stream>
@@ -182,7 +172,8 @@ template <typename ConstBufferSequence>
std::size_t buffered_write_stream<Stream>::write_some(
const ConstBufferSequence& buffers)
{
- if (asio::buffer_size(buffers) == 0)
+ using asio::buffer_size;
+ if (buffer_size(buffers) == 0)
return 0;
if (storage_.size() == storage_.capacity())
@@ -198,7 +189,8 @@ std::size_t buffered_write_stream<Stream>::write_some(
{
ec = asio::error_code();
- if (asio::buffer_size(buffers) == 0)
+ using asio::buffer_size;
+ if (buffer_size(buffers) == 0)
return 0;
if (storage_.size() == storage_.capacity() && !flush(ec))
@@ -217,44 +209,43 @@ namespace detail
const ConstBufferSequence& buffers, WriteHandler& handler)
: storage_(storage),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- buffered_write_some_handler(const buffered_write_some_handler& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(other.handler_)
- {
- }
+ buffered_write_some_handler(const buffered_write_some_handler& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(other.handler_)
+ {
+ }
- buffered_write_some_handler(buffered_write_some_handler&& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
+ buffered_write_some_handler(buffered_write_some_handler&& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(static_cast<WriteHandler&&>(other.handler_))
+ {
+ }
void operator()(const asio::error_code& ec, std::size_t)
{
if (ec)
{
const std::size_t length = 0;
- handler_(ec, length);
+ static_cast<WriteHandler&&>(handler_)(ec, length);
}
else
{
+ using asio::buffer_size;
std::size_t orig_size = storage_.size();
std::size_t space_avail = storage_.capacity() - orig_size;
- std::size_t bytes_avail = asio::buffer_size(buffers_);
+ std::size_t bytes_avail = buffer_size(buffers_);
std::size_t length = bytes_avail < space_avail
? bytes_avail : space_avail;
storage_.resize(orig_size + length);
const std::size_t bytes_copied = asio::buffer_copy(
storage_.data() + orig_size, buffers_, length);
- handler_(ec, bytes_copied);
+ static_cast<WriteHandler&&>(handler_)(ec, bytes_copied);
}
}
@@ -265,24 +256,6 @@ namespace detail
};
template <typename ConstBufferSequence, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename ConstBufferSequence, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename ConstBufferSequence, typename WriteHandler>
inline bool asio_handler_is_continuation(
buffered_write_some_handler<
ConstBufferSequence, WriteHandler>* this_handler)
@@ -291,98 +264,102 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename ConstBufferSequence,
- typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
+ template <typename Stream>
+ class initiate_async_buffered_write_some
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
- template <typename Function, typename ConstBufferSequence,
- typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_buffered_write_some(
+ remove_reference_t<Stream>& next_layer)
+ : next_layer_(next_layer)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ buffered_stream_storage* storage,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ using asio::buffer_size;
+ non_const_lvalue<WriteHandler> handler2(handler);
+ if (buffer_size(buffers) == 0 || storage->size() < storage->capacity())
+ {
+ next_layer_.async_write_some(ASIO_CONST_BUFFER(0, 0),
+ buffered_write_some_handler<ConstBufferSequence,
+ decay_t<WriteHandler>>(
+ *storage, buffers, handler2.value));
+ }
+ else
+ {
+ initiate_async_buffered_flush<Stream>(this->next_layer_)(
+ buffered_write_some_handler<ConstBufferSequence,
+ decay_t<WriteHandler>>(
+ *storage, buffers, handler2.value),
+ storage);
+ }
+ }
+
+ private:
+ remove_reference_t<Stream>& next_layer_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename ConstBufferSequence,
- typename WriteHandler, typename Allocator>
-struct associated_allocator<
+template <template <typename, typename> class Associator,
+ typename ConstBufferSequence, typename WriteHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
detail::buffered_write_some_handler<ConstBufferSequence, WriteHandler>,
- Allocator>
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
const detail::buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ ConstBufferSequence, WriteHandler>& h) noexcept
{
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename ConstBufferSequence,
- typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::buffered_write_some_handler<ConstBufferSequence, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
-
- static type get(
+ static auto get(
const detail::buffered_write_some_handler<
ConstBufferSequence, WriteHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename Stream>
-template <typename ConstBufferSequence, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-buffered_write_stream<Stream>::async_write_some(
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteHandler>
+inline auto buffered_write_stream<Stream>::async_write_some(
+ const ConstBufferSequence& buffers, WriteHandler&& handler)
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_write_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- if (asio::buffer_size(buffers) == 0
- || storage_.size() < storage_.capacity())
- {
- next_layer_.async_write_some(ASIO_CONST_BUFFER(0, 0),
- detail::buffered_write_some_handler<
- ConstBufferSequence, ASIO_HANDLER_TYPE(
- WriteHandler, void (asio::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
- else
- {
- this->async_flush(detail::buffered_write_some_handler<
- ConstBufferSequence, ASIO_HANDLER_TYPE(
- WriteHandler, void (asio::error_code, std::size_t))>(
- storage_, buffers, init.completion_handler));
- }
-
- return init.result.get();
+ return async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_buffered_write_some<Stream>(next_layer_),
+ handler, &storage_, buffers);
}
template <typename Stream>
@@ -390,9 +367,10 @@ template <typename ConstBufferSequence>
std::size_t buffered_write_stream<Stream>::copy(
const ConstBufferSequence& buffers)
{
+ using asio::buffer_size;
std::size_t orig_size = storage_.size();
std::size_t space_avail = storage_.capacity() - orig_size;
- std::size_t bytes_avail = asio::buffer_size(buffers);
+ std::size_t bytes_avail = buffer_size(buffers);
std::size_t length = bytes_avail < space_avail ? bytes_avail : space_avail;
storage_.resize(orig_size + length);
return asio::buffer_copy(
diff --git a/3rdparty/asio/include/asio/impl/cancellation_signal.ipp b/3rdparty/asio/include/asio/impl/cancellation_signal.ipp
new file mode 100644
index 00000000000..f63ab8de0f3
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/cancellation_signal.ipp
@@ -0,0 +1,96 @@
+//
+// impl/cancellation_signal.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_CANCELLATION_SIGNAL_IPP
+#define ASIO_IMPL_CANCELLATION_SIGNAL_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/detail/thread_context.hpp"
+#include "asio/detail/thread_info_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+cancellation_signal::~cancellation_signal()
+{
+ if (handler_)
+ {
+ std::pair<void*, std::size_t> mem = handler_->destroy();
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ }
+}
+
+void cancellation_slot::clear()
+{
+ if (handler_ != 0 && *handler_ != 0)
+ {
+ std::pair<void*, std::size_t> mem = (*handler_)->destroy();
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ *handler_ = 0;
+ }
+}
+
+std::pair<void*, std::size_t> cancellation_slot::prepare_memory(
+ std::size_t size, std::size_t align)
+{
+ assert(handler_);
+ std::pair<void*, std::size_t> mem;
+ if (*handler_)
+ {
+ mem = (*handler_)->destroy();
+ *handler_ = 0;
+ }
+ if (size > mem.second
+ || reinterpret_cast<std::size_t>(mem.first) % align != 0)
+ {
+ if (mem.first)
+ {
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ }
+ mem.first = detail::thread_info_base::allocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ size, align);
+ mem.second = size;
+ }
+ return mem;
+}
+
+cancellation_slot::auto_delete_helper::~auto_delete_helper()
+{
+ if (mem.first)
+ {
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ }
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_CANCELLATION_SIGNAL_IPP
diff --git a/3rdparty/asio/include/asio/impl/co_spawn.hpp b/3rdparty/asio/include/asio/impl/co_spawn.hpp
new file mode 100644
index 00000000000..3eba7d86db8
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/co_spawn.hpp
@@ -0,0 +1,449 @@
+//
+// impl/co_spawn.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_CO_SPAWN_HPP
+#define ASIO_IMPL_CO_SPAWN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/awaitable.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+#include "asio/dispatch.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/post.hpp"
+#include "asio/prefer.hpp"
+#include "asio/use_awaitable.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Executor, typename = void>
+class co_spawn_work_guard
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ co_spawn_work_guard(const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+private:
+ executor_type executor_;
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+struct co_spawn_work_guard<Executor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ >> : executor_work_guard<Executor>
+{
+ co_spawn_work_guard(const Executor& ex)
+ : executor_work_guard<Executor>(ex)
+ {
+ }
+};
+
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Handler, typename Executor,
+ typename Function, typename = void>
+struct co_spawn_state
+{
+ template <typename H, typename F>
+ co_spawn_state(H&& h, const Executor& ex, F&& f)
+ : handler(std::forward<H>(h)),
+ spawn_work(ex),
+ handler_work(asio::get_associated_executor(handler, ex)),
+ function(std::forward<F>(f))
+ {
+ }
+
+ Handler handler;
+ co_spawn_work_guard<Executor> spawn_work;
+ co_spawn_work_guard<associated_executor_t<Handler, Executor>> handler_work;
+ Function function;
+};
+
+template <typename Handler, typename Executor, typename Function>
+struct co_spawn_state<Handler, Executor, Function,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ template <typename H, typename F>
+ co_spawn_state(H&& h, const Executor& ex, F&& f)
+ : handler(std::forward<H>(h)),
+ handler_work(ex),
+ function(std::forward<F>(f))
+ {
+ }
+
+ Handler handler;
+ co_spawn_work_guard<Executor> handler_work;
+ Function function;
+};
+
+struct co_spawn_dispatch
+{
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) const
+ -> decltype(asio::dispatch(std::forward<CompletionToken>(token)))
+ {
+ return asio::dispatch(std::forward<CompletionToken>(token));
+ }
+};
+
+struct co_spawn_post
+{
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) const
+ -> decltype(asio::post(std::forward<CompletionToken>(token)))
+ {
+ return asio::post(std::forward<CompletionToken>(token));
+ }
+};
+
+template <typename T, typename Handler, typename Executor, typename Function>
+awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
+ awaitable<T, Executor>*, co_spawn_state<Handler, Executor, Function> s)
+{
+ (void) co_await co_spawn_dispatch{};
+
+ (co_await awaitable_thread_has_context_switched{}) = false;
+ std::exception_ptr e = nullptr;
+ bool done = false;
+ try
+ {
+ T t = co_await s.function();
+
+ done = true;
+
+ bool switched = (co_await awaitable_thread_has_context_switched{});
+ if (!switched)
+ {
+ co_await this_coro::throw_if_cancelled(false);
+ (void) co_await co_spawn_post();
+ }
+
+ (dispatch)(s.handler_work.get_executor(),
+ [handler = std::move(s.handler), t = std::move(t)]() mutable
+ {
+ std::move(handler)(std::exception_ptr(), std::move(t));
+ });
+
+ co_return;
+ }
+ catch (...)
+ {
+ if (done)
+ throw;
+
+ e = std::current_exception();
+ }
+
+ bool switched = (co_await awaitable_thread_has_context_switched{});
+ if (!switched)
+ {
+ co_await this_coro::throw_if_cancelled(false);
+ (void) co_await co_spawn_post();
+ }
+
+ (dispatch)(s.handler_work.get_executor(),
+ [handler = std::move(s.handler), e]() mutable
+ {
+ std::move(handler)(e, T());
+ });
+}
+
+template <typename Handler, typename Executor, typename Function>
+awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
+ awaitable<void, Executor>*, co_spawn_state<Handler, Executor, Function> s)
+{
+ (void) co_await co_spawn_dispatch{};
+
+ (co_await awaitable_thread_has_context_switched{}) = false;
+ std::exception_ptr e = nullptr;
+ try
+ {
+ co_await s.function();
+ }
+ catch (...)
+ {
+ e = std::current_exception();
+ }
+
+ bool switched = (co_await awaitable_thread_has_context_switched{});
+ if (!switched)
+ {
+ co_await this_coro::throw_if_cancelled(false);
+ (void) co_await co_spawn_post();
+ }
+
+ (dispatch)(s.handler_work.get_executor(),
+ [handler = std::move(s.handler), e]() mutable
+ {
+ std::move(handler)(e);
+ });
+}
+
+template <typename T, typename Executor>
+class awaitable_as_function
+{
+public:
+ explicit awaitable_as_function(awaitable<T, Executor>&& a)
+ : awaitable_(std::move(a))
+ {
+ }
+
+ awaitable<T, Executor> operator()()
+ {
+ return std::move(awaitable_);
+ }
+
+private:
+ awaitable<T, Executor> awaitable_;
+};
+
+template <typename Handler, typename Executor, typename = void>
+class co_spawn_cancellation_handler
+{
+public:
+ co_spawn_cancellation_handler(const Handler&, const Executor& ex)
+ : signal_(detail::allocate_shared<cancellation_signal>(
+ detail::recycling_allocator<cancellation_signal,
+ detail::thread_info_base::cancellation_signal_tag>())),
+ ex_(ex)
+ {
+ }
+
+ cancellation_slot slot()
+ {
+ return signal_->slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ shared_ptr<cancellation_signal> sig = signal_;
+ asio::dispatch(ex_, [sig, type]{ sig->emit(type); });
+ }
+
+private:
+ shared_ptr<cancellation_signal> signal_;
+ Executor ex_;
+};
+
+template <typename Handler, typename Executor>
+class co_spawn_cancellation_handler<Handler, Executor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+public:
+ co_spawn_cancellation_handler(const Handler&, const Executor&)
+ {
+ }
+
+ cancellation_slot slot()
+ {
+ return signal_.slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ signal_.emit(type);
+ }
+
+private:
+ cancellation_signal signal_;
+};
+
+template <typename Executor>
+class initiate_co_spawn
+{
+public:
+ typedef Executor executor_type;
+
+ template <typename OtherExecutor>
+ explicit initiate_co_spawn(const OtherExecutor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename Handler, typename F>
+ void operator()(Handler&& handler, F&& f) const
+ {
+ typedef result_of_t<F()> awaitable_type;
+ typedef decay_t<Handler> handler_type;
+ typedef decay_t<F> function_type;
+ typedef co_spawn_cancellation_handler<
+ handler_type, Executor> cancel_handler_type;
+
+ auto slot = asio::get_associated_cancellation_slot(handler);
+ cancel_handler_type* cancel_handler = slot.is_connected()
+ ? &slot.template emplace<cancel_handler_type>(handler, ex_)
+ : nullptr;
+
+ cancellation_slot proxy_slot(
+ cancel_handler
+ ? cancel_handler->slot()
+ : cancellation_slot());
+
+ cancellation_state cancel_state(proxy_slot);
+
+ auto a = (co_spawn_entry_point)(static_cast<awaitable_type*>(nullptr),
+ co_spawn_state<handler_type, Executor, function_type>(
+ std::forward<Handler>(handler), ex_, std::forward<F>(f)));
+ awaitable_handler<executor_type, void>(std::move(a),
+ ex_, proxy_slot, cancel_state).launch();
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+
+template <typename Executor, typename T, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr, T)) CompletionToken>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(const Executor& ex,
+ awaitable<T, AwaitableExecutor> a, CompletionToken&& token,
+ constraint_t<
+ (is_executor<Executor>::value || execution::is_executor<Executor>::value)
+ && is_convertible<Executor, AwaitableExecutor>::value
+ >)
+{
+ return async_initiate<CompletionToken, void(std::exception_ptr, T)>(
+ detail::initiate_co_spawn<AwaitableExecutor>(AwaitableExecutor(ex)),
+ token, detail::awaitable_as_function<T, AwaitableExecutor>(std::move(a)));
+}
+
+template <typename Executor, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr)) CompletionToken>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(const Executor& ex,
+ awaitable<void, AwaitableExecutor> a, CompletionToken&& token,
+ constraint_t<
+ (is_executor<Executor>::value || execution::is_executor<Executor>::value)
+ && is_convertible<Executor, AwaitableExecutor>::value
+ >)
+{
+ return async_initiate<CompletionToken, void(std::exception_ptr)>(
+ detail::initiate_co_spawn<AwaitableExecutor>(AwaitableExecutor(ex)),
+ token, detail::awaitable_as_function<
+ void, AwaitableExecutor>(std::move(a)));
+}
+
+template <typename ExecutionContext, typename T, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr, T)) CompletionToken>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(ExecutionContext& ctx,
+ awaitable<T, AwaitableExecutor> a, CompletionToken&& token,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ && is_convertible<typename ExecutionContext::executor_type,
+ AwaitableExecutor>::value
+ >)
+{
+ return (co_spawn)(ctx.get_executor(), std::move(a),
+ std::forward<CompletionToken>(token));
+}
+
+template <typename ExecutionContext, typename AwaitableExecutor,
+ ASIO_COMPLETION_TOKEN_FOR(
+ void(std::exception_ptr)) CompletionToken>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(ExecutionContext& ctx,
+ awaitable<void, AwaitableExecutor> a, CompletionToken&& token,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ && is_convertible<typename ExecutionContext::executor_type,
+ AwaitableExecutor>::value
+ >)
+{
+ return (co_spawn)(ctx.get_executor(), std::move(a),
+ std::forward<CompletionToken>(token));
+}
+
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
+ result_of_t<F()>>::type) CompletionToken>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
+co_spawn(const Executor& ex, F&& f, CompletionToken&& token,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+{
+ return async_initiate<CompletionToken,
+ typename detail::awaitable_signature<result_of_t<F()>>::type>(
+ detail::initiate_co_spawn<
+ typename result_of_t<F()>::executor_type>(ex),
+ token, std::forward<F>(f));
+}
+
+template <typename ExecutionContext, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
+ result_of_t<F()>>::type) CompletionToken>
+inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
+co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
+{
+ return (co_spawn)(ctx.get_executor(), std::forward<F>(f),
+ std::forward<CompletionToken>(token));
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_CO_SPAWN_HPP
diff --git a/3rdparty/asio/include/asio/impl/connect.hpp b/3rdparty/asio/include/asio/impl/connect.hpp
index 2ab72f6d726..ac74ae0a782 100644
--- a/3rdparty/asio/include/asio/impl/connect.hpp
+++ b/3rdparty/asio/include/asio/impl/connect.hpp
@@ -2,7 +2,7 @@
// impl/connect.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,14 +16,15 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <algorithm>
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
+#include "asio/associator.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
#include "asio/post.hpp"
@@ -41,14 +42,69 @@ namespace detail
return true;
}
};
+
+ template <typename Protocol, typename Iterator>
+ inline typename Protocol::endpoint deref_connect_result(
+ Iterator iter, asio::error_code& ec)
+ {
+ return ec ? typename Protocol::endpoint() : *iter;
+ }
+
+ template <typename T, typename Iterator>
+ struct legacy_connect_condition_helper : T
+ {
+ typedef char (*fallback_func_type)(...);
+ operator fallback_func_type() const;
+ };
+
+ template <typename R, typename Arg1, typename Arg2, typename Iterator>
+ struct legacy_connect_condition_helper<R (*)(Arg1, Arg2), Iterator>
+ {
+ R operator()(Arg1, Arg2) const;
+ char operator()(...) const;
+ };
+
+ template <typename T, typename Iterator>
+ struct is_legacy_connect_condition
+ {
+ static char asio_connect_condition_check(char);
+ static char (&asio_connect_condition_check(Iterator))[2];
+
+ static const bool value =
+ sizeof(asio_connect_condition_check(
+ (declval<legacy_connect_condition_helper<T, Iterator>>())(
+ declval<const asio::error_code>(),
+ declval<const Iterator>()))) != 1;
+ };
+
+ template <typename ConnectCondition, typename Iterator>
+ inline Iterator call_connect_condition(ConnectCondition& connect_condition,
+ const asio::error_code& ec, Iterator next, Iterator end,
+ enable_if_t<is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>* = 0)
+ {
+ if (next != end)
+ return connect_condition(ec, next);
+ return end;
+ }
+
+ template <typename ConnectCondition, typename Iterator>
+ inline Iterator call_connect_condition(ConnectCondition& connect_condition,
+ const asio::error_code& ec, Iterator next, Iterator end,
+ enable_if_t<!is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>* = 0)
+ {
+ for (;next != end; ++next)
+ if (connect_condition(ec, *next))
+ return next;
+ return end;
+ }
}
-template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type*)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
asio::error_code ec;
typename Protocol::endpoint result = connect(s, endpoints, ec);
@@ -56,23 +112,20 @@ typename Protocol::endpoint connect(
return result;
}
-template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename EndpointSequence>
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, asio::error_code& ec,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type*)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
- typename EndpointSequence::iterator iter = connect(
- s, endpoints.begin(), endpoints.end(),
- detail::default_connect_condition(), ec);
- return ec ? typename Protocol::endpoint() : *iter;
+ return detail::deref_connect_result<Protocol>(
+ connect(s, endpoints.begin(), endpoints.end(),
+ detail::default_connect_condition(), ec), ec);
}
#if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
asio::error_code ec;
Iterator result = connect(s, begin, ec);
@@ -80,17 +133,17 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s, Iterator begin,
return result;
}
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-inline Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename Iterator>
+inline Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, asio::error_code& ec,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
return connect(s, begin, Iterator(), detail::default_connect_condition(), ec);
}
#endif // !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename Iterator>
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end)
{
asio::error_code ec;
@@ -99,20 +152,18 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
return result;
}
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator>
-inline Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor, typename Iterator>
+inline Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, asio::error_code& ec)
{
return connect(s, begin, end, detail::default_connect_condition(), ec);
}
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type*)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
asio::error_code ec;
typename Protocol::endpoint result = connect(
@@ -121,26 +172,24 @@ typename Protocol::endpoint connect(
return result;
}
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(
- basic_socket<Protocol ASIO_SVC_TARG>& s,
+typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
asio::error_code& ec,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type*)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
- typename EndpointSequence::iterator iter = connect(
- s, endpoints.begin(), endpoints.end(), connect_condition, ec);
- return ec ? typename Protocol::endpoint() : *iter;
+ return detail::deref_connect_result<Protocol>(
+ connect(s, endpoints.begin(), endpoints.end(),
+ connect_condition, ec), ec);
}
#if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
asio::error_code ec;
Iterator result = connect(s, begin, connect_condition, ec);
@@ -148,21 +197,21 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
return result;
}
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-inline Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+inline Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
asio::error_code& ec,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
return connect(s, begin, Iterator(), connect_condition, ec);
}
#endif // !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end, ConnectCondition connect_condition)
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ Iterator end, ConnectCondition connect_condition)
{
asio::error_code ec;
Iterator result = connect(s, begin, end, connect_condition, ec);
@@ -170,23 +219,26 @@ Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
return result;
}
-template <typename Protocol ASIO_SVC_TPARAM,
+template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end, ConnectCondition connect_condition,
+Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ Iterator end, ConnectCondition connect_condition,
asio::error_code& ec)
{
ec = asio::error_code();
for (Iterator iter = begin; iter != end; ++iter)
{
- if (connect_condition(ec, iter))
+ iter = (detail::call_connect_condition(connect_condition, ec, iter, end));
+ if (iter != end)
{
s.close(ec);
s.connect(*iter, ec);
if (!ec)
return iter;
}
+ else
+ break;
}
if (!ec)
@@ -208,11 +260,11 @@ namespace detail
{
}
- template <typename Endpoint>
- bool check_condition(const asio::error_code& ec,
- const Endpoint& endpoint)
+ template <typename Iterator>
+ void check_condition(const asio::error_code& ec,
+ Iterator& iter, Iterator& end)
{
- return connect_condition_(ec, endpoint);
+ iter = detail::call_connect_condition(connect_condition_, ec, iter, end);
}
private:
@@ -229,35 +281,37 @@ namespace detail
{
}
- template <typename Endpoint>
- bool check_condition(const asio::error_code&, const Endpoint&)
+ template <typename Iterator>
+ void check_condition(const asio::error_code&, Iterator&, Iterator&)
{
- return true;
}
};
- template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- class range_connect_op : base_from_connect_condition<ConnectCondition>
+ template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+ class range_connect_op
+ : public base_from_cancellation_state<RangeConnectHandler>,
+ base_from_connect_condition<ConnectCondition>
{
public:
- range_connect_op(basic_socket<Protocol ASIO_SVC_TARG>& sock,
+ range_connect_op(basic_socket<Protocol, Executor>& sock,
const EndpointSequence& endpoints,
const ConnectCondition& connect_condition,
RangeConnectHandler& handler)
- : base_from_connect_condition<ConnectCondition>(connect_condition),
+ : base_from_cancellation_state<RangeConnectHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_connect_condition<ConnectCondition>(connect_condition),
socket_(sock),
endpoints_(endpoints),
index_(0),
start_(0),
- handler_(ASIO_MOVE_CAST(RangeConnectHandler)(handler))
+ handler_(static_cast<RangeConnectHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
range_connect_op(const range_connect_op& other)
- : base_from_connect_condition<ConnectCondition>(other),
+ : base_from_cancellation_state<RangeConnectHandler>(other),
+ base_from_connect_condition<ConnectCondition>(other),
socket_(other.socket_),
endpoints_(other.endpoints_),
index_(other.index_),
@@ -267,49 +321,61 @@ namespace detail
}
range_connect_op(range_connect_op&& other)
- : base_from_connect_condition<ConnectCondition>(other),
+ : base_from_cancellation_state<RangeConnectHandler>(
+ static_cast<base_from_cancellation_state<RangeConnectHandler>&&>(
+ other)),
+ base_from_connect_condition<ConnectCondition>(other),
socket_(other.socket_),
endpoints_(other.endpoints_),
index_(other.index_),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(RangeConnectHandler)(other.handler_))
+ handler_(static_cast<RangeConnectHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec, int start = 0)
{
- typename EndpointSequence::iterator iter = endpoints_.begin();
+ this->process(ec, start,
+ const_cast<const EndpointSequence&>(endpoints_).begin(),
+ const_cast<const EndpointSequence&>(endpoints_).end());
+ }
+
+ //private:
+ template <typename Iterator>
+ void process(asio::error_code ec,
+ int start, Iterator begin, Iterator end)
+ {
+ Iterator iter = begin;
std::advance(iter, index_);
- typename EndpointSequence::iterator end = endpoints_.end();
switch (start_ = start)
{
case 1:
for (;;)
{
- for (; iter != end; ++iter, ++index_)
- if (this->check_condition(ec, *iter))
- break;
+ this->check_condition(ec, iter, end);
+ index_ = std::distance(begin, iter);
if (iter != end)
{
socket_.close(ec);
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
socket_.async_connect(*iter,
- ASIO_MOVE_CAST(range_connect_op)(*this));
+ static_cast<range_connect_op&&>(*this));
return;
}
if (start)
{
ec = asio::error::not_found;
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
asio::post(socket_.get_executor(),
detail::bind_handler(
- ASIO_MOVE_CAST(range_connect_op)(*this), ec));
+ static_cast<range_connect_op&&>(*this), ec));
return;
}
- default:
+ /* fall-through */ default:
if (iter == end)
break;
@@ -323,100 +389,103 @@ namespace detail
if (!ec)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = asio::error::operation_aborted;
+ break;
+ }
+
++iter;
++index_;
}
- handler_(static_cast<const asio::error_code&>(ec),
+ static_cast<RangeConnectHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
static_cast<const typename Protocol::endpoint&>(
ec || iter == end ? typename Protocol::endpoint() : *iter));
}
}
- //private:
- basic_socket<Protocol ASIO_SVC_TARG>& socket_;
+ basic_socket<Protocol, Executor>& socket_;
EndpointSequence endpoints_;
std::size_t index_;
int start_;
RangeConnectHandler handler_;
};
- template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline void* asio_handler_allocate(std::size_t size,
- range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
+ template <typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
inline bool asio_handler_is_continuation(
- range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
+ range_connect_op<Protocol, Executor, EndpointSequence,
ConnectCondition, RangeConnectHandler>* this_handler)
{
return asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename Protocol
- ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
- inline void asio_handler_invoke(Function& function,
- range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
+ template <typename Protocol, typename Executor>
+ class initiate_async_range_connect
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef Executor executor_type;
- template <typename Function, typename Protocol
- ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
- inline void asio_handler_invoke(const Function& function,
- range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_range_connect(basic_socket<Protocol, Executor>& s)
+ : socket_(s)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return socket_.get_executor();
+ }
+
+ template <typename RangeConnectHandler,
+ typename EndpointSequence, typename ConnectCondition>
+ void operator()(RangeConnectHandler&& handler,
+ const EndpointSequence& endpoints,
+ const ConnectCondition& connect_condition) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for an
+ // RangeConnectHandler.
+ ASIO_RANGE_CONNECT_HANDLER_CHECK(RangeConnectHandler,
+ handler, typename Protocol::endpoint) type_check;
+
+ non_const_lvalue<RangeConnectHandler> handler2(handler);
+ range_connect_op<Protocol, Executor, EndpointSequence, ConnectCondition,
+ decay_t<RangeConnectHandler>>(socket_, endpoints,
+ connect_condition, handler2.value)(asio::error_code(), 1);
+ }
+
+ private:
+ basic_socket<Protocol, Executor>& socket_;
+ };
- template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
+ template <typename Protocol, typename Executor, typename Iterator,
typename ConnectCondition, typename IteratorConnectHandler>
- class iterator_connect_op : base_from_connect_condition<ConnectCondition>
+ class iterator_connect_op
+ : public base_from_cancellation_state<IteratorConnectHandler>,
+ base_from_connect_condition<ConnectCondition>
{
public:
- iterator_connect_op(basic_socket<Protocol ASIO_SVC_TARG>& sock,
+ iterator_connect_op(basic_socket<Protocol, Executor>& sock,
const Iterator& begin, const Iterator& end,
const ConnectCondition& connect_condition,
IteratorConnectHandler& handler)
- : base_from_connect_condition<ConnectCondition>(connect_condition),
+ : base_from_cancellation_state<IteratorConnectHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_connect_condition<ConnectCondition>(connect_condition),
socket_(sock),
iter_(begin),
end_(end),
start_(0),
- handler_(ASIO_MOVE_CAST(IteratorConnectHandler)(handler))
+ handler_(static_cast<IteratorConnectHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
iterator_connect_op(const iterator_connect_op& other)
- : base_from_connect_condition<ConnectCondition>(other),
+ : base_from_cancellation_state<IteratorConnectHandler>(other),
+ base_from_connect_condition<ConnectCondition>(other),
socket_(other.socket_),
iter_(other.iter_),
end_(other.end_),
@@ -426,15 +495,17 @@ namespace detail
}
iterator_connect_op(iterator_connect_op&& other)
- : base_from_connect_condition<ConnectCondition>(other),
+ : base_from_cancellation_state<IteratorConnectHandler>(
+ static_cast<base_from_cancellation_state<IteratorConnectHandler>&&>(
+ other)),
+ base_from_connect_condition<ConnectCondition>(other),
socket_(other.socket_),
iter_(other.iter_),
end_(other.end_),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(IteratorConnectHandler)(other.handler_))
+ handler_(static_cast<IteratorConnectHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec, int start = 0)
{
@@ -443,28 +514,28 @@ namespace detail
case 1:
for (;;)
{
- for (; iter_ != end_; ++iter_)
- if (this->check_condition(ec, *iter_))
- break;
+ this->check_condition(ec, iter_, end_);
if (iter_ != end_)
{
socket_.close(ec);
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
socket_.async_connect(*iter_,
- ASIO_MOVE_CAST(iterator_connect_op)(*this));
+ static_cast<iterator_connect_op&&>(*this));
return;
}
if (start)
{
ec = asio::error::not_found;
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
asio::post(socket_.get_executor(),
detail::bind_handler(
- ASIO_MOVE_CAST(iterator_connect_op)(*this), ec));
+ static_cast<iterator_connect_op&&>(*this), ec));
return;
}
- default:
+ /* fall-through */ default:
if (iter_ == end_)
break;
@@ -478,323 +549,257 @@ namespace detail
if (!ec)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = asio::error::operation_aborted;
+ break;
+ }
+
++iter_;
}
- handler_(static_cast<const asio::error_code&>(ec),
+ static_cast<IteratorConnectHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
static_cast<const Iterator&>(iter_));
}
}
//private:
- basic_socket<Protocol ASIO_SVC_TARG>& socket_;
+ basic_socket<Protocol, Executor>& socket_;
Iterator iter_;
Iterator end_;
int start_;
IteratorConnectHandler handler_;
};
- template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void* asio_handler_allocate(std::size_t size,
- iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
+ template <typename Protocol, typename Executor, typename Iterator,
typename ConnectCondition, typename IteratorConnectHandler>
inline bool asio_handler_is_continuation(
- iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
+ iterator_connect_op<Protocol, Executor, Iterator,
ConnectCondition, IteratorConnectHandler>* this_handler)
{
return asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename Protocol
- ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void asio_handler_invoke(Function& function,
- iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
+ template <typename Protocol, typename Executor>
+ class initiate_async_iterator_connect
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef Executor executor_type;
- template <typename Function, typename Protocol
- ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline void asio_handler_invoke(const Function& function,
- iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_iterator_connect(
+ basic_socket<Protocol, Executor>& s)
+ : socket_(s)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return socket_.get_executor();
+ }
+
+ template <typename IteratorConnectHandler,
+ typename Iterator, typename ConnectCondition>
+ void operator()(IteratorConnectHandler&& handler,
+ Iterator begin, Iterator end,
+ const ConnectCondition& connect_condition) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for an
+ // IteratorConnectHandler.
+ ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
+ IteratorConnectHandler, handler, Iterator) type_check;
+
+ non_const_lvalue<IteratorConnectHandler> handler2(handler);
+ iterator_connect_op<Protocol, Executor, Iterator, ConnectCondition,
+ decay_t<IteratorConnectHandler>>(socket_, begin, end,
+ connect_condition, handler2.value)(asio::error_code(), 1);
+ }
+
+ private:
+ basic_socket<Protocol, Executor>& socket_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler, typename Allocator>
-struct associated_allocator<
- detail::range_connect_op<Protocol ASIO_SVC_TARG,
+template <template <typename, typename> class Associator,
+ typename Protocol, typename Executor, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::range_connect_op<Protocol, Executor,
EndpointSequence, ConnectCondition, RangeConnectHandler>,
- Allocator>
+ DefaultCandidate>
+ : Associator<RangeConnectHandler, DefaultCandidate>
{
- typedef typename associated_allocator<
- RangeConnectHandler, Allocator>::type type;
-
- static type get(
- const detail::range_connect_op<Protocol ASIO_SVC_TARG,
- EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<RangeConnectHandler, DefaultCandidate>::type get(
+ const detail::range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>& h) noexcept
{
- return associated_allocator<RangeConnectHandler,
- Allocator>::get(h.handler_, a);
+ return Associator<RangeConnectHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler, typename Executor>
-struct associated_executor<
- detail::range_connect_op<Protocol ASIO_SVC_TARG,
- EndpointSequence, ConnectCondition, RangeConnectHandler>,
- Executor>
-{
- typedef typename associated_executor<
- RangeConnectHandler, Executor>::type type;
- static type get(
- const detail::range_connect_op<Protocol ASIO_SVC_TARG,
+ static auto get(
+ const detail::range_connect_op<Protocol, Executor,
EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(
+ Associator<RangeConnectHandler, DefaultCandidate>::get(
+ h.handler_, c))
{
- return associated_executor<RangeConnectHandler,
- Executor>::get(h.handler_, ex);
+ return Associator<RangeConnectHandler, DefaultCandidate>::get(
+ h.handler_, c);
}
};
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition,
- typename IteratorConnectHandler, typename Allocator>
-struct associated_allocator<
- detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename Protocol, typename Executor, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::iterator_connect_op<Protocol, Executor,
+ Iterator, ConnectCondition, IteratorConnectHandler>,
+ DefaultCandidate>
+ : Associator<IteratorConnectHandler, DefaultCandidate>
{
- typedef typename associated_allocator<
- IteratorConnectHandler, Allocator>::type type;
-
- static type get(
- const detail::iterator_connect_op<Protocol ASIO_SVC_TARG,
- Iterator, ConnectCondition, IteratorConnectHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<IteratorConnectHandler, DefaultCandidate>::type
+ get(const detail::iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>& h) noexcept
{
- return associated_allocator<IteratorConnectHandler,
- Allocator>::get(h.handler_, a);
+ return Associator<IteratorConnectHandler, DefaultCandidate>::get(
+ h.handler_);
}
-};
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition,
- typename IteratorConnectHandler, typename Executor>
-struct associated_executor<
- detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, IteratorConnectHandler>,
- Executor>
-{
- typedef typename associated_executor<
- IteratorConnectHandler, Executor>::type type;
-
- static type get(
- const detail::iterator_connect_op<Protocol ASIO_SVC_TARG,
+ static auto get(
+ const detail::iterator_connect_op<Protocol, Executor,
Iterator, ConnectCondition, IteratorConnectHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(
+ Associator<IteratorConnectHandler, DefaultCandidate>::get(
+ h.handler_, c))
{
- return associated_executor<IteratorConnectHandler,
- Executor>::get(h.handler_, ex);
+ return Associator<IteratorConnectHandler, DefaultCandidate>::get(
+ h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename Protocol ASIO_SVC_TPARAM,
- typename EndpointSequence, typename RangeConnectHandler>
-inline ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints,
- ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type*)
+template <typename Protocol, typename Executor, typename EndpointSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::endpoint)) RangeConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, RangeConnectToken&& token,
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, declval<detail::default_connect_condition>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a RangeConnectHandler.
- ASIO_RANGE_CONNECT_HANDLER_CHECK(
- RangeConnectHandler, handler, typename Protocol::endpoint) type_check;
-
- async_completion<RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint)>
- init(handler);
-
- detail::range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
- detail::default_connect_condition,
- ASIO_HANDLER_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))>(s,
- endpoints, detail::default_connect_condition(),
- init.completion_handler)(asio::error_code(), 1);
-
- return init.result.get();
+ return async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ detail::initiate_async_range_connect<Protocol, Executor>(s),
+ token, endpoints, detail::default_connect_condition());
}
#if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+template <typename Protocol, typename Executor, typename Iterator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, IteratorConnectToken&& token,
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), declval<detail::default_connect_condition>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (asio::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- detail::default_connect_condition, ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
- begin, Iterator(), detail::default_connect_condition(),
- init.completion_handler)(asio::error_code(), 1);
-
- return init.result.get();
+ return async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, Iterator(), detail::default_connect_condition());
}
#endif // !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler)
+template <typename Protocol, typename Executor, typename Iterator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end, IteratorConnectToken&& token)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, declval<detail::default_connect_condition>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (asio::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- detail::default_connect_condition, ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
- begin, end, detail::default_connect_condition(),
- init.completion_handler)(asio::error_code(), 1);
-
- return init.result.get();
+ return async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, end, detail::default_connect_condition());
}
-template <typename Protocol ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
-inline ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor,
+ typename EndpointSequence, typename ConnectCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ typename Protocol::endpoint)) RangeConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type*)
+ RangeConnectToken&& token,
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, connect_condition))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a RangeConnectHandler.
- ASIO_RANGE_CONNECT_HANDLER_CHECK(
- RangeConnectHandler, handler, typename Protocol::endpoint) type_check;
-
- async_completion<RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint)>
- init(handler);
-
- detail::range_connect_op<Protocol ASIO_SVC_TARG, EndpointSequence,
- ConnectCondition, ASIO_HANDLER_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))>(s,
- endpoints, connect_condition, init.completion_handler)(
- asio::error_code(), 1);
-
- return init.result.get();
+ return async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ detail::initiate_async_range_connect<Protocol, Executor>(s),
+ token, endpoints, connect_condition);
}
#if !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
- Iterator begin, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type*)
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ ConnectCondition connect_condition, IteratorConnectToken&& token,
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), connect_condition))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (asio::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
- begin, Iterator(), connect_condition, init.completion_handler)(
- asio::error_code(), 1);
-
- return init.result.get();
+ return async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, Iterator(), connect_condition);
}
#endif // !defined(ASIO_NO_DEPRECATED)
-template <typename Protocol ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-inline ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol ASIO_SVC_TARG>& s,
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler)
+ IteratorConnectToken&& token)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, connect_condition))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a IteratorConnectHandler.
- ASIO_ITERATOR_CONNECT_HANDLER_CHECK(
- IteratorConnectHandler, handler, Iterator) type_check;
-
- async_completion<IteratorConnectHandler,
- void (asio::error_code, Iterator)> init(handler);
-
- detail::iterator_connect_op<Protocol ASIO_SVC_TARG, Iterator,
- ConnectCondition, ASIO_HANDLER_TYPE(
- IteratorConnectHandler, void (asio::error_code, Iterator))>(s,
- begin, end, connect_condition, init.completion_handler)(
- asio::error_code(), 1);
-
- return init.result.get();
+ return async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, end, connect_condition);
}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/connect_pipe.hpp b/3rdparty/asio/include/asio/impl/connect_pipe.hpp
new file mode 100644
index 00000000000..e40b3c9433c
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/connect_pipe.hpp
@@ -0,0 +1,73 @@
+//
+// impl/connect_pipe.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_CONNECT_PIPE_HPP
+#define ASIO_IMPL_CONNECT_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE)
+
+#include "asio/connect_pipe.hpp"
+#include "asio/detail/throw_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+template <typename Executor1, typename Executor2>
+void connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end)
+{
+ asio::error_code ec;
+ asio::connect_pipe(read_end, write_end, ec);
+ asio::detail::throw_error(ec, "connect_pipe");
+}
+
+template <typename Executor1, typename Executor2>
+ASIO_SYNC_OP_VOID connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end, asio::error_code& ec)
+{
+ detail::native_pipe_handle p[2];
+ detail::create_pipe(p, ec);
+ if (ec)
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+
+ read_end.assign(p[0], ec);
+ if (ec)
+ {
+ detail::close_pipe(p[0]);
+ detail::close_pipe(p[1]);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ write_end.assign(p[1], ec);
+ if (ec)
+ {
+ asio::error_code temp_ec;
+ read_end.close(temp_ec);
+ detail::close_pipe(p[1]);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+
+#endif // ASIO_IMPL_CONNECT_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/impl/connect_pipe.ipp b/3rdparty/asio/include/asio/impl/connect_pipe.ipp
new file mode 100644
index 00000000000..6efe790d713
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/connect_pipe.ipp
@@ -0,0 +1,149 @@
+//
+// impl/connect_pipe.ipp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2021 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_IMPL_CONNECT_PIPE_IPP
+#define ASIO_IMPL_CONNECT_PIPE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE)
+
+#include "asio/connect_pipe.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include <cstdio>
+# if _WIN32_WINNT >= 0x601
+# include <bcrypt.h>
+# if !defined(ASIO_NO_DEFAULT_LINKED_LIBS)
+# if defined(_MSC_VER)
+# pragma comment(lib, "bcrypt.lib")
+# endif // defined(_MSC_VER)
+# endif // !defined(ASIO_NO_DEFAULT_LINKED_LIBS)
+# endif // _WIN32_WINNT >= 0x601
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/descriptor_ops.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+void create_pipe(native_pipe_handle p[2], asio::error_code& ec)
+{
+#if defined(ASIO_HAS_IOCP)
+ using namespace std; // For sprintf and memcmp.
+
+ static long counter1 = 0;
+ static long counter2 = 0;
+
+ long n1 = ::InterlockedIncrement(&counter1);
+ long n2 = (static_cast<unsigned long>(n1) % 0x10000000) == 0
+ ? ::InterlockedIncrement(&counter2)
+ : ::InterlockedExchangeAdd(&counter2, 0);
+
+ wchar_t pipe_name[128];
+#if defined(ASIO_HAS_SECURE_RTL)
+ swprintf_s(
+#else // defined(ASIO_HAS_SECURE_RTL)
+ _snwprintf(
+#endif // defined(ASIO_HAS_SECURE_RTL)
+ pipe_name, 128,
+ L"\\\\.\\pipe\\asio-A0812896-741A-484D-AF23-BE51BF620E22-%u-%ld-%ld",
+ static_cast<unsigned int>(::GetCurrentProcessId()), n1, n2);
+
+ p[0] = ::CreateNamedPipeW(pipe_name,
+ PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,
+ 0, 1, 8192, 8192, 0, 0);
+
+ if (p[0] == INVALID_HANDLE_VALUE)
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ return;
+ }
+
+ p[1] = ::CreateFileW(pipe_name, GENERIC_WRITE, 0,
+ 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
+
+ if (p[1] == INVALID_HANDLE_VALUE)
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(p[0]);
+ ec.assign(last_error, asio::error::get_system_category());
+ return;
+ }
+
+# if _WIN32_WINNT >= 0x601
+ unsigned char nonce[16];
+ if (::BCryptGenRandom(0, nonce, sizeof(nonce),
+ BCRYPT_USE_SYSTEM_PREFERRED_RNG) != 0)
+ {
+ ec = asio::error::connection_aborted;
+ ::CloseHandle(p[0]);
+ ::CloseHandle(p[1]);
+ return;
+ }
+
+ DWORD bytes_written = 0;
+ BOOL ok = ::WriteFile(p[1], nonce, sizeof(nonce), &bytes_written, 0);
+ if (!ok || bytes_written != sizeof(nonce))
+ {
+ ec = asio::error::connection_aborted;
+ ::CloseHandle(p[0]);
+ ::CloseHandle(p[1]);
+ return;
+ }
+
+ unsigned char nonce_check[sizeof(nonce)];
+ DWORD bytes_read = 0;
+ ok = ::ReadFile(p[0], nonce_check, sizeof(nonce), &bytes_read, 0);
+ if (!ok || bytes_read != sizeof(nonce)
+ || memcmp(nonce, nonce_check, sizeof(nonce)) != 0)
+ {
+ ec = asio::error::connection_aborted;
+ ::CloseHandle(p[0]);
+ ::CloseHandle(p[1]);
+ return;
+ }
+#endif // _WIN32_WINNT >= 0x601
+
+ asio::error::clear(ec);
+#else // defined(ASIO_HAS_IOCP)
+ int result = ::pipe(p);
+ detail::descriptor_ops::get_last_error(ec, result != 0);
+#endif // defined(ASIO_HAS_IOCP)
+}
+
+void close_pipe(native_pipe_handle p)
+{
+#if defined(ASIO_HAS_IOCP)
+ ::CloseHandle(p);
+#else // defined(ASIO_HAS_IOCP)
+ asio::error_code ignored_ec;
+ detail::descriptor_ops::state_type state = 0;
+ detail::descriptor_ops::close(p, state, ignored_ec);
+#endif // defined(ASIO_HAS_IOCP)
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+
+#endif // ASIO_IMPL_CONNECT_PIPE_IPP
diff --git a/3rdparty/asio/include/asio/impl/consign.hpp b/3rdparty/asio/include/asio/impl/consign.hpp
new file mode 100644
index 00000000000..3b753c10fd0
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/consign.hpp
@@ -0,0 +1,137 @@
+//
+// impl/consign.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_CONSIGN_HPP
+#define ASIO_IMPL_CONSIGN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a consign_t as a completion handler.
+template <typename Handler, typename... Values>
+class consign_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename H>
+ consign_handler(H&& handler, std::tuple<Values...> values)
+ : handler_(static_cast<H&&>(handler)),
+ values_(static_cast<std::tuple<Values...>&&>(values))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(static_cast<Args&&>(args)...);
+ }
+
+//private:
+ Handler handler_;
+ std::tuple<Values...> values_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ consign_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Values, typename... Signatures>
+struct async_result<consign_t<CompletionToken, Values...>, Signatures...>
+ : async_result<CompletionToken, Signatures...>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler,
+ std::tuple<Values...> values, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ detail::consign_handler<decay_t<Handler>, Values...>(
+ static_cast<Handler&&>(handler),
+ static_cast<std::tuple<Values...>&&>(values)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Values, typename DefaultCandidate>
+struct associator<Associator,
+ detail::consign_handler<Handler, Values...>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::consign_handler<Handler, Values...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::consign_handler<Handler, Values...>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_CONSIGN_HPP
diff --git a/3rdparty/asio/include/asio/impl/defer.hpp b/3rdparty/asio/include/asio/impl/defer.hpp
deleted file mode 100644
index cf76ba58fa6..00000000000
--- a/3rdparty/asio/include/asio/impl/defer.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// impl/defer.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_IMPL_DEFER_HPP
-#define ASIO_IMPL_DEFER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/work_dispatcher.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_executor<handler>::type ex(
- (get_associated_executor)(init.completion_handler));
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.defer(ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename Executor, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- Executor ex1(ex);
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex1.defer(detail::work_dispatcher<handler>(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename ExecutionContext, typename CompletionToken>
-inline ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) defer(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- return (defer)(ctx.get_executor(),
- ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_DEFER_HPP
diff --git a/3rdparty/asio/include/asio/impl/deferred.hpp b/3rdparty/asio/include/asio/impl/deferred.hpp
new file mode 100644
index 00000000000..defc34fb3e7
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/deferred.hpp
@@ -0,0 +1,147 @@
+//
+// impl/deferred.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_DEFERRED_HPP
+#define ASIO_IMPL_DEFERRED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Signature>
+class async_result<deferred_t, Signature>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static deferred_async_operation<Signature, Initiation, InitArgs...>
+ initiate(Initiation&& initiation, deferred_t, InitArgs&&... args)
+ {
+ return deferred_async_operation<Signature, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(args)...);
+ }
+};
+
+template <typename... Signatures>
+class async_result<deferred_t, Signatures...>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>
+ initiate(Initiation&& initiation, deferred_t, InitArgs&&... args)
+ {
+ return deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(args)...);
+ }
+};
+
+template <typename Function, typename Signature>
+class async_result<deferred_function<Function>, Signature>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation&& initiation,
+ deferred_function<Function> token, InitArgs&&... init_args)
+ -> decltype(
+ deferred_sequence<
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_)))
+ {
+ return deferred_sequence<
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_));
+ }
+};
+
+template <typename Function, typename... Signatures>
+class async_result<deferred_function<Function>, Signatures...>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation&& initiation,
+ deferred_function<Function> token, InitArgs&&... init_args)
+ -> decltype(
+ deferred_sequence<
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_)))
+ {
+ return deferred_sequence<
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_));
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename Tail, typename DefaultCandidate>
+struct associator<Associator,
+ detail::deferred_sequence_handler<Handler, Tail>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::deferred_sequence_handler<Handler, Tail>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::deferred_sequence_handler<Handler, Tail>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/impl/detached.hpp b/3rdparty/asio/include/asio/impl/detached.hpp
new file mode 100644
index 00000000000..774e52b1e01
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/detached.hpp
@@ -0,0 +1,77 @@
+//
+// impl/detached.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_DETACHED_HPP
+#define ASIO_IMPL_DETACHED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+ // Class to adapt a detached_t as a completion handler.
+ class detached_handler
+ {
+ public:
+ typedef void result_type;
+
+ detached_handler(detached_t)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args...)
+ {
+ }
+ };
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Signature>
+struct async_result<detached_t, Signature>
+{
+ typedef asio::detail::detached_handler completion_handler_type;
+
+ typedef void return_type;
+
+ explicit async_result(completion_handler_type&)
+ {
+ }
+
+ void get()
+ {
+ }
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static return_type initiate(Initiation&& initiation,
+ RawCompletionToken&&, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation)(
+ detail::detached_handler(detached_t()),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_DETACHED_HPP
diff --git a/3rdparty/asio/include/asio/impl/dispatch.hpp b/3rdparty/asio/include/asio/impl/dispatch.hpp
deleted file mode 100644
index cfebc5cfde0..00000000000
--- a/3rdparty/asio/include/asio/impl/dispatch.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// impl/dispatch.hpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_IMPL_DISPATCH_HPP
-#define ASIO_IMPL_DISPATCH_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/work_dispatcher.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_executor<handler>::type ex(
- (get_associated_executor)(init.completion_handler));
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.dispatch(ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename Executor, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- Executor ex1(ex);
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex1.dispatch(detail::work_dispatcher<handler>(
- init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename ExecutionContext, typename CompletionToken>
-inline ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- return (dispatch)(ctx.get_executor(),
- ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_DISPATCH_HPP
diff --git a/3rdparty/asio/include/asio/impl/error.ipp b/3rdparty/asio/include/asio/impl/error.ipp
index 735178578e5..b564a8c68e2 100644
--- a/3rdparty/asio/include/asio/impl/error.ipp
+++ b/3rdparty/asio/include/asio/impl/error.ipp
@@ -2,7 +2,7 @@
// impl/error.ipp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -31,7 +31,7 @@ namespace detail {
class netdb_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.netdb";
}
@@ -63,7 +63,7 @@ namespace detail {
class addrinfo_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.addrinfo";
}
@@ -93,7 +93,7 @@ namespace detail {
class misc_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.misc";
}
diff --git a/3rdparty/asio/include/asio/impl/error_code.ipp b/3rdparty/asio/include/asio/impl/error_code.ipp
index c986812d154..caeb1967caa 100644
--- a/3rdparty/asio/include/asio/impl/error_code.ipp
+++ b/3rdparty/asio/include/asio/impl/error_code.ipp
@@ -2,7 +2,7 @@
// impl/error_code.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -37,7 +37,7 @@ namespace detail {
class system_category : public error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.system";
}
@@ -108,7 +108,7 @@ public:
#if defined(ASIO_HAS_STD_ERROR_CODE)
std::error_condition default_error_condition(
- int ev) const ASIO_ERROR_CATEGORY_NOEXCEPT
+ int ev) const noexcept
{
switch (ev)
{
diff --git a/3rdparty/asio/include/asio/impl/execution_context.hpp b/3rdparty/asio/include/asio/impl/execution_context.hpp
index 2e44ec11fd7..35dda80417f 100644
--- a/3rdparty/asio/include/asio/impl/execution_context.hpp
+++ b/3rdparty/asio/include/asio/impl/execution_context.hpp
@@ -2,7 +2,7 @@
// impl/execution_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,6 +23,8 @@
namespace asio {
+#if !defined(GENERATING_DOCUMENTATION)
+
template <typename Service>
inline Service& use_service(execution_context& e)
{
@@ -32,51 +34,17 @@ inline Service& use_service(execution_context& e)
return e.service_registry_->template use_service<Service>();
}
-#if !defined(GENERATING_DOCUMENTATION)
-# if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Service, typename... Args>
-Service& make_service(execution_context& e, ASIO_MOVE_ARG(Args)... args)
+Service& make_service(execution_context& e, Args&&... args)
{
detail::scoped_ptr<Service> svc(
- new Service(e, ASIO_MOVE_CAST(Args)(args)...));
+ new Service(e, static_cast<Args&&>(args)...));
e.service_registry_->template add_service<Service>(svc.get());
Service& result = *svc;
svc.release();
return result;
}
-# else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Service>
-Service& make_service(execution_context& e)
-{
- detail::scoped_ptr<Service> svc(new Service(e));
- e.service_registry_->template add_service<Service>(svc.get());
- Service& result = *svc;
- svc.release();
- return result;
-}
-
-#define ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
- template <typename Service, ASIO_VARIADIC_TPARAMS(n)> \
- Service& make_service(execution_context& e, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- detail::scoped_ptr<Service> svc( \
- new Service(e, ASIO_VARIADIC_MOVE_ARGS(n))); \
- e.service_registry_->template add_service<Service>(svc.get()); \
- Service& result = *svc; \
- svc.release(); \
- return result; \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_MAKE_SERVICE_DEF)
-#undef ASIO_PRIVATE_MAKE_SERVICE_DEF
-
-# endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-#endif // !defined(GENERATING_DOCUMENTATION)
-
template <typename Service>
inline void add_service(execution_context& e, Service* svc)
{
@@ -95,6 +63,8 @@ inline bool has_service(execution_context& e)
return e.service_registry_->template has_service<Service>();
}
+#endif // !defined(GENERATING_DOCUMENTATION)
+
inline execution_context& execution_context::service::context()
{
return owner_;
diff --git a/3rdparty/asio/include/asio/impl/execution_context.ipp b/3rdparty/asio/include/asio/impl/execution_context.ipp
index 40bb263f3d8..ed2603c9011 100644
--- a/3rdparty/asio/include/asio/impl/execution_context.ipp
+++ b/3rdparty/asio/include/asio/impl/execution_context.ipp
@@ -2,7 +2,7 @@
// impl/execution_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/impl/executor.hpp b/3rdparty/asio/include/asio/impl/executor.hpp
index eb83e5cc91a..8bf76ccd183 100644
--- a/3rdparty/asio/include/asio/impl/executor.hpp
+++ b/3rdparty/asio/include/asio/impl/executor.hpp
@@ -2,7 +2,7 @@
// impl/executor.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,11 +16,13 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+#include <new>
#include "asio/detail/atomic_count.hpp"
-#include "asio/detail/executor_op.hpp"
#include "asio/detail/global.hpp"
#include "asio/detail/memory.hpp"
-#include "asio/detail/recycling_allocator.hpp"
#include "asio/executor.hpp"
#include "asio/system_executor.hpp"
@@ -30,109 +32,13 @@ namespace asio {
#if !defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_HAS_MOVE)
-
-// Lightweight, move-only function object wrapper.
-class executor::function
-{
-public:
- template <typename F, typename Alloc>
- explicit function(F f, const Alloc& a)
- {
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Alloc>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Alloc>::get(a));
-
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<F, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- op_ = new (p.v) op(f, allocator);
- p.v = 0;
- }
-
- function(function&& other)
- : op_(other.op_)
- {
- other.op_ = 0;
- }
-
- ~function()
- {
- if (op_)
- op_->destroy();
- }
-
- void operator()()
- {
- if (op_)
- {
- detail::scheduler_operation* op = op_;
- op_ = 0;
- op->complete(this, asio::error_code(), 0);
- }
- }
-
-private:
- detail::scheduler_operation* op_;
-};
-
-#else // defined(ASIO_HAS_MOVE)
-
-// Not so lightweight, copyable function object wrapper.
-class executor::function
-{
-public:
- template <typename F, typename Alloc>
- explicit function(const F& f, const Alloc&)
- : impl_(new impl<F>(f))
- {
- }
-
- void operator()()
- {
- impl_->invoke_(impl_.get());
- }
-
-private:
- // Base class for polymorphic function implementations.
- struct impl_base
- {
- void (*invoke_)(impl_base*);
- };
-
- // Polymorphic function implementation.
- template <typename F>
- struct impl : impl_base
- {
- impl(const F& f)
- : function_(f)
- {
- invoke_ = &function::invoke<F>;
- }
-
- F function_;
- };
-
- // Helper to invoke a function.
- template <typename F>
- static void invoke(impl_base* i)
- {
- static_cast<impl<F>*>(i)->function_();
- }
-
- detail::shared_ptr<impl_base> impl_;
-};
-
-#endif // defined(ASIO_HAS_MOVE)
-
-// Default polymorphic allocator implementation.
+// Default polymorphic executor implementation.
template <typename Executor, typename Allocator>
class executor::impl
: public executor::impl_base
{
public:
- typedef typename Allocator::template rebind<impl>::other allocator_type;
+ typedef ASIO_REBIND_ALLOC(Allocator, impl) allocator_type;
static impl_base* create(const Executor& e, Allocator a = Allocator())
{
@@ -142,7 +48,12 @@ public:
return p;
}
- impl(const Executor& e, const Allocator& a) ASIO_NOEXCEPT
+ static impl_base* create(std::nothrow_t, const Executor& e) noexcept
+ {
+ return new (std::nothrow) impl(e, std::allocator<void>());
+ }
+
+ impl(const Executor& e, const Allocator& a) noexcept
: impl_base(false),
ref_count_(1),
executor_(e),
@@ -150,15 +61,15 @@ public:
{
}
- impl_base* clone() const ASIO_NOEXCEPT
+ impl_base* clone() const noexcept
{
- ++ref_count_;
+ detail::ref_count_up(ref_count_);
return const_cast<impl_base*>(static_cast<const impl_base*>(this));
}
- void destroy() ASIO_NOEXCEPT
+ void destroy() noexcept
{
- if (--ref_count_ == 0)
+ if (detail::ref_count_down(ref_count_))
{
allocator_type alloc(allocator_);
impl* p = this;
@@ -167,52 +78,52 @@ public:
}
}
- void on_work_started() ASIO_NOEXCEPT
+ void on_work_started() noexcept
{
executor_.on_work_started();
}
- void on_work_finished() ASIO_NOEXCEPT
+ void on_work_finished() noexcept
{
executor_.on_work_finished();
}
- execution_context& context() ASIO_NOEXCEPT
+ execution_context& context() noexcept
{
return executor_.context();
}
- void dispatch(ASIO_MOVE_ARG(function) f)
+ void dispatch(function&& f)
{
- executor_.dispatch(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.dispatch(static_cast<function&&>(f), allocator_);
}
- void post(ASIO_MOVE_ARG(function) f)
+ void post(function&& f)
{
- executor_.post(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.post(static_cast<function&&>(f), allocator_);
}
- void defer(ASIO_MOVE_ARG(function) f)
+ void defer(function&& f)
{
- executor_.defer(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.defer(static_cast<function&&>(f), allocator_);
}
- type_id_result_type target_type() const ASIO_NOEXCEPT
+ type_id_result_type target_type() const noexcept
{
return type_id<Executor>();
}
- void* target() ASIO_NOEXCEPT
+ void* target() noexcept
{
return &executor_;
}
- const void* target() const ASIO_NOEXCEPT
+ const void* target() const noexcept
{
return &executor_;
}
- bool equals(const impl_base* e) const ASIO_NOEXCEPT
+ bool equals(const impl_base* e) const noexcept
{
if (this == e)
return true;
@@ -250,7 +161,7 @@ private:
};
};
-// Polymorphic allocator specialisation for system_executor.
+// Polymorphic executor specialisation for system_executor.
template <typename Allocator>
class executor::impl<system_executor, Allocator>
: public executor::impl_base
@@ -259,7 +170,12 @@ public:
static impl_base* create(const system_executor&,
const Allocator& = Allocator())
{
- return &detail::global<impl<system_executor, std::allocator<void> > >();
+ return &detail::global<impl<system_executor, std::allocator<void>> >();
+ }
+
+ static impl_base* create(std::nothrow_t, const system_executor&) noexcept
+ {
+ return &detail::global<impl<system_executor, std::allocator<void>> >();
}
impl()
@@ -267,73 +183,81 @@ public:
{
}
- impl_base* clone() const ASIO_NOEXCEPT
+ impl_base* clone() const noexcept
{
return const_cast<impl_base*>(static_cast<const impl_base*>(this));
}
- void destroy() ASIO_NOEXCEPT
+ void destroy() noexcept
{
}
- void on_work_started() ASIO_NOEXCEPT
+ void on_work_started() noexcept
{
executor_.on_work_started();
}
- void on_work_finished() ASIO_NOEXCEPT
+ void on_work_finished() noexcept
{
executor_.on_work_finished();
}
- execution_context& context() ASIO_NOEXCEPT
+ execution_context& context() noexcept
{
return executor_.context();
}
- void dispatch(ASIO_MOVE_ARG(function) f)
+ void dispatch(function&& f)
{
- executor_.dispatch(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.dispatch(static_cast<function&&>(f),
+ std::allocator<void>());
}
- void post(ASIO_MOVE_ARG(function) f)
+ void post(function&& f)
{
- executor_.post(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.post(static_cast<function&&>(f),
+ std::allocator<void>());
}
- void defer(ASIO_MOVE_ARG(function) f)
+ void defer(function&& f)
{
- executor_.defer(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.defer(static_cast<function&&>(f),
+ std::allocator<void>());
}
- type_id_result_type target_type() const ASIO_NOEXCEPT
+ type_id_result_type target_type() const noexcept
{
return type_id<system_executor>();
}
- void* target() ASIO_NOEXCEPT
+ void* target() noexcept
{
return &executor_;
}
- const void* target() const ASIO_NOEXCEPT
+ const void* target() const noexcept
{
return &executor_;
}
- bool equals(const impl_base* e) const ASIO_NOEXCEPT
+ bool equals(const impl_base* e) const noexcept
{
return this == e;
}
private:
system_executor executor_;
- Allocator allocator_;
};
template <typename Executor>
executor::executor(Executor e)
- : impl_(impl<Executor, std::allocator<void> >::create(e))
+ : impl_(impl<Executor, std::allocator<void>>::create(e))
+{
+}
+
+template <typename Executor>
+executor::executor(std::nothrow_t, Executor e) noexcept
+ : impl_(impl<Executor, std::allocator<void>>::create(std::nothrow, e))
{
}
@@ -344,39 +268,39 @@ executor::executor(allocator_arg_t, const Allocator& a, Executor e)
}
template <typename Function, typename Allocator>
-void executor::dispatch(ASIO_MOVE_ARG(Function) f,
+void executor::dispatch(Function&& f,
const Allocator& a) const
{
impl_base* i = get_impl();
if (i->fast_dispatch_)
- system_executor().dispatch(ASIO_MOVE_CAST(Function)(f), a);
+ system_executor().dispatch(static_cast<Function&&>(f), a);
else
- i->dispatch(function(ASIO_MOVE_CAST(Function)(f), a));
+ i->dispatch(function(static_cast<Function&&>(f), a));
}
template <typename Function, typename Allocator>
-void executor::post(ASIO_MOVE_ARG(Function) f,
+void executor::post(Function&& f,
const Allocator& a) const
{
- get_impl()->post(function(ASIO_MOVE_CAST(Function)(f), a));
+ get_impl()->post(function(static_cast<Function&&>(f), a));
}
template <typename Function, typename Allocator>
-void executor::defer(ASIO_MOVE_ARG(Function) f,
+void executor::defer(Function&& f,
const Allocator& a) const
{
- get_impl()->defer(function(ASIO_MOVE_CAST(Function)(f), a));
+ get_impl()->defer(function(static_cast<Function&&>(f), a));
}
template <typename Executor>
-Executor* executor::target() ASIO_NOEXCEPT
+Executor* executor::target() noexcept
{
return impl_ && impl_->target_type() == type_id<Executor>()
? static_cast<Executor*>(impl_->target()) : 0;
}
template <typename Executor>
-const Executor* executor::target() const ASIO_NOEXCEPT
+const Executor* executor::target() const noexcept
{
return impl_ && impl_->target_type() == type_id<Executor>()
? static_cast<Executor*>(impl_->target()) : 0;
@@ -388,4 +312,6 @@ const Executor* executor::target() const ASIO_NOEXCEPT
#include "asio/detail/pop_options.hpp"
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
#endif // ASIO_IMPL_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/impl/executor.ipp b/3rdparty/asio/include/asio/impl/executor.ipp
index 605333e4879..4153a171e09 100644
--- a/3rdparty/asio/include/asio/impl/executor.ipp
+++ b/3rdparty/asio/include/asio/impl/executor.ipp
@@ -2,7 +2,7 @@
// impl/executor.ipp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,17 +16,20 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
#include "asio/executor.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-bad_executor::bad_executor() ASIO_NOEXCEPT
+bad_executor::bad_executor() noexcept
{
}
-const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW
+const char* bad_executor::what() const noexcept
{
return "bad executor";
}
@@ -35,4 +38,6 @@ const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW
#include "asio/detail/pop_options.hpp"
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
#endif // ASIO_IMPL_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp b/3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp
deleted file mode 100644
index f4bcdf90b13..00000000000
--- a/3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// impl/handler_alloc_hook.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
-#define ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/thread_context.hpp"
-#include "asio/detail/thread_info_base.hpp"
-#include "asio/handler_alloc_hook.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-void* asio_handler_allocate(std::size_t size, ...)
-{
-#if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return detail::thread_info_base::allocate(
- detail::thread_context::thread_call_stack::top(), size);
-#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return ::operator new(size);
-#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-}
-
-void asio_handler_deallocate(void* pointer, std::size_t size, ...)
-{
-#if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- detail::thread_info_base::deallocate(
- detail::thread_context::thread_call_stack::top(), pointer, size);
-#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- (void)size;
- ::operator delete(pointer);
-#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
diff --git a/3rdparty/asio/include/asio/impl/io_context.hpp b/3rdparty/asio/include/asio/impl/io_context.hpp
index 45805ae6262..002b585502d 100644
--- a/3rdparty/asio/include/asio/impl/io_context.hpp
+++ b/3rdparty/asio/include/asio/impl/io_context.hpp
@@ -2,7 +2,7 @@
// impl/io_context.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,7 +19,7 @@
#include "asio/detail/executor_op.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/recycling_allocator.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/service_registry.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/type_traits.hpp"
@@ -28,6 +28,8 @@
namespace asio {
+#if !defined(GENERATING_DOCUMENTATION)
+
template <typename Service>
inline Service& use_service(io_context& ioc)
{
@@ -45,28 +47,14 @@ inline detail::io_context_impl& use_service<detail::io_context_impl>(
return ioc.impl_;
}
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#if defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_io_context.hpp"
-#else
-# include "asio/detail/scheduler.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
+#endif // !defined(GENERATING_DOCUMENTATION)
inline io_context::executor_type
-io_context::get_executor() ASIO_NOEXCEPT
+io_context::get_executor() noexcept
{
return executor_type(*this);
}
-#if defined(ASIO_HAS_CHRONO)
-
template <typename Rep, typename Period>
std::size_t io_context::run_for(
const chrono::duration<Rep, Period>& rel_time)
@@ -118,8 +106,6 @@ std::size_t io_context::run_one_until(
return 0;
}
-#endif // defined(ASIO_HAS_CHRONO)
-
#if !defined(ASIO_NO_DEPRECATED)
inline void io_context::reset()
@@ -127,68 +113,90 @@ inline void io_context::reset()
restart();
}
-template <typename CompletionHandler>
-ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
-io_context::dispatch(ASIO_MOVE_ARG(CompletionHandler) handler)
+struct io_context::initiate_dispatch
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a CompletionHandler.
- ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
-
- async_completion<CompletionHandler, void ()> init(handler);
-
- if (impl_.can_dispatch())
+ template <typename LegacyCompletionHandler>
+ void operator()(LegacyCompletionHandler&& handler,
+ io_context* self) const
{
- detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(
- init.completion_handler, init.completion_handler);
- }
- else
- {
- // Allocate and construct an operation to wrap the handler.
- typedef detail::completion_handler<
- typename handler_type<CompletionHandler, void ()>::type> op;
- typename op::ptr p = { detail::addressof(init.completion_handler),
- op::ptr::allocate(init.completion_handler), 0 };
- p.p = new (p.v) op(init.completion_handler);
-
- ASIO_HANDLER_CREATION((*this, *p.p,
- "io_context", this, 0, "dispatch"));
-
- impl_.do_dispatch(p.p);
- p.v = p.p = 0;
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a LegacyCompletionHandler.
+ ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+ if (self->impl_.can_dispatch())
+ {
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<decay_t<LegacyCompletionHandler>&&>(handler2.value)();
+ }
+ else
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef detail::completion_handler<
+ decay_t<LegacyCompletionHandler>, executor_type> op;
+ typename op::ptr p = { detail::addressof(handler2.value),
+ op::ptr::allocate(handler2.value), 0 };
+ p.p = new (p.v) op(handler2.value, self->get_executor());
+
+ ASIO_HANDLER_CREATION((*self, *p.p,
+ "io_context", self, 0, "dispatch"));
+
+ self->impl_.do_dispatch(p.p);
+ p.v = p.p = 0;
+ }
}
+};
- return init.result.get();
+template <typename LegacyCompletionHandler>
+auto io_context::dispatch(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_dispatch>(), handler, this))
+{
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_dispatch(), handler, this);
}
-template <typename CompletionHandler>
-ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
-io_context::post(ASIO_MOVE_ARG(CompletionHandler) handler)
+struct io_context::initiate_post
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a CompletionHandler.
- ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
+ template <typename LegacyCompletionHandler>
+ void operator()(LegacyCompletionHandler&& handler,
+ io_context* self) const
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a LegacyCompletionHandler.
+ ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
- async_completion<CompletionHandler, void ()> init(handler);
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
- bool is_continuation =
- asio_handler_cont_helpers::is_continuation(init.completion_handler);
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler2.value);
- // Allocate and construct an operation to wrap the handler.
- typedef detail::completion_handler<
- typename handler_type<CompletionHandler, void ()>::type> op;
- typename op::ptr p = { detail::addressof(init.completion_handler),
- op::ptr::allocate(init.completion_handler), 0 };
- p.p = new (p.v) op(init.completion_handler);
+ // Allocate and construct an operation to wrap the handler.
+ typedef detail::completion_handler<
+ decay_t<LegacyCompletionHandler>, executor_type> op;
+ typename op::ptr p = { detail::addressof(handler2.value),
+ op::ptr::allocate(handler2.value), 0 };
+ p.p = new (p.v) op(handler2.value, self->get_executor());
- ASIO_HANDLER_CREATION((*this, *p.p,
- "io_context", this, 0, "post"));
+ ASIO_HANDLER_CREATION((*self, *p.p,
+ "io_context", self, 0, "post"));
- impl_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
+ self->impl_.post_immediate_completion(p.p, is_continuation);
+ p.v = p.p = 0;
+ }
+};
- return init.result.get();
+template <typename LegacyCompletionHandler>
+auto io_context::post(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_post>(), handler, this))
+{
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_post(), handler, this);
}
template <typename Handler>
@@ -204,112 +212,190 @@ io_context::wrap(Handler handler)
#endif // !defined(ASIO_NO_DEPRECATED)
-inline io_context&
-io_context::executor_type::context() const ASIO_NOEXCEPT
+template <typename Allocator, uintptr_t Bits>
+io_context::basic_executor_type<Allocator, Bits>&
+io_context::basic_executor_type<Allocator, Bits>::operator=(
+ const basic_executor_type& other) noexcept
{
- return io_context_;
+ if (this != &other)
+ {
+ static_cast<Allocator&>(*this) = static_cast<const Allocator&>(other);
+ io_context* old_io_context = context_ptr();
+ target_ = other.target_;
+ if (Bits & outstanding_work_tracked)
+ {
+ if (context_ptr())
+ context_ptr()->impl_.work_started();
+ if (old_io_context)
+ old_io_context->impl_.work_finished();
+ }
+ }
+ return *this;
}
-inline void
-io_context::executor_type::on_work_started() const ASIO_NOEXCEPT
+template <typename Allocator, uintptr_t Bits>
+io_context::basic_executor_type<Allocator, Bits>&
+io_context::basic_executor_type<Allocator, Bits>::operator=(
+ basic_executor_type&& other) noexcept
{
- io_context_.impl_.work_started();
+ if (this != &other)
+ {
+ static_cast<Allocator&>(*this) = static_cast<Allocator&&>(other);
+ io_context* old_io_context = context_ptr();
+ target_ = other.target_;
+ if (Bits & outstanding_work_tracked)
+ {
+ other.target_ = 0;
+ if (old_io_context)
+ old_io_context->impl_.work_finished();
+ }
+ }
+ return *this;
}
-inline void
-io_context::executor_type::on_work_finished() const ASIO_NOEXCEPT
+template <typename Allocator, uintptr_t Bits>
+inline bool io_context::basic_executor_type<Allocator,
+ Bits>::running_in_this_thread() const noexcept
{
- io_context_.impl_.work_finished();
+ return context_ptr()->impl_.can_dispatch();
}
-template <typename Function, typename Allocator>
-void io_context::executor_type::dispatch(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Allocator, uintptr_t Bits>
+template <typename Function>
+void io_context::basic_executor_type<Allocator, Bits>::execute(
+ Function&& f) const
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ typedef decay_t<Function> function_type;
- // Invoke immediately if we are already inside the thread pool.
- if (io_context_.impl_.can_dispatch())
+ // Invoke immediately if the blocking.possibly property is enabled and we are
+ // already inside the thread pool.
+ if ((bits() & blocking_never) == 0 && context_ptr()->impl_.can_dispatch())
{
- detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
- return;
+ // Make a local, non-const copy of the function.
+ function_type tmp(static_cast<Function&&>(f));
+
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<function_type&&>(tmp)();
+ return;
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ context_ptr()->impl_.capture_current_exception();
+ return;
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
-
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type, detail::operation> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<function_type, Allocator, detail::operation> op;
+ typename op::ptr p = {
+ detail::addressof(static_cast<const Allocator&>(*this)),
+ op::ptr::allocate(static_cast<const Allocator&>(*this)), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f),
+ static_cast<const Allocator&>(*this));
+
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "execute"));
+
+ context_ptr()->impl_.post_immediate_completion(p.p,
+ (bits() & relationship_continuation) != 0);
+ p.v = p.p = 0;
+}
- ASIO_HANDLER_CREATION((this->context(), *p.p,
- "io_context", &this->context(), 0, "post"));
+#if !defined(ASIO_NO_TS_EXECUTORS)
+template <typename Allocator, uintptr_t Bits>
+inline io_context& io_context::basic_executor_type<
+ Allocator, Bits>::context() const noexcept
+{
+ return *context_ptr();
+}
- io_context_.impl_.post_immediate_completion(p.p, false);
- p.v = p.p = 0;
+template <typename Allocator, uintptr_t Bits>
+inline void io_context::basic_executor_type<Allocator,
+ Bits>::on_work_started() const noexcept
+{
+ context_ptr()->impl_.work_started();
}
-template <typename Function, typename Allocator>
-void io_context::executor_type::post(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Allocator, uintptr_t Bits>
+inline void io_context::basic_executor_type<Allocator,
+ Bits>::on_work_finished() const noexcept
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ context_ptr()->impl_.work_finished();
+}
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+template <typename Allocator, uintptr_t Bits>
+template <typename Function, typename OtherAllocator>
+void io_context::basic_executor_type<Allocator, Bits>::dispatch(
+ Function&& f, const OtherAllocator& a) const
+{
+ typedef decay_t<Function> function_type;
+
+ // Invoke immediately if we are already inside the thread pool.
+ if (context_ptr()->impl_.can_dispatch())
+ {
+ // Make a local, non-const copy of the function.
+ function_type tmp(static_cast<Function&&>(f));
+
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<function_type&&>(tmp)();
+ return;
+ }
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type, detail::operation> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<function_type,
+ OtherAllocator, detail::operation> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((this->context(), *p.p,
- "io_context", &this->context(), 0, "post"));
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "dispatch"));
- io_context_.impl_.post_immediate_completion(p.p, false);
+ context_ptr()->impl_.post_immediate_completion(p.p, false);
p.v = p.p = 0;
}
-template <typename Function, typename Allocator>
-void io_context::executor_type::defer(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Allocator, uintptr_t Bits>
+template <typename Function, typename OtherAllocator>
+void io_context::basic_executor_type<Allocator, Bits>::post(
+ Function&& f, const OtherAllocator& a) const
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
-
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
-
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type, detail::operation> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<decay_t<Function>,
+ OtherAllocator, detail::operation> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((this->context(), *p.p,
- "io_context", &this->context(), 0, "defer"));
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "post"));
- io_context_.impl_.post_immediate_completion(p.p, true);
+ context_ptr()->impl_.post_immediate_completion(p.p, false);
p.v = p.p = 0;
}
-inline bool
-io_context::executor_type::running_in_this_thread() const ASIO_NOEXCEPT
+template <typename Allocator, uintptr_t Bits>
+template <typename Function, typename OtherAllocator>
+void io_context::basic_executor_type<Allocator, Bits>::defer(
+ Function&& f, const OtherAllocator& a) const
{
- return io_context_.impl_.can_dispatch();
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<decay_t<Function>,
+ OtherAllocator, detail::operation> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
+
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "defer"));
+
+ context_ptr()->impl_.post_immediate_completion(p.p, true);
+ p.v = p.p = 0;
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
#if !defined(ASIO_NO_DEPRECATED)
inline io_context::work::work(asio::io_context& io_context)
@@ -333,11 +419,6 @@ inline asio::io_context& io_context::work::get_io_context()
{
return static_cast<asio::io_context&>(io_context_impl_.context());
}
-
-inline asio::io_context& io_context::work::get_io_service()
-{
- return static_cast<asio::io_context&>(io_context_impl_.context());
-}
#endif // !defined(ASIO_NO_DEPRECATED)
inline asio::io_context& io_context::service::get_io_context()
@@ -345,13 +426,6 @@ inline asio::io_context& io_context::service::get_io_context()
return static_cast<asio::io_context&>(context());
}
-#if !defined(ASIO_NO_DEPRECATED)
-inline asio::io_context& io_context::service::get_io_service()
-{
- return static_cast<asio::io_context&>(context());
-}
-#endif // !defined(ASIO_NO_DEPRECATED)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/impl/io_context.ipp b/3rdparty/asio/include/asio/impl/io_context.ipp
index b78ec1e81bb..14c8736c7b2 100644
--- a/3rdparty/asio/include/asio/impl/io_context.ipp
+++ b/3rdparty/asio/include/asio/impl/io_context.ipp
@@ -2,7 +2,7 @@
// impl/io_context.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -34,13 +34,14 @@
namespace asio {
io_context::io_context()
- : impl_(add_impl(new impl_type(*this, ASIO_CONCURRENCY_HINT_DEFAULT)))
+ : impl_(add_impl(new impl_type(*this,
+ ASIO_CONCURRENCY_HINT_DEFAULT, false)))
{
}
io_context::io_context(int concurrency_hint)
: impl_(add_impl(new impl_type(*this, concurrency_hint == 1
- ? ASIO_CONCURRENCY_HINT_1 : concurrency_hint)))
+ ? ASIO_CONCURRENCY_HINT_1 : concurrency_hint, false)))
{
}
@@ -53,6 +54,7 @@ io_context::impl_type& io_context::add_impl(io_context::impl_type* impl)
io_context::~io_context()
{
+ shutdown();
}
io_context::count_type io_context::run()
diff --git a/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp b/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp
new file mode 100644
index 00000000000..c922c27a055
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp
@@ -0,0 +1,45 @@
+//
+// impl/multiple_exceptions.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_MULTIPLE_EXCEPTIONS_IPP
+#define ASIO_IMPL_MULTIPLE_EXCEPTIONS_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/multiple_exceptions.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+multiple_exceptions::multiple_exceptions(
+ std::exception_ptr first) noexcept
+ : first_(static_cast<std::exception_ptr&&>(first))
+{
+}
+
+const char* multiple_exceptions::what() const noexcept
+{
+ return "multiple exceptions";
+}
+
+std::exception_ptr multiple_exceptions::first_exception() const
+{
+ return first_;
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_MULTIPLE_EXCEPTIONS_IPP
diff --git a/3rdparty/asio/include/asio/impl/post.hpp b/3rdparty/asio/include/asio/impl/post.hpp
deleted file mode 100644
index 293b3873bd4..00000000000
--- a/3rdparty/asio/include/asio/impl/post.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// impl/post.hpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_IMPL_POST_HPP
-#define ASIO_IMPL_POST_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/work_dispatcher.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- typename associated_executor<handler>::type ex(
- (get_associated_executor)(init.completion_handler));
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex.post(ASIO_MOVE_CAST(handler)(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename Executor, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type*)
-{
- typedef ASIO_HANDLER_TYPE(CompletionToken, void()) handler;
-
- async_completion<CompletionToken, void()> init(token);
-
- Executor ex1(ex);
-
- typename associated_allocator<handler>::type alloc(
- (get_associated_allocator)(init.completion_handler));
-
- ex1.post(detail::work_dispatcher<handler>(init.completion_handler), alloc);
-
- return init.result.get();
-}
-
-template <typename ExecutionContext, typename CompletionToken>
-inline ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
-{
- return (post)(ctx.get_executor(),
- ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_POST_HPP
diff --git a/3rdparty/asio/include/asio/impl/prepend.hpp b/3rdparty/asio/include/asio/impl/prepend.hpp
new file mode 100644
index 00000000000..f336d55d825
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/prepend.hpp
@@ -0,0 +1,163 @@
+//
+// impl/prepend.hpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_PREPEND_HPP
+#define ASIO_IMPL_PREPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a prepend_t as a completion handler.
+template <typename Handler, typename... Values>
+class prepend_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename H>
+ prepend_handler(H&& handler, std::tuple<Values...> values)
+ : handler_(static_cast<H&&>(handler)),
+ values_(static_cast<std::tuple<Values...>&&>(values))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ this->invoke(
+ index_sequence_for<Values...>{},
+ static_cast<Args&&>(args)...);
+ }
+
+ template <std::size_t... I, typename... Args>
+ void invoke(index_sequence<I...>, Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<Values&&>(std::get<I>(values_))...,
+ static_cast<Args&&>(args)...);
+ }
+
+//private:
+ Handler handler_;
+ std::tuple<Values...> values_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ prepend_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature, typename... Values>
+struct prepend_signature;
+
+template <typename R, typename... Args, typename... Values>
+struct prepend_signature<R(Args...), Values...>
+{
+ typedef R type(Values..., decay_t<Args>...);
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Values, typename Signature>
+struct async_result<
+ prepend_t<CompletionToken, Values...>, Signature>
+ : async_result<CompletionToken,
+ typename detail::prepend_signature<
+ Signature, Values...>::type>
+{
+ typedef typename detail::prepend_signature<
+ Signature, Values...>::type signature;
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler,
+ std::tuple<Values...> values, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ detail::prepend_handler<decay_t<Handler>, Values...>(
+ static_cast<Handler&&>(handler),
+ static_cast<std::tuple<Values...>&&>(values)),
+ static_cast<Args&&>(args)...);
+ }
+
+ Initiation initiation_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken, signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken, signature>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Values, typename DefaultCandidate>
+struct associator<Associator,
+ detail::prepend_handler<Handler, Values...>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::prepend_handler<Handler, Values...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::prepend_handler<Handler, Values...>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/impl/read.hpp b/3rdparty/asio/include/asio/impl/read.hpp
index 385a552ed8e..d86fb6467b1 100644
--- a/3rdparty/asio/include/asio/impl/read.hpp
+++ b/3rdparty/asio/include/asio/impl/read.hpp
@@ -2,7 +2,7 @@
// impl/read.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,19 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <algorithm>
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
+#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
@@ -40,7 +39,7 @@ namespace detail
{
template <typename SyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition>
- std::size_t read_buffer_sequence(SyncReadStream& s,
+ std::size_t read_buffer_seq(SyncReadStream& s,
const MutableBufferSequence& buffers, const MutableBufferIterator&,
CompletionCondition completion_condition, asio::error_code& ec)
{
@@ -55,7 +54,7 @@ namespace detail
else
break;
}
- return tmp.total_consumed();;
+ return tmp.total_consumed();
}
} // namespace detail
@@ -63,19 +62,20 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
+ >)
{
- return detail::read_buffer_sequence(s, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition, ec);
+ return detail::read_buffer_seq(s, buffers,
+ asio::buffer_sequence_begin(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncReadStream, typename MutableBufferSequence>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec);
@@ -86,9 +86,9 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
template <typename SyncReadStream, typename MutableBufferSequence>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
+ >)
{
return read(s, buffers, transfer_all(), ec);
}
@@ -97,27 +97,33 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
+ >)
{
asio::error_code ec;
- std::size_t bytes_transferred = read(s, buffers, completion_condition, ec);
+ std::size_t bytes_transferred = read(s, buffers,
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer,
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer>::type b(
- ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
ec = asio::error_code();
std::size_t total_transferred = 0;
@@ -140,45 +146,54 @@ std::size_t read(SyncReadStream& s,
return total_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), transfer_all(), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- return read(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ return read(s, static_cast<DynamicBuffer_v1&&>(buffers),
transfer_all(), ec);
}
-template <typename SyncReadStream, typename DynamicBuffer,
+template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
@@ -192,7 +207,8 @@ inline std::size_t read(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
CompletionCondition completion_condition, asio::error_code& ec)
{
- return read(s, basic_streambuf_ref<Allocator>(b), completion_condition, ec);
+ return read(s, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncReadStream, typename Allocator>
@@ -216,11 +232,87 @@ inline std::size_t read(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
CompletionCondition completion_condition)
{
- return read(s, basic_streambuf_ref<Allocator>(b), completion_condition);
+ return read(s, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ ec = asio::error_code();
+ std::size_t total_transferred = 0;
+ std::size_t max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ std::size_t bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(max_size, b.max_size() - b.size()));
+ while (bytes_available > 0)
+ {
+ std::size_t pos = b.size();
+ b.grow(bytes_available);
+ std::size_t bytes_transferred = s.read_some(
+ b.data(pos, bytes_available), ec);
+ b.shrink(bytes_available - bytes_transferred);
+ total_transferred += bytes_transferred;
+ max_size = detail::adapt_completion_condition_result(
+ completion_condition(ec, total_transferred));
+ bytes_available = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(max_size, b.max_size() - b.size()));
+ }
+ return total_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = read(s,
+ static_cast<DynamicBuffer_v2&&>(buffers), transfer_all(), ec);
+ asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ return read(s, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all(), ec);
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = read(s,
+ static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
+ asio::detail::throw_error(ec, "read");
+ return bytes_transferred;
+}
namespace detail
{
@@ -228,23 +320,25 @@ namespace detail
typename MutableBufferIterator, typename CompletionCondition,
typename ReadHandler>
class read_op
- : detail::base_from_completion_cond<CompletionCondition>
+ : public base_from_cancellation_state<ReadHandler>,
+ base_from_completion_cond<CompletionCondition>
{
public:
read_op(AsyncReadStream& stream, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
stream_(stream),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_op(const read_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<ReadHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
stream_(other.stream_),
buffers_(other.buffers_),
start_(other.start_),
@@ -253,16 +347,18 @@ namespace detail
}
read_op(read_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(other.buffers_),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
std::size_t max_size;
@@ -270,25 +366,39 @@ namespace detail
{
case 1:
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
+ for (;;)
{
- stream_.async_read_some(buffers_.prepare(max_size),
- ASIO_MOVE_CAST(read_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read"));
+ stream_.async_read_some(buffers_.prepare(max_size),
+ static_cast<read_op&&>(*this));
+ }
return; default:
buffers_.consume(bytes_transferred);
if ((!ec && bytes_transferred == 0) || buffers_.empty())
break;
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
+ if (max_size == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
- handler_(ec, buffers_.total_consumed());
+ static_cast<ReadHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(buffers_.total_consumed()));
}
}
//private:
+ typedef asio::detail::consuming_buffers<mutable_buffer,
+ MutableBufferSequence, MutableBufferIterator> buffers_type;
+
AsyncReadStream& stream_;
- asio::detail::consuming_buffers<mutable_buffer,
- MutableBufferSequence, MutableBufferIterator> buffers_;
+ buffers_type buffers_;
int start_;
ReadHandler handler_;
};
@@ -296,28 +406,6 @@ namespace detail
template <typename AsyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition,
typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
inline bool asio_handler_is_continuation(
read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
CompletionCondition, ReadHandler>* this_handler)
@@ -327,158 +415,158 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
template <typename AsyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition,
typename ReadHandler>
- inline void start_read_buffer_sequence_op(AsyncReadStream& stream,
+ inline void start_read_op(AsyncReadStream& stream,
const MutableBufferSequence& buffers, const MutableBufferIterator&,
- CompletionCondition completion_condition, ReadHandler& handler)
+ CompletionCondition& completion_condition, ReadHandler& handler)
{
- detail::read_op<AsyncReadStream, MutableBufferSequence,
+ read_op<AsyncReadStream, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>(
stream, buffers, completion_condition, handler)(
asio::error_code(), 0, 1);
}
+
+ template <typename AsyncReadStream>
+ class initiate_async_read
+ {
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
+
+ explicit initiate_async_read(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence,
+ typename CompletionCondition>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_read_op(stream_, buffers,
+ asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename MutableBufferSequence,
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
detail::read_op<AsyncReadStream, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>,
- Allocator>
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ MutableBufferIterator, CompletionCondition, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_op<AsyncReadStream, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
+ static auto get(
const detail::read_op<AsyncReadStream, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
+template <typename AsyncReadStream,
+ typename MutableBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition, ReadToken&& token,
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(), token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_read_buffer_sequence_op(s, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read<AsyncReadStream>(s), token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncReadStream, typename MutableBufferSequence,
- typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ const MutableBufferSequence& buffers, ReadToken&& token,
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type*)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers, transfer_all()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_read_buffer_sequence_op(s, buffers,
- asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read<AsyncReadStream>(s),
+ token, buffers, transfer_all());
}
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
namespace detail
{
- template <typename AsyncReadStream, typename DynamicBuffer,
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename ReadHandler>
- class read_dynbuf_op
- : detail::base_from_completion_cond<CompletionCondition>
+ class read_dynbuf_v1_op
+ : public base_from_cancellation_state<ReadHandler>,
+ base_from_completion_cond<CompletionCondition>
{
public:
template <typename BufferSequence>
- read_dynbuf_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
+ read_dynbuf_v1_op(AsyncReadStream& stream,
+ BufferSequence&& buffers,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
start_(0),
total_transferred_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- read_dynbuf_op(const read_dynbuf_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ read_dynbuf_v1_op(const read_dynbuf_v1_op& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
stream_(other.stream_),
buffers_(other.buffers_),
start_(other.start_),
@@ -487,18 +575,20 @@ namespace detail
{
}
- read_dynbuf_op(read_dynbuf_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ read_dynbuf_v1_op(read_dynbuf_v1_op&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
start_(other.start_),
total_transferred_(other.total_transferred_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
std::size_t max_size, bytes_available;
@@ -513,8 +603,11 @@ namespace detail
buffers_.max_size() - buffers_.size()));
for (;;)
{
- stream_.async_read_some(buffers_.prepare(bytes_available),
- ASIO_MOVE_CAST(read_dynbuf_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read"));
+ stream_.async_read_some(buffers_.prepare(bytes_available),
+ static_cast<read_dynbuf_v1_op&&>(*this));
+ }
return; default:
total_transferred_ += bytes_transferred;
buffers_.commit(bytes_transferred);
@@ -526,44 +619,31 @@ namespace detail
buffers_.max_size() - buffers_.size()));
if ((!ec && bytes_transferred == 0) || bytes_available == 0)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
}
- handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+ static_cast<ReadHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(total_transferred_));
}
}
//private:
AsyncReadStream& stream_;
- DynamicBuffer buffers_;
+ DynamicBuffer_v1 buffers_;
int start_;
std::size_t total_transferred_;
ReadHandler handler_;
};
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
+ read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
CompletionCondition, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
@@ -571,142 +651,400 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
+ template <typename AsyncReadStream>
+ class initiate_async_read_dynbuf_v1
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_dynbuf_op<AsyncReadStream, DynamicBuffer,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_read_dynbuf_v1(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v1,
+ typename CompletionCondition>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ read_dynbuf_v1_op<AsyncReadStream, decay_t<DynamicBuffer_v1>,
+ CompletionCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
+ completion_cond2.value, handler2.value)(
+ asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename ReadHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_dynbuf_v1_op<AsyncReadStream,
+ DynamicBuffer_v1, CompletionCondition, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_dynbuf_op<AsyncReadStream,
- DynamicBuffer, CompletionCondition, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::read_dynbuf_v1_op<AsyncReadStream,
+ DynamicBuffer_v1, CompletionCondition, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()))
{
- return async_read(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all());
}
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ CompletionCondition completion_condition, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_dynbuf_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- CompletionCondition, ASIO_HANDLER_TYPE(
- ReadHandler, void (asio::error_code, std::size_t))>(
- s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, init.completion_handler)(
- asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename AsyncReadStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ basic_streambuf<Allocator>& b, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()))
{
- return async_read(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all());
}
-template <typename AsyncReadStream, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename AsyncReadStream,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_read(s, basic_streambuf_ref<Allocator>(b),
- completion_condition, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+ class read_dynbuf_v2_op
+ : public base_from_cancellation_state<ReadHandler>,
+ base_from_completion_cond<CompletionCondition>
+ {
+ public:
+ template <typename BufferSequence>
+ read_dynbuf_v2_op(AsyncReadStream& stream,
+ BufferSequence&& buffers,
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
+ start_(0),
+ total_transferred_(0),
+ bytes_available_(0),
+ handler_(static_cast<ReadHandler&&>(handler))
+ {
+ }
+
+ read_dynbuf_v2_op(const read_dynbuf_v2_op& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ bytes_available_(other.bytes_available_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_dynbuf_v2_op(read_dynbuf_v2_op&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ start_(other.start_),
+ total_transferred_(other.total_transferred_),
+ bytes_available_(other.bytes_available_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
+
+ void operator()(asio::error_code ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ std::size_t max_size, pos;
+ switch (start_ = start)
+ {
+ case 1:
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(max_size,
+ buffers_.max_size() - buffers_.size()));
+ for (;;)
+ {
+ pos = buffers_.size();
+ buffers_.grow(bytes_available_);
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read"));
+ stream_.async_read_some(buffers_.data(pos, bytes_available_),
+ static_cast<read_dynbuf_v2_op&&>(*this));
+ }
+ return; default:
+ total_transferred_ += bytes_transferred;
+ buffers_.shrink(bytes_available_ - bytes_transferred);
+ max_size = this->check_for_completion(ec, total_transferred_);
+ bytes_available_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(max_size,
+ buffers_.max_size() - buffers_.size()));
+ if ((!ec && bytes_transferred == 0) || bytes_available_ == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
+
+ static_cast<ReadHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(total_transferred_));
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ int start_;
+ std::size_t total_transferred_;
+ std::size_t bytes_available_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream>
+ class initiate_async_read_dynbuf_v2
+ {
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
+
+ explicit initiate_async_read_dynbuf_v2(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ read_dynbuf_v2_op<AsyncReadStream, decay_t<DynamicBuffer_v2>,
+ CompletionCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ completion_cond2.value, handler2.value)(
+ asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename ReadHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_dynbuf_v2_op<AsyncReadStream,
+ DynamicBuffer_v2, CompletionCondition, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
+{
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_dynbuf_v2_op<AsyncReadStream,
+ DynamicBuffer_v2, CompletionCondition, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all());
+}
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/read_at.hpp b/3rdparty/asio/include/asio/impl/read_at.hpp
index 273312f139f..7c668a03f46 100644
--- a/3rdparty/asio/include/asio/impl/read_at.hpp
+++ b/3rdparty/asio/include/asio/impl/read_at.hpp
@@ -2,7 +2,7 @@
// impl/read_at.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,19 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <algorithm>
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
+#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
@@ -59,7 +58,7 @@ namespace detail
else
break;
}
- return tmp.total_consumed();;
+ return tmp.total_consumed();
}
} // namespace detail
@@ -70,7 +69,8 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
CompletionCondition completion_condition, asio::error_code& ec)
{
return detail::read_at_buffer_sequence(d, offset, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition, ec);
+ asio::buffer_sequence_begin(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
@@ -99,8 +99,8 @@ inline std::size_t read_at(SyncRandomAccessReadDevice& d,
CompletionCondition completion_condition)
{
asio::error_code ec;
- std::size_t bytes_transferred = read_at(
- d, offset, buffers, completion_condition, ec);
+ std::size_t bytes_transferred = read_at(d, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read_at");
return bytes_transferred;
}
@@ -158,8 +158,8 @@ inline std::size_t read_at(SyncRandomAccessReadDevice& d,
CompletionCondition completion_condition)
{
asio::error_code ec;
- std::size_t bytes_transferred = read_at(
- d, offset, b, completion_condition, ec);
+ std::size_t bytes_transferred = read_at(d, offset, b,
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read_at");
return bytes_transferred;
}
@@ -173,25 +173,27 @@ namespace detail
typename MutableBufferSequence, typename MutableBufferIterator,
typename CompletionCondition, typename ReadHandler>
class read_at_op
- : detail::base_from_completion_cond<CompletionCondition>
+ : public base_from_cancellation_state<ReadHandler>,
+ base_from_completion_cond<CompletionCondition>
{
public:
read_at_op(AsyncRandomAccessReadDevice& device,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
device_(device),
offset_(offset),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_at_op(const read_at_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<ReadHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
device_(other.device_),
offset_(other.offset_),
buffers_(other.buffers_),
@@ -201,17 +203,19 @@ namespace detail
}
read_at_op(read_at_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
device_(other.device_),
offset_(other.offset_),
- buffers_(other.buffers_),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
std::size_t max_size;
@@ -219,27 +223,41 @@ namespace detail
{
case 1:
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
+ for (;;)
{
- device_.async_read_some_at(
- offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
- ASIO_MOVE_CAST(read_at_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read_at"));
+ device_.async_read_some_at(
+ offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
+ static_cast<read_at_op&&>(*this));
+ }
return; default:
buffers_.consume(bytes_transferred);
if ((!ec && bytes_transferred == 0) || buffers_.empty())
break;
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
+ if (max_size == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = asio::error::operation_aborted;
+ break;
+ }
+ }
- handler_(ec, buffers_.total_consumed());
+ static_cast<ReadHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(buffers_.total_consumed()));
}
}
//private:
+ typedef asio::detail::consuming_buffers<mutable_buffer,
+ MutableBufferSequence, MutableBufferIterator> buffers_type;
+
AsyncRandomAccessReadDevice& device_;
uint64_t offset_;
- asio::detail::consuming_buffers<mutable_buffer,
- MutableBufferSequence, MutableBufferIterator> buffers_;
+ buffers_type buffers_;
int start_;
ReadHandler handler_;
};
@@ -247,28 +265,6 @@ namespace detail
template <typename AsyncRandomAccessReadDevice,
typename MutableBufferSequence, typename MutableBufferIterator,
typename CompletionCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
@@ -278,34 +274,12 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
template <typename AsyncRandomAccessReadDevice,
typename MutableBufferSequence, typename MutableBufferIterator,
typename CompletionCondition, typename ReadHandler>
- inline void start_read_at_buffer_sequence_op(AsyncRandomAccessReadDevice& d,
+ inline void start_read_at_op(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- const MutableBufferIterator&, CompletionCondition completion_condition,
+ const MutableBufferIterator&, CompletionCondition& completion_condition,
ReadHandler& handler)
{
detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
@@ -313,95 +287,114 @@ namespace detail
d, offset, buffers, completion_condition, handler)(
asio::error_code(), 0, 1);
}
+
+ template <typename AsyncRandomAccessReadDevice>
+ class initiate_async_read_at
+ {
+ public:
+ typedef typename AsyncRandomAccessReadDevice::executor_type executor_type;
+
+ explicit initiate_async_read_at(AsyncRandomAccessReadDevice& device)
+ : device_(device)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return device_.get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence,
+ typename CompletionCondition>
+ void operator()(ReadHandler&& handler,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_read_at_op(device_, offset, buffers,
+ asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+
+ private:
+ AsyncRandomAccessReadDevice& device_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler, typename Allocator>
-struct associated_allocator<
+template <template <typename, typename> class Associator,
+ typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename MutableBufferIterator, typename CompletionCondition,
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Allocator>
+ MutableBufferIterator, CompletionCondition, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_at_op<AsyncRandomAccessReadDevice,
- MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
- static type get(
+ static auto get(
const detail::read_at_op<AsyncRandomAccessReadDevice,
- MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_read_at_buffer_sequence_op(d, offset, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers, transfer_all()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_read_at_buffer_sequence_op(d, offset, buffers,
- asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
+ token, offset, buffers, transfer_all());
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -412,26 +405,28 @@ namespace detail
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition, typename ReadHandler>
class read_at_streambuf_op
- : detail::base_from_completion_cond<CompletionCondition>
+ : public base_from_cancellation_state<ReadHandler>,
+ base_from_completion_cond<CompletionCondition>
{
public:
read_at_streambuf_op(AsyncRandomAccessReadDevice& device,
uint64_t offset, basic_streambuf<Allocator>& streambuf,
- CompletionCondition completion_condition, ReadHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
+ CompletionCondition& completion_condition, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
device_(device),
offset_(offset),
streambuf_(streambuf),
start_(0),
total_transferred_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_at_streambuf_op(const read_at_streambuf_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<ReadHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
device_(other.device_),
offset_(other.offset_),
streambuf_(other.streambuf_),
@@ -442,18 +437,20 @@ namespace detail
}
read_at_streambuf_op(read_at_streambuf_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
device_(other.device_),
offset_(other.offset_),
streambuf_(other.streambuf_),
start_(other.start_),
total_transferred_(other.total_transferred_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
std::size_t max_size, bytes_available;
@@ -464,9 +461,12 @@ namespace detail
bytes_available = read_size_helper(streambuf_, max_size);
for (;;)
{
- device_.async_read_some_at(offset_ + total_transferred_,
- streambuf_.prepare(bytes_available),
- ASIO_MOVE_CAST(read_at_streambuf_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read_at"));
+ device_.async_read_some_at(offset_ + total_transferred_,
+ streambuf_.prepare(bytes_available),
+ static_cast<read_at_streambuf_op&&>(*this));
+ }
return; default:
total_transferred_ += bytes_transferred;
streambuf_.commit(bytes_transferred);
@@ -474,9 +474,16 @@ namespace detail
bytes_available = read_size_helper(streambuf_, max_size);
if ((!ec && bytes_transferred == 0) || bytes_available == 0)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = asio::error::operation_aborted;
+ break;
+ }
}
- handler_(ec, static_cast<const std::size_t&>(total_transferred_));
+ static_cast<ReadHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(total_transferred_));
}
}
@@ -491,26 +498,6 @@ namespace detail
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
CompletionCondition, ReadHandler>* this_handler)
@@ -520,114 +507,115 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename Allocator, typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
+ template <typename AsyncRandomAccessReadDevice>
+ class initiate_async_read_at_streambuf
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncRandomAccessReadDevice::executor_type executor_type;
+
+ explicit initiate_async_read_at_streambuf(
+ AsyncRandomAccessReadDevice& device)
+ : device_(device)
+ {
+ }
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename Allocator, typename CompletionCondition, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
+ executor_type get_executor() const noexcept
+ {
+ return device_.get_executor();
+ }
+
+ template <typename ReadHandler,
+ typename Allocator, typename CompletionCondition>
+ void operator()(ReadHandler&& handler,
+ uint64_t offset, basic_streambuf<Allocator>* b,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ CompletionCondition, decay_t<ReadHandler>>(
+ device_, offset, *b, completion_cond2.value, handler2.value)(
+ asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncRandomAccessReadDevice& device_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler, typename Allocator1>
-struct associated_allocator<
+template <template <typename, typename> class Associator,
+ typename AsyncRandomAccessReadDevice, typename Executor,
+ typename CompletionCondition, typename ReadHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Allocator, CompletionCondition, ReadHandler>,
- Allocator1>
+ Executor, CompletionCondition, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator1>::type type;
-
- static type get(
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Allocator, CompletionCondition, ReadHandler>& h,
- const Allocator1& a = Allocator1()) ASIO_NOEXCEPT
+ Executor, CompletionCondition, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator1>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename AsyncRandomAccessReadDevice, typename Executor,
- typename CompletionCondition, typename ReadHandler, typename Executor1>
-struct associated_executor<
- detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
- Executor, CompletionCondition, ReadHandler>,
- Executor1>
-{
- typedef typename associated_executor<ReadHandler, Executor1>::type type;
-
- static type get(
+ static auto get(
const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
Executor, CompletionCondition, ReadHandler>& h,
- const Executor1& ex = Executor1()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor1>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+template <typename AsyncRandomAccessReadDevice,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ASIO_HANDLER_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))>(
- d, offset, b, completion_condition, init.completion_handler)(
- asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, asio::basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+ asio::basic_streambuf<Allocator>& b, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b, transfer_all()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- detail::transfer_all_t, ASIO_HANDLER_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))>(
- d, offset, b, transfer_all(), init.completion_handler)(
- asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
+ token, offset, &b, transfer_all());
}
#endif // !defined(ASIO_NO_IOSTREAM)
diff --git a/3rdparty/asio/include/asio/impl/read_until.hpp b/3rdparty/asio/include/asio/impl/read_until.hpp
index c0a435e63b8..7592263723f 100644
--- a/3rdparty/asio/include/asio/impl/read_until.hpp
+++ b/3rdparty/asio/include/asio/impl/read_until.hpp
@@ -2,7 +2,7 @@
// impl/read_until.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,46 +19,95 @@
#include <string>
#include <vector>
#include <utility>
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
+#include "asio/associator.hpp"
#include "asio/buffer.hpp"
#include "asio/buffers_iterator.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/limits.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-template <typename SyncReadStream, typename DynamicBuffer>
+namespace detail
+{
+ // Algorithm that finds a subsequence of equal values in a sequence. Returns
+ // (iterator,true) if a full match was found, in which case the iterator
+ // points to the beginning of the match. Returns (iterator,false) if a
+ // partial match was found at the end of the first sequence, in which case
+ // the iterator points to the beginning of the partial match. Returns
+ // (last1,false) if no full or partial match was found.
+ template <typename Iterator1, typename Iterator2>
+ std::pair<Iterator1, bool> partial_search(
+ Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
+ {
+ for (Iterator1 iter1 = first1; iter1 != last1; ++iter1)
+ {
+ Iterator1 test_iter1 = iter1;
+ Iterator2 test_iter2 = first2;
+ for (;; ++test_iter1, ++test_iter2)
+ {
+ if (test_iter2 == last2)
+ return std::make_pair(iter1, true);
+ if (test_iter1 == last1)
+ {
+ if (test_iter2 != first2)
+ return std::make_pair(iter1, false);
+ else
+ break;
+ }
+ if (*test_iter1 != *test_iter2)
+ break;
+ }
+ }
+ return std::make_pair(last1, false);
+ }
+} // namespace detail
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim)
+ DynamicBuffer_v1&& buffers, char delim,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, asio::error_code& ec)
+ DynamicBuffer_v1&& buffers,
+ char delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer>::type b(
- ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@@ -96,66 +145,43 @@ std::size_t read_until(SyncReadStream& s,
}
}
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_STRING_VIEW_PARAM delim)
+ DynamicBuffer_v1&& buffers,
+ ASIO_STRING_VIEW_PARAM delim,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
-namespace detail
-{
- // Algorithm that finds a subsequence of equal values in a sequence. Returns
- // (iterator,true) if a full match was found, in which case the iterator
- // points to the beginning of the match. Returns (iterator,false) if a
- // partial match was found at the end of the first sequence, in which case
- // the iterator points to the beginning of the partial match. Returns
- // (last1,false) if no full or partial match was found.
- template <typename Iterator1, typename Iterator2>
- std::pair<Iterator1, bool> partial_search(
- Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
- {
- for (Iterator1 iter1 = first1; iter1 != last1; ++iter1)
- {
- Iterator1 test_iter1 = iter1;
- Iterator2 test_iter2 = first2;
- for (;; ++test_iter1, ++test_iter2)
- {
- if (test_iter2 == last2)
- return std::make_pair(iter1, true);
- if (test_iter1 == last1)
- {
- if (test_iter2 != first2)
- return std::make_pair(iter1, false);
- else
- break;
- }
- if (*test_iter1 != *test_iter2)
- break;
- }
- }
- return std::make_pair(last1, false);
- }
-} // namespace detail
-
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec)
+ DynamicBuffer_v1&& buffers,
+ ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer>::type b(
- ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@@ -205,31 +231,54 @@ std::size_t read_until(SyncReadStream& s,
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX)
-template <typename SyncReadStream, typename DynamicBuffer>
-inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr)
+namespace detail {
+
+struct regex_match_flags
+{
+ template <typename T>
+ operator T() const
+ {
+ return T::match_default | T::match_partial;
+ }
+};
+
+} // namespace detail
+
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), expr, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr, asio::error_code& ec)
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer>::type b(
- ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@@ -238,10 +287,10 @@ std::size_t read_until(SyncReadStream& s,
// Look for a match.
boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
match_results;
- if (regex_search(start_pos, end, match_results, expr,
- boost::match_default | boost::match_partial))
+ if (regex_search(start_pos, end, match_results,
+ expr, detail::regex_match_flags()))
{
if (match_results[0].matched)
{
@@ -269,7 +318,9 @@ std::size_t read_until(SyncReadStream& s,
}
// Need more data.
- std::size_t bytes_to_read = read_size_helper(b, 65536);
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
b.commit(s.read_some(b.prepare(bytes_to_read), ec));
if (ec)
return 0;
@@ -279,35 +330,51 @@ std::size_t read_until(SyncReadStream& s,
#endif // defined(ASIO_HAS_BOOST_REGEX)
template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
+ typename DynamicBuffer_v1, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ static_cast<DynamicBuffer_v1&&>(buffers),
match_condition, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
+ typename DynamicBuffer_v1, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition, asio::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer>::type b(
- ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef typename DynamicBuffer_v1::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@@ -385,16 +452,18 @@ inline std::size_t read_until(SyncReadStream& s,
#if defined(ASIO_HAS_BOOST_REGEX)
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
inline std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr)
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), expr);
}
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
inline std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr,
asio::error_code& ec)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), expr, ec);
@@ -405,7 +474,7 @@ inline std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename Allocator, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+ constraint_t<is_match_condition<MatchCondition>::value>)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition);
}
@@ -414,37 +483,360 @@ template <typename SyncReadStream, typename Allocator, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
MatchCondition match_condition, asio::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+ constraint_t<is_match_condition<MatchCondition>::value>)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition, ec);
}
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, char delim,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ static_cast<DynamicBuffer_v2&&>(buffers), delim, ec);
+ asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ char delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ iterator iter = std::find(start_pos, end, delim);
+ if (iter != end)
+ {
+ // Found a match. We're done.
+ ec = asio::error_code();
+ return iter - begin + 1;
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, ASIO_STRING_VIEW_PARAM delim,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ static_cast<DynamicBuffer_v2&&>(buffers), delim, ec);
+ asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = detail::partial_search(
+ start_pos, end, delim.begin(), delim.end());
+ if (result.first != end)
+ {
+ if (result.second)
+ {
+ // Full match. We're done.
+ ec = asio::error_code();
+ return result.first - begin + delim.length();
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ search_position = result.first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+#if !defined(ASIO_NO_EXTENSIONS)
+#if defined(ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
+inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ static_cast<DynamicBuffer_v2&&>(buffers), expr, ec);
+ asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ boost::match_results<iterator,
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
+ match_results;
+ if (regex_search(start_pos, end, match_results,
+ expr, detail::regex_match_flags()))
+ {
+ if (match_results[0].matched)
+ {
+ // Full match. We're done.
+ ec = asio::error_code();
+ return match_results[0].second - begin;
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ search_position = match_results[0].first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ DynamicBuffer_v2 buffers, MatchCondition match_condition,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition, ec);
+ asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, asio::error_code& ec,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ DynamicBuffer_v2& b = buffers;
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(b).data(0, b.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = match_condition(start_pos, end);
+ if (result.second)
+ {
+ // Full match. We're done.
+ ec = asio::error_code();
+ return result.first - begin;
+ }
+ else if (result.first != end)
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ search_position = result.first - begin;
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ std::size_t pos = b.size();
+ b.grow(bytes_to_read);
+ std::size_t bytes_transferred = s.read_some(b.data(pos, bytes_to_read), ec);
+ b.shrink(bytes_to_read - bytes_transferred);
+ if (ec)
+ return 0;
+ }
+}
+
+#endif // !defined(ASIO_NO_EXTENSIONS)
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace detail
{
template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- class read_until_delim_op
+ typename DynamicBuffer_v1, typename ReadHandler>
+ class read_until_delim_op_v1
+ : public base_from_cancellation_state<ReadHandler>
{
public:
template <typename BufferSequence>
- read_until_delim_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ read_until_delim_op_v1(AsyncReadStream& stream,
+ BufferSequence&& buffers,
char delim, ReadHandler& handler)
- : stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
delim_(delim),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- read_until_delim_op(const read_until_delim_op& other)
- : stream_(other.stream_),
+ read_until_delim_op_v1(const read_until_delim_op_v1& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
buffers_(other.buffers_),
delim_(other.delim_),
start_(other.start_),
@@ -453,18 +845,19 @@ namespace detail
{
}
- read_until_delim_op(read_until_delim_op&& other)
- : stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ read_until_delim_op_v1(read_until_delim_op_v1&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
delim_(other.delim_),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
@@ -476,7 +869,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
+ typedef typename DynamicBuffer_v1::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@@ -518,12 +911,21 @@ namespace detail
break;
// Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_delim_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ static_cast<read_until_delim_op_v1&&>(*this));
+ }
return; default:
buffers_.commit(bytes_transferred);
if (ec || bytes_transferred == 0)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
}
const asio::error_code result_ec =
@@ -534,13 +936,13 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- handler_(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
//private:
AsyncReadStream& stream_;
- DynamicBuffer buffers_;
+ DynamicBuffer_v1 buffers_;
char delim_;
int start_;
std::size_t search_position_;
@@ -548,145 +950,133 @@ namespace detail
};
template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
+ typename DynamicBuffer_v1, typename ReadHandler>
inline bool asio_handler_is_continuation(
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
+ read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_delim_v1
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_read_until_delim_v1(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v1>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ char delim) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_op_v1<AsyncReadStream,
+ decay_t<DynamicBuffer_v1>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
+ delim, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, char delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_until_delim_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- ASIO_HANDLER_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))>(
- s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- delim, init.completion_handler)(asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim);
}
namespace detail
{
template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- class read_until_delim_string_op
+ typename DynamicBuffer_v1, typename ReadHandler>
+ class read_until_delim_string_op_v1
+ : public base_from_cancellation_state<ReadHandler>
{
public:
template <typename BufferSequence>
- read_until_delim_string_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ read_until_delim_string_op_v1(AsyncReadStream& stream,
+ BufferSequence&& buffers,
const std::string& delim, ReadHandler& handler)
- : stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
delim_(delim),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- read_until_delim_string_op(const read_until_delim_string_op& other)
- : stream_(other.stream_),
+ read_until_delim_string_op_v1(const read_until_delim_string_op_v1& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
buffers_(other.buffers_),
delim_(other.delim_),
start_(other.start_),
@@ -695,18 +1085,19 @@ namespace detail
{
}
- read_until_delim_string_op(read_until_delim_string_op&& other)
- : stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
+ read_until_delim_string_op_v1(read_until_delim_string_op_v1&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
+ delim_(static_cast<std::string&&>(other.delim_)),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
@@ -718,7 +1109,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
+ typedef typename DynamicBuffer_v1::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@@ -771,12 +1162,21 @@ namespace detail
break;
// Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_delim_string_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ static_cast<read_until_delim_string_op_v1&&>(*this));
+ }
return; default:
buffers_.commit(bytes_transferred);
if (ec || bytes_transferred == 0)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
}
const asio::error_code result_ec =
@@ -787,13 +1187,13 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- handler_(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
//private:
AsyncReadStream& stream_;
- DynamicBuffer buffers_;
+ DynamicBuffer_v1 buffers_;
std::string delim_;
int start_;
std::size_t search_position_;
@@ -801,122 +1201,108 @@ namespace detail
};
template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
+ typename DynamicBuffer_v1, typename ReadHandler>
inline bool asio_handler_is_continuation(
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
+ read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_delim_string_v1
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_read_until_delim_string_v1(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v1>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ const std::string& delim) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_string_op_v1<AsyncReadStream,
+ decay_t<DynamicBuffer_v1>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
+ delim, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_delim_string_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_delim_string_op_v1<
+ AsyncReadStream, DynamicBuffer_v1, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
- static type get(
- const detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::read_until_delim_string_op_v1<
+ AsyncReadStream, DynamicBuffer_v1, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ ASIO_STRING_VIEW_PARAM delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v1<
+ AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<std::string>(delim)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_until_delim_string_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- ASIO_HANDLER_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))>(
- s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- static_cast<std::string>(delim),
- init.completion_handler)(asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<std::string>(delim));
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -924,27 +1310,29 @@ async_read_until(AsyncReadStream& s,
namespace detail
{
- template <typename AsyncReadStream, typename DynamicBuffer,
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename RegEx, typename ReadHandler>
- class read_until_expr_op
+ class read_until_expr_op_v1
+ : public base_from_cancellation_state<ReadHandler>
{
public:
- template <typename BufferSequence>
- read_until_expr_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
- const boost::regex& expr, ReadHandler& handler)
- : stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ template <typename BufferSequence, typename Traits>
+ read_until_expr_op_v1(AsyncReadStream& stream, BufferSequence&& buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
expr_(expr),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- read_until_expr_op(const read_until_expr_op& other)
- : stream_(other.stream_),
+ read_until_expr_op_v1(const read_until_expr_op_v1& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
buffers_(other.buffers_),
expr_(other.expr_),
start_(other.start_),
@@ -953,18 +1341,19 @@ namespace detail
{
}
- read_until_expr_op(read_until_expr_op&& other)
- : stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ read_until_expr_op_v1(read_until_expr_op_v1&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
expr_(other.expr_),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
@@ -976,7 +1365,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
+ typedef typename DynamicBuffer_v1::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@@ -986,10 +1375,10 @@ namespace detail
// Look for a match.
boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
match_results;
- bool match = regex_search(start_pos, end, match_results, expr_,
- boost::match_default | boost::match_partial);
+ bool match = regex_search(start_pos, end,
+ match_results, expr_, regex_match_flags());
if (match && match_results[0].matched)
{
// Full match. We're done.
@@ -1032,12 +1421,21 @@ namespace detail
break;
// Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_expr_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ static_cast<read_until_expr_op_v1&&>(*this));
+ }
return; default:
buffers_.commit(bytes_transferred);
if (ec || bytes_transferred == 0)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
}
const asio::error_code result_ec =
@@ -1048,162 +1446,148 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- handler_(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
//private:
AsyncReadStream& stream_;
- DynamicBuffer buffers_;
+ DynamicBuffer_v1 buffers_;
RegEx expr_;
int start_;
std::size_t search_position_;
ReadHandler handler_;
};
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename RegEx, typename ReadHandler>
inline bool asio_handler_is_continuation(
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename RegEx, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_expr_v1
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename RegEx, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_read_until_expr_v1(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v1, typename RegEx>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers, const RegEx& expr) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_expr_op_v1<AsyncReadStream,
+ decay_t<DynamicBuffer_v1>,
+ RegEx, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
+ expr, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename RegEx, typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>& h) noexcept
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename AsyncReadStream, typename DynamicBuffer_v1, typename Traits,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_until_expr_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- boost::regex, ASIO_HANDLER_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))>(
- s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- expr, init.completion_handler)(asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr);
}
#endif // defined(ASIO_HAS_BOOST_REGEX)
namespace detail
{
- template <typename AsyncReadStream, typename DynamicBuffer,
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename MatchCondition, typename ReadHandler>
- class read_until_match_op
+ class read_until_match_op_v1
+ : public base_from_cancellation_state<ReadHandler>
{
public:
template <typename BufferSequence>
- read_until_match_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ read_until_match_op_v1(AsyncReadStream& stream,
+ BufferSequence&& buffers,
MatchCondition match_condition, ReadHandler& handler)
- : stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
match_condition_(match_condition),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- read_until_match_op(const read_until_match_op& other)
- : stream_(other.stream_),
+ read_until_match_op_v1(const read_until_match_op_v1& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
buffers_(other.buffers_),
match_condition_(other.match_condition_),
start_(other.start_),
@@ -1212,18 +1596,19 @@ namespace detail
{
}
- read_until_match_op(read_until_match_op&& other)
- : stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ read_until_match_op_v1(read_until_match_op_v1&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
match_condition_(other.match_condition_),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
@@ -1235,7 +1620,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
+ typedef typename DynamicBuffer_v1::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@@ -1287,12 +1672,21 @@ namespace detail
break;
// Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_match_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ static_cast<read_until_match_op_v1&&>(*this));
+ }
return; default:
buffers_.commit(bytes_transferred);
if (ec || bytes_transferred == 0)
break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
}
const asio::error_code result_ec =
@@ -1303,194 +1697,1241 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- handler_(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
//private:
AsyncReadStream& stream_;
- DynamicBuffer buffers_;
+ DynamicBuffer_v1 buffers_;
MatchCondition match_condition_;
int start_;
std::size_t search_position_;
ReadHandler handler_;
};
- template <typename AsyncReadStream, typename DynamicBuffer,
+ template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename MatchCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
+ inline bool asio_handler_is_continuation(
+ read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
MatchCondition, ReadHandler>* this_handler)
{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
+ return this_handler->start_ == 0 ? true
+ : asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
}
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_match_v1
{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
+
+ explicit initiate_async_read_until_match_v1(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler,
+ typename DynamicBuffer_v1, typename MatchCondition>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ MatchCondition match_condition) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_match_op_v1<AsyncReadStream,
+ decay_t<DynamicBuffer_v1>,
+ MatchCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v1,
+ typename MatchCondition, typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
+{
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
}
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
+ static auto get(
+ const detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename MatchCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition);
+}
+
+#if !defined(ASIO_NO_IOSTREAM)
+
+template <typename AsyncReadStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b, char delim, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), delim))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), delim);
+}
+
+template <typename AsyncReadStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b,
+ ASIO_STRING_VIEW_PARAM delim, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v1<
+ AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<std::string>(delim)))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<std::string>(delim));
+}
+
+#if defined(ASIO_HAS_BOOST_REGEX)
+
+template <typename AsyncReadStream, typename Allocator, typename Traits,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), expr))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), expr);
+}
+
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+
+template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<is_match_condition<MatchCondition>::value>)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), match_condition))
+{
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), match_condition);
+}
+
+#endif // !defined(ASIO_NO_IOSTREAM)
+#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ class read_until_delim_op_v2
+ : public base_from_cancellation_state<ReadHandler>
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_op_v2(AsyncReadStream& stream,
+ BufferSequence&& buffers,
+ char delim, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
+ delim_(delim),
+ start_(0),
+ search_position_(0),
+ bytes_to_read_(0),
+ handler_(static_cast<ReadHandler&&>(handler))
+ {
+ }
+
+ read_until_delim_op_v2(const read_until_delim_op_v2& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_delim_op_v2(read_until_delim_op_v2&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
+
+ void operator()(asio::error_code ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ iterator iter = std::find(start_pos, end, delim_);
+ if (iter != end)
+ {
+ // Found a match. We're done.
+ search_position_ = iter - begin + 1;
+ bytes_to_read_ = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read_ = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ bytes_to_read_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read_ == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ static_cast<read_until_delim_op_v2&&>(*this));
+ }
+ return; default:
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
+
+ const asio::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ char delim_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
inline bool asio_handler_is_continuation(
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
+ read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename MatchCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_delim_v2
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename MatchCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_read_until_delim_v2(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v2>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers, char delim) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_op_v2<AsyncReadStream,
+ decay_t<DynamicBuffer_v2>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ delim, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
- static type get(
- const detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>,
- Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, char delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim))
{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim);
+}
- static type get(
- const detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ class read_until_delim_string_op_v2
+ : public base_from_cancellation_state<ReadHandler>
{
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ public:
+ template <typename BufferSequence>
+ read_until_delim_string_op_v2(AsyncReadStream& stream,
+ BufferSequence&& buffers,
+ const std::string& delim, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
+ delim_(delim),
+ start_(0),
+ search_position_(0),
+ bytes_to_read_(0),
+ handler_(static_cast<ReadHandler&&>(handler))
+ {
+ }
+
+ read_until_delim_string_op_v2(const read_until_delim_string_op_v2& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_delim_string_op_v2(read_until_delim_string_op_v2&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ delim_(static_cast<std::string&&>(other.delim_)),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
+
+ void operator()(asio::error_code ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = detail::partial_search(
+ start_pos, end, delim_.begin(), delim_.end());
+ if (result.first != end && result.second)
+ {
+ // Full match. We're done.
+ search_position_ = result.first - begin + delim_.length();
+ bytes_to_read_ = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read_ = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ if (result.first != end)
+ {
+ // Partial match. Next search needs to start from beginning of
+ // match.
+ search_position_ = result.first - begin;
+ }
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ }
+
+ bytes_to_read_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read_ == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ static_cast<read_until_delim_string_op_v2&&>(*this));
+ }
+ return; default:
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
+
+ const asio::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ std::string delim_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_delim_string_v2
+ {
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
+
+ explicit initiate_async_read_until_delim_string_v2(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v2>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ const std::string& delim) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_delim_string_op_v2<AsyncReadStream,
+ decay_t<DynamicBuffer_v2>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ delim, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_delim_string_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
+{
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_delim_string_op_v2<
+ AsyncReadStream, DynamicBuffer_v2, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_delim_string_op_v2<
+ AsyncReadStream, DynamicBuffer_v2, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ ASIO_STRING_VIEW_PARAM delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v2<
+ AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<std::string>(delim)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::read_until_match_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- MatchCondition, ASIO_HANDLER_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))>(
- s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- match_condition, init.completion_handler)(
- asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<std::string>(delim));
}
-#if !defined(ASIO_NO_IOSTREAM)
+#if !defined(ASIO_NO_EXTENSIONS)
+#if defined(ASIO_HAS_BOOST_REGEX)
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler)
+namespace detail
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- delim, ASIO_MOVE_CAST(ReadHandler)(handler));
-}
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler>
+ class read_until_expr_op_v2
+ : public base_from_cancellation_state<ReadHandler>
+ {
+ public:
+ template <typename BufferSequence, typename Traits>
+ read_until_expr_op_v2(AsyncReadStream& stream, BufferSequence&& buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
+ expr_(expr),
+ start_(0),
+ search_position_(0),
+ bytes_to_read_(0),
+ handler_(static_cast<ReadHandler&&>(handler))
+ {
+ }
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ read_until_expr_op_v2(const read_until_expr_op_v2& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ expr_(other.expr_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_expr_op_v2(read_until_expr_op_v2&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ expr_(other.expr_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
+
+ void operator()(asio::error_code ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ boost::match_results<iterator,
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
+ match_results;
+ bool match = regex_search(start_pos, end,
+ match_results, expr_, regex_match_flags());
+ if (match && match_results[0].matched)
+ {
+ // Full match. We're done.
+ search_position_ = match_results[0].second - begin;
+ bytes_to_read_ = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read_ = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ if (match)
+ {
+ // Partial match. Next search needs to start from beginning of
+ // match.
+ search_position_ = match_results[0].first - begin;
+ }
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ }
+
+ bytes_to_read_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read_ == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ static_cast<read_until_expr_op_v2&&>(*this));
+ }
+ return; default:
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
+
+ const asio::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ RegEx expr_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_expr_v2
+ {
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
+
+ explicit initiate_async_read_until_expr_v2(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler, typename DynamicBuffer_v2, typename RegEx>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ const RegEx& expr) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_expr_op_v2<AsyncReadStream,
+ decay_t<DynamicBuffer_v2>,
+ RegEx, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ expr, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename RegEx, typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- delim, ASIO_MOVE_CAST(ReadHandler)(handler));
-}
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
-#if defined(ASIO_HAS_BOOST_REGEX)
+ static auto get(
+ const detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler)
+template <typename AsyncReadStream, typename DynamicBuffer_v2, typename Traits,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr))
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- expr, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr);
}
#endif // defined(ASIO_HAS_BOOST_REGEX)
-template <typename AsyncReadStream, typename Allocator,
- typename MatchCondition, typename ReadHandler>
-inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler>
+ class read_until_match_op_v2
+ : public base_from_cancellation_state<ReadHandler>
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_match_op_v2(AsyncReadStream& stream,
+ BufferSequence&& buffers,
+ MatchCondition match_condition, ReadHandler& handler)
+ : base_from_cancellation_state<ReadHandler>(
+ handler, enable_partial_cancellation()),
+ stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
+ match_condition_(match_condition),
+ start_(0),
+ search_position_(0),
+ bytes_to_read_(0),
+ handler_(static_cast<ReadHandler&&>(handler))
+ {
+ }
+
+ read_until_match_op_v2(const read_until_match_op_v2& other)
+ : base_from_cancellation_state<ReadHandler>(other),
+ stream_(other.stream_),
+ buffers_(other.buffers_),
+ match_condition_(other.match_condition_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_match_op_v2(read_until_match_op_v2&& other)
+ : base_from_cancellation_state<ReadHandler>(
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
+ stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ match_condition_(other.match_condition_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ bytes_to_read_(other.bytes_to_read_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
+
+ void operator()(asio::error_code ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t pos;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer_v2::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers =
+ const_cast<const DynamicBuffer_v2&>(buffers_).data(
+ 0, buffers_.size());
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = match_condition_(start_pos, end);
+ if (result.second)
+ {
+ // Full match. We're done.
+ search_position_ = result.first - begin;
+ bytes_to_read_ = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read_ = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ if (result.first != end)
+ {
+ // Partial match. Next search needs to start from beginning of
+ // match.
+ search_position_ = result.first - begin;
+ }
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ }
+
+ bytes_to_read_ = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read_ == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ pos = buffers_.size();
+ buffers_.grow(bytes_to_read_);
+ {
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, "async_read_until"));
+ stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
+ static_cast<read_until_match_op_v2&&>(*this));
+ }
+ return; default:
+ buffers_.shrink(bytes_to_read_ - bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
+
+ const asio::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ MatchCondition match_condition_;
+ int start_;
+ std::size_t search_position_;
+ std::size_t bytes_to_read_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream>
+ class initiate_async_read_until_match_v2
+ {
+ public:
+ typedef typename AsyncReadStream::executor_type executor_type;
+
+ explicit initiate_async_read_until_match_v2(AsyncReadStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename ReadHandler,
+ typename DynamicBuffer_v2, typename MatchCondition>
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ MatchCondition match_condition) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ non_const_lvalue<ReadHandler> handler2(handler);
+ read_until_match_op_v2<AsyncReadStream, decay_t<DynamicBuffer_v2>,
+ MatchCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition, handler2.value)(asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncReadStream& stream_;
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename AsyncReadStream, typename DynamicBuffer_v2,
+ typename MatchCondition, typename ReadHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>,
+ DefaultCandidate>
+ : Associator<ReadHandler, DefaultCandidate>
+{
+ static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition))
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- match_condition, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition);
}
-#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/redirect_error.hpp b/3rdparty/asio/include/asio/impl/redirect_error.hpp
new file mode 100644
index 00000000000..e75aa0f706c
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/redirect_error.hpp
@@ -0,0 +1,250 @@
+
+// impl/redirect_error.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_REDIRECT_ERROR_HPP
+#define ASIO_IMPL_REDIRECT_ERROR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/system_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a redirect_error_t as a completion handler.
+template <typename Handler>
+class redirect_error_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename CompletionToken>
+ redirect_error_handler(redirect_error_t<CompletionToken> e)
+ : ec_(e.ec_),
+ handler_(static_cast<CompletionToken&&>(e.token_))
+ {
+ }
+
+ template <typename RedirectedHandler>
+ redirect_error_handler(asio::error_code& ec,
+ RedirectedHandler&& h)
+ : ec_(ec),
+ handler_(static_cast<RedirectedHandler&&>(h))
+ {
+ }
+
+ void operator()()
+ {
+ static_cast<Handler&&>(handler_)();
+ }
+
+ template <typename Arg, typename... Args>
+ enable_if_t<
+ !is_same<decay_t<Arg>, asio::error_code>::value
+ >
+ operator()(Arg&& arg, Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<Arg&&>(arg),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename... Args>
+ void operator()(const asio::error_code& ec, Args&&... args)
+ {
+ ec_ = ec;
+ static_cast<Handler&&>(handler_)(static_cast<Args&&>(args)...);
+ }
+
+//private:
+ asio::error_code& ec_;
+ Handler handler_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ redirect_error_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature>
+struct redirect_error_signature
+{
+ typedef Signature type;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(asio::error_code, Args...)>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(const asio::error_code&, Args...)>
+{
+ typedef R type(Args...);
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(asio::error_code, Args...) &>
+{
+ typedef R type(Args...) &;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(const asio::error_code&, Args...) &>
+{
+ typedef R type(Args...) &;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(asio::error_code, Args...) &&>
+{
+ typedef R type(Args...) &&;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<R(const asio::error_code&, Args...) &&>
+{
+ typedef R type(Args...) &&;
+};
+
+#if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct redirect_error_signature<
+ R(asio::error_code, Args...) noexcept>
+{
+ typedef R type(Args...) & noexcept;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<
+ R(const asio::error_code&, Args...) noexcept>
+{
+ typedef R type(Args...) & noexcept;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<
+ R(asio::error_code, Args...) & noexcept>
+{
+ typedef R type(Args...) & noexcept;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<
+ R(const asio::error_code&, Args...) & noexcept>
+{
+ typedef R type(Args...) & noexcept;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<
+ R(asio::error_code, Args...) && noexcept>
+{
+ typedef R type(Args...) && noexcept;
+};
+
+template <typename R, typename... Args>
+struct redirect_error_signature<
+ R(const asio::error_code&, Args...) && noexcept>
+{
+ typedef R type(Args...) && noexcept;
+};
+
+#endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename Signature>
+struct async_result<redirect_error_t<CompletionToken>, Signature>
+ : async_result<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>
+{
+
+ struct init_wrapper
+ {
+ explicit init_wrapper(asio::error_code& ec)
+ : ec_(ec)
+ {
+ }
+
+ template <typename Handler, typename Initiation, typename... Args>
+ void operator()(Handler&& handler,
+ Initiation&& initiation, Args&&... args) const
+ {
+ static_cast<Initiation&&>(initiation)(
+ detail::redirect_error_handler<decay_t<Handler>>(
+ ec_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ asio::error_code& ec_;
+ };
+
+ template <typename Initiation, typename RawCompletionToken, typename... Args>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>(
+ declval<init_wrapper>(), token.token_,
+ static_cast<Initiation&&>(initiation),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>(
+ init_wrapper(token.ec_), token.token_,
+ static_cast<Initiation&&>(initiation),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::redirect_error_handler<Handler>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::redirect_error_handler<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::redirect_error_handler<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_REDIRECT_ERROR_HPP
diff --git a/3rdparty/asio/include/asio/impl/serial_port_base.hpp b/3rdparty/asio/include/asio/impl/serial_port_base.hpp
index c118d93cb9e..1fa2af66f73 100644
--- a/3rdparty/asio/include/asio/impl/serial_port_base.hpp
+++ b/3rdparty/asio/include/asio/impl/serial_port_base.hpp
@@ -2,7 +2,7 @@
// impl/serial_port_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/impl/serial_port_base.ipp b/3rdparty/asio/include/asio/impl/serial_port_base.ipp
index 748c8ca0d1a..646af3453d6 100644
--- a/3rdparty/asio/include/asio/impl/serial_port_base.ipp
+++ b/3rdparty/asio/include/asio/impl/serial_port_base.ipp
@@ -2,7 +2,7 @@
// impl/serial_port_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -113,7 +113,7 @@ ASIO_SYNC_OP_VOID serial_port_base::baud_rate::store(
ec = asio::error::invalid_argument;
ASIO_SYNC_OP_VOID_RETURN(ec);
}
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
::cfsetspeed(&storage, baud);
# else
::cfsetispeed(&storage, baud);
@@ -249,7 +249,7 @@ ASIO_SYNC_OP_VOID serial_port_base::flow_control::store(
{
case none:
storage.c_iflag &= ~(IXOFF | IXON);
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
storage.c_cflag &= ~CRTSCTS;
# elif defined(__QNXNTO__)
storage.c_cflag &= ~(IHFLOW | OHFLOW);
@@ -257,14 +257,14 @@ ASIO_SYNC_OP_VOID serial_port_base::flow_control::store(
break;
case software:
storage.c_iflag |= IXOFF | IXON;
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
storage.c_cflag &= ~CRTSCTS;
# elif defined(__QNXNTO__)
storage.c_cflag &= ~(IHFLOW | OHFLOW);
# endif
break;
case hardware:
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
storage.c_iflag &= ~(IXOFF | IXON);
storage.c_cflag |= CRTSCTS;
break;
@@ -305,7 +305,7 @@ ASIO_SYNC_OP_VOID serial_port_base::flow_control::load(
{
value_ = software;
}
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)
else if (storage.c_cflag & CRTSCTS)
{
value_ = hardware;
diff --git a/3rdparty/asio/include/asio/impl/spawn.hpp b/3rdparty/asio/include/asio/impl/spawn.hpp
index 82a05f086a2..38a96406ed4 100644
--- a/3rdparty/asio/include/asio/impl/spawn.hpp
+++ b/3rdparty/asio/include/asio/impl/spawn.hpp
@@ -2,7 +2,7 @@
// impl/spawn.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,513 +16,1382 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <tuple>
#include "asio/associated_allocator.hpp"
+#include "asio/associated_cancellation_slot.hpp"
#include "asio/associated_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/bind_executor.hpp"
#include "asio/detail/atomic_count.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/bind_handler.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
#include "asio/system_error.hpp"
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# include <boost/context/fiber.hpp>
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
- template <typename Handler, typename T>
- class coro_handler
+#if !defined(ASIO_NO_EXCEPTIONS)
+inline void spawned_thread_rethrow(void* ex)
+{
+ if (*static_cast<exception_ptr*>(ex))
+ rethrow_exception(*static_cast<exception_ptr*>(ex));
+}
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+
+// Spawned thread implementation using Boost.Coroutine.
+class spawned_coroutine_thread : public spawned_thread_base
+{
+public:
+#if defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
+ typedef boost::coroutines::pull_coroutine<void> callee_type;
+ typedef boost::coroutines::push_coroutine<void> caller_type;
+#else
+ typedef boost::coroutines::coroutine<void()> callee_type;
+ typedef boost::coroutines::coroutine<void()> caller_type;
+#endif
+
+ spawned_coroutine_thread(caller_type& caller)
+ : caller_(caller),
+ on_suspend_fn_(0),
+ on_suspend_arg_(0)
{
- public:
- coro_handler(basic_yield_context<Handler> ctx)
- : coro_(ctx.coro_.lock()),
- ca_(ctx.ca_),
- handler_(ctx.handler_),
- ready_(0),
- ec_(ctx.ec_),
- value_(0)
+ }
+
+ template <typename F>
+ static spawned_thread_base* spawn(F&& f,
+ const boost::coroutines::attributes& attributes,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ spawned_coroutine_thread* spawned_thread = 0;
+ callee_type callee(entry_point<decay_t<F>>(
+ static_cast<F&&>(f), &spawned_thread), attributes);
+ spawned_thread->callee_.swap(callee);
+ spawned_thread->parent_cancellation_slot_ = parent_cancel_slot;
+ spawned_thread->cancellation_state_ = cancel_state;
+ return spawned_thread;
+ }
+
+ template <typename F>
+ static spawned_thread_base* spawn(F&& f,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ return spawn(static_cast<F&&>(f), boost::coroutines::attributes(),
+ parent_cancel_slot, cancel_state);
+ }
+
+ void resume()
+ {
+ callee_();
+ if (on_suspend_fn_)
{
+ void (*fn)(void*) = on_suspend_fn_;
+ void* arg = on_suspend_arg_;
+ on_suspend_fn_ = 0;
+ fn(arg);
}
+ }
+
+ void suspend_with(void (*fn)(void*), void* arg)
+ {
+ if (throw_if_cancelled_)
+ if (!!cancellation_state_.cancelled())
+ throw_error(asio::error::operation_aborted, "yield");
+ has_context_switched_ = true;
+ on_suspend_fn_ = fn;
+ on_suspend_arg_ = arg;
+ caller_();
+ }
+
+ void destroy()
+ {
+ callee_type callee;
+ callee.swap(callee_);
+ if (terminal_)
+ callee();
+ }
- void operator()(T value)
+private:
+ template <typename Function>
+ class entry_point
+ {
+ public:
+ template <typename F>
+ entry_point(F&& f,
+ spawned_coroutine_thread** spawned_thread_out)
+ : function_(static_cast<F&&>(f)),
+ spawned_thread_out_(spawned_thread_out)
{
- *ec_ = asio::error_code();
- *value_ = ASIO_MOVE_CAST(T)(value);
- if (--*ready_ == 0)
- (*coro_)();
}
- void operator()(asio::error_code ec, T value)
+ void operator()(caller_type& caller)
{
- *ec_ = ec;
- *value_ = ASIO_MOVE_CAST(T)(value);
- if (--*ready_ == 0)
- (*coro_)();
+ Function function(static_cast<Function&&>(function_));
+ spawned_coroutine_thread spawned_thread(caller);
+ *spawned_thread_out_ = &spawned_thread;
+ spawned_thread_out_ = 0;
+ spawned_thread.suspend();
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ function(&spawned_thread);
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend();
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+ catch (const boost::coroutines::detail::forced_unwind&)
+ {
+ throw;
+ }
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend_with(spawned_thread_rethrow, &ex);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
- //private:
- shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- Handler handler_;
- atomic_count* ready_;
- asio::error_code* ec_;
- T* value_;
+ private:
+ Function function_;
+ spawned_coroutine_thread** spawned_thread_out_;
};
- template <typename Handler>
- class coro_handler<Handler, void>
+ caller_type& caller_;
+ callee_type callee_;
+ void (*on_suspend_fn_)(void*);
+ void* on_suspend_arg_;
+};
+
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+// Spawned thread implementation using Boost.Context's fiber.
+class spawned_fiber_thread : public spawned_thread_base
+{
+public:
+ typedef boost::context::fiber fiber_type;
+
+ spawned_fiber_thread(fiber_type&& caller)
+ : caller_(static_cast<fiber_type&&>(caller)),
+ on_suspend_fn_(0),
+ on_suspend_arg_(0)
{
- public:
- coro_handler(basic_yield_context<Handler> ctx)
- : coro_(ctx.coro_.lock()),
- ca_(ctx.ca_),
- handler_(ctx.handler_),
- ready_(0),
- ec_(ctx.ec_)
+ }
+
+ template <typename StackAllocator, typename F>
+ static spawned_thread_base* spawn(allocator_arg_t,
+ StackAllocator&& stack_allocator,
+ F&& f,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ spawned_fiber_thread* spawned_thread = 0;
+ fiber_type callee(allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ entry_point<decay_t<F>>(
+ static_cast<F&&>(f), &spawned_thread));
+ callee = fiber_type(static_cast<fiber_type&&>(callee)).resume();
+ spawned_thread->callee_ = static_cast<fiber_type&&>(callee);
+ spawned_thread->parent_cancellation_slot_ = parent_cancel_slot;
+ spawned_thread->cancellation_state_ = cancel_state;
+ return spawned_thread;
+ }
+
+ template <typename F>
+ static spawned_thread_base* spawn(F&& f,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ return spawn(allocator_arg_t(), boost::context::fixedsize_stack(),
+ static_cast<F&&>(f), parent_cancel_slot, cancel_state);
+ }
+
+ void resume()
+ {
+ callee_ = fiber_type(static_cast<fiber_type&&>(callee_)).resume();
+ if (on_suspend_fn_)
{
+ void (*fn)(void*) = on_suspend_fn_;
+ void* arg = on_suspend_arg_;
+ on_suspend_fn_ = 0;
+ fn(arg);
}
+ }
- void operator()()
+ void suspend_with(void (*fn)(void*), void* arg)
+ {
+ if (throw_if_cancelled_)
+ if (!!cancellation_state_.cancelled())
+ throw_error(asio::error::operation_aborted, "yield");
+ has_context_switched_ = true;
+ on_suspend_fn_ = fn;
+ on_suspend_arg_ = arg;
+ caller_ = fiber_type(static_cast<fiber_type&&>(caller_)).resume();
+ }
+
+ void destroy()
+ {
+ fiber_type callee = static_cast<fiber_type&&>(callee_);
+ if (terminal_)
+ fiber_type(static_cast<fiber_type&&>(callee)).resume();
+ }
+
+private:
+ template <typename Function>
+ class entry_point
+ {
+ public:
+ template <typename F>
+ entry_point(F&& f,
+ spawned_fiber_thread** spawned_thread_out)
+ : function_(static_cast<F&&>(f)),
+ spawned_thread_out_(spawned_thread_out)
{
- *ec_ = asio::error_code();
- if (--*ready_ == 0)
- (*coro_)();
}
- void operator()(asio::error_code ec)
+ fiber_type operator()(fiber_type&& caller)
{
- *ec_ = ec;
- if (--*ready_ == 0)
- (*coro_)();
+ Function function(static_cast<Function&&>(function_));
+ spawned_fiber_thread spawned_thread(
+ static_cast<fiber_type&&>(caller));
+ *spawned_thread_out_ = &spawned_thread;
+ spawned_thread_out_ = 0;
+ spawned_thread.suspend();
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ function(&spawned_thread);
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend();
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+ catch (const boost::context::detail::forced_unwind&)
+ {
+ throw;
+ }
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend_with(spawned_thread_rethrow, &ex);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ return static_cast<fiber_type&&>(spawned_thread.caller_);
}
- //private:
- shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- Handler handler_;
- atomic_count* ready_;
- asio::error_code* ec_;
+ private:
+ Function function_;
+ spawned_fiber_thread** spawned_thread_out_;
};
- template <typename Handler, typename T>
- inline void* asio_handler_allocate(std::size_t size,
- coro_handler<Handler, T>* this_handler)
+ fiber_type caller_;
+ fiber_type callee_;
+ void (*on_suspend_fn_)(void*);
+ void* on_suspend_arg_;
+};
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+typedef spawned_fiber_thread default_spawned_thread_type;
+#elif defined(ASIO_HAS_BOOST_COROUTINE)
+typedef spawned_coroutine_thread default_spawned_thread_type;
+#else
+# error No spawn() implementation available
+#endif
+
+// Helper class to perform the initial resume on the correct executor.
+class spawned_thread_resumer
+{
+public:
+ explicit spawned_thread_resumer(spawned_thread_base* spawned_thread)
+ : spawned_thread_(spawned_thread)
+ {
+ }
+
+ spawned_thread_resumer(spawned_thread_resumer&& other) noexcept
+ : spawned_thread_(other.spawned_thread_)
{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
+ other.spawned_thread_ = 0;
}
- template <typename Handler, typename T>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- coro_handler<Handler, T>* this_handler)
+ ~spawned_thread_resumer()
{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
+ if (spawned_thread_)
+ spawned_thread_->destroy();
}
- template <typename Handler, typename T>
- inline bool asio_handler_is_continuation(coro_handler<Handler, T>*)
+ void operator()()
{
- return true;
+ spawned_thread_->attach(&spawned_thread_);
+ spawned_thread_->resume();
}
- template <typename Function, typename Handler, typename T>
- inline void asio_handler_invoke(Function& function,
- coro_handler<Handler, T>* this_handler)
+private:
+ spawned_thread_base* spawned_thread_;
+};
+
+// Helper class to ensure spawned threads are destroyed on the correct executor.
+class spawned_thread_destroyer
+{
+public:
+ explicit spawned_thread_destroyer(spawned_thread_base* spawned_thread)
+ : spawned_thread_(spawned_thread)
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
+ spawned_thread->detach();
}
- template <typename Function, typename Handler, typename T>
- inline void asio_handler_invoke(const Function& function,
- coro_handler<Handler, T>* this_handler)
+ spawned_thread_destroyer(spawned_thread_destroyer&& other) noexcept
+ : spawned_thread_(other.spawned_thread_)
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
+ other.spawned_thread_ = 0;
}
- template <typename Handler, typename T>
- class coro_async_result
+ ~spawned_thread_destroyer()
{
- public:
- typedef coro_handler<Handler, T> completion_handler_type;
- typedef T return_type;
+ if (spawned_thread_)
+ spawned_thread_->destroy();
+ }
- explicit coro_async_result(completion_handler_type& h)
- : handler_(h),
- ca_(h.ca_),
- ready_(2)
+ void operator()()
+ {
+ if (spawned_thread_)
{
- h.ready_ = &ready_;
- out_ec_ = h.ec_;
- if (!out_ec_) h.ec_ = &ec_;
- h.value_ = &value_;
+ spawned_thread_->destroy();
+ spawned_thread_ = 0;
}
+ }
- return_type get()
- {
- // Must not hold shared_ptr to coro while suspended.
- handler_.coro_.reset();
+private:
+ spawned_thread_base* spawned_thread_;
+};
- if (--ready_ != 0)
- ca_();
- if (!out_ec_ && ec_) throw asio::system_error(ec_);
- return ASIO_MOVE_CAST(return_type)(value_);
- }
+// Base class for all completion handlers associated with a spawned thread.
+template <typename Executor>
+class spawn_handler_base
+{
+public:
+ typedef Executor executor_type;
+ typedef cancellation_slot cancellation_slot_type;
- private:
- completion_handler_type& handler_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- atomic_count ready_;
- asio::error_code* out_ec_;
- asio::error_code ec_;
- return_type value_;
- };
+ spawn_handler_base(const basic_yield_context<Executor>& yield)
+ : yield_(yield),
+ spawned_thread_(yield.spawned_thread_)
+ {
+ spawned_thread_->detach();
+ }
+
+ spawn_handler_base(spawn_handler_base&& other) noexcept
+ : yield_(other.yield_),
+ spawned_thread_(other.spawned_thread_)
- template <typename Handler>
- class coro_async_result<Handler, void>
{
- public:
- typedef coro_handler<Handler, void> completion_handler_type;
- typedef void return_type;
+ other.spawned_thread_ = 0;
+ }
- explicit coro_async_result(completion_handler_type& h)
- : handler_(h),
- ca_(h.ca_),
- ready_(2)
- {
- h.ready_ = &ready_;
- out_ec_ = h.ec_;
- if (!out_ec_) h.ec_ = &ec_;
- }
+ ~spawn_handler_base()
+ {
+ if (spawned_thread_)
+ (post)(yield_.executor_, spawned_thread_destroyer(spawned_thread_));
+ }
- void get()
- {
- // Must not hold shared_ptr to coro while suspended.
- handler_.coro_.reset();
+ executor_type get_executor() const noexcept
+ {
+ return yield_.executor_;
+ }
- if (--ready_ != 0)
- ca_();
- if (!out_ec_ && ec_) throw asio::system_error(ec_);
- }
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return spawned_thread_->get_cancellation_slot();
+ }
- private:
- completion_handler_type& handler_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- atomic_count ready_;
- asio::error_code* out_ec_;
- asio::error_code ec_;
- };
+ void resume()
+ {
+ spawned_thread_resumer resumer(spawned_thread_);
+ spawned_thread_ = 0;
+ resumer();
+ }
-} // namespace detail
+protected:
+ const basic_yield_context<Executor>& yield_;
+ spawned_thread_base* spawned_thread_;
+};
-#if !defined(GENERATING_DOCUMENTATION)
+// Completion handlers for when basic_yield_context is used as a token.
+template <typename Executor, typename Signature>
+class spawn_handler;
-template <typename Handler, typename ReturnType>
-class async_result<basic_yield_context<Handler>, ReturnType()>
- : public detail::coro_async_result<Handler, void>
+template <typename Executor, typename R>
+class spawn_handler<Executor, R()>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, void>(h)
+ typedef void return_type;
+
+ struct result_type {};
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type&)
+ : spawn_handler_base<Executor>(yield)
+ {
+ }
+
+ void operator()()
+ {
+ this->resume();
+ }
+
+ static return_type on_resume(result_type&)
{
}
};
-template <typename Handler, typename ReturnType, typename Arg1>
-class async_result<basic_yield_context<Handler>, ReturnType(Arg1)>
- : public detail::coro_async_result<Handler, typename decay<Arg1>::type>
+template <typename Executor, typename R>
+class spawn_handler<Executor, R(asio::error_code)>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- typename decay<Arg1>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, Arg1>(h)
+ typedef void return_type;
+ typedef asio::error_code* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec)
+ {
+ if (this->yield_.ec_)
+ {
+ *this->yield_.ec_ = ec;
+ result_ = 0;
+ }
+ else
+ result_ = &ec;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
{
+ if (result)
+ throw_error(*result);
}
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType>
-class async_result<basic_yield_context<Handler>,
- ReturnType(asio::error_code)>
- : public detail::coro_async_result<Handler, void>
+template <typename Executor, typename R>
+class spawn_handler<Executor, R(exception_ptr)>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, void>(h)
+ typedef void return_type;
+ typedef exception_ptr* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(exception_ptr ex)
{
+ result_ = &ex;
+ this->resume();
}
+
+ static return_type on_resume(result_type& result)
+ {
+ if (*result)
+ rethrow_exception(*result);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType, typename Arg2>
-class async_result<basic_yield_context<Handler>,
- ReturnType(asio::error_code, Arg2)>
- : public detail::coro_async_result<Handler, typename decay<Arg2>::type>
+template <typename Executor, typename R, typename T>
+class spawn_handler<Executor, R(T)>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- typename decay<Arg2>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, Arg2>(h)
+ typedef T return_type;
+ typedef return_type* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
{
}
-};
-#if !defined(ASIO_NO_DEPRECATED)
+ void operator()(T value)
+ {
+ result_ = &value;
+ this->resume();
+ }
-template <typename Handler, typename ReturnType>
-struct handler_type<basic_yield_context<Handler>, ReturnType()>
-{
- typedef detail::coro_handler<Handler, void> type;
+ static return_type on_resume(result_type& result)
+ {
+ return static_cast<return_type&&>(*result);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType, typename Arg1>
-struct handler_type<basic_yield_context<Handler>, ReturnType(Arg1)>
+template <typename Executor, typename R, typename T>
+class spawn_handler<Executor, R(asio::error_code, T)>
+ : public spawn_handler_base<Executor>
{
- typedef detail::coro_handler<Handler, typename decay<Arg1>::type> type;
+public:
+ typedef T return_type;
+
+ struct result_type
+ {
+ asio::error_code* ec_;
+ return_type* value_;
+ };
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec, T value)
+ {
+ if (this->yield_.ec_)
+ {
+ *this->yield_.ec_ = ec;
+ result_.ec_ = 0;
+ }
+ else
+ result_.ec_ = &ec;
+ result_.value_ = &value;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
+ {
+ if (result.ec_)
+ throw_error(*result.ec_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType>
-struct handler_type<basic_yield_context<Handler>,
- ReturnType(asio::error_code)>
+template <typename Executor, typename R, typename T>
+class spawn_handler<Executor, R(exception_ptr, T)>
+ : public spawn_handler_base<Executor>
{
- typedef detail::coro_handler<Handler, void> type;
+public:
+ typedef T return_type;
+
+ struct result_type
+ {
+ exception_ptr* ex_;
+ return_type* value_;
+ };
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(exception_ptr ex, T value)
+ {
+ result_.ex_ = &ex;
+ result_.value_ = &value;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
+ {
+ if (*result.ex_)
+ rethrow_exception(*result.ex_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType, typename Arg2>
-struct handler_type<basic_yield_context<Handler>,
- ReturnType(asio::error_code, Arg2)>
+template <typename Executor, typename R, typename... Ts>
+class spawn_handler<Executor, R(Ts...)>
+ : public spawn_handler_base<Executor>
{
- typedef detail::coro_handler<Handler, typename decay<Arg2>::type> type;
+public:
+ typedef std::tuple<Ts...> return_type;
+
+ typedef return_type* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ return_type value(static_cast<Args&&>(args)...);
+ result_ = &value;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
+ {
+ return static_cast<return_type&&>(*result);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename T>
-class async_result<detail::coro_handler<Handler, T> >
- : public detail::coro_async_result<Handler, T>
+template <typename Executor, typename R, typename... Ts>
+class spawn_handler<Executor, R(asio::error_code, Ts...)>
+ : public spawn_handler_base<Executor>
{
public:
- typedef typename detail::coro_async_result<Handler, T>::return_type type;
+ typedef std::tuple<Ts...> return_type;
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, T>(h)
+ struct result_type
+ {
+ asio::error_code* ec_;
+ return_type* value_;
+ };
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
{
}
-};
-#endif // !defined(ASIO_NO_DEPRECATED)
+ template <typename... Args>
+ void operator()(asio::error_code ec,
+ Args&&... args)
+ {
+ return_type value(static_cast<Args&&>(args)...);
+ if (this->yield_.ec_)
+ {
+ *this->yield_.ec_ = ec;
+ result_.ec_ = 0;
+ }
+ else
+ result_.ec_ = &ec;
+ result_.value_ = &value;
+ this->resume();
+ }
-template <typename Handler, typename T, typename Allocator>
-struct associated_allocator<detail::coro_handler<Handler, T>, Allocator>
+ static return_type on_resume(result_type& result)
+ {
+ if (result.ec_)
+ throw_error(*result.ec_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Executor, typename R, typename... Ts>
+class spawn_handler<Executor, R(exception_ptr, Ts...)>
+ : public spawn_handler_base<Executor>
{
- typedef typename associated_allocator<Handler, Allocator>::type type;
+public:
+ typedef std::tuple<Ts...> return_type;
+
+ struct result_type
+ {
+ exception_ptr* ex_;
+ return_type* value_;
+ };
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
- static type get(const detail::coro_handler<Handler, T>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ template <typename... Args>
+ void operator()(exception_ptr ex, Args&&... args)
{
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ return_type value(static_cast<Args&&>(args)...);
+ result_.ex_ = &ex;
+ result_.value_ = &value;
+ this->resume();
}
+
+ static return_type on_resume(result_type& result)
+ {
+ if (*result.ex_)
+ rethrow_exception(*result.ex_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename T, typename Executor>
-struct associated_executor<detail::coro_handler<Handler, T>, Executor>
+template <typename Executor, typename Signature>
+inline bool asio_handler_is_continuation(spawn_handler<Executor, Signature>*)
+{
+ return true;
+}
+
+} // namespace detail
+
+template <typename Executor, typename Signature>
+class async_result<basic_yield_context<Executor>, Signature>
{
- typedef typename associated_executor<Handler, Executor>::type type;
+public:
+ typedef typename detail::spawn_handler<Executor, Signature> handler_type;
+ typedef typename handler_type::return_type return_type;
+
+#if defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
- static type get(const detail::coro_handler<Handler, T>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&& init,
+ const basic_yield_context<Executor>& yield,
+ InitArgs&&... init_args)
{
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ typename handler_type::result_type result
+ = typename handler_type::result_type();
+
+ yield.spawned_thread_->suspend_with(
+ [&]()
+ {
+ static_cast<Initiation&&>(init)(
+ handler_type(yield, result),
+ static_cast<InitArgs&&>(init_args)...);
+ });
+
+ return handler_type::on_resume(result);
}
-};
-namespace detail {
+#else // defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
- template <typename Handler, typename Function>
- struct spawn_data : private noncopyable
+ template <typename Initiation, typename... InitArgs>
+ struct suspend_with_helper
{
- spawn_data(ASIO_MOVE_ARG(Handler) handler,
- bool call_handler, ASIO_MOVE_ARG(Function) function)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
- call_handler_(call_handler),
- function_(ASIO_MOVE_CAST(Function)(function))
+ typename handler_type::result_type& result_;
+ Initiation&& init_;
+ const basic_yield_context<Executor>& yield_;
+ std::tuple<InitArgs&&...> init_args_;
+
+ template <std::size_t... I>
+ void do_invoke(detail::index_sequence<I...>)
{
+ static_cast<Initiation&&>(init_)(
+ handler_type(yield_, result_),
+ static_cast<InitArgs&&>(std::get<I>(init_args_))...);
}
- weak_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- Handler handler_;
- bool call_handler_;
- Function function_;
+ void operator()()
+ {
+ this->do_invoke(detail::make_index_sequence<sizeof...(InitArgs)>());
+ }
};
- template <typename Handler, typename Function>
- struct coro_entry_point
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&& init,
+ const basic_yield_context<Executor>& yield,
+ InitArgs&&... init_args)
+ {
+ typename handler_type::result_type result
+ = typename handler_type::result_type();
+
+ yield.spawned_thread_->suspend_with(
+ suspend_with_helper<Initiation, InitArgs...>{
+ result, static_cast<Initiation&&>(init), yield,
+ std::tuple<InitArgs&&...>(
+ static_cast<InitArgs&&>(init_args)...)});
+
+ return handler_type::on_resume(result);
+ }
+
+#endif // defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+};
+
+namespace detail {
+
+template <typename Executor, typename Function, typename Handler>
+class spawn_entry_point
+{
+public:
+ template <typename F, typename H>
+ spawn_entry_point(const Executor& ex,
+ F&& f, H&& h)
+ : executor_(ex),
+ function_(static_cast<F&&>(f)),
+ handler_(static_cast<H&&>(h)),
+ work_(handler_, executor_)
+ {
+ }
+
+ void operator()(spawned_thread_base* spawned_thread)
{
- void operator()(typename basic_yield_context<Handler>::caller_type& ca)
+ const basic_yield_context<Executor> yield(spawned_thread, executor_);
+ this->call(yield,
+ void_type<result_of_t<Function(basic_yield_context<Executor>)>>());
+ }
+
+private:
+ void call(const basic_yield_context<Executor>& yield, void_type<void>)
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
{
- shared_ptr<spawn_data<Handler, Function> > data(data_);
-#if !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
- ca(); // Yield until coroutine pointer has been initialised.
-#endif // !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
- const basic_yield_context<Handler> yield(
- data->coro_, ca, data->handler_);
-
- (data->function_)(yield);
- if (data->call_handler_)
- (data->handler_)();
+ function_(yield);
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder1<Handler, exception_ptr>
+ handler(handler_, exception_ptr());
+ work_.complete(handler, handler.handler_);
}
+#if !defined(ASIO_NO_EXCEPTIONS)
+# if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+ catch (const boost::context::detail::forced_unwind&)
+ {
+ throw;
+ }
+# endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# if defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (const boost::coroutines::detail::forced_unwind&)
+ {
+ throw;
+ }
+# endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder1<Handler, exception_ptr> handler(handler_, ex);
+ work_.complete(handler, handler.handler_);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
- shared_ptr<spawn_data<Handler, Function> > data_;
- };
-
- template <typename Handler, typename Function>
- struct spawn_helper
+ template <typename T>
+ void call(const basic_yield_context<Executor>& yield, void_type<T>)
{
- void operator()()
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ T result(function_(yield));
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder2<Handler, exception_ptr, T>
+ handler(handler_, exception_ptr(), static_cast<T&&>(result));
+ work_.complete(handler, handler.handler_);
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+# if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+ catch (const boost::context::detail::forced_unwind&)
+ {
+ throw;
+ }
+# endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# if defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (const boost::coroutines::detail::forced_unwind&)
+ {
+ throw;
+ }
+# endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (...)
{
- typedef typename basic_yield_context<Handler>::callee_type callee_type;
- coro_entry_point<Handler, Function> entry_point = { data_ };
- shared_ptr<callee_type> coro(new callee_type(entry_point, attributes_));
- data_->coro_ = coro;
- (*coro)();
+ exception_ptr ex = current_exception();
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder2<Handler, exception_ptr, T> handler(handler_, ex, T());
+ work_.complete(handler, handler.handler_);
}
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
- shared_ptr<spawn_data<Handler, Function> > data_;
- boost::coroutines::attributes attributes_;
- };
+ Executor executor_;
+ Function function_;
+ Handler handler_;
+ handler_work<Handler, Executor> work_;
+};
+
+struct spawn_cancellation_signal_emitter
+{
+ cancellation_signal* signal_;
+ cancellation_type_t type_;
- template <typename Function, typename Handler, typename Function1>
- inline void asio_handler_invoke(Function& function,
- spawn_helper<Handler, Function1>* this_handler)
+ void operator()()
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->data_->handler_);
+ signal_->emit(type_);
}
+};
- template <typename Function, typename Handler, typename Function1>
- inline void asio_handler_invoke(const Function& function,
- spawn_helper<Handler, Function1>* this_handler)
+template <typename Handler, typename Executor, typename = void>
+class spawn_cancellation_handler
+{
+public:
+ spawn_cancellation_handler(const Handler&, const Executor& ex)
+ : ex_(ex)
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->data_->handler_);
}
- inline void default_spawn_handler() {}
+ cancellation_slot slot()
+ {
+ return signal_.slot();
+ }
-} // namespace detail
+ void operator()(cancellation_type_t type)
+ {
+ spawn_cancellation_signal_emitter emitter = { &signal_, type };
+ (dispatch)(ex_, emitter);
+ }
-template <typename Function>
-inline void spawn(ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes)
+private:
+ cancellation_signal signal_;
+ Executor ex_;
+};
+
+
+template <typename Handler, typename Executor>
+class spawn_cancellation_handler<Handler, Executor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
{
- typedef typename decay<Function>::type function_type;
+public:
+ spawn_cancellation_handler(const Handler&, const Executor&)
+ {
+ }
- typename associated_executor<function_type>::type ex(
- (get_associated_executor)(function));
+ cancellation_slot slot()
+ {
+ return signal_.slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ signal_.emit(type);
+ }
+
+private:
+ cancellation_signal signal_;
+};
+
+template <typename Executor>
+class initiate_spawn
+{
+public:
+ typedef Executor executor_type;
- asio::spawn(ex, ASIO_MOVE_CAST(Function)(function), attributes);
+ explicit initiate_spawn(const executor_type& ex)
+ : executor_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ template <typename Handler, typename F>
+ void operator()(Handler&& handler,
+ F&& f) const
+ {
+ typedef decay_t<Handler> handler_type;
+ typedef decay_t<F> function_type;
+ typedef spawn_cancellation_handler<
+ handler_type, Executor> cancel_handler_type;
+
+ associated_cancellation_slot_t<handler_type> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ cancel_handler_type* cancel_handler = slot.is_connected()
+ ? &slot.template emplace<cancel_handler_type>(handler, executor_)
+ : 0;
+
+ cancellation_slot proxy_slot(
+ cancel_handler
+ ? cancel_handler->slot()
+ : cancellation_slot());
+
+ cancellation_state cancel_state(proxy_slot);
+
+ (dispatch)(executor_,
+ spawned_thread_resumer(
+ default_spawned_thread_type::spawn(
+ spawn_entry_point<Executor, function_type, handler_type>(
+ executor_, static_cast<F&&>(f),
+ static_cast<Handler&&>(handler)),
+ proxy_slot, cancel_state)));
+ }
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+ template <typename Handler, typename StackAllocator, typename F>
+ void operator()(Handler&& handler, allocator_arg_t,
+ StackAllocator&& stack_allocator,
+ F&& f) const
+ {
+ typedef decay_t<Handler> handler_type;
+ typedef decay_t<F> function_type;
+ typedef spawn_cancellation_handler<
+ handler_type, Executor> cancel_handler_type;
+
+ associated_cancellation_slot_t<handler_type> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ cancel_handler_type* cancel_handler = slot.is_connected()
+ ? &slot.template emplace<cancel_handler_type>(handler, executor_)
+ : 0;
+
+ cancellation_slot proxy_slot(
+ cancel_handler
+ ? cancel_handler->slot()
+ : cancellation_slot());
+
+ cancellation_state cancel_state(proxy_slot);
+
+ (dispatch)(executor_,
+ spawned_thread_resumer(
+ spawned_fiber_thread::spawn(allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ spawn_entry_point<Executor, function_type, handler_type>(
+ executor_, static_cast<F&&>(f),
+ static_cast<Handler&&>(handler)),
+ proxy_slot, cancel_state)));
+ }
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+private:
+ executor_type executor_;
+};
+
+} // namespace detail
+
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type) CompletionToken>
+inline auto spawn(const Executor& ex, F&& function, CompletionToken&& token,
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ >,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)))
+{
+ return async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ detail::initiate_spawn<Executor>(ex),
+ token, static_cast<F&&>(function));
}
-template <typename Handler, typename Function>
-void spawn(ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes,
- typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
- !is_convertible<Handler&, execution_context&>::value>::type*)
+template <typename ExecutionContext, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type) CompletionToken>
+inline auto spawn(ExecutionContext& ctx, F&& function, CompletionToken&& token,
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ >,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, static_cast<F&&>(function)))
{
- typedef typename decay<Handler>::type handler_type;
+ return (spawn)(ctx.get_executor(), static_cast<F&&>(function),
+ static_cast<CompletionToken&&>(token));
+}
- typename associated_executor<handler_type>::type ex(
- (get_associated_executor)(handler));
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken>
+inline auto spawn(const basic_yield_context<Executor>& ctx,
+ F&& function, CompletionToken&& token,
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ >,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), static_cast<F&&>(function),
+ static_cast<CompletionToken&&>(token));
+}
- typename associated_allocator<handler_type>::type a(
- (get_associated_allocator)(handler));
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken>
+inline auto spawn(const Executor& ex, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function, CompletionToken&& token,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)))
+{
+ return async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ detail::initiate_spawn<Executor>(ex), token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function));
+}
- detail::spawn_helper<handler_type, Function> helper;
- helper.data_.reset(
- new detail::spawn_data<handler_type, Function>(
- ASIO_MOVE_CAST(Handler)(handler), true,
- ASIO_MOVE_CAST(Function)(function)));
- helper.attributes_ = attributes;
+template <typename ExecutionContext, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type) CompletionToken>
+inline auto spawn(ExecutionContext& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function, CompletionToken&& token,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function), static_cast<CompletionToken&&>(token));
+}
- ex.dispatch(helper, a);
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type) CompletionToken>
+inline auto spawn(const basic_yield_context<Executor>& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function, CompletionToken&& token,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(), token,
+ allocator_arg_t(), static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function), static_cast<CompletionToken&&>(token));
}
-template <typename Handler, typename Function>
-void spawn(basic_yield_context<Handler> ctx,
- ASIO_MOVE_ARG(Function) function,
- const boost::coroutines::attributes& attributes)
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+
+namespace detail {
+
+template <typename Executor, typename Function, typename Handler>
+class old_spawn_entry_point
{
- Handler handler(ctx.handler_); // Explicit copy that might be moved from.
+public:
+ template <typename F, typename H>
+ old_spawn_entry_point(const Executor& ex, F&& f, H&& h)
+ : executor_(ex),
+ function_(static_cast<F&&>(f)),
+ handler_(static_cast<H&&>(h))
+ {
+ }
- typename associated_executor<Handler>::type ex(
- (get_associated_executor)(handler));
+ void operator()(spawned_thread_base* spawned_thread)
+ {
+ const basic_yield_context<Executor> yield(spawned_thread, executor_);
+ this->call(yield,
+ void_type<result_of_t<Function(basic_yield_context<Executor>)>>());
+ }
- typename associated_allocator<Handler>::type a(
- (get_associated_allocator)(handler));
+private:
+ void call(const basic_yield_context<Executor>& yield, void_type<void>)
+ {
+ function_(yield);
+ static_cast<Handler&&>(handler_)();
+ }
- detail::spawn_helper<Handler, Function> helper;
- helper.data_.reset(
- new detail::spawn_data<Handler, Function>(
- ASIO_MOVE_CAST(Handler)(handler), false,
- ASIO_MOVE_CAST(Function)(function)));
- helper.attributes_ = attributes;
+ template <typename T>
+ void call(const basic_yield_context<Executor>& yield, void_type<T>)
+ {
+ static_cast<Handler&&>(handler_)(function_(yield));
+ }
- ex.dispatch(helper, a);
+ Executor executor_;
+ Function function_;
+ Handler handler_;
+};
+
+inline void default_spawn_handler() {}
+
+} // namespace detail
+
+template <typename Function>
+inline void spawn(Function&& function,
+ const boost::coroutines::attributes& attributes)
+{
+ associated_executor_t<decay_t<Function>> ex(
+ (get_associated_executor)(function));
+
+ asio::spawn(ex, static_cast<Function&&>(function), attributes);
+}
+
+template <typename Handler, typename Function>
+void spawn(Handler&& handler, Function&& function,
+ const boost::coroutines::attributes& attributes,
+ constraint_t<
+ !is_executor<decay_t<Handler>>::value &&
+ !execution::is_executor<decay_t<Handler>>::value &&
+ !is_convertible<Handler&, execution_context&>::value>)
+{
+ typedef associated_executor_t<decay_t<Handler>> executor_type;
+ executor_type ex((get_associated_executor)(handler));
+
+ (dispatch)(ex,
+ detail::spawned_thread_resumer(
+ detail::spawned_coroutine_thread::spawn(
+ detail::old_spawn_entry_point<executor_type,
+ decay_t<Function>, void (*)()>(
+ ex, static_cast<Function&&>(function),
+ &detail::default_spawn_handler), attributes)));
+}
+
+template <typename Executor, typename Function>
+void spawn(basic_yield_context<Executor> ctx, Function&& function,
+ const boost::coroutines::attributes& attributes)
+{
+ (dispatch)(ctx.get_executor(),
+ detail::spawned_thread_resumer(
+ detail::spawned_coroutine_thread::spawn(
+ detail::old_spawn_entry_point<Executor,
+ decay_t<Function>, void (*)()>(
+ ctx.get_executor(), static_cast<Function&&>(function),
+ &detail::default_spawn_handler), attributes)));
}
template <typename Function, typename Executor>
-inline void spawn(const Executor& ex,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(const Executor& ex, Function&& function,
const boost::coroutines::attributes& attributes,
- typename enable_if<is_executor<Executor>::value>::type*)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
{
asio::spawn(asio::strand<Executor>(ex),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
template <typename Function, typename Executor>
-inline void spawn(const strand<Executor>& ex,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(const strand<Executor>& ex, Function&& function,
const boost::coroutines::attributes& attributes)
{
asio::spawn(asio::bind_executor(
ex, &detail::default_spawn_handler),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
template <typename Function>
-inline void spawn(const asio::io_context::strand& s,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(const asio::io_context::strand& s, Function&& function,
const boost::coroutines::attributes& attributes)
{
asio::spawn(asio::bind_executor(
s, &detail::default_spawn_handler),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
template <typename Function, typename ExecutionContext>
-inline void spawn(ExecutionContext& ctx,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(ExecutionContext& ctx, Function&& function,
const boost::coroutines::attributes& attributes,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type*)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
{
asio::spawn(ctx.get_executor(),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
-#endif // !defined(GENERATING_DOCUMENTATION)
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/src.cpp b/3rdparty/asio/include/asio/impl/src.cpp
deleted file mode 100644
index fe56a795149..00000000000
--- a/3rdparty/asio/include/asio/impl/src.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// impl/src.cpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#if defined(_MSC_VER) \
- || defined(__BORLANDC__) \
- || defined(__DMC__)
-# pragma message ( \
- "This file is deprecated. " \
- "Please #include <asio/impl/src.hpp> instead.")
-#elif defined(__GNUC__) \
- || defined(__HP_aCC) \
- || defined(__SUNPRO_CC) \
- || defined(__IBMCPP__)
-# warning "This file is deprecated."
-# warning "Please #include <asio/impl/src.hpp> instead."
-#endif
-
-#include "asio/impl/src.hpp"
diff --git a/3rdparty/asio/include/asio/impl/src.hpp b/3rdparty/asio/include/asio/impl/src.hpp
index a22b1fb5311..28396195b06 100644
--- a/3rdparty/asio/include/asio/impl/src.hpp
+++ b/3rdparty/asio/include/asio/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/src.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,14 +19,18 @@
# error Do not compile Asio library source with ASIO_HEADER_ONLY defined
#endif
+#include "asio/impl/any_completion_executor.ipp"
+#include "asio/impl/any_io_executor.ipp"
+#include "asio/impl/cancellation_signal.ipp"
+#include "asio/impl/connect_pipe.ipp"
#include "asio/impl/error.ipp"
#include "asio/impl/error_code.ipp"
#include "asio/impl/execution_context.ipp"
#include "asio/impl/executor.ipp"
-#include "asio/impl/handler_alloc_hook.ipp"
#include "asio/impl/io_context.ipp"
+#include "asio/impl/multiple_exceptions.ipp"
#include "asio/impl/serial_port_base.ipp"
-#include "asio/impl/system_executor.ipp"
+#include "asio/impl/system_context.ipp"
#include "asio/impl/thread_pool.ipp"
#include "asio/detail/impl/buffer_sequence_adapter.ipp"
#include "asio/detail/impl/descriptor_ops.ipp"
@@ -34,15 +38,19 @@
#include "asio/detail/impl/epoll_reactor.ipp"
#include "asio/detail/impl/eventfd_select_interrupter.ipp"
#include "asio/detail/impl/handler_tracking.ipp"
+#include "asio/detail/impl/io_uring_descriptor_service.ipp"
+#include "asio/detail/impl/io_uring_file_service.ipp"
+#include "asio/detail/impl/io_uring_socket_service_base.ipp"
+#include "asio/detail/impl/io_uring_service.ipp"
#include "asio/detail/impl/kqueue_reactor.ipp"
#include "asio/detail/impl/null_event.ipp"
#include "asio/detail/impl/pipe_select_interrupter.ipp"
#include "asio/detail/impl/posix_event.ipp"
#include "asio/detail/impl/posix_mutex.ipp"
+#include "asio/detail/impl/posix_serial_port_service.ipp"
#include "asio/detail/impl/posix_thread.ipp"
#include "asio/detail/impl/posix_tss_ptr.ipp"
#include "asio/detail/impl/reactive_descriptor_service.ipp"
-#include "asio/detail/impl/reactive_serial_port_service.ipp"
#include "asio/detail/impl/reactive_socket_service_base.ipp"
#include "asio/detail/impl/resolver_service_base.ipp"
#include "asio/detail/impl/scheduler.ipp"
@@ -53,9 +61,11 @@
#include "asio/detail/impl/socket_select_interrupter.ipp"
#include "asio/detail/impl/strand_executor_service.ipp"
#include "asio/detail/impl/strand_service.ipp"
+#include "asio/detail/impl/thread_context.ipp"
#include "asio/detail/impl/throw_error.ipp"
#include "asio/detail/impl/timer_queue_ptime.ipp"
#include "asio/detail/impl/timer_queue_set.ipp"
+#include "asio/detail/impl/win_iocp_file_service.ipp"
#include "asio/detail/impl/win_iocp_handle_service.ipp"
#include "asio/detail/impl/win_iocp_io_context.ipp"
#include "asio/detail/impl/win_iocp_serial_port_service.ipp"
@@ -69,6 +79,8 @@
#include "asio/detail/impl/winrt_ssocket_service_base.ipp"
#include "asio/detail/impl/winrt_timer_scheduler.ipp"
#include "asio/detail/impl/winsock_init.ipp"
+#include "asio/execution/impl/bad_executor.ipp"
+#include "asio/experimental/impl/channel_error.ipp"
#include "asio/generic/detail/impl/endpoint.ipp"
#include "asio/ip/impl/address.ipp"
#include "asio/ip/impl/address_v4.ipp"
diff --git a/3rdparty/asio/include/asio/impl/system_context.hpp b/3rdparty/asio/include/asio/impl/system_context.hpp
new file mode 100644
index 00000000000..34b5a3a0659
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/system_context.hpp
@@ -0,0 +1,34 @@
+//
+// impl/system_context.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_SYSTEM_CONTEXT_HPP
+#define ASIO_IMPL_SYSTEM_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/system_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+inline system_context::executor_type
+system_context::get_executor() noexcept
+{
+ return system_executor();
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_SYSTEM_CONTEXT_HPP
diff --git a/3rdparty/asio/include/asio/impl/system_context.ipp b/3rdparty/asio/include/asio/impl/system_context.ipp
new file mode 100644
index 00000000000..95fda4804da
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/system_context.ipp
@@ -0,0 +1,92 @@
+//
+// impl/system_context.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_SYSTEM_CONTEXT_IPP
+#define ASIO_IMPL_SYSTEM_CONTEXT_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/system_context.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+struct system_context::thread_function
+{
+ detail::scheduler* scheduler_;
+
+ void operator()()
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+ asio::error_code ec;
+ scheduler_->run(ec);
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ std::terminate();
+ }
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+ }
+};
+
+system_context::system_context()
+ : scheduler_(add_scheduler(new detail::scheduler(*this, 0, false)))
+{
+ scheduler_.work_started();
+
+ thread_function f = { &scheduler_ };
+ num_threads_ = detail::thread::hardware_concurrency() * 2;
+ num_threads_ = num_threads_ ? num_threads_ : 2;
+ threads_.create_threads(f, num_threads_);
+}
+
+system_context::~system_context()
+{
+ scheduler_.work_finished();
+ scheduler_.stop();
+ threads_.join();
+}
+
+void system_context::stop()
+{
+ scheduler_.stop();
+}
+
+bool system_context::stopped() const noexcept
+{
+ return scheduler_.stopped();
+}
+
+void system_context::join()
+{
+ scheduler_.work_finished();
+ threads_.join();
+}
+
+detail::scheduler& system_context::add_scheduler(detail::scheduler* s)
+{
+ detail::scoped_ptr<detail::scheduler> scoped_impl(s);
+ asio::add_service<detail::scheduler>(*this, scoped_impl.get());
+ return *scoped_impl.release();
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_SYSTEM_CONTEXT_IPP
diff --git a/3rdparty/asio/include/asio/impl/system_executor.hpp b/3rdparty/asio/include/asio/impl/system_executor.hpp
index 12ca9b958d4..099b2d63ef2 100644
--- a/3rdparty/asio/include/asio/impl/system_executor.hpp
+++ b/3rdparty/asio/include/asio/impl/system_executor.hpp
@@ -2,7 +2,7 @@
// impl/system_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,46 +17,133 @@
#include "asio/detail/executor_op.hpp"
#include "asio/detail/global.hpp"
-#include "asio/detail/recycling_allocator.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/execution_context.hpp"
+#include "asio/system_context.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-inline execution_context& system_executor::context() const ASIO_NOEXCEPT
+template <typename Blocking, typename Relationship, typename Allocator>
+inline system_context&
+basic_system_executor<Blocking, Relationship, Allocator>::query(
+ execution::context_t) noexcept
{
- return detail::global<context_impl>();
+ return detail::global<system_context>();
}
-template <typename Function, typename Allocator>
-void system_executor::dispatch(
- ASIO_MOVE_ARG(Function) f, const Allocator&) const
+template <typename Blocking, typename Relationship, typename Allocator>
+inline std::size_t
+basic_system_executor<Blocking, Relationship, Allocator>::query(
+ execution::occupancy_t) const noexcept
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ return detail::global<system_context>().num_threads_;
}
-template <typename Function, typename Allocator>
-void system_executor::post(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Blocking, typename Relationship, typename Allocator>
+template <typename Function>
+inline void
+basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
+ Function&& f, execution::blocking_t::possibly_t) const
{
- context_impl& ctx = detail::global<context_impl>();
+ // Obtain a non-const instance of the function.
+ detail::non_const_lvalue<Function> f2(f);
+
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<decay_t<Function>&&>(f2.value)();
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ std::terminate();
+ }
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+}
+
+template <typename Blocking, typename Relationship, typename Allocator>
+template <typename Function>
+inline void
+basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
+ Function&& f, execution::blocking_t::always_t) const
+{
+ // Obtain a non-const instance of the function.
+ detail::non_const_lvalue<Function> f2(f);
+
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<decay_t<Function>&&>(f2.value)();
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ std::terminate();
+ }
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+}
+
+template <typename Blocking, typename Relationship, typename Allocator>
+template <typename Function>
+void basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
+ Function&& f, execution::blocking_t::never_t) const
+{
+ system_context& ctx = detail::global<system_context>();
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<decay_t<Function>, Allocator> op;
+ typename op::ptr p = { detail::addressof(allocator_),
+ op::ptr::allocate(allocator_), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), allocator_);
+
+ if (is_same<Relationship, execution::relationship_t::continuation_t>::value)
+ {
+ ASIO_HANDLER_CREATION((ctx, *p.p,
+ "system_executor", &ctx, 0, "execute(blk=never,rel=cont)"));
+ }
+ else
+ {
+ ASIO_HANDLER_CREATION((ctx, *p.p,
+ "system_executor", &ctx, 0, "execute(blk=never,rel=fork)"));
+ }
+
+ ctx.scheduler_.post_immediate_completion(p.p,
+ is_same<Relationship, execution::relationship_t::continuation_t>::value);
+ p.v = p.p = 0;
+}
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+#if !defined(ASIO_NO_TS_EXECUTORS)
+template <typename Blocking, typename Relationship, typename Allocator>
+inline system_context& basic_system_executor<
+ Blocking, Relationship, Allocator>::context() const noexcept
+{
+ return detail::global<system_context>();
+}
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+template <typename Blocking, typename Relationship, typename Allocator>
+template <typename Function, typename OtherAllocator>
+void basic_system_executor<Blocking, Relationship, Allocator>::dispatch(
+ Function&& f, const OtherAllocator&) const
+{
+ decay_t<Function>(static_cast<Function&&>(f))();
+}
+
+template <typename Blocking, typename Relationship, typename Allocator>
+template <typename Function, typename OtherAllocator>
+void basic_system_executor<Blocking, Relationship, Allocator>::post(
+ Function&& f, const OtherAllocator& a) const
+{
+ system_context& ctx = detail::global<system_context>();
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<decay_t<Function>, OtherAllocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((ctx, *p.p,
"system_executor", &this->context(), 0, "post"));
@@ -65,25 +152,17 @@ void system_executor::post(
p.v = p.p = 0;
}
-template <typename Function, typename Allocator>
-void system_executor::defer(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Blocking, typename Relationship, typename Allocator>
+template <typename Function, typename OtherAllocator>
+void basic_system_executor<Blocking, Relationship, Allocator>::defer(
+ Function&& f, const OtherAllocator& a) const
{
- context_impl& ctx = detail::global<context_impl>();
-
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
-
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+ system_context& ctx = detail::global<system_context>();
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<decay_t<Function>, OtherAllocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((ctx, *p.p,
"system_executor", &this->context(), 0, "defer"));
@@ -91,6 +170,7 @@ void system_executor::defer(
ctx.scheduler_.post_immediate_completion(p.p, true);
p.v = p.p = 0;
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/system_executor.ipp b/3rdparty/asio/include/asio/impl/system_executor.ipp
deleted file mode 100644
index 6e5b16e73b7..00000000000
--- a/3rdparty/asio/include/asio/impl/system_executor.ipp
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// impl/system_executor.ipp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_IMPL_SYSTEM_EXECUTOR_IPP
-#define ASIO_IMPL_SYSTEM_EXECUTOR_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/system_executor.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-struct system_executor::thread_function
-{
- detail::scheduler* scheduler_;
-
- void operator()()
- {
- asio::error_code ec;
- scheduler_->run(ec);
- }
-};
-
-system_executor::context_impl::context_impl()
- : scheduler_(use_service<detail::scheduler>(*this))
-{
- scheduler_.work_started();
-
- thread_function f = { &scheduler_ };
- std::size_t num_threads = detail::thread::hardware_concurrency() * 2;
- threads_.create_threads(f, num_threads ? num_threads : 2);
-}
-
-system_executor::context_impl::~context_impl()
-{
- scheduler_.work_finished();
- scheduler_.stop();
- threads_.join();
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_SYSTEM_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/impl/thread_pool.hpp b/3rdparty/asio/include/asio/impl/thread_pool.hpp
index db7d5c01e36..3aed249781a 100644
--- a/3rdparty/asio/include/asio/impl/thread_pool.hpp
+++ b/3rdparty/asio/include/asio/impl/thread_pool.hpp
@@ -2,7 +2,7 @@
// impl/thread_pool.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,9 +15,10 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include "asio/detail/blocking_executor_op.hpp"
#include "asio/detail/executor_op.hpp"
#include "asio/detail/fenced_block.hpp"
-#include "asio/detail/recycling_allocator.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
@@ -26,117 +27,248 @@
namespace asio {
inline thread_pool::executor_type
-thread_pool::get_executor() ASIO_NOEXCEPT
+thread_pool::get_executor() noexcept
{
return executor_type(*this);
}
-inline thread_pool&
-thread_pool::executor_type::context() const ASIO_NOEXCEPT
+inline thread_pool::executor_type
+thread_pool::executor() noexcept
{
- return pool_;
+ return executor_type(*this);
}
-inline void
-thread_pool::executor_type::on_work_started() const ASIO_NOEXCEPT
+template <typename Allocator, unsigned int Bits>
+thread_pool::basic_executor_type<Allocator, Bits>&
+thread_pool::basic_executor_type<Allocator, Bits>::operator=(
+ const basic_executor_type& other) noexcept
{
- pool_.scheduler_.work_started();
+ if (this != &other)
+ {
+ thread_pool* old_thread_pool = pool_;
+ pool_ = other.pool_;
+ allocator_ = other.allocator_;
+ bits_ = other.bits_;
+ if (Bits & outstanding_work_tracked)
+ {
+ if (pool_)
+ pool_->scheduler_.work_started();
+ if (old_thread_pool)
+ old_thread_pool->scheduler_.work_finished();
+ }
+ }
+ return *this;
}
-inline void thread_pool::executor_type::on_work_finished()
-const ASIO_NOEXCEPT
+template <typename Allocator, unsigned int Bits>
+thread_pool::basic_executor_type<Allocator, Bits>&
+thread_pool::basic_executor_type<Allocator, Bits>::operator=(
+ basic_executor_type&& other) noexcept
{
- pool_.scheduler_.work_finished();
+ if (this != &other)
+ {
+ thread_pool* old_thread_pool = pool_;
+ pool_ = other.pool_;
+ allocator_ = std::move(other.allocator_);
+ bits_ = other.bits_;
+ if (Bits & outstanding_work_tracked)
+ {
+ other.pool_ = 0;
+ if (old_thread_pool)
+ old_thread_pool->scheduler_.work_finished();
+ }
+ }
+ return *this;
}
-template <typename Function, typename Allocator>
-void thread_pool::executor_type::dispatch(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Allocator, unsigned int Bits>
+inline bool thread_pool::basic_executor_type<Allocator,
+ Bits>::running_in_this_thread() const noexcept
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ return pool_->scheduler_.can_dispatch();
+}
- // Invoke immediately if we are already inside the thread pool.
- if (pool_.scheduler_.can_dispatch())
+template <typename Allocator, unsigned int Bits>
+template <typename Function>
+void thread_pool::basic_executor_type<Allocator,
+ Bits>::do_execute(Function&& f, false_type) const
+{
+ typedef decay_t<Function> function_type;
+
+ // Invoke immediately if the blocking.possibly property is enabled and we are
+ // already inside the thread pool.
+ if ((bits_ & blocking_never) == 0 && pool_->scheduler_.can_dispatch())
{
- detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
- return;
- }
+ // Make a local, non-const copy of the function.
+ function_type tmp(static_cast<Function&&>(f));
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<function_type&&>(tmp)();
+ return;
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ pool_->scheduler_.capture_current_exception();
+ return;
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<function_type, Allocator> op;
+ typename op::ptr p = { detail::addressof(allocator_),
+ op::ptr::allocate(allocator_), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), allocator_);
- ASIO_HANDLER_CREATION((pool_, *p.p,
- "thread_pool", &this->context(), 0, "dispatch"));
+ if ((bits_ & relationship_continuation) != 0)
+ {
+ ASIO_HANDLER_CREATION((*pool_, *p.p,
+ "thread_pool", pool_, 0, "execute(blk=never,rel=cont)"));
+ }
+ else
+ {
+ ASIO_HANDLER_CREATION((*pool_, *p.p,
+ "thread_pool", pool_, 0, "execute(blk=never,rel=fork)"));
+ }
- pool_.scheduler_.post_immediate_completion(p.p, false);
+ pool_->scheduler_.post_immediate_completion(p.p,
+ (bits_ & relationship_continuation) != 0);
p.v = p.p = 0;
}
-template <typename Function, typename Allocator>
-void thread_pool::executor_type::post(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Allocator, unsigned int Bits>
+template <typename Function>
+void thread_pool::basic_executor_type<Allocator,
+ Bits>::do_execute(Function&& f, true_type) const
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ // Obtain a non-const instance of the function.
+ detail::non_const_lvalue<Function> f2(f);
+
+ // Invoke immediately if we are already inside the thread pool.
+ if (pool_->scheduler_.can_dispatch())
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<decay_t<Function>&&>(f2.value)();
+ return;
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ std::terminate();
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+ // Construct an operation to wrap the function.
+ typedef decay_t<Function> function_type;
+ detail::blocking_executor_op<function_type> op(f2.value);
+
+ ASIO_HANDLER_CREATION((*pool_, op,
+ "thread_pool", pool_, 0, "execute(blk=always)"));
+
+ pool_->scheduler_.post_immediate_completion(&op, false);
+ op.wait();
+}
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+template <typename Allocator, unsigned int Bits>
+inline thread_pool& thread_pool::basic_executor_type<
+ Allocator, Bits>::context() const noexcept
+{
+ return *pool_;
+}
+
+template <typename Allocator, unsigned int Bits>
+inline void thread_pool::basic_executor_type<Allocator,
+ Bits>::on_work_started() const noexcept
+{
+ pool_->scheduler_.work_started();
+}
+
+template <typename Allocator, unsigned int Bits>
+inline void thread_pool::basic_executor_type<Allocator,
+ Bits>::on_work_finished() const noexcept
+{
+ pool_->scheduler_.work_finished();
+}
+
+template <typename Allocator, unsigned int Bits>
+template <typename Function, typename OtherAllocator>
+void thread_pool::basic_executor_type<Allocator, Bits>::dispatch(
+ Function&& f, const OtherAllocator& a) const
+{
+ typedef decay_t<Function> function_type;
+
+ // Invoke immediately if we are already inside the thread pool.
+ if (pool_->scheduler_.can_dispatch())
+ {
+ // Make a local, non-const copy of the function.
+ function_type tmp(static_cast<Function&&>(f));
+
+ detail::fenced_block b(detail::fenced_block::full);
+ static_cast<function_type&&>(tmp)();
+ return;
+ }
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<function_type, OtherAllocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((pool_, *p.p,
- "thread_pool", &this->context(), 0, "post"));
+ ASIO_HANDLER_CREATION((*pool_, *p.p,
+ "thread_pool", pool_, 0, "dispatch"));
- pool_.scheduler_.post_immediate_completion(p.p, false);
+ pool_->scheduler_.post_immediate_completion(p.p, false);
p.v = p.p = 0;
}
-template <typename Function, typename Allocator>
-void thread_pool::executor_type::defer(
- ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+template <typename Allocator, unsigned int Bits>
+template <typename Function, typename OtherAllocator>
+void thread_pool::basic_executor_type<Allocator, Bits>::post(
+ Function&& f, const OtherAllocator& a) const
{
- // Make a local, non-const copy of the function.
- typedef typename decay<Function>::type function_type;
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
-
- // Construct an allocator to be used for the operation.
- typedef typename detail::get_recycling_allocator<Allocator>::type alloc_type;
- alloc_type allocator(detail::get_recycling_allocator<Allocator>::get(a));
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, alloc_type> op;
- typename op::ptr p = { allocator, 0, 0 };
- p.v = p.a.allocate(1);
- p.p = new (p.v) op(tmp, allocator);
+ typedef detail::executor_op<function_type, OtherAllocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((pool_, *p.p,
- "thread_pool", &this->context(), 0, "defer"));
+ ASIO_HANDLER_CREATION((*pool_, *p.p,
+ "thread_pool", pool_, 0, "post"));
- pool_.scheduler_.post_immediate_completion(p.p, true);
+ pool_->scheduler_.post_immediate_completion(p.p, false);
p.v = p.p = 0;
}
-inline bool
-thread_pool::executor_type::running_in_this_thread() const ASIO_NOEXCEPT
+template <typename Allocator, unsigned int Bits>
+template <typename Function, typename OtherAllocator>
+void thread_pool::basic_executor_type<Allocator, Bits>::defer(
+ Function&& f, const OtherAllocator& a) const
{
- return pool_.scheduler_.can_dispatch();
+ typedef decay_t<Function> function_type;
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<function_type, OtherAllocator> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
+
+ ASIO_HANDLER_CREATION((*pool_, *p.p,
+ "thread_pool", pool_, 0, "defer"));
+
+ pool_->scheduler_.post_immediate_completion(p.p, true);
+ p.v = p.p = 0;
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/thread_pool.ipp b/3rdparty/asio/include/asio/impl/thread_pool.ipp
index f56b94acb40..3f327e4610b 100644
--- a/3rdparty/asio/include/asio/impl/thread_pool.ipp
+++ b/3rdparty/asio/include/asio/impl/thread_pool.ipp
@@ -2,7 +2,7 @@
// impl/thread_pool.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,7 +16,9 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <stdexcept>
#include "asio/thread_pool.hpp"
+#include "asio/detail/throw_exception.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,34 +30,75 @@ struct thread_pool::thread_function
void operator()()
{
- asio::error_code ec;
- scheduler_->run(ec);
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+ {
+#endif// !defined(ASIO_NO_EXCEPTIONS)
+ asio::error_code ec;
+ scheduler_->run(ec);
+#if !defined(ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ std::terminate();
+ }
+#endif// !defined(ASIO_NO_EXCEPTIONS)
}
};
+#if !defined(ASIO_NO_TS_EXECUTORS)
+namespace detail {
+
+inline long default_thread_pool_size()
+{
+ std::size_t num_threads = thread::hardware_concurrency() * 2;
+ num_threads = num_threads == 0 ? 2 : num_threads;
+ return static_cast<long>(num_threads);
+}
+
+} // namespace detail
+
thread_pool::thread_pool()
- : scheduler_(use_service<detail::scheduler>(*this))
+ : scheduler_(add_scheduler(new detail::scheduler(*this, 0, false))),
+ num_threads_(detail::default_thread_pool_size())
{
scheduler_.work_started();
thread_function f = { &scheduler_ };
- std::size_t num_threads = detail::thread::hardware_concurrency() * 2;
- threads_.create_threads(f, num_threads ? num_threads : 2);
+ threads_.create_threads(f, static_cast<std::size_t>(num_threads_));
+}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+namespace detail {
+
+inline long clamp_thread_pool_size(std::size_t n)
+{
+ if (n > 0x7FFFFFFF)
+ {
+ std::out_of_range ex("thread pool size");
+ asio::detail::throw_exception(ex);
+ }
+ return static_cast<long>(n & 0x7FFFFFFF);
}
+} // namespace detail
+
thread_pool::thread_pool(std::size_t num_threads)
- : scheduler_(use_service<detail::scheduler>(*this))
+ : scheduler_(add_scheduler(new detail::scheduler(
+ *this, num_threads == 1 ? 1 : 0, false))),
+ num_threads_(detail::clamp_thread_pool_size(num_threads))
{
scheduler_.work_started();
thread_function f = { &scheduler_ };
- threads_.create_threads(f, num_threads);
+ threads_.create_threads(f, static_cast<std::size_t>(num_threads_));
}
thread_pool::~thread_pool()
{
stop();
join();
+ shutdown();
}
void thread_pool::stop()
@@ -63,8 +106,31 @@ void thread_pool::stop()
scheduler_.stop();
}
+void thread_pool::attach()
+{
+ ++num_threads_;
+ thread_function f = { &scheduler_ };
+ f();
+}
+
void thread_pool::join()
{
+ if (num_threads_)
+ scheduler_.work_finished();
+
+ if (!threads_.empty())
+ threads_.join();
+}
+
+detail::scheduler& thread_pool::add_scheduler(detail::scheduler* s)
+{
+ detail::scoped_ptr<detail::scheduler> scoped_impl(s);
+ asio::add_service<detail::scheduler>(*this, scoped_impl.get());
+ return *scoped_impl.release();
+}
+
+void thread_pool::wait()
+{
scheduler_.work_finished();
threads_.join();
}
diff --git a/3rdparty/asio/include/asio/impl/use_awaitable.hpp b/3rdparty/asio/include/asio/impl/use_awaitable.hpp
new file mode 100644
index 00000000000..3cd95165c4f
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/use_awaitable.hpp
@@ -0,0 +1,301 @@
+//
+// impl/use_awaitable.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IMPL_USE_AWAITABLE_HPP
+#define ASIO_IMPL_USE_AWAITABLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/async_result.hpp"
+#include "asio/cancellation_signal.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Executor, typename T>
+class awaitable_handler_base
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef void result_type;
+ typedef awaitable<T, Executor> awaitable_type;
+
+ // Construct from the entry point of a new thread of execution.
+ awaitable_handler_base(awaitable<awaitable_thread_entry_point, Executor> a,
+ const Executor& ex, cancellation_slot pcs, cancellation_state cs)
+ : awaitable_thread<Executor>(std::move(a), ex, pcs, cs)
+ {
+ }
+
+ // Transfer ownership from another awaitable_thread.
+ explicit awaitable_handler_base(awaitable_thread<Executor>* h)
+ : awaitable_thread<Executor>(std::move(*h))
+ {
+ }
+
+protected:
+ awaitable_frame<T, Executor>* frame() noexcept
+ {
+ return static_cast<awaitable_frame<T, Executor>*>(
+ this->entry_point()->top_of_stack_);
+ }
+};
+
+template <typename, typename...>
+class awaitable_handler;
+
+template <typename Executor>
+class awaitable_handler<Executor>
+ : public awaitable_handler_base<Executor, void>
+{
+public:
+ using awaitable_handler_base<Executor, void>::awaitable_handler_base;
+
+ void operator()()
+ {
+ this->frame()->attach_thread(this);
+ this->frame()->return_void();
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor>
+class awaitable_handler<Executor, asio::error_code>
+ : public awaitable_handler_base<Executor, void>
+{
+public:
+ using awaitable_handler_base<Executor, void>::awaitable_handler_base;
+
+ void operator()(const asio::error_code& ec)
+ {
+ this->frame()->attach_thread(this);
+ if (ec)
+ this->frame()->set_error(ec);
+ else
+ this->frame()->return_void();
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor>
+class awaitable_handler<Executor, std::exception_ptr>
+ : public awaitable_handler_base<Executor, void>
+{
+public:
+ using awaitable_handler_base<Executor, void>::awaitable_handler_base;
+
+ void operator()(std::exception_ptr ex)
+ {
+ this->frame()->attach_thread(this);
+ if (ex)
+ this->frame()->set_except(ex);
+ else
+ this->frame()->return_void();
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename T>
+class awaitable_handler<Executor, T>
+ : public awaitable_handler_base<Executor, T>
+{
+public:
+ using awaitable_handler_base<Executor, T>::awaitable_handler_base;
+
+ template <typename Arg>
+ void operator()(Arg&& arg)
+ {
+ this->frame()->attach_thread(this);
+ this->frame()->return_value(std::forward<Arg>(arg));
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename T>
+class awaitable_handler<Executor, asio::error_code, T>
+ : public awaitable_handler_base<Executor, T>
+{
+public:
+ using awaitable_handler_base<Executor, T>::awaitable_handler_base;
+
+ template <typename Arg>
+ void operator()(const asio::error_code& ec, Arg&& arg)
+ {
+ this->frame()->attach_thread(this);
+ if (ec)
+ this->frame()->set_error(ec);
+ else
+ this->frame()->return_value(std::forward<Arg>(arg));
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename T>
+class awaitable_handler<Executor, std::exception_ptr, T>
+ : public awaitable_handler_base<Executor, T>
+{
+public:
+ using awaitable_handler_base<Executor, T>::awaitable_handler_base;
+
+ template <typename Arg>
+ void operator()(std::exception_ptr ex, Arg&& arg)
+ {
+ this->frame()->attach_thread(this);
+ if (ex)
+ this->frame()->set_except(ex);
+ else
+ this->frame()->return_value(std::forward<Arg>(arg));
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename... Ts>
+class awaitable_handler
+ : public awaitable_handler_base<Executor, std::tuple<Ts...>>
+{
+public:
+ using awaitable_handler_base<Executor,
+ std::tuple<Ts...>>::awaitable_handler_base;
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ this->frame()->attach_thread(this);
+ this->frame()->return_values(std::forward<Args>(args)...);
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename... Ts>
+class awaitable_handler<Executor, asio::error_code, Ts...>
+ : public awaitable_handler_base<Executor, std::tuple<Ts...>>
+{
+public:
+ using awaitable_handler_base<Executor,
+ std::tuple<Ts...>>::awaitable_handler_base;
+
+ template <typename... Args>
+ void operator()(const asio::error_code& ec, Args&&... args)
+ {
+ this->frame()->attach_thread(this);
+ if (ec)
+ this->frame()->set_error(ec);
+ else
+ this->frame()->return_values(std::forward<Args>(args)...);
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+template <typename Executor, typename... Ts>
+class awaitable_handler<Executor, std::exception_ptr, Ts...>
+ : public awaitable_handler_base<Executor, std::tuple<Ts...>>
+{
+public:
+ using awaitable_handler_base<Executor,
+ std::tuple<Ts...>>::awaitable_handler_base;
+
+ template <typename... Args>
+ void operator()(std::exception_ptr ex, Args&&... args)
+ {
+ this->frame()->attach_thread(this);
+ if (ex)
+ this->frame()->set_except(ex);
+ else
+ this->frame()->return_values(std::forward<Args>(args)...);
+ this->frame()->clear_cancellation_slot();
+ this->frame()->pop_frame();
+ this->pump();
+ }
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#if defined(_MSC_VER)
+template <typename T>
+T dummy_return()
+{
+ return std::move(*static_cast<T*>(nullptr));
+}
+
+template <>
+inline void dummy_return()
+{
+}
+#endif // defined(_MSC_VER)
+
+template <typename Executor, typename R, typename... Args>
+class async_result<use_awaitable_t<Executor>, R(Args...)>
+{
+public:
+ typedef typename detail::awaitable_handler<
+ Executor, decay_t<Args>...> handler_type;
+ typedef typename handler_type::awaitable_type return_type;
+
+ template <typename Initiation, typename... InitArgs>
+#if defined(__APPLE_CC__) && (__clang_major__ == 13)
+ __attribute__((noinline))
+#endif // defined(__APPLE_CC__) && (__clang_major__ == 13)
+ static handler_type* do_init(
+ detail::awaitable_frame_base<Executor>* frame, Initiation& initiation,
+ use_awaitable_t<Executor> u, InitArgs&... args)
+ {
+ (void)u;
+ ASIO_HANDLER_LOCATION((u.file_name_, u.line_, u.function_name_));
+ handler_type handler(frame->detach_thread());
+ std::move(initiation)(std::move(handler), std::move(args)...);
+ return nullptr;
+ }
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation initiation,
+ use_awaitable_t<Executor> u, InitArgs... args)
+ {
+ co_await [&] (auto* frame)
+ {
+ return do_init(frame, initiation, u, args...);
+ };
+
+ for (;;) {} // Never reached.
+#if defined(_MSC_VER)
+ co_return dummy_return<typename return_type::value_type>();
+#endif // defined(_MSC_VER)
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_USE_AWAITABLE_HPP
diff --git a/3rdparty/asio/include/asio/impl/use_future.hpp b/3rdparty/asio/include/asio/impl/use_future.hpp
index e06c4001742..579b93f5f30 100644
--- a/3rdparty/asio/include/asio/impl/use_future.hpp
+++ b/3rdparty/asio/include/asio/impl/use_future.hpp
@@ -2,7 +2,7 @@
// impl/use_future.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,11 +16,12 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <future>
#include <tuple>
#include "asio/async_result.hpp"
#include "asio/detail/memory.hpp"
+#include "asio/dispatch.hpp"
#include "asio/error_code.hpp"
+#include "asio/execution.hpp"
#include "asio/packaged_task.hpp"
#include "asio/system_error.hpp"
#include "asio/system_executor.hpp"
@@ -30,17 +31,15 @@
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename F, typename... Args>
inline void promise_invoke_and_set(std::promise<T>& p,
- F& f, ASIO_MOVE_ARG(Args)... args)
+ F& f, Args&&... args)
{
#if !defined(ASIO_NO_EXCEPTIONS)
try
#endif // !defined(ASIO_NO_EXCEPTIONS)
{
- p.set_value(f(ASIO_MOVE_CAST(Args)(args)...));
+ p.set_value(f(static_cast<Args&&>(args)...));
}
#if !defined(ASIO_NO_EXCEPTIONS)
catch (...)
@@ -52,13 +51,13 @@ inline void promise_invoke_and_set(std::promise<T>& p,
template <typename F, typename... Args>
inline void promise_invoke_and_set(std::promise<void>& p,
- F& f, ASIO_MOVE_ARG(Args)... args)
+ F& f, Args&&... args)
{
#if !defined(ASIO_NO_EXCEPTIONS)
try
#endif // !defined(ASIO_NO_EXCEPTIONS)
{
- f(ASIO_MOVE_CAST(Args)(args)...);
+ f(static_cast<Args&&>(args)...);
p.set_value();
}
#if !defined(ASIO_NO_EXCEPTIONS)
@@ -69,112 +68,15 @@ inline void promise_invoke_and_set(std::promise<void>& p,
#endif // !defined(ASIO_NO_EXCEPTIONS)
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename F>
-inline void promise_invoke_and_set(std::promise<T>& p, F& f)
-{
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- {
- p.set_value(f());
- }
-#if !defined(ASIO_NO_EXCEPTIONS)
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
-}
-
-template <typename F, typename Args>
-inline void promise_invoke_and_set(std::promise<void>& p, F& f)
-{
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- {
- f();
- p.set_value();
-#if !defined(ASIO_NO_EXCEPTIONS)
- }
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
-}
-
-#if defined(ASIO_NO_EXCEPTIONS)
-
-#define ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
- template <typename T, typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<T>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- p.set_value(f(ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- \
- template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<void>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- f(ASIO_VARIADIC_MOVE_ARGS(n)); \
- p.set_value(); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_INVOKE_DEF)
-#undef ASIO_PRIVATE_PROMISE_INVOKE_DEF
-
-#else // defined(ASIO_NO_EXCEPTIONS)
-
-#define ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
- template <typename T, typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<T>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- try \
- { \
- p.set_value(f(ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- catch (...) \
- { \
- p.set_exception(std::current_exception()); \
- } \
- } \
- \
- template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<void>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- try \
- { \
- f(ASIO_VARIADIC_MOVE_ARGS(n)); \
- p.set_value(); \
- } \
- catch (...) \
- { \
- p.set_exception(std::current_exception()); \
- } \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_INVOKE_DEF)
-#undef ASIO_PRIVATE_PROMISE_INVOKE_DEF
-
-#endif // defined(ASIO_NO_EXCEPTIONS)
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
// A function object adapter to invoke a nullary function object and capture
// any exception thrown into a promise.
template <typename T, typename F>
class promise_invoker
{
public:
- promise_invoker(const shared_ptr<std::promise<T> >& p,
- ASIO_MOVE_ARG(F) f)
- : p_(p), f_(f)
+ promise_invoker(const shared_ptr<std::promise<T>>& p,
+ F&& f)
+ : p_(p), f_(static_cast<F&&>(f))
{
}
@@ -195,63 +97,94 @@ public:
}
private:
- shared_ptr<std::promise<T> > p_;
- typename decay<F>::type f_;
+ shared_ptr<std::promise<T>> p_;
+ decay_t<F> f_;
};
// An executor that adapts the system_executor to capture any exeption thrown
// by a submitted function object and save it into a promise.
-template <typename T>
+template <typename T, typename Blocking = execution::blocking_t::possibly_t>
class promise_executor
{
public:
- explicit promise_executor(const shared_ptr<std::promise<T> >& p)
+ explicit promise_executor(const shared_ptr<std::promise<T>>& p)
: p_(p)
{
}
- execution_context& context() const ASIO_NOEXCEPT
+ execution_context& query(execution::context_t) const noexcept
+ {
+ return asio::query(system_executor(), execution::context);
+ }
+
+ static constexpr Blocking query(execution::blocking_t)
+ {
+ return Blocking();
+ }
+
+ promise_executor<T, execution::blocking_t::possibly_t>
+ require(execution::blocking_t::possibly_t) const
+ {
+ return promise_executor<T, execution::blocking_t::possibly_t>(p_);
+ }
+
+ promise_executor<T, execution::blocking_t::never_t>
+ require(execution::blocking_t::never_t) const
+ {
+ return promise_executor<T, execution::blocking_t::never_t>(p_);
+ }
+
+ template <typename F>
+ void execute(F&& f) const
+ {
+ asio::require(system_executor(), Blocking()).execute(
+ promise_invoker<T, F>(p_, static_cast<F&&>(f)));
+ }
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ execution_context& context() const noexcept
{
return system_executor().context();
}
- void on_work_started() const ASIO_NOEXCEPT {}
- void on_work_finished() const ASIO_NOEXCEPT {}
+ void on_work_started() const noexcept {}
+ void on_work_finished() const noexcept {}
template <typename F, typename A>
- void dispatch(ASIO_MOVE_ARG(F) f, const A&) const
+ void dispatch(F&& f, const A&) const
{
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f))();
+ promise_invoker<T, F>(p_, static_cast<F&&>(f))();
}
template <typename F, typename A>
- void post(ASIO_MOVE_ARG(F) f, const A& a) const
+ void post(F&& f, const A& a) const
{
system_executor().post(
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)), a);
+ promise_invoker<T, F>(p_, static_cast<F&&>(f)), a);
}
template <typename F, typename A>
- void defer(ASIO_MOVE_ARG(F) f, const A& a) const
+ void defer(F&& f, const A& a) const
{
system_executor().defer(
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)), a);
+ promise_invoker<T, F>(p_, static_cast<F&&>(f)), a);
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
friend bool operator==(const promise_executor& a,
- const promise_executor& b) ASIO_NOEXCEPT
+ const promise_executor& b) noexcept
{
return a.p_ == b.p_;
}
friend bool operator!=(const promise_executor& a,
- const promise_executor& b) ASIO_NOEXCEPT
+ const promise_executor& b) noexcept
{
return a.p_ != b.p_;
}
private:
- shared_ptr<std::promise<T> > p_;
+ shared_ptr<std::promise<T>> p_;
};
// The base class for all completion handlers that create promises.
@@ -261,7 +194,7 @@ class promise_creator
public:
typedef promise_executor<T> executor_type;
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return executor_type(p_);
}
@@ -277,13 +210,11 @@ protected:
template <typename Allocator>
void create_promise(const Allocator& a)
{
- p_ = std::allocate_shared<std::promise<T>>(
- typename Allocator::template rebind<char>::other(a),
- std::allocator_arg,
- typename Allocator::template rebind<char>::other(a));
+ ASIO_REBIND_ALLOC(Allocator, char) b(a);
+ p_ = std::allocate_shared<std::promise<T>>(b, std::allocator_arg, b);
}
- shared_ptr<std::promise<T> > p_;
+ shared_ptr<std::promise<T>> p_;
};
// For completion signature void().
@@ -342,9 +273,9 @@ class promise_handler_1
{
public:
template <typename Arg>
- void operator()(ASIO_MOVE_ARG(Arg) arg)
+ void operator()(Arg&& arg)
{
- this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+ this->p_->set_value(static_cast<Arg&&>(arg));
}
};
@@ -356,7 +287,7 @@ class promise_handler_ec_1
public:
template <typename Arg>
void operator()(const asio::error_code& ec,
- ASIO_MOVE_ARG(Arg) arg)
+ Arg&& arg)
{
if (ec)
{
@@ -365,7 +296,7 @@ public:
asio::system_error(ec)));
}
else
- this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+ this->p_->set_value(static_cast<Arg&&>(arg));
}
};
@@ -377,12 +308,12 @@ class promise_handler_ex_1
public:
template <typename Arg>
void operator()(const std::exception_ptr& ex,
- ASIO_MOVE_ARG(Arg) arg)
+ Arg&& arg)
{
if (ex)
this->p_->set_exception(ex);
else
- this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+ this->p_->set_value(static_cast<Arg&&>(arg));
}
};
@@ -392,31 +323,13 @@ class promise_handler_n
: public promise_creator<T>
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
+ void operator()(Args&&... args)
{
this->p_->set_value(
std::forward_as_tuple(
- ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Args&&>(args)...));
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- this->p_->set_value( \
- std::forward_as_tuple( \
- ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
// For completion signature void(error_code, T1, ..., Tn);
@@ -425,11 +338,8 @@ class promise_handler_ec_n
: public promise_creator<T>
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
- void operator()(const asio::error_code& ec,
- ASIO_MOVE_ARG(Args)... args)
+ void operator()(const asio::error_code& ec, Args&&... args)
{
if (ec)
{
@@ -441,35 +351,9 @@ public:
{
this->p_->set_value(
std::forward_as_tuple(
- ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Args&&>(args)...));
}
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const asio::error_code& ec, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- if (ec) \
- { \
- this->p_->set_exception( \
- std::make_exception_ptr( \
- asio::system_error(ec))); \
- } \
- else \
- { \
- this->p_->set_value( \
- std::forward_as_tuple( \
- ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
// For completion signature void(exception_ptr, T1, ..., Tn);
@@ -478,11 +362,9 @@ class promise_handler_ex_n
: public promise_creator<T>
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
void operator()(const std::exception_ptr& ex,
- ASIO_MOVE_ARG(Args)... args)
+ Args&&... args)
{
if (ex)
this->p_->set_exception(ex);
@@ -490,31 +372,9 @@ public:
{
this->p_->set_value(
std::forward_as_tuple(
- ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Args&&>(args)...));
}
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const std::exception_ptr& ex, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- if (ex) \
- this->p_->set_exception(ex); \
- else \
- { \
- this->p_->set_value( \
- std::forward_as_tuple( \
- ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
// Helper template to choose the appropriate concrete promise handler
@@ -547,15 +407,15 @@ class promise_handler_selector<void(std::exception_ptr, Arg)>
template <typename... Arg>
class promise_handler_selector<void(Arg...)>
- : public promise_handler_n<std::tuple<Arg...> > {};
+ : public promise_handler_n<std::tuple<Arg...>> {};
template <typename... Arg>
class promise_handler_selector<void(asio::error_code, Arg...)>
- : public promise_handler_ec_n<std::tuple<Arg...> > {};
+ : public promise_handler_ec_n<std::tuple<Arg...>> {};
template <typename... Arg>
class promise_handler_selector<void(std::exception_ptr, Arg...)>
- : public promise_handler_ex_n<std::tuple<Arg...> > {};
+ : public promise_handler_ex_n<std::tuple<Arg...>> {};
// Completion handlers produced from the use_future completion token, when not
// using use_future::operator().
@@ -573,7 +433,7 @@ public:
this->create_promise(allocator_);
}
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_;
}
@@ -582,23 +442,26 @@ private:
Allocator allocator_;
};
-template <typename Function, typename Signature, typename Allocator>
-inline void asio_handler_invoke(Function& f,
- promise_handler<Signature, Allocator>* h)
+template <typename Function>
+struct promise_function_wrapper
{
- typename promise_handler<Signature, Allocator>::executor_type
- ex(h->get_executor());
- ex.dispatch(ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
-}
+ explicit promise_function_wrapper(Function& f)
+ : function_(static_cast<Function&&>(f))
+ {
+ }
-template <typename Function, typename Signature, typename Allocator>
-inline void asio_handler_invoke(const Function& f,
- promise_handler<Signature, Allocator>* h)
-{
- typename promise_handler<Signature, Allocator>::executor_type
- ex(h->get_executor());
- ex.dispatch(f, std::allocator<void>());
-}
+ explicit promise_function_wrapper(const Function& f)
+ : function_(f)
+ {
+ }
+
+ void operator()()
+ {
+ function_();
+ }
+
+ Function function_;
+};
// Helper base class for async_result specialisation.
template <typename Signature, typename Allocator>
@@ -615,7 +478,7 @@ public:
return_type get()
{
- return ASIO_MOVE_CAST(return_type)(future_);
+ return static_cast<return_type&&>(future_);
}
private:
@@ -628,7 +491,7 @@ class packaged_token
{
public:
packaged_token(Function f, const Allocator& a)
- : function_(ASIO_MOVE_CAST(Function)(f)),
+ : function_(static_cast<Function&&>(f)),
allocator_(a)
{
}
@@ -649,71 +512,29 @@ public:
typedef void result_type;
packaged_handler(packaged_token<Function, Allocator> t)
- : function_(ASIO_MOVE_CAST(Function)(t.function_)),
+ : function_(static_cast<Function&&>(t.function_)),
allocator_(t.allocator_)
{
this->create_promise(allocator_);
}
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_;
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
+ void operator()(Args&&... args)
{
(promise_invoke_and_set)(*this->p_,
- function_, ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- void operator()()
- {
- (promise_invoke_and_set)(*this->p_, function_);
+ function_, static_cast<Args&&>(args)...);
}
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- (promise_invoke_and_set)(*this->p_, \
- function_, ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
private:
Function function_;
Allocator allocator_;
};
-template <typename Function,
- typename Function1, typename Allocator, typename Result>
-inline void asio_handler_invoke(Function& f,
- packaged_handler<Function1, Allocator, Result>* h)
-{
- typename packaged_handler<Function1, Allocator, Result>::executor_type
- ex(h->get_executor());
- ex.dispatch(ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
-}
-
-template <typename Function,
- typename Function1, typename Allocator, typename Result>
-inline void asio_handler_invoke(const Function& f,
- packaged_handler<Function1, Allocator, Result>* h)
-{
- typename packaged_handler<Function1, Allocator, Result>::executor_type
- ex(h->get_executor());
- ex.dispatch(f, std::allocator<void>());
-}
-
// Helper base class for async_result specialisation.
template <typename Function, typename Allocator, typename Result>
class packaged_async_result
@@ -729,7 +550,7 @@ public:
return_type get()
{
- return ASIO_MOVE_CAST(return_type)(future_);
+ return static_cast<return_type&&>(future_);
}
private:
@@ -739,28 +560,26 @@ private:
} // namespace detail
template <typename Allocator> template <typename Function>
-inline detail::packaged_token<typename decay<Function>::type, Allocator>
-use_future_t<Allocator>::operator()(ASIO_MOVE_ARG(Function) f) const
+inline detail::packaged_token<decay_t<Function>, Allocator>
+use_future_t<Allocator>::operator()(Function&& f) const
{
- return detail::packaged_token<typename decay<Function>::type, Allocator>(
- ASIO_MOVE_CAST(Function)(f), allocator_);
+ return detail::packaged_token<decay_t<Function>, Allocator>(
+ static_cast<Function&&>(f), allocator_);
}
#if !defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Allocator, typename Result, typename... Args>
class async_result<use_future_t<Allocator>, Result(Args...)>
: public detail::promise_async_result<
- void(typename decay<Args>::type...), Allocator>
+ void(decay_t<Args>...), Allocator>
{
public:
explicit async_result(
- typename detail::promise_async_result<void(typename decay<Args>::type...),
+ typename detail::promise_async_result<void(decay_t<Args>...),
Allocator>::completion_handler_type& h)
: detail::promise_async_result<
- void(typename decay<Args>::type...), Allocator>(h)
+ void(decay_t<Args>...), Allocator>(h)
{
}
};
@@ -769,139 +588,115 @@ template <typename Function, typename Allocator,
typename Result, typename... Args>
class async_result<detail::packaged_token<Function, Allocator>, Result(Args...)>
: public detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>
+ result_of_t<Function(Args...)>>
{
public:
explicit async_result(
typename detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>::completion_handler_type& h)
+ result_of_t<Function(Args...)>>::completion_handler_type& h)
: detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>(h)
+ result_of_t<Function(Args...)>>(h)
{
}
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+namespace traits {
-template <typename Allocator, typename Result>
-class async_result<use_future_t<Allocator>, Result()>
- : public detail::promise_async_result<void(), Allocator>
-{
-public:
- explicit async_result(
- typename detail::promise_async_result<
- void(), Allocator>::completion_handler_type& h)
- : detail::promise_async_result<void(), Allocator>(h)
- {
- }
-};
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-template <typename Function, typename Allocator, typename Result>
-class async_result<detail::packaged_token<Function, Allocator>, Result()>
- : public detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>
+template <typename T, typename Blocking>
+struct equality_comparable<
+ asio::detail::promise_executor<T, Blocking>>
{
-public:
- explicit async_result(
- typename detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>::completion_handler_type& h)
- : detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>(h)
- {
- }
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
-#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
- template <typename Allocator, \
- typename Result, ASIO_VARIADIC_TPARAMS(n)> \
- class async_result<use_future_t<Allocator>, \
- Result(ASIO_VARIADIC_TARGS(n))> \
- : public detail::promise_async_result< \
- void(ASIO_VARIADIC_DECAY(n)), Allocator> \
- { \
- public: \
- explicit async_result( \
- typename detail::promise_async_result< \
- void(ASIO_VARIADIC_DECAY(n)), \
- Allocator>::completion_handler_type& h) \
- : detail::promise_async_result< \
- void(ASIO_VARIADIC_DECAY(n)), Allocator>(h) \
- { \
- } \
- }; \
- \
- template <typename Function, typename Allocator, \
- typename Result, ASIO_VARIADIC_TPARAMS(n)> \
- class async_result<detail::packaged_token<Function, Allocator>, \
- Result(ASIO_VARIADIC_TARGS(n))> \
- : public detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type> \
- { \
- public: \
- explicit async_result( \
- typename detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type \
- >::completion_handler_type& h) \
- : detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type>(h) \
- { \
- } \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if !defined(ASIO_NO_DEPRECATED)
-
-template <typename Allocator, typename Signature>
-struct handler_type<use_future_t<Allocator>, Signature>
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename T, typename Blocking, typename Function>
+struct execute_member<
+ asio::detail::promise_executor<T, Blocking>, Function>
{
- typedef typename async_result<use_future_t<Allocator>,
- Signature>::completion_handler_type type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
};
-template <typename Signature, typename Allocator>
-class async_result<detail::promise_handler<Signature, Allocator> >
- : public detail::promise_async_result<Signature, Allocator>
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename T, typename Blocking, typename Property>
+struct query_static_constexpr_member<
+ asio::detail::promise_executor<T, Blocking>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::blocking_t
+ >::value
+ >::type
+ >
{
-public:
- typedef typename detail::promise_async_result<
- Signature, Allocator>::return_type type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Blocking result_type;
- explicit async_result(
- typename detail::promise_async_result<
- Signature, Allocator>::completion_handler_type& h)
- : detail::promise_async_result<Signature, Allocator>(h)
+ static constexpr result_type value() noexcept
{
+ return Blocking();
}
};
-template <typename Function, typename Allocator, typename Signature>
-struct handler_type<detail::packaged_token<Function, Allocator>, Signature>
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename T, typename Blocking>
+struct query_member<
+ asio::detail::promise_executor<T, Blocking>,
+ execution::context_t
+ >
{
- typedef typename async_result<detail::packaged_token<Function, Allocator>,
- Signature>::completion_handler_type type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::system_context& result_type;
};
-template <typename Function, typename Allocator, typename Result>
-class async_result<detail::packaged_handler<Function, Allocator, Result> >
- : public detail::packaged_async_result<Function, Allocator, Result>
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename T, typename Blocking>
+struct require_member<
+ asio::detail::promise_executor<T, Blocking>,
+ execution::blocking_t::possibly_t
+ >
{
-public:
- typedef typename detail::packaged_async_result<
- Function, Allocator, Result>::return_type type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::detail::promise_executor<T,
+ execution::blocking_t::possibly_t> result_type;
+};
- explicit async_result(
- typename detail::packaged_async_result<
- Function, Allocator, Result>::completion_handler_type& h)
- : detail::packaged_async_result<Function, Allocator, Result>(h)
- {
- }
+template <typename T, typename Blocking>
+struct require_member<
+ asio::detail::promise_executor<T, Blocking>,
+ execution::blocking_t::never_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::detail::promise_executor<T,
+ execution::blocking_t::never_t> result_type;
};
-#endif // !defined(ASIO_NO_DEPRECATED)
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace traits
#endif // !defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/impl/write.hpp b/3rdparty/asio/include/asio/impl/write.hpp
index 8250aa30361..af2bb5544bb 100644
--- a/3rdparty/asio/include/asio/impl/write.hpp
+++ b/3rdparty/asio/include/asio/impl/write.hpp
@@ -2,7 +2,7 @@
// impl/write.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,19 +15,18 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
+#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/push_options.hpp"
@@ -38,7 +37,7 @@ namespace detail
{
template <typename SyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition>
- std::size_t write_buffer_sequence(SyncWriteStream& s,
+ std::size_t write(SyncWriteStream& s,
const ConstBufferSequence& buffers, const ConstBufferIterator&,
CompletionCondition completion_condition, asio::error_code& ec)
{
@@ -53,7 +52,7 @@ namespace detail
else
break;
}
- return tmp.total_consumed();;
+ return tmp.total_consumed();
}
} // namespace detail
@@ -61,19 +60,20 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
+ >)
{
- return detail::write_buffer_sequence(s, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition, ec);
+ return detail::write(s, buffers,
+ asio::buffer_sequence_begin(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncWriteStream, typename ConstBufferSequence>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec);
@@ -84,9 +84,9 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename SyncWriteStream, typename ConstBufferSequence>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
+ >)
{
return write(s, buffers, transfer_all(), ec);
}
@@ -95,73 +95,89 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
+ >)
{
asio::error_code ec;
- std::size_t bytes_transferred = write(s, buffers, completion_condition, ec);
+ std::size_t bytes_transferred = write(s, buffers,
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
-template <typename SyncWriteStream, typename DynamicBuffer,
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer>::type b(
- ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
- std::size_t bytes_transferred = write(s, b.data(), completion_condition, ec);
+ std::size_t bytes_transferred = write(s, b.data(),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
b.consume(bytes_transferred);
return bytes_transferred;
}
-template <typename SyncWriteStream, typename DynamicBuffer>
+template <typename SyncWriteStream, typename DynamicBuffer_v1>
inline std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ static_cast<DynamicBuffer_v1&&>(buffers),
transfer_all(), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
-template <typename SyncWriteStream, typename DynamicBuffer>
+template <typename SyncWriteStream, typename DynamicBuffer_v1>
inline std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- return write(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ return write(s, static_cast<DynamicBuffer_v1&&>(buffers),
transfer_all(), ec);
}
-template <typename SyncWriteStream, typename DynamicBuffer,
+template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
@@ -175,7 +191,8 @@ inline std::size_t write(SyncWriteStream& s,
asio::basic_streambuf<Allocator>& b,
CompletionCondition completion_condition, asio::error_code& ec)
{
- return write(s, basic_streambuf_ref<Allocator>(b), completion_condition, ec);
+ return write(s, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncWriteStream, typename Allocator>
@@ -199,11 +216,68 @@ inline std::size_t write(SyncWriteStream& s,
asio::basic_streambuf<Allocator>& b,
CompletionCondition completion_condition)
{
- return write(s, basic_streambuf_ref<Allocator>(b), completion_condition);
+ return write(s, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ std::size_t bytes_transferred = write(s, buffers.data(0, buffers.size()),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
+ buffers.consume(bytes_transferred);
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2>
+inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = write(s,
+ static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all(), ec);
+ asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2>
+inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ return write(s, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all(), ec);
+}
+
+template <typename SyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+{
+ asio::error_code ec;
+ std::size_t bytes_transferred = write(s,
+ static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
+ asio::detail::throw_error(ec, "write");
+ return bytes_transferred;
+}
namespace detail
{
@@ -211,23 +285,25 @@ namespace detail
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
class write_op
- : detail::base_from_completion_cond<CompletionCondition>
+ : public base_from_cancellation_state<WriteHandler>,
+ base_from_completion_cond<CompletionCondition>
{
public:
write_op(AsyncWriteStream& stream, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, WriteHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : base_from_cancellation_state<WriteHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
stream_(stream),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_op(const write_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<WriteHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
stream_(other.stream_),
buffers_(other.buffers_),
start_(other.start_),
@@ -236,16 +312,18 @@ namespace detail
}
write_op(write_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<WriteHandler>(
+ static_cast<base_from_cancellation_state<WriteHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(other.buffers_),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
std::size_t max_size;
@@ -253,25 +331,39 @@ namespace detail
{
case 1:
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
+ for (;;)
{
- stream_.async_write_some(buffers_.prepare(max_size),
- ASIO_MOVE_CAST(write_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_write"));
+ stream_.async_write_some(buffers_.prepare(max_size),
+ static_cast<write_op&&>(*this));
+ }
return; default:
buffers_.consume(bytes_transferred);
if ((!ec && bytes_transferred == 0) || buffers_.empty())
break;
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
+ if (max_size == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = error::operation_aborted;
+ break;
+ }
+ }
- handler_(ec, buffers_.total_consumed());
+ static_cast<WriteHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(buffers_.total_consumed()));
}
}
//private:
+ typedef asio::detail::consuming_buffers<const_buffer,
+ ConstBufferSequence, ConstBufferIterator> buffers_type;
+
AsyncWriteStream& stream_;
- asio::detail::consuming_buffers<const_buffer,
- ConstBufferSequence, ConstBufferIterator> buffers_;
+ buffers_type buffers_;
int start_;
WriteHandler handler_;
};
@@ -279,28 +371,6 @@ namespace detail
template <typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
inline bool asio_handler_is_continuation(
write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>* this_handler)
@@ -310,34 +380,12 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncWriteStream,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
template <typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
- inline void start_write_buffer_sequence_op(AsyncWriteStream& stream,
+ inline void start_write_op(AsyncWriteStream& stream,
const ConstBufferSequence& buffers, const ConstBufferIterator&,
- CompletionCondition completion_condition, WriteHandler& handler)
+ CompletionCondition& completion_condition, WriteHandler& handler)
{
detail::write_op<AsyncWriteStream, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>(
@@ -345,120 +393,140 @@ namespace detail
asio::error_code(), 0, 1);
}
+ template <typename AsyncWriteStream>
+ class initiate_async_write
+ {
+ public:
+ typedef typename AsyncWriteStream::executor_type executor_type;
+
+ explicit initiate_async_write(AsyncWriteStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence,
+ typename CompletionCondition>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_write_op(stream_, buffers,
+ asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+
+ private:
+ AsyncWriteStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncWriteStream, typename ConstBufferSequence,
+template <template <typename, typename> class Associator,
+ typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler, typename Allocator>
-struct associated_allocator<
+ typename WriteHandler, typename DefaultCandidate>
+struct associator<Associator,
detail::write_op<AsyncWriteStream, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>,
- Allocator>
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
const detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ ConstBufferIterator, CompletionCondition, WriteHandler>& h) noexcept
{
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::write_op<AsyncWriteStream, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
- static type get(
+ static auto get(
const detail::write_op<AsyncWriteStream, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
+template <typename AsyncWriteStream,
+ typename ConstBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_write_buffer_sequence_op(s, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write<AsyncWriteStream>(s),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ const ConstBufferSequence& buffers, WriteToken&& token,
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type*)
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers, transfer_all()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_write_buffer_sequence_op(s, buffers,
- asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write<AsyncWriteStream>(s),
+ token, buffers, transfer_all());
}
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
namespace detail
{
- template <typename AsyncWriteStream, typename DynamicBuffer,
+ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename WriteHandler>
- class write_dynbuf_op
+ class write_dynbuf_v1_op
{
public:
template <typename BufferSequence>
- write_dynbuf_op(AsyncWriteStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
- CompletionCondition completion_condition, WriteHandler& handler)
+ write_dynbuf_v1_op(AsyncWriteStream& stream,
+ BufferSequence&& buffers,
+ CompletionCondition& completion_condition, WriteHandler& handler)
: stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition)),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ static_cast<CompletionCondition&&>(completion_condition)),
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- write_dynbuf_op(const write_dynbuf_op& other)
+ write_dynbuf_v1_op(const write_dynbuf_v1_op& other)
: stream_(other.stream_),
buffers_(other.buffers_),
completion_condition_(other.completion_condition_),
@@ -466,16 +534,15 @@ namespace detail
{
}
- write_dynbuf_op(write_dynbuf_op&& other)
+ write_dynbuf_v1_op(write_dynbuf_v1_op&& other)
: stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(
+ static_cast<CompletionCondition&&>(
other.completion_condition_)),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
std::size_t bytes_transferred, int start = 0)
@@ -483,189 +550,387 @@ namespace detail
switch (start)
{
case 1:
- async_write(stream_, buffers_.data(), completion_condition_,
- ASIO_MOVE_CAST(write_dynbuf_op)(*this));
+ async_write(stream_, buffers_.data(),
+ static_cast<CompletionCondition&&>(completion_condition_),
+ static_cast<write_dynbuf_v1_op&&>(*this));
return; default:
buffers_.consume(bytes_transferred);
- handler_(ec, static_cast<const std::size_t&>(bytes_transferred));
+ static_cast<WriteHandler&&>(handler_)(ec,
+ static_cast<const std::size_t&>(bytes_transferred));
}
}
//private:
AsyncWriteStream& stream_;
- DynamicBuffer buffers_;
+ DynamicBuffer_v1 buffers_;
CompletionCondition completion_condition_;
WriteHandler handler_;
};
- template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer,
+ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename WriteHandler>
inline bool asio_handler_is_continuation(
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
+ write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
CompletionCondition, WriteHandler>* this_handler)
{
return asio_handler_cont_helpers::is_continuation(
this_handler->handler_);
}
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
+ template <typename AsyncWriteStream>
+ class initiate_async_write_dynbuf_v1
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncWriteStream::executor_type executor_type;
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer, typename CompletionCondition,
- typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_write_dynbuf_v1(AsyncWriteStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename WriteHandler, typename DynamicBuffer_v1,
+ typename CompletionCondition>
+ void operator()(WriteHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ write_dynbuf_v1_op<AsyncWriteStream,
+ decay_t<DynamicBuffer_v1>,
+ CompletionCondition, decay_t<WriteHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
+ completion_cond2.value, handler2.value)(
+ asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncWriteStream& stream_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler, typename Allocator>
-struct associated_allocator<
- detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>,
- Allocator>
+template <template <typename, typename> class Associator,
+ typename AsyncWriteStream, typename DynamicBuffer_v1,
+ typename CompletionCondition, typename WriteHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::write_dynbuf_v1_op<AsyncWriteStream,
+ DynamicBuffer_v1, CompletionCondition, WriteHandler>,
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
- const detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
+ const detail::write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>& h) noexcept
{
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
- static type get(
- const detail::write_dynbuf_op<AsyncWriteStream,
- DynamicBuffer, CompletionCondition, WriteHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(
+ const detail::write_dynbuf_v1_op<AsyncWriteStream,
+ DynamicBuffer_v1, CompletionCondition, WriteHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncWriteStream,
- typename DynamicBuffer, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ DynamicBuffer_v1&& buffers, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ transfer_all()))
{
- return async_write(s,
- ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- transfer_all(), ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ transfer_all());
}
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type*)
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::write_dynbuf_op<AsyncWriteStream,
- typename decay<DynamicBuffer>::type,
- CompletionCondition, ASIO_HANDLER_TYPE(
- WriteHandler, void (asio::error_code, std::size_t))>(
- s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- completion_condition, init.completion_handler)(
- asio::error_code(), 0, 1);
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
-template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
+template <typename AsyncWriteStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
asio::basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()))
{
- return async_write(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all());
}
-template <typename AsyncWriteStream, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
+template <typename AsyncWriteStream,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_write(s, basic_streambuf_ref<Allocator>(b),
- completion_condition, ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+namespace detail
+{
+ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+ class write_dynbuf_v2_op
+ {
+ public:
+ template <typename BufferSequence>
+ write_dynbuf_v2_op(AsyncWriteStream& stream,
+ BufferSequence&& buffers,
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : stream_(stream),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
+ completion_condition_(
+ static_cast<CompletionCondition&&>(completion_condition)),
+ handler_(static_cast<WriteHandler&&>(handler))
+ {
+ }
+
+ write_dynbuf_v2_op(const write_dynbuf_v2_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ completion_condition_(other.completion_condition_),
+ handler_(other.handler_)
+ {
+ }
+
+ write_dynbuf_v2_op(write_dynbuf_v2_op&& other)
+ : stream_(other.stream_),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ completion_condition_(
+ static_cast<CompletionCondition&&>(
+ other.completion_condition_)),
+ handler_(static_cast<WriteHandler&&>(other.handler_))
+ {
+ }
+
+ void operator()(const asio::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ switch (start)
+ {
+ case 1:
+ async_write(stream_, buffers_.data(0, buffers_.size()),
+ static_cast<CompletionCondition&&>(completion_condition_),
+ static_cast<write_dynbuf_v2_op&&>(*this));
+ return; default:
+ buffers_.consume(bytes_transferred);
+ static_cast<WriteHandler&&>(handler_)(ec,
+ static_cast<const std::size_t&>(bytes_transferred));
+ }
+ }
+
+ //private:
+ AsyncWriteStream& stream_;
+ DynamicBuffer_v2 buffers_;
+ CompletionCondition completion_condition_;
+ WriteHandler handler_;
+ };
+
+ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler>
+ inline bool asio_handler_is_continuation(
+ write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>* this_handler)
+ {
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename AsyncWriteStream>
+ class initiate_async_write_dynbuf_v2
+ {
+ public:
+ typedef typename AsyncWriteStream::executor_type executor_type;
+
+ explicit initiate_async_write_dynbuf_v2(AsyncWriteStream& stream)
+ : stream_(stream)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return stream_.get_executor();
+ }
+
+ template <typename WriteHandler, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+ void operator()(WriteHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ write_dynbuf_v2_op<AsyncWriteStream, decay_t<DynamicBuffer_v2>,
+ CompletionCondition, decay_t<WriteHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ completion_cond2.value, handler2.value)(
+ asio::error_code(), 0, 1);
+ }
+
+ private:
+ AsyncWriteStream& stream_;
+ };
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename AsyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition, typename WriteHandler,
+ typename DefaultCandidate>
+struct associator<Associator,
+ detail::write_dynbuf_v2_op<AsyncWriteStream,
+ DynamicBuffer_v2, CompletionCondition, WriteHandler>,
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
+{
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
+ const detail::write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::write_dynbuf_v2_op<AsyncWriteStream,
+ DynamicBuffer_v2, CompletionCondition, WriteHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ DynamicBuffer_v2 buffers, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all());
+}
+
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/write_at.hpp b/3rdparty/asio/include/asio/impl/write_at.hpp
index 9e06bd28861..b5a67e30051 100644
--- a/3rdparty/asio/include/asio/impl/write_at.hpp
+++ b/3rdparty/asio/include/asio/impl/write_at.hpp
@@ -2,7 +2,7 @@
// impl/write_at.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,19 +15,18 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
+#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/detail/push_options.hpp"
@@ -57,7 +56,7 @@ namespace detail
else
break;
}
- return tmp.total_consumed();;
+ return tmp.total_consumed();
}
} // namespace detail
@@ -68,7 +67,8 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d,
CompletionCondition completion_condition, asio::error_code& ec)
{
return detail::write_at_buffer_sequence(d, offset, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition, ec);
+ asio::buffer_sequence_begin(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
@@ -97,8 +97,8 @@ inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
CompletionCondition completion_condition)
{
asio::error_code ec;
- std::size_t bytes_transferred = write_at(
- d, offset, buffers, completion_condition, ec);
+ std::size_t bytes_transferred = write_at(d, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write_at");
return bytes_transferred;
}
@@ -112,8 +112,8 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
CompletionCondition completion_condition, asio::error_code& ec)
{
- std::size_t bytes_transferred = write_at(
- d, offset, b.data(), completion_condition, ec);
+ std::size_t bytes_transferred = write_at(d, offset, b.data(),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
b.consume(bytes_transferred);
return bytes_transferred;
}
@@ -143,8 +143,8 @@ inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
CompletionCondition completion_condition)
{
asio::error_code ec;
- std::size_t bytes_transferred = write_at(
- d, offset, b, completion_condition, ec);
+ std::size_t bytes_transferred = write_at(d, offset, b,
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write_at");
return bytes_transferred;
}
@@ -158,25 +158,27 @@ namespace detail
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
class write_at_op
- : detail::base_from_completion_cond<CompletionCondition>
+ : public base_from_cancellation_state<WriteHandler>,
+ base_from_completion_cond<CompletionCondition>
{
public:
write_at_op(AsyncRandomAccessWriteDevice& device,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, WriteHandler& handler)
- : detail::base_from_completion_cond<
- CompletionCondition>(completion_condition),
+ CompletionCondition& completion_condition, WriteHandler& handler)
+ : base_from_cancellation_state<WriteHandler>(
+ handler, enable_partial_cancellation()),
+ base_from_completion_cond<CompletionCondition>(completion_condition),
device_(device),
offset_(offset),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_at_op(const write_at_op& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<WriteHandler>(other),
+ base_from_completion_cond<CompletionCondition>(other),
device_(other.device_),
offset_(other.offset_),
buffers_(other.buffers_),
@@ -186,17 +188,19 @@ namespace detail
}
write_at_op(write_at_op&& other)
- : detail::base_from_completion_cond<CompletionCondition>(other),
+ : base_from_cancellation_state<WriteHandler>(
+ static_cast<base_from_cancellation_state<WriteHandler>&&>(other)),
+ base_from_completion_cond<CompletionCondition>(
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
device_(other.device_),
offset_(other.offset_),
- buffers_(other.buffers_),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- void operator()(const asio::error_code& ec,
+ void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
{
std::size_t max_size;
@@ -204,27 +208,41 @@ namespace detail
{
case 1:
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- do
+ for (;;)
{
- device_.async_write_some_at(
- offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
- ASIO_MOVE_CAST(write_at_op)(*this));
+ {
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_write_at"));
+ device_.async_write_some_at(
+ offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
+ static_cast<write_at_op&&>(*this));
+ }
return; default:
buffers_.consume(bytes_transferred);
if ((!ec && bytes_transferred == 0) || buffers_.empty())
break;
max_size = this->check_for_completion(ec, buffers_.total_consumed());
- } while (max_size > 0);
+ if (max_size == 0)
+ break;
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec = asio::error::operation_aborted;
+ break;
+ }
+ }
- handler_(ec, buffers_.total_consumed());
+ static_cast<WriteHandler&&>(handler_)(
+ static_cast<const asio::error_code&>(ec),
+ static_cast<const std::size_t&>(buffers_.total_consumed()));
}
}
//private:
+ typedef asio::detail::consuming_buffers<const_buffer,
+ ConstBufferSequence, ConstBufferIterator> buffers_type;
+
AsyncRandomAccessWriteDevice& device_;
uint64_t offset_;
- asio::detail::consuming_buffers<const_buffer,
- ConstBufferSequence, ConstBufferIterator> buffers_;
+ buffers_type buffers_;
int start_;
WriteHandler handler_;
};
@@ -232,28 +250,6 @@ namespace detail
template <typename AsyncRandomAccessWriteDevice,
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
@@ -263,34 +259,12 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
template <typename AsyncRandomAccessWriteDevice,
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
- inline void start_write_at_buffer_sequence_op(AsyncRandomAccessWriteDevice& d,
+ inline void start_write_at_op(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- const ConstBufferIterator&, CompletionCondition completion_condition,
+ const ConstBufferIterator&, CompletionCondition& completion_condition,
WriteHandler& handler)
{
detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
@@ -298,95 +272,116 @@ namespace detail
d, offset, buffers, completion_condition, handler)(
asio::error_code(), 0, 1);
}
+
+ template <typename AsyncRandomAccessWriteDevice>
+ class initiate_async_write_at
+ {
+ public:
+ typedef typename AsyncRandomAccessWriteDevice::executor_type executor_type;
+
+ explicit initiate_async_write_at(AsyncRandomAccessWriteDevice& device)
+ : device_(device)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return device_.get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence,
+ typename CompletionCondition>
+ void operator()(WriteHandler&& handler,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition&& completion_cond) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
+ start_write_at_op(device_, offset, buffers,
+ asio::buffer_sequence_begin(buffers),
+ completion_cond2.value, handler2.value);
+ }
+
+ private:
+ AsyncRandomAccessWriteDevice& device_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler, typename Allocator>
-struct associated_allocator<
+template <template <typename, typename> class Associator,
+ typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename ConstBufferIterator, typename CompletionCondition,
+ typename WriteHandler, typename DefaultCandidate>
+struct associator<Associator,
detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>,
- Allocator>
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
{
- typedef typename associated_allocator<WriteHandler, Allocator>::type type;
-
- static type get(
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
const detail::write_at_op<AsyncRandomAccessWriteDevice,
ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ CompletionCondition, WriteHandler>& h) noexcept
{
- return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler, typename Executor>
-struct associated_executor<
- detail::write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>,
- Executor>
-{
- typedef typename associated_executor<WriteHandler, Executor>::type type;
- static type get(
+ static auto get(
const detail::write_at_op<AsyncRandomAccessWriteDevice,
ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_write_at_buffer_sequence_op(d, offset, buffers,
- asio::buffer_sequence_begin(buffers), completion_condition,
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers, transfer_all()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::start_write_at_buffer_sequence_op(d, offset, buffers,
- asio::buffer_sequence_begin(buffers), transfer_all(),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
+ token, offset, buffers, transfer_all());
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -402,11 +397,10 @@ namespace detail
asio::basic_streambuf<Allocator>& streambuf,
WriteHandler& handler)
: streambuf_(streambuf),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_at_streambuf_op(const write_at_streambuf_op& other)
: streambuf_(other.streambuf_),
handler_(other.handler_)
@@ -415,16 +409,15 @@ namespace detail
write_at_streambuf_op(write_at_streambuf_op&& other)
: streambuf_(other.streambuf_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
const std::size_t bytes_transferred)
{
streambuf_.consume(bytes_transferred);
- handler_(ec, bytes_transferred);
+ static_cast<WriteHandler&&>(handler_)(ec, bytes_transferred);
}
//private:
@@ -433,22 +426,6 @@ namespace detail
};
template <typename Allocator, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename Allocator, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename Allocator, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
{
@@ -456,110 +433,112 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename Allocator, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
+ template <typename AsyncRandomAccessWriteDevice>
+ class initiate_async_write_at_streambuf
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ public:
+ typedef typename AsyncRandomAccessWriteDevice::executor_type executor_type;
- template <typename Function, typename Allocator, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
+ explicit initiate_async_write_at_streambuf(
+ AsyncRandomAccessWriteDevice& device)
+ : device_(device)
+ {
+ }
- template <typename Allocator, typename WriteHandler>
- inline write_at_streambuf_op<Allocator, WriteHandler>
- make_write_at_streambuf_op(
- asio::basic_streambuf<Allocator>& b, WriteHandler handler)
- {
- return write_at_streambuf_op<Allocator, WriteHandler>(b, handler);
- }
+ executor_type get_executor() const noexcept
+ {
+ return device_.get_executor();
+ }
+
+ template <typename WriteHandler,
+ typename Allocator, typename CompletionCondition>
+ void operator()(WriteHandler&& handler,
+ uint64_t offset, basic_streambuf<Allocator>* b,
+ CompletionCondition&& completion_condition) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ non_const_lvalue<WriteHandler> handler2(handler);
+ async_write_at(device_, offset, b->data(),
+ static_cast<CompletionCondition&&>(completion_condition),
+ write_at_streambuf_op<Allocator, decay_t<WriteHandler>>(
+ *b, handler2.value));
+ }
+
+ private:
+ AsyncRandomAccessWriteDevice& device_;
+ };
} // namespace detail
#if !defined(GENERATING_DOCUMENTATION)
-template <typename Allocator, typename WriteHandler, typename Allocator1>
-struct associated_allocator<
- detail::write_at_streambuf_op<Allocator, WriteHandler>,
- Allocator1>
+template <template <typename, typename> class Associator,
+ typename Executor, typename WriteHandler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::write_at_streambuf_op<Executor, WriteHandler>,
+ DefaultCandidate>
+ : Associator<WriteHandler, DefaultCandidate>
{
- typedef typename associated_allocator<WriteHandler, Allocator1>::type type;
-
- static type get(
- const detail::write_at_streambuf_op<Allocator, WriteHandler>& h,
- const Allocator1& a = Allocator1()) ASIO_NOEXCEPT
+ static typename Associator<WriteHandler, DefaultCandidate>::type get(
+ const detail::write_at_streambuf_op<Executor, WriteHandler>& h) noexcept
{
- return associated_allocator<WriteHandler, Allocator1>::get(h.handler_, a);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename Executor, typename WriteHandler, typename Executor1>
-struct associated_executor<
- detail::write_at_streambuf_op<Executor, WriteHandler>,
- Executor1>
-{
- typedef typename associated_executor<WriteHandler, Executor1>::type type;
-
- static type get(
+ static auto get(
const detail::write_at_streambuf_op<Executor, WriteHandler>& h,
- const Executor1& ex = Executor1()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<WriteHandler, Executor1>::get(h.handler_, ex);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+template <typename AsyncRandomAccessWriteDevice,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- async_write_at(d, offset, b.data(), completion_condition,
- detail::write_at_streambuf_op<Allocator, ASIO_HANDLER_TYPE(
- WriteHandler, void (asio::error_code, std::size_t))>(
- b, init.completion_handler));
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>(d),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename WriteHandler>
-inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b, transfer_all()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- async_write_at(d, offset, b.data(), transfer_all(),
- detail::write_at_streambuf_op<Allocator, ASIO_HANDLER_TYPE(
- WriteHandler, void (asio::error_code, std::size_t))>(
- b, init.completion_handler));
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>(d),
+ token, offset, &b, transfer_all());
}
#endif // !defined(ASIO_NO_IOSTREAM)
diff --git a/3rdparty/asio/include/asio/io_context.hpp b/3rdparty/asio/include/asio/io_context.hpp
index 44fe432c76c..5de125685fc 100644
--- a/3rdparty/asio/include/asio/io_context.hpp
+++ b/3rdparty/asio/include/asio/io_context.hpp
@@ -2,7 +2,7 @@
// io_context.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,15 +20,14 @@
#include <stdexcept>
#include <typeinfo>
#include "asio/async_result.hpp"
-#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/chrono.hpp"
+#include "asio/detail/concurrency_hint.hpp"
+#include "asio/detail/cstdint.hpp"
#include "asio/detail/wrapped_handler.hpp"
#include "asio/error_code.hpp"
+#include "asio/execution.hpp"
#include "asio/execution_context.hpp"
-#if defined(ASIO_HAS_CHRONO)
-# include "asio/detail/chrono.hpp"
-#endif // defined(ASIO_HAS_CHRONO)
-
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
# include "asio/detail/winsock_init.hpp"
#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
@@ -36,17 +35,31 @@
# include "asio/detail/signal_init.hpp"
#endif
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_io_context.hpp"
+#else
+# include "asio/detail/scheduler.hpp"
+#endif
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
#if defined(ASIO_HAS_IOCP)
- typedef class win_iocp_io_context io_context_impl;
+ typedef win_iocp_io_context io_context_impl;
class win_iocp_overlapped_ptr;
#else
- typedef class scheduler io_context_impl;
+ typedef scheduler io_context_impl;
#endif
+
+ struct io_context_bits
+ {
+ static constexpr uintptr_t blocking_never = 1;
+ static constexpr uintptr_t relationship_continuation = 2;
+ static constexpr uintptr_t outstanding_work_tracked = 4;
+ static constexpr uintptr_t runtime_bits = 3;
+ };
} // namespace detail
/// Provides core I/O functionality.
@@ -64,12 +77,12 @@ namespace detail {
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Safe, with the specific exceptions of the restart() and
- * notify_fork() functions. Calling restart() while there are unfinished run(),
- * run_one(), poll() or poll_one() calls results in undefined behaviour. The
- * notify_fork() function should not be called while any io_context function,
- * or any function on an I/O object that is associated with the io_context, is
- * being called in another thread.
+ * @e Shared @e objects: Safe, with the specific exceptions of the restart()
+ * and notify_fork() functions. Calling restart() while there are unfinished
+ * run(), run_one(), run_for(), run_until(), poll() or poll_one() calls results
+ * in undefined behaviour. The notify_fork() function should not be called
+ * while any io_context function, or any function on an I/O object that is
+ * associated with the io_context, is being called in another thread.
*
* @par Concepts:
* Dispatcher.
@@ -78,25 +91,26 @@ namespace detail {
*
* Synchronous operations on I/O objects implicitly run the io_context object
* for an individual operation. The io_context functions run(), run_one(),
- * poll() or poll_one() must be called for the io_context to perform
- * asynchronous operations on behalf of a C++ program. Notification that an
- * asynchronous operation has completed is delivered by invocation of the
- * associated handler. Handlers are invoked only by a thread that is currently
- * calling any overload of run(), run_one(), poll() or poll_one() for the
- * io_context.
+ * run_for(), run_until(), poll() or poll_one() must be called for the
+ * io_context to perform asynchronous operations on behalf of a C++ program.
+ * Notification that an asynchronous operation has completed is delivered by
+ * invocation of the associated handler. Handlers are invoked only by a thread
+ * that is currently calling any overload of run(), run_one(), run_for(),
+ * run_until(), poll() or poll_one() for the io_context.
*
* @par Effect of exceptions thrown from handlers
*
* If an exception is thrown from a handler, the exception is allowed to
* propagate through the throwing thread's invocation of run(), run_one(),
- * poll() or poll_one(). No other threads that are calling any of these
- * functions are affected. It is then the responsibility of the application to
- * catch the exception.
+ * run_for(), run_until(), poll() or poll_one(). No other threads that are
+ * calling any of these functions are affected. It is then the responsibility
+ * of the application to catch the exception.
*
- * After the exception has been caught, the run(), run_one(), poll() or
- * poll_one() call may be restarted @em without the need for an intervening
- * call to restart(). This allows the thread to rejoin the io_context object's
- * thread pool without impacting any other threads in the pool.
+ * After the exception has been caught, the run(), run_one(), run_for(),
+ * run_until(), poll() or poll_one() call may be restarted @em without the need
+ * for an intervening call to restart(). This allows the thread to rejoin the
+ * io_context object's thread pool without impacting any other threads in the
+ * pool.
*
* For example:
*
@@ -117,13 +131,42 @@ namespace detail {
* }
* @endcode
*
+ * @par Submitting arbitrary tasks to the io_context
+ *
+ * To submit functions to the io_context, use the @ref asio::dispatch,
+ * @ref asio::post or @ref asio::defer free functions.
+ *
+ * For example:
+ *
+ * @code void my_task()
+ * {
+ * ...
+ * }
+ *
+ * ...
+ *
+ * asio::io_context io_context;
+ *
+ * // Submit a function to the io_context.
+ * asio::post(io_context, my_task);
+ *
+ * // Submit a lambda object to the io_context.
+ * asio::post(io_context,
+ * []()
+ * {
+ * ...
+ * });
+ *
+ * // Run the io_context until it runs out of work.
+ * io_context.run(); @endcode
+ *
* @par Stopping the io_context from running out of work
*
* Some applications may need to prevent an io_context object's run() call from
* returning when there is no more work to do. For example, the io_context may
* be being run in a background thread that is launched prior to the
* application's asynchronous operations. The run() call may be kept running by
- * creating an object of type
+ * using the @ref make_work_guard function to create an object of type
* asio::executor_work_guard<io_context::executor_type>:
*
* @code asio::io_context io_context;
@@ -154,9 +197,20 @@ private:
friend class detail::win_iocp_overlapped_ptr;
#endif
+#if !defined(ASIO_NO_DEPRECATED)
+ struct initiate_dispatch;
+ struct initiate_post;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
public:
- class executor_type;
- friend class executor_type;
+ template <typename Allocator, uintptr_t Bits>
+ class basic_executor_type;
+
+ template <typename Allocator, uintptr_t Bits>
+ friend class basic_executor_type;
+
+ /// Executor used to submit functions to an io_context.
+ typedef basic_executor_type<std::allocator<void>, 0> executor_type;
#if !defined(ASIO_NO_DEPRECATED)
class work;
@@ -165,9 +219,11 @@ public:
class service;
-#if !defined(ASIO_NO_EXTENSIONS)
+#if !defined(ASIO_NO_EXTENSIONS) \
+ && !defined(ASIO_NO_TS_EXECUTORS)
class strand;
#endif // !defined(ASIO_NO_EXTENSIONS)
+ // && !defined(ASIO_NO_TS_EXECUTORS)
/// The type used to count the number of handlers executed by the context.
typedef std::size_t count_type;
@@ -219,7 +275,7 @@ public:
ASIO_DECL ~io_context();
/// Obtains the executor associated with the io_context.
- executor_type get_executor() ASIO_NOEXCEPT;
+ executor_type get_executor() noexcept;
/// Run the io_context object's event processing loop.
/**
@@ -238,9 +294,10 @@ public:
*
* @return The number of handlers that were executed.
*
- * @note The run() function must not be called from a thread that is currently
- * calling one of run(), run_one(), poll() or poll_one() on the same
- * io_context object.
+ * @note Calling the run() function from a thread that is currently calling
+ * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
+ * the same io_context object may introduce the potential for deadlock. It is
+ * the caller's reponsibility to avoid this.
*
* The poll() function may also be used to dispatch ready handlers, but
* without blocking.
@@ -268,9 +325,10 @@ public:
*
* @return The number of handlers that were executed.
*
- * @note The run() function must not be called from a thread that is currently
- * calling one of run(), run_one(), poll() or poll_one() on the same
- * io_context object.
+ * @note Calling the run() function from a thread that is currently calling
+ * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
+ * the same io_context object may introduce the potential for deadlock. It is
+ * the caller's reponsibility to avoid this.
*
* The poll() function may also be used to dispatch ready handlers, but
* without blocking.
@@ -278,7 +336,6 @@ public:
ASIO_DECL count_type run(asio::error_code& ec);
#endif // !defined(ASIO_NO_DEPRECATED)
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop for a specified
/// duration.
/**
@@ -305,7 +362,6 @@ public:
*/
template <typename Clock, typename Duration>
std::size_t run_until(const chrono::time_point<Clock, Duration>& abs_time);
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop to execute at most one
/// handler.
@@ -318,11 +374,16 @@ public:
* returns @c true). Subsequent calls to run(), run_one(), poll() or
* poll_one() will return immediately unless there is a prior call to
* restart().
+ *
+ * @note Calling the run_one() function from a thread that is currently
+ * calling one of run(), run_one(), run_for(), run_until(), poll() or
+ * poll_one() on the same io_context object may introduce the potential for
+ * deadlock. It is the caller's reponsibility to avoid this.
*/
ASIO_DECL count_type run_one();
#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's
+ /// (Deprecated: Use non-error_code overload.) Run the io_context object's
/// event processing loop to execute at most one handler.
/**
* The run_one() function blocks until one handler has been dispatched, or
@@ -335,11 +396,15 @@ public:
* restart().
*
* @return The number of handlers that were executed.
+ *
+ * @note Calling the run_one() function from a thread that is currently
+ * calling one of run(), run_one(), run_for(), run_until(), poll() or
+ * poll_one() on the same io_context object may introduce the potential for
+ * deadlock. It is the caller's reponsibility to avoid this.
*/
ASIO_DECL count_type run_one(asio::error_code& ec);
#endif // !defined(ASIO_NO_DEPRECATED)
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop for a specified duration
/// to execute at most one handler.
/**
@@ -368,7 +433,6 @@ public:
template <typename Clock, typename Duration>
std::size_t run_one_until(
const chrono::time_point<Clock, Duration>& abs_time);
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop to execute ready
/// handlers.
@@ -483,15 +547,17 @@ public:
*
* @note This function throws an exception only if:
*
- * @li the handler's @c asio_handler_allocate function; or
+ * @li the handler's associated allocator; or
*
* @li the handler's copy constructor
*
* throws an exception.
*/
- template <typename CompletionHandler>
- ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
- dispatch(ASIO_MOVE_ARG(CompletionHandler) handler);
+ template <typename LegacyCompletionHandler>
+ auto dispatch(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_dispatch>(), handler, this));
/// (Deprecated: Use asio::post().) Request the io_context to invoke
/// the given handler and return immediately.
@@ -510,15 +576,17 @@ public:
*
* @note This function throws an exception only if:
*
- * @li the handler's @c asio_handler_allocate function; or
+ * @li the handler's associated allocator; or
*
* @li the handler's copy constructor
*
* throws an exception.
*/
- template <typename CompletionHandler>
- ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
- post(ASIO_MOVE_ARG(CompletionHandler) handler);
+ template <typename LegacyCompletionHandler>
+ auto post(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_post>(), handler, this));
/// (Deprecated: Use asio::bind_executor().) Create a new handler that
/// automatically dispatches the wrapped handler on the io_context.
@@ -552,6 +620,9 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
private:
+ io_context(const io_context&) = delete;
+ io_context& operator=(const io_context&) = delete;
+
// Helper function to add the implementation.
ASIO_DECL impl_type& add_impl(impl_type* impl);
@@ -571,12 +642,351 @@ private:
impl_type& impl_;
};
-/// Executor used to submit functions to an io_context.
-class io_context::executor_type
+/// Executor implementation type used to submit functions to an io_context.
+template <typename Allocator, uintptr_t Bits>
+class io_context::basic_executor_type :
+ detail::io_context_bits, Allocator
{
public:
+ /// Copy constructor.
+ basic_executor_type(const basic_executor_type& other) noexcept
+ : Allocator(static_cast<const Allocator&>(other)),
+ target_(other.target_)
+ {
+ if (Bits & outstanding_work_tracked)
+ if (context_ptr())
+ context_ptr()->impl_.work_started();
+ }
+
+ /// Move constructor.
+ basic_executor_type(basic_executor_type&& other) noexcept
+ : Allocator(static_cast<Allocator&&>(other)),
+ target_(other.target_)
+ {
+ if (Bits & outstanding_work_tracked)
+ other.target_ = 0;
+ }
+
+ /// Destructor.
+ ~basic_executor_type() noexcept
+ {
+ if (Bits & outstanding_work_tracked)
+ if (context_ptr())
+ context_ptr()->impl_.work_finished();
+ }
+
+ /// Assignment operator.
+ basic_executor_type& operator=(const basic_executor_type& other) noexcept;
+
+ /// Move assignment operator.
+ basic_executor_type& operator=(basic_executor_type&& other) noexcept;
+
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ friend struct asio_require_fn::impl;
+ friend struct asio_prefer_fn::impl;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Obtain an executor with the @c blocking.possibly property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.possibly); @endcode
+ */
+ constexpr basic_executor_type require(execution::blocking_t::possibly_t) const
+ {
+ return basic_executor_type(context_ptr(),
+ *this, bits() & ~blocking_never);
+ }
+
+ /// Obtain an executor with the @c blocking.never property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.never); @endcode
+ */
+ constexpr basic_executor_type require(execution::blocking_t::never_t) const
+ {
+ return basic_executor_type(context_ptr(),
+ *this, bits() | blocking_never);
+ }
+
+ /// Obtain an executor with the @c relationship.fork property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::relationship.fork); @endcode
+ */
+ constexpr basic_executor_type require(execution::relationship_t::fork_t) const
+ {
+ return basic_executor_type(context_ptr(),
+ *this, bits() & ~relationship_continuation);
+ }
+
+ /// Obtain an executor with the @c relationship.continuation property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::relationship.continuation); @endcode
+ */
+ constexpr basic_executor_type require(
+ execution::relationship_t::continuation_t) const
+ {
+ return basic_executor_type(context_ptr(),
+ *this, bits() | relationship_continuation);
+ }
+
+ /// Obtain an executor with the @c outstanding_work.tracked property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::outstanding_work.tracked); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED(Bits | outstanding_work_tracked)>
+ require(execution::outstanding_work_t::tracked_t) const
+ {
+ return basic_executor_type<Allocator, Bits | outstanding_work_tracked>(
+ context_ptr(), *this, bits());
+ }
+
+ /// Obtain an executor with the @c outstanding_work.untracked property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::outstanding_work.untracked); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED(Bits & ~outstanding_work_tracked)>
+ require(execution::outstanding_work_t::untracked_t) const
+ {
+ return basic_executor_type<Allocator, Bits & ~outstanding_work_tracked>(
+ context_ptr(), *this, bits());
+ }
+
+ /// Obtain an executor with the specified @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::allocator(my_allocator)); @endcode
+ */
+ template <typename OtherAllocator>
+ constexpr basic_executor_type<OtherAllocator, Bits>
+ require(execution::allocator_t<OtherAllocator> a) const
+ {
+ return basic_executor_type<OtherAllocator, Bits>(
+ context_ptr(), a.value(), bits());
+ }
+
+ /// Obtain an executor with the default @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_io_context.get_executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::allocator); @endcode
+ */
+ constexpr basic_executor_type<std::allocator<void>, Bits>
+ require(execution::allocator_t<void>) const
+ {
+ return basic_executor_type<std::allocator<void>, Bits>(
+ context_ptr(), std::allocator<void>(), bits());
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ friend struct asio_query_fn::impl;
+ friend struct asio::execution::detail::mapping_t<0>;
+ friend struct asio::execution::detail::outstanding_work_t<0>;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Query the current value of the @c mapping property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * if (asio::query(ex, asio::execution::mapping)
+ * == asio::execution::mapping.thread)
+ * ... @endcode
+ */
+ static constexpr execution::mapping_t query(execution::mapping_t) noexcept
+ {
+ return execution::mapping.thread;
+ }
+
+ /// Query the current value of the @c context property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * asio::io_context& ctx = asio::query(
+ * ex, asio::execution::context); @endcode
+ */
+ io_context& query(execution::context_t) const noexcept
+ {
+ return *context_ptr();
+ }
+
+ /// Query the current value of the @c blocking property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * if (asio::query(ex, asio::execution::blocking)
+ * == asio::execution::blocking.always)
+ * ... @endcode
+ */
+ constexpr execution::blocking_t query(execution::blocking_t) const noexcept
+ {
+ return (bits() & blocking_never)
+ ? execution::blocking_t(execution::blocking.never)
+ : execution::blocking_t(execution::blocking.possibly);
+ }
+
+ /// Query the current value of the @c relationship property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * if (asio::query(ex, asio::execution::relationship)
+ * == asio::execution::relationship.continuation)
+ * ... @endcode
+ */
+ constexpr execution::relationship_t query(
+ execution::relationship_t) const noexcept
+ {
+ return (bits() & relationship_continuation)
+ ? execution::relationship_t(execution::relationship.continuation)
+ : execution::relationship_t(execution::relationship.fork);
+ }
+
+ /// Query the current value of the @c outstanding_work property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * if (asio::query(ex, asio::execution::outstanding_work)
+ * == asio::execution::outstanding_work.tracked)
+ * ... @endcode
+ */
+ static constexpr execution::outstanding_work_t query(
+ execution::outstanding_work_t) noexcept
+ {
+ return (Bits & outstanding_work_tracked)
+ ? execution::outstanding_work_t(execution::outstanding_work.tracked)
+ : execution::outstanding_work_t(execution::outstanding_work.untracked);
+ }
+
+ /// Query the current value of the @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * auto alloc = asio::query(ex,
+ * asio::execution::allocator); @endcode
+ */
+ template <typename OtherAllocator>
+ constexpr Allocator query(
+ execution::allocator_t<OtherAllocator>) const noexcept
+ {
+ return static_cast<const Allocator&>(*this);
+ }
+
+ /// Query the current value of the @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_io_context.get_executor();
+ * auto alloc = asio::query(ex,
+ * asio::execution::allocator); @endcode
+ */
+ constexpr Allocator query(execution::allocator_t<void>) const noexcept
+ {
+ return static_cast<const Allocator&>(*this);
+ }
+
+public:
+ /// Determine whether the io_context is running in the current thread.
+ /**
+ * @return @c true if the current thread is running the io_context. Otherwise
+ * returns @c false.
+ */
+ bool running_in_this_thread() const noexcept;
+
+ /// Compare two executors for equality.
+ /**
+ * Two executors are equal if they refer to the same underlying io_context.
+ */
+ friend bool operator==(const basic_executor_type& a,
+ const basic_executor_type& b) noexcept
+ {
+ return a.target_ == b.target_
+ && static_cast<const Allocator&>(a) == static_cast<const Allocator&>(b);
+ }
+
+ /// Compare two executors for inequality.
+ /**
+ * Two executors are equal if they refer to the same underlying io_context.
+ */
+ friend bool operator!=(const basic_executor_type& a,
+ const basic_executor_type& b) noexcept
+ {
+ return a.target_ != b.target_
+ || static_cast<const Allocator&>(a) != static_cast<const Allocator&>(b);
+ }
+
+ /// Execution function.
+ template <typename Function>
+ void execute(Function&& f) const;
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+public:
/// Obtain the underlying execution context.
- io_context& context() const ASIO_NOEXCEPT;
+ io_context& context() const noexcept;
/// Inform the io_context that it has some outstanding work to do.
/**
@@ -584,7 +994,7 @@ public:
* This ensures that the io_context's run() and run_one() functions do not
* exit while the work is underway.
*/
- void on_work_started() const ASIO_NOEXCEPT;
+ void on_work_started() const noexcept;
/// Inform the io_context that some work is no longer outstanding.
/**
@@ -592,7 +1002,7 @@ public:
* finished. Once the count of unfinished work reaches zero, the io_context
* is stopped and the run() and run_one() functions may exit.
*/
- void on_work_finished() const ASIO_NOEXCEPT;
+ void on_work_finished() const noexcept;
/// Request the io_context to invoke the given function object.
/**
@@ -608,8 +1018,8 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void dispatch(Function&& f, const OtherAllocator& a) const;
/// Request the io_context to invoke the given function object.
/**
@@ -624,8 +1034,8 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void post(Function&& f, const OtherAllocator& a) const;
/// Request the io_context to invoke the given function object.
/**
@@ -644,44 +1054,46 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void defer(Function&& f, const OtherAllocator& a) const;
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
- /// Determine whether the io_context is running in the current thread.
- /**
- * @return @c true if the current thread is running the io_context. Otherwise
- * returns @c false.
- */
- bool running_in_this_thread() const ASIO_NOEXCEPT;
+private:
+ friend class io_context;
+ template <typename, uintptr_t> friend class basic_executor_type;
- /// Compare two executors for equality.
- /**
- * Two executors are equal if they refer to the same underlying io_context.
- */
- friend bool operator==(const executor_type& a,
- const executor_type& b) ASIO_NOEXCEPT
+ // Constructor used by io_context::get_executor().
+ explicit basic_executor_type(io_context& i) noexcept
+ : Allocator(),
+ target_(reinterpret_cast<uintptr_t>(&i))
{
- return &a.io_context_ == &b.io_context_;
+ if (Bits & outstanding_work_tracked)
+ context_ptr()->impl_.work_started();
}
- /// Compare two executors for inequality.
- /**
- * Two executors are equal if they refer to the same underlying io_context.
- */
- friend bool operator!=(const executor_type& a,
- const executor_type& b) ASIO_NOEXCEPT
+ // Constructor used by require().
+ basic_executor_type(io_context* i,
+ const Allocator& a, uintptr_t bits) noexcept
+ : Allocator(a),
+ target_(reinterpret_cast<uintptr_t>(i) | bits)
{
- return &a.io_context_ != &b.io_context_;
+ if (Bits & outstanding_work_tracked)
+ if (context_ptr())
+ context_ptr()->impl_.work_started();
}
-private:
- friend class io_context;
+ io_context* context_ptr() const noexcept
+ {
+ return reinterpret_cast<io_context*>(target_ & ~runtime_bits);
+ }
- // Constructor.
- explicit executor_type(io_context& i) : io_context_(i) {}
+ uintptr_t bits() const noexcept
+ {
+ return target_ & runtime_bits;
+ }
- // The underlying io_context.
- io_context& io_context_;
+ // The underlying io_context and runtime bits.
+ uintptr_t target_;
};
#if !defined(ASIO_NO_DEPRECATED)
@@ -726,10 +1138,6 @@ public:
/// Get the io_context associated with the work.
asio::io_context& get_io_context();
- /// (Deprecated: Use get_io_context().) Get the io_context associated with the
- /// work.
- asio::io_context& get_io_service();
-
private:
// Prevent assignment.
void operator=(const work& other);
@@ -747,11 +1155,6 @@ public:
/// Get the io_context object that owns the service.
asio::io_context& get_io_context();
-#if !defined(ASIO_NO_DEPRECATED)
- /// Get the io_context object that owns the service.
- asio::io_context& get_io_service();
-#endif // !defined(ASIO_NO_DEPRECATED)
-
private:
/// Destroy all user-defined handler objects owned by the service.
ASIO_DECL virtual void shutdown();
@@ -814,6 +1217,274 @@ template <typename Type>
asio::detail::service_id<Type> service_base<Type>::id;
} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename Allocator, uintptr_t Bits>
+struct equality_comparable<
+ asio::io_context::basic_executor_type<Allocator, Bits>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Allocator, uintptr_t Bits, typename Function>
+struct execute_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ Function
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::blocking_t::possibly_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ Allocator, Bits> result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::blocking_t::never_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ Allocator, Bits> result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::relationship_t::fork_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ Allocator, Bits> result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::relationship_t::continuation_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ Allocator, Bits> result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::outstanding_work_t::tracked_t
+ > : asio::detail::io_context_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ Allocator, Bits | outstanding_work_tracked> result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::outstanding_work_t::untracked_t
+ > : asio::detail::io_context_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ Allocator, Bits & ~outstanding_work_tracked> result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<void>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ std::allocator<void>, Bits> result_type;
+};
+
+template <uintptr_t Bits,
+ typename Allocator, typename OtherAllocator>
+struct require_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<OtherAllocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::io_context::basic_executor_type<
+ OtherAllocator, Bits> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Allocator, uintptr_t Bits, typename Property>
+struct query_static_constexpr_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::outstanding_work_t
+ >::value
+ >::type
+ > : asio::detail::io_context_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::outstanding_work_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return (Bits & outstanding_work_tracked)
+ ? execution::outstanding_work_t(execution::outstanding_work.tracked)
+ : execution::outstanding_work_t(execution::outstanding_work.untracked);
+ }
+};
+
+template <typename Allocator, uintptr_t Bits, typename Property>
+struct query_static_constexpr_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::mapping_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::mapping_t::thread_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Allocator, uintptr_t Bits, typename Property>
+struct query_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::blocking_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::blocking_t result_type;
+};
+
+template <typename Allocator, uintptr_t Bits, typename Property>
+struct query_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::relationship_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::relationship_t result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct query_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::context_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::io_context& result_type;
+};
+
+template <typename Allocator, uintptr_t Bits>
+struct query_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<void>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Allocator result_type;
+};
+
+template <typename Allocator, uintptr_t Bits, typename OtherAllocator>
+struct query_member<
+ asio::io_context::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<OtherAllocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Allocator result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+
+namespace execution {
+
+template <>
+struct is_executor<io_context> : false_type
+{
+};
+
+} // namespace execution
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/io_context_strand.hpp b/3rdparty/asio/include/asio/io_context_strand.hpp
index 53a6c4690c2..288ac238feb 100644
--- a/3rdparty/asio/include/asio/io_context_strand.hpp
+++ b/3rdparty/asio/include/asio/io_context_strand.hpp
@@ -2,7 +2,7 @@
// io_context_strand.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,7 +17,8 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_NO_EXTENSIONS)
+#if !defined(ASIO_NO_EXTENSIONS) \
+ && !defined(ASIO_NO_TS_EXECUTORS)
#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
@@ -63,8 +64,7 @@ namespace asio {
* @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
* performed outside the strand
*
- * then @c asio_handler_invoke(a1, &a1) happens-before
- * @c asio_handler_invoke(b1, &b1).
+ * then @c a() happens-before @c b()
*
* Note that in the following case:
* @code async_op_1(..., s.wrap(a));
@@ -87,6 +87,12 @@ namespace asio {
*/
class io_context::strand
{
+private:
+#if !defined(ASIO_NO_DEPRECATED)
+ struct initiate_dispatch;
+ struct initiate_post;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
public:
/// Constructor.
/**
@@ -102,49 +108,30 @@ public:
service_.construct(impl_);
}
- /// Destructor.
+ /// Copy constructor.
/**
- * Destroys a strand.
- *
- * Handlers posted through the strand that have not yet been invoked will
- * still be dispatched in a way that meets the guarantee of non-concurrency.
- */
- ~strand()
- {
- }
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use context().) Get the io_context associated with the
- /// strand.
- /**
- * This function may be used to obtain the io_context object that the strand
- * uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the strand will use to
- * dispatch handlers. Ownership is not transferred to the caller.
+ * Creates a copy such that both strand objects share the same underlying
+ * state.
*/
- asio::io_context& get_io_context()
+ strand(const strand& other) noexcept
+ : service_(other.service_),
+ impl_(other.impl_)
{
- return service_.get_io_context();
}
- /// (Deprecated: Use context().) Get the io_context associated with the
- /// strand.
+ /// Destructor.
/**
- * This function may be used to obtain the io_context object that the strand
- * uses to dispatch handlers for asynchronous operations.
+ * Destroys a strand.
*
- * @return A reference to the io_context object that the strand will use to
- * dispatch handlers. Ownership is not transferred to the caller.
+ * Handlers posted through the strand that have not yet been invoked will
+ * still be dispatched in a way that meets the guarantee of non-concurrency.
*/
- asio::io_context& get_io_service()
+ ~strand()
{
- return service_.get_io_context();
}
-#endif // !defined(ASIO_NO_DEPRECATED)
/// Obtain the underlying execution context.
- asio::io_context& context() ASIO_NOEXCEPT
+ asio::io_context& context() const noexcept
{
return service_.get_io_context();
}
@@ -153,7 +140,7 @@ public:
/**
* The strand delegates this call to its underlying io_context.
*/
- void on_work_started() ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
context().get_executor().on_work_started();
}
@@ -162,7 +149,7 @@ public:
/**
* The strand delegates this call to its underlying io_context.
*/
- void on_work_finished() ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
context().get_executor().on_work_finished();
}
@@ -183,9 +170,9 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a)
+ void dispatch(Function&& f, const Allocator& a) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
+ decay_t<Function> tmp(static_cast<Function&&>(f));
service_.dispatch(impl_, tmp);
(void)a;
}
@@ -211,19 +198,14 @@ public:
* handler object as required. The function signature of the handler must be:
* @code void handler(); @endcode
*/
- template <typename CompletionHandler>
- ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
- dispatch(ASIO_MOVE_ARG(CompletionHandler) handler)
+ template <typename LegacyCompletionHandler>
+ auto dispatch(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_dispatch>(), handler, this))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a CompletionHandler.
- ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
-
- async_completion<CompletionHandler, void ()> init(handler);
-
- service_.dispatch(impl_, init.completion_handler);
-
- return init.result.get();
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_dispatch(), handler, this);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -241,9 +223,9 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a)
+ void post(Function&& f, const Allocator& a) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
+ decay_t<Function> tmp(static_cast<Function&&>(f));
service_.post(impl_, tmp);
(void)a;
}
@@ -265,19 +247,14 @@ public:
* handler object as required. The function signature of the handler must be:
* @code void handler(); @endcode
*/
- template <typename CompletionHandler>
- ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
- post(ASIO_MOVE_ARG(CompletionHandler) handler)
+ template <typename LegacyCompletionHandler>
+ auto post(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_post>(), handler, this))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a CompletionHandler.
- ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
-
- async_completion<CompletionHandler, void ()> init(handler);
-
- service_.post(impl_, init.completion_handler);
-
- return init.result.get();
+ return async_initiate<LegacyCompletionHandler, void ()>(
+ initiate_post(), handler, this);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -295,9 +272,9 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a)
+ void defer(Function&& f, const Allocator& a) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
+ decay_t<Function> tmp(static_cast<Function&&>(f));
service_.post(impl_, tmp);
(void)a;
}
@@ -343,7 +320,7 @@ public:
* submitted to the strand using post(), dispatch() or wrap(). Otherwise
* returns @c false.
*/
- bool running_in_this_thread() const ASIO_NOEXCEPT
+ bool running_in_this_thread() const noexcept
{
return service_.running_in_this_thread(impl_);
}
@@ -353,7 +330,7 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator==(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator==(const strand& a, const strand& b) noexcept
{
return a.impl_ == b.impl_;
}
@@ -363,14 +340,50 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator!=(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator!=(const strand& a, const strand& b) noexcept
{
return a.impl_ != b.impl_;
}
private:
+#if !defined(ASIO_NO_DEPRECATED)
+ struct initiate_dispatch
+ {
+ template <typename LegacyCompletionHandler>
+ void operator()(LegacyCompletionHandler&& handler,
+ strand* self) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for a
+ // LegacyCompletionHandler.
+ ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+ self->service_.dispatch(self->impl_, handler2.value);
+ }
+ };
+
+ struct initiate_post
+ {
+ template <typename LegacyCompletionHandler>
+ void operator()(LegacyCompletionHandler&& handler,
+ strand* self) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for a
+ // LegacyCompletionHandler.
+ ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
+
+ detail::non_const_lvalue<LegacyCompletionHandler> handler2(handler);
+ self->service_.post(self->impl_, handler2.value);
+ }
+ };
+#endif // !defined(ASIO_NO_DEPRECATED)
+
asio::detail::strand_service& service_;
- asio::detail::strand_service::implementation_type impl_;
+ mutable asio::detail::strand_service::implementation_type impl_;
};
} // namespace asio
@@ -378,5 +391,6 @@ private:
#include "asio/detail/pop_options.hpp"
#endif // !defined(ASIO_NO_EXTENSIONS)
+ // && !defined(ASIO_NO_TS_EXECUTORS)
#endif // ASIO_IO_CONTEXT_STRAND_HPP
diff --git a/3rdparty/asio/include/asio/io_service.hpp b/3rdparty/asio/include/asio/io_service.hpp
index 73772a0fbcf..748d8a6a323 100644
--- a/3rdparty/asio/include/asio/io_service.hpp
+++ b/3rdparty/asio/include/asio/io_service.hpp
@@ -2,7 +2,7 @@
// io_service.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/io_service_strand.hpp b/3rdparty/asio/include/asio/io_service_strand.hpp
index 49f6f3b244d..65bb8db2dd3 100644
--- a/3rdparty/asio/include/asio/io_service_strand.hpp
+++ b/3rdparty/asio/include/asio/io_service_strand.hpp
@@ -2,7 +2,7 @@
// io_service_strand.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/address.hpp b/3rdparty/asio/include/asio/ip/address.hpp
index 351a815cfcd..337abe7fd69 100644
--- a/3rdparty/asio/include/asio/ip/address.hpp
+++ b/3rdparty/asio/include/asio/ip/address.hpp
@@ -2,7 +2,7 @@
// ip/address.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include <string>
#include "asio/detail/throw_exception.hpp"
#include "asio/detail/string_view.hpp"
@@ -47,46 +48,44 @@ class address
{
public:
/// Default constructor.
- ASIO_DECL address();
+ ASIO_DECL address() noexcept;
/// Construct an address from an IPv4 address.
- ASIO_DECL address(const asio::ip::address_v4& ipv4_address);
+ ASIO_DECL address(
+ const asio::ip::address_v4& ipv4_address) noexcept;
/// Construct an address from an IPv6 address.
- ASIO_DECL address(const asio::ip::address_v6& ipv6_address);
+ ASIO_DECL address(
+ const asio::ip::address_v6& ipv6_address) noexcept;
/// Copy constructor.
- ASIO_DECL address(const address& other);
+ ASIO_DECL address(const address& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- ASIO_DECL address(address&& other);
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address(address&& other) noexcept;
/// Assign from another address.
- ASIO_DECL address& operator=(const address& other);
+ ASIO_DECL address& operator=(const address& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another address.
- ASIO_DECL address& operator=(address&& other);
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address& operator=(address&& other) noexcept;
/// Assign from an IPv4 address.
ASIO_DECL address& operator=(
- const asio::ip::address_v4& ipv4_address);
+ const asio::ip::address_v4& ipv4_address) noexcept;
/// Assign from an IPv6 address.
ASIO_DECL address& operator=(
- const asio::ip::address_v6& ipv6_address);
+ const asio::ip::address_v6& ipv6_address) noexcept;
/// Get whether the address is an IP version 4 address.
- bool is_v4() const
+ bool is_v4() const noexcept
{
return type_ == ipv4;
}
/// Get whether the address is an IP version 6 address.
- bool is_v6() const
+ bool is_v6() const noexcept
{
return type_ == ipv6;
}
@@ -127,40 +126,46 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- ASIO_DECL bool is_loopback() const;
+ ASIO_DECL bool is_loopback() const noexcept;
/// Determine whether the address is unspecified.
- ASIO_DECL bool is_unspecified() const;
+ ASIO_DECL bool is_unspecified() const noexcept;
/// Determine whether the address is a multicast address.
- ASIO_DECL bool is_multicast() const;
+ ASIO_DECL bool is_multicast() const noexcept;
/// Compare two addresses for equality.
- ASIO_DECL friend bool operator==(const address& a1, const address& a2);
+ ASIO_DECL friend bool operator==(const address& a1,
+ const address& a2) noexcept;
/// Compare two addresses for inequality.
- friend bool operator!=(const address& a1, const address& a2)
+ friend bool operator!=(const address& a1,
+ const address& a2) noexcept
{
return !(a1 == a2);
}
/// Compare addresses for ordering.
- ASIO_DECL friend bool operator<(const address& a1, const address& a2);
+ ASIO_DECL friend bool operator<(const address& a1,
+ const address& a2) noexcept;
/// Compare addresses for ordering.
- friend bool operator>(const address& a1, const address& a2)
+ friend bool operator>(const address& a1,
+ const address& a2) noexcept
{
return a2 < a1;
}
/// Compare addresses for ordering.
- friend bool operator<=(const address& a1, const address& a2)
+ friend bool operator<=(const address& a1,
+ const address& a2) noexcept
{
return !(a2 < a1);
}
/// Compare addresses for ordering.
- friend bool operator>=(const address& a1, const address& a2)
+ friend bool operator>=(const address& a1,
+ const address& a2) noexcept
{
return !(a1 < a2);
}
@@ -188,8 +193,8 @@ ASIO_DECL address make_address(const char* str);
/**
* @relates address
*/
-ASIO_DECL address make_address(
- const char* str, asio::error_code& ec);
+ASIO_DECL address make_address(const char* str,
+ asio::error_code& ec) noexcept;
/// Create an address from an IPv4 address string in dotted decimal form,
/// or from an IPv6 address in hexadecimal notation.
@@ -203,10 +208,10 @@ ASIO_DECL address make_address(const std::string& str);
/**
* @relates address
*/
-ASIO_DECL address make_address(
- const std::string& str, asio::error_code& ec);
+ASIO_DECL address make_address(const std::string& str,
+ asio::error_code& ec) noexcept;
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
/// Create an address from an IPv4 address string in dotted decimal form,
@@ -221,10 +226,10 @@ ASIO_DECL address make_address(string_view str);
/**
* @relates address
*/
-ASIO_DECL address make_address(
- string_view str, asio::error_code& ec);
+ASIO_DECL address make_address(string_view str,
+ asio::error_code& ec) noexcept;
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
#if !defined(ASIO_NO_IOSTREAM)
@@ -250,6 +255,22 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
+namespace std {
+
+template <>
+struct hash<asio::ip::address>
+{
+ std::size_t operator()(const asio::ip::address& addr)
+ const noexcept
+ {
+ return addr.is_v4()
+ ? std::hash<asio::ip::address_v4>()(addr.to_v4())
+ : std::hash<asio::ip::address_v6>()(addr.to_v6());
+ }
+};
+
+} // namespace std
+
#include "asio/detail/pop_options.hpp"
#include "asio/ip/impl/address.hpp"
diff --git a/3rdparty/asio/include/asio/ip/address_v4.hpp b/3rdparty/asio/include/asio/ip/address_v4.hpp
index 6e16313d6e9..ccef6c80cda 100644
--- a/3rdparty/asio/include/asio/ip/address_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/address_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include <string>
#include "asio/detail/array.hpp"
#include "asio/detail/cstdint.hpp"
@@ -60,55 +61,68 @@ public:
#endif
/// Default constructor.
- address_v4()
+ /**
+ * Initialises the @c address_v4 object such that:
+ * @li <tt>to_bytes()</tt> yields <tt>{0, 0, 0, 0}</tt>; and
+ * @li <tt>to_uint() == 0</tt>.
+ */
+ address_v4() noexcept
{
addr_.s_addr = 0;
}
/// Construct an address from raw bytes.
+ /**
+ * Initialises the @c address_v4 object such that <tt>to_bytes() ==
+ * bytes</tt>.
+ *
+ * @throws out_of_range Thrown if any element in @c bytes is not in the range
+ * <tt>0 - 0xFF</tt>. Note that no range checking is required for platforms
+ * where <tt>std::numeric_limits<unsigned char>::max()</tt> is <tt>0xFF</tt>.
+ */
ASIO_DECL explicit address_v4(const bytes_type& bytes);
/// Construct an address from an unsigned integer in host byte order.
+ /**
+ * Initialises the @c address_v4 object such that <tt>to_uint() == addr</tt>.
+ */
ASIO_DECL explicit address_v4(uint_type addr);
/// Copy constructor.
- address_v4(const address_v4& other)
+ address_v4(const address_v4& other) noexcept
: addr_(other.addr_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- address_v4(address_v4&& other)
+ address_v4(address_v4&& other) noexcept
: addr_(other.addr_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another address.
- address_v4& operator=(const address_v4& other)
+ address_v4& operator=(const address_v4& other) noexcept
{
addr_ = other.addr_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another address.
- address_v4& operator=(address_v4&& other)
+ address_v4& operator=(address_v4&& other) noexcept
{
addr_ = other.addr_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Get the address in bytes, in network byte order.
- ASIO_DECL bytes_type to_bytes() const;
+ ASIO_DECL bytes_type to_bytes() const noexcept;
- /// Get the address as an unsigned integer in host byte order
- ASIO_DECL uint_type to_uint() const;
+ /// Get the address as an unsigned integer in host byte order.
+ ASIO_DECL uint_type to_uint() const noexcept;
#if !defined(ASIO_NO_DEPRECATED)
- /// Get the address as an unsigned long in host byte order
+ /// (Deprecated: Use to_uint().) Get the address as an unsigned long in host
+ /// byte order.
ASIO_DECL unsigned long to_ulong() const;
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -140,10 +154,23 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- ASIO_DECL bool is_loopback() const;
+ /**
+ * This function tests whether the address is in the address block
+ * <tt>127.0.0.0/8</tt>, which corresponds to the address range
+ * <tt>127.0.0.0 - 127.255.255.255</tt>.
+ *
+ * @returns <tt>(to_uint() & 0xFF000000) == 0x7F000000</tt>.
+ */
+ ASIO_DECL bool is_loopback() const noexcept;
/// Determine whether the address is unspecified.
- ASIO_DECL bool is_unspecified() const;
+ /**
+ * This function tests whether the address is the unspecified address
+ * <tt>0.0.0.0</tt>.
+ *
+ * @returns <tt>to_uint() == 0</tt>.
+ */
+ ASIO_DECL bool is_unspecified() const noexcept;
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use network_v4 class.) Determine whether the address is a
@@ -160,58 +187,109 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a multicast address.
- ASIO_DECL bool is_multicast() const;
+ /**
+ * This function tests whether the address is in the multicast address block
+ * <tt>224.0.0.0/4</tt>, which corresponds to the address range
+ * <tt>224.0.0.0 - 239.255.255.255</tt>.
+ *
+ * @returns <tt>(to_uint() & 0xF0000000) == 0xE0000000</tt>.
+ */
+ ASIO_DECL bool is_multicast() const noexcept;
/// Compare two addresses for equality.
- friend bool operator==(const address_v4& a1, const address_v4& a2)
+ friend bool operator==(const address_v4& a1,
+ const address_v4& a2) noexcept
{
return a1.addr_.s_addr == a2.addr_.s_addr;
}
/// Compare two addresses for inequality.
- friend bool operator!=(const address_v4& a1, const address_v4& a2)
+ friend bool operator!=(const address_v4& a1,
+ const address_v4& a2) noexcept
{
return a1.addr_.s_addr != a2.addr_.s_addr;
}
/// Compare addresses for ordering.
- friend bool operator<(const address_v4& a1, const address_v4& a2)
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() < a2.to_uint()</tt>.
+ */
+ friend bool operator<(const address_v4& a1,
+ const address_v4& a2) noexcept
{
return a1.to_uint() < a2.to_uint();
}
/// Compare addresses for ordering.
- friend bool operator>(const address_v4& a1, const address_v4& a2)
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() > a2.to_uint()</tt>.
+ */
+ friend bool operator>(const address_v4& a1,
+ const address_v4& a2) noexcept
{
return a1.to_uint() > a2.to_uint();
}
/// Compare addresses for ordering.
- friend bool operator<=(const address_v4& a1, const address_v4& a2)
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() <= a2.to_uint()</tt>.
+ */
+ friend bool operator<=(const address_v4& a1,
+ const address_v4& a2) noexcept
{
return a1.to_uint() <= a2.to_uint();
}
/// Compare addresses for ordering.
- friend bool operator>=(const address_v4& a1, const address_v4& a2)
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() >= a2.to_uint()</tt>.
+ */
+ friend bool operator>=(const address_v4& a1,
+ const address_v4& a2) noexcept
{
return a1.to_uint() >= a2.to_uint();
}
/// Obtain an address object that represents any address.
- static address_v4 any()
+ /**
+ * This functions returns an address that represents the "any" address
+ * <tt>0.0.0.0</tt>.
+ *
+ * @returns A default-constructed @c address_v4 object.
+ */
+ static address_v4 any() noexcept
{
return address_v4();
}
/// Obtain an address object that represents the loopback address.
- static address_v4 loopback()
+ /**
+ * This function returns an address that represents the well-known loopback
+ * address <tt>127.0.0.1</tt>.
+ *
+ * @returns <tt>address_v4(0x7F000001)</tt>.
+ */
+ static address_v4 loopback() noexcept
{
return address_v4(0x7F000001);
}
/// Obtain an address object that represents the broadcast address.
- static address_v4 broadcast()
+ /**
+ * This function returns an address that represents the broadcast address
+ * <tt>255.255.255.255</tt>.
+ *
+ * @returns <tt>address_v4(0xFFFFFFFF)</tt>.
+ */
+ static address_v4 broadcast() noexcept
{
return address_v4(0xFFFFFFFF);
}
@@ -261,8 +339,8 @@ ASIO_DECL address_v4 make_address_v4(const char* str);
/**
* @relates address_v4
*/
-ASIO_DECL address_v4 make_address_v4(
- const char* str, asio::error_code& ec);
+ASIO_DECL address_v4 make_address_v4(const char* str,
+ asio::error_code& ec) noexcept;
/// Create an IPv4 address from an IP address string in dotted decimal form.
/**
@@ -274,10 +352,10 @@ ASIO_DECL address_v4 make_address_v4(const std::string& str);
/**
* @relates address_v4
*/
-ASIO_DECL address_v4 make_address_v4(
- const std::string& str, asio::error_code& ec);
+ASIO_DECL address_v4 make_address_v4(const std::string& str,
+ asio::error_code& ec) noexcept;
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
/// Create an IPv4 address from an IP address string in dotted decimal form.
@@ -290,10 +368,10 @@ ASIO_DECL address_v4 make_address_v4(string_view str);
/**
* @relates address_v4
*/
-ASIO_DECL address_v4 make_address_v4(
- string_view str, asio::error_code& ec);
+ASIO_DECL address_v4 make_address_v4(string_view str,
+ asio::error_code& ec) noexcept;
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
#if !defined(ASIO_NO_IOSTREAM)
@@ -319,6 +397,20 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
+namespace std {
+
+template <>
+struct hash<asio::ip::address_v4>
+{
+ std::size_t operator()(const asio::ip::address_v4& addr)
+ const noexcept
+ {
+ return std::hash<unsigned int>()(addr.to_uint());
+ }
+};
+
+} // namespace std
+
#include "asio/detail/pop_options.hpp"
#include "asio/ip/impl/address_v4.hpp"
diff --git a/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp b/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp
index ad0889c9385..5b91f400ac1 100644
--- a/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp
@@ -2,7 +2,7 @@
// ip/address_v4_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -53,65 +53,59 @@ public:
typedef std::input_iterator_tag iterator_category;
/// Construct an iterator that points to the specified address.
- basic_address_iterator(const address_v4& addr) ASIO_NOEXCEPT
+ basic_address_iterator(const address_v4& addr) noexcept
: address_(addr)
{
}
/// Copy constructor.
- basic_address_iterator(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ basic_address_iterator(const basic_address_iterator& other) noexcept
: address_(other.address_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_iterator(basic_address_iterator&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v4)(other.address_))
+ basic_address_iterator(basic_address_iterator&& other) noexcept
+ : address_(static_cast<address_v4&&>(other.address_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
basic_address_iterator& operator=(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ const basic_address_iterator& other) noexcept
{
address_ = other.address_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_iterator& operator=(
- basic_address_iterator&& other) ASIO_NOEXCEPT
+ basic_address_iterator& operator=(basic_address_iterator&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v4)(other.address_);
+ address_ = static_cast<address_v4&&>(other.address_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Dereference the iterator.
- const address_v4& operator*() const ASIO_NOEXCEPT
+ const address_v4& operator*() const noexcept
{
return address_;
}
/// Dereference the iterator.
- const address_v4* operator->() const ASIO_NOEXCEPT
+ const address_v4* operator->() const noexcept
{
return &address_;
}
/// Pre-increment operator.
- basic_address_iterator& operator++() ASIO_NOEXCEPT
+ basic_address_iterator& operator++() noexcept
{
address_ = address_v4((address_.to_uint() + 1) & 0xFFFFFFFF);
return *this;
}
/// Post-increment operator.
- basic_address_iterator operator++(int) ASIO_NOEXCEPT
+ basic_address_iterator operator++(int) noexcept
{
basic_address_iterator tmp(*this);
++*this;
@@ -119,7 +113,7 @@ public:
}
/// Pre-decrement operator.
- basic_address_iterator& operator--() ASIO_NOEXCEPT
+ basic_address_iterator& operator--() noexcept
{
address_ = address_v4((address_.to_uint() - 1) & 0xFFFFFFFF);
return *this;
diff --git a/3rdparty/asio/include/asio/ip/address_v4_range.hpp b/3rdparty/asio/include/asio/ip/address_v4_range.hpp
index 06f3bd1818a..5fb5e65e2aa 100644
--- a/3rdparty/asio/include/asio/ip/address_v4_range.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v4_range.hpp
@@ -2,7 +2,7 @@
// ip/address_v4_range.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -38,7 +38,7 @@ public:
typedef basic_address_iterator<address_v4> iterator;
/// Construct an empty range.
- basic_address_range() ASIO_NOEXCEPT
+ basic_address_range() noexcept
: begin_(address_v4()),
end_(address_v4())
{
@@ -46,74 +46,68 @@ public:
/// Construct an range that represents the given range of addresses.
explicit basic_address_range(const iterator& first,
- const iterator& last) ASIO_NOEXCEPT
+ const iterator& last) noexcept
: begin_(first),
end_(last)
{
}
/// Copy constructor.
- basic_address_range(const basic_address_range& other) ASIO_NOEXCEPT
+ basic_address_range(const basic_address_range& other) noexcept
: begin_(other.begin_),
end_(other.end_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_range(basic_address_range&& other) ASIO_NOEXCEPT
- : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)),
- end_(ASIO_MOVE_CAST(iterator)(other.end_))
+ basic_address_range(basic_address_range&& other) noexcept
+ : begin_(static_cast<iterator&&>(other.begin_)),
+ end_(static_cast<iterator&&>(other.end_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
- basic_address_range& operator=(
- const basic_address_range& other) ASIO_NOEXCEPT
+ basic_address_range& operator=(const basic_address_range& other) noexcept
{
begin_ = other.begin_;
end_ = other.end_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_range& operator=(
- basic_address_range&& other) ASIO_NOEXCEPT
+ basic_address_range& operator=(basic_address_range&& other) noexcept
{
- begin_ = ASIO_MOVE_CAST(iterator)(other.begin_);
- end_ = ASIO_MOVE_CAST(iterator)(other.end_);
+ begin_ = static_cast<iterator&&>(other.begin_);
+ end_ = static_cast<iterator&&>(other.end_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain an iterator that points to the start of the range.
- iterator begin() const ASIO_NOEXCEPT
+ iterator begin() const noexcept
{
return begin_;
}
/// Obtain an iterator that points to the end of the range.
- iterator end() const ASIO_NOEXCEPT
+ iterator end() const noexcept
{
return end_;
}
/// Determine whether the range is empty.
- bool empty() const ASIO_NOEXCEPT
+ bool empty() const noexcept
{
return size() == 0;
}
/// Return the size of the range.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return end_->to_uint() - begin_->to_uint();
}
/// Find an address in the range.
- iterator find(const address_v4& addr) const ASIO_NOEXCEPT
+ iterator find(const address_v4& addr) const noexcept
{
return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
}
diff --git a/3rdparty/asio/include/asio/ip/address_v6.hpp b/3rdparty/asio/include/asio/ip/address_v6.hpp
index 663601d4c4d..aa650825cf3 100644
--- a/3rdparty/asio/include/asio/ip/address_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/address_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,8 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include <string>
#include "asio/detail/array.hpp"
+#include "asio/detail/cstdint.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/string_view.hpp"
#include "asio/detail/winsock_init.hpp"
@@ -35,6 +37,9 @@ namespace ip {
template <typename> class basic_address_iterator;
+/// Type used for storing IPv6 scope IDs.
+typedef uint_least32_t scope_id_type;
+
/// Implements IP version 6 style addresses.
/**
* The asio::ip::address_v6 class provides the ability to use and
@@ -59,33 +64,44 @@ public:
#endif
/// Default constructor.
- ASIO_DECL address_v6();
+ /**
+ * Initialises the @c address_v6 object such that:
+ * @li <tt>to_bytes()</tt> yields <tt>{0, 0, ..., 0}</tt>; and
+ * @li <tt>scope_id() == 0</tt>.
+ */
+ ASIO_DECL address_v6() noexcept;
/// Construct an address from raw bytes and scope ID.
+ /**
+ * Initialises the @c address_v6 object such that:
+ * @li <tt>to_bytes() == bytes</tt>; and
+ * @li <tt>this->scope_id() == scope_id</tt>.
+ *
+ * @throws out_of_range Thrown if any element in @c bytes is not in the range
+ * <tt>0 - 0xFF</tt>. Note that no range checking is required for platforms
+ * where <tt>std::numeric_limits<unsigned char>::max()</tt> is <tt>0xFF</tt>.
+ */
ASIO_DECL explicit address_v6(const bytes_type& bytes,
- unsigned long scope_id = 0);
+ scope_id_type scope_id = 0);
/// Copy constructor.
- ASIO_DECL address_v6(const address_v6& other);
+ ASIO_DECL address_v6(const address_v6& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- ASIO_DECL address_v6(address_v6&& other);
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address_v6(address_v6&& other) noexcept;
/// Assign from another address.
- ASIO_DECL address_v6& operator=(const address_v6& other);
+ ASIO_DECL address_v6& operator=(
+ const address_v6& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another address.
- ASIO_DECL address_v6& operator=(address_v6&& other);
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address_v6& operator=(address_v6&& other) noexcept;
/// The scope ID of the address.
/**
* Returns the scope ID associated with the IPv6 address.
*/
- unsigned long scope_id() const
+ scope_id_type scope_id() const noexcept
{
return scope_id_;
}
@@ -93,14 +109,16 @@ public:
/// The scope ID of the address.
/**
* Modifies the scope ID associated with the IPv6 address.
+ *
+ * @param id The new scope ID.
*/
- void scope_id(unsigned long id)
+ void scope_id(scope_id_type id) noexcept
{
scope_id_ = id;
}
/// Get the address in bytes, in network byte order.
- ASIO_DECL bytes_type to_bytes() const;
+ ASIO_DECL bytes_type to_bytes() const noexcept;
/// Get the address as a string.
ASIO_DECL std::string to_string() const;
@@ -133,19 +151,27 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- ASIO_DECL bool is_loopback() const;
+ /**
+ * This function tests whether the address is the loopback address
+ * <tt>::1</tt>.
+ */
+ ASIO_DECL bool is_loopback() const noexcept;
/// Determine whether the address is unspecified.
- ASIO_DECL bool is_unspecified() const;
+ /**
+ * This function tests whether the address is the loopback address
+ * <tt>::</tt>.
+ */
+ ASIO_DECL bool is_unspecified() const noexcept;
/// Determine whether the address is link local.
- ASIO_DECL bool is_link_local() const;
+ ASIO_DECL bool is_link_local() const noexcept;
/// Determine whether the address is site local.
- ASIO_DECL bool is_site_local() const;
+ ASIO_DECL bool is_site_local() const noexcept;
/// Determine whether the address is a mapped IPv4 address.
- ASIO_DECL bool is_v4_mapped() const;
+ ASIO_DECL bool is_v4_mapped() const noexcept;
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: No replacement.) Determine whether the address is an
@@ -154,63 +180,77 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a multicast address.
- ASIO_DECL bool is_multicast() const;
+ ASIO_DECL bool is_multicast() const noexcept;
/// Determine whether the address is a global multicast address.
- ASIO_DECL bool is_multicast_global() const;
+ ASIO_DECL bool is_multicast_global() const noexcept;
/// Determine whether the address is a link-local multicast address.
- ASIO_DECL bool is_multicast_link_local() const;
+ ASIO_DECL bool is_multicast_link_local() const noexcept;
/// Determine whether the address is a node-local multicast address.
- ASIO_DECL bool is_multicast_node_local() const;
+ ASIO_DECL bool is_multicast_node_local() const noexcept;
/// Determine whether the address is a org-local multicast address.
- ASIO_DECL bool is_multicast_org_local() const;
+ ASIO_DECL bool is_multicast_org_local() const noexcept;
/// Determine whether the address is a site-local multicast address.
- ASIO_DECL bool is_multicast_site_local() const;
+ ASIO_DECL bool is_multicast_site_local() const noexcept;
/// Compare two addresses for equality.
- ASIO_DECL friend bool operator==(
- const address_v6& a1, const address_v6& a2);
+ ASIO_DECL friend bool operator==(const address_v6& a1,
+ const address_v6& a2) noexcept;
/// Compare two addresses for inequality.
- friend bool operator!=(const address_v6& a1, const address_v6& a2)
+ friend bool operator!=(const address_v6& a1,
+ const address_v6& a2) noexcept
{
return !(a1 == a2);
}
/// Compare addresses for ordering.
- ASIO_DECL friend bool operator<(
- const address_v6& a1, const address_v6& a2);
+ ASIO_DECL friend bool operator<(const address_v6& a1,
+ const address_v6& a2) noexcept;
/// Compare addresses for ordering.
- friend bool operator>(const address_v6& a1, const address_v6& a2)
+ friend bool operator>(const address_v6& a1,
+ const address_v6& a2) noexcept
{
return a2 < a1;
}
/// Compare addresses for ordering.
- friend bool operator<=(const address_v6& a1, const address_v6& a2)
+ friend bool operator<=(const address_v6& a1,
+ const address_v6& a2) noexcept
{
return !(a2 < a1);
}
/// Compare addresses for ordering.
- friend bool operator>=(const address_v6& a1, const address_v6& a2)
+ friend bool operator>=(const address_v6& a1,
+ const address_v6& a2) noexcept
{
return !(a1 < a2);
}
/// Obtain an address object that represents any address.
- static address_v6 any()
+ /**
+ * This functions returns an address that represents the "any" address
+ * <tt>::</tt>.
+ *
+ * @returns A default-constructed @c address_v6 object.
+ */
+ static address_v6 any() noexcept
{
return address_v6();
}
/// Obtain an address object that represents the loopback address.
- ASIO_DECL static address_v6 loopback();
+ /**
+ * This function returns an address that represents the well-known loopback
+ * address <tt>::1</tt>.
+ */
+ ASIO_DECL static address_v6 loopback() noexcept;
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address.
@@ -227,7 +267,7 @@ private:
asio::detail::in6_addr_type addr_;
// The scope ID associated with the address.
- unsigned long scope_id_;
+ scope_id_type scope_id_;
};
/// Create an IPv6 address from raw bytes and scope ID.
@@ -235,7 +275,7 @@ private:
* @relates address_v6
*/
inline address_v6 make_address_v6(const address_v6::bytes_type& bytes,
- unsigned long scope_id = 0)
+ scope_id_type scope_id = 0)
{
return address_v6(bytes, scope_id);
}
@@ -250,8 +290,8 @@ ASIO_DECL address_v6 make_address_v6(const char* str);
/**
* @relates address_v6
*/
-ASIO_DECL address_v6 make_address_v6(
- const char* str, asio::error_code& ec);
+ASIO_DECL address_v6 make_address_v6(const char* str,
+ asio::error_code& ec) noexcept;
/// Createan IPv6 address from an IP address string.
/**
@@ -263,10 +303,10 @@ ASIO_DECL address_v6 make_address_v6(const std::string& str);
/**
* @relates address_v6
*/
-ASIO_DECL address_v6 make_address_v6(
- const std::string& str, asio::error_code& ec);
+ASIO_DECL address_v6 make_address_v6(const std::string& str,
+ asio::error_code& ec) noexcept;
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
/// Create an IPv6 address from an IP address string.
@@ -279,10 +319,10 @@ ASIO_DECL address_v6 make_address_v6(string_view str);
/**
* @relates address_v6
*/
-ASIO_DECL address_v6 make_address_v6(
- string_view str, asio::error_code& ec);
+ASIO_DECL address_v6 make_address_v6(string_view str,
+ asio::error_code& ec) noexcept;
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
/// Tag type used for distinguishing overloads that deal in IPv4-mapped IPv6
@@ -326,6 +366,37 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
+namespace std {
+
+template <>
+struct hash<asio::ip::address_v6>
+{
+ std::size_t operator()(const asio::ip::address_v6& addr)
+ const noexcept
+ {
+ const asio::ip::address_v6::bytes_type bytes = addr.to_bytes();
+ std::size_t result = static_cast<std::size_t>(addr.scope_id());
+ combine_4_bytes(result, &bytes[0]);
+ combine_4_bytes(result, &bytes[4]);
+ combine_4_bytes(result, &bytes[8]);
+ combine_4_bytes(result, &bytes[12]);
+ return result;
+ }
+
+private:
+ static void combine_4_bytes(std::size_t& seed, const unsigned char* bytes)
+ {
+ const std::size_t bytes_hash =
+ (static_cast<std::size_t>(bytes[0]) << 24) |
+ (static_cast<std::size_t>(bytes[1]) << 16) |
+ (static_cast<std::size_t>(bytes[2]) << 8) |
+ (static_cast<std::size_t>(bytes[3]));
+ seed ^= bytes_hash + 0x9e3779b9 + (seed << 6) + (seed >> 2);
+ }
+};
+
+} // namespace std
+
#include "asio/detail/pop_options.hpp"
#include "asio/ip/impl/address_v6.hpp"
diff --git a/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp b/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp
index 947af07b028..5116f614f08 100644
--- a/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp
@@ -2,7 +2,7 @@
// ip/address_v6_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -54,58 +54,53 @@ public:
typedef std::input_iterator_tag iterator_category;
/// Construct an iterator that points to the specified address.
- basic_address_iterator(const address_v6& addr) ASIO_NOEXCEPT
+ basic_address_iterator(const address_v6& addr) noexcept
: address_(addr)
{
}
/// Copy constructor.
basic_address_iterator(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ const basic_address_iterator& other) noexcept
: address_(other.address_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_iterator(basic_address_iterator&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v6)(other.address_))
+ basic_address_iterator(basic_address_iterator&& other) noexcept
+ : address_(static_cast<address_v6&&>(other.address_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
basic_address_iterator& operator=(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ const basic_address_iterator& other) noexcept
{
address_ = other.address_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_iterator& operator=(
- basic_address_iterator&& other) ASIO_NOEXCEPT
+ basic_address_iterator& operator=(basic_address_iterator&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v6)(other.address_);
+ address_ = static_cast<address_v6&&>(other.address_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Dereference the iterator.
- const address_v6& operator*() const ASIO_NOEXCEPT
+ const address_v6& operator*() const noexcept
{
return address_;
}
/// Dereference the iterator.
- const address_v6* operator->() const ASIO_NOEXCEPT
+ const address_v6* operator->() const noexcept
{
return &address_;
}
/// Pre-increment operator.
- basic_address_iterator& operator++() ASIO_NOEXCEPT
+ basic_address_iterator& operator++() noexcept
{
for (int i = 15; i >= 0; --i)
{
@@ -122,7 +117,7 @@ public:
}
/// Post-increment operator.
- basic_address_iterator operator++(int) ASIO_NOEXCEPT
+ basic_address_iterator operator++(int) noexcept
{
basic_address_iterator tmp(*this);
++*this;
@@ -130,7 +125,7 @@ public:
}
/// Pre-decrement operator.
- basic_address_iterator& operator--() ASIO_NOEXCEPT
+ basic_address_iterator& operator--() noexcept
{
for (int i = 15; i >= 0; --i)
{
diff --git a/3rdparty/asio/include/asio/ip/address_v6_range.hpp b/3rdparty/asio/include/asio/ip/address_v6_range.hpp
index 4dc7a30e06c..7f89773383d 100644
--- a/3rdparty/asio/include/asio/ip/address_v6_range.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v6_range.hpp
@@ -2,7 +2,7 @@
// ip/address_v6_range.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -39,7 +39,7 @@ public:
typedef basic_address_iterator<address_v6> iterator;
/// Construct an empty range.
- basic_address_range() ASIO_NOEXCEPT
+ basic_address_range() noexcept
: begin_(address_v6()),
end_(address_v6())
{
@@ -47,68 +47,63 @@ public:
/// Construct an range that represents the given range of addresses.
explicit basic_address_range(const iterator& first,
- const iterator& last) ASIO_NOEXCEPT
+ const iterator& last) noexcept
: begin_(first),
end_(last)
{
}
/// Copy constructor.
- basic_address_range(const basic_address_range& other) ASIO_NOEXCEPT
+ basic_address_range(const basic_address_range& other) noexcept
: begin_(other.begin_),
end_(other.end_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_range(basic_address_range&& other) ASIO_NOEXCEPT
- : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)),
- end_(ASIO_MOVE_CAST(iterator)(other.end_))
+ basic_address_range(basic_address_range&& other) noexcept
+ : begin_(static_cast<iterator&&>(other.begin_)),
+ end_(static_cast<iterator&&>(other.end_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
basic_address_range& operator=(
- const basic_address_range& other) ASIO_NOEXCEPT
+ const basic_address_range& other) noexcept
{
begin_ = other.begin_;
end_ = other.end_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_range& operator=(
- basic_address_range&& other) ASIO_NOEXCEPT
+ basic_address_range& operator=(basic_address_range&& other) noexcept
{
- begin_ = ASIO_MOVE_CAST(iterator)(other.begin_);
- end_ = ASIO_MOVE_CAST(iterator)(other.end_);
+ begin_ = static_cast<iterator&&>(other.begin_);
+ end_ = static_cast<iterator&&>(other.end_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain an iterator that points to the start of the range.
- iterator begin() const ASIO_NOEXCEPT
+ iterator begin() const noexcept
{
return begin_;
}
/// Obtain an iterator that points to the end of the range.
- iterator end() const ASIO_NOEXCEPT
+ iterator end() const noexcept
{
return end_;
}
/// Determine whether the range is empty.
- bool empty() const ASIO_NOEXCEPT
+ bool empty() const noexcept
{
return begin_ == end_;
}
/// Find an address in the range.
- iterator find(const address_v6& addr) const ASIO_NOEXCEPT
+ iterator find(const address_v6& addr) const noexcept
{
return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
}
diff --git a/3rdparty/asio/include/asio/ip/bad_address_cast.hpp b/3rdparty/asio/include/asio/ip/bad_address_cast.hpp
index 6c479146595..3d242f07048 100644
--- a/3rdparty/asio/include/asio/ip/bad_address_cast.hpp
+++ b/3rdparty/asio/include/asio/ip/bad_address_cast.hpp
@@ -2,7 +2,7 @@
// ip/bad_address_cast.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,17 +24,32 @@ namespace asio {
namespace ip {
/// Thrown to indicate a failed address conversion.
-class bad_address_cast : public std::bad_cast
+class bad_address_cast :
+#if defined(ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
+ public std::exception
+#else
+ public std::bad_cast
+#endif
{
public:
/// Default constructor.
bad_address_cast() {}
+ /// Copy constructor.
+ bad_address_cast(const bad_address_cast& other) noexcept
+#if defined(ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
+ : std::exception(static_cast<const std::exception&>(other))
+#else
+ : std::bad_cast(static_cast<const std::bad_cast&>(other))
+#endif
+ {
+ }
+
/// Destructor.
- virtual ~bad_address_cast() ASIO_NOEXCEPT_OR_NOTHROW {}
+ virtual ~bad_address_cast() noexcept {}
/// Get the message associated with the exception.
- virtual const char* what() const ASIO_NOEXCEPT_OR_NOTHROW
+ virtual const char* what() const noexcept
{
return "bad address cast";
}
diff --git a/3rdparty/asio/include/asio/ip/basic_endpoint.hpp b/3rdparty/asio/include/asio/ip/basic_endpoint.hpp
index d48f6441a6e..3dfb1248db7 100644
--- a/3rdparty/asio/include/asio/ip/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,8 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
+#include "asio/detail/cstdint.hpp"
#include "asio/ip/address.hpp"
#include "asio/ip/detail/endpoint.hpp"
@@ -28,6 +30,9 @@
namespace asio {
namespace ip {
+/// Type used for storing port numbers.
+typedef uint_least16_t port_type;
+
/// Describes an endpoint for a version-independent IP socket.
/**
* The asio::ip::basic_endpoint class template describes an endpoint that
@@ -56,7 +61,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint()
+ basic_endpoint() noexcept
: impl_()
{
}
@@ -78,7 +83,7 @@ public:
* @endcode
*/
basic_endpoint(const InternetProtocol& internet_protocol,
- unsigned short port_num)
+ port_type port_num) noexcept
: impl_(internet_protocol.family(), port_num)
{
}
@@ -86,43 +91,40 @@ public:
/// Construct an endpoint using a port number and an IP address. This
/// constructor may be used for accepting connections on a specific interface
/// or for making a connection to a remote endpoint.
- basic_endpoint(const asio::ip::address& addr, unsigned short port_num)
+ basic_endpoint(const asio::ip::address& addr,
+ port_type port_num) noexcept
: impl_(addr, port_num)
{
}
/// Copy constructor.
- basic_endpoint(const basic_endpoint& other)
+ basic_endpoint(const basic_endpoint& other) noexcept
: impl_(other.impl_)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- basic_endpoint(basic_endpoint&& other)
+ basic_endpoint(basic_endpoint&& other) noexcept
: impl_(other.impl_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other)
+ basic_endpoint& operator=(const basic_endpoint& other) noexcept
{
impl_ = other.impl_;
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other)
+ basic_endpoint& operator=(basic_endpoint&& other) noexcept
{
impl_ = other.impl_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// The protocol associated with the endpoint.
- protocol_type protocol() const
+ protocol_type protocol() const noexcept
{
if (impl_.is_v4())
return InternetProtocol::v4();
@@ -130,19 +132,19 @@ public:
}
/// Get the underlying endpoint in the native type.
- data_type* data()
+ data_type* data() noexcept
{
return impl_.data();
}
/// Get the underlying endpoint in the native type.
- const data_type* data() const
+ const data_type* data() const noexcept
{
return impl_.data();
}
/// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
+ std::size_t size() const noexcept
{
return impl_.size();
}
@@ -154,75 +156,75 @@ public:
}
/// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
+ std::size_t capacity() const noexcept
{
return impl_.capacity();
}
/// Get the port associated with the endpoint. The port number is always in
/// the host's byte order.
- unsigned short port() const
+ port_type port() const noexcept
{
return impl_.port();
}
/// Set the port associated with the endpoint. The port number is always in
/// the host's byte order.
- void port(unsigned short port_num)
+ void port(port_type port_num) noexcept
{
impl_.port(port_num);
}
/// Get the IP address associated with the endpoint.
- asio::ip::address address() const
+ asio::ip::address address() const noexcept
{
return impl_.address();
}
/// Set the IP address associated with the endpoint.
- void address(const asio::ip::address& addr)
+ void address(const asio::ip::address& addr) noexcept
{
impl_.address(addr);
}
/// Compare two endpoints for equality.
friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return e1.impl_ == e2.impl_;
}
/// Compare two endpoints for inequality.
friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return !(e1 == e2);
}
/// Compare endpoints for ordering.
friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return e1.impl_ < e2.impl_;
}
/// Compare endpoints for ordering.
friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return e2.impl_ < e1.impl_;
}
/// Compare endpoints for ordering.
friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return !(e2 < e1);
}
/// Compare endpoints for ordering.
friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return !(e1 < e2);
}
@@ -256,6 +258,23 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
+namespace std {
+
+template <typename InternetProtocol>
+struct hash<asio::ip::basic_endpoint<InternetProtocol>>
+{
+ std::size_t operator()(
+ const asio::ip::basic_endpoint<InternetProtocol>& ep)
+ const noexcept
+ {
+ std::size_t hash1 = std::hash<asio::ip::address>()(ep.address());
+ std::size_t hash2 = std::hash<unsigned short>()(ep.port());
+ return hash1 ^ (hash2 + 0x9e3779b9 + (hash1 << 6) + (hash1 >> 2));
+ }
+};
+
+} // namespace std
+
#include "asio/detail/pop_options.hpp"
#include "asio/ip/impl/basic_endpoint.hpp"
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver.hpp b/3rdparty/asio/include/asio/ip/basic_resolver.hpp
index 3aa61fb8dac..4d41bfde090 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,41 +17,40 @@
#include "asio/detail/config.hpp"
#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/string_view.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/ip/basic_resolver_iterator.hpp"
#include "asio/ip/basic_resolver_query.hpp"
#include "asio/ip/basic_resolver_results.hpp"
#include "asio/ip/resolver_base.hpp"
-
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/ip/resolver_service.hpp"
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/winrt_resolver_service.hpp"
-# define ASIO_SVC_T \
- asio::detail::winrt_resolver_service<InternetProtocol>
-# else
-# include "asio/detail/resolver_service.hpp"
-# define ASIO_SVC_T \
- asio::detail::resolver_service<InternetProtocol>
-# endif
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+#if defined(ASIO_WINDOWS_RUNTIME)
+# include "asio/detail/winrt_resolver_service.hpp"
+#else
+# include "asio/detail/resolver_service.hpp"
+#endif
#include "asio/detail/push_options.hpp"
namespace asio {
namespace ip {
+#if !defined(ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+#define ASIO_IP_BASIC_RESOLVER_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename InternetProtocol, typename Executor = any_io_executor>
+class basic_resolver;
+
+#endif // !defined(ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+
/// Provides endpoint resolution functionality.
/**
* The basic_resolver class template provides the ability to resolve a query
@@ -61,15 +60,24 @@ namespace ip {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename InternetProtocol
- ASIO_SVC_TPARAM_DEF1(= resolver_service<InternetProtocol>)>
+template <typename InternetProtocol, typename Executor>
class basic_resolver
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
- public resolver_base
+ : public resolver_base
{
+private:
+ class initiate_async_resolve;
+
public:
/// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
+ typedef Executor executor_type;
+
+ /// Rebinds the resolver type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The resolver type when rebound to the specified executor.
+ typedef basic_resolver<InternetProtocol, Executor1> other;
+ };
/// The protocol type.
typedef InternetProtocol protocol_type;
@@ -88,20 +96,36 @@ public:
/// The results type.
typedef basic_resolver_results<InternetProtocol> results_type;
- /// Constructor.
+ /// Construct with executor.
/**
* This constructor creates a basic_resolver.
*
- * @param io_context The io_context object that the resolver will use to
+ * @param ex The I/O executor that the resolver will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* resolver.
*/
- explicit basic_resolver(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
+ explicit basic_resolver(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct with execution context.
+ /**
+ * This constructor creates a basic_resolver.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the resolver will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the resolver.
+ */
+ template <typename ExecutionContext>
+ explicit basic_resolver(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_resolver from another.
/**
* This constructor moves a resolver from one object to another.
@@ -110,10 +134,33 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_resolver(io_context&) constructor.
+ * constructed using the @c basic_resolver(const executor_type&) constructor.
*/
basic_resolver(basic_resolver&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ // All resolvers have access to each other's implementations.
+ template <typename InternetProtocol1, typename Executor1>
+ friend class basic_resolver;
+
+ /// Move-construct a basic_resolver from another.
+ /**
+ * This constructor moves a resolver from one object to another.
+ *
+ * @param other The other basic_resolver 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_resolver(const executor_type&) constructor.
+ */
+ template <typename Executor1>
+ basic_resolver(basic_resolver<InternetProtocol, Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
+ : impl_(std::move(other.impl_))
{
}
@@ -127,64 +174,52 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_resolver(io_context&) constructor.
+ * constructed using the @c basic_resolver(const executor_type&) constructor.
*/
basic_resolver& operator=(basic_resolver&& other)
{
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
+ impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the resolver.
- /**
- * This function destroys the resolver, cancelling any outstanding
- * asynchronous wait operations associated with the resolver as if by calling
- * @c cancel.
- */
- ~basic_resolver()
- {
- }
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
+ /// Move-assign a basic_resolver from another.
/**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
+ * This assignment operator moves a resolver from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_resolver object from which the move will
+ * occur.
*
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_resolver(const executor_type&) constructor.
*/
- asio::io_context& get_io_context()
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_resolver&
+ > operator=(basic_resolver<InternetProtocol, Executor1>&& other)
{
- return basic_io_object<ASIO_SVC_T>::get_io_context();
+ basic_resolver tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
}
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
+ /// Destroys the resolver.
/**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
+ * This function destroys the resolver, cancelling any outstanding
+ * asynchronous wait operations associated with the resolver as if by calling
+ * @c cancel.
*/
- asio::io_context& get_io_service()
+ ~basic_resolver()
{
- return basic_io_object<ASIO_SVC_T>::get_io_service();
}
-#endif // !defined(ASIO_NO_DEPRECATED)
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
- return basic_io_object<ASIO_SVC_T>::get_executor();
+ return impl_.get_executor();
}
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
/// Cancel any asynchronous operations that are waiting on the resolver.
/**
@@ -194,11 +229,12 @@ public:
*/
void cancel()
{
- return this->get_service().cancel(this->get_implementation());
+ return impl_.get_service().cancel(impl_.get_implementation());
}
#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated.) Perform forward resolution of a query to a list of entries.
+ /// (Deprecated: Use overload with separate host and service parameters.)
+ /// Perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve a query into a list of endpoint entries.
*
@@ -213,13 +249,14 @@ public:
results_type resolve(const query& q)
{
asio::error_code ec;
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
+ results_type r = impl_.get_service().resolve(
+ impl_.get_implementation(), q, ec);
asio::detail::throw_error(ec, "resolve");
return r;
}
- /// (Deprecated.) Perform forward resolution of a query to a list of entries.
+ /// (Deprecated: Use overload with separate host and service parameters.)
+ /// Perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve a query into a list of endpoint entries.
*
@@ -233,7 +270,7 @@ public:
*/
results_type resolve(const query& q, asio::error_code& ec)
{
- return this->get_service().resolve(this->get_implementation(), q, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), q, ec);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -333,7 +370,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @returns A range object representing the list of endpoint entries. A
* successful call to this function is guaranteed to return a non-empty
@@ -358,8 +396,8 @@ public:
asio::error_code ec;
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
+ results_type r = impl_.get_service().resolve(
+ impl_.get_implementation(), q, ec);
asio::detail::throw_error(ec, "resolve");
return r;
}
@@ -382,7 +420,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @param ec Set to indicate what error occurred, if any.
*
@@ -407,7 +446,7 @@ public:
{
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- return this->get_service().resolve(this->get_implementation(), q, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), q, ec);
}
/// Perform forward resolution of a query to a list of entries.
@@ -516,7 +555,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @returns A range object representing the list of endpoint entries. A
* successful call to this function is guaranteed to return a non-empty
@@ -543,8 +583,8 @@ public:
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
+ results_type r = impl_.get_service().resolve(
+ impl_.get_implementation(), q, ec);
asio::detail::throw_error(ec, "resolve");
return r;
}
@@ -570,7 +610,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @param ec Set to indicate what error occurred, if any.
*
@@ -596,56 +637,52 @@ public:
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- return this->get_service().resolve(this->get_implementation(), q, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), q, ec);
}
#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated.) Asynchronously perform forward resolution of a query to a
- /// list of entries.
+ /// (Deprecated: Use overload with separate host and service parameters.)
+ /// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to asynchronously resolve a query into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param q A query object that determines what endpoints will be returned.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
*/
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const query& q,
- ASIO_MOVE_ARG(ResolveHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const query& q,
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token, q))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- asio::async_completion<ResolveHandler,
- void (asio::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ initiate_async_resolve(this), token, q);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -665,21 +702,26 @@ public:
* be an empty string, in which case all resolved endpoints will have a port
* number of 0.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -691,21 +733,27 @@ public:
* <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
* may use additional locations when resolving service names.
*/
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(ASIO_STRING_VIEW_PARAM host,
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(ASIO_STRING_VIEW_PARAM host,
ASIO_STRING_VIEW_PARAM service,
- ASIO_MOVE_ARG(ResolveHandler) handler)
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
return async_resolve(host, service, resolver_base::flags(),
- ASIO_MOVE_CAST(ResolveHandler)(handler));
+ static_cast<ResolveToken&&>(token));
}
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve host and service names into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param host A string identifying a location. May be a descriptive name or
* a numeric address string. If an empty string and the passive flag has been
@@ -720,23 +768,29 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -748,40 +802,31 @@ public:
* <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
* may use additional locations when resolving service names.
*/
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(ASIO_STRING_VIEW_PARAM host,
- ASIO_STRING_VIEW_PARAM service,
- resolver_base::flags resolve_flags,
- ASIO_MOVE_ARG(ResolveHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(ASIO_STRING_VIEW_PARAM host,
+ ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags,
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- asio::async_completion<ResolveHandler,
- void (asio::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ initiate_async_resolve(this), token, q);
}
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve host and service names into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param protocol A protocol object, normally representing either the IPv4 or
* IPv6 version of an internet protocol.
@@ -797,21 +842,26 @@ public:
* be an empty string, in which case all resolved endpoints will have a port
* number of 0.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -823,21 +873,27 @@ public:
* <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
* may use additional locations when resolving service names.
*/
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const protocol_type& protocol,
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const protocol_type& protocol,
ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
- ASIO_MOVE_ARG(ResolveHandler) handler)
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
return async_resolve(protocol, host, service, resolver_base::flags(),
- ASIO_MOVE_CAST(ResolveHandler)(handler));
+ static_cast<ResolveToken&&>(token));
}
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve host and service names into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param protocol A protocol object, normally representing either the IPv4 or
* IPv6 version of an internet protocol.
@@ -855,23 +911,29 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -883,35 +945,26 @@ public:
* <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
* may use additional locations when resolving service names.
*/
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const protocol_type& protocol,
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const protocol_type& protocol,
ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
resolver_base::flags resolve_flags,
- ASIO_MOVE_ARG(ResolveHandler) handler)
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- asio::async_completion<ResolveHandler,
- void (asio::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ initiate_async_resolve(this), token, q);
}
/// Perform reverse resolution of an endpoint to a list of entries.
@@ -931,8 +984,8 @@ public:
results_type resolve(const endpoint_type& e)
{
asio::error_code ec;
- results_type i = this->get_service().resolve(
- this->get_implementation(), e, ec);
+ results_type i = impl_.get_service().resolve(
+ impl_.get_implementation(), e, ec);
asio::detail::throw_error(ec, "resolve");
return i;
}
@@ -953,57 +1006,102 @@ public:
*/
results_type resolve(const endpoint_type& e, asio::error_code& ec)
{
- return this->get_service().resolve(this->get_implementation(), e, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), e, ec);
}
/// Asynchronously perform reverse resolution of an endpoint to a list of
/// entries.
/**
* This function is used to asynchronously resolve an endpoint into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param e An endpoint object that determines what endpoints will be
* returned.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
*/
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const endpoint_type& e,
- ASIO_MOVE_ARG(ResolveHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const endpoint_type& e,
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token, e))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), e,
- ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
- asio::async_completion<ResolveHandler,
- void (asio::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), e, init.completion_handler);
-
- return init.result.get();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+ return asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ initiate_async_resolve(this), token, e);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_resolver(const basic_resolver&) = delete;
+ basic_resolver& operator=(const basic_resolver&) = delete;
+
+ class initiate_async_resolve
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_resolve(basic_resolver* self)
+ : self_(self)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ResolveHandler, typename Query>
+ void operator()(ResolveHandler&& handler,
+ const Query& q) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ResolveHandler.
+ ASIO_RESOLVE_HANDLER_CHECK(
+ ResolveHandler, handler, results_type) type_check;
+
+ asio::detail::non_const_lvalue<ResolveHandler> handler2(handler);
+ self_->impl_.get_service().async_resolve(
+ self_->impl_.get_implementation(), q,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_resolver* self_;
+ };
+
+# if defined(ASIO_WINDOWS_RUNTIME)
+ asio::detail::io_object_impl<
+ asio::detail::winrt_resolver_service<InternetProtocol>,
+ Executor> impl_;
+# else
+ asio::detail::io_object_impl<
+ asio::detail::resolver_service<InternetProtocol>,
+ Executor> impl_;
+# endif
};
} // namespace ip
@@ -1011,8 +1109,4 @@ public:
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_IP_BASIC_RESOLVER_HPP
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp
index ce689aa7480..a65af27af50 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_entry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp
index 8cab75d1d63..b494f7ae02c 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -79,15 +79,13 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
basic_resolver_iterator(basic_resolver_iterator&& other)
- : values_(ASIO_MOVE_CAST(values_ptr_type)(other.values_)),
+ : values_(static_cast<values_ptr_type&&>(other.values_)),
index_(other.index_)
{
other.index_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assignment operator.
basic_resolver_iterator& operator=(const basic_resolver_iterator& other)
@@ -97,20 +95,18 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assignment operator.
basic_resolver_iterator& operator=(basic_resolver_iterator&& other)
{
if (this != &other)
{
- values_ = ASIO_MOVE_CAST(values_ptr_type)(other.values_);
+ values_ = static_cast<values_ptr_type&&>(other.values_);
index_ = other.index_;
other.index_ = 0;
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Dereference an iterator.
const basic_resolver_entry<InternetProtocol>& operator*() const
@@ -178,7 +174,7 @@ protected:
return (*values_)[index_];
}
- typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+ typedef std::vector<basic_resolver_entry<InternetProtocol>> values_type;
typedef asio::detail::shared_ptr<values_type> values_ptr_type;
values_ptr_type values_;
std::size_t index_;
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp
index 9bde9fea228..ada5a4f3802 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_query.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -212,6 +212,22 @@ public:
hints_.ai_next = 0;
}
+ /// Copy construct a @c basic_resolver_query from another.
+ basic_resolver_query(const basic_resolver_query& other)
+ : hints_(other.hints_),
+ host_name_(other.host_name_),
+ service_name_(other.service_name_)
+ {
+ }
+
+ /// Move construct a @c basic_resolver_query from another.
+ basic_resolver_query(basic_resolver_query&& other)
+ : hints_(other.hints_),
+ host_name_(static_cast<std::string&&>(other.host_name_)),
+ service_name_(static_cast<std::string&&>(other.service_name_))
+ {
+ }
+
/// Get the hints associated with the query.
const asio::detail::addrinfo_type& hints() const
{
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp
index dec2c7e955a..7a461f13bc4 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_results.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -62,7 +62,7 @@ public:
typedef typename protocol_type::endpoint endpoint_type;
/// The type of a value in the results range.
- typedef basic_resolver_entry<endpoint_type> value_type;
+ typedef basic_resolver_entry<protocol_type> value_type;
/// The type of a const reference to a value in the range.
typedef const value_type& const_reference;
@@ -93,14 +93,12 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
basic_resolver_results(basic_resolver_results&& other)
: basic_resolver_iterator<InternetProtocol>(
- ASIO_MOVE_CAST(basic_resolver_results)(other))
+ static_cast<basic_resolver_results&&>(other))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assignment operator.
basic_resolver_results& operator=(const basic_resolver_results& other)
@@ -109,15 +107,13 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assignment operator.
basic_resolver_results& operator=(basic_resolver_results&& other)
{
basic_resolver_iterator<InternetProtocol>::operator=(
- ASIO_MOVE_CAST(basic_resolver_results)(other));
+ static_cast<basic_resolver_results&&>(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
#if !defined(GENERATING_DOCUMENTATION)
// Create results from an addrinfo list returned by getaddrinfo.
@@ -230,21 +226,21 @@ public:
#endif // !defined(GENERATING_DOCUMENTATION)
/// Get the number of entries in the results range.
- size_type size() const ASIO_NOEXCEPT
+ size_type size() const noexcept
{
- return this->values_->size();
+ return this->values_ ? this->values_->size() : 0;
}
/// Get the maximum number of entries permitted in a results range.
- size_type max_size() const ASIO_NOEXCEPT
+ size_type max_size() const noexcept
{
- return this->values_->max_size();
+ return this->values_ ? this->values_->max_size() : values_type().max_size();
}
/// Determine whether the results range is empty.
- bool empty() const ASIO_NOEXCEPT
+ bool empty() const noexcept
{
- return this->values_->empty();
+ return this->values_ ? this->values_->empty() : true;
}
/// Obtain a begin iterator for the results range.
@@ -252,7 +248,7 @@ public:
{
basic_resolver_results tmp(*this);
tmp.index_ = 0;
- return tmp;
+ return static_cast<basic_resolver_results&&>(tmp);
}
/// Obtain an end iterator for the results range.
@@ -274,7 +270,7 @@ public:
}
/// Swap the results range with another.
- void swap(basic_resolver_results& that) ASIO_NOEXCEPT
+ void swap(basic_resolver_results& that) noexcept
{
if (this != &that)
{
@@ -300,7 +296,7 @@ public:
}
private:
- typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+ typedef std::vector<basic_resolver_entry<InternetProtocol>> values_type;
};
} // namespace ip
diff --git a/3rdparty/asio/include/asio/ip/detail/endpoint.hpp b/3rdparty/asio/include/asio/ip/detail/endpoint.hpp
index 82875a4440c..2c4e3cd43f3 100644
--- a/3rdparty/asio/include/asio/ip/detail/endpoint.hpp
+++ b/3rdparty/asio/include/asio/ip/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// ip/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -33,42 +33,43 @@ class endpoint
{
public:
// Default constructor.
- ASIO_DECL endpoint();
+ ASIO_DECL endpoint() noexcept;
// Construct an endpoint using a family and port number.
- ASIO_DECL endpoint(int family, unsigned short port_num);
+ ASIO_DECL endpoint(int family,
+ unsigned short port_num) noexcept;
// Construct an endpoint using an address and port number.
ASIO_DECL endpoint(const asio::ip::address& addr,
- unsigned short port_num);
+ unsigned short port_num) noexcept;
// Copy constructor.
- endpoint(const endpoint& other)
+ endpoint(const endpoint& other) noexcept
: data_(other.data_)
{
}
// Assign from another endpoint.
- endpoint& operator=(const endpoint& other)
+ endpoint& operator=(const endpoint& other) noexcept
{
data_ = other.data_;
return *this;
}
// Get the underlying endpoint in the native type.
- asio::detail::socket_addr_type* data()
+ asio::detail::socket_addr_type* data() noexcept
{
return &data_.base;
}
// Get the underlying endpoint in the native type.
- const asio::detail::socket_addr_type* data() const
+ const asio::detail::socket_addr_type* data() const noexcept
{
return &data_.base;
}
// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
+ std::size_t size() const noexcept
{
if (is_v4())
return sizeof(asio::detail::sockaddr_in4_type);
@@ -80,33 +81,34 @@ public:
ASIO_DECL void resize(std::size_t new_size);
// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
+ std::size_t capacity() const noexcept
{
return sizeof(data_);
}
// Get the port associated with the endpoint.
- ASIO_DECL unsigned short port() const;
+ ASIO_DECL unsigned short port() const noexcept;
// Set the port associated with the endpoint.
- ASIO_DECL void port(unsigned short port_num);
+ ASIO_DECL void port(unsigned short port_num) noexcept;
// Get the IP address associated with the endpoint.
- ASIO_DECL asio::ip::address address() const;
+ ASIO_DECL asio::ip::address address() const noexcept;
// Set the IP address associated with the endpoint.
- ASIO_DECL void address(const asio::ip::address& addr);
+ ASIO_DECL void address(
+ const asio::ip::address& addr) noexcept;
// Compare two endpoints for equality.
- ASIO_DECL friend bool operator==(
- const endpoint& e1, const endpoint& e2);
+ ASIO_DECL friend bool operator==(const endpoint& e1,
+ const endpoint& e2) noexcept;
// Compare endpoints for ordering.
- ASIO_DECL friend bool operator<(
- const endpoint& e1, const endpoint& e2);
+ ASIO_DECL friend bool operator<(const endpoint& e1,
+ const endpoint& e2) noexcept;
// Determine whether the endpoint is IPv4.
- bool is_v4() const
+ bool is_v4() const noexcept
{
return data_.base.sa_family == ASIO_OS_DEF(AF_INET);
}
diff --git a/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp b/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp
index 2f76137ef61..ef61208e234 100644
--- a/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp
+++ b/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// ip/detail/impl/endpoint.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -31,7 +31,7 @@ namespace asio {
namespace ip {
namespace detail {
-endpoint::endpoint()
+endpoint::endpoint() noexcept
: data_()
{
data_.v4.sin_family = ASIO_OS_DEF(AF_INET);
@@ -39,7 +39,7 @@ endpoint::endpoint()
data_.v4.sin_addr.s_addr = ASIO_OS_DEF(INADDR_ANY);
}
-endpoint::endpoint(int family, unsigned short port_num)
+endpoint::endpoint(int family, unsigned short port_num) noexcept
: data_()
{
using namespace std; // For memcpy.
@@ -57,19 +57,19 @@ endpoint::endpoint(int family, unsigned short port_num)
asio::detail::socket_ops::host_to_network_short(port_num);
data_.v6.sin6_flowinfo = 0;
data_.v6.sin6_addr.s6_addr[0] = 0; data_.v6.sin6_addr.s6_addr[1] = 0;
- data_.v6.sin6_addr.s6_addr[2] = 0, data_.v6.sin6_addr.s6_addr[3] = 0;
- data_.v6.sin6_addr.s6_addr[4] = 0, data_.v6.sin6_addr.s6_addr[5] = 0;
- data_.v6.sin6_addr.s6_addr[6] = 0, data_.v6.sin6_addr.s6_addr[7] = 0;
- data_.v6.sin6_addr.s6_addr[8] = 0, data_.v6.sin6_addr.s6_addr[9] = 0;
- data_.v6.sin6_addr.s6_addr[10] = 0, data_.v6.sin6_addr.s6_addr[11] = 0;
- data_.v6.sin6_addr.s6_addr[12] = 0, data_.v6.sin6_addr.s6_addr[13] = 0;
- data_.v6.sin6_addr.s6_addr[14] = 0, data_.v6.sin6_addr.s6_addr[15] = 0;
+ data_.v6.sin6_addr.s6_addr[2] = 0; data_.v6.sin6_addr.s6_addr[3] = 0;
+ data_.v6.sin6_addr.s6_addr[4] = 0; data_.v6.sin6_addr.s6_addr[5] = 0;
+ data_.v6.sin6_addr.s6_addr[6] = 0; data_.v6.sin6_addr.s6_addr[7] = 0;
+ data_.v6.sin6_addr.s6_addr[8] = 0; data_.v6.sin6_addr.s6_addr[9] = 0;
+ data_.v6.sin6_addr.s6_addr[10] = 0; data_.v6.sin6_addr.s6_addr[11] = 0;
+ data_.v6.sin6_addr.s6_addr[12] = 0; data_.v6.sin6_addr.s6_addr[13] = 0;
+ data_.v6.sin6_addr.s6_addr[14] = 0; data_.v6.sin6_addr.s6_addr[15] = 0;
data_.v6.sin6_scope_id = 0;
}
}
endpoint::endpoint(const asio::ip::address& addr,
- unsigned short port_num)
+ unsigned short port_num) noexcept
: data_()
{
using namespace std; // For memcpy.
@@ -106,7 +106,7 @@ void endpoint::resize(std::size_t new_size)
}
}
-unsigned short endpoint::port() const
+unsigned short endpoint::port() const noexcept
{
if (is_v4())
{
@@ -120,7 +120,7 @@ unsigned short endpoint::port() const
}
}
-void endpoint::port(unsigned short port_num)
+void endpoint::port(unsigned short port_num) noexcept
{
if (is_v4())
{
@@ -134,7 +134,7 @@ void endpoint::port(unsigned short port_num)
}
}
-asio::ip::address endpoint::address() const
+asio::ip::address endpoint::address() const noexcept
{
using namespace std; // For memcpy.
if (is_v4())
@@ -146,27 +146,23 @@ asio::ip::address endpoint::address() const
else
{
asio::ip::address_v6::bytes_type bytes;
-#if defined(ASIO_HAS_STD_ARRAY)
memcpy(bytes.data(), data_.v6.sin6_addr.s6_addr, 16);
-#else // defined(ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, data_.v6.sin6_addr.s6_addr, 16);
-#endif // defined(ASIO_HAS_STD_ARRAY)
return asio::ip::address_v6(bytes, data_.v6.sin6_scope_id);
}
}
-void endpoint::address(const asio::ip::address& addr)
+void endpoint::address(const asio::ip::address& addr) noexcept
{
endpoint tmp_endpoint(addr, port());
data_ = tmp_endpoint.data_;
}
-bool operator==(const endpoint& e1, const endpoint& e2)
+bool operator==(const endpoint& e1, const endpoint& e2) noexcept
{
return e1.address() == e2.address() && e1.port() == e2.port();
}
-bool operator<(const endpoint& e1, const endpoint& e2)
+bool operator<(const endpoint& e1, const endpoint& e2) noexcept
{
if (e1.address() < e2.address())
return true;
diff --git a/3rdparty/asio/include/asio/ip/detail/socket_option.hpp b/3rdparty/asio/include/asio/ip/detail/socket_option.hpp
index d555a408965..c9883ae033e 100644
--- a/3rdparty/asio/include/asio/ip/detail/socket_option.hpp
+++ b/3rdparty/asio/include/asio/ip/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/host_name.hpp b/3rdparty/asio/include/asio/ip/host_name.hpp
index 6e556c62bd2..f9cb1852cae 100644
--- a/3rdparty/asio/include/asio/ip/host_name.hpp
+++ b/3rdparty/asio/include/asio/ip/host_name.hpp
@@ -2,7 +2,7 @@
// ip/host_name.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/icmp.hpp b/3rdparty/asio/include/asio/ip/icmp.hpp
index 752a82c809c..9e4e8e4cb5b 100644
--- a/3rdparty/asio/include/asio/ip/icmp.hpp
+++ b/3rdparty/asio/include/asio/ip/icmp.hpp
@@ -2,7 +2,7 @@
// ip/icmp.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -46,33 +46,33 @@ public:
typedef basic_endpoint<icmp> endpoint;
/// Construct to represent the IPv4 ICMP protocol.
- static icmp v4()
+ static icmp v4() noexcept
{
return icmp(ASIO_OS_DEF(IPPROTO_ICMP),
ASIO_OS_DEF(AF_INET));
}
/// Construct to represent the IPv6 ICMP protocol.
- static icmp v6()
+ static icmp v6() noexcept
{
return icmp(ASIO_OS_DEF(IPPROTO_ICMPV6),
ASIO_OS_DEF(AF_INET6));
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_RAW);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
@@ -97,7 +97,7 @@ public:
private:
// Construct with a specific family.
- explicit icmp(int protocol_id, int protocol_family)
+ explicit icmp(int protocol_id, int protocol_family) noexcept
: protocol_(protocol_id),
family_(protocol_family)
{
diff --git a/3rdparty/asio/include/asio/ip/impl/address.hpp b/3rdparty/asio/include/asio/ip/impl/address.hpp
index c64fb023723..5780f320067 100644
--- a/3rdparty/asio/include/asio/ip/impl/address.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/address.hpp
@@ -2,7 +2,7 @@
// ip/impl/address.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/address.ipp b/3rdparty/asio/include/asio/ip/impl/address.ipp
index c558d9a0a4f..9893b4ce9c2 100644
--- a/3rdparty/asio/include/asio/ip/impl/address.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/address.ipp
@@ -2,7 +2,7 @@
// ip/impl/address.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -29,44 +29,44 @@
namespace asio {
namespace ip {
-address::address()
+address::address() noexcept
: type_(ipv4),
ipv4_address_(),
ipv6_address_()
{
}
-address::address(const asio::ip::address_v4& ipv4_address)
+address::address(
+ const asio::ip::address_v4& ipv4_address) noexcept
: type_(ipv4),
ipv4_address_(ipv4_address),
ipv6_address_()
{
}
-address::address(const asio::ip::address_v6& ipv6_address)
+address::address(
+ const asio::ip::address_v6& ipv6_address) noexcept
: type_(ipv6),
ipv4_address_(),
ipv6_address_(ipv6_address)
{
}
-address::address(const address& other)
+address::address(const address& other) noexcept
: type_(other.type_),
ipv4_address_(other.ipv4_address_),
ipv6_address_(other.ipv6_address_)
{
}
-#if defined(ASIO_HAS_MOVE)
-address::address(address&& other)
+address::address(address&& other) noexcept
: type_(other.type_),
ipv4_address_(other.ipv4_address_),
ipv6_address_(other.ipv6_address_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
-address& address::operator=(const address& other)
+address& address::operator=(const address& other) noexcept
{
type_ = other.type_;
ipv4_address_ = other.ipv4_address_;
@@ -74,17 +74,16 @@ address& address::operator=(const address& other)
return *this;
}
-#if defined(ASIO_HAS_MOVE)
-address& address::operator=(address&& other)
+address& address::operator=(address&& other) noexcept
{
type_ = other.type_;
ipv4_address_ = other.ipv4_address_;
ipv6_address_ = other.ipv6_address_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-address& address::operator=(const asio::ip::address_v4& ipv4_address)
+address& address::operator=(
+ const asio::ip::address_v4& ipv4_address) noexcept
{
type_ = ipv4;
ipv4_address_ = ipv4_address;
@@ -92,7 +91,8 @@ address& address::operator=(const asio::ip::address_v4& ipv4_address)
return *this;
}
-address& address::operator=(const asio::ip::address_v6& ipv6_address)
+address& address::operator=(
+ const asio::ip::address_v6& ipv6_address) noexcept
{
type_ = ipv6;
ipv4_address_ = asio::ip::address_v4();
@@ -108,7 +108,8 @@ address make_address(const char* str)
return addr;
}
-address make_address(const char* str, asio::error_code& ec)
+address make_address(const char* str,
+ asio::error_code& ec) noexcept
{
asio::ip::address_v6 ipv6_address =
asio::ip::make_address_v6(str, ec);
@@ -129,12 +130,12 @@ address make_address(const std::string& str)
}
address make_address(const std::string& str,
- asio::error_code& ec)
+ asio::error_code& ec) noexcept
{
return make_address(str.c_str(), ec);
}
-#if defined(ASIO_HAS_STD_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
address make_address(string_view str)
{
@@ -142,12 +143,12 @@ address make_address(string_view str)
}
address make_address(string_view str,
- asio::error_code& ec)
+ asio::error_code& ec) noexcept
{
return make_address(static_cast<std::string>(str), ec);
}
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
asio::ip::address_v4 address::to_v4() const
{
@@ -185,28 +186,28 @@ std::string address::to_string(asio::error_code& ec) const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address::is_loopback() const
+bool address::is_loopback() const noexcept
{
return (type_ == ipv4)
? ipv4_address_.is_loopback()
: ipv6_address_.is_loopback();
}
-bool address::is_unspecified() const
+bool address::is_unspecified() const noexcept
{
return (type_ == ipv4)
? ipv4_address_.is_unspecified()
: ipv6_address_.is_unspecified();
}
-bool address::is_multicast() const
+bool address::is_multicast() const noexcept
{
return (type_ == ipv4)
? ipv4_address_.is_multicast()
: ipv6_address_.is_multicast();
}
-bool operator==(const address& a1, const address& a2)
+bool operator==(const address& a1, const address& a2) noexcept
{
if (a1.type_ != a2.type_)
return false;
@@ -215,7 +216,7 @@ bool operator==(const address& a1, const address& a2)
return a1.ipv4_address_ == a2.ipv4_address_;
}
-bool operator<(const address& a1, const address& a2)
+bool operator<(const address& a1, const address& a2) noexcept
{
if (a1.type_ < a2.type_)
return true;
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v4.hpp b/3rdparty/asio/include/asio/ip/impl/address_v4.hpp
index 1897fd2675f..5e29a249ba8 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v4.ipp b/3rdparty/asio/include/asio/ip/impl/address_v4.ipp
index 09439eb16c2..d7803271ac9 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v4.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -57,19 +57,15 @@ address_v4::address_v4(address_v4::uint_type addr)
static_cast<asio::detail::u_long_type>(addr));
}
-address_v4::bytes_type address_v4::to_bytes() const
+address_v4::bytes_type address_v4::to_bytes() const noexcept
{
using namespace std; // For memcpy.
bytes_type bytes;
-#if defined(ASIO_HAS_STD_ARRAY)
memcpy(bytes.data(), &addr_.s_addr, 4);
-#else // defined(ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, &addr_.s_addr, 4);
-#endif // defined(ASIO_HAS_STD_ARRAY)
return bytes;
}
-address_v4::uint_type address_v4::to_uint() const
+address_v4::uint_type address_v4::to_uint() const noexcept
{
return asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
}
@@ -108,12 +104,12 @@ std::string address_v4::to_string(asio::error_code& ec) const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v4::is_loopback() const
+bool address_v4::is_loopback() const noexcept
{
return (to_uint() & 0xFF000000) == 0x7F000000;
}
-bool address_v4::is_unspecified() const
+bool address_v4::is_unspecified() const noexcept
{
return to_uint() == 0;
}
@@ -135,7 +131,7 @@ bool address_v4::is_class_c() const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v4::is_multicast() const
+bool address_v4::is_multicast() const noexcept
{
return (to_uint() & 0xF0000000) == 0xE0000000;
}
@@ -166,8 +162,8 @@ address_v4 make_address_v4(const char* str)
return addr;
}
-address_v4 make_address_v4(
- const char* str, asio::error_code& ec)
+address_v4 make_address_v4(const char* str,
+ asio::error_code& ec) noexcept
{
address_v4::bytes_type bytes;
if (asio::detail::socket_ops::inet_pton(
@@ -181,13 +177,13 @@ address_v4 make_address_v4(const std::string& str)
return make_address_v4(str.c_str());
}
-address_v4 make_address_v4(
- const std::string& str, asio::error_code& ec)
+address_v4 make_address_v4(const std::string& str,
+ asio::error_code& ec) noexcept
{
return make_address_v4(str.c_str(), ec);
}
-#if defined(ASIO_HAS_STD_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
address_v4 make_address_v4(string_view str)
{
@@ -195,12 +191,12 @@ address_v4 make_address_v4(string_view str)
}
address_v4 make_address_v4(string_view str,
- asio::error_code& ec)
+ asio::error_code& ec) noexcept
{
return make_address_v4(static_cast<std::string>(str), ec);
}
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
} // namespace ip
} // namespace asio
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v6.hpp b/3rdparty/asio/include/asio/ip/impl/address_v6.hpp
index 407d9c1802e..b4b53abe069 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v6.ipp b/3rdparty/asio/include/asio/ip/impl/address_v6.ipp
index 79025aed7d4..8d5b7d1fd09 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v6.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -31,14 +31,14 @@
namespace asio {
namespace ip {
-address_v6::address_v6()
+address_v6::address_v6() noexcept
: addr_(),
scope_id_(0)
{
}
address_v6::address_v6(const address_v6::bytes_type& bytes,
- unsigned long scope)
+ scope_id_type scope)
: scope_id_(scope)
{
#if UCHAR_MAX > 0xFF
@@ -56,45 +56,37 @@ address_v6::address_v6(const address_v6::bytes_type& bytes,
memcpy(addr_.s6_addr, bytes.data(), 16);
}
-address_v6::address_v6(const address_v6& other)
+address_v6::address_v6(const address_v6& other) noexcept
: addr_(other.addr_),
scope_id_(other.scope_id_)
{
}
-#if defined(ASIO_HAS_MOVE)
-address_v6::address_v6(address_v6&& other)
+address_v6::address_v6(address_v6&& other) noexcept
: addr_(other.addr_),
scope_id_(other.scope_id_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(const address_v6& other)
+address_v6& address_v6::operator=(const address_v6& other) noexcept
{
addr_ = other.addr_;
scope_id_ = other.scope_id_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(address_v6&& other)
+address_v6& address_v6::operator=(address_v6&& other) noexcept
{
addr_ = other.addr_;
scope_id_ = other.scope_id_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-address_v6::bytes_type address_v6::to_bytes() const
+address_v6::bytes_type address_v6::to_bytes() const noexcept
{
using namespace std; // For memcpy.
bytes_type bytes;
-#if defined(ASIO_HAS_STD_ARRAY)
memcpy(bytes.data(), addr_.s6_addr, 16);
-#else // defined(ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, addr_.s6_addr, 16);
-#endif // defined(ASIO_HAS_STD_ARRAY)
return bytes;
}
@@ -138,7 +130,7 @@ address_v4 address_v6::to_v4() const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v6::is_loopback() const
+bool address_v6::is_loopback() const noexcept
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -150,7 +142,7 @@ bool address_v6::is_loopback() const
&& (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 1));
}
-bool address_v6::is_unspecified() const
+bool address_v6::is_unspecified() const noexcept
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -162,17 +154,17 @@ bool address_v6::is_unspecified() const
&& (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 0));
}
-bool address_v6::is_link_local() const
+bool address_v6::is_link_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0x80));
}
-bool address_v6::is_site_local() const
+bool address_v6::is_site_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0xc0));
}
-bool address_v6::is_v4_mapped() const
+bool address_v6::is_v4_mapped() const noexcept
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -198,37 +190,37 @@ bool address_v6::is_v4_compatible() const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v6::is_multicast() const
+bool address_v6::is_multicast() const noexcept
{
return (addr_.s6_addr[0] == 0xff);
}
-bool address_v6::is_multicast_global() const
+bool address_v6::is_multicast_global() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x0e));
}
-bool address_v6::is_multicast_link_local() const
+bool address_v6::is_multicast_link_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x02));
}
-bool address_v6::is_multicast_node_local() const
+bool address_v6::is_multicast_node_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x01));
}
-bool address_v6::is_multicast_org_local() const
+bool address_v6::is_multicast_org_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x08));
}
-bool address_v6::is_multicast_site_local() const
+bool address_v6::is_multicast_site_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x05));
}
-bool operator==(const address_v6& a1, const address_v6& a2)
+bool operator==(const address_v6& a1, const address_v6& a2) noexcept
{
using namespace std; // For memcmp.
return memcmp(&a1.addr_, &a2.addr_,
@@ -236,7 +228,7 @@ bool operator==(const address_v6& a1, const address_v6& a2)
&& a1.scope_id_ == a2.scope_id_;
}
-bool operator<(const address_v6& a1, const address_v6& a2)
+bool operator<(const address_v6& a1, const address_v6& a2) noexcept
{
using namespace std; // For memcmp.
int memcmp_result = memcmp(&a1.addr_, &a2.addr_,
@@ -248,7 +240,7 @@ bool operator<(const address_v6& a1, const address_v6& a2)
return a1.scope_id_ < a2.scope_id_;
}
-address_v6 address_v6::loopback()
+address_v6 address_v6::loopback() noexcept
{
address_v6 tmp;
tmp.addr_.s6_addr[15] = 1;
@@ -281,8 +273,8 @@ address_v6 make_address_v6(const char* str)
return addr;
}
-address_v6 make_address_v6(
- const char* str, asio::error_code& ec)
+address_v6 make_address_v6(const char* str,
+ asio::error_code& ec) noexcept
{
address_v6::bytes_type bytes;
unsigned long scope_id = 0;
@@ -297,13 +289,13 @@ address_v6 make_address_v6(const std::string& str)
return make_address_v6(str.c_str());
}
-address_v6 make_address_v6(
- const std::string& str, asio::error_code& ec)
+address_v6 make_address_v6(const std::string& str,
+ asio::error_code& ec) noexcept
{
return make_address_v6(str.c_str(), ec);
}
-#if defined(ASIO_HAS_STD_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
address_v6 make_address_v6(string_view str)
{
@@ -311,12 +303,12 @@ address_v6 make_address_v6(string_view str)
}
address_v6 make_address_v6(string_view str,
- asio::error_code& ec)
+ asio::error_code& ec) noexcept
{
return make_address_v6(static_cast<std::string>(str), ec);
}
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
address_v4 make_address_v4(
v4_mapped_t, const address_v6& v6_addr)
diff --git a/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp b/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp
index c1a29a8a4eb..2da96c16547 100644
--- a/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/impl/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/host_name.ipp b/3rdparty/asio/include/asio/ip/impl/host_name.ipp
index a1f8a0d331f..eb27829fdab 100644
--- a/3rdparty/asio/include/asio/ip/impl/host_name.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/host_name.ipp
@@ -2,7 +2,7 @@
// ip/impl/host_name.ipp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v4.hpp b/3rdparty/asio/include/asio/ip/impl/network_v4.hpp
index 34c03fdd378..2199c7da8ca 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/network_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v4.ipp b/3rdparty/asio/include/asio/ip/impl/network_v4.ipp
index ec39aae1c04..e7e68ed443a 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v4.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/network_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -91,7 +91,7 @@ network_v4::network_v4(const address_v4& addr, const address_v4& mask)
}
}
-address_v4 network_v4::netmask() const ASIO_NOEXCEPT
+address_v4 network_v4::netmask() const noexcept
{
uint32_t nmbits = 0xffffffff;
if (prefix_length_ == 0)
@@ -101,7 +101,7 @@ address_v4 network_v4::netmask() const ASIO_NOEXCEPT
return address_v4(nmbits);
}
-address_v4_range network_v4::hosts() const ASIO_NOEXCEPT
+address_v4_range network_v4::hosts() const noexcept
{
return is_host()
? address_v4_range(address_, address_v4(address_.to_uint() + 1))
@@ -126,9 +126,12 @@ std::string network_v4::to_string() const
std::string network_v4::to_string(asio::error_code& ec) const
{
+ using namespace std; // For sprintf.
ec = asio::error_code();
char prefix_len[16];
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(prefix_len, "/%u", prefix_length_);
@@ -178,11 +181,21 @@ network_v4 make_network_v4(const std::string& str,
return network_v4();
}
- return network_v4(make_address_v4(str.substr(0, pos)),
- std::atoi(str.substr(pos + 1).c_str()));
+ const address_v4 addr = make_address_v4(str.substr(0, pos), ec);
+ if (ec)
+ return network_v4();
+
+ const int prefix_len = std::atoi(str.substr(pos + 1).c_str());
+ if (prefix_len < 0 || prefix_len > 32)
+ {
+ ec = asio::error::invalid_argument;
+ return network_v4();
+ }
+
+ return network_v4(addr, static_cast<unsigned short>(prefix_len));
}
-#if defined(ASIO_HAS_STD_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
network_v4 make_network_v4(string_view str)
{
@@ -195,7 +208,7 @@ network_v4 make_network_v4(string_view str,
return make_network_v4(static_cast<std::string>(str), ec);
}
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
} // namespace ip
} // namespace asio
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v6.hpp b/3rdparty/asio/include/asio/ip/impl/network_v6.hpp
index 03b9ed899eb..69c121813cb 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/network_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v6.ipp b/3rdparty/asio/include/asio/ip/impl/network_v6.ipp
index c2418e3e955..d85cd647e06 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v6.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/network_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -42,7 +42,7 @@ network_v6::network_v6(const address_v6& addr, unsigned short prefix_len)
}
}
-ASIO_DECL address_v6 network_v6::network() const ASIO_NOEXCEPT
+ASIO_DECL address_v6 network_v6::network() const noexcept
{
address_v6::bytes_type bytes(address_.to_bytes());
for (std::size_t i = 0; i < 16; ++i)
@@ -55,7 +55,7 @@ ASIO_DECL address_v6 network_v6::network() const ASIO_NOEXCEPT
return address_v6(bytes, address_.scope_id());
}
-address_v6_range network_v6::hosts() const ASIO_NOEXCEPT
+address_v6_range network_v6::hosts() const noexcept
{
address_v6::bytes_type begin_bytes(address_.to_bytes());
address_v6::bytes_type end_bytes(address_.to_bytes());
@@ -95,9 +95,12 @@ std::string network_v6::to_string() const
std::string network_v6::to_string(asio::error_code& ec) const
{
+ using namespace std; // For sprintf.
ec = asio::error_code();
char prefix_len[16];
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(prefix_len, "/%u", prefix_length_);
@@ -147,11 +150,21 @@ network_v6 make_network_v6(const std::string& str,
return network_v6();
}
- return network_v6(make_address_v6(str.substr(0, pos)),
- std::atoi(str.substr(pos + 1).c_str()));
+ const address_v6 addr = make_address_v6(str.substr(0, pos), ec);
+ if (ec)
+ return network_v6();
+
+ const int prefix_len = std::atoi(str.substr(pos + 1).c_str());
+ if (prefix_len < 0 || prefix_len > 128)
+ {
+ ec = asio::error::invalid_argument;
+ return network_v6();
+ }
+
+ return network_v6(addr, static_cast<unsigned short>(prefix_len));
}
-#if defined(ASIO_HAS_STD_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
network_v6 make_network_v6(string_view str)
{
@@ -164,7 +177,7 @@ network_v6 make_network_v6(string_view str,
return make_network_v6(static_cast<std::string>(str), ec);
}
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
} // namespace ip
} // namespace asio
diff --git a/3rdparty/asio/include/asio/ip/multicast.hpp b/3rdparty/asio/include/asio/ip/multicast.hpp
index 16fbf4cd7e8..363f5ed81d5 100644
--- a/3rdparty/asio/include/asio/ip/multicast.hpp
+++ b/3rdparty/asio/include/asio/ip/multicast.hpp
@@ -2,7 +2,7 @@
// ip/multicast.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -32,7 +32,7 @@ namespace multicast {
* @par Examples
* Setting the option to join a multicast group:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::address multicast_address =
* asio::ip::address::from_string("225.0.0.1");
@@ -60,7 +60,7 @@ typedef asio::ip::detail::socket_option::multicast_request<
* @par Examples
* Setting the option to leave a multicast group:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::address multicast_address =
* asio::ip::address::from_string("225.0.0.1");
@@ -88,7 +88,7 @@ typedef asio::ip::detail::socket_option::multicast_request<
* @par Examples
* Setting the option:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::address_v4 local_interface =
* asio::ip::address_v4::from_string("1.2.3.4");
@@ -116,7 +116,7 @@ typedef asio::ip::detail::socket_option::network_interface<
* @par Examples
* Setting the option:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::multicast::hops option(4);
* socket.set_option(option);
@@ -125,7 +125,7 @@ typedef asio::ip::detail::socket_option::network_interface<
* @par
* Getting the current option value:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::multicast::hops option;
* socket.get_option(option);
@@ -153,7 +153,7 @@ typedef asio::ip::detail::socket_option::multicast_hops<
* @par Examples
* Setting the option:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::multicast::enable_loopback option(true);
* socket.set_option(option);
@@ -162,7 +162,7 @@ typedef asio::ip::detail::socket_option::multicast_hops<
* @par
* Getting the current option value:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::multicast::enable_loopback option;
* socket.get_option(option);
diff --git a/3rdparty/asio/include/asio/ip/network_v4.hpp b/3rdparty/asio/include/asio/ip/network_v4.hpp
index 5980b8e510e..1c29ebec143 100644
--- a/3rdparty/asio/include/asio/ip/network_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/network_v4.hpp
@@ -2,7 +2,7 @@
// ip/network_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -40,7 +40,7 @@ class network_v4
{
public:
/// Default constructor.
- network_v4() ASIO_NOEXCEPT
+ network_v4() noexcept
: address_(),
prefix_length_(0)
{
@@ -55,78 +55,74 @@ public:
const address_v4& mask);
/// Copy constructor.
- network_v4(const network_v4& other) ASIO_NOEXCEPT
+ network_v4(const network_v4& other) noexcept
: address_(other.address_),
prefix_length_(other.prefix_length_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- network_v4(network_v4&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v4)(other.address_)),
+ network_v4(network_v4&& other) noexcept
+ : address_(static_cast<address_v4&&>(other.address_)),
prefix_length_(other.prefix_length_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another network.
- network_v4& operator=(const network_v4& other) ASIO_NOEXCEPT
+ network_v4& operator=(const network_v4& other) noexcept
{
address_ = other.address_;
prefix_length_ = other.prefix_length_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another network.
- network_v4& operator=(network_v4&& other) ASIO_NOEXCEPT
+ network_v4& operator=(network_v4&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v4)(other.address_);
+ address_ = static_cast<address_v4&&>(other.address_);
prefix_length_ = other.prefix_length_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain the address object specified when the network object was created.
- address_v4 address() const ASIO_NOEXCEPT
+ address_v4 address() const noexcept
{
return address_;
}
/// Obtain the prefix length that was specified when the network object was
/// created.
- unsigned short prefix_length() const ASIO_NOEXCEPT
+ unsigned short prefix_length() const noexcept
{
return prefix_length_;
}
/// Obtain the netmask that was specified when the network object was created.
- ASIO_DECL address_v4 netmask() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v4 netmask() const noexcept;
/// Obtain an address object that represents the network address.
- address_v4 network() const ASIO_NOEXCEPT
+ address_v4 network() const noexcept
{
return address_v4(address_.to_uint() & netmask().to_uint());
}
/// Obtain an address object that represents the network's broadcast address.
- address_v4 broadcast() const ASIO_NOEXCEPT
+ address_v4 broadcast() const noexcept
{
return address_v4(network().to_uint() | (netmask().to_uint() ^ 0xFFFFFFFF));
}
/// Obtain an address range corresponding to the hosts in the network.
- ASIO_DECL address_v4_range hosts() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v4_range hosts() const noexcept;
/// Obtain the true network address, omitting any host bits.
- network_v4 canonical() const ASIO_NOEXCEPT
+ network_v4 canonical() const noexcept
{
- return network_v4(network(), netmask());
+ return network_v4(network(), prefix_length());
}
/// Test if network is a valid host address.
- bool is_host() const ASIO_NOEXCEPT
+ bool is_host() const noexcept
{
return prefix_length_ == 32;
}
@@ -207,7 +203,7 @@ ASIO_DECL network_v4 make_network_v4(const std::string& str);
ASIO_DECL network_v4 make_network_v4(
const std::string& str, asio::error_code& ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
/// Create an IPv4 network from a string containing IP address and prefix
@@ -225,7 +221,7 @@ ASIO_DECL network_v4 make_network_v4(string_view str);
ASIO_DECL network_v4 make_network_v4(
string_view str, asio::error_code& ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
#if !defined(ASIO_NO_IOSTREAM)
diff --git a/3rdparty/asio/include/asio/ip/network_v6.hpp b/3rdparty/asio/include/asio/ip/network_v6.hpp
index 4e07dbbc71d..942ed9d2f29 100644
--- a/3rdparty/asio/include/asio/ip/network_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/network_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -40,7 +40,7 @@ class network_v6
{
public:
/// Default constructor.
- network_v6() ASIO_NOEXCEPT
+ network_v6() noexcept
: address_(),
prefix_length_(0)
{
@@ -51,66 +51,62 @@ public:
unsigned short prefix_len);
/// Copy constructor.
- network_v6(const network_v6& other) ASIO_NOEXCEPT
+ network_v6(const network_v6& other) noexcept
: address_(other.address_),
prefix_length_(other.prefix_length_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- network_v6(network_v6&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v6)(other.address_)),
+ network_v6(network_v6&& other) noexcept
+ : address_(static_cast<address_v6&&>(other.address_)),
prefix_length_(other.prefix_length_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another network.
- network_v6& operator=(const network_v6& other) ASIO_NOEXCEPT
+ network_v6& operator=(const network_v6& other) noexcept
{
address_ = other.address_;
prefix_length_ = other.prefix_length_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another network.
- network_v6& operator=(network_v6&& other) ASIO_NOEXCEPT
+ network_v6& operator=(network_v6&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v6)(other.address_);
+ address_ = static_cast<address_v6&&>(other.address_);
prefix_length_ = other.prefix_length_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain the address object specified when the network object was created.
- address_v6 address() const ASIO_NOEXCEPT
+ address_v6 address() const noexcept
{
return address_;
}
/// Obtain the prefix length that was specified when the network object was
/// created.
- unsigned short prefix_length() const ASIO_NOEXCEPT
+ unsigned short prefix_length() const noexcept
{
return prefix_length_;
}
/// Obtain an address object that represents the network address.
- ASIO_DECL address_v6 network() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v6 network() const noexcept;
/// Obtain an address range corresponding to the hosts in the network.
- ASIO_DECL address_v6_range hosts() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v6_range hosts() const noexcept;
/// Obtain the true network address, omitting any host bits.
- network_v6 canonical() const ASIO_NOEXCEPT
+ network_v6 canonical() const noexcept
{
return network_v6(network(), prefix_length());
}
/// Test if network is a valid host address.
- bool is_host() const ASIO_NOEXCEPT
+ bool is_host() const noexcept
{
return prefix_length_ == 128;
}
@@ -181,7 +177,7 @@ ASIO_DECL network_v6 make_network_v6(const std::string& str);
ASIO_DECL network_v6 make_network_v6(
const std::string& str, asio::error_code& ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW) \
+#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
/// Create an IPv6 network from a string containing IP address and prefix
@@ -199,7 +195,7 @@ ASIO_DECL network_v6 make_network_v6(string_view str);
ASIO_DECL network_v6 make_network_v6(
string_view str, asio::error_code& ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
#if !defined(ASIO_NO_IOSTREAM)
diff --git a/3rdparty/asio/include/asio/ip/resolver_base.hpp b/3rdparty/asio/include/asio/ip/resolver_base.hpp
index a8a94d5a2cc..9fa01ca9107 100644
--- a/3rdparty/asio/include/asio/ip/resolver_base.hpp
+++ b/3rdparty/asio/include/asio/ip/resolver_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/resolver_query_base.hpp b/3rdparty/asio/include/asio/ip/resolver_query_base.hpp
index 297c9c93f2c..892bc28e006 100644
--- a/3rdparty/asio/include/asio/ip/resolver_query_base.hpp
+++ b/3rdparty/asio/include/asio/ip/resolver_query_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_query_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ip/resolver_service.hpp b/3rdparty/asio/include/asio/ip/resolver_service.hpp
deleted file mode 100644
index 18e2dc193dc..00000000000
--- a/3rdparty/asio/include/asio/ip/resolver_service.hpp
+++ /dev/null
@@ -1,200 +0,0 @@
-//
-// ip/resolver_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_IP_RESOLVER_SERVICE_HPP
-#define ASIO_IP_RESOLVER_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/async_result.hpp"
-#include "asio/error_code.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/basic_resolver_iterator.hpp"
-#include "asio/ip/basic_resolver_query.hpp"
-#include "asio/ip/basic_resolver_results.hpp"
-
-#if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/winrt_resolver_service.hpp"
-#else
-# include "asio/detail/resolver_service.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace ip {
-
-/// Default service implementation for a resolver.
-template <typename InternetProtocol>
-class resolver_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<
- resolver_service<InternetProtocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef InternetProtocol protocol_type;
-
- /// The endpoint type.
- typedef typename InternetProtocol::endpoint endpoint_type;
-
- /// The query type.
- typedef basic_resolver_query<InternetProtocol> query_type;
-
- /// The iterator type.
- typedef basic_resolver_iterator<InternetProtocol> iterator_type;
-
- /// The results type.
- typedef basic_resolver_results<InternetProtocol> results_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_WINDOWS_RUNTIME)
- typedef asio::detail::winrt_resolver_service<InternetProtocol>
- service_impl_type;
-#else
- typedef asio::detail::resolver_service<InternetProtocol>
- service_impl_type;
-#endif
-
-public:
- /// The type of a resolver implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new resolver service for the specified io_context.
- explicit resolver_service(asio::io_context& io_context)
- : asio::detail::service_base<
- resolver_service<InternetProtocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new resolver implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new resolver implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another resolver implementation.
- void move_assign(implementation_type& impl,
- resolver_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a resolver implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Cancel pending asynchronous operations.
- void cancel(implementation_type& impl)
- {
- service_impl_.cancel(impl);
- }
-
- /// Resolve a query to a list of entries.
- results_type resolve(implementation_type& impl, const query_type& query,
- asio::error_code& ec)
- {
- return service_impl_.resolve(impl, query, ec);
- }
-
- /// Asynchronously resolve a query to a list of entries.
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(implementation_type& impl, const query_type& query,
- ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- asio::async_completion<ResolveHandler,
- void (asio::error_code, results_type)> init(handler);
-
- service_impl_.async_resolve(impl, query, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Resolve an endpoint to a list of entries.
- results_type resolve(implementation_type& impl,
- const endpoint_type& endpoint, asio::error_code& ec)
- {
- return service_impl_.resolve(impl, endpoint, ec);
- }
-
- /// Asynchronously resolve an endpoint to a list of entries.
- template <typename ResolveHandler>
- ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(implementation_type& impl, const endpoint_type& endpoint,
- ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- asio::async_completion<ResolveHandler,
- void (asio::error_code, results_type)> init(handler);
-
- service_impl_.async_resolve(impl, endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(asio::io_context::fork_event event)
- {
- service_impl_.notify_fork(event);
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace ip
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_IP_RESOLVER_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/ip/tcp.hpp b/3rdparty/asio/include/asio/ip/tcp.hpp
index 40e5470ad0f..b8319609ddb 100644
--- a/3rdparty/asio/include/asio/ip/tcp.hpp
+++ b/3rdparty/asio/include/asio/ip/tcp.hpp
@@ -2,7 +2,7 @@
// ip/tcp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -49,31 +49,31 @@ public:
typedef basic_endpoint<tcp> endpoint;
/// Construct to represent the IPv4 TCP protocol.
- static tcp v4()
+ static tcp v4() noexcept
{
return tcp(ASIO_OS_DEF(AF_INET));
}
/// Construct to represent the IPv6 TCP protocol.
- static tcp v6()
+ static tcp v6() noexcept
{
return tcp(ASIO_OS_DEF(AF_INET6));
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_STREAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return ASIO_OS_DEF(IPPROTO_TCP);
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
@@ -99,7 +99,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::no_delay option(true);
* socket.set_option(option);
@@ -108,7 +108,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::tcp::no_delay option;
* socket.get_option(option);
@@ -139,7 +139,7 @@ public:
private:
// Construct with a specific family.
- explicit tcp(int protocol_family)
+ explicit tcp(int protocol_family) noexcept
: family_(protocol_family)
{
}
diff --git a/3rdparty/asio/include/asio/ip/udp.hpp b/3rdparty/asio/include/asio/ip/udp.hpp
index a011accaff2..50c667a5371 100644
--- a/3rdparty/asio/include/asio/ip/udp.hpp
+++ b/3rdparty/asio/include/asio/ip/udp.hpp
@@ -2,7 +2,7 @@
// ip/udp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -46,31 +46,31 @@ public:
typedef basic_endpoint<udp> endpoint;
/// Construct to represent the IPv4 UDP protocol.
- static udp v4()
+ static udp v4() noexcept
{
return udp(ASIO_OS_DEF(AF_INET));
}
/// Construct to represent the IPv6 UDP protocol.
- static udp v6()
+ static udp v6() noexcept
{
return udp(ASIO_OS_DEF(AF_INET6));
}
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_DGRAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return ASIO_OS_DEF(IPPROTO_UDP);
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return family_;
}
@@ -95,7 +95,7 @@ public:
private:
// Construct with a specific family.
- explicit udp(int protocol_family)
+ explicit udp(int protocol_family) noexcept
: family_(protocol_family)
{
}
diff --git a/3rdparty/asio/include/asio/ip/unicast.hpp b/3rdparty/asio/include/asio/ip/unicast.hpp
index 8b768c2336f..4d68af877bc 100644
--- a/3rdparty/asio/include/asio/ip/unicast.hpp
+++ b/3rdparty/asio/include/asio/ip/unicast.hpp
@@ -2,7 +2,7 @@
// ip/unicast.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -32,7 +32,7 @@ namespace unicast {
* @par Examples
* Setting the option:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::unicast::hops option(4);
* socket.set_option(option);
@@ -41,7 +41,7 @@ namespace unicast {
* @par
* Getting the current option value:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::ip::unicast::hops option;
* socket.get_option(option);
diff --git a/3rdparty/asio/include/asio/ip/v6_only.hpp b/3rdparty/asio/include/asio/ip/v6_only.hpp
index 9106b25b6cd..0fc61213bda 100644
--- a/3rdparty/asio/include/asio/ip/v6_only.hpp
+++ b/3rdparty/asio/include/asio/ip/v6_only.hpp
@@ -2,7 +2,7 @@
// ip/v6_only.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -26,12 +26,12 @@ namespace ip {
/// Socket option for determining whether an IPv6 socket supports IPv6
/// communication only.
/**
- * Implements the IPPROTO_IPV6/IP_V6ONLY socket option.
+ * Implements the IPPROTO_IPV6/IPV6_V6ONLY socket option.
*
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::v6_only option(true);
* socket.set_option(option);
@@ -40,7 +40,7 @@ namespace ip {
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::ip::v6_only option;
* socket.get_option(option);
diff --git a/3rdparty/asio/include/asio/is_applicable_property.hpp b/3rdparty/asio/include/asio/is_applicable_property.hpp
new file mode 100644
index 00000000000..20ca981ad02
--- /dev/null
+++ b/3rdparty/asio/include/asio/is_applicable_property.hpp
@@ -0,0 +1,61 @@
+//
+// is_applicable_property.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IS_APPLICABLE_PROPERTY_HPP
+#define ASIO_IS_APPLICABLE_PROPERTY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename T, typename Property, typename = void>
+struct is_applicable_property_trait : false_type
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+struct is_applicable_property_trait<T, Property,
+ void_t<
+ enable_if_t<
+ !!Property::template is_applicable_property_v<T>
+ >
+ >> : true_type
+{
+};
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+} // namespace detail
+
+template <typename T, typename Property, typename = void>
+struct is_applicable_property :
+ detail::is_applicable_property_trait<T, Property>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+constexpr const bool is_applicable_property_v
+ = is_applicable_property<T, Property>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+} // namespace asio
+
+#endif // ASIO_IS_APPLICABLE_PROPERTY_HPP
diff --git a/3rdparty/asio/include/asio/is_contiguous_iterator.hpp b/3rdparty/asio/include/asio/is_contiguous_iterator.hpp
new file mode 100644
index 00000000000..a120d4d3761
--- /dev/null
+++ b/3rdparty/asio/include/asio/is_contiguous_iterator.hpp
@@ -0,0 +1,45 @@
+//
+// is_contiguous_iterator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_IS_CONTIGUOUS_ITERATOR_HPP
+#define ASIO_IS_CONTIGUOUS_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <iterator>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// The is_contiguous_iterator class is a traits class that may be used to
+/// determine whether a type is a contiguous iterator.
+template <typename T>
+struct is_contiguous_iterator :
+#if defined(ASIO_HAS_STD_CONCEPTS) \
+ || defined(GENERATING_DOCUMENTATION)
+ integral_constant<bool, std::contiguous_iterator<T>>
+#else // defined(ASIO_HAS_STD_CONCEPTS)
+ // || defined(GENERATING_DOCUMENTATION)
+ is_pointer<T>
+#endif // defined(ASIO_HAS_STD_CONCEPTS)
+ // || defined(GENERATING_DOCUMENTATION)
+{
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IS_CONTIGUOUS_ITERATOR_HPP
diff --git a/3rdparty/asio/include/asio/is_executor.hpp b/3rdparty/asio/include/asio/is_executor.hpp
index d5abf7b70c4..2c933a3949c 100644
--- a/3rdparty/asio/include/asio/is_executor.hpp
+++ b/3rdparty/asio/include/asio/is_executor.hpp
@@ -2,7 +2,7 @@
// is_executor.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/is_read_buffered.hpp b/3rdparty/asio/include/asio/is_read_buffered.hpp
index 10483b17b79..768f70fb7e1 100644
--- a/3rdparty/asio/include/asio/is_read_buffered.hpp
+++ b/3rdparty/asio/include/asio/is_read_buffered.hpp
@@ -2,7 +2,7 @@
// is_read_buffered.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/is_write_buffered.hpp b/3rdparty/asio/include/asio/is_write_buffered.hpp
index b0efbbb6841..1818fd4b2d5 100644
--- a/3rdparty/asio/include/asio/is_write_buffered.hpp
+++ b/3rdparty/asio/include/asio/is_write_buffered.hpp
@@ -2,7 +2,7 @@
// is_write_buffered.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/local/basic_endpoint.hpp b/3rdparty/asio/include/asio/local/basic_endpoint.hpp
index ae30100728a..d363f352531 100644
--- a/3rdparty/asio/include/asio/local/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/local/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// local/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -60,7 +60,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint()
+ basic_endpoint() noexcept
{
}
@@ -76,19 +76,25 @@ public:
{
}
+ #if defined(ASIO_HAS_STRING_VIEW)
+ /// Construct an endpoint using the specified path name.
+ basic_endpoint(string_view path_name)
+ : impl_(path_name)
+ {
+ }
+ #endif // defined(ASIO_HAS_STRING_VIEW)
+
/// Copy constructor.
basic_endpoint(const basic_endpoint& other)
: impl_(other.impl_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
basic_endpoint(basic_endpoint&& other)
: impl_(other.impl_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another endpoint.
basic_endpoint& operator=(const basic_endpoint& other)
@@ -97,14 +103,12 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another endpoint.
basic_endpoint& operator=(basic_endpoint&& other)
{
impl_ = other.impl_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// The protocol associated with the endpoint.
protocol_type protocol() const
diff --git a/3rdparty/asio/include/asio/local/connect_pair.hpp b/3rdparty/asio/include/asio/local/connect_pair.hpp
index 3542d9b05ae..b8608e40de5 100644
--- a/3rdparty/asio/include/asio/local/connect_pair.hpp
+++ b/3rdparty/asio/include/asio/local/connect_pair.hpp
@@ -2,7 +2,7 @@
// local/connect_pair.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -32,33 +32,28 @@ namespace asio {
namespace local {
/// Create a pair of connected sockets.
-template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
-void connect_pair(
- basic_socket<Protocol ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol ASIO_SVC_TARG1>& socket2);
+template <typename Protocol, typename Executor1, typename Executor2>
+void connect_pair(basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2);
/// Create a pair of connected sockets.
-template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
-ASIO_SYNC_OP_VOID connect_pair(
- basic_socket<Protocol ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol ASIO_SVC_TARG1>& socket2,
- asio::error_code& ec);
-
-template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
-inline void connect_pair(
- basic_socket<Protocol ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol ASIO_SVC_TARG1>& socket2)
+template <typename Protocol, typename Executor1, typename Executor2>
+ASIO_SYNC_OP_VOID connect_pair(basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2, asio::error_code& ec);
+
+template <typename Protocol, typename Executor1, typename Executor2>
+inline void connect_pair(basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2)
{
asio::error_code ec;
connect_pair(socket1, socket2, ec);
asio::detail::throw_error(ec, "connect_pair");
}
-template <typename Protocol ASIO_SVC_TPARAM ASIO_SVC_TPARAM1>
+template <typename Protocol, typename Executor1, typename Executor2>
inline ASIO_SYNC_OP_VOID connect_pair(
- basic_socket<Protocol ASIO_SVC_TARG>& socket1,
- basic_socket<Protocol ASIO_SVC_TARG1>& socket2,
- asio::error_code& ec)
+ basic_socket<Protocol, Executor1>& socket1,
+ basic_socket<Protocol, Executor2>& socket2, asio::error_code& ec)
{
// Check that this function is only being used with a UNIX domain socket.
asio::local::basic_endpoint<Protocol>* tmp
diff --git a/3rdparty/asio/include/asio/local/datagram_protocol.hpp b/3rdparty/asio/include/asio/local/datagram_protocol.hpp
index 17773d77aae..6bf18a46e49 100644
--- a/3rdparty/asio/include/asio/local/datagram_protocol.hpp
+++ b/3rdparty/asio/include/asio/local/datagram_protocol.hpp
@@ -2,7 +2,7 @@
// local/datagram_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -45,19 +45,19 @@ class datagram_protocol
{
public:
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return SOCK_DGRAM;
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return 0;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return AF_UNIX;
}
diff --git a/3rdparty/asio/include/asio/local/detail/endpoint.hpp b/3rdparty/asio/include/asio/local/detail/endpoint.hpp
index 6125e972571..5e94c3d0aeb 100644
--- a/3rdparty/asio/include/asio/local/detail/endpoint.hpp
+++ b/3rdparty/asio/include/asio/local/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// local/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -23,6 +23,7 @@
#include <cstddef>
#include <string>
#include "asio/detail/socket_types.hpp"
+#include "asio/detail/string_view.hpp"
#include "asio/detail/push_options.hpp"
@@ -43,6 +44,11 @@ public:
// Construct an endpoint using the specified path name.
ASIO_DECL endpoint(const std::string& path_name);
+ #if defined(ASIO_HAS_STRING_VIEW)
+ // Construct an endpoint using the specified path name.
+ ASIO_DECL endpoint(string_view path_name);
+ #endif // defined(ASIO_HAS_STRING_VIEW)
+
// Copy constructor.
endpoint(const endpoint& other)
: data_(other.data_),
diff --git a/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp b/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp
index adda630f81e..55b403e8ed6 100644
--- a/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp
+++ b/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// local/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -48,6 +48,13 @@ endpoint::endpoint(const std::string& path_name)
init(path_name.data(), path_name.length());
}
+#if defined(ASIO_HAS_STRING_VIEW)
+endpoint::endpoint(string_view path_name)
+{
+ init(path_name.data(), path_name.length());
+}
+#endif // defined(ASIO_HAS_STRING_VIEW)
+
void endpoint::resize(std::size_t new_size)
{
if (new_size > sizeof(asio::detail::sockaddr_un_type))
@@ -105,16 +112,12 @@ void endpoint::init(const char* path_name, std::size_t path_length)
asio::detail::throw_error(ec);
}
- using namespace std; // For memcpy.
- data_.local = asio::detail::sockaddr_un_type();
+ using namespace std; // For memset and memcpy.
+ memset(&data_.local, 0, sizeof(asio::detail::sockaddr_un_type));
data_.local.sun_family = AF_UNIX;
- memcpy(data_.local.sun_path, path_name, path_length);
+ if (path_length > 0)
+ memcpy(data_.local.sun_path, path_name, path_length);
path_length_ = path_length;
-
- // NUL-terminate normal path names. Names that start with a NUL are in the
- // UNIX domain protocol's "abstract namespace" and are not NUL-terminated.
- if (path_length > 0 && data_.local.sun_path[0] == 0)
- data_.local.sun_path[path_length] = 0;
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/local/seq_packet_protocol.hpp b/3rdparty/asio/include/asio/local/seq_packet_protocol.hpp
new file mode 100644
index 00000000000..c5a231fe859
--- /dev/null
+++ b/3rdparty/asio/include/asio/local/seq_packet_protocol.hpp
@@ -0,0 +1,84 @@
+//
+// local/seq_packet_protocol.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_LOCAL_SEQ_PACKET_PROTOCOL_HPP
+#define ASIO_LOCAL_SEQ_PACKET_PROTOCOL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_socket_acceptor.hpp"
+#include "asio/basic_seq_packet_socket.hpp"
+#include "asio/detail/socket_types.hpp"
+#include "asio/local/basic_endpoint.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace local {
+
+/// Encapsulates the flags needed for seq_packet UNIX sockets.
+/**
+ * The asio::local::seq_packet_protocol class contains flags necessary
+ * for sequenced packet UNIX domain sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class seq_packet_protocol
+{
+public:
+ /// Obtain an identifier for the type of the protocol.
+ int type() const noexcept
+ {
+ return SOCK_SEQPACKET;
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const noexcept
+ {
+ return 0;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const noexcept
+ {
+ return AF_UNIX;
+ }
+
+ /// The type of a UNIX domain endpoint.
+ typedef basic_endpoint<seq_packet_protocol> endpoint;
+
+ /// The UNIX domain socket type.
+ typedef basic_seq_packet_socket<seq_packet_protocol> socket;
+
+ /// The UNIX domain acceptor type.
+ typedef basic_socket_acceptor<seq_packet_protocol> acceptor;
+};
+
+} // namespace local
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_LOCAL_SEQ_PACKET_PROTOCOL_HPP
diff --git a/3rdparty/asio/include/asio/local/stream_protocol.hpp b/3rdparty/asio/include/asio/local/stream_protocol.hpp
index e8094ccb9a1..4cbad450fc5 100644
--- a/3rdparty/asio/include/asio/local/stream_protocol.hpp
+++ b/3rdparty/asio/include/asio/local/stream_protocol.hpp
@@ -2,7 +2,7 @@
// local/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -47,19 +47,19 @@ class stream_protocol
{
public:
/// Obtain an identifier for the type of the protocol.
- int type() const
+ int type() const noexcept
{
return SOCK_STREAM;
}
/// Obtain an identifier for the protocol.
- int protocol() const
+ int protocol() const noexcept
{
return 0;
}
/// Obtain an identifier for the protocol family.
- int family() const
+ int family() const noexcept
{
return AF_UNIX;
}
diff --git a/3rdparty/asio/include/asio/multiple_exceptions.hpp b/3rdparty/asio/include/asio/multiple_exceptions.hpp
new file mode 100644
index 00000000000..2fd0455a91a
--- /dev/null
+++ b/3rdparty/asio/include/asio/multiple_exceptions.hpp
@@ -0,0 +1,52 @@
+//
+// multiple_exceptions.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_MULTIPLE_EXCEPTIONS_HPP
+#define ASIO_MULTIPLE_EXCEPTIONS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <exception>
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Exception thrown when there are multiple pending exceptions to rethrow.
+class multiple_exceptions
+ : public std::exception
+{
+public:
+ /// Constructor.
+ ASIO_DECL multiple_exceptions(
+ std::exception_ptr first) noexcept;
+
+ /// Obtain message associated with exception.
+ ASIO_DECL virtual const char* what() const
+ noexcept;
+
+ /// Obtain a pointer to the first exception.
+ ASIO_DECL std::exception_ptr first_exception() const;
+
+private:
+ std::exception_ptr first_;
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/multiple_exceptions.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_MULTIPLE_EXCEPTIONS_HPP
diff --git a/3rdparty/asio/include/asio/packaged_task.hpp b/3rdparty/asio/include/asio/packaged_task.hpp
index af8d6896642..68e5b9b175a 100644
--- a/3rdparty/asio/include/asio/packaged_task.hpp
+++ b/3rdparty/asio/include/asio/packaged_task.hpp
@@ -2,7 +2,7 @@
// packaged_task.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,22 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/future.hpp"
-#if defined(ASIO_HAS_STD_FUTURE) \
+#if defined(ASIO_HAS_STD_FUTURE_CLASS) \
|| defined(GENERATING_DOCUMENTATION)
-#include <future>
#include "asio/async_result.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
/// Partial specialisation of @c async_result for @c std::packaged_task.
template <typename Result, typename... Args, typename Signature>
class async_result<std::packaged_task<Result(Args...)>, Signature>
@@ -60,67 +56,11 @@ private:
return_type future_;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename Result, typename Signature>
-struct async_result<std::packaged_task<Result()>, Signature>
-{
- typedef std::packaged_task<Result()> completion_handler_type;
- typedef std::future<Result> return_type;
-
- explicit async_result(completion_handler_type& h)
- : future_(h.get_future())
- {
- }
-
- return_type get()
- {
- return std::move(future_);
- }
-
-private:
- return_type future_;
-};
-
-#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
- template <typename Result, \
- ASIO_VARIADIC_TPARAMS(n), typename Signature> \
- class async_result< \
- std::packaged_task<Result(ASIO_VARIADIC_TARGS(n))>, Signature> \
- { \
- public: \
- typedef std::packaged_task< \
- Result(ASIO_VARIADIC_TARGS(n))> \
- completion_handler_type; \
- \
- typedef std::future<Result> return_type; \
- \
- explicit async_result(completion_handler_type& h) \
- : future_(h.get_future()) \
- { \
- } \
- \
- return_type get() \
- { \
- return std::move(future_); \
- } \
- \
- private: \
- return_type future_; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_FUTURE)
+#endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
// || defined(GENERATING_DOCUMENTATION)
#endif // ASIO_PACKAGED_TASK_HPP
diff --git a/3rdparty/asio/include/asio/placeholders.hpp b/3rdparty/asio/include/asio/placeholders.hpp
index 8e6e2e5c6c2..21da545fe9e 100644
--- a/3rdparty/asio/include/asio/placeholders.hpp
+++ b/3rdparty/asio/include/asio/placeholders.hpp
@@ -2,7 +2,7 @@
// placeholders.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,10 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/arg.hpp>
-#endif // defined(ASIO_HAS_BOOST_BIND)
+#include "asio/detail/functional.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,119 +25,46 @@ namespace placeholders {
#if defined(GENERATING_DOCUMENTATION)
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the error argument of a handler for any of the asynchronous functions.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the error argument of a handler for any of the asynchronous
+/// functions.
unspecified error;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the bytes_transferred argument of a handler for asynchronous functions such
-/// as asio::basic_stream_socket::async_write_some or
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the bytes_transferred argument of a handler for asynchronous
+/// functions such as asio::basic_stream_socket::async_write_some or
/// asio::async_write.
unspecified bytes_transferred;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the iterator argument of a handler for asynchronous functions such as
-/// asio::async_connect.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the iterator argument of a handler for asynchronous functions
+/// such as asio::async_connect.
unspecified iterator;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the results argument of a handler for asynchronous functions such as
-/// asio::basic_resolver::async_resolve.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the results argument of a handler for asynchronous functions
+/// such as asio::basic_resolver::async_resolve.
unspecified results;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the results argument of a handler for asynchronous functions such as
-/// asio::async_connect.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the results argument of a handler for asynchronous functions
+/// such as asio::async_connect.
unspecified endpoint;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the signal_number argument of a handler for asynchronous functions such as
-/// asio::signal_set::async_wait.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the signal_number argument of a handler for asynchronous
+/// functions such as asio::signal_set::async_wait.
unspecified signal_number;
-#elif defined(ASIO_HAS_BOOST_BIND)
-# if defined(__BORLANDC__) || defined(__GNUC__)
-
-inline boost::arg<1> error()
-{
- return boost::arg<1>();
-}
-
-inline boost::arg<2> bytes_transferred()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> iterator()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> results()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> endpoint()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> signal_number()
-{
- return boost::arg<2>();
-}
-
-# else
-
-namespace detail
-{
- template <int Number>
- struct placeholder
- {
- static boost::arg<Number>& get()
- {
- static boost::arg<Number> result;
- return result;
- }
- };
-}
-
-# if defined(ASIO_MSVC) && (ASIO_MSVC < 1400)
-
-static boost::arg<1>& error
- = asio::placeholders::detail::placeholder<1>::get();
-static boost::arg<2>& bytes_transferred
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& iterator
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& results
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& endpoint
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& signal_number
- = asio::placeholders::detail::placeholder<2>::get();
-
-# else
-
-namespace
-{
- boost::arg<1>& error
- = asio::placeholders::detail::placeholder<1>::get();
- boost::arg<2>& bytes_transferred
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& iterator
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& results
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& endpoint
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& signal_number
- = asio::placeholders::detail::placeholder<2>::get();
-} // namespace
-
-# endif
-# endif
+#else
+
+static constexpr auto& error = std::placeholders::_1;
+static constexpr auto& bytes_transferred = std::placeholders::_2;
+static constexpr auto& iterator = std::placeholders::_2;
+static constexpr auto& results = std::placeholders::_2;
+static constexpr auto& endpoint = std::placeholders::_2;
+static constexpr auto& signal_number = std::placeholders::_2;
+
#endif
} // namespace placeholders
diff --git a/3rdparty/asio/include/asio/posix/basic_descriptor.hpp b/3rdparty/asio/include/asio/posix/basic_descriptor.hpp
index 27db872c338..fa47d6a0949 100644
--- a/3rdparty/asio/include/asio/posix/basic_descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/basic_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/basic_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,16 +17,26 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
|| defined(GENERATING_DOCUMENTATION)
-#include "asio/basic_io_object.hpp"
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
#include "asio/posix/descriptor_base.hpp"
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -41,37 +51,76 @@ namespace posix {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename DescriptorService>
+template <typename Executor = any_io_executor>
class basic_descriptor
- : public basic_io_object<DescriptorService>,
- public descriptor_base
+ : public descriptor_base
{
+private:
+ class initiate_async_wait;
+
public:
- /// The native representation of a descriptor.
- typedef typename DescriptorService::native_handle_type native_handle_type;
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
- /// A basic_descriptor is always the lowest layer.
- typedef basic_descriptor<DescriptorService> lowest_layer_type;
+ /// Rebinds the descriptor type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The descriptor type when rebound to the specified executor.
+ typedef basic_descriptor<Executor1> other;
+ };
- /// Construct a basic_descriptor without opening it.
+ /// The native representation of a descriptor.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::io_uring_descriptor_service::native_handle_type
+ native_handle_type;
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::reactive_descriptor_service::native_handle_type
+ native_handle_type;
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
+ /// A descriptor is always the lowest layer.
+ typedef basic_descriptor lowest_layer_type;
+
+ /// Construct a descriptor without opening it.
/**
* This constructor creates a descriptor without opening it.
*
- * @param io_context The io_context object that the descriptor will use to
+ * @param ex The I/O executor that the descriptor will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* descriptor.
*/
- explicit basic_descriptor(asio::io_context& io_context)
- : basic_io_object<DescriptorService>(io_context)
+ explicit basic_descriptor(const executor_type& ex)
+ : impl_(0, ex)
{
}
- /// Construct a basic_descriptor on an existing native descriptor.
+ /// Construct a descriptor without opening it.
+ /**
+ * This constructor creates a descriptor without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ */
+ template <typename ExecutionContext>
+ explicit basic_descriptor(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct a descriptor on an existing native descriptor.
/**
* This constructor creates a descriptor object to hold an existing native
* descriptor.
*
- * @param io_context The io_context object that the descriptor will use to
+ * @param ex The I/O executor that the descriptor will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* descriptor.
*
@@ -79,18 +128,82 @@ public:
*
* @throws asio::system_error Thrown on failure.
*/
- basic_descriptor(asio::io_context& io_context,
+ basic_descriptor(const executor_type& ex,
const native_handle_type& native_descriptor)
- : basic_io_object<DescriptorService>(io_context)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_descriptor, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a descriptor on an existing native descriptor.
+ /**
+ * This constructor creates a descriptor object to hold an existing native
+ * descriptor.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ *
+ * @param native_descriptor A native descriptor.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_descriptor(ExecutionContext& context,
+ const native_handle_type& native_descriptor,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
native_descriptor, ec);
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_descriptor from another.
+ /// Move-construct a descriptor from another.
+ /**
+ * This constructor moves a descriptor from one object to another.
+ *
+ * @param other The other descriptor 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_descriptor(const executor_type&)
+ * constructor.
+ */
+ basic_descriptor(basic_descriptor&& other) noexcept
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a descriptor from another.
+ /**
+ * This assignment operator moves a descriptor from one object to another.
+ *
+ * @param other The other descriptor 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_descriptor(const executor_type&)
+ * constructor.
+ */
+ basic_descriptor& operator=(basic_descriptor&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All descriptors have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_descriptor;
+
+ /// Move-construct a basic_descriptor from a descriptor of another executor
+ /// type.
/**
* This constructor moves a descriptor from one object to another.
*
@@ -98,15 +211,20 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_descriptor(io_context&) constructor.
+ * constructed using the @c basic_descriptor(const executor_type&)
+ * constructor.
*/
- basic_descriptor(basic_descriptor&& other)
- : basic_io_object<DescriptorService>(
- ASIO_MOVE_CAST(basic_descriptor)(other))
+ template <typename Executor1>
+ basic_descriptor(basic_descriptor<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
{
}
- /// Move-assign a basic_descriptor from another.
+ /// Move-assign a basic_descriptor from a descriptor of another executor type.
/**
* This assignment operator moves a descriptor from one object to another.
*
@@ -114,20 +232,30 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_descriptor(io_context&) constructor.
+ * constructed using the @c basic_descriptor(const executor_type&)
+ * constructor.
*/
- basic_descriptor& operator=(basic_descriptor&& other)
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_descriptor&
+ > operator=(basic_descriptor<Executor1> && other)
{
- basic_io_object<DescriptorService>::operator=(
- ASIO_MOVE_CAST(basic_descriptor)(other));
+ basic_descriptor tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
/// Get a reference to the lowest layer.
/**
* This function returns a reference to the lowest layer in a stack of
- * layers. Since a basic_descriptor cannot contain any further layers, it
+ * layers. Since a descriptor cannot contain any further layers, it
* simply returns a reference to itself.
*
* @return A reference to the lowest layer in the stack of layers. Ownership
@@ -141,7 +269,7 @@ public:
/// Get a const reference to the lowest layer.
/**
* This function returns a const reference to the lowest layer in a stack of
- * layers. Since a basic_descriptor cannot contain any further layers, it
+ * layers. Since a descriptor cannot contain any further layers, it
* simply returns a reference to itself.
*
* @return A const reference to the lowest layer in the stack of layers.
@@ -163,7 +291,7 @@ public:
void assign(const native_handle_type& native_descriptor)
{
asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
+ impl_.get_service().assign(impl_.get_implementation(),
native_descriptor, ec);
asio::detail::throw_error(ec, "assign");
}
@@ -179,15 +307,15 @@ public:
ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
asio::error_code& ec)
{
- this->get_service().assign(
- this->get_implementation(), native_descriptor, ec);
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_descriptor, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
/// Determine whether the descriptor is open.
bool is_open() const
{
- return this->get_service().is_open(this->get_implementation());
+ return impl_.get_service().is_open(impl_.get_implementation());
}
/// Close the descriptor.
@@ -202,7 +330,7 @@ public:
void close()
{
asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "close");
}
@@ -217,7 +345,7 @@ public:
*/
ASIO_SYNC_OP_VOID close(asio::error_code& ec)
{
- this->get_service().close(this->get_implementation(), ec);
+ impl_.get_service().close(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -229,7 +357,7 @@ public:
*/
native_handle_type native_handle()
{
- return this->get_service().native_handle(this->get_implementation());
+ return impl_.get_service().native_handle(impl_.get_implementation());
}
/// Release ownership of the native descriptor implementation.
@@ -244,7 +372,7 @@ public:
*/
native_handle_type release()
{
- return this->get_service().release(this->get_implementation());
+ return impl_.get_service().release(impl_.get_implementation());
}
/// Cancel all asynchronous operations associated with the descriptor.
@@ -258,7 +386,7 @@ public:
void cancel()
{
asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "cancel");
}
@@ -272,7 +400,7 @@ public:
*/
ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
{
- this->get_service().cancel(this->get_implementation(), ec);
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -291,7 +419,7 @@ public:
* @par Example
* Getting the number of bytes ready to read:
* @code
- * asio::posix::stream_descriptor descriptor(io_context);
+ * asio::posix::stream_descriptor descriptor(my_context);
* ...
* asio::posix::stream_descriptor::bytes_readable command;
* descriptor.io_control(command);
@@ -302,7 +430,7 @@ public:
void io_control(IoControlCommand& command)
{
asio::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
asio::detail::throw_error(ec, "io_control");
}
@@ -321,7 +449,7 @@ public:
* @par Example
* Getting the number of bytes ready to read:
* @code
- * asio::posix::stream_descriptor descriptor(io_context);
+ * asio::posix::stream_descriptor descriptor(my_context);
* ...
* asio::posix::stream_descriptor::bytes_readable command;
* asio::error_code ec;
@@ -337,7 +465,7 @@ public:
ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
asio::error_code& ec)
{
- this->get_service().io_control(this->get_implementation(), command, ec);
+ impl_.get_service().io_control(impl_.get_implementation(), command, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -354,7 +482,7 @@ public:
*/
bool non_blocking() const
{
- return this->get_service().non_blocking(this->get_implementation());
+ return impl_.get_service().non_blocking(impl_.get_implementation());
}
/// Sets the non-blocking mode of the descriptor.
@@ -373,7 +501,7 @@ public:
void non_blocking(bool mode)
{
asio::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
asio::detail::throw_error(ec, "non_blocking");
}
@@ -393,7 +521,7 @@ public:
ASIO_SYNC_OP_VOID non_blocking(
bool mode, asio::error_code& ec)
{
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
+ impl_.get_service().non_blocking(impl_.get_implementation(), mode, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -413,8 +541,8 @@ public:
*/
bool native_non_blocking() const
{
- return this->get_service().native_non_blocking(
- this->get_implementation());
+ return impl_.get_service().native_non_blocking(
+ impl_.get_implementation());
}
/// Sets the non-blocking mode of the native descriptor implementation.
@@ -435,8 +563,8 @@ public:
void native_non_blocking(bool mode)
{
asio::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
asio::detail::throw_error(ec, "native_non_blocking");
}
@@ -458,8 +586,8 @@ public:
ASIO_SYNC_OP_VOID native_non_blocking(
bool mode, asio::error_code& ec)
{
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
+ impl_.get_service().native_non_blocking(
+ impl_.get_implementation(), mode, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -474,7 +602,7 @@ public:
* @par Example
* Waiting for a descriptor to become readable.
* @code
- * asio::posix::stream_descriptor descriptor(io_context);
+ * asio::posix::stream_descriptor descriptor(my_context);
* ...
* descriptor.wait(asio::posix::stream_descriptor::wait_read);
* @endcode
@@ -482,7 +610,7 @@ public:
void wait(wait_type w)
{
asio::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
asio::detail::throw_error(ec, "wait");
}
@@ -499,7 +627,7 @@ public:
* @par Example
* Waiting for a descriptor to become readable.
* @code
- * asio::posix::stream_descriptor descriptor(io_context);
+ * asio::posix::stream_descriptor descriptor(my_context);
* ...
* asio::error_code ec;
* descriptor.wait(asio::posix::stream_descriptor::wait_read, ec);
@@ -507,7 +635,7 @@ public:
*/
ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
{
- this->get_service().wait(this->get_implementation(), w, ec);
+ impl_.get_service().wait(impl_.get_implementation(), w, ec);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -515,20 +643,27 @@ public:
/// write, or to have pending error conditions.
/**
* This function is used to perform an asynchronous wait for a descriptor to
- * enter a ready to read, write or error condition state.
+ * enter a ready to read, write or error condition state. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param w Specifies the desired descriptor state.
*
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Example
* @code
@@ -542,31 +677,89 @@ public:
*
* ...
*
- * asio::posix::stream_descriptor descriptor(io_context);
+ * asio::posix::stream_descriptor descriptor(my_context);
* ...
* descriptor.async_wait(
* asio::posix::stream_descriptor::wait_read,
* wait_handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w, ASIO_MOVE_ARG(WaitHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(wait_type w,
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token, w))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
- return this->get_service().async_wait(this->get_implementation(),
- w, ASIO_MOVE_CAST(WaitHandler)(handler));
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token, w);
}
protected:
/// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the descriptor, cancelling any outstanding
+ * asynchronous wait operations associated with the descriptor as if by
+ * calling @c cancel.
+ */
~basic_descriptor()
{
}
+
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::io_uring_descriptor_service, Executor> impl_;
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
+private:
+ // Disallow copying and assignment.
+ basic_descriptor(const basic_descriptor&) = delete;
+ basic_descriptor& operator=(const basic_descriptor&) = delete;
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_descriptor* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WaitHandler>
+ void operator()(WaitHandler&& handler, wait_type w) 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.
+ 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(), w,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_descriptor* self_;
+ };
};
} // namespace posix
@@ -577,6 +770,4 @@ protected:
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
// || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_POSIX_BASIC_DESCRIPTOR_HPP
diff --git a/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp b/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp
index eb7bc8bb975..9868dee1259 100644
--- a/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/basic_stream_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,19 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
+#include "asio/posix/basic_descriptor.hpp"
#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
|| defined(GENERATING_DOCUMENTATION)
-#include <cstddef>
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/posix/basic_descriptor.hpp"
-#include "asio/posix/stream_descriptor_service.hpp"
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -43,87 +35,193 @@ namespace posix {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
+ * Synchronous @c read_some and @c write_some operations are thread safe with
+ * respect to each other, if the underlying operating system calls are also
+ * thread safe. This means that it is permitted to perform concurrent calls to
+ * these synchronous operations on a single descriptor object. Other synchronous
+ * operations, such as @c close, are not thread safe.
+ *
* @par Concepts:
* AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
*/
-template <typename StreamDescriptorService = stream_descriptor_service>
+template <typename Executor = any_io_executor>
class basic_stream_descriptor
- : public basic_descriptor<StreamDescriptorService>
+ : public basic_descriptor<Executor>
{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the descriptor type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The descriptor type when rebound to the specified executor.
+ typedef basic_stream_descriptor<Executor1> other;
+ };
+
/// The native representation of a descriptor.
- typedef typename StreamDescriptorService::native_handle_type
+ typedef typename basic_descriptor<Executor>::native_handle_type
native_handle_type;
- /// Construct a basic_stream_descriptor without opening it.
+ /// Construct a stream descriptor without opening it.
/**
* This constructor creates a stream descriptor without opening it. The
* descriptor needs to be opened and then connected or accepted before data
* can be sent or received on it.
*
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
+ * @param ex The I/O executor that the descriptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
* descriptor.
*/
- explicit basic_stream_descriptor(asio::io_context& io_context)
- : basic_descriptor<StreamDescriptorService>(io_context)
+ explicit basic_stream_descriptor(const executor_type& ex)
+ : basic_descriptor<Executor>(ex)
+ {
+ }
+
+ /// Construct a stream descriptor without opening it.
+ /**
+ * This constructor creates a stream descriptor without opening it. The
+ * descriptor needs to be opened and then connected or accepted before data
+ * can be sent or received on it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_descriptor(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_descriptor<Executor>(context)
{
}
- /// Construct a basic_stream_descriptor on an existing native descriptor.
+ /// Construct a stream descriptor on an existing native descriptor.
/**
* This constructor creates a stream descriptor object to hold an existing
* native descriptor.
*
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
+ * @param ex The I/O executor that the descriptor will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
* descriptor.
*
* @param native_descriptor The new underlying descriptor implementation.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_stream_descriptor(asio::io_context& io_context,
+ basic_stream_descriptor(const executor_type& ex,
const native_handle_type& native_descriptor)
- : basic_descriptor<StreamDescriptorService>(io_context, native_descriptor)
+ : basic_descriptor<Executor>(ex, native_descriptor)
+ {
+ }
+
+ /// Construct a stream descriptor on an existing native descriptor.
+ /**
+ * This constructor creates a stream descriptor object to hold an existing
+ * native descriptor.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the descriptor will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the descriptor.
+ *
+ * @param native_descriptor The new underlying descriptor implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_descriptor(ExecutionContext& context,
+ const native_handle_type& native_descriptor,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_descriptor<Executor>(context, native_descriptor)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_stream_descriptor from another.
+ /// Move-construct a stream descriptor from another.
/**
* This constructor moves a stream descriptor from one object to another.
*
- * @param other The other basic_stream_descriptor object from which the move
+ * @param other The other stream descriptor 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_stream_descriptor(io_context&) constructor.
+ * constructed using the @c basic_stream_descriptor(const executor_type&)
+ * constructor.
*/
- basic_stream_descriptor(basic_stream_descriptor&& other)
- : basic_descriptor<StreamDescriptorService>(
- ASIO_MOVE_CAST(basic_stream_descriptor)(other))
+ basic_stream_descriptor(basic_stream_descriptor&& other) noexcept
+ : basic_descriptor<Executor>(std::move(other))
{
}
- /// Move-assign a basic_stream_descriptor from another.
+ /// Move-assign a stream descriptor from another.
/**
* This assignment operator moves a stream descriptor from one object to
* another.
*
- * @param other The other basic_stream_descriptor object from which the move
+ * @param other The other stream descriptor 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_stream_descriptor(io_context&) constructor.
+ * constructed using the @c basic_stream_descriptor(const executor_type&)
+ * constructor.
*/
basic_stream_descriptor& operator=(basic_stream_descriptor&& other)
{
- basic_descriptor<StreamDescriptorService>::operator=(
- ASIO_MOVE_CAST(basic_stream_descriptor)(other));
+ basic_descriptor<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_stream_descriptor from a descriptor of another
+ /// executor type.
+ /**
+ * This constructor moves a descriptor from one object to another.
+ *
+ * @param other The other basic_stream_descriptor 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_stream_descriptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_stream_descriptor(basic_stream_descriptor<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_descriptor<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_descriptor from a descriptor of another
+ /// executor type.
+ /**
+ * This assignment operator moves a descriptor from one object to another.
+ *
+ * @param other The other basic_stream_descriptor 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_stream_descriptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_stream_descriptor&
+ > operator=(basic_stream_descriptor<Executor1> && other)
+ {
+ basic_descriptor<Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Write some data to the descriptor.
/**
@@ -156,8 +254,8 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
+ std::size_t s = this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
asio::detail::throw_error(ec, "write_some");
return s;
}
@@ -182,31 +280,37 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().write_some(
- this->get_implementation(), buffers, ec);
+ return this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
}
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream
- * descriptor. The function call always returns immediately.
+ * descriptor. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be written to the descriptor.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
@@ -220,19 +324,30 @@ public:
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- return this->get_service().async_write_some(this->get_implementation(),
- buffers, ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the descriptor.
@@ -267,8 +382,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
+ std::size_t s = this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
asio::detail::throw_error(ec, "read_some");
return s;
}
@@ -294,31 +409,37 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().read_some(
- this->get_implementation(), buffers, ec);
+ return this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
}
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the stream
- * descriptor. The function call always returns immediately.
+ * descriptor. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
@@ -333,20 +454,98 @@ public:
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- return this->get_service().async_read_some(this->get_implementation(),
- buffers, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
}
+
+private:
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_stream_descriptor* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_descriptor* self_;
+ };
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_stream_descriptor* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_descriptor* self_;
+ };
};
} // namespace posix
@@ -357,6 +556,4 @@ public:
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
// || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_POSIX_BASIC_STREAM_DESCRIPTOR_HPP
diff --git a/3rdparty/asio/include/asio/posix/descriptor.hpp b/3rdparty/asio/include/asio/posix/descriptor.hpp
index 9ab46a5d956..57b5b2522fd 100644
--- a/3rdparty/asio/include/asio/posix/descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/descriptor.hpp
@@ -2,7 +2,7 @@
// posix/descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,628 +17,21 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-
#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
|| defined(GENERATING_DOCUMENTATION)
-#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/reactive_descriptor_service.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/posix/descriptor_base.hpp"
-
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#define ASIO_SVC_T asio::detail::reactive_descriptor_service
-
-#include "asio/detail/push_options.hpp"
+#include "asio/posix/basic_descriptor.hpp"
namespace asio {
namespace posix {
-/// Provides POSIX descriptor functionality.
-/**
- * The posix::descriptor class template provides the ability to wrap a
- * POSIX descriptor.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class descriptor
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
- public descriptor_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a descriptor.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// A descriptor is always the lowest layer.
- typedef descriptor lowest_layer_type;
-
- /// Construct a descriptor without opening it.
- /**
- * This constructor creates a descriptor without opening it.
- *
- * @param io_context The io_context object that the descriptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- */
- explicit descriptor(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct a descriptor on an existing native descriptor.
- /**
- * This constructor creates a descriptor object to hold an existing native
- * descriptor.
- *
- * @param io_context The io_context object that the descriptor will use to
- * dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @throws asio::system_error Thrown on failure.
- */
- descriptor(asio::io_context& io_context,
- const native_handle_type& native_descriptor)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_descriptor, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a descriptor from another.
- /**
- * This constructor moves a descriptor from one object to another.
- *
- * @param other The other descriptor 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 descriptor(io_context&) constructor.
- */
- descriptor(descriptor&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a descriptor from another.
- /**
- * This assignment operator moves a descriptor from one object to another.
- *
- * @param other The other descriptor 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 descriptor(io_context&) constructor.
- */
- descriptor& operator=(descriptor&& other)
- {
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- /// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
- {
- return basic_io_object<ASIO_SVC_T>::get_executor();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a descriptor cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a descriptor cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native descriptor to the descriptor.
- /*
- * This function opens the descriptor to hold an existing native descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void assign(const native_handle_type& native_descriptor)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_descriptor, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native descriptor to the descriptor.
- /*
- * This function opens the descriptor to hold an existing native descriptor.
- *
- * @param native_descriptor A native descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID assign(const native_handle_type& native_descriptor,
- asio::error_code& ec)
- {
- this->get_service().assign(
- this->get_implementation(), native_descriptor, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the descriptor is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the descriptor.
- /**
- * This function is used to close the descriptor. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- */
- void close()
- {
- asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "close");
- }
-
- /// Close the descriptor.
- /**
- * This function is used to close the descriptor. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any. Note that, even if
- * the function indicates an error, the underlying descriptor is closed.
- */
- ASIO_SYNC_OP_VOID close(asio::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native descriptor representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * descriptor. This is intended to allow access to native descriptor
- * functionality that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Release ownership of the native descriptor implementation.
- /**
- * This function may be used to obtain the underlying representation of the
- * descriptor. After calling this function, @c is_open() returns false. The
- * caller is responsible for closing the descriptor.
- *
- * All outstanding asynchronous read or write operations will finish
- * immediately, and the handlers for cancelled operations will be passed the
- * asio::error::operation_aborted error.
- */
- native_handle_type release()
- {
- return this->get_service().release(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void cancel()
- {
- asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the descriptor.
- /**
- * This function is used to execute an IO control command on the descriptor.
- *
- * @param command The IO control command to be performed on the descriptor.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @sa IoControlCommand @n
- * asio::posix::descriptor_base::bytes_readable @n
- * asio::posix::descriptor_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * asio::posix::stream_descriptor::bytes_readable command;
- * descriptor.io_control(command);
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- void io_control(IoControlCommand& command)
- {
- asio::error_code ec;
- this->get_service().io_control(this->get_implementation(), command, ec);
- asio::detail::throw_error(ec, "io_control");
- }
-
- /// Perform an IO control command on the descriptor.
- /**
- * This function is used to execute an IO control command on the descriptor.
- *
- * @param command The IO control command to be performed on the descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa IoControlCommand @n
- * asio::posix::descriptor_base::bytes_readable @n
- * asio::posix::descriptor_base::non_blocking_io
- *
- * @par Example
- * Getting the number of bytes ready to read:
- * @code
- * asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * asio::posix::stream_descriptor::bytes_readable command;
- * asio::error_code ec;
- * descriptor.io_control(command, ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * std::size_t bytes_readable = command.get();
- * @endcode
- */
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(IoControlCommand& command,
- asio::error_code& ec)
- {
- this->get_service().io_control(this->get_implementation(), command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the descriptor.
- /**
- * @returns @c true if the descriptor's synchronous operations will fail with
- * asio::error::would_block if they are unable to perform the requested
- * operation immediately. If @c false, synchronous operations will block
- * until complete.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * asio::error::would_block.
- */
- bool non_blocking() const
- {
- return this->get_service().non_blocking(this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the descriptor.
- /**
- * @param mode If @c true, the descriptor's synchronous operations will fail
- * with asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * asio::error::would_block.
- */
- void non_blocking(bool mode)
- {
- asio::error_code ec;
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- asio::detail::throw_error(ec, "non_blocking");
- }
-
- /// Sets the non-blocking mode of the descriptor.
- /**
- * @param mode If @c true, the descriptor's synchronous operations will fail
- * with asio::error::would_block if they are unable to perform the
- * requested operation immediately. If @c false, synchronous operations will
- * block until complete.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note The non-blocking mode has no effect on the behaviour of asynchronous
- * operations. Asynchronous operations will never fail with the error
- * asio::error::would_block.
- */
- ASIO_SYNC_OP_VOID non_blocking(
- bool mode, asio::error_code& ec)
- {
- this->get_service().non_blocking(this->get_implementation(), mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to retrieve the non-blocking mode of the underlying
- * native descriptor. This mode has no effect on the behaviour of the
- * descriptor object's synchronous operations.
- *
- * @returns @c true if the underlying descriptor is in non-blocking mode and
- * direct system calls may fail with asio::error::would_block (or the
- * equivalent system error).
- *
- * @note The current non-blocking mode is cached by the descriptor object.
- * Consequently, the return value may be incorrect if the non-blocking mode
- * was set directly on the native descriptor.
- */
- bool native_non_blocking() const
- {
- return this->get_service().native_non_blocking(
- this->get_implementation());
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native descriptor. It has no effect on the behaviour of the descriptor
- * object's synchronous operations.
- *
- * @param mode If @c true, the underlying descriptor is put into non-blocking
- * mode and direct system calls may fail with asio::error::would_block
- * (or the equivalent system error).
- *
- * @throws asio::system_error Thrown on failure. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- void native_non_blocking(bool mode)
- {
- asio::error_code ec;
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- asio::detail::throw_error(ec, "native_non_blocking");
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- /**
- * This function is used to modify the non-blocking mode of the underlying
- * native descriptor. It has no effect on the behaviour of the descriptor
- * object's synchronous operations.
- *
- * @param mode If @c true, the underlying descriptor is put into non-blocking
- * mode and direct system calls may fail with asio::error::would_block
- * (or the equivalent system error).
- *
- * @param ec Set to indicate what error occurred, if any. If the @c mode is
- * @c false, but the current value of @c non_blocking() is @c true, this
- * function fails with asio::error::invalid_argument, as the
- * combination does not make sense.
- */
- ASIO_SYNC_OP_VOID native_non_blocking(
- bool mode, asio::error_code& ec)
- {
- this->get_service().native_non_blocking(
- this->get_implementation(), mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- /**
- * This function is used to perform a blocking wait for a descriptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @par Example
- * Waiting for a descriptor to become readable.
- * @code
- * asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * descriptor.wait(asio::posix::stream_descriptor::wait_read);
- * @endcode
- */
- void wait(wait_type w)
- {
- asio::error_code ec;
- this->get_service().wait(this->get_implementation(), w, ec);
- asio::detail::throw_error(ec, "wait");
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- /**
- * This function is used to perform a blocking wait for a descriptor to enter
- * a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @par Example
- * Waiting for a descriptor to become readable.
- * @code
- * asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * asio::error_code ec;
- * descriptor.wait(asio::posix::stream_descriptor::wait_read, ec);
- * @endcode
- */
- ASIO_SYNC_OP_VOID wait(wait_type w, asio::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the descriptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- /**
- * This function is used to perform an asynchronous wait for a descriptor to
- * enter a ready to read, write or error condition state.
- *
- * @param w Specifies the desired descriptor state.
- *
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @par Example
- * @code
- * void wait_handler(const asio::error_code& error)
- * {
- * if (!error)
- * {
- * // Wait succeeded.
- * }
- * }
- *
- * ...
- *
- * asio::posix::stream_descriptor descriptor(io_context);
- * ...
- * descriptor.async_wait(
- * asio::posix::stream_descriptor::wait_read,
- * wait_handler);
- * @endcode
- */
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w, ASIO_MOVE_ARG(WaitHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WaitHandler.
- ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check;
-
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_wait(
- this->get_implementation(), w, init.completion_handler);
-
- return init.result.get();
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- /**
- * This function destroys the descriptor, cancelling any outstanding
- * asynchronous wait operations associated with the descriptor as if by
- * calling @c cancel.
- */
- ~descriptor()
- {
- }
-};
+/// Typedef for the typical usage of basic_descriptor.
+typedef basic_descriptor<> descriptor;
} // namespace posix
} // namespace asio
-#include "asio/detail/pop_options.hpp"
-
-#undef ASIO_SVC_T
-
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
+ // || defined(GENERATING_DOCUMENTATION)
#endif // ASIO_POSIX_DESCRIPTOR_HPP
diff --git a/3rdparty/asio/include/asio/posix/descriptor_base.hpp b/3rdparty/asio/include/asio/posix/descriptor_base.hpp
index b77d49d8227..7bc3bc1e8f6 100644
--- a/3rdparty/asio/include/asio/posix/descriptor_base.hpp
+++ b/3rdparty/asio/include/asio/posix/descriptor_base.hpp
@@ -2,7 +2,7 @@
// posix/descriptor_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -56,7 +56,7 @@ public:
*
* @par Example
* @code
- * asio::posix::stream_descriptor descriptor(io_context);
+ * asio::posix::stream_descriptor descriptor(my_context);
* ...
* asio::descriptor_base::bytes_readable command(true);
* descriptor.io_control(command);
diff --git a/3rdparty/asio/include/asio/posix/stream_descriptor.hpp b/3rdparty/asio/include/asio/posix/stream_descriptor.hpp
index 29e157208c6..4855f10777e 100644
--- a/3rdparty/asio/include/asio/posix/stream_descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/stream_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/stream_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,340 +16,17 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/posix/descriptor.hpp"
#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
|| defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/posix/basic_stream_descriptor.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+#include "asio/posix/basic_stream_descriptor.hpp"
namespace asio {
namespace posix {
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a stream-oriented descriptor.
+/// Typedef for the typical usage of a stream-oriented descriptor.
typedef basic_stream_descriptor<> stream_descriptor;
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-/// Provides stream-oriented descriptor functionality.
-/**
- * The posix::stream_descriptor class template provides asynchronous and
- * blocking stream-oriented descriptor functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-class stream_descriptor
- : public descriptor
-{
-public:
- /// Construct a stream_descriptor without opening it.
- /**
- * This constructor creates a stream descriptor without opening it. The
- * descriptor needs to be opened and then connected or accepted before data
- * can be sent or received on it.
- *
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- */
- explicit stream_descriptor(asio::io_context& io_context)
- : descriptor(io_context)
- {
- }
-
- /// Construct a stream_descriptor on an existing native descriptor.
- /**
- * This constructor creates a stream descriptor object to hold an existing
- * native descriptor.
- *
- * @param io_context The io_context object that the stream descriptor will
- * use to dispatch handlers for any asynchronous operations performed on the
- * descriptor.
- *
- * @param native_descriptor The new underlying descriptor implementation.
- *
- * @throws asio::system_error Thrown on failure.
- */
- stream_descriptor(asio::io_context& io_context,
- const native_handle_type& native_descriptor)
- : descriptor(io_context, native_descriptor)
- {
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a stream_descriptor from another.
- /**
- * This constructor moves a stream descriptor from one object to another.
- *
- * @param other The other stream_descriptor 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 stream_descriptor(io_context&) constructor.
- */
- stream_descriptor(stream_descriptor&& other)
- : descriptor(std::move(other))
- {
- }
-
- /// Move-assign a stream_descriptor from another.
- /**
- * This assignment operator moves a stream descriptor from one object to
- * another.
- *
- * @param other The other stream_descriptor 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 stream_descriptor(io_context&) constructor.
- */
- stream_descriptor& operator=(stream_descriptor&& other)
- {
- descriptor::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the descriptor.
- /**
- * This function is used to write data to the stream descriptor. The function
- * call will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- *
- * @returns The number of bytes written.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that
- * all data is written before the blocking operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.write_some(asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the descriptor.
- /**
- * This function is used to write data to the stream descriptor. The function
- * call will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. Returns 0 if an error occurred.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that
- * all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- asio::error_code& ec)
- {
- return this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream
- * descriptor. The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the descriptor.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The write operation may not transmit all of the data to the peer.
- * Consider using the @ref async_write function if you need to ensure that all
- * data is written before the asynchronous operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.async_write_some(asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_write_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the descriptor.
- /**
- * This function is used to read data from the stream descriptor. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.read_some(asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the descriptor.
- /**
- * This function is used to read data from the stream descriptor. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. Returns 0 if an error occurred.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- asio::error_code& ec)
- {
- return this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream
- * descriptor. The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The read operation may not read all of the requested number of bytes.
- * Consider using the @ref async_read function if you need to ensure that the
- * requested amount of data is read before the asynchronous operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * descriptor.async_read_some(asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_read_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
} // namespace posix
} // namespace asio
diff --git a/3rdparty/asio/include/asio/posix/stream_descriptor_service.hpp b/3rdparty/asio/include/asio/posix/stream_descriptor_service.hpp
deleted file mode 100644
index e7a1b32394c..00000000000
--- a/3rdparty/asio/include/asio/posix/stream_descriptor_service.hpp
+++ /dev/null
@@ -1,279 +0,0 @@
-//
-// posix/stream_descriptor_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_POSIX_STREAM_DESCRIPTOR_SERVICE_HPP
-#define ASIO_POSIX_STREAM_DESCRIPTOR_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/detail/reactive_descriptor_service.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace posix {
-
-/// Default service implementation for a stream descriptor.
-class stream_descriptor_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<stream_descriptor_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::reactive_descriptor_service service_impl_type;
-
-public:
- /// The type of a stream descriptor implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native descriptor type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new stream descriptor service for the specified io_context.
- explicit stream_descriptor_service(asio::io_context& io_context)
- : asio::detail::service_base<stream_descriptor_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new stream descriptor implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new stream descriptor implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another stream descriptor implementation.
- void move_assign(implementation_type& impl,
- stream_descriptor_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a stream descriptor implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native descriptor to a stream descriptor.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& native_descriptor,
- asio::error_code& ec)
- {
- service_impl_.assign(impl, native_descriptor, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the descriptor is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a stream descriptor implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native descriptor implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Release ownership of the native descriptor implementation.
- native_handle_type release(implementation_type& impl)
- {
- return service_impl_.release(impl);
- }
-
- /// Cancel all asynchronous operations associated with the descriptor.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the descriptor.
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, asio::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the descriptor.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the descriptor.
- ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native descriptor implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native descriptor implementation.
- ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the descriptor to become ready to read, ready to write, or to
- /// have pending error conditions.
- ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- descriptor_base::wait_type w, asio::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the descriptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl, descriptor_base::wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Write the given data to the stream.
- template <typename ConstBufferSequence>
- std::size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.write_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous write.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- template <typename MutableBufferSequence>
- std::size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.read_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous read.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace posix
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_POSIX_STREAM_DESCRIPTOR_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/post.hpp b/3rdparty/asio/include/asio/post.hpp
index 17625cb27f0..6b534dfae4a 100644
--- a/3rdparty/asio/include/asio/post.hpp
+++ b/3rdparty/asio/include/asio/post.hpp
@@ -2,7 +2,7 @@
// post.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,9 +17,13 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/initiate_post.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
#include "asio/is_executor.hpp"
+#include "asio/require.hpp"
#include "asio/detail/push_options.hpp"
@@ -31,27 +35,56 @@ namespace asio {
* executor. The function object is queued for execution, and is never called
* from the current thread prior to returning from <tt>post()</tt>.
*
- * This function has the following effects:
+ * The use of @c post(), rather than @ref defer(), indicates the caller's
+ * preference that the function object be eagerly queued for execution.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{}, token)</tt>, where @c Init is a function object type defined
+ * as:
*
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * }; @endcode
*
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * The function call operator of @c Init:
*
- * @li Performs <tt>ex.post(std::move(handler), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex of type @c Ex by
+ * performing @code auto ex = get_associated_executor(handler); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.fork,
+ * execution::allocator(alloc)
+ * ).execute(std::forward<CompletionHandler>(completion_handler)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.post(
+ * std::forward<CompletionHandler>(completion_handler),
+ * alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- ASIO_MOVE_ARG(CompletionToken) token);
+template <ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
+inline auto post(NullaryToken&& token)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_post>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_post(), token);
+}
/// Submits a completion token or function object for execution.
/**
@@ -59,49 +92,122 @@ ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
* The function object is queued for execution, and is never called from the
* current thread prior to returning from <tt>post()</tt>.
*
- * This function has the following effects:
+ * The use of @c post(), rather than @ref defer(), indicates the caller's
+ * preference that the function object be eagerly queued for execution.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param ex The target executor.
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{ex}, token)</tt>, where @c Init is a function object type
+ * defined as:
*
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * using executor_type = Executor;
+ * explicit Init(const Executor& ex) : ex_(ex) {}
+ * executor_type get_executor() const noexcept { return ex_; }
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * private:
+ * Executor ex_; // exposition only
+ * }; @endcode
*
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * The function call operator of @c Init:
*
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
+ * @li Obtains the handler's associated executor object @c ex1 of type @c Ex1 by
+ * performing @code auto ex1 = get_associated_executor(handler, ex); @endcode
*
- * @li Performs <tt>Executor(ex).post(std::move(f), alloc)</tt>.
- *
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is true, constructs a
+ * function object @c f with a member @c executor_ that is initialised with
+ * <tt>prefer(ex1, execution::outstanding_work.tracked)</tt>, a member @c
+ * handler_ that is a decay-copy of @c completion_handler, and a function call
+ * operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * prefer(executor_, execution::allocator(a)).execute(std::move(handler_));
+ * @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is false, constructs a
+ * function object @c f with a member @c work_ that is initialised with
+ * <tt>make_work_guard(ex1)</tt>, a member @c handler_ that is a decay-copy of
+ * @c completion_handler, and a function call operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * work_.get_executor().dispatch(std::move(handler_), a);
+ * work_.reset(); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.fork,
+ * execution::allocator(alloc)
+ * ).execute(std::move(f)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.post(std::move(f), alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename Executor, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_executor<Executor>::value>::type* = 0);
+template <typename Executor,
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<Executor>>
+inline auto post(const Executor& ex,
+ NullaryToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
+ (execution::is_executor<Executor>::value
+ && can_require<Executor, execution::blocking_t::never_t>::value)
+ || is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_post_with_executor<Executor>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_post_with_executor<Executor>(ex), token);
+}
/// Submits a completion token or function object for execution.
/**
- * @returns <tt>post(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
+ * @param ctx An execution context, from which the target executor is obtained.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
+ *
+ * @returns <tt>post(ctx.get_executor(), forward<NullaryToken>(token))</tt>.
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <typename ExecutionContext, typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void()) post(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
+template <typename ExecutionContext,
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+inline auto post(ExecutionContext& ctx,
+ NullaryToken&& token = default_completion_token_t<
+ typename ExecutionContext::executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_post_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_post_with_executor<
+ typename ExecutionContext::executor_type>(
+ ctx.get_executor()), token);
+}
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/post.hpp"
-
#endif // ASIO_POST_HPP
diff --git a/3rdparty/asio/include/asio/prefer.hpp b/3rdparty/asio/include/asio/prefer.hpp
new file mode 100644
index 00000000000..3b13d4123bf
--- /dev/null
+++ b/3rdparty/asio/include/asio/prefer.hpp
@@ -0,0 +1,577 @@
+//
+// prefer.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_PREFER_HPP
+#define ASIO_PREFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/prefer_free.hpp"
+#include "asio/traits/prefer_member.hpp"
+#include "asio/traits/require_free.hpp"
+#include "asio/traits/require_member.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace asio {
+
+/// A customisation point that attempts to apply a property to an object.
+/**
+ * The name <tt>prefer</tt> denotes a customisation point object. The
+ * expression <tt>asio::prefer(E, P0, Pn...)</tt> for some subexpressions
+ * <tt>E</tt> and <tt>P0</tt>, and where <tt>Pn...</tt> represents <tt>N</tt>
+ * subexpressions (where <tt>N</tt> is 0 or more, and with types <tt>T =
+ * decay_t<decltype(E)></tt> and <tt>Prop0 = decay_t<decltype(P0)></tt>) is
+ * expression-equivalent to:
+ *
+ * @li If <tt>is_applicable_property_v<T, Prop0> && Prop0::is_preferable</tt> is
+ * not a well-formed constant expression with value <tt>true</tt>,
+ * <tt>asio::prefer(E, P0, Pn...)</tt> is ill-formed.
+ *
+ * @li Otherwise, <tt>E</tt> if <tt>N == 0</tt> and the expression
+ * <tt>Prop0::template static_query_v<T> == Prop0::value()</tt> is a
+ * well-formed constant expression with value <tt>true</tt>.
+ *
+ * @li Otherwise, <tt>(E).require(P0)</tt> if <tt>N == 0</tt> and the expression
+ * <tt>(E).require(P0)</tt> is a valid expression.
+ *
+ * @li Otherwise, <tt>require(E, P0)</tt> if <tt>N == 0</tt> and the expression
+ * <tt>require(E, P0)</tt> is a valid expression with overload resolution
+ * performed in a context that does not include the declaration of the
+ * <tt>require</tt> customization point object.
+ *
+ * @li Otherwise, <tt>(E).prefer(P0)</tt> if <tt>N == 0</tt> and the expression
+ * <tt>(E).prefer(P0)</tt> is a valid expression.
+ *
+ * @li Otherwise, <tt>prefer(E, P0)</tt> if <tt>N == 0</tt> and the expression
+ * <tt>prefer(E, P0)</tt> is a valid expression with overload resolution
+ * performed in a context that does not include the declaration of the
+ * <tt>prefer</tt> customization point object.
+ *
+ * @li Otherwise, <tt>E</tt> if <tt>N == 0</tt>.
+ *
+ * @li Otherwise,
+ * <tt>asio::prefer(asio::prefer(E, P0), Pn...)</tt>
+ * if <tt>N > 0</tt> and the expression
+ * <tt>asio::prefer(asio::prefer(E, P0), Pn...)</tt>
+ * is a valid expression.
+ *
+ * @li Otherwise, <tt>asio::prefer(E, P0, Pn...)</tt> is ill-formed.
+ */
+inline constexpr unspecified prefer = unspecified;
+
+/// A type trait that determines whether a @c prefer expression is well-formed.
+/**
+ * Class template @c can_prefer is a trait that is derived from
+ * @c true_type if the expression <tt>asio::prefer(std::declval<T>(),
+ * std::declval<Properties>()...)</tt> is well formed; otherwise @c false_type.
+ */
+template <typename T, typename... Properties>
+struct can_prefer :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines whether a @c prefer expression will not throw.
+/**
+ * Class template @c is_nothrow_prefer is a trait that is derived from
+ * @c true_type if the expression <tt>asio::prefer(std::declval<T>(),
+ * std::declval<Properties>()...)</tt> is @c noexcept; otherwise @c false_type.
+ */
+template <typename T, typename... Properties>
+struct is_nothrow_prefer :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines the result type of a @c prefer expression.
+/**
+ * Class template @c prefer_result is a trait that determines the result
+ * type of the expression <tt>asio::prefer(std::declval<T>(),
+ * std::declval<Properties>()...)</tt>.
+ */
+template <typename T, typename... Properties>
+struct prefer_result
+{
+ /// The result of the @c prefer expression.
+ typedef automatically_determined type;
+};
+
+} // namespace asio
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace asio_prefer_fn {
+
+using asio::conditional_t;
+using asio::decay_t;
+using asio::declval;
+using asio::enable_if_t;
+using asio::is_applicable_property;
+using asio::traits::prefer_free;
+using asio::traits::prefer_member;
+using asio::traits::require_free;
+using asio::traits::require_member;
+using asio::traits::static_require;
+
+void prefer();
+void require();
+
+enum overload_type
+{
+ identity,
+ call_require_member,
+ call_require_free,
+ call_prefer_member,
+ call_prefer_free,
+ two_props,
+ n_props,
+ ill_formed
+};
+
+template <typename Impl, typename T, typename Properties,
+ typename = void, typename = void, typename = void, typename = void,
+ typename = void, typename = void, typename = void>
+struct call_traits
+{
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
+ static_require<T, Property>::is_valid
+ >>
+{
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+
+ typedef T&& result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >> :
+ require_member<typename Impl::template proxy<T>::type, Property>
+{
+ static constexpr overload_type overload = call_require_member;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ require_free<T, Property>::is_valid
+ >> :
+ require_free<T, Property>
+{
+ static constexpr overload_type overload = call_require_free;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_free<T, Property>::is_valid
+ >,
+ enable_if_t<
+ prefer_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >> :
+ prefer_member<typename Impl::template proxy<T>::type, Property>
+{
+ static constexpr overload_type overload = call_prefer_member;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_free<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !prefer_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ prefer_free<T, Property>::is_valid
+ >> :
+ prefer_free<T, Property>
+{
+ static constexpr overload_type overload = call_prefer_free;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_free<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !prefer_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ !prefer_free<T, Property>::is_valid
+ >>
+{
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+
+ typedef T&& result_type;
+};
+
+template <typename Impl, typename T, typename P0, typename P1>
+struct call_traits<Impl, T, void(P0, P1),
+ enable_if_t<
+ call_traits<Impl, T, void(P0)>::overload != ill_formed
+ >,
+ enable_if_t<
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1)
+ >::overload != ill_formed
+ >>
+{
+ static constexpr overload_type overload = two_props;
+
+ static constexpr bool is_noexcept =
+ (
+ call_traits<Impl, T, void(P0)>::is_noexcept
+ &&
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1)
+ >::is_noexcept
+ );
+
+ typedef decay_t<
+ typename call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1)
+ >::result_type
+ > result_type;
+};
+
+template <typename Impl, typename T, typename P0,
+ typename P1, typename... PN>
+struct call_traits<Impl, T, void(P0, P1, PN...),
+ enable_if_t<
+ call_traits<Impl, T, void(P0)>::overload != ill_formed
+ >,
+ enable_if_t<
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1, PN...)
+ >::overload != ill_formed
+ >>
+{
+ static constexpr overload_type overload = n_props;
+
+ static constexpr bool is_noexcept =
+ (
+ call_traits<Impl, T, void(P0)>::is_noexcept
+ &&
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1, PN...)
+ >::is_noexcept
+ );
+
+ typedef decay_t<
+ typename call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1, PN...)
+ >::result_type
+ > result_type;
+};
+
+struct impl
+{
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) \
+ && defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto require(P&& p)
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
+ );
+
+ template <typename P>
+ auto prefer(P&& p)
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().prefer(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().prefer(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+ // && defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+ // && defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+ };
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == identity,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t);
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_require_member,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t).require(static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_require_free,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return require(static_cast<T&&>(t), static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_prefer_member,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t).prefer(static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_prefer_free,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return prefer(static_cast<T&&>(t), static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename P0, typename P1>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(P0, P1)>::overload == two_props,
+ typename call_traits<impl, T, void(P0, P1)>::result_type
+ >
+ operator()(T&& t, P0&& p0, P1&& p1) const
+ noexcept(call_traits<impl, T, void(P0, P1)>::is_noexcept)
+ {
+ return (*this)(
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1));
+ }
+
+ template <typename T, typename P0, typename P1,
+ typename... PN>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(P0, P1, PN...)>::overload == n_props,
+ typename call_traits<impl, T, void(P0, P1, PN...)>::result_type
+ >
+ operator()(T&& t, P0&& p0, P1&& p1, PN&&... pn) const
+ noexcept(call_traits<impl, T, void(P0, P1, PN...)>::is_noexcept)
+ {
+ return (*this)(
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1), static_cast<PN&&>(pn)...);
+ }
+};
+
+template <typename T = impl>
+struct static_instance
+{
+ static const T instance;
+};
+
+template <typename T>
+const T static_instance<T>::instance = {};
+
+} // namespace asio_prefer_fn
+namespace asio {
+namespace {
+
+static constexpr const asio_prefer_fn::impl&
+ prefer = asio_prefer_fn::static_instance<>::instance;
+
+} // namespace
+
+typedef asio_prefer_fn::impl prefer_t;
+
+template <typename T, typename... Properties>
+struct can_prefer :
+ integral_constant<bool,
+ asio_prefer_fn::call_traits<
+ prefer_t, T, void(Properties...)>::overload
+ != asio_prefer_fn::ill_formed>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+constexpr bool can_prefer_v
+ = can_prefer<T, Properties...>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+struct is_nothrow_prefer :
+ integral_constant<bool,
+ asio_prefer_fn::call_traits<
+ prefer_t, T, void(Properties...)>::is_noexcept>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+constexpr bool is_nothrow_prefer_v = is_nothrow_prefer<T, Properties...>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+struct prefer_result
+{
+ typedef typename asio_prefer_fn::call_traits<
+ prefer_t, T, void(Properties...)>::result_type type;
+};
+
+template <typename T, typename... Properties>
+using prefer_result_t = typename prefer_result<T, Properties...>::type;
+
+} // namespace asio
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_PREFER_HPP
diff --git a/3rdparty/asio/include/asio/prepend.hpp b/3rdparty/asio/include/asio/prepend.hpp
new file mode 100644
index 00000000000..972b47fd300
--- /dev/null
+++ b/3rdparty/asio/include/asio/prepend.hpp
@@ -0,0 +1,66 @@
+//
+// prepend.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_PREPEND_HPP
+#define ASIO_PREPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values before the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+class prepend_t
+{
+public:
+ /// Constructor.
+ template <typename T, typename... V>
+ constexpr explicit prepend_t(T&& completion_token, V&&... values)
+ : token_(static_cast<T&&>(completion_token)),
+ values_(static_cast<V&&>(values)...)
+ {
+ }
+
+//private:
+ CompletionToken token_;
+ std::tuple<Values...> values_;
+};
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values before the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+ASIO_NODISCARD inline constexpr
+prepend_t<decay_t<CompletionToken>, decay_t<Values>...>
+prepend(CompletionToken&& completion_token,
+ Values&&... values)
+{
+ return prepend_t<decay_t<CompletionToken>, decay_t<Values>...>(
+ static_cast<CompletionToken&&>(completion_token),
+ static_cast<Values&&>(values)...);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/prepend.hpp"
+
+#endif // ASIO_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/query.hpp b/3rdparty/asio/include/asio/query.hpp
new file mode 100644
index 00000000000..c27d26a4030
--- /dev/null
+++ b/3rdparty/asio/include/asio/query.hpp
@@ -0,0 +1,311 @@
+//
+// query.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_QUERY_HPP
+#define ASIO_QUERY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/query_member.hpp"
+#include "asio/traits/query_free.hpp"
+#include "asio/traits/static_query.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace asio {
+
+/// A customisation point that queries the value of a property.
+/**
+ * The name <tt>query</tt> denotes a customization point object. The
+ * expression <tt>asio::query(E, P)</tt> for some
+ * subexpressions <tt>E</tt> and <tt>P</tt> (with types <tt>T =
+ * decay_t<decltype(E)></tt> and <tt>Prop = decay_t<decltype(P)></tt>) is
+ * expression-equivalent to:
+ *
+ * @li If <tt>is_applicable_property_v<T, Prop></tt> is not a well-formed
+ * constant expression with value <tt>true</tt>, <tt>asio::query(E,
+ * P)</tt> is ill-formed.
+ *
+ * @li Otherwise, <tt>Prop::template static_query_v<T></tt> if the expression
+ * <tt>Prop::template static_query_v<T></tt> is a well-formed constant
+ * expression.
+ *
+ * @li Otherwise, <tt>(E).query(P)</tt> if the expression
+ * <tt>(E).query(P)</tt> is well-formed.
+ *
+ * @li Otherwise, <tt>query(E, P)</tt> if the expression
+ * <tt>query(E, P)</tt> is a valid expression with overload
+ * resolution performed in a context that does not include the declaration
+ * of the <tt>query</tt> customization point object.
+ *
+ * @li Otherwise, <tt>asio::query(E, P)</tt> is ill-formed.
+ */
+inline constexpr unspecified query = unspecified;
+
+/// A type trait that determines whether a @c query expression is well-formed.
+/**
+ * Class template @c can_query is a trait that is derived from
+ * @c true_type if the expression <tt>asio::query(std::declval<T>(),
+ * std::declval<Property>())</tt> is well formed; otherwise @c false_type.
+ */
+template <typename T, typename Property>
+struct can_query :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines whether a @c query expression will
+/// not throw.
+/**
+ * Class template @c is_nothrow_query is a trait that is derived from
+ * @c true_type if the expression <tt>asio::query(std::declval<T>(),
+ * std::declval<Property>())</tt> is @c noexcept; otherwise @c false_type.
+ */
+template <typename T, typename Property>
+struct is_nothrow_query :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines the result type of a @c query expression.
+/**
+ * Class template @c query_result is a trait that determines the result
+ * type of the expression <tt>asio::query(std::declval<T>(),
+ * std::declval<Property>())</tt>.
+ */
+template <typename T, typename Property>
+struct query_result
+{
+ /// The result of the @c query expression.
+ typedef automatically_determined type;
+};
+
+} // namespace asio
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace asio_query_fn {
+
+using asio::conditional_t;
+using asio::decay_t;
+using asio::declval;
+using asio::enable_if_t;
+using asio::is_applicable_property;
+using asio::traits::query_free;
+using asio::traits::query_member;
+using asio::traits::static_query;
+
+void query();
+
+enum overload_type
+{
+ static_value,
+ call_member,
+ call_free,
+ ill_formed
+};
+
+template <typename Impl, typename T, typename Properties,
+ typename = void, typename = void, typename = void, typename = void>
+struct call_traits
+{
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ static_query<T, Property>::is_valid
+ >> :
+ static_query<T, Property>
+{
+ static constexpr overload_type overload = static_value;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ !static_query<T, Property>::is_valid
+ >,
+ enable_if_t<
+ query_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >> :
+ query_member<typename Impl::template proxy<T>::type, Property>
+{
+ static constexpr overload_type overload = call_member;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ !static_query<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !query_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ query_free<T, Property>::is_valid
+ >> :
+ query_free<T, Property>
+{
+ static constexpr overload_type overload = call_free;
+};
+
+struct impl
+{
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto query(P&& p)
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+ };
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == static_value,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&&, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_query<decay_t<T>, decay_t<Property>>::value();
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_member,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t).query(static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_free,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return query(static_cast<T&&>(t), static_cast<Property&&>(p));
+ }
+};
+
+template <typename T = impl>
+struct static_instance
+{
+ static const T instance;
+};
+
+template <typename T>
+const T static_instance<T>::instance = {};
+
+} // namespace asio_query_fn
+namespace asio {
+namespace {
+
+static constexpr const asio_query_fn::impl&
+ query = asio_query_fn::static_instance<>::instance;
+
+} // namespace
+
+typedef asio_query_fn::impl query_t;
+
+template <typename T, typename Property>
+struct can_query :
+ integral_constant<bool,
+ asio_query_fn::call_traits<query_t, T, void(Property)>::overload !=
+ asio_query_fn::ill_formed>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+constexpr bool can_query_v = can_query<T, Property>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+struct is_nothrow_query :
+ integral_constant<bool,
+ asio_query_fn::call_traits<query_t, T, void(Property)>::is_noexcept>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+constexpr bool is_nothrow_query_v = is_nothrow_query<T, Property>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+struct query_result
+{
+ typedef typename asio_query_fn::call_traits<
+ query_t, T, void(Property)>::result_type type;
+};
+
+template <typename T, typename Property>
+using query_result_t = typename query_result<T, Property>::type;
+
+} // namespace asio
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_QUERY_HPP
diff --git a/3rdparty/asio/include/asio/random_access_file.hpp b/3rdparty/asio/include/asio/random_access_file.hpp
new file mode 100644
index 00000000000..c638e336394
--- /dev/null
+++ b/3rdparty/asio/include/asio/random_access_file.hpp
@@ -0,0 +1,35 @@
+//
+// random_access_file.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_RANDOM_ACCESS_FILE_HPP
+#define ASIO_RANDOM_ACCESS_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_random_access_file.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a random-access file.
+typedef basic_random_access_file<> random_access_file;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_RANDOM_ACCESS_FILE_HPP
diff --git a/3rdparty/asio/include/asio/raw_socket_service.hpp b/3rdparty/asio/include/asio/raw_socket_service.hpp
deleted file mode 100644
index f8b183d57c7..00000000000
--- a/3rdparty/asio/include/asio/raw_socket_service.hpp
+++ /dev/null
@@ -1,455 +0,0 @@
-//
-// raw_socket_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_RAW_SOCKET_SERVICE_HPP
-#define ASIO_RAW_SOCKET_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_socket_service.hpp"
-#elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-#else
-# include "asio/detail/reactive_socket_service.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a raw socket.
-template <typename Protocol>
-class raw_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<raw_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a raw socket.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new raw socket service for the specified io_context.
- explicit raw_socket_service(asio::io_context& io_context)
- : asio::detail::service_base<
- raw_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new raw socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new raw socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another raw socket implementation.
- void move_assign(implementation_type& impl,
- raw_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- /// Move-construct a new raw socket implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- typename raw_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a raw socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- // Open a new raw socket implementation.
- ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, asio::error_code& ec)
- {
- if (protocol.type() == ASIO_OS_DEF(SOCK_RAW))
- service_impl_.open(impl, protocol, ec);
- else
- ec = asio::error::invalid_argument;
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a raw socket.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- asio::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a raw socket implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- // Bind the raw socket to the specified local endpoint.
- ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, asio::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the raw socket to the specified endpoint.
- ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, asio::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (asio::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, asio::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, asio::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, asio::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, asio::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, asio::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(implementation_type& impl, const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send raw data to the specified endpoint.
- template <typename ConstBufferSequence>
- std::size_t send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.send_to(impl, buffers, destination, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(implementation_type& impl,
- const ConstBufferSequence& buffers, const endpoint_type& destination,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send_to(impl, buffers,
- destination, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.receive(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive raw data with the endpoint of the sender.
- template <typename MutableBufferSequence>
- std::size_t receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.receive_from(impl, buffers, sender_endpoint, flags,
- ec);
- }
-
- /// Start an asynchronous receive that will get the endpoint of the sender.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(implementation_type& impl,
- const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive_from(impl, buffers,
- sender_endpoint, flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_RAW_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/read.hpp b/3rdparty/asio/include/asio/read.hpp
index 4839934dbab..0eb966af36f 100644
--- a/3rdparty/asio/include/asio/read.hpp
+++ b/3rdparty/asio/include/asio/read.hpp
@@ -2,7 +2,7 @@
// read.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#include <cstddef>
#include "asio/async_result.hpp"
#include "asio/buffer.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/error.hpp"
#if !defined(ASIO_NO_EXTENSIONS)
@@ -28,12 +29,21 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_read;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_dynbuf_v1;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_dynbuf_v2;
+
+} // namespace detail
/**
* @defgroup read asio::read
*
- * @brief Attempt to read a certain amount of data from a stream before
- * returning.
+ * @brief The @c read function is a composed operation that reads a certain
+ * amount of data from a stream before returning.
*/
/*@{*/
@@ -75,9 +85,9 @@ namespace asio {
*/
template <typename SyncReadStream, typename MutableBufferSequence>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -118,9 +128,9 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
template <typename SyncReadStream, typename MutableBufferSequence>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -172,9 +182,9 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -219,9 +229,11 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
+ > = 0);
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -250,12 +262,15 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
* s, buffers,
* asio::transfer_all()); @endcode
*/
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -283,13 +298,16 @@ std::size_t read(SyncReadStream& s,
* s, buffers,
* asio::transfer_all(), ec); @endcode
*/
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -327,14 +345,17 @@ std::size_t read(SyncReadStream& s,
*
* @throws asio::system_error Thrown on failure.
*/
-template <typename SyncReadStream, typename DynamicBuffer,
+template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -373,14 +394,17 @@ std::size_t read(SyncReadStream& s,
* @returns The number of bytes read. If an error occurs, returns the total
* number of bytes successfully transferred prior to the error.
*/
-template <typename SyncReadStream, typename DynamicBuffer,
+template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -527,13 +551,169 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code asio::read(
+ * s, buffers,
+ * asio::transfer_all()); @endcode
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code asio::read(
+ * s, buffers,
+ * asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
/*@}*/
/**
* @defgroup async_read asio::async_read
*
- * @brief Start an asynchronous operation to read a certain amount of data from
- * a stream.
+ * @brief The @c async_read function is a composed asynchronous operation that
+ * reads a certain amount of data from a stream before completion.
*/
/*@{*/
@@ -541,9 +721,9 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -563,24 +743,29 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
* of the buffer sizes indicates the maximum number of bytes to read from the
* stream. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
@@ -596,24 +781,41 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
* s, buffers,
* asio::transfer_all(),
* handler); @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
template <typename AsyncReadStream, typename MutableBufferSequence,
- typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -627,7 +829,7 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* of the buffer sizes indicates the maximum number of bytes to read from the
* stream. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -643,22 +845,27 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
@@ -669,25 +876,46 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+template <typename AsyncReadStream,
+ typename MutableBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The specified dynamic buffer sequence is full (that is, it has reached
* maximum size).
@@ -706,49 +934,73 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note This overload is equivalent to calling:
* @code asio::async_read(
* s, buffers,
* asio::transfer_all(),
* handler); @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The specified dynamic buffer sequence is full (that is, it has reached
* maximum size).
@@ -767,7 +1019,7 @@ async_read(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -783,34 +1035,60 @@ async_read(AsyncReadStream& s,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -819,9 +1097,9 @@ async_read(AsyncReadStream& s,
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffer is full (that is, it has reached maximum size).
*
@@ -838,44 +1116,67 @@ async_read(AsyncReadStream& s,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note This overload is equivalent to calling:
* @code asio::async_read(
* s, b,
* asio::transfer_all(),
* handler); @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler);
+template <typename AsyncReadStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffer is full (that is, it has reached maximum size).
*
@@ -892,7 +1193,7 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -908,33 +1209,233 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+template <typename AsyncReadStream,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note This overload is equivalent to calling:
+ * @code asio::async_read(
+ * s, buffers,
+ * asio::transfer_all(),
+ * handler); @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
+ */
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()));
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_read_some operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's async_read_some function.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
+ */
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
/*@}*/
diff --git a/3rdparty/asio/include/asio/read_at.hpp b/3rdparty/asio/include/asio/read_at.hpp
index 16e6af1568c..09a0b22e12e 100644
--- a/3rdparty/asio/include/asio/read_at.hpp
+++ b/3rdparty/asio/include/asio/read_at.hpp
@@ -2,7 +2,7 @@
// read_at.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"
#include <cstddef>
#include "asio/async_result.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/error.hpp"
@@ -28,12 +29,20 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_read_at;
+#if !defined(ASIO_NO_IOSTREAM)
+template <typename> class initiate_async_read_at_streambuf;
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace detail
/**
* @defgroup read_at asio::read_at
*
- * @brief Attempt to read a certain amount of data at the specified offset
- * before returning.
+ * @brief The @c read_at function is a composed operation that reads a certain
+ * amount of data at the specified offset before returning.
*/
/*@{*/
@@ -394,8 +403,8 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
/**
* @defgroup async_read_at asio::async_read_at
*
- * @brief Start an asynchronous operation to read a certain amount of data at
- * the specified offset.
+ * @brief The @c async_read_at function is a composed asynchronous operation
+ * that reads a certain amount of data at the specified offset.
*/
/*@{*/
@@ -403,9 +412,10 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -424,11 +434,13 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* of the buffer sizes indicates the maximum number of bytes to read from the
* device. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -439,9 +451,12 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
@@ -457,22 +472,40 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* d, 42, buffers,
* asio::transfer_all(),
* handler); @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessReadDevice type's
+ * async_read_some_at operation.
*/
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler);
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -488,7 +521,7 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* of the buffer sizes indicates the maximum number of bytes to read from the
* device. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -504,9 +537,11 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* return value indicates the maximum number of bytes to be read on the next
* call to the device's async_read_some_at function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -517,9 +552,12 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
@@ -530,15 +568,34 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessReadDevice type's
+ * async_read_some_at operation.
*/
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -547,9 +604,10 @@ async_read_at(AsyncRandomAccessReadDevice& d,
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li An error occurred.
*
@@ -563,11 +621,13 @@ async_read_at(AsyncRandomAccessReadDevice& d,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -578,30 +638,53 @@ async_read_at(AsyncRandomAccessReadDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note This overload is equivalent to calling:
* @code asio::async_read_at(
* d, 42, b,
* asio::transfer_all(),
* handler); @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessReadDevice type's
+ * async_read_some_at operation.
*/
template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, ASIO_MOVE_ARG(ReadHandler) handler);
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li The completion_condition function object returns 0.
*
@@ -615,7 +698,7 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -631,9 +714,11 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* return value indicates the maximum number of bytes to be read on the next
* call to the device's async_read_some_at function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -644,18 +729,40 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessReadDevice type's
+ * async_read_some_at operation.
*/
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler);
+template <typename AsyncRandomAccessReadDevice,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
diff --git a/3rdparty/asio/include/asio/read_until.hpp b/3rdparty/asio/include/asio/read_until.hpp
index 93bf96b38c7..97abbdbf0ea 100644
--- a/3rdparty/asio/include/asio/read_until.hpp
+++ b/3rdparty/asio/include/asio/read_until.hpp
@@ -2,7 +2,7 @@
// read_until.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#include <cstddef>
#include <string>
#include "asio/async_result.hpp"
+#include "asio/buffer.hpp"
#include "asio/detail/regex_fwd.hpp"
#include "asio/detail/string_view.hpp"
#include "asio/detail/type_traits.hpp"
@@ -31,19 +32,34 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
-namespace detail
+char (&has_result_type_helper(...))[2];
+
+template <typename T>
+char has_result_type_helper(T*, typename T::result_type* = 0);
+
+template <typename T>
+struct has_result_type
{
- char (&has_result_type_helper(...))[2];
+ enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) };
+};
- template <typename T>
- char has_result_type_helper(T*, typename T::result_type* = 0);
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_until_delim_v1;
+template <typename> class initiate_async_read_until_delim_string_v1;
+#if defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_expr_v1;
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_match_v1;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_until_delim_v2;
+template <typename> class initiate_async_read_until_delim_string_v2;
+#if defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_expr_v2;
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_match_v2;
- template <typename T>
- struct has_result_type
- {
- enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) };
- };
} // namespace detail
/// Type trait used to determine whether a type can be used as a match condition
@@ -57,8 +73,7 @@ struct is_match_condition
#else
enum
{
- value = asio::is_function<
- typename asio::remove_pointer<T>::type>::value
+ value = asio::is_function<remove_pointer_t<T>>::value
|| detail::has_result_type<T>::value
};
#endif
@@ -67,12 +82,15 @@ struct is_match_condition
/**
* @defgroup read_until asio::read_until
*
- * @brief Read data into a dynamic buffer sequence, or into a streambuf, until
- * it contains a delimiter, matches a regular expression, or a function object
- * indicates a match.
+ * @brief The @c read_until function is a composed operation that reads data
+ * into a dynamic buffer sequence, or into a streambuf, until it contains a
+ * delimiter, matches a regular expression, or a function object indicates a
+ * match.
*/
/*@{*/
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
/**
@@ -110,7 +128,7 @@ struct is_match_condition
* @par Example
* To read data into a @c std::string until a newline is encountered:
* @code std::string data;
- * std::string n = asio::read_until(s,
+ * std::size_t n = asio::read_until(s,
* asio::dynamic_buffer(data), '\n');
* std::string line = data.substr(0, n);
* data.erase(0, n); @endcode
@@ -126,9 +144,15 @@ struct is_match_condition
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim);
+ DynamicBuffer_v1&& buffers, char delim,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -164,10 +188,16 @@ std::size_t read_until(SyncReadStream& s,
* typically leave that data in the dynamic buffer sequence for a subsequent
* read_until operation to examine.
*/
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, asio::error_code& ec);
+ DynamicBuffer_v1&& buffers,
+ char delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -204,7 +234,7 @@ std::size_t read_until(SyncReadStream& s,
* @par Example
* To read data into a @c std::string until a CR-LF sequence is encountered:
* @code std::string data;
- * std::string n = asio::read_until(s,
+ * std::size_t n = asio::read_until(s,
* asio::dynamic_buffer(data), "\r\n");
* std::string line = data.substr(0, n);
* data.erase(0, n); @endcode
@@ -220,10 +250,16 @@ std::size_t read_until(SyncReadStream& s,
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_STRING_VIEW_PARAM delim);
+ DynamicBuffer_v1&& buffers,
+ ASIO_STRING_VIEW_PARAM delim,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -259,11 +295,17 @@ std::size_t read_until(SyncReadStream& s,
* typically leave that data in the dynamic buffer sequence for a subsequent
* read_until operation to examine.
*/
-template <typename SyncReadStream, typename DynamicBuffer>
+template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim,
- asio::error_code& ec);
+ asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX) \
@@ -307,7 +349,7 @@ std::size_t read_until(SyncReadStream& s,
* @par Example
* To read data into a @c std::string until a CR-LF sequence is encountered:
* @code std::string data;
- * std::string n = asio::read_until(s,
+ * std::size_t n = asio::read_until(s,
* asio::dynamic_buffer(data), boost::regex("\r\n"));
* std::string line = data.substr(0, n);
* data.erase(0, n); @endcode
@@ -323,10 +365,15 @@ std::size_t read_until(SyncReadStream& s,
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr);
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until some part of the data it
/// contains matches a regular expression.
@@ -364,10 +411,15 @@ std::size_t read_until(SyncReadStream& s,
* expression. An application will typically leave that data in the dynamic
* buffer sequence for a subsequent read_until operation to examine.
*/
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr, asio::error_code& ec);
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -400,7 +452,7 @@ std::size_t read_until(SyncReadStream& s,
* @code pair<iterator, bool> match_condition(iterator begin, iterator end);
* @endcode
* where @c iterator represents the type:
- * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
+ * @code buffers_iterator<typename DynamicBuffer_v1::const_buffers_type>
* @endcode
* The iterator parameters @c begin and @c end define the range of bytes to be
* scanned to determine whether there is a match. The @c first member of the
@@ -475,11 +527,19 @@ std::size_t read_until(SyncReadStream& s,
* @endcode
*/
template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
+ typename DynamicBuffer_v1, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until a function object indicates a
/// match.
@@ -508,7 +568,7 @@ std::size_t read_until(SyncReadStream& s,
* @code pair<iterator, bool> match_condition(iterator begin, iterator end);
* @endcode
* where @c iterator represents the type:
- * @code buffers_iterator<DynamicBuffer::const_buffers_type>
+ * @code buffers_iterator<DynamicBuffer_v1::const_buffers_type>
* @endcode
* The iterator parameters @c begin and @c end define the range of bytes to be
* scanned to determine whether there is a match. The @c first member of the
@@ -535,11 +595,19 @@ std::size_t read_until(SyncReadStream& s,
* function objects.
*/
template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
+ typename DynamicBuffer_v1, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition, asio::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_IOSTREAM)
@@ -584,8 +652,8 @@ std::size_t read_until(SyncReadStream& s,
* contains the delimiter:
* @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
* The call to @c std::getline then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\n' } @endcode
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c' } @endcode
* The remaining data is left in the buffer @c b as follows:
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
@@ -671,8 +739,8 @@ std::size_t read_until(SyncReadStream& s,
* contains the delimiter:
* @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
* The call to @c std::getline then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
* The remaining data is left in the buffer @c b as follows:
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
@@ -764,16 +832,17 @@ std::size_t read_until(SyncReadStream& s,
* contains the data which matched the regular expression:
* @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
* The call to @c std::getline then extracts the data up to and including the
- * match, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
* The remaining data is left in the buffer @c b as follows:
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr);
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr);
/// Read data into a streambuf until some part of the data it contains matches
/// a regular expression.
@@ -808,9 +877,10 @@ std::size_t read_until(SyncReadStream& s,
* application will typically leave that data in the streambuf for a subsequent
* read_until operation to examine.
*/
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr,
asio::error_code& ec);
#endif // defined(ASIO_HAS_BOOST_REGEX)
@@ -919,7 +989,7 @@ std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename Allocator, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+ constraint_t<is_match_condition<MatchCondition>::value> = 0);
/// Read data into a streambuf until a function object indicates a match.
/**
@@ -976,29 +1046,522 @@ template <typename SyncReadStream, typename Allocator, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
MatchCondition match_condition, asio::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+ constraint_t<is_match_condition<MatchCondition>::value> = 0);
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter character.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a @c std::string until a newline is encountered:
+ * @code std::string data;
+ * std::size_t n = asio::read_until(s,
+ * asio::dynamic_buffer(data), '\n');
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n); @endcode
+ * After the @c read_until operation completes successfully, the string @c data
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c b as
+ * follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter character.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ char delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter string.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a @c std::string until a CR-LF sequence is encountered:
+ * @code std::string data;
+ * std::size_t n = asio::read_until(s,
+ * asio::dynamic_buffer(data), "\r\n");
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n); @endcode
+ * After the @c read_until operation completes successfully, the string @c data
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c b as
+ * follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ ASIO_STRING_VIEW_PARAM delim,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter string.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+#if !defined(ASIO_NO_EXTENSIONS)
+#if defined(ASIO_HAS_BOOST_REGEX) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Read data into a dynamic buffer sequence until some part of the data it
+/// contains matches a regular expression.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains some data
+ * that matches a regular expression. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li A substring of the dynamic buffer sequence's get area matches the
+ * regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains data that matches the regular expression, the function returns
+ * immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param expr The regular expression.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the substring that matches the regular expression.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the regular
+ * expression. An application will typically leave that data in the dynamic
+ * buffer sequence for a subsequent read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a @c std::string until a CR-LF sequence is encountered:
+ * @code std::string data;
+ * std::size_t n = asio::read_until(s,
+ * asio::dynamic_buffer(data), boost::regex("\r\n"));
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n); @endcode
+ * After the @c read_until operation completes successfully, the string @c data
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c b as
+ * follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Read data into a dynamic buffer sequence until some part of the data it
+/// contains matches a regular expression.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains some data
+ * that matches a regular expression. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li A substring of the dynamic buffer sequence's get area matches the
+ * regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains data that matches the regular expression, the function returns
+ * immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param expr The regular expression.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the substring that matches the regular expression. Returns 0
+ * if an error occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the regular
+ * expression. An application will typically leave that data in the dynamic
+ * buffer sequence for a subsequent read_until operation to examine.
+ */
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Read data into a dynamic buffer sequence until a function object indicates a
+/// match.
+
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until a user-defined match condition function object, when applied
+ * to the data contained in the dynamic buffer sequence, indicates a successful
+ * match. The call will block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<typename DynamicBuffer_v2::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @returns The number of bytes in the dynamic_buffer's get area that
+ * have been fully consumed by the match function.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the function object.
+ * An application will typically leave that data in the dynamic buffer sequence
+ * for a subsequent read_until operation to examine.
+
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To read data into a dynamic buffer sequence until whitespace is encountered:
+ * @code typedef asio::buffers_iterator<
+ * asio::const_buffers_1> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * std::string data;
+ * asio::read_until(s, data, match_whitespace);
+ * @endcode
+ *
+ * To read data into a @c std::string until a matching character is found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * std::string data;
+ * asio::read_until(s, data, match_char('a'));
+ * @endcode
+ */
+template <typename SyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Read data into a dynamic buffer sequence until a function object indicates a
+/// match.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until a user-defined match condition function object, when applied
+ * to the data contained in the dynamic buffer sequence, indicates a successful
+ * match. The call will block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<DynamicBuffer_v2::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area that
+ * have been fully consumed by the match function. Returns 0 if an error
+ * occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the function object.
+ * An application will typically leave that data in the dynamic buffer sequence
+ * for a subsequent read_until operation to examine.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ */
+template <typename SyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, asio::error_code& ec,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+#endif // !defined(ASIO_NO_EXTENSIONS)
/*@}*/
/**
* @defgroup async_read_until asio::async_read_until
*
- * @brief Start an asynchronous operation to read data into a dynamic buffer
- * sequence, or into a streambuf, until it contains a delimiter, matches a
- * regular expression, or a function object indicates a match.
+ * @brief The @c async_read_until function is a composed asynchronous operation
+ * that reads data into a dynamic buffer sequence, or into a streambuf, until
+ * it contains a delimiter, matches a regular expression, or a function object
+ * indicates a match.
*/
/*@{*/
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
/// Start an asynchronous operation to read data into a dynamic buffer sequence
/// until it contains a specified delimiter.
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The get area of the dynamic buffer sequence contains the specified
* delimiter.
@@ -1019,26 +1582,30 @@ std::size_t read_until(SyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param delim The delimiter character.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
*
* // The number of bytes in the dynamic buffer sequence's
* // get area up to and including the delimiter.
- * // 0 if an error occurred.
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond the delimiter. An application
@@ -1072,23 +1639,46 @@ std::size_t read_until(SyncReadStream& s,
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler);
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, char delim,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim));
/// Start an asynchronous operation to read data into a dynamic buffer sequence
/// until it contains a specified delimiter.
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The get area of the dynamic buffer sequence contains the specified
* delimiter.
@@ -1109,26 +1699,30 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param delim The delimiter string.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
*
* // The number of bytes in the dynamic buffer sequence's
* // get area up to and including the delimiter.
- * // 0 if an error occurred.
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond the delimiter. An application
@@ -1162,15 +1756,40 @@ async_read_until(AsyncReadStream& s,
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v1<
+ AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<std::string>(delim)));
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX) \
@@ -1181,9 +1800,10 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains some
- * data that matches a regular expression. The function call always returns
- * immediately. The asynchronous operation will continue until one of the
- * following conditions is true:
+ * data that matches a regular expression. It is an initiating function for an
+ * @ref asynchronous_operation, and always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
*
* @li A substring of the dynamic buffer sequence's get area matches the regular
* expression.
@@ -1205,13 +1825,15 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param expr The regular expression.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1223,9 +1845,12 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond that which matched the regular
@@ -1260,15 +1885,37 @@ async_read_until(AsyncReadStream& s,
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler);
+template <typename AsyncReadStream, typename DynamicBuffer_v1, typename Traits,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr));
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -1279,9 +1926,9 @@ async_read_until(AsyncReadStream& s,
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until a user-defined match condition function object, when
* applied to the data contained in the dynamic buffer sequence, indicates a
- * successful match. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * successful match. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The match condition function object returns a std::pair where the second
* element evaluates to true.
@@ -1302,14 +1949,14 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param match_condition The function object to be called to determine whether
* a match exists. The signature of the function object must be:
* @code pair<iterator, bool> match_condition(iterator begin, iterator end);
* @endcode
* where @c iterator represents the type:
- * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
+ * @code buffers_iterator<typename DynamicBuffer_v1::const_buffers_type>
* @endcode
* The iterator parameters @c begin and @c end define the range of bytes to be
* scanned to determine whether there is a match. The @c first member of the
@@ -1319,9 +1966,11 @@ async_read_until(AsyncReadStream& s,
* @c second member of the return value is true if a match has been found, false
* otherwise.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1332,15 +1981,18 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond that which matched the function
* object. An application will typically leave that data in the dynamic buffer
* sequence for a subsequent async_read_until operation to examine.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The default implementation of the @c is_match_condition type trait
* evaluates to true for function pointers and function objects with a
* @c result_type typedef. It must be specialised for other user-defined
@@ -1400,15 +2052,42 @@ async_read_until(AsyncReadStream& s,
* std::string data;
* asio::async_read_until(s, data, match_char('a'), handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename MatchCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, MatchCondition match_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition));
#if !defined(ASIO_NO_IOSTREAM)
@@ -1417,8 +2096,9 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified
* streambuf until the streambuf's get area contains the specified delimiter.
- * The function call always returns immediately. The asynchronous operation
- * will continue until one of the following conditions is true:
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately. The asynchronous operation will continue until one of
+ * the following conditions is true:
*
* @li The get area of the streambuf contains the specified delimiter.
*
@@ -1437,13 +2117,15 @@ async_read_until(AsyncReadStream& s,
*
* @param b A streambuf object into which the data will be read. Ownership of
* the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
* @param delim The delimiter character.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1454,9 +2136,12 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond the delimiter. An application will typically
@@ -1483,27 +2168,46 @@ async_read_until(AsyncReadStream& s,
* @c b contains the delimiter:
* @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
* The call to @c std::getline then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\n' } @endcode
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c' } @endcode
* The remaining data is left in the buffer @c b as follows:
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler);
+template <typename AsyncReadStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b, char delim,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), delim));
/// Start an asynchronous operation to read data into a streambuf until it
/// contains a specified delimiter.
/**
* This function is used to asynchronously read data into the specified
* streambuf until the streambuf's get area contains the specified delimiter.
- * The function call always returns immediately. The asynchronous operation
- * will continue until one of the following conditions is true:
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately. The asynchronous operation will continue until one of
+ * the following conditions is true:
*
* @li The get area of the streambuf contains the specified delimiter.
*
@@ -1522,13 +2226,15 @@ async_read_until(AsyncReadStream& s,
*
* @param b A streambuf object into which the data will be read. Ownership of
* the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
* @param delim The delimiter string.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1539,9 +2245,12 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond the delimiter. An application will typically
@@ -1568,20 +2277,40 @@ async_read_until(AsyncReadStream& s,
* @c b contains the delimiter:
* @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
* The call to @c std::getline then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
* The remaining data is left in the buffer @c b as follows:
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
+template <typename AsyncReadStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v1<
+ AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<std::string>(delim)));
#if defined(ASIO_HAS_BOOST_REGEX) \
|| defined(GENERATING_DOCUMENTATION)
@@ -1591,9 +2320,9 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified
* streambuf until the streambuf's get area contains some data that matches a
- * regular expression. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * regular expression. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li A substring of the streambuf's get area matches the regular expression.
*
@@ -1613,13 +2342,15 @@ async_read_until(AsyncReadStream& s,
*
* @param b A streambuf object into which the data will be read. Ownership of
* the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
* @param expr The regular expression.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1631,9 +2362,12 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond that which matched the regular expression. An
@@ -1661,19 +2395,38 @@ async_read_until(AsyncReadStream& s,
* @c b contains the data which matched the regular expression:
* @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
* The call to @c std::getline then extracts the data up to and including the
- * match, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
* The remaining data is left in the buffer @c b as follows:
* @code { 'd', 'e', ... } @endcode
* This data may be the start of a new line, to be extracted by a subsequent
* @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler);
+template <typename AsyncReadStream, typename Allocator, typename Traits,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), expr));
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -1683,9 +2436,10 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified
* streambuf until a user-defined match condition function object, when applied
- * to the data contained in the streambuf, indicates a successful match. The
- * function call always returns immediately. The asynchronous operation will
- * continue until one of the following conditions is true:
+ * to the data contained in the streambuf, indicates a successful match. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately. The asynchronous operation will continue until one of
+ * the following conditions is true:
*
* @li The match condition function object returns a std::pair where the second
* element evaluates to true.
@@ -1720,9 +2474,11 @@ async_read_until(AsyncReadStream& s,
* @c second member of the return value is true if a match has been found, false
* otherwise.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1733,15 +2489,18 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
*
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond that which matched the function object. An
* application will typically leave that data in the streambuf for a subsequent
* async_read_until operation to examine.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The default implementation of the @c is_match_condition type trait
* evaluates to true for function pointers and function objects with a
* @c result_type typedef. It must be specialised for other user-defined
@@ -1800,18 +2559,559 @@ async_read_until(AsyncReadStream& s,
* asio::streambuf b;
* asio::async_read_until(s, b, match_char('a'), handler);
* @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator,
- typename MatchCondition, typename ReadHandler>
-ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<is_match_condition<MatchCondition>::value> = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), match_condition));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until it contains a specified delimiter.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until the dynamic buffer sequence's get area contains the
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the dynamic buffer sequence's get area already contains the delimiter, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param delim The delimiter character.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer sequence's
+ * // get area up to and including the delimiter.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond the delimiter. An application
+ * will typically leave that data in the dynamic buffer sequence for a
+ * subsequent async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a @c std::string until a newline is
+ * encountered:
+ * @code std::string data;
+ * ...
+ * void handler(const asio::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n);
+ * ...
+ * }
+ * }
+ * ...
+ * asio::async_read_until(s, data, '\n', handler); @endcode
+ * After the @c async_read_until operation completes successfully, the buffer
+ * @c data contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c data
+ * as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
+ */
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim));
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until it contains a specified delimiter.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until the dynamic buffer sequence's get area contains the
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the dynamic buffer sequence's get area already contains the delimiter, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param delim The delimiter string.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer sequence's
+ * // get area up to and including the delimiter.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond the delimiter. An application
+ * will typically leave that data in the dynamic buffer sequence for a
+ * subsequent async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a @c std::string until a CR-LF sequence is
+ * encountered:
+ * @code std::string data;
+ * ...
+ * void handler(const asio::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n);
+ * ...
+ * }
+ * }
+ * ...
+ * asio::async_read_until(s, data, "\r\n", handler); @endcode
+ * After the @c async_read_until operation completes successfully, the string
+ * @c data contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the string @c data
+ * as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
+ */
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ ASIO_STRING_VIEW_PARAM delim,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v2<
+ AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<std::string>(delim)));
+
+#if !defined(ASIO_NO_EXTENSIONS)
+#if defined(ASIO_HAS_BOOST_REGEX) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until some part of its data matches a regular expression.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until the dynamic buffer sequence's get area contains some
+ * data that matches a regular expression. It is an initiating function for an
+ * @ref asynchronous_operation, and always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li A substring of the dynamic buffer sequence's get area matches the regular
+ * expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the dynamic buffer sequence's get area already contains data that matches
+ * the regular expression, this asynchronous operation completes immediately.
+ * The program must ensure that the stream performs no other read operations
+ * (such as async_read, async_read_until, the stream's async_read_some
+ * function, or any other composed operations that perform reads) until this
+ * operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param expr The regular expression.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer
+ * // sequence's get area up to and including the
+ * // substring that matches the regular expression.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond that which matched the regular
+ * expression. An application will typically leave that data in the dynamic
+ * buffer sequence for a subsequent async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a @c std::string until a CR-LF sequence is
+ * encountered:
+ * @code std::string data;
+ * ...
+ * void handler(const asio::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n);
+ * ...
+ * }
+ * }
+ * ...
+ * asio::async_read_until(s, data,
+ * boost::regex("\r\n"), handler); @endcode
+ * After the @c async_read_until operation completes successfully, the string
+ * @c data contains the data which matched the regular expression:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the match,
+ * so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the string @c data
+ * as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
+ */
+template <typename AsyncReadStream, typename DynamicBuffer_v2, typename Traits,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr));
+
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until a function object indicates a match.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until a user-defined match condition function object, when
+ * applied to the data contained in the dynamic buffer sequence, indicates a
+ * successful match. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the match condition function object already indicates a match, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<typename DynamicBuffer_v2::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer sequence's
+ * // get area that have been fully consumed by the match
+ * // function. O if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond that which matched the function
+ * object. An application will typically leave that data in the dynamic buffer
+ * sequence for a subsequent async_read_until operation to examine.
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To asynchronously read data into a @c std::string until whitespace is
+ * encountered:
+ * @code typedef asio::buffers_iterator<
+ * asio::const_buffers_1> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * void handler(const asio::error_code& e, std::size_t size);
+ * ...
+ * std::string data;
+ * asio::async_read_until(s, data, match_whitespace, handler);
+ * @endcode
+ *
+ * To asynchronously read data into a @c std::string until a matching character
+ * is found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * void handler(const asio::error_code& e, std::size_t size);
+ * ...
+ * std::string data;
+ * asio::async_read_until(s, data, match_char('a'), handler);
+ * @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncReadStream type's
+ * @c async_read_some operation.
+ */
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, MatchCondition match_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), match_condition));
+
+#endif // !defined(ASIO_NO_EXTENSIONS)
/*@}*/
diff --git a/3rdparty/asio/include/asio/readable_pipe.hpp b/3rdparty/asio/include/asio/readable_pipe.hpp
new file mode 100644
index 00000000000..19101c28702
--- /dev/null
+++ b/3rdparty/asio/include/asio/readable_pipe.hpp
@@ -0,0 +1,35 @@
+//
+// readable_pipe.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_READABLE_PIPE_HPP
+#define ASIO_READABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_readable_pipe.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a readable pipe.
+typedef basic_readable_pipe<> readable_pipe;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_READABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/recycling_allocator.hpp b/3rdparty/asio/include/asio/recycling_allocator.hpp
new file mode 100644
index 00000000000..b3986c0242e
--- /dev/null
+++ b/3rdparty/asio/include/asio/recycling_allocator.hpp
@@ -0,0 +1,138 @@
+//
+// recycling_allocator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_RECYCLING_ALLOCATOR_HPP
+#define ASIO_RECYCLING_ALLOCATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// An allocator that caches memory blocks in thread-local storage for reuse.
+/**
+ * The @recycling_allocator uses a simple strategy where a limited number of
+ * small memory blocks are cached in thread-local storage, if the current
+ * thread is running an @c io_context or is part of a @c thread_pool.
+ */
+template <typename T>
+class recycling_allocator
+{
+public:
+ /// The type of object allocated by the recycling allocator.
+ typedef T value_type;
+
+ /// Rebind the allocator to another value_type.
+ template <typename U>
+ struct rebind
+ {
+ /// The rebound @c allocator type.
+ typedef recycling_allocator<U> other;
+ };
+
+ /// Default constructor.
+ constexpr recycling_allocator() noexcept
+ {
+ }
+
+ /// Converting constructor.
+ template <typename U>
+ constexpr recycling_allocator(
+ const recycling_allocator<U>&) noexcept
+ {
+ }
+
+ /// Equality operator. Always returns true.
+ constexpr bool operator==(
+ const recycling_allocator&) const noexcept
+ {
+ return true;
+ }
+
+ /// Inequality operator. Always returns false.
+ constexpr bool operator!=(
+ const recycling_allocator&) const noexcept
+ {
+ return false;
+ }
+
+ /// Allocate memory for the specified number of values.
+ T* allocate(std::size_t n)
+ {
+ return detail::recycling_allocator<T>().allocate(n);
+ }
+
+ /// Deallocate memory for the specified number of values.
+ void deallocate(T* p, std::size_t n)
+ {
+ detail::recycling_allocator<T>().deallocate(p, n);
+ }
+};
+
+/// A proto-allocator that caches memory blocks in thread-local storage for
+/// reuse.
+/**
+ * The @recycling_allocator uses a simple strategy where a limited number of
+ * small memory blocks are cached in thread-local storage, if the current
+ * thread is running an @c io_context or is part of a @c thread_pool.
+ */
+template <>
+class recycling_allocator<void>
+{
+public:
+ /// No values are allocated by a proto-allocator.
+ typedef void value_type;
+
+ /// Rebind the allocator to another value_type.
+ template <typename U>
+ struct rebind
+ {
+ /// The rebound @c allocator type.
+ typedef recycling_allocator<U> other;
+ };
+
+ /// Default constructor.
+ constexpr recycling_allocator() noexcept
+ {
+ }
+
+ /// Converting constructor.
+ template <typename U>
+ constexpr recycling_allocator(
+ const recycling_allocator<U>&) noexcept
+ {
+ }
+
+ /// Equality operator. Always returns true.
+ constexpr bool operator==(
+ const recycling_allocator&) const noexcept
+ {
+ return true;
+ }
+
+ /// Inequality operator. Always returns false.
+ constexpr bool operator!=(
+ const recycling_allocator&) const noexcept
+ {
+ return false;
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_RECYCLING_ALLOCATOR_HPP
diff --git a/3rdparty/asio/include/asio/redirect_error.hpp b/3rdparty/asio/include/asio/redirect_error.hpp
new file mode 100644
index 00000000000..524bd0b99a1
--- /dev/null
+++ b/3rdparty/asio/include/asio/redirect_error.hpp
@@ -0,0 +1,64 @@
+//
+// redirect_error.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_REDIRECT_ERROR_HPP
+#define ASIO_REDIRECT_ERROR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error_code.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// A @ref completion_token adapter used to specify that an error produced by an
+/// asynchronous operation is captured to an error_code variable.
+/**
+ * The redirect_error_t class is used to indicate that any error_code produced
+ * by an asynchronous operation is captured to a specified variable.
+ */
+template <typename CompletionToken>
+class redirect_error_t
+{
+public:
+ /// Constructor.
+ template <typename T>
+ redirect_error_t(T&& completion_token, asio::error_code& ec)
+ : token_(static_cast<T&&>(completion_token)),
+ ec_(ec)
+ {
+ }
+
+//private:
+ CompletionToken token_;
+ asio::error_code& ec_;
+};
+
+/// Adapt a @ref completion_token to capture error_code values to a variable.
+template <typename CompletionToken>
+inline redirect_error_t<decay_t<CompletionToken>> redirect_error(
+ CompletionToken&& completion_token, asio::error_code& ec)
+{
+ return redirect_error_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token), ec);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/redirect_error.hpp"
+
+#endif // ASIO_REDIRECT_ERROR_HPP
diff --git a/3rdparty/asio/include/asio/registered_buffer.hpp b/3rdparty/asio/include/asio/registered_buffer.hpp
new file mode 100644
index 00000000000..f563277b30a
--- /dev/null
+++ b/3rdparty/asio/include/asio/registered_buffer.hpp
@@ -0,0 +1,344 @@
+//
+// registered_buffer.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_REGISTERED_BUFFER_HPP
+#define ASIO_REGISTERED_BUFFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/buffer.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class buffer_registration_base;
+
+} // namespace detail
+
+class const_registered_buffer;
+
+/// Type used to identify a registered buffer.
+class registered_buffer_id
+{
+public:
+ /// The native buffer identifier type.
+ typedef int native_handle_type;
+
+ /// Default constructor creates an invalid registered buffer identifier.
+ registered_buffer_id() noexcept
+ : scope_(0),
+ index_(-1)
+ {
+ }
+
+ /// Get the native buffer identifier type.
+ native_handle_type native_handle() const noexcept
+ {
+ return index_;
+ }
+
+ /// Compare two IDs for equality.
+ friend bool operator==(const registered_buffer_id& lhs,
+ const registered_buffer_id& rhs) noexcept
+ {
+ return lhs.scope_ == rhs.scope_ && lhs.index_ == rhs.index_;
+ }
+
+ /// Compare two IDs for equality.
+ friend bool operator!=(const registered_buffer_id& lhs,
+ const registered_buffer_id& rhs) noexcept
+ {
+ return lhs.scope_ != rhs.scope_ || lhs.index_ != rhs.index_;
+ }
+
+private:
+ friend class detail::buffer_registration_base;
+
+ // Hidden constructor used by buffer registration.
+ registered_buffer_id(const void* scope, int index) noexcept
+ : scope_(scope),
+ index_(index)
+ {
+ }
+
+ const void* scope_;
+ int index_;
+};
+
+/// Holds a registered buffer over modifiable data.
+/**
+ * Satisfies the @c MutableBufferSequence type requirements.
+ */
+class mutable_registered_buffer
+{
+public:
+ /// Default constructor creates an invalid registered buffer.
+ mutable_registered_buffer() noexcept
+ : buffer_(),
+ id_()
+ {
+ }
+
+ /// Get the underlying mutable buffer.
+ const mutable_buffer& buffer() const noexcept
+ {
+ return buffer_;
+ }
+
+ /// Get a pointer to the beginning of the memory range.
+ /**
+ * @returns <tt>buffer().data()</tt>.
+ */
+ void* data() const noexcept
+ {
+ return buffer_.data();
+ }
+
+ /// Get the size of the memory range.
+ /**
+ * @returns <tt>buffer().size()</tt>.
+ */
+ std::size_t size() const noexcept
+ {
+ return buffer_.size();
+ }
+
+ /// Get the registered buffer identifier.
+ const registered_buffer_id& id() const noexcept
+ {
+ return id_;
+ }
+
+ /// Move the start of the buffer by the specified number of bytes.
+ mutable_registered_buffer& operator+=(std::size_t n) noexcept
+ {
+ buffer_ += n;
+ return *this;
+ }
+
+private:
+ friend class detail::buffer_registration_base;
+
+ // Hidden constructor used by buffer registration and operators.
+ mutable_registered_buffer(const mutable_buffer& b,
+ const registered_buffer_id& i) noexcept
+ : buffer_(b),
+ id_(i)
+ {
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+ friend mutable_registered_buffer buffer(
+ const mutable_registered_buffer& b, std::size_t n) noexcept;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ mutable_buffer buffer_;
+ registered_buffer_id id_;
+};
+
+/// Holds a registered buffer over non-modifiable data.
+/**
+ * Satisfies the @c ConstBufferSequence type requirements.
+ */
+class const_registered_buffer
+{
+public:
+ /// Default constructor creates an invalid registered buffer.
+ const_registered_buffer() noexcept
+ : buffer_(),
+ id_()
+ {
+ }
+
+ /// Construct a non-modifiable buffer from a modifiable one.
+ const_registered_buffer(
+ const mutable_registered_buffer& b) noexcept
+ : buffer_(b.buffer()),
+ id_(b.id())
+ {
+ }
+
+ /// Get the underlying constant buffer.
+ const const_buffer& buffer() const noexcept
+ {
+ return buffer_;
+ }
+
+ /// Get a pointer to the beginning of the memory range.
+ /**
+ * @returns <tt>buffer().data()</tt>.
+ */
+ const void* data() const noexcept
+ {
+ return buffer_.data();
+ }
+
+ /// Get the size of the memory range.
+ /**
+ * @returns <tt>buffer().size()</tt>.
+ */
+ std::size_t size() const noexcept
+ {
+ return buffer_.size();
+ }
+
+ /// Get the registered buffer identifier.
+ const registered_buffer_id& id() const noexcept
+ {
+ return id_;
+ }
+
+ /// Move the start of the buffer by the specified number of bytes.
+ const_registered_buffer& operator+=(std::size_t n) noexcept
+ {
+ buffer_ += n;
+ return *this;
+ }
+
+private:
+ // Hidden constructor used by operators.
+ const_registered_buffer(const const_buffer& b,
+ const registered_buffer_id& i) noexcept
+ : buffer_(b),
+ id_(i)
+ {
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+ friend const_registered_buffer buffer(
+ const const_registered_buffer& b, std::size_t n) noexcept;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ const_buffer buffer_;
+ registered_buffer_id id_;
+};
+
+/** @addtogroup buffer_sequence_begin */
+
+/// Get an iterator to the first element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_begin(
+ const mutable_registered_buffer& b) noexcept
+{
+ return &b.buffer();
+}
+
+/// Get an iterator to the first element in a buffer sequence.
+inline const const_buffer* buffer_sequence_begin(
+ const const_registered_buffer& b) noexcept
+{
+ return &b.buffer();
+}
+
+/** @} */
+/** @addtogroup buffer_sequence_end */
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_end(
+ const mutable_registered_buffer& b) noexcept
+{
+ return &b.buffer() + 1;
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const const_buffer* buffer_sequence_end(
+ const const_registered_buffer& b) noexcept
+{
+ return &b.buffer() + 1;
+}
+
+/** @} */
+/** @addtogroup buffer */
+
+/// Obtain a buffer representing the entire registered buffer.
+inline mutable_registered_buffer buffer(
+ const mutable_registered_buffer& b) noexcept
+{
+ return b;
+}
+
+/// Obtain a buffer representing the entire registered buffer.
+inline const_registered_buffer buffer(
+ const const_registered_buffer& b) noexcept
+{
+ return b;
+}
+
+/// Obtain a buffer representing part of a registered buffer.
+inline mutable_registered_buffer buffer(
+ const mutable_registered_buffer& b, std::size_t n) noexcept
+{
+ return mutable_registered_buffer(buffer(b.buffer_, n), b.id_);
+}
+
+/// Obtain a buffer representing part of a registered buffer.
+inline const_registered_buffer buffer(
+ const const_registered_buffer& b, std::size_t n) noexcept
+{
+ return const_registered_buffer(buffer(b.buffer_, n), b.id_);
+}
+
+/** @} */
+
+/// Create a new modifiable registered buffer that is offset from the start of
+/// another.
+/**
+ * @relates mutable_registered_buffer
+ */
+inline mutable_registered_buffer operator+(
+ const mutable_registered_buffer& b, std::size_t n) noexcept
+{
+ mutable_registered_buffer tmp(b);
+ tmp += n;
+ return tmp;
+}
+
+/// Create a new modifiable buffer that is offset from the start of another.
+/**
+ * @relates mutable_registered_buffer
+ */
+inline mutable_registered_buffer operator+(std::size_t n,
+ const mutable_registered_buffer& b) noexcept
+{
+ return b + n;
+}
+
+/// Create a new non-modifiable registered buffer that is offset from the start
+/// of another.
+/**
+ * @relates const_registered_buffer
+ */
+inline const_registered_buffer operator+(const const_registered_buffer& b,
+ std::size_t n) noexcept
+{
+ const_registered_buffer tmp(b);
+ tmp += n;
+ return tmp;
+}
+
+/// Create a new non-modifiable buffer that is offset from the start of another.
+/**
+ * @relates const_registered_buffer
+ */
+inline const_registered_buffer operator+(std::size_t n,
+ const const_registered_buffer& b) noexcept
+{
+ return b + n;
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_REGISTERED_BUFFER_HPP
diff --git a/3rdparty/asio/include/asio/require.hpp b/3rdparty/asio/include/asio/require.hpp
new file mode 100644
index 00000000000..609e54fcaa3
--- /dev/null
+++ b/3rdparty/asio/include/asio/require.hpp
@@ -0,0 +1,433 @@
+//
+// require.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_REQUIRE_HPP
+#define ASIO_REQUIRE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/require_member.hpp"
+#include "asio/traits/require_free.hpp"
+#include "asio/traits/static_require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace asio {
+
+/// A customisation point that applies a concept-preserving property to an
+/// object.
+/**
+ * The name <tt>require</tt> denotes a customisation point object. The
+ * expression <tt>asio::require(E, P0, Pn...)</tt> for some
+ * subexpressions <tt>E</tt> and <tt>P0</tt>, and where <tt>Pn...</tt>
+ * represents <tt>N</tt> subexpressions (where <tt>N</tt> is 0 or more, and with
+ * types <tt>T = decay_t<decltype(E)></tt> and <tt>Prop0 =
+ * decay_t<decltype(P0)></tt>) is expression-equivalent to:
+ *
+ * @li If <tt>is_applicable_property_v<T, Prop0> && Prop0::is_requirable</tt> is
+ * not a well-formed constant expression with value <tt>true</tt>,
+ * <tt>asio::require(E, P0, Pn...)</tt> is ill-formed.
+ *
+ * @li Otherwise, <tt>E</tt> if <tt>N == 0</tt> and the expression
+ * <tt>Prop0::template static_query_v<T> == Prop0::value()</tt> is a
+ * well-formed constant expression with value <tt>true</tt>.
+ *
+ * @li Otherwise, <tt>(E).require(P0)</tt> if <tt>N == 0</tt> and the expression
+ * <tt>(E).require(P0)</tt> is a valid expression.
+ *
+ * @li Otherwise, <tt>require(E, P0)</tt> if <tt>N == 0</tt> and the expression
+ * <tt>require(E, P0)</tt> is a valid expression with overload resolution
+ * performed in a context that does not include the declaration of the
+ * <tt>require</tt> customization point object.
+ *
+ * @li Otherwise,
+ * <tt>asio::require(asio::require(E, P0), Pn...)</tt>
+ * if <tt>N > 0</tt> and the expression
+ * <tt>asio::require(asio::require(E, P0), Pn...)</tt>
+ * is a valid expression.
+ *
+ * @li Otherwise, <tt>asio::require(E, P0, Pn...)</tt> is ill-formed.
+ */
+inline constexpr unspecified require = unspecified;
+
+/// A type trait that determines whether a @c require expression is well-formed.
+/**
+ * Class template @c can_require is a trait that is derived from
+ * @c true_type if the expression <tt>asio::require(std::declval<T>(),
+ * std::declval<Properties>()...)</tt> is well formed; otherwise @c false_type.
+ */
+template <typename T, typename... Properties>
+struct can_require :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines whether a @c require expression will not throw.
+/**
+ * Class template @c is_nothrow_require is a trait that is derived from
+ * @c true_type if the expression <tt>asio::require(std::declval<T>(),
+ * std::declval<Properties>()...)</tt> is @c noexcept; otherwise @c false_type.
+ */
+template <typename T, typename... Properties>
+struct is_nothrow_require :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines the result type of a @c require expression.
+/**
+ * Class template @c require_result is a trait that determines the result
+ * type of the expression <tt>asio::require(std::declval<T>(),
+ * std::declval<Properties>()...)</tt>.
+ */
+template <typename T, typename... Properties>
+struct require_result
+{
+ /// The result of the @c require expression.
+ typedef automatically_determined type;
+};
+
+} // namespace asio
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace asio_require_fn {
+
+using asio::conditional_t;
+using asio::decay_t;
+using asio::declval;
+using asio::enable_if_t;
+using asio::is_applicable_property;
+using asio::traits::require_free;
+using asio::traits::require_member;
+using asio::traits::static_require;
+
+void require();
+
+enum overload_type
+{
+ identity,
+ call_member,
+ call_free,
+ two_props,
+ n_props,
+ ill_formed
+};
+
+template <typename Impl, typename T, typename Properties, typename = void,
+ typename = void, typename = void, typename = void, typename = void>
+struct call_traits
+{
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable
+ >,
+ enable_if_t<
+ static_require<T, Property>::is_valid
+ >>
+{
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+
+ typedef T&& result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >> :
+ require_member<typename Impl::template proxy<T>::type, Property>
+{
+ static constexpr overload_type overload = call_member;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable
+ >,
+ enable_if_t<
+ !static_require<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_member<typename Impl::template proxy<T>::type, Property>::is_valid
+ >,
+ enable_if_t<
+ require_free<T, Property>::is_valid
+ >> :
+ require_free<T, Property>
+{
+ static constexpr overload_type overload = call_free;
+};
+
+template <typename Impl, typename T, typename P0, typename P1>
+struct call_traits<Impl, T, void(P0, P1),
+ enable_if_t<
+ call_traits<Impl, T, void(P0)>::overload != ill_formed
+ >,
+ enable_if_t<
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1)
+ >::overload != ill_formed
+ >>
+{
+ static constexpr overload_type overload = two_props;
+
+ static constexpr bool is_noexcept =
+ (
+ call_traits<Impl, T, void(P0)>::is_noexcept
+ &&
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1)
+ >::is_noexcept
+ );
+
+ typedef decay_t<
+ typename call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1)
+ >::result_type
+ > result_type;
+};
+
+template <typename Impl, typename T, typename P0,
+ typename P1, typename... PN>
+struct call_traits<Impl, T, void(P0, P1, PN...),
+ enable_if_t<
+ call_traits<Impl, T, void(P0)>::overload != ill_formed
+ >,
+ enable_if_t<
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1, PN...)
+ >::overload != ill_formed
+ >>
+{
+ static constexpr overload_type overload = n_props;
+
+ static constexpr bool is_noexcept =
+ (
+ call_traits<Impl, T, void(P0)>::is_noexcept
+ &&
+ call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1, PN...)
+ >::is_noexcept
+ );
+
+ typedef decay_t<
+ typename call_traits<
+ Impl,
+ typename call_traits<Impl, T, void(P0)>::result_type,
+ void(P1, PN...)
+ >::result_type
+ > result_type;
+};
+
+struct impl
+{
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto require(P&& p)
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+ };
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == identity,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t);
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_member,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t).require(static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_free,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return require(static_cast<T&&>(t), static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename P0, typename P1>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(P0, P1)>::overload == two_props,
+ typename call_traits<impl, T, void(P0, P1)>::result_type
+ >
+ operator()(T&& t, P0&& p0, P1&& p1) const
+ noexcept(call_traits<impl, T, void(P0, P1)>::is_noexcept)
+ {
+ return (*this)(
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1));
+ }
+
+ template <typename T, typename P0, typename P1,
+ typename... PN>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(P0, P1, PN...)>::overload == n_props,
+ typename call_traits<impl, T, void(P0, P1, PN...)>::result_type
+ >
+ operator()(T&& t, P0&& p0, P1&& p1, PN&&... pn) const
+ noexcept(call_traits<impl, T, void(P0, P1, PN...)>::is_noexcept)
+ {
+ return (*this)(
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1), static_cast<PN&&>(pn)...);
+ }
+};
+
+template <typename T = impl>
+struct static_instance
+{
+ static const T instance;
+};
+
+template <typename T>
+const T static_instance<T>::instance = {};
+
+} // namespace asio_require_fn
+namespace asio {
+namespace {
+
+static constexpr const asio_require_fn::impl&
+ require = asio_require_fn::static_instance<>::instance;
+
+} // namespace
+
+typedef asio_require_fn::impl require_t;
+
+template <typename T, typename... Properties>
+struct can_require :
+ integral_constant<bool,
+ asio_require_fn::call_traits<
+ require_t, T, void(Properties...)>::overload
+ != asio_require_fn::ill_formed>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+constexpr bool can_require_v
+ = can_require<T, Properties...>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+struct is_nothrow_require :
+ integral_constant<bool,
+ asio_require_fn::call_traits<
+ require_t, T, void(Properties...)>::is_noexcept>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+constexpr bool is_nothrow_require_v
+ = is_nothrow_require<T, Properties...>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename... Properties>
+struct require_result
+{
+ typedef typename asio_require_fn::call_traits<
+ require_t, T, void(Properties...)>::result_type type;
+};
+
+template <typename T, typename... Properties>
+using require_result_t = typename require_result<T, Properties...>::type;
+
+} // namespace asio
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_REQUIRE_HPP
diff --git a/3rdparty/asio/include/asio/require_concept.hpp b/3rdparty/asio/include/asio/require_concept.hpp
new file mode 100644
index 00000000000..b735b669952
--- /dev/null
+++ b/3rdparty/asio/include/asio/require_concept.hpp
@@ -0,0 +1,343 @@
+//
+// require_concept.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_REQUIRE_CONCEPT_HPP
+#define ASIO_REQUIRE_CONCEPT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/is_applicable_property.hpp"
+#include "asio/traits/require_concept_member.hpp"
+#include "asio/traits/require_concept_free.hpp"
+#include "asio/traits/static_require_concept.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+#if defined(GENERATING_DOCUMENTATION)
+
+namespace asio {
+
+/// A customisation point that applies a concept-enforcing property to an
+/// object.
+/**
+ * The name <tt>require_concept</tt> denotes a customization point object. The
+ * expression <tt>asio::require_concept(E, P)</tt> for some
+ * subexpressions <tt>E</tt> and <tt>P</tt> (with types <tt>T =
+ * decay_t<decltype(E)></tt> and <tt>Prop = decay_t<decltype(P)></tt>) is
+ * expression-equivalent to:
+ *
+ * @li If <tt>is_applicable_property_v<T, Prop> &&
+ * Prop::is_requirable_concept</tt> is not a well-formed constant expression
+ * with value <tt>true</tt>, <tt>asio::require_concept(E, P)</tt> is
+ * ill-formed.
+ *
+ * @li Otherwise, <tt>E</tt> if the expression <tt>Prop::template
+ * static_query_v<T> == Prop::value()</tt> is a well-formed constant
+ * expression with value <tt>true</tt>.
+ *
+ * @li Otherwise, <tt>(E).require_concept(P)</tt> if the expression
+ * <tt>(E).require_concept(P)</tt> is well-formed.
+ *
+ * @li Otherwise, <tt>require_concept(E, P)</tt> if the expression
+ * <tt>require_concept(E, P)</tt> is a valid expression with overload
+ * resolution performed in a context that does not include the declaration
+ * of the <tt>require_concept</tt> customization point object.
+ *
+ * @li Otherwise, <tt>asio::require_concept(E, P)</tt> is ill-formed.
+ */
+inline constexpr unspecified require_concept = unspecified;
+
+/// A type trait that determines whether a @c require_concept expression is
+/// well-formed.
+/**
+ * Class template @c can_require_concept is a trait that is derived from
+ * @c true_type if the expression
+ * <tt>asio::require_concept(std::declval<T>(),
+ * std::declval<Property>())</tt> is well formed; otherwise @c false_type.
+ */
+template <typename T, typename Property>
+struct can_require_concept :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines whether a @c require_concept expression will
+/// not throw.
+/**
+ * Class template @c is_nothrow_require_concept is a trait that is derived from
+ * @c true_type if the expression
+ * <tt>asio::require_concept(std::declval<T>(),
+ * std::declval<Property>())</tt> is @c noexcept; otherwise @c false_type.
+ */
+template <typename T, typename Property>
+struct is_nothrow_require_concept :
+ integral_constant<bool, automatically_determined>
+{
+};
+
+/// A type trait that determines the result type of a @c require_concept
+/// expression.
+/**
+ * Class template @c require_concept_result is a trait that determines the
+ * result type of the expression
+ * <tt>asio::require_concept(std::declval<T>(),
+ * std::declval<Property>())</tt>.
+ */
+template <typename T, typename Property>
+struct require_concept_result
+{
+ /// The result of the @c require_concept expression.
+ typedef automatically_determined type;
+};
+
+} // namespace asio
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+namespace asio_require_concept_fn {
+
+using asio::conditional_t;
+using asio::decay_t;
+using asio::declval;
+using asio::enable_if_t;
+using asio::is_applicable_property;
+using asio::traits::require_concept_free;
+using asio::traits::require_concept_member;
+using asio::traits::static_require_concept;
+
+void require_concept();
+
+enum overload_type
+{
+ identity,
+ call_member,
+ call_free,
+ ill_formed
+};
+
+template <typename Impl, typename T, typename Properties, typename = void,
+ typename = void, typename = void, typename = void, typename = void>
+struct call_traits
+{
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable_concept
+ >,
+ enable_if_t<
+ static_require_concept<T, Property>::is_valid
+ >>
+{
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+ typedef T&& result_type;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable_concept
+ >,
+ enable_if_t<
+ !static_require_concept<T, Property>::is_valid
+ >,
+ enable_if_t<
+ require_concept_member<
+ typename Impl::template proxy<T>::type,
+ Property
+ >::is_valid
+ >> :
+ require_concept_member<
+ typename Impl::template proxy<T>::type,
+ Property
+ >
+{
+ static constexpr overload_type overload = call_member;
+};
+
+template <typename Impl, typename T, typename Property>
+struct call_traits<Impl, T, void(Property),
+ enable_if_t<
+ is_applicable_property<
+ decay_t<T>,
+ decay_t<Property>
+ >::value
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable_concept
+ >,
+ enable_if_t<
+ !static_require_concept<T, Property>::is_valid
+ >,
+ enable_if_t<
+ !require_concept_member<
+ typename Impl::template proxy<T>::type,
+ Property
+ >::is_valid
+ >,
+ enable_if_t<
+ require_concept_free<T, Property>::is_valid
+ >> :
+ require_concept_free<T, Property>
+{
+ static constexpr overload_type overload = call_free;
+};
+
+struct impl
+{
+ template <typename T>
+ struct proxy
+ {
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
+ struct type
+ {
+ template <typename P>
+ auto require_concept(P&& p)
+ noexcept(
+ noexcept(
+ declval<conditional_t<true, T, P>>().require_concept(
+ static_cast<P&&>(p))
+ )
+ )
+ -> decltype(
+ declval<conditional_t<true, T, P>>().require_concept(
+ static_cast<P&&>(p))
+ );
+ };
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
+ typedef T type;
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
+ };
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == identity,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t);
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_member,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return static_cast<T&&>(t).require_concept(static_cast<Property&&>(p));
+ }
+
+ template <typename T, typename Property>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(Property)>::overload == call_free,
+ typename call_traits<impl, T, void(Property)>::result_type
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
+ {
+ return require_concept(static_cast<T&&>(t), static_cast<Property&&>(p));
+ }
+};
+
+template <typename T = impl>
+struct static_instance
+{
+ static const T instance;
+};
+
+template <typename T>
+const T static_instance<T>::instance = {};
+
+} // namespace asio_require_concept_fn
+namespace asio {
+namespace {
+
+static constexpr const asio_require_concept_fn::impl&
+ require_concept = asio_require_concept_fn::static_instance<>::instance;
+
+} // namespace
+
+typedef asio_require_concept_fn::impl require_concept_t;
+
+template <typename T, typename Property>
+struct can_require_concept :
+ integral_constant<bool,
+ asio_require_concept_fn::call_traits<
+ require_concept_t, T, void(Property)>::overload !=
+ asio_require_concept_fn::ill_formed>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+constexpr bool can_require_concept_v = can_require_concept<T, Property>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+struct is_nothrow_require_concept :
+ integral_constant<bool,
+ asio_require_concept_fn::call_traits<
+ require_concept_t, T, void(Property)>::is_noexcept>
+{
+};
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+constexpr bool is_nothrow_require_concept_v
+ = is_nothrow_require_concept<T, Property>::value;
+
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+
+template <typename T, typename Property>
+struct require_concept_result
+{
+ typedef typename asio_require_concept_fn::call_traits<
+ require_concept_t, T, void(Property)>::result_type type;
+};
+
+template <typename T, typename Property>
+using require_concept_result_t =
+ typename require_concept_result<T, Property>::type;
+
+} // namespace asio
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_REQUIRE_CONCEPT_HPP
diff --git a/3rdparty/asio/include/asio/seq_packet_socket_service.hpp b/3rdparty/asio/include/asio/seq_packet_socket_service.hpp
deleted file mode 100644
index d517eeb6a0c..00000000000
--- a/3rdparty/asio/include/asio/seq_packet_socket_service.hpp
+++ /dev/null
@@ -1,405 +0,0 @@
-//
-// seq_packet_socket_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP
-#define ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_socket_service.hpp"
-#elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-#else
-# include "asio/detail/reactive_socket_service.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a sequenced packet socket.
-template <typename Protocol>
-class seq_packet_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<
- seq_packet_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a sequenced packet socket implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new sequenced packet socket service for the specified
- /// io_context.
- explicit seq_packet_socket_service(asio::io_context& io_context)
- : asio::detail::service_base<
- seq_packet_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new sequenced packet socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new sequenced packet socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another sequenced packet socket implementation.
- void move_assign(implementation_type& impl,
- seq_packet_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- /// Move-construct a new sequenced packet socket implementation from another
- /// protocol type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- typename seq_packet_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a sequenced packet socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a sequenced packet socket.
- ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, asio::error_code& ec)
- {
- if (protocol.type() == ASIO_OS_DEF(SOCK_SEQPACKET))
- service_impl_.open(impl, protocol, ec);
- else
- ec = asio::error::invalid_argument;
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a sequenced packet socket.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- asio::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a sequenced packet socket implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- /// Bind the sequenced packet socket to the specified local endpoint.
- ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, asio::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the sequenced packet socket to the specified endpoint.
- ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, asio::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (asio::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, asio::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, asio::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, asio::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, asio::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, asio::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags, asio::error_code& ec)
- {
- return service_impl_.receive_with_flags(impl,
- buffers, in_flags, out_flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
- socket_base::message_flags& out_flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive_with_flags(impl,
- buffers, in_flags, out_flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_SEQ_PACKET_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/serial_port.hpp b/3rdparty/asio/include/asio/serial_port.hpp
index 4455a0aa3b6..61e893769bf 100644
--- a/3rdparty/asio/include/asio/serial_port.hpp
+++ b/3rdparty/asio/include/asio/serial_port.hpp
@@ -2,7 +2,7 @@
// serial_port.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -21,748 +21,15 @@
#if defined(ASIO_HAS_SERIAL_PORT) \
|| defined(GENERATING_DOCUMENTATION)
-#include <string>
-#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/serial_port_base.hpp"
-
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/basic_serial_port.hpp"
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# if defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_serial_port_service.hpp"
-# define ASIO_SVC_T detail::win_iocp_serial_port_service
-# else
-# include "asio/detail/reactive_serial_port_service.hpp"
-# define ASIO_SVC_T detail::reactive_serial_port_service
-# endif
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/detail/push_options.hpp"
+#include "asio/basic_serial_port.hpp"
namespace asio {
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a serial port.
+/// Typedef for the typical usage of a serial port.
typedef basic_serial_port<> serial_port;
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-/// Provides serial port functionality.
-/**
- * The serial_port class provides a wrapper over serial port functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class serial_port
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>,
- public serial_port_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a serial port.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// A basic_serial_port is always the lowest layer.
- typedef serial_port lowest_layer_type;
-
- /// Construct a serial_port without opening it.
- /**
- * This constructor creates a serial port without opening it.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- */
- explicit serial_port(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct and open a serial_port.
- /**
- * This constructor creates and opens a serial port for the specified device
- * name.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param device The platform-specific device name for this serial
- * port.
- */
- explicit serial_port(asio::io_context& io_context,
- const char* device)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- asio::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- asio::detail::throw_error(ec, "open");
- }
-
- /// Construct and open a serial_port.
- /**
- * This constructor creates and opens a serial port for the specified device
- * name.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param device The platform-specific device name for this serial
- * port.
- */
- explicit serial_port(asio::io_context& io_context,
- const std::string& device)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- asio::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- asio::detail::throw_error(ec, "open");
- }
-
- /// Construct a serial_port on an existing native serial port.
- /**
- * This constructor creates a serial port object to hold an existing native
- * serial port.
- *
- * @param io_context The io_context object that the serial port will use to
- * dispatch handlers for any asynchronous operations performed on the port.
- *
- * @param native_serial_port A native serial port.
- *
- * @throws asio::system_error Thrown on failure.
- */
- serial_port(asio::io_context& io_context,
- const native_handle_type& native_serial_port)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a serial_port from another.
- /**
- * This constructor moves a serial port from one object to another.
- *
- * @param other The other serial_port 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 serial_port(io_context&) constructor.
- */
- serial_port(serial_port&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a serial_port from another.
- /**
- * This assignment operator moves a serial port from one object to another.
- *
- * @param other The other serial_port 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 serial_port(io_context&) constructor.
- */
- serial_port& operator=(serial_port&& other)
- {
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the serial port.
- /**
- * This function destroys the serial port, cancelling any outstanding
- * asynchronous wait operations associated with the serial port as if by
- * calling @c cancel.
- */
- ~serial_port()
- {
- }
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- /// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
- {
- return basic_io_object<ASIO_SVC_T>::get_executor();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a serial_port cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a serial_port cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Open the serial port using the specified device name.
- /**
- * This function opens the serial port for the specified device name.
- *
- * @param device The platform-specific device name.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void open(const std::string& device)
- {
- asio::error_code ec;
- this->get_service().open(this->get_implementation(), device, ec);
- asio::detail::throw_error(ec, "open");
- }
-
- /// Open the serial port using the specified device name.
- /**
- * This function opens the serial port using the given platform-specific
- * device name.
- *
- * @param device The platform-specific device name.
- *
- * @param ec Set the indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID open(const std::string& device,
- asio::error_code& ec)
- {
- this->get_service().open(this->get_implementation(), device, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native serial port to the serial port.
- /*
- * This function opens the serial port to hold an existing native serial port.
- *
- * @param native_serial_port A native serial port.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void assign(const native_handle_type& native_serial_port)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native serial port to the serial port.
- /*
- * This function opens the serial port to hold an existing native serial port.
- *
- * @param native_serial_port A native serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port,
- asio::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(),
- native_serial_port, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the serial port is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the serial port.
- /**
- * This function is used to close the serial port. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void close()
- {
- asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "close");
- }
-
- /// Close the serial port.
- /**
- * This function is used to close the serial port. Any asynchronous read or
- * write operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID close(asio::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native serial port representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * serial port. This is intended to allow access to native serial port
- * functionality that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the serial port.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void cancel()
- {
- asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the serial port.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Send a break sequence to the serial port.
- /**
- * This function causes a break sequence of platform-specific duration to be
- * sent out the serial port.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void send_break()
- {
- asio::error_code ec;
- this->get_service().send_break(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "send_break");
- }
-
- /// Send a break sequence to the serial port.
- /**
- * This function causes a break sequence of platform-specific duration to be
- * sent out the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID send_break(asio::error_code& ec)
- {
- this->get_service().send_break(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set an option on the serial port.
- /**
- * This function is used to set an option on the serial port.
- *
- * @param option The option value to be set on the serial port.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @sa SettableSerialPortOption @n
- * asio::serial_port_base::baud_rate @n
- * asio::serial_port_base::flow_control @n
- * asio::serial_port_base::parity @n
- * asio::serial_port_base::stop_bits @n
- * asio::serial_port_base::character_size
- */
- template <typename SettableSerialPortOption>
- void set_option(const SettableSerialPortOption& option)
- {
- asio::error_code ec;
- this->get_service().set_option(this->get_implementation(), option, ec);
- asio::detail::throw_error(ec, "set_option");
- }
-
- /// Set an option on the serial port.
- /**
- * This function is used to set an option on the serial port.
- *
- * @param option The option value to be set on the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa SettableSerialPortOption @n
- * asio::serial_port_base::baud_rate @n
- * asio::serial_port_base::flow_control @n
- * asio::serial_port_base::parity @n
- * asio::serial_port_base::stop_bits @n
- * asio::serial_port_base::character_size
- */
- template <typename SettableSerialPortOption>
- ASIO_SYNC_OP_VOID set_option(const SettableSerialPortOption& option,
- asio::error_code& ec)
- {
- this->get_service().set_option(this->get_implementation(), option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get an option from the serial port.
- /**
- * This function is used to get the current value of an option on the serial
- * port.
- *
- * @param option The option value to be obtained from the serial port.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @sa GettableSerialPortOption @n
- * asio::serial_port_base::baud_rate @n
- * asio::serial_port_base::flow_control @n
- * asio::serial_port_base::parity @n
- * asio::serial_port_base::stop_bits @n
- * asio::serial_port_base::character_size
- */
- template <typename GettableSerialPortOption>
- void get_option(GettableSerialPortOption& option)
- {
- asio::error_code ec;
- this->get_service().get_option(this->get_implementation(), option, ec);
- asio::detail::throw_error(ec, "get_option");
- }
-
- /// Get an option from the serial port.
- /**
- * This function is used to get the current value of an option on the serial
- * port.
- *
- * @param option The option value to be obtained from the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @sa GettableSerialPortOption @n
- * asio::serial_port_base::baud_rate @n
- * asio::serial_port_base::flow_control @n
- * asio::serial_port_base::parity @n
- * asio::serial_port_base::stop_bits @n
- * asio::serial_port_base::character_size
- */
- template <typename GettableSerialPortOption>
- ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
- asio::error_code& ec)
- {
- this->get_service().get_option(this->get_implementation(), option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write some data to the serial port.
- /**
- * This function is used to write data to the serial port. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- *
- * @returns The number of bytes written.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that
- * all data is written before the blocking operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.write_some(asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the serial port.
- /**
- * This function is used to write data to the serial port. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. Returns 0 if an error occurred.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that
- * all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- asio::error_code& ec)
- {
- return this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the serial port.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the serial port.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The write operation may not transmit all of the data to the peer.
- * Consider using the @ref async_write function if you need to ensure that all
- * data is written before the asynchronous operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.async_write_some(asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_write_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the serial port.
- /**
- * This function is used to read data from the serial port. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.read_some(asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the serial port.
- /**
- * This function is used to read data from the serial port. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. Returns 0 if an error occurred.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- asio::error_code& ec)
- {
- return this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the serial port.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The read operation may not read all of the requested number of bytes.
- * Consider using the @ref async_read function if you need to ensure that the
- * requested amount of data is read before the asynchronous operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * serial_port.async_read_some(asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_read_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
} // namespace asio
-#include "asio/detail/pop_options.hpp"
-
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-# undef ASIO_SVC_T
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // defined(ASIO_HAS_SERIAL_PORT)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/serial_port_base.hpp b/3rdparty/asio/include/asio/serial_port_base.hpp
index b4ab4f30df3..479d69796e7 100644
--- a/3rdparty/asio/include/asio/serial_port_base.hpp
+++ b/3rdparty/asio/include/asio/serial_port_base.hpp
@@ -2,7 +2,7 @@
// serial_port_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/serial_port_service.hpp b/3rdparty/asio/include/asio/serial_port_service.hpp
deleted file mode 100644
index 4f47e57602d..00000000000
--- a/3rdparty/asio/include/asio/serial_port_service.hpp
+++ /dev/null
@@ -1,249 +0,0 @@
-//
-// serial_port_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_SERIAL_PORT_SERVICE_HPP
-#define ASIO_SERIAL_PORT_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_SERIAL_PORT) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include <string>
-#include "asio/async_result.hpp"
-#include "asio/detail/reactive_serial_port_service.hpp"
-#include "asio/detail/win_iocp_serial_port_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-#include "asio/serial_port_base.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a serial port.
-class serial_port_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<serial_port_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_HAS_IOCP)
- typedef detail::win_iocp_serial_port_service service_impl_type;
-#else
- typedef detail::reactive_serial_port_service service_impl_type;
-#endif
-
-public:
- /// The type of a serial port implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new serial port service for the specified io_context.
- explicit serial_port_service(asio::io_context& io_context)
- : asio::detail::service_base<serial_port_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new serial port implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new serial port implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another serial port implementation.
- void move_assign(implementation_type& impl,
- serial_port_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a serial port implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a serial port.
- ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const std::string& device, asio::error_code& ec)
- {
- service_impl_.open(impl, device, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native handle to a serial port.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, asio::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a serial port implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set a serial port option.
- template <typename SettableSerialPortOption>
- ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSerialPortOption& option, asio::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a serial port option.
- template <typename GettableSerialPortOption>
- ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSerialPortOption& option, asio::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Send a break sequence to the serial port.
- ASIO_SYNC_OP_VOID send_break(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.send_break(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data to the stream.
- template <typename ConstBufferSequence>
- std::size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.write_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous write.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- template <typename MutableBufferSequence>
- std::size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.read_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous read.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_SERIAL_PORT)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_SERIAL_PORT_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/signal_set.hpp b/3rdparty/asio/include/asio/signal_set.hpp
index 085090139f9..b2e189d01d7 100644
--- a/3rdparty/asio/include/asio/signal_set.hpp
+++ b/3rdparty/asio/include/asio/signal_set.hpp
@@ -2,7 +2,7 @@
// signal_set.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,431 +16,12 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/basic_signal_set.hpp"
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/detail/signal_set_service.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
+#include "asio/basic_signal_set.hpp"
namespace asio {
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a signal set.
+/// Typedef for the typical usage of a signal set.
typedef basic_signal_set<> signal_set;
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-/// Provides signal functionality.
-/**
- * The signal_set class provides the ability to perform an asynchronous wait
- * for one or more signals to occur.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Example
- * Performing an asynchronous wait:
- * @code
- * void handler(
- * const asio::error_code& error,
- * int signal_number)
- * {
- * if (!error)
- * {
- * // A signal occurred.
- * }
- * }
- *
- * ...
- *
- * // Construct a signal set registered for process termination.
- * asio::signal_set signals(io_context, SIGINT, SIGTERM);
- *
- * // Start an asynchronous wait for one of the signals to occur.
- * signals.async_wait(handler);
- * @endcode
- *
- * @par Queueing of signal notifications
- *
- * If a signal is registered with a signal_set, and the signal occurs when
- * there are no waiting handlers, then the signal notification is queued. The
- * next async_wait operation on that signal_set will dequeue the notification.
- * If multiple notifications are queued, subsequent async_wait operations
- * dequeue them one at a time. Signal notifications are dequeued in order of
- * ascending signal number.
- *
- * If a signal number is removed from a signal_set (using the @c remove or @c
- * erase member functions) then any queued notifications for that signal are
- * discarded.
- *
- * @par Multiple registration of signals
- *
- * The same signal number may be registered with different signal_set objects.
- * When the signal occurs, one handler is called for each signal_set object.
- *
- * Note that multiple registration only works for signals that are registered
- * using Asio. The application must not also register a signal handler using
- * functions such as @c signal() or @c sigaction().
- *
- * @par Signal masking on POSIX platforms
- *
- * POSIX allows signals to be blocked using functions such as @c sigprocmask()
- * and @c pthread_sigmask(). For signals to be delivered, programs must ensure
- * that any signals registered using signal_set objects are unblocked in at
- * least one thread.
- */
-class signal_set
- : ASIO_SVC_ACCESS basic_io_object<detail::signal_set_service>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// Construct a signal set without adding any signals.
- /**
- * This constructor creates a signal set without registering for any signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- */
- explicit signal_set(asio::io_context& io_context)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- }
-
- /// Construct a signal set and add one signal.
- /**
- * This constructor creates a signal set and registers for one signal.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code asio::signal_set signals(io_context);
- * signals.add(signal_number_1); @endcode
- */
- signal_set(asio::io_context& io_context, int signal_number_1)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- asio::detail::throw_error(ec, "add");
- }
-
- /// Construct a signal set and add two signals.
- /**
- * This constructor creates a signal set and registers for two signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The first signal number to be added.
- *
- * @param signal_number_2 The second signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code asio::signal_set signals(io_context);
- * signals.add(signal_number_1);
- * signals.add(signal_number_2); @endcode
- */
- signal_set(asio::io_context& io_context, int signal_number_1,
- int signal_number_2)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
- asio::detail::throw_error(ec, "add");
- }
-
- /// Construct a signal set and add three signals.
- /**
- * This constructor creates a signal set and registers for three signals.
- *
- * @param io_context The io_context object that the signal set will use to
- * dispatch handlers for any asynchronous operations performed on the set.
- *
- * @param signal_number_1 The first signal number to be added.
- *
- * @param signal_number_2 The second signal number to be added.
- *
- * @param signal_number_3 The third signal number to be added.
- *
- * @note This constructor is equivalent to performing:
- * @code asio::signal_set signals(io_context);
- * signals.add(signal_number_1);
- * signals.add(signal_number_2);
- * signals.add(signal_number_3); @endcode
- */
- signal_set(asio::io_context& io_context, int signal_number_1,
- int signal_number_2, int signal_number_3)
- : basic_io_object<detail::signal_set_service>(io_context)
- {
- asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number_1, ec);
- asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_2, ec);
- asio::detail::throw_error(ec, "add");
- this->get_service().add(this->get_implementation(), signal_number_3, ec);
- asio::detail::throw_error(ec, "add");
- }
-
- /// Destroys the signal set.
- /**
- * This function destroys the signal set, cancelling any outstanding
- * asynchronous wait operations associated with the signal set as if by
- * calling @c cancel.
- */
- ~signal_set()
- {
- }
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<detail::signal_set_service>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<detail::signal_set_service>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- /// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
- {
- return basic_io_object<detail::signal_set_service>::get_executor();
- }
-
- /// Add a signal to a signal_set.
- /**
- * This function adds the specified signal to the set. It has no effect if the
- * signal is already in the set.
- *
- * @param signal_number The signal to be added to the set.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void add(int signal_number)
- {
- asio::error_code ec;
- this->get_service().add(this->get_implementation(), signal_number, ec);
- asio::detail::throw_error(ec, "add");
- }
-
- /// Add a signal to a signal_set.
- /**
- * This function adds the specified signal to the set. It has no effect if the
- * signal is already in the set.
- *
- * @param signal_number The signal to be added to the set.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID add(int signal_number,
- asio::error_code& ec)
- {
- this->get_service().add(this->get_implementation(), signal_number, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove a signal from a signal_set.
- /**
- * This function removes the specified signal from the set. It has no effect
- * if the signal is not in the set.
- *
- * @param signal_number The signal to be removed from the set.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @note Removes any notifications that have been queued for the specified
- * signal number.
- */
- void remove(int signal_number)
- {
- asio::error_code ec;
- this->get_service().remove(this->get_implementation(), signal_number, ec);
- asio::detail::throw_error(ec, "remove");
- }
-
- /// Remove a signal from a signal_set.
- /**
- * This function removes the specified signal from the set. It has no effect
- * if the signal is not in the set.
- *
- * @param signal_number The signal to be removed from the set.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Removes any notifications that have been queued for the specified
- * signal number.
- */
- ASIO_SYNC_OP_VOID remove(int signal_number,
- asio::error_code& ec)
- {
- this->get_service().remove(this->get_implementation(), signal_number, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove all signals from a signal_set.
- /**
- * This function removes all signals from the set. It has no effect if the set
- * is already empty.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @note Removes all queued notifications.
- */
- void clear()
- {
- asio::error_code ec;
- this->get_service().clear(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "clear");
- }
-
- /// Remove all signals from a signal_set.
- /**
- * This function removes all signals from the set. It has no effect if the set
- * is already empty.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Removes all queued notifications.
- */
- ASIO_SYNC_OP_VOID clear(asio::error_code& ec)
- {
- this->get_service().clear(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Cancel all operations associated with the signal set.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the signal set. The handler for each cancelled
- * operation will be invoked with the asio::error::operation_aborted
- * error code.
- *
- * Cancellation does not alter the set of registered signals.
- *
- * @throws asio::system_error Thrown on failure.
- *
- * @note If a registered signal occurred before 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.
- */
- void cancel()
- {
- asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all operations associated with the signal set.
- /**
- * This function forces the completion of any pending asynchronous wait
- * operations against the signal set. The handler for each cancelled
- * operation will be invoked with the asio::error::operation_aborted
- * error code.
- *
- * Cancellation does not alter the set of registered signals.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note If a registered signal occurred before 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.
- */
- ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous operation to wait for a signal to be delivered.
- /**
- * This function may be used to initiate an asynchronous wait against the
- * signal set. 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 One of the registered signals in the signal set occurs; or
- *
- * @li The signal set was cancelled, in which case the handler is passed the
- * error code asio::error::operation_aborted.
- *
- * @param handler The handler to be called when the signal occurs. Copies
- * will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * int signal_number // Indicates which signal occurred.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- */
- template <typename SignalHandler>
- ASIO_INITFN_RESULT_TYPE(SignalHandler,
- void (asio::error_code, int))
- async_wait(ASIO_MOVE_ARG(SignalHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a SignalHandler.
- ASIO_SIGNAL_HANDLER_CHECK(SignalHandler, handler) type_check;
-
- async_completion<SignalHandler,
- void (asio::error_code, int)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/signal_set_base.hpp b/3rdparty/asio/include/asio/signal_set_base.hpp
new file mode 100644
index 00000000000..9863a1598a3
--- /dev/null
+++ b/3rdparty/asio/include/asio/signal_set_base.hpp
@@ -0,0 +1,171 @@
+//
+// signal_set_base.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_SIGNAL_SET_BASE_HPP
+#define ASIO_SIGNAL_SET_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/socket_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// The signal_set_base class is used as a base for the basic_signal_set class
+/// templates so that we have a common place to define the flags enum.
+class signal_set_base
+{
+public:
+# if defined(GENERATING_DOCUMENTATION)
+ /// Enumeration representing the different types of flags that may specified
+ /// when adding a signal to a set.
+ enum flags
+ {
+ /// Bitmask representing no flags.
+ none = 0,
+
+ /// Affects the behaviour of interruptible functions such that, if the
+ /// function would have failed with error::interrupted when interrupted by
+ /// the specified signal, the function shall instead be restarted and not
+ /// fail with error::interrupted.
+ restart = implementation_defined,
+
+ /// Do not generate SIGCHLD when child processes stop or stopped child
+ /// processes continue.
+ no_child_stop = implementation_defined,
+
+ /// Do not transform child processes into zombies when they terminate.
+ no_child_wait = implementation_defined,
+
+ /// Special value to indicate that the signal registration does not care
+ /// which flags are set, and so will not conflict with any prior
+ /// registrations of the same signal.
+ dont_care = -1
+ };
+
+ /// Portability typedef.
+ typedef flags flags_t;
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+ enum class flags : int
+ {
+ none = 0,
+ restart = ASIO_OS_DEF(SA_RESTART),
+ no_child_stop = ASIO_OS_DEF(SA_NOCLDSTOP),
+ no_child_wait = ASIO_OS_DEF(SA_NOCLDWAIT),
+ dont_care = -1
+ };
+
+ typedef flags flags_t;
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~signal_set_base()
+ {
+ }
+};
+
+/// Negation operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr bool operator!(signal_set_base::flags_t x)
+{
+ return static_cast<int>(x) == 0;
+}
+
+/// Bitwise and operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator&(
+ signal_set_base::flags_t x, signal_set_base::flags_t y)
+{
+ return static_cast<signal_set_base::flags_t>(
+ static_cast<int>(x) & static_cast<int>(y));
+}
+
+/// Bitwise or operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator|(
+ signal_set_base::flags_t x, signal_set_base::flags_t y)
+{
+ return static_cast<signal_set_base::flags_t>(
+ static_cast<int>(x) | static_cast<int>(y));
+}
+
+/// Bitwise xor operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator^(
+ signal_set_base::flags_t x, signal_set_base::flags_t y)
+{
+ return static_cast<signal_set_base::flags_t>(
+ static_cast<int>(x) ^ static_cast<int>(y));
+}
+
+/// Bitwise negation operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator~(
+ signal_set_base::flags_t x)
+{
+ return static_cast<signal_set_base::flags_t>(~static_cast<int>(x));
+}
+
+/// Bitwise and-assignment operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline signal_set_base::flags_t& operator&=(
+ signal_set_base::flags_t& x, signal_set_base::flags_t y)
+{
+ x = x & y;
+ return x;
+}
+
+/// Bitwise or-assignment operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline signal_set_base::flags_t& operator|=(
+ signal_set_base::flags_t& x, signal_set_base::flags_t y)
+{
+ x = x | y;
+ return x;
+}
+
+/// Bitwise xor-assignment operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline signal_set_base::flags_t& operator^=(
+ signal_set_base::flags_t& x, signal_set_base::flags_t y)
+{
+ x = x ^ y;
+ return x;
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_SIGNAL_SET_BASE_HPP
diff --git a/3rdparty/asio/include/asio/signal_set_service.hpp b/3rdparty/asio/include/asio/signal_set_service.hpp
deleted file mode 100644
index d4c54b82771..00000000000
--- a/3rdparty/asio/include/asio/signal_set_service.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-//
-// signal_set_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_SIGNAL_SET_SERVICE_HPP
-#define ASIO_SIGNAL_SET_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/async_result.hpp"
-#include "asio/detail/signal_set_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a signal set.
-class signal_set_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<signal_set_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
-public:
- /// The type of a signal set implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef detail::signal_set_service::implementation_type implementation_type;
-#endif
-
- /// Construct a new signal set service for the specified io_context.
- explicit signal_set_service(asio::io_context& io_context)
- : asio::detail::service_base<signal_set_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new signal set implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- /// Destroy a signal set implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Add a signal to a signal_set.
- ASIO_SYNC_OP_VOID add(implementation_type& impl,
- int signal_number, asio::error_code& ec)
- {
- service_impl_.add(impl, signal_number, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove a signal to a signal_set.
- ASIO_SYNC_OP_VOID remove(implementation_type& impl,
- int signal_number, asio::error_code& ec)
- {
- service_impl_.remove(impl, signal_number, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Remove all signals from a signal_set.
- ASIO_SYNC_OP_VOID clear(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.clear(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Cancel all operations associated with the signal set.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- // Start an asynchronous operation to wait for a signal to be delivered.
- template <typename SignalHandler>
- ASIO_INITFN_RESULT_TYPE(SignalHandler,
- void (asio::error_code, int))
- async_wait(implementation_type& impl,
- ASIO_MOVE_ARG(SignalHandler) handler)
- {
- async_completion<SignalHandler,
- void (asio::error_code, int)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(asio::io_context::fork_event event)
- {
- service_impl_.notify_fork(event);
- }
-
- // The platform-specific implementation.
- detail::signal_set_service service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_SIGNAL_SET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/socket_acceptor_service.hpp b/3rdparty/asio/include/asio/socket_acceptor_service.hpp
deleted file mode 100644
index b9c33ff9892..00000000000
--- a/3rdparty/asio/include/asio/socket_acceptor_service.hpp
+++ /dev/null
@@ -1,361 +0,0 @@
-//
-// socket_acceptor_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_SOCKET_ACCEPTOR_SERVICE_HPP
-#define ASIO_SOCKET_ACCEPTOR_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/basic_socket.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_socket_service.hpp"
-#elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-#else
-# include "asio/detail/reactive_socket_service.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a socket acceptor.
-template <typename Protocol>
-class socket_acceptor_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<socket_acceptor_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename protocol_type::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_WINDOWS_RUNTIME)
- typedef detail::null_socket_service<Protocol> service_impl_type;
-#elif defined(ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The native type of the socket acceptor.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native acceptor type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new socket acceptor service for the specified io_context.
- explicit socket_acceptor_service(asio::io_context& io_context)
- : asio::detail::service_base<
- socket_acceptor_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new socket acceptor implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new socket acceptor implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another socket acceptor implementation.
- void move_assign(implementation_type& impl,
- socket_acceptor_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- /// Move-construct a new socket acceptor implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- typename socket_acceptor_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a socket acceptor implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a new socket acceptor implementation.
- ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, asio::error_code& ec)
- {
- service_impl_.open(impl, protocol, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native acceptor to a socket acceptor.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_acceptor,
- asio::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_acceptor, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the acceptor is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Cancel all asynchronous operations associated with the acceptor.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Bind the socket acceptor to the specified local endpoint.
- ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, asio::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Place the socket acceptor into the state where it will listen for new
- /// connections.
- ASIO_SYNC_OP_VOID listen(implementation_type& impl, int backlog,
- asio::error_code& ec)
- {
- service_impl_.listen(impl, backlog, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Close a socket acceptor implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native acceptor implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, asio::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, asio::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, asio::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the acceptor.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the acceptor.
- ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native acceptor implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native acceptor implementation.
- ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Wait for the acceptor to become ready to read, ready to write, or to have
- /// pending error conditions.
- ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, asio::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the acceptor to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Accept a new connection.
- template <typename Protocol1, typename SocketService>
- ASIO_SYNC_OP_VOID accept(implementation_type& impl,
- basic_socket<Protocol1, SocketService>& peer,
- endpoint_type* peer_endpoint, asio::error_code& ec,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
- {
- service_impl_.accept(impl, peer, peer_endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-#if defined(ASIO_HAS_MOVE)
- /// Accept a new connection.
- typename Protocol::socket accept(implementation_type& impl,
- io_context* peer_io_context, endpoint_type* peer_endpoint,
- asio::error_code& ec)
- {
- return service_impl_.accept(impl, peer_io_context, peer_endpoint, ec);
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- /// Start an asynchronous accept.
- template <typename Protocol1, typename SocketService, typename AcceptHandler>
- ASIO_INITFN_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(implementation_type& impl,
- basic_socket<Protocol1, SocketService>& peer,
- endpoint_type* peer_endpoint,
- ASIO_MOVE_ARG(AcceptHandler) handler,
- typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
- {
- async_completion<AcceptHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_accept(impl,
- peer, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
-#if defined(ASIO_HAS_MOVE)
- /// Start an asynchronous accept.
- template <typename MoveAcceptHandler>
- ASIO_INITFN_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code, typename Protocol::socket))
- async_accept(implementation_type& impl,
- asio::io_context* peer_io_context, endpoint_type* peer_endpoint,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler)
- {
- async_completion<MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket)> init(handler);
-
- service_impl_.async_accept(impl,
- peer_io_context, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-#endif // defined(ASIO_HAS_MOVE)
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_SOCKET_ACCEPTOR_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/socket_base.hpp b/3rdparty/asio/include/asio/socket_base.hpp
index 99ef3779af0..5d509790d3d 100644
--- a/3rdparty/asio/include/asio/socket_base.hpp
+++ b/3rdparty/asio/include/asio/socket_base.hpp
@@ -2,7 +2,7 @@
// socket_base.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -98,7 +98,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::socket_base::broadcast option(true);
* socket.set_option(option);
@@ -107,7 +107,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::socket_base::broadcast option;
* socket.get_option(option);
@@ -132,7 +132,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::debug option(true);
* socket.set_option(option);
@@ -141,7 +141,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::debug option;
* socket.get_option(option);
@@ -165,7 +165,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::socket_base::do_not_route option(true);
* socket.set_option(option);
@@ -174,7 +174,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::udp::socket socket(io_context);
+ * asio::ip::udp::socket socket(my_context);
* ...
* asio::socket_base::do_not_route option;
* socket.get_option(option);
@@ -199,7 +199,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::keep_alive option(true);
* socket.set_option(option);
@@ -208,7 +208,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::keep_alive option;
* socket.get_option(option);
@@ -232,7 +232,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::send_buffer_size option(8192);
* socket.set_option(option);
@@ -241,7 +241,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::send_buffer_size option;
* socket.get_option(option);
@@ -266,7 +266,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::send_low_watermark option(1024);
* socket.set_option(option);
@@ -275,7 +275,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::send_low_watermark option;
* socket.get_option(option);
@@ -300,7 +300,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::receive_buffer_size option(8192);
* socket.set_option(option);
@@ -309,7 +309,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::receive_buffer_size option;
* socket.get_option(option);
@@ -334,7 +334,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::receive_low_watermark option(1024);
* socket.set_option(option);
@@ -343,7 +343,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::receive_low_watermark option;
* socket.get_option(option);
@@ -369,7 +369,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::socket_base::reuse_address option(true);
* acceptor.set_option(option);
@@ -378,7 +378,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::socket_base::reuse_address option;
* acceptor.get_option(option);
@@ -404,7 +404,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::linger option(true, 30);
* socket.set_option(option);
@@ -413,7 +413,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::linger option;
* socket.get_option(option);
@@ -432,6 +432,40 @@ public:
linger;
#endif
+ /// Socket option for putting received out-of-band data inline.
+ /**
+ * Implements the SOL_SOCKET/SO_OOBINLINE socket option.
+ *
+ * @par Examples
+ * Setting the option:
+ * @code
+ * asio::ip::tcp::socket socket(my_context);
+ * ...
+ * asio::socket_base::out_of_band_inline option(true);
+ * socket.set_option(option);
+ * @endcode
+ *
+ * @par
+ * Getting the current option value:
+ * @code
+ * asio::ip::tcp::socket socket(my_context);
+ * ...
+ * asio::socket_base::out_of_band_inline option;
+ * socket.get_option(option);
+ * bool value = option.value();
+ * @endcode
+ *
+ * @par Concepts:
+ * Socket_Option, Boolean_Socket_Option.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined out_of_band_inline;
+#else
+ typedef asio::detail::socket_option::boolean<
+ ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_OOBINLINE)>
+ out_of_band_inline;
+#endif
+
/// Socket option to report aborted connections on accept.
/**
* Implements a custom socket option that determines whether or not an accept
@@ -441,7 +475,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::socket_base::enable_connection_aborted option(true);
* acceptor.set_option(option);
@@ -450,7 +484,7 @@ public:
* @par
* Getting the current option value:
* @code
- * asio::ip::tcp::acceptor acceptor(io_context);
+ * asio::ip::tcp::acceptor acceptor(my_context);
* ...
* asio::socket_base::enable_connection_aborted option;
* acceptor.get_option(option);
@@ -476,7 +510,7 @@ public:
*
* @par Example
* @code
- * asio::ip::tcp::socket socket(io_context);
+ * asio::ip::tcp::socket socket(my_context);
* ...
* asio::socket_base::bytes_readable command(true);
* socket.io_control(command);
diff --git a/3rdparty/asio/include/asio/spawn.hpp b/3rdparty/asio/include/asio/spawn.hpp
index cffe4312e5d..eeacb49de6d 100644
--- a/3rdparty/asio/include/asio/spawn.hpp
+++ b/3rdparty/asio/include/asio/spawn.hpp
@@ -2,7 +2,7 @@
// spawn.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,28 +16,162 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <boost/coroutine/all.hpp>
-#include "asio/bind_executor.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/detail/exception.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/wrapped_handler.hpp"
-#include "asio/executor.hpp"
#include "asio/io_context.hpp"
#include "asio/is_executor.hpp"
#include "asio/strand.hpp"
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+# include <boost/coroutine/all.hpp>
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+// Base class for all spawn()-ed thread implementations.
+class spawned_thread_base
+{
+public:
+ spawned_thread_base()
+ : owner_(0),
+ has_context_switched_(false),
+ throw_if_cancelled_(false),
+ terminal_(false)
+ {
+ }
+
+ virtual ~spawned_thread_base() {}
+ virtual void resume() = 0;
+ virtual void suspend_with(void (*fn)(void*), void* arg) = 0;
+ virtual void destroy() = 0;
+
+ void attach(spawned_thread_base** owner)
+ {
+ owner_ = owner;
+ *owner_ = this;
+ }
+
+ void detach()
+ {
+ if (owner_)
+ *owner_ = 0;
+ owner_ = 0;
+ }
+
+ void suspend()
+ {
+ suspend_with(0, 0);
+ }
+
+ template <typename F>
+ void suspend_with(F f)
+ {
+ suspend_with(&spawned_thread_base::call<F>, &f);
+ }
+
+ cancellation_slot get_cancellation_slot() const noexcept
+ {
+ return cancellation_state_.slot();
+ }
+
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return cancellation_state_;
+ }
+
+ void reset_cancellation_state()
+ {
+ cancellation_state_ = cancellation_state(parent_cancellation_slot_);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter filter)
+ {
+ cancellation_state_ = cancellation_state(
+ parent_cancellation_slot_, filter, filter);
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter in_filter, OutFilter out_filter)
+ {
+ cancellation_state_ = cancellation_state(
+ parent_cancellation_slot_, in_filter, out_filter);
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_state_.cancelled();
+ }
+
+ bool has_context_switched() const noexcept
+ {
+ return has_context_switched_;
+ }
+
+ bool throw_if_cancelled() const noexcept
+ {
+ return throw_if_cancelled_;
+ }
-/// Context object the represents the currently executing coroutine.
+ void throw_if_cancelled(bool value) noexcept
+ {
+ throw_if_cancelled_ = value;
+ }
+
+protected:
+ spawned_thread_base** owner_; // Points to data member in active handler.
+ asio::cancellation_slot parent_cancellation_slot_;
+ asio::cancellation_state cancellation_state_;
+ bool has_context_switched_;
+ bool throw_if_cancelled_;
+ bool terminal_;
+
+private:
+ // Disallow copying and assignment.
+ spawned_thread_base(const spawned_thread_base&) = delete;
+ spawned_thread_base& operator=(const spawned_thread_base&) = delete;
+
+ template <typename F>
+ static void call(void* f)
+ {
+ (*static_cast<F*>(f))();
+ }
+};
+
+
+template <typename T>
+struct spawn_signature
+{
+ typedef void type(exception_ptr, T);
+};
+
+template <>
+struct spawn_signature<void>
+{
+ typedef void type(exception_ptr);
+};
+
+template <typename Executor>
+class initiate_spawn;
+
+} // namespace detail
+
+/// A @ref completion_token that represents the currently executing coroutine.
/**
- * The basic_yield_context class is used to represent the currently executing
- * stackful coroutine. A basic_yield_context may be passed as a handler to an
- * asynchronous operation. For example:
+ * The basic_yield_context class is a completion token type that is used to
+ * represent the currently executing stackful coroutine. A basic_yield_context
+ * object may be passed as a completion token to an asynchronous operation. For
+ * example:
*
- * @code template <typename Handler>
- * void my_coroutine(basic_yield_context<Handler> yield)
+ * @code template <typename Executor>
+ * void my_coroutine(basic_yield_context<Executor> yield)
* {
* ...
* std::size_t n = my_socket.async_read_some(buffer, yield);
@@ -48,67 +182,112 @@ namespace asio {
* current coroutine. The coroutine is resumed when the asynchronous operation
* completes, and the result of the operation is returned.
*/
-template <typename Handler>
+template <typename Executor>
class basic_yield_context
{
public:
- /// The coroutine callee type, used by the implementation.
+ /// The executor type associated with the yield context.
+ typedef Executor executor_type;
+
+ /// The cancellation slot type associated with the yield context.
+ typedef cancellation_slot cancellation_slot_type;
+
+ /// Construct a yield context from another yield context type.
/**
- * When using Boost.Coroutine v1, this type is:
- * @code typename coroutine<void()> @endcode
- * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
- * @code push_coroutine<void> @endcode
+ * Requires that OtherExecutor be convertible to Executor.
*/
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined callee_type;
-#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
- typedef boost::coroutines::push_coroutine<void> callee_type;
-#else
- typedef boost::coroutines::coroutine<void()> callee_type;
-#endif
-
- /// The coroutine caller type, used by the implementation.
+ template <typename OtherExecutor>
+ basic_yield_context(const basic_yield_context<OtherExecutor>& other,
+ constraint_t<
+ is_convertible<OtherExecutor, Executor>::value
+ > = 0)
+ : spawned_thread_(other.spawned_thread_),
+ executor_(other.executor_),
+ ec_(other.ec_)
+ {
+ }
+
+ /// Get the executor associated with the yield context.
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ /// Get the cancellation slot associated with the coroutine.
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return spawned_thread_->get_cancellation_slot();
+ }
+
+ /// Get the cancellation state associated with the coroutine.
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return spawned_thread_->get_cancellation_state();
+ }
+
+ /// Reset the cancellation state associated with the coroutine.
/**
- * When using Boost.Coroutine v1, this type is:
- * @code typename coroutine<void()>::caller_type @endcode
- * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
- * @code pull_coroutine<void> @endcode
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as
+ * <tt>S(P)</tt>, into the current coroutine's cancellation state object.
*/
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined caller_type;
-#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
- typedef boost::coroutines::pull_coroutine<void> caller_type;
-#else
- typedef boost::coroutines::coroutine<void()>::caller_type caller_type;
-#endif
-
- /// Construct a yield context to represent the specified coroutine.
+ void reset_cancellation_state() const
+ {
+ spawned_thread_->reset_cancellation_state();
+ }
+
+ /// Reset the cancellation state associated with the coroutine.
/**
- * Most applications do not need to use this constructor. Instead, the
- * spawn() function passes a yield context as an argument to the coroutine
- * function.
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
+ * std::forward<Filter>(filter))</tt>, into the current coroutine's
+ * cancellation state object.
*/
- basic_yield_context(
- const detail::weak_ptr<callee_type>& coro,
- caller_type& ca, Handler& handler)
- : coro_(coro),
- ca_(ca),
- handler_(handler),
- ec_(0)
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter) const
{
+ spawned_thread_->reset_cancellation_state(
+ static_cast<Filter&&>(filter));
}
- /// Construct a yield context from another yield context type.
+ /// Reset the cancellation state associated with the coroutine.
/**
- * Requires that OtherHandler be convertible to Handler.
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
+ * std::forward<InFilter>(in_filter),
+ * std::forward<OutFilter>(out_filter))</tt>, into the current coroutine's
+ * cancellation state object.
*/
- template <typename OtherHandler>
- basic_yield_context(const basic_yield_context<OtherHandler>& other)
- : coro_(other.coro_),
- ca_(other.ca_),
- handler_(other.handler_),
- ec_(other.ec_)
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter) const
{
+ spawned_thread_->reset_cancellation_state(
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ /// Determine whether the current coroutine has been cancelled.
+ cancellation_type_t cancelled() const noexcept
+ {
+ return spawned_thread_->cancelled();
+ }
+
+ /// Determine whether the coroutine throws if trying to suspend when it has
+ /// been cancelled.
+ bool throw_if_cancelled() const noexcept
+ {
+ return spawned_thread_->throw_if_cancelled();
+ }
+
+ /// Set whether the coroutine throws if trying to suspend when it has been
+ /// cancelled.
+ void throw_if_cancelled(bool value) const noexcept
+ {
+ spawned_thread_->throw_if_cancelled(value);
}
/// Return a yield context that sets the specified error_code.
@@ -118,8 +297,8 @@ public:
* operator may be used to specify an error_code object that should instead be
* set with the asynchronous operation's result. For example:
*
- * @code template <typename Handler>
- * void my_coroutine(basic_yield_context<Handler> yield)
+ * @code template <typename Executor>
+ * void my_coroutine(basic_yield_context<Executor> yield)
* {
* ...
* std::size_t n = my_socket.async_read_some(buffer, yield[ec]);
@@ -137,22 +316,25 @@ public:
return tmp;
}
-#if defined(GENERATING_DOCUMENTATION)
-private:
-#endif // defined(GENERATING_DOCUMENTATION)
- detail::weak_ptr<callee_type> coro_;
- caller_type& ca_;
- Handler handler_;
+#if !defined(GENERATING_DOCUMENTATION)
+//private:
+ basic_yield_context(detail::spawned_thread_base* spawned_thread,
+ const Executor& ex)
+ : spawned_thread_(spawned_thread),
+ executor_(ex),
+ ec_(0)
+ {
+ }
+
+ detail::spawned_thread_base* spawned_thread_;
+ Executor executor_;
asio::error_code* ec_;
+#endif // !defined(GENERATING_DOCUMENTATION)
};
-#if defined(GENERATING_DOCUMENTATION)
-/// Context object that represents the currently executing coroutine.
-typedef basic_yield_context<unspecified> yield_context;
-#else // defined(GENERATING_DOCUMENTATION)
-typedef basic_yield_context<
- executor_binder<void(*)(), executor> > yield_context;
-#endif // defined(GENERATING_DOCUMENTATION)
+/// A @ref completion_token object that represents the currently executing
+/// coroutine.
+typedef basic_yield_context<any_io_executor> yield_context;
/**
* @defgroup spawn asio::spawn
@@ -163,7 +345,7 @@ typedef basic_yield_context<
* library. This function enables programs to implement asynchronous logic in a
* synchronous manner, as illustrated by the following example:
*
- * @code asio::spawn(my_strand, do_echo);
+ * @code asio::spawn(my_strand, do_echo, asio::detached);
*
* // ...
*
@@ -190,23 +372,363 @@ typedef basic_yield_context<
*/
/*@{*/
-/// Start a new stackful coroutine, calling the specified handler when it
-/// completes.
+/// Start a new stackful coroutine that executes on a given executor.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ex Identifies the executor that will run the stackful coroutine.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const Executor& ex, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ > = 0,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine that executes on a given execution context.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ctx Identifies the execution context that will run the stackful
+ * coroutine.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type)
+ CompletionToken = default_completion_token_t<
+ typename ExecutionContext::executor_type>>
+auto spawn(ExecutionContext& ctx, F&& function,
+ CompletionToken&& token
+ = default_completion_token_t<typename ExecutionContext::executor_type>(),
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ > = 0,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine, inheriting the executor of another.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ctx Identifies the current coroutine as a parent of the new
+ * coroutine. This specifies that the new coroutine should inherit the executor
+ * of the parent. For example, if the parent coroutine is executing in a
+ * particular strand, then the new coroutine will execute in the same strand.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const basic_yield_context<Executor>& ctx, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ > = 0,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)));
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Start a new stackful coroutine that executes on a given executor.
+/**
+ * This function is used to launch a new stackful coroutine using the
+ * specified stack allocator.
+ *
+ * @param ex Identifies the executor that will run the stackful coroutine.
+ *
+ * @param stack_allocator Denotes the allocator to be used to allocate the
+ * underlying coroutine's stack. The type must satisfy the stack-allocator
+ * concept defined by the Boost.Context library.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const Executor& ex, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine that executes on a given execution context.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ctx Identifies the execution context that will run the stackful
+ * coroutine.
+ *
+ * @param stack_allocator Denotes the allocator to be used to allocate the
+ * underlying coroutine's stack. The type must satisfy the stack-allocator
+ * concept defined by the Boost.Context library.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type)
+ CompletionToken = default_completion_token_t<
+ typename ExecutionContext::executor_type>>
+auto spawn(ExecutionContext& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function,
+ CompletionToken&& token
+ = default_completion_token_t<typename ExecutionContext::executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine, inheriting the executor of another.
+/**
+ * This function is used to launch a new stackful coroutine using the
+ * specified stack allocator.
+ *
+ * @param ctx Identifies the current coroutine as a parent of the new
+ * coroutine. This specifies that the new coroutine should inherit the
+ * executor of the parent. For example, if the parent coroutine is executing
+ * in a particular strand, then the new coroutine will execute in the same
+ * strand.
+ *
+ * @param stack_allocator Denotes the allocator to be used to allocate the
+ * underlying coroutine's stack. The type must satisfy the stack-allocator
+ * concept defined by the Boost.Context library.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const basic_yield_context<Executor>& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)));
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#if defined(ASIO_HAS_BOOST_COROUTINE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine, calling the specified handler when it completes.
/**
* This function is used to launch a new coroutine.
*
* @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ * where Executor is the associated executor type of @c Function.
*
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function>
-void spawn(ASIO_MOVE_ARG(Function) function,
+void spawn(Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
-/// Start a new stackful coroutine, calling the specified handler when it
-/// completes.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine, calling the specified handler when it completes.
/**
* This function is used to launch a new coroutine.
*
@@ -216,19 +738,23 @@ void spawn(ASIO_MOVE_ARG(Function) function,
* @code void handler(); @endcode
*
* @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ * where Executor is the associated executor type of @c Handler.
*
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Handler, typename Function>
-void spawn(ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Function) function,
+void spawn(Handler&& handler, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename enable_if<!is_executor<typename decay<Handler>::type>::value &&
- !is_convertible<Handler&, execution_context&>::value>::type* = 0);
+ constraint_t<
+ !is_executor<decay_t<Handler>>::value &&
+ !execution::is_executor<decay_t<Handler>>::value &&
+ !is_convertible<Handler&, execution_context&>::value
+ > = 0);
-/// Start a new stackful coroutine, inheriting the execution context of another.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine, inheriting the execution context of another.
/**
* This function is used to launch a new coroutine.
*
@@ -239,22 +765,23 @@ void spawn(ASIO_MOVE_ARG(Handler) handler,
* same strand.
*
* @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
+ * @code void function(basic_yield_context<Executor> yield); @endcode
*
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
-template <typename Handler, typename Function>
-void spawn(basic_yield_context<Handler> ctx,
- ASIO_MOVE_ARG(Function) function,
+template <typename Executor, typename Function>
+void spawn(basic_yield_context<Executor> ctx, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
-/// Start a new stackful coroutine that executes on a given executor.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes on a given executor.
/**
* This function is used to launch a new coroutine.
*
* @param ex Identifies the executor that will run the coroutine. The new
- * coroutine is implicitly given its own strand within this executor.
+ * coroutine is automatically given its own explicit strand within this
+ * executor.
*
* @param function The coroutine function. The function must have the signature:
* @code void function(yield_context yield); @endcode
@@ -262,13 +789,15 @@ void spawn(basic_yield_context<Handler> ctx,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function, typename Executor>
-void spawn(const Executor& ex,
- ASIO_MOVE_ARG(Function) function,
+void spawn(const Executor& ex, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename enable_if<is_executor<Executor>::value>::type* = 0);
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0);
-/// Start a new stackful coroutine that executes on a given strand.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes on a given strand.
/**
* This function is used to launch a new coroutine.
*
@@ -280,12 +809,14 @@ void spawn(const Executor& ex,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function, typename Executor>
-void spawn(const strand<Executor>& ex,
- ASIO_MOVE_ARG(Function) function,
+void spawn(const strand<Executor>& ex, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
-/// Start a new stackful coroutine that executes in the context of a strand.
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes in the context of a strand.
/**
* This function is used to launch a new coroutine.
*
@@ -299,12 +830,14 @@ void spawn(const strand<Executor>& ex,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function>
-void spawn(const asio::io_context::strand& s,
- ASIO_MOVE_ARG(Function) function,
+void spawn(const asio::io_context::strand& s, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
-/// Start a new stackful coroutine that executes on a given execution context.
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes on a given execution context.
/**
* This function is used to launch a new coroutine.
*
@@ -318,12 +851,15 @@ void spawn(const asio::io_context::strand& s,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function, typename ExecutionContext>
-void spawn(ExecutionContext& ctx,
- ASIO_MOVE_ARG(Function) function,
+void spawn(ExecutionContext& ctx, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename enable_if<is_convertible<
- ExecutionContext&, execution_context&>::value>::type* = 0);
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0);
+
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ // || defined(GENERATING_DOCUMENTATION)
/*@}*/
diff --git a/3rdparty/asio/include/asio/ssl.hpp b/3rdparty/asio/include/asio/ssl.hpp
index bc3dae03c9c..4180dab6f42 100644
--- a/3rdparty/asio/include/asio/ssl.hpp
+++ b/3rdparty/asio/include/asio/ssl.hpp
@@ -2,7 +2,7 @@
// ssl.hpp
// ~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#include "asio/ssl/context_base.hpp"
#include "asio/ssl/error.hpp"
#include "asio/ssl/rfc2818_verification.hpp"
+#include "asio/ssl/host_name_verification.hpp"
#include "asio/ssl/stream.hpp"
#include "asio/ssl/stream_base.hpp"
#include "asio/ssl/verify_context.hpp"
diff --git a/3rdparty/asio/include/asio/ssl/context.hpp b/3rdparty/asio/include/asio/ssl/context.hpp
index 6e3f2ad3013..a41904a4089 100644
--- a/3rdparty/asio/include/asio/ssl/context.hpp
+++ b/3rdparty/asio/include/asio/ssl/context.hpp
@@ -2,7 +2,7 @@
// ssl/context.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -43,7 +43,9 @@ public:
/// Constructor.
ASIO_DECL explicit context(method m);
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Construct to take ownership of a native handle.
+ ASIO_DECL explicit context(native_handle_type native_handle);
+
/// Move-construct a context from another.
/**
* This constructor moves an SSL context from one object to another.
@@ -69,7 +71,6 @@ public:
* @li As a target for move-assignment.
*/
ASIO_DECL context& operator=(context&& other);
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
ASIO_DECL ~context();
@@ -738,6 +739,9 @@ private:
// Helper function to make a BIO from a memory buffer.
ASIO_DECL BIO* make_buffer_bio(const const_buffer& b);
+ // Translate an SSL error into an error code.
+ ASIO_DECL static asio::error_code translate_error(long error);
+
// The underlying native implementation.
native_handle_type handle_;
diff --git a/3rdparty/asio/include/asio/ssl/context_base.hpp b/3rdparty/asio/include/asio/ssl/context_base.hpp
index b3af107d513..36271012b06 100644
--- a/3rdparty/asio/include/asio/ssl/context_base.hpp
+++ b/3rdparty/asio/include/asio/ssl/context_base.hpp
@@ -2,7 +2,7 @@
// ssl/context_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -83,56 +83,82 @@ public:
tlsv12_client,
/// TLS version 1.2 server.
- tlsv12_server
+ tlsv12_server,
+
+ /// Generic TLS version 1.3.
+ tlsv13,
+
+ /// TLS version 1.3 client.
+ tlsv13_client,
+
+ /// TLS version 1.3 server.
+ tlsv13_server,
+
+ /// Generic TLS.
+ tls,
+
+ /// TLS client.
+ tls_client,
+
+ /// TLS server.
+ tls_server
};
/// Bitmask type for SSL options.
- typedef long options;
+ typedef uint64_t options;
#if defined(GENERATING_DOCUMENTATION)
/// Implement various bug workarounds.
- static const long default_workarounds = implementation_defined;
+ static const uint64_t default_workarounds = implementation_defined;
/// Always create a new key when using tmp_dh parameters.
- static const long single_dh_use = implementation_defined;
+ static const uint64_t single_dh_use = implementation_defined;
/// Disable SSL v2.
- static const long no_sslv2 = implementation_defined;
+ static const uint64_t no_sslv2 = implementation_defined;
/// Disable SSL v3.
- static const long no_sslv3 = implementation_defined;
+ static const uint64_t no_sslv3 = implementation_defined;
/// Disable TLS v1.
- static const long no_tlsv1 = implementation_defined;
+ static const uint64_t no_tlsv1 = implementation_defined;
/// Disable TLS v1.1.
- static const long no_tlsv1_1 = implementation_defined;
+ static const uint64_t no_tlsv1_1 = implementation_defined;
/// Disable TLS v1.2.
- static const long no_tlsv1_2 = implementation_defined;
+ static const uint64_t no_tlsv1_2 = implementation_defined;
+
+ /// Disable TLS v1.3.
+ static const uint64_t no_tlsv1_3 = implementation_defined;
/// Disable compression. Compression is disabled by default.
- static const long no_compression = implementation_defined;
+ static const uint64_t no_compression = implementation_defined;
#else
- ASIO_STATIC_CONSTANT(long, default_workarounds = SSL_OP_ALL);
- ASIO_STATIC_CONSTANT(long, single_dh_use = SSL_OP_SINGLE_DH_USE);
- ASIO_STATIC_CONSTANT(long, no_sslv2 = SSL_OP_NO_SSLv2);
- ASIO_STATIC_CONSTANT(long, no_sslv3 = SSL_OP_NO_SSLv3);
- ASIO_STATIC_CONSTANT(long, no_tlsv1 = SSL_OP_NO_TLSv1);
+ ASIO_STATIC_CONSTANT(uint64_t, default_workarounds = SSL_OP_ALL);
+ ASIO_STATIC_CONSTANT(uint64_t, single_dh_use = SSL_OP_SINGLE_DH_USE);
+ ASIO_STATIC_CONSTANT(uint64_t, no_sslv2 = SSL_OP_NO_SSLv2);
+ ASIO_STATIC_CONSTANT(uint64_t, no_sslv3 = SSL_OP_NO_SSLv3);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1 = SSL_OP_NO_TLSv1);
# if defined(SSL_OP_NO_TLSv1_1)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = SSL_OP_NO_TLSv1_1);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_1 = SSL_OP_NO_TLSv1_1);
# else // defined(SSL_OP_NO_TLSv1_1)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = 0x10000000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_1 = 0x10000000L);
# endif // defined(SSL_OP_NO_TLSv1_1)
# if defined(SSL_OP_NO_TLSv1_2)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = SSL_OP_NO_TLSv1_2);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_2 = SSL_OP_NO_TLSv1_2);
# else // defined(SSL_OP_NO_TLSv1_2)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = 0x08000000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_2 = 0x08000000L);
# endif // defined(SSL_OP_NO_TLSv1_2)
+# if defined(SSL_OP_NO_TLSv1_3)
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_3 = SSL_OP_NO_TLSv1_3);
+# else // defined(SSL_OP_NO_TLSv1_3)
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_3 = 0x20000000L);
+# endif // defined(SSL_OP_NO_TLSv1_3)
# if defined(SSL_OP_NO_COMPRESSION)
- ASIO_STATIC_CONSTANT(long, no_compression = SSL_OP_NO_COMPRESSION);
+ ASIO_STATIC_CONSTANT(uint64_t, no_compression = SSL_OP_NO_COMPRESSION);
# else // defined(SSL_OP_NO_COMPRESSION)
- ASIO_STATIC_CONSTANT(long, no_compression = 0x20000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_compression = 0x20000L);
# endif // defined(SSL_OP_NO_COMPRESSION)
#endif
diff --git a/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp b/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
index e661bdef392..4dba7120929 100644
--- a/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/buffered_handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -29,6 +29,11 @@ template <typename ConstBufferSequence>
class buffered_handshake_op
{
public:
+ static constexpr const char* tracking_name()
+ {
+ return "ssl::stream<>::async_buffered_handshake";
+ }
+
buffered_handshake_op(stream_base::handshake_type type,
const ConstBufferSequence& buffers)
: type_(type),
@@ -51,7 +56,7 @@ public:
const asio::error_code& ec,
const std::size_t& bytes_transferred) const
{
- handler(ec, bytes_transferred);
+ static_cast<Handler&&>(handler)(ec, bytes_transferred);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/detail/engine.hpp b/3rdparty/asio/include/asio/ssl/detail/engine.hpp
index c9ea33b1bb9..e500ca529da 100644
--- a/3rdparty/asio/include/asio/ssl/detail/engine.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/engine.hpp
@@ -2,7 +2,7 @@
// ssl/detail/engine.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -58,9 +58,18 @@ public:
// Construct a new engine for the specified context.
ASIO_DECL explicit engine(SSL_CTX* context);
+ // Construct a new engine for an existing native SSL implementation.
+ ASIO_DECL explicit engine(SSL* ssl_impl);
+
+ // Move construct from another engine.
+ ASIO_DECL engine(engine&& other) noexcept;
+
// Destructor.
ASIO_DECL ~engine();
+ // Move assign from another engine.
+ ASIO_DECL engine& operator=(engine&& other) noexcept;
+
// Get the underlying implementation in the native type.
ASIO_DECL SSL* native_handle();
diff --git a/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp b/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp
index b6848ea62e5..53533eb7a80 100644
--- a/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,6 +28,11 @@ namespace detail {
class handshake_op
{
public:
+ static constexpr const char* tracking_name()
+ {
+ return "ssl::stream<>::async_handshake";
+ }
+
handshake_op(stream_base::handshake_type type)
: type_(type)
{
@@ -46,7 +51,7 @@ public:
const asio::error_code& ec,
const std::size_t&) const
{
- handler(ec);
+ static_cast<Handler&&>(handler)(ec);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp b/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp
index 55661492952..91588cd6b47 100644
--- a/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp
+++ b/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp
@@ -2,7 +2,7 @@
// ssl/detail/impl/engine.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -55,16 +55,57 @@ engine::engine(SSL_CTX* context)
::SSL_set_bio(ssl_, int_bio, int_bio);
}
+engine::engine(SSL* ssl_impl)
+ : ssl_(ssl_impl)
+{
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ accept_mutex().init();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+ ::SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE);
+ ::SSL_set_mode(ssl_, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+#if defined(SSL_MODE_RELEASE_BUFFERS)
+ ::SSL_set_mode(ssl_, SSL_MODE_RELEASE_BUFFERS);
+#endif // defined(SSL_MODE_RELEASE_BUFFERS)
+
+ ::BIO* int_bio = 0;
+ ::BIO_new_bio_pair(&int_bio, 0, &ext_bio_, 0);
+ ::SSL_set_bio(ssl_, int_bio, int_bio);
+}
+
+engine::engine(engine&& other) noexcept
+ : ssl_(other.ssl_),
+ ext_bio_(other.ext_bio_)
+{
+ other.ssl_ = 0;
+ other.ext_bio_ = 0;
+}
+
engine::~engine()
{
- if (SSL_get_app_data(ssl_))
+ if (ssl_ && SSL_get_app_data(ssl_))
{
delete static_cast<verify_callback_base*>(SSL_get_app_data(ssl_));
SSL_set_app_data(ssl_, 0);
}
- ::BIO_free(ext_bio_);
- ::SSL_free(ssl_);
+ if (ext_bio_)
+ ::BIO_free(ext_bio_);
+
+ if (ssl_)
+ ::SSL_free(ssl_);
+}
+
+engine& engine::operator=(engine&& other) noexcept
+{
+ if (this != &other)
+ {
+ ssl_ = other.ssl_;
+ ext_bio_ = other.ext_bio_;
+ other.ssl_ = 0;
+ other.ext_bio_ = 0;
+ }
+ return *this;
}
SSL* engine::native_handle()
@@ -204,7 +245,7 @@ const asio::error_code& engine::map_error_code(
// SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
// underlying transport is passed through.
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- if (ssl_->version == SSL2_VERSION)
+ if (SSL_version(ssl_) == SSL2_VERSION)
return ec;
#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
@@ -240,14 +281,23 @@ engine::want engine::perform(int (engine::* op)(void*, std::size_t),
{
ec = asio::error_code(sys_error,
asio::error::get_ssl_category());
- return want_nothing;
+ return pending_output_after > pending_output_before
+ ? want_output : want_nothing;
}
if (ssl_error == SSL_ERROR_SYSCALL)
{
- ec = asio::error_code(sys_error,
- asio::error::get_system_category());
- return want_nothing;
+ if (sys_error == 0)
+ {
+ ec = asio::ssl::error::unspecified_system_error;
+ }
+ else
+ {
+ ec = asio::error_code(sys_error,
+ asio::error::get_ssl_category());
+ }
+ return pending_output_after > pending_output_before
+ ? want_output : want_nothing;
}
if (result > 0 && bytes_transferred)
@@ -268,16 +318,21 @@ engine::want engine::perform(int (engine::* op)(void*, std::size_t),
ec = asio::error_code();
return want_input_and_retry;
}
- else if (::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN)
+ else if (ssl_error == SSL_ERROR_ZERO_RETURN)
{
ec = asio::error::eof;
return want_nothing;
}
- else
+ else if (ssl_error == SSL_ERROR_NONE)
{
ec = asio::error_code();
return want_nothing;
}
+ else
+ {
+ ec = asio::ssl::error::unexpected_result;
+ return want_nothing;
+ }
}
int engine::do_accept(void*, std::size_t)
diff --git a/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp b/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp
index 392eff9bc14..7a10cc2aa8a 100644
--- a/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp
+++ b/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2024 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)
@@ -35,11 +35,11 @@ class openssl_init_base::do_init
public:
do_init()
{
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
::SSL_library_init();
::SSL_load_error_strings();
::OpenSSL_add_all_algorithms();
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
mutexes_.resize(::CRYPTO_num_locks());
for (size_t i = 0; i < mutexes_.size(); ++i)
mutexes_[i].reset(new asio::detail::mutex);
@@ -79,13 +79,19 @@ public:
::ERR_remove_thread_state(NULL);
#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \
- && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ && (OPENSSL_VERSION_NUMBER < 0x10100000L) \
+ && !defined(SSL_OP_NO_COMPRESSION)
::SSL_COMP_free_compression_methods();
#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
// && (OPENSSL_VERSION_NUMBER < 0x10100000L)
-#if !defined(OPENSSL_IS_BORINGSSL)
+ // && !defined(SSL_OP_NO_COMPRESSION)
+#if !defined(OPENSSL_IS_BORINGSSL) \
+ && !defined(ASIO_USE_WOLFSSL) \
+ && (OPENSSL_VERSION_NUMBER < 0x30000000L)
::CONF_modules_unload(1);
#endif // !defined(OPENSSL_IS_BORINGSSL)
+ // && !defined(ASIO_USE_WOLFSSL)
+ // && (OPENSSL_VERSION_NUMBER < 0x30000000L)
#if !defined(OPENSSL_NO_ENGINE) \
&& (OPENSSL_VERSION_NUMBER < 0x10100000L)
::ENGINE_cleanup();
@@ -128,7 +134,7 @@ private:
// Mutexes to be used in locking callbacks.
std::vector<asio::detail::shared_ptr<
- asio::detail::mutex> > mutexes_;
+ asio::detail::mutex>> mutexes_;
#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
#if !defined(SSL_OP_NO_COMPRESSION) \
diff --git a/3rdparty/asio/include/asio/ssl/detail/io.hpp b/3rdparty/asio/include/asio/ssl/detail/io.hpp
index 5d35ba45707..d951db593af 100644
--- a/3rdparty/asio/include/asio/ssl/detail/io.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/io.hpp
@@ -2,7 +2,7 @@
// ssl/detail/io.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,8 @@
#include "asio/detail/config.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
+#include "asio/detail/handler_tracking.hpp"
#include "asio/ssl/detail/engine.hpp"
#include "asio/ssl/detail/stream_core.hpp"
#include "asio/write.hpp"
@@ -31,6 +33,7 @@ template <typename Stream, typename Operation>
std::size_t io(Stream& next_layer, stream_core& core,
const Operation& op, asio::error_code& ec)
{
+ asio::error_code io_ec;
std::size_t bytes_transferred = 0;
do switch (op(core.engine_, ec, bytes_transferred))
{
@@ -39,8 +42,12 @@ std::size_t io(Stream& next_layer, stream_core& core,
// If the input buffer is empty then we need to read some more data from
// the underlying transport.
if (core.input_.size() == 0)
+ {
core.input_ = asio::buffer(core.input_buffer_,
- next_layer.read_some(core.input_buffer_, ec));
+ next_layer.read_some(core.input_buffer_, io_ec));
+ if (!ec)
+ ec = io_ec;
+ }
// Pass the new input data to the engine.
core.input_ = core.engine_.put_input(core.input_);
@@ -53,7 +60,9 @@ std::size_t io(Stream& next_layer, stream_core& core,
// Get output data from the engine and write it to the underlying
// transport.
asio::write(next_layer,
- core.engine_.get_output(core.output_buffer_), ec);
+ core.engine_.get_output(core.output_buffer_), io_ec);
+ if (!ec)
+ ec = io_ec;
// Try the operation again.
continue;
@@ -63,7 +72,9 @@ std::size_t io(Stream& next_layer, stream_core& core,
// Get output data from the engine and write it to the underlying
// transport.
asio::write(next_layer,
- core.engine_.get_output(core.output_buffer_), ec);
+ core.engine_.get_output(core.output_buffer_), io_ec);
+ if (!ec)
+ ec = io_ec;
// Operation is complete. Return result to caller.
core.engine_.map_error_code(ec);
@@ -84,23 +95,25 @@ std::size_t io(Stream& next_layer, stream_core& core,
template <typename Stream, typename Operation, typename Handler>
class io_op
+ : public asio::detail::base_from_cancellation_state<Handler>
{
public:
io_op(Stream& next_layer, stream_core& core,
const Operation& op, Handler& handler)
- : next_layer_(next_layer),
+ : asio::detail::base_from_cancellation_state<Handler>(handler),
+ next_layer_(next_layer),
core_(core),
op_(op),
start_(0),
want_(engine::want_nothing),
bytes_transferred_(0),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
io_op(const io_op& other)
- : next_layer_(other.next_layer_),
+ : asio::detail::base_from_cancellation_state<Handler>(other),
+ next_layer_(other.next_layer_),
core_(other.core_),
op_(other.op_),
start_(other.start_),
@@ -112,17 +125,19 @@ public:
}
io_op(io_op&& other)
- : next_layer_(other.next_layer_),
+ : asio::detail::base_from_cancellation_state<Handler>(
+ static_cast<
+ asio::detail::base_from_cancellation_state<Handler>&&>(other)),
+ next_layer_(other.next_layer_),
core_(other.core_),
- op_(other.op_),
+ op_(static_cast<Operation&&>(other.op_)),
start_(other.start_),
want_(other.want_),
ec_(other.ec_),
bytes_transferred_(other.bytes_transferred_),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred = ~std::size_t(0), int start = 0)
@@ -153,15 +168,21 @@ public:
// Prevent other read operations from being started.
core_.pending_read_.expires_at(core_.pos_infin());
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, Operation::tracking_name()));
+
// Start reading some data from the underlying transport.
next_layer_.async_read_some(
asio::buffer(core_.input_buffer_),
- ASIO_MOVE_CAST(io_op)(*this));
+ static_cast<io_op&&>(*this));
}
else
{
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, Operation::tracking_name()));
+
// Wait until the current read operation completes.
- core_.pending_read_.async_wait(ASIO_MOVE_CAST(io_op)(*this));
+ core_.pending_read_.async_wait(static_cast<io_op&&>(*this));
}
// Yield control until asynchronous operation completes. Control
@@ -180,15 +201,21 @@ public:
// Prevent other write operations from being started.
core_.pending_write_.expires_at(core_.pos_infin());
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, Operation::tracking_name()));
+
// Start writing all the data to the underlying transport.
asio::async_write(next_layer_,
core_.engine_.get_output(core_.output_buffer_),
- ASIO_MOVE_CAST(io_op)(*this));
+ static_cast<io_op&&>(*this));
}
else
{
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, Operation::tracking_name()));
+
// Wait until the current write operation completes.
- core_.pending_write_.async_wait(ASIO_MOVE_CAST(io_op)(*this));
+ core_.pending_write_.async_wait(static_cast<io_op&&>(*this));
}
// Yield control until asynchronous operation completes. Control
@@ -204,9 +231,12 @@ public:
// read so the handler runs "as-if" posted using io_context::post().
if (start)
{
+ ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__, Operation::tracking_name()));
+
next_layer_.async_read_some(
asio::buffer(core_.input_buffer_, 0),
- ASIO_MOVE_CAST(io_op)(*this));
+ static_cast<io_op&&>(*this));
// Yield control until asynchronous operation completes. Control
// resumes at the "default:" label below.
@@ -237,6 +267,13 @@ public:
// Release any waiting read operations.
core_.pending_read_.expires_at(core_.neg_infin());
+ // Check for cancellation before continuing.
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec_ = asio::error::operation_aborted;
+ break;
+ }
+
// Try the operation again.
continue;
@@ -245,6 +282,13 @@ public:
// Release any waiting write operations.
core_.pending_write_.expires_at(core_.neg_infin());
+ // Check for cancellation before continuing.
+ if (this->cancelled() != cancellation_type::none)
+ {
+ ec_ = asio::error::operation_aborted;
+ break;
+ }
+
// Try the operation again.
continue;
@@ -284,22 +328,6 @@ public:
};
template <typename Stream, typename Operation, typename Handler>
-inline void* asio_handler_allocate(std::size_t size,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-}
-
-template <typename Stream, typename Operation, typename Handler>
-inline void asio_handler_deallocate(void* pointer, std::size_t size,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-}
-
-template <typename Stream, typename Operation, typename Handler>
inline bool asio_handler_is_continuation(
io_op<Stream, Operation, Handler>* this_handler)
{
@@ -307,24 +335,6 @@ inline bool asio_handler_is_continuation(
: asio_handler_cont_helpers::is_continuation(this_handler->handler_);
}
-template <typename Function, typename Stream,
- typename Operation, typename Handler>
-inline void asio_handler_invoke(Function& function,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
-template <typename Function, typename Stream,
- typename Operation, typename Handler>
-inline void asio_handler_invoke(const Function& function,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-}
-
template <typename Stream, typename Operation, typename Handler>
inline void async_io(Stream& next_layer, stream_core& core,
const Operation& op, Handler& handler)
@@ -337,31 +347,25 @@ inline void async_io(Stream& next_layer, stream_core& core,
} // namespace detail
} // namespace ssl
-template <typename Stream, typename Operation,
- typename Handler, typename Allocator>
-struct associated_allocator<
- ssl::detail::io_op<Stream, Operation, Handler>, Allocator>
+template <template <typename, typename> class Associator,
+ typename Stream, typename Operation,
+ typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ ssl::detail::io_op<Stream, Operation, Handler>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
{
- typedef typename associated_allocator<Handler, Allocator>::type type;
-
- static type get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const ssl::detail::io_op<Stream, Operation, Handler>& h) noexcept
{
- return associated_allocator<Handler, Allocator>::get(h.handler_, a);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
}
-};
-
-template <typename Stream, typename Operation,
- typename Handler, typename Executor>
-struct associated_executor<
- ssl::detail::io_op<Stream, Operation, Handler>, Executor>
-{
- typedef typename associated_executor<Handler, Executor>::type type;
- static type get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static auto get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_executor<Handler, Executor>::get(h.handler_, ex);
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
diff --git a/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp b/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp
index 6144534c989..c66d9d62692 100644
--- a/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp b/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp
index eda740d8099..25f080f1e8e 100644
--- a/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/socket_types.hpp"
+#if defined(ASIO_USE_WOLFSSL)
+# include <wolfssl/options.h>
+#endif // defined(ASIO_USE_WOLFSSL)
#include <openssl/conf.h>
#include <openssl/ssl.h>
#if !defined(OPENSSL_NO_ENGINE)
@@ -24,7 +28,7 @@
#include <openssl/dh.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
+#include <openssl/x509.h>
#include <openssl/x509v3.h>
-#include "asio/detail/socket_types.hpp"
#endif // ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
diff --git a/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp b/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp
index abff36c6f33..03ac7db0f06 100644
--- a/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp
@@ -2,7 +2,7 @@
// ssl/detail/password_callback.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/read_op.hpp b/3rdparty/asio/include/asio/ssl/detail/read_op.hpp
index 2195bc892eb..5cb4249556f 100644
--- a/3rdparty/asio/include/asio/ssl/detail/read_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/read_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,6 +30,11 @@ template <typename MutableBufferSequence>
class read_op
{
public:
+ static constexpr const char* tracking_name()
+ {
+ return "ssl::stream<>::async_read_some";
+ }
+
read_op(const MutableBufferSequence& buffers)
: buffers_(buffers)
{
@@ -51,7 +56,7 @@ public:
const asio::error_code& ec,
const std::size_t& bytes_transferred) const
{
- handler(ec, bytes_transferred);
+ static_cast<Handler&&>(handler)(ec, bytes_transferred);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp b/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp
index 974eaa0a423..1f6b91e17c1 100644
--- a/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/shutdown_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,6 +28,11 @@ namespace detail {
class shutdown_op
{
public:
+ static constexpr const char* tracking_name()
+ {
+ return "ssl::stream<>::async_shutdown";
+ }
+
engine::want operator()(engine& eng,
asio::error_code& ec,
std::size_t& bytes_transferred) const
@@ -41,7 +46,17 @@ public:
const asio::error_code& ec,
const std::size_t&) const
{
- handler(ec);
+ if (ec == asio::error::eof)
+ {
+ // The engine only generates an eof when the shutdown notification has
+ // been received from the peer. This indicates that the shutdown has
+ // completed successfully, and thus need not be passed on to the handler.
+ static_cast<Handler&&>(handler)(asio::error_code());
+ }
+ else
+ {
+ static_cast<Handler&&>(handler)(ec);
+ }
}
};
diff --git a/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp b/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp
index 1872912c018..0ec763d4a2b 100644
--- a/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp
@@ -2,7 +2,7 @@
// ssl/detail/stream_core.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -37,10 +37,11 @@ struct stream_core
// sufficient to hold the largest possible TLS record.
enum { max_tls_record_size = 17 * 1024 };
- stream_core(SSL_CTX* context, asio::io_context& io_context)
+ template <typename Executor>
+ stream_core(SSL_CTX* context, const Executor& ex)
: engine_(context),
- pending_read_(io_context),
- pending_write_(io_context),
+ pending_read_(ex),
+ pending_write_(ex),
output_buffer_space_(max_tls_record_size),
output_buffer_(asio::buffer(output_buffer_space_)),
input_buffer_space_(max_tls_record_size),
@@ -50,10 +51,92 @@ struct stream_core
pending_write_.expires_at(neg_infin());
}
+ template <typename Executor>
+ stream_core(SSL* ssl_impl, const Executor& ex)
+ : engine_(ssl_impl),
+ pending_read_(ex),
+ pending_write_(ex),
+ output_buffer_space_(max_tls_record_size),
+ output_buffer_(asio::buffer(output_buffer_space_)),
+ input_buffer_space_(max_tls_record_size),
+ input_buffer_(asio::buffer(input_buffer_space_))
+ {
+ pending_read_.expires_at(neg_infin());
+ pending_write_.expires_at(neg_infin());
+ }
+
+ stream_core(stream_core&& other)
+ : engine_(static_cast<engine&&>(other.engine_)),
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+ pending_read_(
+ static_cast<asio::deadline_timer&&>(
+ other.pending_read_)),
+ pending_write_(
+ static_cast<asio::deadline_timer&&>(
+ other.pending_write_)),
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ pending_read_(
+ static_cast<asio::steady_timer&&>(
+ other.pending_read_)),
+ pending_write_(
+ static_cast<asio::steady_timer&&>(
+ other.pending_write_)),
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ output_buffer_space_(
+ static_cast<std::vector<unsigned char>&&>(
+ other.output_buffer_space_)),
+ output_buffer_(other.output_buffer_),
+ input_buffer_space_(
+ static_cast<std::vector<unsigned char>&&>(
+ other.input_buffer_space_)),
+ input_buffer_(other.input_buffer_),
+ input_(other.input_)
+ {
+ other.output_buffer_ = asio::mutable_buffer(0, 0);
+ other.input_buffer_ = asio::mutable_buffer(0, 0);
+ other.input_ = asio::const_buffer(0, 0);
+ }
+
~stream_core()
{
}
+ stream_core& operator=(stream_core&& other)
+ {
+ if (this != &other)
+ {
+ engine_ = static_cast<engine&&>(other.engine_);
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+ pending_read_ =
+ static_cast<asio::deadline_timer&&>(
+ other.pending_read_);
+ pending_write_ =
+ static_cast<asio::deadline_timer&&>(
+ other.pending_write_);
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ pending_read_ =
+ static_cast<asio::steady_timer&&>(
+ other.pending_read_);
+ pending_write_ =
+ static_cast<asio::steady_timer&&>(
+ other.pending_write_);
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ output_buffer_space_ =
+ static_cast<std::vector<unsigned char>&&>(
+ other.output_buffer_space_);
+ output_buffer_ = other.output_buffer_;
+ input_buffer_space_ =
+ static_cast<std::vector<unsigned char>&&>(
+ other.input_buffer_space_);
+ input_buffer_ = other.input_buffer_;
+ input_ = other.input_;
+ other.output_buffer_ = asio::mutable_buffer(0, 0);
+ other.input_buffer_ = asio::mutable_buffer(0, 0);
+ other.input_ = asio::const_buffer(0, 0);
+ }
+ return *this;
+ }
+
// The SSL engine.
engine engine_;
@@ -113,13 +196,13 @@ struct stream_core
std::vector<unsigned char> output_buffer_space_;
// A buffer that may be used to prepare output intended for the transport.
- const asio::mutable_buffer output_buffer_;
+ asio::mutable_buffer output_buffer_;
// Buffer space used to read input intended for the engine.
std::vector<unsigned char> input_buffer_space_;
// A buffer that may be used to read input intended for the engine.
- const asio::mutable_buffer input_buffer_;
+ asio::mutable_buffer input_buffer_;
// The buffer pointing to the engine's unconsumed input.
asio::const_buffer input_;
diff --git a/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp b/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp
index 288ff66db48..54169c9e6b8 100644
--- a/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp
@@ -1,8 +1,8 @@
//
// ssl/detail/verify_callback.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/write_op.hpp b/3rdparty/asio/include/asio/ssl/detail/write_op.hpp
index d40719e0fa5..edcbcad5850 100644
--- a/3rdparty/asio/include/asio/ssl/detail/write_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/write_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -30,6 +30,11 @@ template <typename ConstBufferSequence>
class write_op
{
public:
+ static constexpr const char* tracking_name()
+ {
+ return "ssl::stream<>::async_write_some";
+ }
+
write_op(const ConstBufferSequence& buffers)
: buffers_(buffers)
{
@@ -39,9 +44,13 @@ public:
asio::error_code& ec,
std::size_t& bytes_transferred) const
{
+ unsigned char storage[
+ asio::detail::buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::linearisation_storage_size];
+
asio::const_buffer buffer =
asio::detail::buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::first(buffers_);
+ ConstBufferSequence>::linearise(buffers_, asio::buffer(storage));
return eng.write(buffer, ec, bytes_transferred);
}
@@ -51,7 +60,7 @@ public:
const asio::error_code& ec,
const std::size_t& bytes_transferred) const
{
- handler(ec, bytes_transferred);
+ static_cast<Handler&&>(handler)(ec, bytes_transferred);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/error.hpp b/3rdparty/asio/include/asio/ssl/error.hpp
index 3efef0ccf32..e126f52c1c7 100644
--- a/3rdparty/asio/include/asio/ssl/error.hpp
+++ b/3rdparty/asio/include/asio/ssl/error.hpp
@@ -2,7 +2,7 @@
// ssl/error.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,7 @@
#include "asio/detail/config.hpp"
#include "asio/error_code.hpp"
+#include "asio/ssl/detail/openssl_types.hpp"
#include "asio/detail/push_options.hpp"
@@ -31,7 +32,8 @@ enum ssl_errors
extern ASIO_DECL
const asio::error_category& get_ssl_category();
-static const asio::error_category& ssl_category
+static const asio::error_category&
+ ssl_category ASIO_UNUSED_VARIABLE
= asio::error::get_ssl_category();
} // namespace error
@@ -42,25 +44,39 @@ enum stream_errors
{
#if defined(GENERATING_DOCUMENTATION)
/// The underlying stream closed before the ssl stream gracefully shut down.
- stream_truncated
-#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
- stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)
-#else
- stream_truncated = 1
-#endif
+ stream_truncated,
+
+ /// The underlying SSL library returned a system error without providing
+ /// further information.
+ unspecified_system_error,
+
+ /// The underlying SSL library generated an unexpected result from a function
+ /// call.
+ unexpected_result
+#else // defined(GENERATING_DOCUMENTATION)
+# if (OPENSSL_VERSION_NUMBER < 0x10100000L) \
+ && !defined(OPENSSL_IS_BORINGSSL) \
+ && !defined(ASIO_USE_WOLFSSL)
+ stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ),
+# else
+ stream_truncated = 1,
+# endif
+ unspecified_system_error = 2,
+ unexpected_result = 3
+#endif // defined(GENERATING_DOCUMENTATION)
};
extern ASIO_DECL
const asio::error_category& get_stream_category();
-static const asio::error_category& stream_category
+static const asio::error_category&
+ stream_category ASIO_UNUSED_VARIABLE
= asio::ssl::error::get_stream_category();
} // namespace error
} // namespace ssl
} // namespace asio
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace std {
template<> struct is_error_code_enum<asio::error::ssl_errors>
@@ -74,7 +90,6 @@ template<> struct is_error_code_enum<asio::ssl::error::stream_errors>
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace asio {
namespace error {
diff --git a/3rdparty/asio/include/asio/ssl/host_name_verification.hpp b/3rdparty/asio/include/asio/ssl/host_name_verification.hpp
new file mode 100644
index 00000000000..adb6ac8c0f7
--- /dev/null
+++ b/3rdparty/asio/include/asio/ssl/host_name_verification.hpp
@@ -0,0 +1,90 @@
+//
+// ssl/host_name_verification.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_SSL_HOST_NAME_VERIFICATION_HPP
+#define ASIO_SSL_HOST_NAME_VERIFICATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#include <string>
+#include "asio/ssl/detail/openssl_types.hpp"
+#include "asio/ssl/verify_context.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ssl {
+
+/// Verifies a certificate against a host_name according to the rules described
+/// in RFC 6125.
+/**
+ * @par Example
+ * The following example shows how to synchronously open a secure connection to
+ * a given host name:
+ * @code
+ * using asio::ip::tcp;
+ * namespace ssl = asio::ssl;
+ * typedef ssl::stream<tcp::socket> ssl_socket;
+ *
+ * // Create a context that uses the default paths for finding CA certificates.
+ * ssl::context ctx(ssl::context::sslv23);
+ * ctx.set_default_verify_paths();
+ *
+ * // Open a socket and connect it to the remote host.
+ * asio::io_context io_context;
+ * ssl_socket sock(io_context, ctx);
+ * tcp::resolver resolver(io_context);
+ * tcp::resolver::query query("host.name", "https");
+ * asio::connect(sock.lowest_layer(), resolver.resolve(query));
+ * sock.lowest_layer().set_option(tcp::no_delay(true));
+ *
+ * // Perform SSL handshake and verify the remote host's certificate.
+ * sock.set_verify_mode(ssl::verify_peer);
+ * sock.set_verify_callback(ssl::host_name_verification("host.name"));
+ * sock.handshake(ssl_socket::client);
+ *
+ * // ... read and write as normal ...
+ * @endcode
+ */
+class host_name_verification
+{
+public:
+ /// The type of the function object's result.
+ typedef bool result_type;
+
+ /// Constructor.
+ explicit host_name_verification(const std::string& host)
+ : host_(host)
+ {
+ }
+
+ /// Perform certificate verification.
+ ASIO_DECL bool operator()(bool preverified, verify_context& ctx) const;
+
+private:
+ // Helper function to check a host name against an IPv4 address
+ // The host name to be checked.
+ std::string host_;
+};
+
+} // namespace ssl
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/ssl/impl/host_name_verification.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_SSL_HOST_NAME_VERIFICATION_HPP
diff --git a/3rdparty/asio/include/asio/ssl/impl/context.hpp b/3rdparty/asio/include/asio/ssl/impl/context.hpp
index 2b5a1616bf9..2324a9880aa 100644
--- a/3rdparty/asio/include/asio/ssl/impl/context.hpp
+++ b/3rdparty/asio/include/asio/ssl/impl/context.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2024 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)
diff --git a/3rdparty/asio/include/asio/ssl/impl/context.ipp b/3rdparty/asio/include/asio/ssl/impl/context.ipp
index 2b0c38d373c..8711048b9a7 100644
--- a/3rdparty/asio/include/asio/ssl/impl/context.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/context.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2024 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)
@@ -47,6 +47,7 @@ struct context::evp_pkey_cleanup
~evp_pkey_cleanup() { if (p) ::EVP_PKEY_free(p); }
};
+#if (OPENSSL_VERSION_NUMBER < 0x30000000L)
struct context::rsa_cleanup
{
RSA* p;
@@ -58,6 +59,7 @@ struct context::dh_cleanup
DH* p;
~dh_cleanup() { if (p) ::DH_free(p); }
};
+#endif // (OPENSSL_VERSION_NUMBER < 0x30000000L)
context::context(context::method m)
: handle_(0)
@@ -66,16 +68,15 @@ context::context(context::method m)
switch (m)
{
-#if defined(OPENSSL_NO_SSL2) \
- || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ // SSL v2.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
case context::sslv2:
case context::sslv2_client:
case context::sslv2_server:
asio::detail::throw_error(
asio::error::invalid_argument, "context");
break;
-#else // defined(OPENSSL_NO_SSL2)
- // || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
case context::sslv2:
handle_ = ::SSL_CTX_new(::SSLv2_method());
break;
@@ -85,9 +86,35 @@ context::context(context::method m)
case context::sslv2_server:
handle_ = ::SSL_CTX_new(::SSLv2_server_method());
break;
-#endif // defined(OPENSSL_NO_SSL2)
- // || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-#if defined(OPENSSL_NO_SSL3)
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
+
+ // SSL v3.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::sslv3:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
+ }
+ break;
+ case context::sslv3_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
+ }
+ break;
+ case context::sslv3_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
+ }
+ break;
+#elif defined(OPENSSL_NO_SSL3)
case context::sslv3:
case context::sslv3_client:
case context::sslv3_server:
@@ -105,7 +132,34 @@ context::context(context::method m)
handle_ = ::SSL_CTX_new(::SSLv3_server_method());
break;
#endif // defined(OPENSSL_NO_SSL3)
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+ // TLS v1.0.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv1:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
+ }
+ break;
+ case context::tlsv1_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
+ }
+ break;
+ case context::tlsv1_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
+ }
+ break;
+#elif defined(SSL_TXT_TLSV1)
case context::tlsv1:
handle_ = ::SSL_CTX_new(::TLSv1_method());
break;
@@ -115,18 +169,42 @@ context::context(context::method m)
case context::tlsv1_server:
handle_ = ::SSL_CTX_new(::TLSv1_server_method());
break;
-#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
- case context::sslv23:
- handle_ = ::SSL_CTX_new(::SSLv23_method());
+#else // defined(SSL_TXT_TLSV1)
+ case context::tlsv1:
+ case context::tlsv1_client:
+ case context::tlsv1_server:
+ asio::detail::throw_error(
+ asio::error::invalid_argument, "context");
break;
- case context::sslv23_client:
- handle_ = ::SSL_CTX_new(::SSLv23_client_method());
+#endif // defined(SSL_TXT_TLSV1)
+
+ // TLS v1.1.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv11:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
+ }
break;
- case context::sslv23_server:
- handle_ = ::SSL_CTX_new(::SSLv23_server_method());
+ case context::tlsv11_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
+ }
+ break;
+ case context::tlsv11_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
+ }
break;
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-#if defined(SSL_TXT_TLSV1_1)
+#elif defined(SSL_TXT_TLSV1_1)
case context::tlsv11:
handle_ = ::SSL_CTX_new(::TLSv1_1_method());
break;
@@ -144,7 +222,34 @@ context::context(context::method m)
asio::error::invalid_argument, "context");
break;
#endif // defined(SSL_TXT_TLSV1_1)
-#if defined(SSL_TXT_TLSV1_2)
+
+ // TLS v1.2.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv12:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
+ }
+ break;
+ case context::tlsv12_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
+ }
+ break;
+ case context::tlsv12_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
+ }
+ break;
+#elif defined(SSL_TXT_TLSV1_2)
case context::tlsv12:
handle_ = ::SSL_CTX_new(::TLSv1_2_method());
break;
@@ -154,31 +259,99 @@ context::context(context::method m)
case context::tlsv12_server:
handle_ = ::SSL_CTX_new(::TLSv1_2_server_method());
break;
-#else // defined(SSL_TXT_TLSV1_2)
+#else // defined(SSL_TXT_TLSV1_2)
case context::tlsv12:
case context::tlsv12_client:
case context::tlsv12_server:
asio::detail::throw_error(
asio::error::invalid_argument, "context");
break;
-#endif // defined(SSL_TXT_TLSV1_2)
-#else // (OPENSSL_VERSION_NUMBER < 0x10100000L)
- case context::tlsv1:
- case context::tlsv11:
- case context::tlsv12:
+#endif // defined(SSL_TXT_TLSV1_2)
+
+ // TLS v1.3.
+#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) \
+ && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv13:
handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
+ }
break;
- case context::tlsv1_client:
- case context::tlsv11_client:
- case context::tlsv12_client:
+ case context::tlsv13_client:
handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
+ }
break;
- case context::tlsv1_server:
- case context::tlsv11_server:
- case context::tlsv12_server:
+ case context::tlsv13_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
+ }
+ break;
+#else // (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+ // && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv13:
+ case context::tlsv13_client:
+ case context::tlsv13_server:
+ asio::detail::throw_error(
+ asio::error::invalid_argument, "context");
+ break;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+ // && !defined(LIBRESSL_VERSION_NUMBER)
+
+ // Any supported SSL/TLS version.
+ case context::sslv23:
+ handle_ = ::SSL_CTX_new(::SSLv23_method());
+ break;
+ case context::sslv23_client:
+ handle_ = ::SSL_CTX_new(::SSLv23_client_method());
+ break;
+ case context::sslv23_server:
+ handle_ = ::SSL_CTX_new(::SSLv23_server_method());
+ break;
+
+ // Any supported TLS version.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tls:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ break;
+ case context::tls_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ break;
+ case context::tls_server:
handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ break;
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ case context::tls:
+ handle_ = ::SSL_CTX_new(::SSLv23_method());
+ if (handle_)
+ SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
+ break;
+ case context::tls_client:
+ handle_ = ::SSL_CTX_new(::SSLv23_client_method());
+ if (handle_)
+ SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
+ break;
+ case context::tls_server:
+ handle_ = ::SSL_CTX_new(::SSLv23_server_method());
+ if (handle_)
+ SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
break;
-#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
default:
handle_ = ::SSL_CTX_new(0);
break;
@@ -186,16 +359,23 @@ context::context(context::method m)
if (handle_ == 0)
{
- asio::error_code ec(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ asio::error_code ec = translate_error(::ERR_get_error());
asio::detail::throw_error(ec, "context");
}
set_options(no_compression);
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+context::context(context::native_handle_type native_handle)
+ : handle_(native_handle)
+{
+ if (!handle_)
+ {
+ asio::detail::throw_error(
+ asio::error::invalid_argument, "context");
+ }
+}
+
context::context(context&& other)
{
handle_ = other.handle_;
@@ -204,18 +384,20 @@ context::context(context&& other)
context& context::operator=(context&& other)
{
- context tmp(ASIO_MOVE_CAST(context)(*this));
+ context tmp(static_cast<context&&>(*this));
handle_ = other.handle_;
other.handle_ = 0;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
context::~context()
{
if (handle_)
{
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
+ || defined(ASIO_USE_WOLFSSL)
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
void* cb_userdata = handle_->default_passwd_callback_userdata;
@@ -226,7 +408,10 @@ context::~context()
static_cast<detail::password_callback_base*>(
cb_userdata);
delete callback;
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
+ || defined(ASIO_USE_WOLFSSL)
::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
handle_->default_passwd_callback_userdata = 0;
@@ -358,9 +543,7 @@ ASIO_SYNC_OP_VOID context::load_verify_file(
if (::SSL_CTX_load_verify_locations(handle_, filename.c_str(), 0) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -383,23 +566,32 @@ ASIO_SYNC_OP_VOID context::add_certificate_authority(
bio_cleanup bio = { make_buffer_bio(ca) };
if (bio.p)
{
- x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
- if (cert.p)
+ if (X509_STORE* store = ::SSL_CTX_get_cert_store(handle_))
{
- if (X509_STORE* store = ::SSL_CTX_get_cert_store(handle_))
+ for (bool added = false;; added = true)
{
- if (::X509_STORE_add_cert(store, cert.p) == 1)
+ x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
+ if (!cert.p)
{
- ec = asio::error_code();
+ unsigned long err = ::ERR_get_error();
+ if (added && ERR_GET_LIB(err) == ERR_LIB_PEM
+ && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
+ break;
+
+ ec = translate_error(err);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ if (::X509_STORE_add_cert(store, cert.p) != 1)
+ {
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
}
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = asio::error_code();
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -417,9 +609,7 @@ ASIO_SYNC_OP_VOID context::set_default_verify_paths(
if (::SSL_CTX_set_default_verify_paths(handle_) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -441,9 +631,7 @@ ASIO_SYNC_OP_VOID context::add_verify_path(
if (::SSL_CTX_load_verify_locations(handle_, 0, path.c_str()) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -497,9 +685,7 @@ ASIO_SYNC_OP_VOID context::use_certificate(
ASIO_SYNC_OP_VOID_RETURN(ec);
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -535,9 +721,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_file(
if (::SSL_CTX_use_certificate_file(handle_, filename.c_str(), file_type) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -560,7 +744,10 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
bio_cleanup bio = { make_buffer_bio(chain) };
if (bio.p)
{
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
+ || defined(ASIO_USE_WOLFSSL)
pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -573,21 +760,21 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
cb_userdata) };
if (!cert.p)
{
- ec = asio::error_code(ERR_R_PEM_LIB,
- asio::error::get_ssl_category());
+ ec = translate_error(ERR_R_PEM_LIB);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
int result = ::SSL_CTX_use_certificate(handle_, cert.p);
if (result == 0 || ::ERR_peek_error() != 0)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
-#if (OPENSSL_VERSION_NUMBER >= 0x10002000L)
+#if ((OPENSSL_VERSION_NUMBER >= 0x10002000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2090100fL)) \
+ || defined(ASIO_USE_WOLFSSL)
::SSL_CTX_clear_chain_certs(handle_);
#else
if (handle_->extra_certs)
@@ -603,9 +790,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
{
if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert))
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
@@ -620,9 +805,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
}
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -640,9 +823,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain_file(
if (::SSL_CTX_use_certificate_chain_file(handle_, filename.c_str()) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -664,7 +845,10 @@ ASIO_SYNC_OP_VOID context::use_private_key(
{
::ERR_clear_error();
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
+ || defined(ASIO_USE_WOLFSSL)
pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -703,9 +887,7 @@ ASIO_SYNC_OP_VOID context::use_private_key(
}
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -731,17 +913,55 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key(
{
::ERR_clear_error();
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
- void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
+ || defined(ASIO_USE_WOLFSSL)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- pem_password_cb* callback = handle_->default_passwd_callback;
- void* cb_userdata = handle_->default_passwd_callback_userdata;
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
bio_cleanup bio = { make_buffer_bio(private_key) };
if (bio.p)
{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ evp_pkey_cleanup evp_private_key = { 0 };
+ switch (format)
+ {
+ case context_base::asn1:
+ evp_private_key.p = ::d2i_PrivateKey_bio(bio.p, 0);
+ break;
+ case context_base::pem:
+ evp_private_key.p = ::PEM_read_bio_PrivateKey(
+ bio.p, 0, callback,
+ cb_userdata);
+ break;
+ default:
+ {
+ ec = asio::error::invalid_argument;
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ if (evp_private_key.p)
+ {
+ if (::EVP_PKEY_is_a(evp_private_key.p, "RSA") == 0)
+ {
+ ec = translate_error(
+ ERR_PACK(ERR_LIB_EVP, 0, EVP_R_EXPECTING_AN_RSA_KEY));
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
+ {
+ ec = asio::error_code();
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+#else // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
rsa_cleanup rsa_private_key = { 0 };
switch (format)
{
@@ -768,11 +988,10 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key(
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -800,9 +1019,7 @@ ASIO_SYNC_OP_VOID context::use_private_key_file(
if (::SSL_CTX_use_PrivateKey_file(handle_, filename.c_str(), file_type) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -822,6 +1039,53 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
const std::string& filename, context::file_format format,
asio::error_code& ec)
{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ ::ERR_clear_error();
+
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+
+ bio_cleanup bio = { ::BIO_new_file(filename.c_str(), "r") };
+ if (bio.p)
+ {
+ evp_pkey_cleanup evp_private_key = { 0 };
+ switch (format)
+ {
+ case context_base::asn1:
+ evp_private_key.p = ::d2i_PrivateKey_bio(bio.p, 0);
+ break;
+ case context_base::pem:
+ evp_private_key.p = ::PEM_read_bio_PrivateKey(
+ bio.p, 0, callback,
+ cb_userdata);
+ break;
+ default:
+ {
+ ec = asio::error::invalid_argument;
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ if (evp_private_key.p)
+ {
+ if (::EVP_PKEY_is_a(evp_private_key.p, "RSA") == 0)
+ {
+ ec = translate_error(
+ ERR_PACK(ERR_LIB_EVP, 0, EVP_R_EXPECTING_AN_RSA_KEY));
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
+ {
+ ec = asio::error_code();
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ }
+
+ ec = translate_error(::ERR_get_error());
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+#else // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
int file_type;
switch (format)
{
@@ -843,14 +1107,13 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
if (::SSL_CTX_use_RSAPrivateKey_file(
handle_, filename.c_str(), file_type) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
ec = asio::error_code();
ASIO_SYNC_OP_VOID_RETURN(ec);
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
}
void context::use_tmp_dh(const const_buffer& dh)
@@ -871,9 +1134,7 @@ ASIO_SYNC_OP_VOID context::use_tmp_dh(
return do_use_tmp_dh(bio.p, ec);
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -895,9 +1156,7 @@ ASIO_SYNC_OP_VOID context::use_tmp_dh_file(
return do_use_tmp_dh(bio.p, ec);
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -906,6 +1165,19 @@ ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
{
::ERR_clear_error();
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ EVP_PKEY* p = ::PEM_read_bio_Parameters(bio, 0);
+ if (p)
+ {
+ if (::SSL_CTX_set0_tmp_dh_pkey(handle_, p) == 1)
+ {
+ ec = asio::error_code();
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ else
+ ::EVP_PKEY_free(p);
+ }
+#else // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
dh_cleanup dh = { ::PEM_read_bio_DHparams(bio, 0, 0, 0) };
if (dh.p)
{
@@ -915,10 +1187,9 @@ ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -970,7 +1241,10 @@ int context::verify_callback_function(int preverified, X509_STORE_CTX* ctx)
ASIO_SYNC_OP_VOID context::do_set_password_callback(
detail::password_callback_base* callback, asio::error_code& ec)
{
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+#if ((OPENSSL_VERSION_NUMBER >= 0x10100000L) \
+ && (!defined(LIBRESSL_VERSION_NUMBER) \
+ || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
+ || defined(ASIO_USE_WOLFSSL)
void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -1022,6 +1296,21 @@ BIO* context::make_buffer_bio(const const_buffer& b)
static_cast<int>(b.size()));
}
+asio::error_code context::translate_error(long error)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ if (ERR_SYSTEM_ERROR(error))
+ {
+ return asio::error_code(
+ static_cast<int>(ERR_GET_REASON(error)),
+ asio::error::get_system_category());
+ }
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+
+ return asio::error_code(static_cast<int>(error),
+ asio::error::get_ssl_category());
+}
+
} // namespace ssl
} // namespace asio
diff --git a/3rdparty/asio/include/asio/ssl/impl/error.ipp b/3rdparty/asio/include/asio/ssl/impl/error.ipp
index 268fc9664cf..7ff6e8a7359 100644
--- a/3rdparty/asio/include/asio/ssl/impl/error.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/error.ipp
@@ -2,7 +2,7 @@
// ssl/impl/error.ipp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -28,15 +28,37 @@ namespace detail {
class ssl_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.ssl";
}
std::string message(int value) const
{
- const char* s = ::ERR_reason_error_string(value);
- return s ? s : "asio.ssl error";
+ const char* reason = ::ERR_reason_error_string(value);
+ if (reason)
+ {
+ const char* lib = ::ERR_lib_error_string(value);
+#if (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ const char* func = ::ERR_func_error_string(value);
+#else // (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ const char* func = 0;
+#endif // (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ std::string result(reason);
+ if (lib || func)
+ {
+ result += " (";
+ if (lib)
+ result += lib;
+ if (lib && func)
+ result += ", ";
+ if (func)
+ result += func;
+ result += ")";
+ }
+ return result;
+ }
+ return "asio.ssl error";
}
};
@@ -66,7 +88,7 @@ namespace detail {
class stream_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.ssl.stream";
}
@@ -76,6 +98,8 @@ public:
switch (value)
{
case stream_truncated: return "stream truncated";
+ case unspecified_system_error: return "unspecified system error";
+ case unexpected_result: return "unexpected result";
default: return "asio.ssl.stream error";
}
}
diff --git a/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp b/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp
new file mode 100644
index 00000000000..198d1f3989c
--- /dev/null
+++ b/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp
@@ -0,0 +1,73 @@
+//
+// ssl/impl/host_name_verification.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_SSL_IMPL_HOST_NAME_VERIFICATION_IPP
+#define ASIO_SSL_IMPL_HOST_NAME_VERIFICATION_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#include <cctype>
+#include <cstring>
+#include "asio/ip/address.hpp"
+#include "asio/ssl/host_name_verification.hpp"
+#include "asio/ssl/detail/openssl_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ssl {
+
+bool host_name_verification::operator()(
+ bool preverified, verify_context& ctx) const
+{
+ using namespace std; // For memcmp.
+
+ // Don't bother looking at certificates that have failed pre-verification.
+ if (!preverified)
+ return false;
+
+ // We're only interested in checking the certificate at the end of the chain.
+ int depth = X509_STORE_CTX_get_error_depth(ctx.native_handle());
+ if (depth > 0)
+ return true;
+
+ // Try converting the host name to an address. If it is an address then we
+ // need to look for an IP address in the certificate rather than a host name.
+ asio::error_code ec;
+ ip::address address = ip::make_address(host_, ec);
+ const bool is_address = !ec;
+ (void)address;
+
+ X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
+
+ if (is_address)
+ {
+ return X509_check_ip_asc(cert, host_.c_str(), 0) == 1;
+ }
+ else
+ {
+ char* peername = 0;
+ const int result = X509_check_host(cert,
+ host_.c_str(), host_.size(), 0, &peername);
+ OPENSSL_free(peername);
+ return result == 1;
+ }
+}
+
+} // namespace ssl
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_SSL_IMPL_HOST_NAME_VERIFICATION_IPP
diff --git a/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp b/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp
index f84b02573ae..93e161daa85 100644
--- a/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp
@@ -2,7 +2,7 @@
// ssl/impl/rfc2818_verification.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,8 @@
#include "asio/detail/config.hpp"
+#if !defined(ASIO_NO_DEPRECATED)
+
#include <cctype>
#include <cstring>
#include "asio/ip/address.hpp"
@@ -157,4 +159,6 @@ bool rfc2818_verification::match_pattern(const char* pattern,
#include "asio/detail/pop_options.hpp"
+#endif // !defined(ASIO_NO_DEPRECATED)
+
#endif // ASIO_SSL_IMPL_RFC2818_VERIFICATION_IPP
diff --git a/3rdparty/asio/include/asio/ssl/impl/src.hpp b/3rdparty/asio/include/asio/ssl/impl/src.hpp
index e6e269f9998..5ffb95fdcd6 100644
--- a/3rdparty/asio/include/asio/ssl/impl/src.hpp
+++ b/3rdparty/asio/include/asio/ssl/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/ssl/src.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -23,6 +23,7 @@
#include "asio/ssl/impl/error.ipp"
#include "asio/ssl/detail/impl/engine.ipp"
#include "asio/ssl/detail/impl/openssl_init.ipp"
+#include "asio/ssl/impl/host_name_verification.ipp"
#include "asio/ssl/impl/rfc2818_verification.ipp"
#endif // ASIO_SSL_IMPL_SRC_HPP
diff --git a/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp b/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp
index a4ab67b2aee..db2831045d9 100644
--- a/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp
+++ b/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp
@@ -2,7 +2,7 @@
// ssl/rfc2818_verification.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,8 @@
#include "asio/detail/config.hpp"
+#if !defined(ASIO_NO_DEPRECATED)
+
#include <string>
#include "asio/ssl/detail/openssl_types.hpp"
#include "asio/ssl/verify_context.hpp"
@@ -26,8 +28,8 @@
namespace asio {
namespace ssl {
-/// Verifies a certificate against a hostname according to the rules described
-/// in RFC 2818.
+/// (Deprecated. Use ssl::host_name_verification.) Verifies a certificate
+/// against a hostname according to the rules described in RFC 2818.
/**
* @par Example
* The following example shows how to synchronously open a secure connection to
@@ -91,4 +93,6 @@ private:
# include "asio/ssl/impl/rfc2818_verification.ipp"
#endif // defined(ASIO_HEADER_ONLY)
+#endif // !defined(ASIO_NO_DEPRECATED)
+
#endif // ASIO_SSL_RFC2818_VERIFICATION_HPP
diff --git a/3rdparty/asio/include/asio/ssl/stream.hpp b/3rdparty/asio/include/asio/ssl/stream.hpp
index bc259b59ca7..befcc287e7f 100644
--- a/3rdparty/asio/include/asio/ssl/stream.hpp
+++ b/3rdparty/asio/include/asio/ssl/stream.hpp
@@ -2,7 +2,7 @@
// ssl/stream.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,8 +18,10 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/buffer.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/ssl/context.hpp"
@@ -51,9 +53,9 @@ namespace ssl {
* @par Example
* To use the SSL stream template with an ip::tcp::socket, you would write:
* @code
- * asio::io_context io_context;
+ * asio::io_context my_context;
* asio::ssl::context ctx(asio::ssl::context::sslv23);
- * asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
+ * asio::ssl::stream<asio::ip::tcp::socket> sock(my_context, ctx);
* @endcode
*
* @par Concepts:
@@ -64,6 +66,13 @@ class stream :
public stream_base,
private noncopyable
{
+private:
+ class initiate_async_handshake;
+ class initiate_async_buffered_handshake;
+ class initiate_async_shutdown;
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
/// The native handle type of the SSL stream.
typedef SSL* native_handle_type;
@@ -75,7 +84,7 @@ public:
};
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -83,7 +92,6 @@ public:
/// The type of the executor associated with the object.
typedef typename lowest_layer_type::executor_type executor_type;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a stream.
/**
* This constructor creates a stream and initialises the underlying stream
@@ -95,20 +103,57 @@ public:
*/
template <typename Arg>
stream(Arg&& arg, context& ctx)
- : next_layer_(ASIO_MOVE_CAST(Arg)(arg)),
- core_(ctx.native_handle(),
- next_layer_.lowest_layer().get_executor().context())
+ : next_layer_(static_cast<Arg&&>(arg)),
+ core_(ctx.native_handle(), next_layer_.lowest_layer().get_executor())
{
}
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a stream from an existing native implementation.
+ /**
+ * This constructor creates a stream and initialises the underlying stream
+ * object. On success, ownership of the native implementation is transferred
+ * to the stream, and it will be cleaned up when the stream is destroyed.
+ *
+ * @param arg The argument to be passed to initialise the underlying stream.
+ *
+ * @param handle An existing native SSL implementation.
+ */
template <typename Arg>
- stream(Arg& arg, context& ctx)
- : next_layer_(arg),
- core_(ctx.native_handle(),
- next_layer_.lowest_layer().get_executor().context())
+ stream(Arg&& arg, native_handle_type handle)
+ : next_layer_(static_cast<Arg&&>(arg)),
+ core_(handle, next_layer_.lowest_layer().get_executor())
+ {
+ }
+
+ /// Move-construct a stream from another.
+ /**
+ * @param other The other stream object from which the move will occur. Must
+ * have no outstanding asynchronous operations associated with it. Following
+ * the move, @c other has a valid but unspecified state where the only safe
+ * operation is destruction, or use as the target of a move assignment.
+ */
+ stream(stream&& other)
+ : next_layer_(static_cast<Stream&&>(other.next_layer_)),
+ core_(static_cast<detail::stream_core&&>(other.core_))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Move-assign a stream from another.
+ /**
+ * @param other The other stream object from which the move will occur. Must
+ * have no outstanding asynchronous operations associated with it. Following
+ * the move, @c other has a valid but unspecified state where the only safe
+ * operation is destruction, or use as the target of a move assignment.
+ */
+ stream& operator=(stream&& other)
+ {
+ if (this != &other)
+ {
+ next_layer_ = static_cast<Stream&&>(other.next_layer_);
+ core_ = static_cast<detail::stream_core&&>(other.core_);
+ }
+ return *this;
+ }
/// Destructor.
/**
@@ -126,27 +171,11 @@ public:
*
* @return A copy of the executor that stream will use to dispatch handlers.
*/
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return next_layer_.lowest_layer().get_executor();
}
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_context()
- {
- return next_layer_.lowest_layer().get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- asio::io_context& get_io_service()
- {
- return next_layer_.lowest_layer().get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
/// Get the underlying implementation in the native type.
/**
* This function may be used to obtain the underlying implementation of the
@@ -158,7 +187,7 @@ public:
* suitable for passing to functions such as @c SSL_get_verify_result and
* @c SSL_get_peer_certificate:
* @code
- * asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
+ * asio::ssl::stream<asio::ip::tcp::socket> sock(io_ctx, ctx);
*
* // ... establish connection and perform handshake ...
*
@@ -435,41 +464,59 @@ public:
/// Start an asynchronous SSL handshake.
/**
* This function is used to asynchronously perform an SSL handshake on the
- * stream. This function call always returns immediately.
+ * stream. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param type The type of handshaking to be performed, i.e. as a client or as
* a server.
*
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the handshake completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c Stream type's @c async_read_some and
+ * @c async_write_some operations.
*/
- template <typename HandshakeHandler>
- ASIO_INITFN_RESULT_TYPE(HandshakeHandler,
- void (asio::error_code))
- async_handshake(handshake_type type,
- ASIO_MOVE_ARG(HandshakeHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ HandshakeToken = default_completion_token_t<executor_type>>
+ auto async_handshake(handshake_type type,
+ HandshakeToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<HandshakeToken,
+ void (asio::error_code)>(
+ declval<initiate_async_handshake>(), token, type))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a HandshakeHandler.
- ASIO_HANDSHAKE_HANDLER_CHECK(HandshakeHandler, handler) type_check;
-
- asio::async_completion<HandshakeHandler,
- void (asio::error_code)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::handshake_op(type), init.completion_handler);
-
- return init.result.get();
+ return async_initiate<HandshakeToken,
+ void (asio::error_code)>(
+ initiate_async_handshake(this), token, type);
}
/// Start an asynchronous SSL handshake.
/**
* This function is used to asynchronously perform an SSL handshake on the
- * stream. This function call always returns immediately.
+ * stream. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param type The type of handshaking to be performed, i.e. as a client or as
* a server.
@@ -477,35 +524,54 @@ public:
* @param buffers The buffered data to be reused for the handshake. Although
* the buffers object may be copied as necessary, ownership of the underlying
* buffers is retained by the caller, which must guarantee that they remain
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the handshake completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* std::size_t bytes_transferred // Amount of buffers used in handshake.
* ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c Stream type's @c async_read_some and
+ * @c async_write_some operations.
*/
- template <typename ConstBufferSequence, typename BufferedHandshakeHandler>
- ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler,
- void (asio::error_code, std::size_t))
- async_handshake(handshake_type type, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(BufferedHandshakeHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) BufferedHandshakeToken
+ = default_completion_token_t<executor_type>>
+ auto async_handshake(handshake_type type, const ConstBufferSequence& buffers,
+ BufferedHandshakeToken&& token
+ = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ > = 0)
+ -> decltype(
+ async_initiate<BufferedHandshakeToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_buffered_handshake>(), token, type, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a BufferedHandshakeHandler.
- ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK(
- BufferedHandshakeHandler, handler) type_check;
-
- asio::async_completion<BufferedHandshakeHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::buffered_handshake_op<ConstBufferSequence>(type, buffers),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<BufferedHandshakeToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_buffered_handshake(this), token, type, buffers);
}
/// Shut down SSL on the stream.
@@ -537,32 +603,51 @@ public:
/// Asynchronously shut down SSL on the stream.
/**
- * This function is used to asynchronously shut down SSL on the stream. This
- * function call always returns immediately.
- *
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
+ * This function is used to asynchronously shut down SSL on the stream. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the shutdown completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c Stream type's @c async_read_some and
+ * @c async_write_some operations.
*/
- template <typename ShutdownHandler>
- ASIO_INITFN_RESULT_TYPE(ShutdownHandler,
- void (asio::error_code))
- async_shutdown(ASIO_MOVE_ARG(ShutdownHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ ShutdownToken
+ = default_completion_token_t<executor_type>>
+ auto async_shutdown(
+ ShutdownToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ShutdownToken,
+ void (asio::error_code)>(
+ declval<initiate_async_shutdown>(), token))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ShutdownHandler.
- ASIO_SHUTDOWN_HANDLER_CHECK(ShutdownHandler, handler) type_check;
-
- asio::async_completion<ShutdownHandler,
- void (asio::error_code)> init(handler);
-
- detail::async_io(next_layer_, core_, detail::shutdown_op(),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<ShutdownToken,
+ void (asio::error_code)>(
+ initiate_async_shutdown(this), token);
}
/// Write some data to the stream.
@@ -617,43 +702,60 @@ public:
/// Start an asynchronous write.
/**
* This function is used to asynchronously write one or more bytes of data to
- * the stream. The function call always returns immediately.
+ * the stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers The data to be written to the stream. Although the buffers
* object may be copied as necessary, ownership of the underlying buffers is
* retained by the caller, which must guarantee that they remain valid until
- * the handler is called.
+ * the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The equivalent function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_write_some operation may not transmit all of the data to
* the peer. Consider using the @ref async_write function if you need to
- * ensure that all data is written before the blocking operation completes.
+ * ensure that all data is written before the asynchronous operation
+ * completes.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c Stream type's @c async_read_some and
+ * @c async_write_some operations.
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::write_op<ConstBufferSequence>(buffers),
- init.completion_handler);
-
- return init.result.get();
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the stream.
@@ -708,47 +810,226 @@ public:
/// Start an asynchronous read.
/**
* This function is used to asynchronously read one or more bytes of data from
- * the stream. The function call always returns immediately.
+ * the stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers The buffers into which the data will be read. Although the
* buffers object may be copied as necessary, ownership of the underlying
* buffers is retained by the caller, which must guarantee that they remain
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The equivalent function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_read_some operation may not read all of the requested
* number of bytes. Consider using the @ref async_read function if you need to
* ensure that the requested amount of data is read before the asynchronous
* operation completes.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c Stream type's @c async_read_some and
+ * @c async_write_some operations.
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
+ }
+
+private:
+ class initiate_async_handshake
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+ public:
+ typedef typename stream::executor_type executor_type;
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
+ explicit initiate_async_handshake(stream* self)
+ : self_(self)
+ {
+ }
- detail::async_io(next_layer_, core_,
- detail::read_op<MutableBufferSequence>(buffers),
- init.completion_handler);
+ executor_type get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
- return init.result.get();
- }
+ template <typename HandshakeHandler>
+ void operator()(HandshakeHandler&& handler,
+ handshake_type type) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a HandshakeHandler.
+ ASIO_HANDSHAKE_HANDLER_CHECK(HandshakeHandler, handler) type_check;
+
+ asio::detail::non_const_lvalue<HandshakeHandler> handler2(handler);
+ detail::async_io(self_->next_layer_, self_->core_,
+ detail::handshake_op(type), handler2.value);
+ }
+
+ private:
+ stream* self_;
+ };
+
+ class initiate_async_buffered_handshake
+ {
+ public:
+ typedef typename stream::executor_type executor_type;
+
+ explicit initiate_async_buffered_handshake(stream* self)
+ : self_(self)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename BufferedHandshakeHandler, typename ConstBufferSequence>
+ void operator()(BufferedHandshakeHandler&& handler,
+ handshake_type type, const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your
+ // handler does not meet the documented type requirements for a
+ // BufferedHandshakeHandler.
+ ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK(
+ BufferedHandshakeHandler, handler) type_check;
+
+ asio::detail::non_const_lvalue<
+ BufferedHandshakeHandler> handler2(handler);
+ detail::async_io(self_->next_layer_, self_->core_,
+ detail::buffered_handshake_op<ConstBufferSequence>(type, buffers),
+ handler2.value);
+ }
+
+ private:
+ stream* self_;
+ };
+
+ class initiate_async_shutdown
+ {
+ public:
+ typedef typename stream::executor_type executor_type;
+
+ explicit initiate_async_shutdown(stream* self)
+ : self_(self)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ShutdownHandler>
+ void operator()(ShutdownHandler&& 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 ShutdownHandler.
+ ASIO_HANDSHAKE_HANDLER_CHECK(ShutdownHandler, handler) type_check;
+
+ asio::detail::non_const_lvalue<ShutdownHandler> handler2(handler);
+ detail::async_io(self_->next_layer_, self_->core_,
+ detail::shutdown_op(), handler2.value);
+ }
+
+ private:
+ stream* self_;
+ };
+
+ class initiate_async_write_some
+ {
+ public:
+ typedef typename stream::executor_type executor_type;
+
+ explicit initiate_async_write_some(stream* self)
+ : self_(self)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ asio::detail::non_const_lvalue<WriteHandler> handler2(handler);
+ detail::async_io(self_->next_layer_, self_->core_,
+ detail::write_op<ConstBufferSequence>(buffers), handler2.value);
+ }
+
+ private:
+ stream* self_;
+ };
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef typename stream::executor_type executor_type;
+
+ explicit initiate_async_read_some(stream* self)
+ : self_(self)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ asio::detail::non_const_lvalue<ReadHandler> handler2(handler);
+ detail::async_io(self_->next_layer_, self_->core_,
+ detail::read_op<MutableBufferSequence>(buffers), handler2.value);
+ }
+
+ private:
+ stream* self_;
+ };
-private:
Stream next_layer_;
detail::stream_core core_;
};
diff --git a/3rdparty/asio/include/asio/ssl/stream_base.hpp b/3rdparty/asio/include/asio/ssl/stream_base.hpp
index 275d3e3821e..2728ec8ca1b 100644
--- a/3rdparty/asio/include/asio/ssl/stream_base.hpp
+++ b/3rdparty/asio/include/asio/ssl/stream_base.hpp
@@ -2,7 +2,7 @@
// ssl/stream_base.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ssl/verify_context.hpp b/3rdparty/asio/include/asio/ssl/verify_context.hpp
index 560ffcc7ad8..7251856f08e 100644
--- a/3rdparty/asio/include/asio/ssl/verify_context.hpp
+++ b/3rdparty/asio/include/asio/ssl/verify_context.hpp
@@ -2,7 +2,7 @@
// ssl/verify_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ssl/verify_mode.hpp b/3rdparty/asio/include/asio/ssl/verify_mode.hpp
index 7a2bd5654c7..919e308c8a4 100644
--- a/3rdparty/asio/include/asio/ssl/verify_mode.hpp
+++ b/3rdparty/asio/include/asio/ssl/verify_mode.hpp
@@ -2,7 +2,7 @@
// ssl/verify_mode.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/static_thread_pool.hpp b/3rdparty/asio/include/asio/static_thread_pool.hpp
new file mode 100644
index 00000000000..636afe1cee5
--- /dev/null
+++ b/3rdparty/asio/include/asio/static_thread_pool.hpp
@@ -0,0 +1,31 @@
+//
+// static_thread_pool.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_STATIC_THREAD_POOL_HPP
+#define ASIO_STATIC_THREAD_POOL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/thread_pool.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+typedef thread_pool static_thread_pool;
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_STATIC_THREAD_POOL_HPP
diff --git a/3rdparty/asio/include/asio/steady_timer.hpp b/3rdparty/asio/include/asio/steady_timer.hpp
index 746ac04a81b..5db00250b71 100644
--- a/3rdparty/asio/include/asio/steady_timer.hpp
+++ b/3rdparty/asio/include/asio/steady_timer.hpp
@@ -2,7 +2,7 @@
// steady_timer.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#include "asio/basic_waitable_timer.hpp"
#include "asio/detail/chrono.hpp"
@@ -37,6 +34,4 @@ typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
} // namespace asio
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#endif // ASIO_STEADY_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/strand.hpp b/3rdparty/asio/include/asio/strand.hpp
index c70162ba387..c63592b8649 100644
--- a/3rdparty/asio/include/asio/strand.hpp
+++ b/3rdparty/asio/include/asio/strand.hpp
@@ -2,7 +2,7 @@
// strand.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,6 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/strand_executor_service.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_executor.hpp"
#include "asio/detail/push_options.hpp"
@@ -38,21 +41,27 @@ public:
*/
strand()
: executor_(),
- impl_(use_service<detail::strand_executor_service>(
- executor_.context()).create_implementation())
+ impl_(strand::create_implementation(executor_))
{
}
/// Construct a strand for the specified executor.
- explicit strand(const Executor& e)
+ template <typename Executor1>
+ explicit strand(const Executor1& e,
+ constraint_t<
+ conditional_t<
+ !is_same<Executor1, strand>::value,
+ is_convertible<Executor1, Executor>,
+ false_type
+ >::value
+ > = 0)
: executor_(e),
- impl_(use_service<detail::strand_executor_service>(
- executor_.context()).create_implementation())
+ impl_(strand::create_implementation(executor_))
{
}
/// Copy constructor.
- strand(const strand& other) ASIO_NOEXCEPT
+ strand(const strand& other) noexcept
: executor_(other.executor_),
impl_(other.impl_)
{
@@ -65,14 +74,14 @@ public:
*/
template <class OtherExecutor>
strand(
- const strand<OtherExecutor>& other) ASIO_NOEXCEPT
+ const strand<OtherExecutor>& other) noexcept
: executor_(other.executor_),
impl_(other.impl_)
{
}
/// Assignment operator.
- strand& operator=(const strand& other) ASIO_NOEXCEPT
+ strand& operator=(const strand& other) noexcept
{
executor_ = other.executor_;
impl_ = other.impl_;
@@ -86,18 +95,17 @@ public:
*/
template <class OtherExecutor>
strand& operator=(
- const strand<OtherExecutor>& other) ASIO_NOEXCEPT
+ const strand<OtherExecutor>& other) noexcept
{
executor_ = other.executor_;
impl_ = other.impl_;
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- strand(strand&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_)),
- impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_))
+ strand(strand&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
+ impl_(static_cast<implementation_type&&>(other.impl_))
{
}
@@ -107,17 +115,17 @@ public:
* to @c Executor.
*/
template <class OtherExecutor>
- strand(strand<OtherExecutor>&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(OtherExecutor)(other)),
- impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_))
+ strand(strand<OtherExecutor>&& other) noexcept
+ : executor_(static_cast<OtherExecutor&&>(other.executor_)),
+ impl_(static_cast<implementation_type&&>(other.impl_))
{
}
/// Move assignment operator.
- strand& operator=(strand&& other) ASIO_NOEXCEPT
+ strand& operator=(strand&& other) noexcept
{
- executor_ = ASIO_MOVE_CAST(Executor)(other);
- impl_ = ASIO_MOVE_CAST(implementation_type)(other.impl_);
+ executor_ = static_cast<Executor&&>(other.executor_);
+ impl_ = static_cast<implementation_type&&>(other.impl_);
return *this;
}
@@ -127,28 +135,97 @@ public:
* convertible to @c Executor.
*/
template <class OtherExecutor>
- strand& operator=(
- const strand<OtherExecutor>&& other) ASIO_NOEXCEPT
+ strand& operator=(strand<OtherExecutor>&& other) noexcept
{
- executor_ = ASIO_MOVE_CAST(OtherExecutor)(other);
- impl_ = ASIO_MOVE_CAST(implementation_type)(other.impl_);
+ executor_ = static_cast<OtherExecutor&&>(other.executor_);
+ impl_ = static_cast<implementation_type&&>(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
- ~strand()
+ ~strand() noexcept
{
}
/// Obtain the underlying executor.
- inner_executor_type get_inner_executor() const ASIO_NOEXCEPT
+ inner_executor_type get_inner_executor() const noexcept
{
return executor_;
}
+ /// Forward a query to the underlying executor.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::strand<my_executor_type> ex = ...;
+ * if (asio::query(ex, asio::execution::blocking)
+ * == asio::execution::blocking.never)
+ * ... @endcode
+ */
+ template <typename Property>
+ constraint_t<
+ can_query<const Executor&, Property>::value,
+ conditional_t<
+ is_convertible<Property, execution::blocking_t>::value,
+ execution::blocking_t,
+ query_result_t<const Executor&, Property>
+ >
+ > query(const Property& p) const
+ noexcept(is_nothrow_query<const Executor&, Property>::value)
+ {
+ return this->query_helper(
+ is_convertible<Property, execution::blocking_t>(), p);
+ }
+
+ /// Forward a requirement to the underlying executor.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::strand<my_executor_type> ex1 = ...;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.never); @endcode
+ */
+ template <typename Property>
+ constraint_t<
+ can_require<const Executor&, Property>::value
+ && !is_convertible<Property, execution::blocking_t::always_t>::value,
+ strand<decay_t<require_result_t<const Executor&, Property>>>
+ > require(const Property& p) const
+ noexcept(is_nothrow_require<const Executor&, Property>::value)
+ {
+ return strand<decay_t<require_result_t<const Executor&, Property>>>(
+ asio::require(executor_, p), impl_);
+ }
+
+ /// Forward a preference to the underlying executor.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::prefer customisation point.
+ *
+ * For example:
+ * @code asio::strand<my_executor_type> ex1 = ...;
+ * auto ex2 = asio::prefer(ex1,
+ * asio::execution::blocking.never); @endcode
+ */
+ template <typename Property>
+ constraint_t<
+ can_prefer<const Executor&, Property>::value
+ && !is_convertible<Property, execution::blocking_t::always_t>::value,
+ strand<decay_t<prefer_result_t<const Executor&, Property>>>
+ > prefer(const Property& p) const
+ noexcept(is_nothrow_prefer<const Executor&, Property>::value)
+ {
+ return strand<decay_t<prefer_result_t<const Executor&, Property>>>(
+ asio::prefer(executor_, p), impl_);
+ }
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
/// Obtain the underlying execution context.
- execution_context& context() ASIO_NOEXCEPT
+ execution_context& context() const noexcept
{
return executor_.context();
}
@@ -157,7 +234,7 @@ public:
/**
* The strand delegates this call to its underlying executor.
*/
- void on_work_started() ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
executor_.on_work_started();
}
@@ -166,11 +243,33 @@ public:
/**
* The strand delegates this call to its underlying executor.
*/
- void on_work_finished() ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
executor_.on_work_finished();
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+ /// Request the strand to invoke the given function object.
+ /**
+ * This function is used to ask the strand to execute the given function
+ * object on its underlying executor. The function object will be executed
+ * according to the properties of the underlying executor.
+ *
+ * @param f The function object to be called. The executor will make
+ * a copy of the handler object as required. The function signature of the
+ * function object must be: @code void function(); @endcode
+ */
+ template <typename Function>
+ constraint_t<
+ traits::execute_member<const Executor&, Function>::is_valid,
+ void
+ > execute(Function&& f) const
+ {
+ detail::strand_executor_service::execute(impl_,
+ executor_, static_cast<Function&&>(f));
+ }
+#if !defined(ASIO_NO_TS_EXECUTORS)
/// Request the strand to invoke the given function object.
/**
* This function is used to ask the strand to execute the given function
@@ -187,10 +286,10 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a)
+ void dispatch(Function&& f, const Allocator& a) const
{
detail::strand_executor_service::dispatch(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f), a);
+ executor_, static_cast<Function&&>(f), a);
}
/// Request the strand to invoke the given function object.
@@ -207,10 +306,10 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a)
+ void post(Function&& f, const Allocator& a) const
{
detail::strand_executor_service::post(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f), a);
+ executor_, static_cast<Function&&>(f), a);
}
/// Request the strand to invoke the given function object.
@@ -227,11 +326,12 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a)
+ void defer(Function&& f, const Allocator& a) const
{
detail::strand_executor_service::defer(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f), a);
+ executor_, static_cast<Function&&>(f), a);
}
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
/// Determine whether the strand is running in the current thread.
/**
@@ -239,7 +339,7 @@ public:
* submitted to the strand using post(), dispatch() or defer(). Otherwise
* returns @c false.
*/
- bool running_in_this_thread() const ASIO_NOEXCEPT
+ bool running_in_this_thread() const noexcept
{
return detail::strand_executor_service::running_in_this_thread(impl_);
}
@@ -249,7 +349,7 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator==(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator==(const strand& a, const strand& b) noexcept
{
return a.impl_ == b.impl_;
}
@@ -259,18 +359,189 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator!=(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator!=(const strand& a, const strand& b) noexcept
{
return a.impl_ != b.impl_;
}
+#if defined(GENERATING_DOCUMENTATION)
private:
- Executor executor_;
+#endif // defined(GENERATING_DOCUMENTATION)
typedef detail::strand_executor_service::implementation_type
implementation_type;
+
+ template <typename InnerExecutor>
+ static implementation_type create_implementation(const InnerExecutor& ex,
+ constraint_t<
+ can_query<InnerExecutor, execution::context_t>::value
+ > = 0)
+ {
+ return use_service<detail::strand_executor_service>(
+ asio::query(ex, execution::context)).create_implementation();
+ }
+
+ template <typename InnerExecutor>
+ static implementation_type create_implementation(const InnerExecutor& ex,
+ constraint_t<
+ !can_query<InnerExecutor, execution::context_t>::value
+ > = 0)
+ {
+ return use_service<detail::strand_executor_service>(
+ ex.context()).create_implementation();
+ }
+
+ strand(const Executor& ex, const implementation_type& impl)
+ : executor_(ex),
+ impl_(impl)
+ {
+ }
+
+ template <typename Property>
+ query_result_t<const Executor&, Property> query_helper(
+ false_type, const Property& property) const
+ {
+ return asio::query(executor_, property);
+ }
+
+ template <typename Property>
+ execution::blocking_t query_helper(true_type, const Property& property) const
+ {
+ execution::blocking_t result = asio::query(executor_, property);
+ return result == execution::blocking.always
+ ? execution::blocking.possibly : result;
+ }
+
+ Executor executor_;
implementation_type impl_;
};
+/** @defgroup make_strand asio::make_strand
+ *
+ * @brief The asio::make_strand function creates a @ref strand object for
+ * an executor or execution context.
+ */
+/*@{*/
+
+/// Create a @ref strand object for an executor.
+/**
+ * @param ex An executor.
+ *
+ * @returns A strand constructed with the specified executor.
+ */
+template <typename Executor>
+inline strand<Executor> make_strand(const Executor& ex,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+{
+ return strand<Executor>(ex);
+}
+
+/// Create a @ref strand object for an execution context.
+/**
+ * @param ctx An execution context, from which an executor will be obtained.
+ *
+ * @returns A strand constructed with the execution context's executor, obtained
+ * by performing <tt>ctx.get_executor()</tt>.
+ */
+template <typename ExecutionContext>
+inline strand<typename ExecutionContext::executor_type>
+make_strand(ExecutionContext& ctx,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+{
+ return strand<typename ExecutionContext::executor_type>(ctx.get_executor());
+}
+
+/*@}*/
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename Executor>
+struct equality_comparable<strand<Executor>>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Executor, typename Function>
+struct execute_member<strand<Executor>, Function,
+ enable_if_t<
+ traits::execute_member<const Executor&, Function>::is_valid
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct query_member<strand<Executor>, Property,
+ enable_if_t<
+ can_query<const Executor&, Property>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<Executor, Property>::value;
+ typedef conditional_t<
+ is_convertible<Property, execution::blocking_t>::value,
+ execution::blocking_t, query_result_t<Executor, Property>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct require_member<strand<Executor>, Property,
+ enable_if_t<
+ can_require<const Executor&, Property>::value
+ && !is_convertible<Property, execution::blocking_t::always_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<Executor, Property>::value;
+ typedef strand<decay_t<require_result_t<Executor, Property>>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename Executor, typename Property>
+struct prefer_member<strand<Executor>, Property,
+ enable_if_t<
+ can_prefer<const Executor&, Property>::value
+ && !is_convertible<Property, execution::blocking_t::always_t>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<Executor, Property>::value;
+ typedef strand<decay_t<prefer_result_t<Executor, Property>>> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/stream_file.hpp b/3rdparty/asio/include/asio/stream_file.hpp
new file mode 100644
index 00000000000..ef059a987e5
--- /dev/null
+++ b/3rdparty/asio/include/asio/stream_file.hpp
@@ -0,0 +1,35 @@
+//
+// stream_file.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_STREAM_FILE_HPP
+#define ASIO_STREAM_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_stream_file.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a stream-oriented file.
+typedef basic_stream_file<> stream_file;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_STREAM_FILE_HPP
diff --git a/3rdparty/asio/include/asio/stream_socket_service.hpp b/3rdparty/asio/include/asio/stream_socket_service.hpp
deleted file mode 100644
index 5cea56533d8..00000000000
--- a/3rdparty/asio/include/asio/stream_socket_service.hpp
+++ /dev/null
@@ -1,401 +0,0 @@
-//
-// stream_socket_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_STREAM_SOCKET_SERVICE_HPP
-#define ASIO_STREAM_SOCKET_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/winrt_ssocket_service.hpp"
-#elif defined(ASIO_HAS_IOCP)
-# include "asio/detail/win_iocp_socket_service.hpp"
-#else
-# include "asio/detail/reactive_socket_service.hpp"
-#endif
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a stream socket.
-template <typename Protocol>
-class stream_socket_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<stream_socket_service<Protocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef Protocol protocol_type;
-
- /// The endpoint type.
- typedef typename Protocol::endpoint endpoint_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(ASIO_WINDOWS_RUNTIME)
- typedef detail::winrt_ssocket_service<Protocol> service_impl_type;
-#elif defined(ASIO_HAS_IOCP)
- typedef detail::win_iocp_socket_service<Protocol> service_impl_type;
-#else
- typedef detail::reactive_socket_service<Protocol> service_impl_type;
-#endif
-
-public:
- /// The type of a stream socket implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native socket type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef typename service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new stream socket service for the specified io_context.
- explicit stream_socket_service(asio::io_context& io_context)
- : asio::detail::service_base<
- stream_socket_service<Protocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new stream socket implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new stream socket implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another stream socket implementation.
- void move_assign(implementation_type& impl,
- stream_socket_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-
- /// Move-construct a new stream socket implementation from another protocol
- /// type.
- template <typename Protocol1>
- void converting_move_construct(implementation_type& impl,
- typename stream_socket_service<
- Protocol1>::implementation_type& other_impl,
- typename enable_if<is_convertible<
- Protocol1, Protocol>::value>::type* = 0)
- {
- service_impl_.template converting_move_construct<Protocol1>(
- impl, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a stream socket implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Open a stream socket.
- ASIO_SYNC_OP_VOID open(implementation_type& impl,
- const protocol_type& protocol, asio::error_code& ec)
- {
- if (protocol.type() == ASIO_OS_DEF(SOCK_STREAM))
- service_impl_.open(impl, protocol, ec);
- else
- ec = asio::error::invalid_argument;
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Assign an existing native socket to a stream socket.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const protocol_type& protocol, const native_handle_type& native_socket,
- asio::error_code& ec)
- {
- service_impl_.assign(impl, protocol, native_socket, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a stream socket implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native socket implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the socket.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the socket is at the out-of-band data mark.
- bool at_mark(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.at_mark(impl, ec);
- }
-
- /// Determine the number of bytes available for reading.
- std::size_t available(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.available(impl, ec);
- }
-
- /// Bind the stream socket to the specified local endpoint.
- ASIO_SYNC_OP_VOID bind(implementation_type& impl,
- const endpoint_type& endpoint, asio::error_code& ec)
- {
- service_impl_.bind(impl, endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Connect the stream socket to the specified endpoint.
- ASIO_SYNC_OP_VOID connect(implementation_type& impl,
- const endpoint_type& peer_endpoint, asio::error_code& ec)
- {
- service_impl_.connect(impl, peer_endpoint, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous connect.
- template <typename ConnectHandler>
- ASIO_INITFN_RESULT_TYPE(ConnectHandler,
- void (asio::error_code))
- async_connect(implementation_type& impl,
- const endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(ConnectHandler) handler)
- {
- async_completion<ConnectHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_connect(impl, peer_endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Set a socket option.
- template <typename SettableSocketOption>
- ASIO_SYNC_OP_VOID set_option(implementation_type& impl,
- const SettableSocketOption& option, asio::error_code& ec)
- {
- service_impl_.set_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get a socket option.
- template <typename GettableSocketOption>
- ASIO_SYNC_OP_VOID get_option(const implementation_type& impl,
- GettableSocketOption& option, asio::error_code& ec) const
- {
- service_impl_.get_option(impl, option, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform an IO control command on the socket.
- template <typename IoControlCommand>
- ASIO_SYNC_OP_VOID io_control(implementation_type& impl,
- IoControlCommand& command, asio::error_code& ec)
- {
- service_impl_.io_control(impl, command, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the socket.
- bool non_blocking(const implementation_type& impl) const
- {
- return service_impl_.non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the socket.
- ASIO_SYNC_OP_VOID non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Gets the non-blocking mode of the native socket implementation.
- bool native_non_blocking(const implementation_type& impl) const
- {
- return service_impl_.native_non_blocking(impl);
- }
-
- /// Sets the non-blocking mode of the native socket implementation.
- ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl,
- bool mode, asio::error_code& ec)
- {
- service_impl_.native_non_blocking(impl, mode, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the local endpoint.
- endpoint_type local_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.local_endpoint(impl, ec);
- }
-
- /// Get the remote endpoint.
- endpoint_type remote_endpoint(const implementation_type& impl,
- asio::error_code& ec) const
- {
- return service_impl_.remote_endpoint(impl, ec);
- }
-
- /// Disable sends or receives on the socket.
- ASIO_SYNC_OP_VOID shutdown(implementation_type& impl,
- socket_base::shutdown_type what, asio::error_code& ec)
- {
- service_impl_.shutdown(impl, what, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Wait for the socket to become ready to read, ready to write, or to have
- /// pending error conditions.
- ASIO_SYNC_OP_VOID wait(implementation_type& impl,
- socket_base::wait_type w, asio::error_code& ec)
- {
- service_impl_.wait(impl, w, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously wait for the socket to become ready to read, ready to
- /// write, or to have pending error conditions.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl, socket_base::wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, w, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Send the given data to the peer.
- template <typename ConstBufferSequence>
- std::size_t send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.send(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous send.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(implementation_type& impl,
- const ConstBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_send(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Receive some data from the peer.
- template <typename MutableBufferSequence>
- std::size_t receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags, asio::error_code& ec)
- {
- return service_impl_.receive(impl, buffers, flags, ec);
- }
-
- /// Start an asynchronous receive.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(implementation_type& impl,
- const MutableBufferSequence& buffers,
- socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_receive(impl, buffers, flags, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_STREAM_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/streambuf.hpp b/3rdparty/asio/include/asio/streambuf.hpp
index 8e613e9de91..d7745245cb8 100644
--- a/3rdparty/asio/include/asio/streambuf.hpp
+++ b/3rdparty/asio/include/asio/streambuf.hpp
@@ -2,7 +2,7 @@
// streambuf.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/system_context.hpp b/3rdparty/asio/include/asio/system_context.hpp
new file mode 100644
index 00000000000..132ce615677
--- /dev/null
+++ b/3rdparty/asio/include/asio/system_context.hpp
@@ -0,0 +1,90 @@
+//
+// system_context.hpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_SYSTEM_CONTEXT_HPP
+#define ASIO_SYSTEM_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/scheduler.hpp"
+#include "asio/detail/thread_group.hpp"
+#include "asio/execution.hpp"
+#include "asio/execution_context.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+template <typename Blocking, typename Relationship, typename Allocator>
+class basic_system_executor;
+
+/// The executor context for the system executor.
+class system_context : public execution_context
+{
+public:
+ /// The executor type associated with the context.
+ typedef basic_system_executor<
+ execution::blocking_t::possibly_t,
+ execution::relationship_t::fork_t,
+ std::allocator<void>
+ > executor_type;
+
+ /// Destructor shuts down all threads in the system thread pool.
+ ASIO_DECL ~system_context();
+
+ /// Obtain an executor for the context.
+ executor_type get_executor() noexcept;
+
+ /// Signal all threads in the system thread pool to stop.
+ ASIO_DECL void stop();
+
+ /// Determine whether the system thread pool has been stopped.
+ ASIO_DECL bool stopped() const noexcept;
+
+ /// Join all threads in the system thread pool.
+ ASIO_DECL void join();
+
+#if defined(GENERATING_DOCUMENTATION)
+private:
+#endif // defined(GENERATING_DOCUMENTATION)
+ // Constructor creates all threads in the system thread pool.
+ ASIO_DECL system_context();
+
+private:
+ template <typename, typename, typename> friend class basic_system_executor;
+
+ struct thread_function;
+
+ // Helper function to create the underlying scheduler.
+ ASIO_DECL detail::scheduler& add_scheduler(detail::scheduler* s);
+
+ // The underlying scheduler.
+ detail::scheduler& scheduler_;
+
+ // The threads in the system thread pool.
+ detail::thread_group threads_;
+
+ // The number of threads in the pool.
+ std::size_t num_threads_;
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/system_context.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/system_context.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_SYSTEM_CONTEXT_HPP
diff --git a/3rdparty/asio/include/asio/system_error.hpp b/3rdparty/asio/include/asio/system_error.hpp
index 6c7a1e1424d..d7f932627bd 100644
--- a/3rdparty/asio/include/asio/system_error.hpp
+++ b/3rdparty/asio/include/asio/system_error.hpp
@@ -2,7 +2,7 @@
// system_error.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,114 +16,14 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <system_error>
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <cerrno>
-# include <exception>
-# include <string>
-# include "asio/error_code.hpp"
-# include "asio/detail/scoped_ptr.hpp"
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
+#include <system_error>
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
typedef std::system_error system_error;
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-/// The system_error class is used to represent system conditions that
-/// prevent the library from operating correctly.
-class system_error
- : public std::exception
-{
-public:
- /// Construct with an error code.
- system_error(const error_code& ec)
- : code_(ec),
- context_()
- {
- }
-
- /// Construct with an error code and context.
- system_error(const error_code& ec, const std::string& context)
- : code_(ec),
- context_(context)
- {
- }
-
- /// Copy constructor.
- system_error(const system_error& other)
- : std::exception(other),
- code_(other.code_),
- context_(other.context_),
- what_()
- {
- }
-
- /// Destructor.
- virtual ~system_error() throw ()
- {
- }
-
- /// Assignment operator.
- system_error& operator=(const system_error& e)
- {
- context_ = e.context_;
- code_ = e.code_;
- what_.reset();
- return *this;
- }
-
- /// Get a string representation of the exception.
- virtual const char* what() const throw ()
- {
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- {
- if (!what_.get())
- {
- std::string tmp(context_);
- if (tmp.length())
- tmp += ": ";
- tmp += code_.message();
- what_.reset(new std::string(tmp));
- }
- return what_->c_str();
- }
-#if !defined(ASIO_NO_EXCEPTIONS)
- catch (std::exception&)
- {
- return "system_error";
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- }
-
- /// Get the error code associated with the exception.
- error_code code() const
- {
- return code_;
- }
-
-private:
- // The code associated with the error.
- error_code code_;
-
- // The context associated with the error.
- std::string context_;
-
- // The string representation of the error.
- mutable asio::detail::scoped_ptr<std::string> what_;
-};
-
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/system_executor.hpp b/3rdparty/asio/include/asio/system_executor.hpp
index f23e35f04b6..19b6d30e322 100644
--- a/3rdparty/asio/include/asio/system_executor.hpp
+++ b/3rdparty/asio/include/asio/system_executor.hpp
@@ -2,7 +2,7 @@
// system_executor.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,32 +16,321 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/detail/scheduler.hpp"
-#include "asio/detail/thread_group.hpp"
-#include "asio/execution_context.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/execution.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+class system_context;
+
/// An executor that uses arbitrary threads.
/**
* The system executor represents an execution context where functions are
- * permitted to run on arbitrary threads. The post() and defer() functions
- * schedule the function to run on an unspecified system thread pool, and
- * dispatch() invokes the function immediately.
+ * permitted to run on arbitrary threads. When the blocking.never property is
+ * established, the system executor will schedule the function to run on an
+ * unspecified system thread pool. When either blocking.possibly or
+ * blocking.always is established, the executor invokes the function
+ * immediately.
*/
-class system_executor
+template <typename Blocking, typename Relationship, typename Allocator>
+class basic_system_executor
{
public:
+ /// Default constructor.
+ basic_system_executor() noexcept
+ : allocator_(Allocator())
+ {
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ friend struct asio_require_fn::impl;
+ friend struct asio_prefer_fn::impl;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Obtain an executor with the @c blocking.possibly property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.possibly); @endcode
+ */
+ basic_system_executor<execution::blocking_t::possibly_t,
+ Relationship, Allocator>
+ require(execution::blocking_t::possibly_t) const
+ {
+ return basic_system_executor<execution::blocking_t::possibly_t,
+ Relationship, Allocator>(allocator_);
+ }
+
+ /// Obtain an executor with the @c blocking.always property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.always); @endcode
+ */
+ basic_system_executor<execution::blocking_t::always_t,
+ Relationship, Allocator>
+ require(execution::blocking_t::always_t) const
+ {
+ return basic_system_executor<execution::blocking_t::always_t,
+ Relationship, Allocator>(allocator_);
+ }
+
+ /// Obtain an executor with the @c blocking.never property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.never); @endcode
+ */
+ basic_system_executor<execution::blocking_t::never_t,
+ Relationship, Allocator>
+ require(execution::blocking_t::never_t) const
+ {
+ return basic_system_executor<execution::blocking_t::never_t,
+ Relationship, Allocator>(allocator_);
+ }
+
+ /// Obtain an executor with the @c relationship.continuation property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::relationship.continuation); @endcode
+ */
+ basic_system_executor<Blocking,
+ execution::relationship_t::continuation_t, Allocator>
+ require(execution::relationship_t::continuation_t) const
+ {
+ return basic_system_executor<Blocking,
+ execution::relationship_t::continuation_t, Allocator>(allocator_);
+ }
+
+ /// Obtain an executor with the @c relationship.fork property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::relationship.fork); @endcode
+ */
+ basic_system_executor<Blocking,
+ execution::relationship_t::fork_t, Allocator>
+ require(execution::relationship_t::fork_t) const
+ {
+ return basic_system_executor<Blocking,
+ execution::relationship_t::fork_t, Allocator>(allocator_);
+ }
+
+ /// Obtain an executor with the specified @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::allocator(my_allocator)); @endcode
+ */
+ template <typename OtherAllocator>
+ basic_system_executor<Blocking, Relationship, OtherAllocator>
+ require(execution::allocator_t<OtherAllocator> a) const
+ {
+ return basic_system_executor<Blocking,
+ Relationship, OtherAllocator>(a.value());
+ }
+
+ /// Obtain an executor with the default @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex1;
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::allocator); @endcode
+ */
+ basic_system_executor<Blocking, Relationship, std::allocator<void>>
+ require(execution::allocator_t<void>) const
+ {
+ return basic_system_executor<Blocking,
+ Relationship, std::allocator<void>>();
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ friend struct asio_query_fn::impl;
+ friend struct asio::execution::detail::blocking_t<0>;
+ friend struct asio::execution::detail::mapping_t<0>;
+ friend struct asio::execution::detail::outstanding_work_t<0>;
+ friend struct asio::execution::detail::relationship_t<0>;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Query the current value of the @c mapping property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * if (asio::query(ex, asio::execution::mapping)
+ * == asio::execution::mapping.thread)
+ * ... @endcode
+ */
+ static constexpr execution::mapping_t query(
+ execution::mapping_t) noexcept
+ {
+ return execution::mapping.thread;
+ }
+
+ /// Query the current value of the @c context property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * asio::system_context& pool = asio::query(
+ * ex, asio::execution::context); @endcode
+ */
+ static system_context& query(execution::context_t) noexcept;
+
+ /// Query the current value of the @c blocking property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * if (asio::query(ex, asio::execution::blocking)
+ * == asio::execution::blocking.always)
+ * ... @endcode
+ */
+ static constexpr execution::blocking_t query(
+ execution::blocking_t) noexcept
+ {
+ return Blocking();
+ }
+
+ /// Query the current value of the @c relationship property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * if (asio::query(ex, asio::execution::relationship)
+ * == asio::execution::relationship.continuation)
+ * ... @endcode
+ */
+ static constexpr execution::relationship_t query(
+ execution::relationship_t) noexcept
+ {
+ return Relationship();
+ }
+
+ /// Query the current value of the @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * auto alloc = asio::query(ex,
+ * asio::execution::allocator); @endcode
+ */
+ template <typename OtherAllocator>
+ constexpr Allocator query(
+ execution::allocator_t<OtherAllocator>) const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Query the current value of the @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * auto alloc = asio::query(ex,
+ * asio::execution::allocator); @endcode
+ */
+ constexpr Allocator query(
+ execution::allocator_t<void>) const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Query the occupancy (recommended number of work items) for the system
+ /// context.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code asio::system_executor ex;
+ * std::size_t occupancy = asio::query(
+ * ex, asio::execution::occupancy); @endcode
+ */
+ std::size_t query(execution::occupancy_t) const noexcept;
+
+public:
+ /// Compare two executors for equality.
+ /**
+ * Two executors are equal if they refer to the same underlying io_context.
+ */
+ friend bool operator==(const basic_system_executor&,
+ const basic_system_executor&) noexcept
+ {
+ return true;
+ }
+
+ /// Compare two executors for inequality.
+ /**
+ * Two executors are equal if they refer to the same underlying io_context.
+ */
+ friend bool operator!=(const basic_system_executor&,
+ const basic_system_executor&) noexcept
+ {
+ return false;
+ }
+
+ /// Execution function.
+ template <typename Function>
+ void execute(Function&& f) const
+ {
+ this->do_execute(static_cast<Function&&>(f), Blocking());
+ }
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+public:
/// Obtain the underlying execution context.
- execution_context& context() const ASIO_NOEXCEPT;
+ system_context& context() const noexcept;
/// Inform the executor that it has some outstanding work to do.
/**
* For the system executor, this is a no-op.
*/
- void on_work_started() const ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
}
@@ -49,7 +338,7 @@ public:
/**
* For the system executor, this is a no-op.
*/
- void on_work_finished() const ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
}
@@ -65,8 +354,8 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void dispatch(Function&& f, const OtherAllocator& a) const;
/// Request the system executor to invoke the given function object.
/**
@@ -81,8 +370,8 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void post(Function&& f, const OtherAllocator& a) const;
/// Request the system executor to invoke the given function object.
/**
@@ -97,57 +386,286 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void defer(Function&& f, const OtherAllocator& a) const;
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
- /// Compare two executors for equality.
- /**
- * System executors always compare equal.
- */
- friend bool operator==(const system_executor&,
- const system_executor&) ASIO_NOEXCEPT
+private:
+ template <typename, typename, typename> friend class basic_system_executor;
+
+ // Constructor used by require().
+ basic_system_executor(const Allocator& a)
+ : allocator_(a)
{
- return true;
}
- /// Compare two executors for inequality.
- /**
- * System executors always compare equal.
- */
- friend bool operator!=(const system_executor&,
- const system_executor&) ASIO_NOEXCEPT
+ /// Execution helper implementation for the possibly blocking property.
+ template <typename Function>
+ void do_execute(Function&& f,
+ execution::blocking_t::possibly_t) const;
+
+ /// Execution helper implementation for the always blocking property.
+ template <typename Function>
+ void do_execute(Function&& f,
+ execution::blocking_t::always_t) const;
+
+ /// Execution helper implementation for the never blocking property.
+ template <typename Function>
+ void do_execute(Function&& f,
+ execution::blocking_t::never_t) const;
+
+ // The allocator used for execution functions.
+ Allocator allocator_;
+};
+
+/// An executor that uses arbitrary threads.
+/**
+ * The system executor represents an execution context where functions are
+ * permitted to run on arbitrary threads. When the blocking.never property is
+ * established, the system executor will schedule the function to run on an
+ * unspecified system thread pool. When either blocking.possibly or
+ * blocking.always is established, the executor invokes the function
+ * immediately.
+ */
+typedef basic_system_executor<execution::blocking_t::possibly_t,
+ execution::relationship_t::fork_t, std::allocator<void>>
+ system_executor;
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct equality_comparable<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Blocking, typename Relationship,
+ typename Allocator, typename Function>
+struct execute_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ Function
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::blocking_t::possibly_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<
+ asio::execution::blocking_t::possibly_t,
+ Relationship, Allocator> result_type;
+};
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::blocking_t::always_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<
+ asio::execution::blocking_t::always_t,
+ Relationship, Allocator> result_type;
+};
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::blocking_t::never_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<
+ asio::execution::blocking_t::never_t,
+ Relationship, Allocator> result_type;
+};
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::relationship_t::fork_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<Blocking,
+ asio::execution::relationship_t::fork_t,
+ Allocator> result_type;
+};
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::relationship_t::continuation_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<Blocking,
+ asio::execution::relationship_t::continuation_t,
+ Allocator> result_type;
+};
+
+template <typename Blocking, typename Relationship, typename Allocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::allocator_t<void>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<Blocking,
+ Relationship, std::allocator<void>> result_type;
+};
+
+template <typename Blocking, typename Relationship,
+ typename Allocator, typename OtherAllocator>
+struct require_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::allocator_t<OtherAllocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::basic_system_executor<Blocking,
+ Relationship, OtherAllocator> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Blocking, typename Relationship,
+ typename Allocator, typename Property>
+struct query_static_constexpr_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::mapping_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::mapping_t::thread_t result_type;
+
+ static constexpr result_type value() noexcept
{
- return false;
+ return result_type();
}
+};
-private:
- struct thread_function;
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
- // Hidden implementation of the system execution context.
- struct context_impl
- : public execution_context
- {
- // Constructor creates all threads in the system thread pool.
- ASIO_DECL context_impl();
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Blocking, typename Relationship,
+ typename Allocator, typename Property>
+struct query_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::blocking_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::blocking_t result_type;
+};
- // Destructor shuts down all threads in the system thread pool.
- ASIO_DECL ~context_impl();
+template <typename Blocking, typename Relationship,
+ typename Allocator, typename Property>
+struct query_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::relationship_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::relationship_t result_type;
+};
- // The underlying scheduler.
- detail::scheduler& scheduler_;
+template <typename Blocking, typename Relationship, typename Allocator>
+struct query_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::context_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::system_context& result_type;
+};
- // The threads in the system thread pool.
- detail::thread_group threads_;
- };
+template <typename Blocking, typename Relationship, typename Allocator>
+struct query_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::allocator_t<void>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Allocator result_type;
};
+template <typename Blocking, typename Relationship, typename Allocator>
+struct query_member<
+ asio::basic_system_executor<Blocking, Relationship, Allocator>,
+ asio::execution::allocator_t<Allocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Allocator result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
#include "asio/impl/system_executor.hpp"
-#if defined(ASIO_HEADER_ONLY)
-# include "asio/impl/system_executor.ipp"
-#endif // defined(ASIO_HEADER_ONLY)
#endif // ASIO_SYSTEM_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/system_timer.hpp b/3rdparty/asio/include/asio/system_timer.hpp
index d28e92c2dd4..7b5e768032f 100644
--- a/3rdparty/asio/include/asio/system_timer.hpp
+++ b/3rdparty/asio/include/asio/system_timer.hpp
@@ -2,7 +2,7 @@
// system_timer.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#include "asio/basic_waitable_timer.hpp"
#include "asio/detail/chrono.hpp"
@@ -37,6 +34,4 @@ typedef basic_waitable_timer<chrono::system_clock> system_timer;
} // namespace asio
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#endif // ASIO_SYSTEM_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/this_coro.hpp b/3rdparty/asio/include/asio/this_coro.hpp
new file mode 100644
index 00000000000..37381b92abf
--- /dev/null
+++ b/3rdparty/asio/include/asio/this_coro.hpp
@@ -0,0 +1,267 @@
+//
+// this_coro.hpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_THIS_CORO_HPP
+#define ASIO_THIS_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace this_coro {
+
+/// Awaitable type that returns the executor of the current coroutine.
+struct executor_t
+{
+ constexpr executor_t()
+ {
+ }
+};
+
+/// Awaitable object that returns the executor of the current coroutine.
+constexpr executor_t executor;
+
+/// Awaitable type that returns the cancellation state of the current coroutine.
+struct cancellation_state_t
+{
+ constexpr cancellation_state_t()
+ {
+ }
+};
+
+/// Awaitable object that returns the cancellation state of the current
+/// coroutine.
+/**
+ * @par Example
+ * @code asio::awaitable<void> my_coroutine()
+ * {
+ * asio::cancellation_state cs
+ * = co_await asio::this_coro::cancellation_state;
+ *
+ * // ...
+ *
+ * if (cs.cancelled() != asio::cancellation_type::none)
+ * // ...
+ * } @endcode
+ */
+constexpr cancellation_state_t cancellation_state;
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// Returns an awaitable object that may be used to reset the cancellation state
+/// of the current coroutine.
+/**
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref co_spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as
+ * <tt>S(P)</tt>, into the current coroutine's cancellation state object.
+ *
+ * @par Example
+ * @code asio::awaitable<void> my_coroutine()
+ * {
+ * co_await asio::this_coro::reset_cancellation_state();
+ *
+ * // ...
+ * } @endcode
+ *
+ * @note The cancellation state is shared by all coroutines in the same "thread
+ * of execution" that was created using asio::co_spawn.
+ */
+ASIO_NODISCARD constexpr unspecified
+reset_cancellation_state();
+
+/// Returns an awaitable object that may be used to reset the cancellation state
+/// of the current coroutine.
+/**
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref co_spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
+ * std::forward<Filter>(filter))</tt>, into the current coroutine's
+ * cancellation state object.
+ *
+ * @par Example
+ * @code asio::awaitable<void> my_coroutine()
+ * {
+ * co_await asio::this_coro::reset_cancellation_state(
+ * asio::enable_partial_cancellation());
+ *
+ * // ...
+ * } @endcode
+ *
+ * @note The cancellation state is shared by all coroutines in the same "thread
+ * of execution" that was created using asio::co_spawn.
+ */
+template <typename Filter>
+ASIO_NODISCARD constexpr unspecified
+reset_cancellation_state(Filter&& filter);
+
+/// Returns an awaitable object that may be used to reset the cancellation state
+/// of the current coroutine.
+/**
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref co_spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
+ * std::forward<InFilter>(in_filter),
+ * std::forward<OutFilter>(out_filter))</tt>, into the current coroutine's
+ * cancellation state object.
+ *
+ * @par Example
+ * @code asio::awaitable<void> my_coroutine()
+ * {
+ * co_await asio::this_coro::reset_cancellation_state(
+ * asio::enable_partial_cancellation(),
+ * asio::disable_cancellation());
+ *
+ * // ...
+ * } @endcode
+ *
+ * @note The cancellation state is shared by all coroutines in the same "thread
+ * of execution" that was created using asio::co_spawn.
+ */
+template <typename InFilter, typename OutFilter>
+ASIO_NODISCARD constexpr unspecified
+reset_cancellation_state(
+ InFilter&& in_filter,
+ OutFilter&& out_filter);
+
+/// Returns an awaitable object that may be used to determine whether the
+/// coroutine throws if trying to suspend when it has been cancelled.
+/**
+ * @par Example
+ * @code asio::awaitable<void> my_coroutine()
+ * {
+ * if (co_await asio::this_coro::throw_if_cancelled)
+ * // ...
+ *
+ * // ...
+ * } @endcode
+ */
+ASIO_NODISCARD constexpr unspecified
+throw_if_cancelled();
+
+/// Returns an awaitable object that may be used to specify whether the
+/// coroutine throws if trying to suspend when it has been cancelled.
+/**
+ * @par Example
+ * @code asio::awaitable<void> my_coroutine()
+ * {
+ * co_await asio::this_coro::throw_if_cancelled(false);
+ *
+ * // ...
+ * } @endcode
+ */
+ASIO_NODISCARD constexpr unspecified
+throw_if_cancelled(bool value);
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+struct reset_cancellation_state_0_t
+{
+ constexpr reset_cancellation_state_0_t()
+ {
+ }
+};
+
+ASIO_NODISCARD inline constexpr reset_cancellation_state_0_t
+reset_cancellation_state()
+{
+ return reset_cancellation_state_0_t();
+}
+
+template <typename Filter>
+struct reset_cancellation_state_1_t
+{
+ template <typename F>
+ explicit constexpr reset_cancellation_state_1_t(
+ F&& filt)
+ : filter(static_cast<F&&>(filt))
+ {
+ }
+
+ Filter filter;
+};
+
+template <typename Filter>
+ASIO_NODISCARD inline constexpr reset_cancellation_state_1_t<
+ decay_t<Filter>>
+reset_cancellation_state(Filter&& filter)
+{
+ return reset_cancellation_state_1_t<decay_t<Filter>>(
+ static_cast<Filter&&>(filter));
+}
+
+template <typename InFilter, typename OutFilter>
+struct reset_cancellation_state_2_t
+{
+ template <typename F1, typename F2>
+ constexpr reset_cancellation_state_2_t(
+ F1&& in_filt, F2&& out_filt)
+ : in_filter(static_cast<F1&&>(in_filt)),
+ out_filter(static_cast<F2&&>(out_filt))
+ {
+ }
+
+ InFilter in_filter;
+ OutFilter out_filter;
+};
+
+template <typename InFilter, typename OutFilter>
+ASIO_NODISCARD inline constexpr
+reset_cancellation_state_2_t<decay_t<InFilter>, decay_t<OutFilter>>
+reset_cancellation_state(InFilter&& in_filter, OutFilter&& out_filter)
+{
+ return reset_cancellation_state_2_t<decay_t<InFilter>, decay_t<OutFilter>>(
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+}
+
+struct throw_if_cancelled_0_t
+{
+ constexpr throw_if_cancelled_0_t()
+ {
+ }
+};
+
+ASIO_NODISCARD inline constexpr throw_if_cancelled_0_t
+throw_if_cancelled()
+{
+ return throw_if_cancelled_0_t();
+}
+
+struct throw_if_cancelled_1_t
+{
+ explicit constexpr throw_if_cancelled_1_t(bool val)
+ : value(val)
+ {
+ }
+
+ bool value;
+};
+
+ASIO_NODISCARD inline constexpr throw_if_cancelled_1_t
+throw_if_cancelled(bool value)
+{
+ return throw_if_cancelled_1_t(value);
+}
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace this_coro
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_THIS_CORO_HPP
diff --git a/3rdparty/asio/include/asio/thread.hpp b/3rdparty/asio/include/asio/thread.hpp
index 45ae3926d9e..fc57bffdd9e 100644
--- a/3rdparty/asio/include/asio/thread.hpp
+++ b/3rdparty/asio/include/asio/thread.hpp
@@ -2,7 +2,7 @@
// thread.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/thread_pool.hpp b/3rdparty/asio/include/asio/thread_pool.hpp
index f62fc9d880e..f9095d9441a 100644
--- a/3rdparty/asio/include/asio/thread_pool.hpp
+++ b/3rdparty/asio/include/asio/thread_pool.hpp
@@ -2,7 +2,7 @@
// thread_pool.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,28 +16,78 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/atomic_count.hpp"
#include "asio/detail/scheduler.hpp"
#include "asio/detail/thread_group.hpp"
+#include "asio/execution.hpp"
#include "asio/execution_context.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+ struct thread_pool_bits
+ {
+ static constexpr unsigned int blocking_never = 1;
+ static constexpr unsigned int blocking_always = 2;
+ static constexpr unsigned int blocking_mask = 3;
+ static constexpr unsigned int relationship_continuation = 4;
+ static constexpr unsigned int outstanding_work_tracked = 8;
+ };
+} // namespace detail
/// A simple fixed-size thread pool.
/**
* The thread pool class is an execution context where functions are permitted
* to run on one of a fixed number of threads.
+ *
+ * @par Submitting tasks to the pool
+ *
+ * To submit functions to the thread pool, use the @ref asio::dispatch,
+ * @ref asio::post or @ref asio::defer free functions.
+ *
+ * For example:
+ *
+ * @code void my_task()
+ * {
+ * ...
+ * }
+ *
+ * ...
+ *
+ * // Launch the pool with four threads.
+ * asio::thread_pool pool(4);
+ *
+ * // Submit a function to the pool.
+ * asio::post(pool, my_task);
+ *
+ * // Submit a lambda object to the pool.
+ * asio::post(pool,
+ * []()
+ * {
+ * ...
+ * });
+ *
+ * // Wait for all tasks in the pool to complete.
+ * pool.join(); @endcode
*/
class thread_pool
: public execution_context
{
public:
- class executor_type;
+ template <typename Allocator, unsigned int Bits>
+ class basic_executor_type;
+
+ template <typename Allocator, unsigned int Bits>
+ friend class basic_executor_type;
+
+ /// Executor used to submit functions to a thread pool.
+ typedef basic_executor_type<std::allocator<void>, 0> executor_type;
+#if !defined(ASIO_NO_TS_EXECUTORS)
/// Constructs a pool with an automatically determined number of threads.
ASIO_DECL thread_pool();
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
/// Constructs a pool with a specified number of threads.
ASIO_DECL thread_pool(std::size_t num_threads);
@@ -49,7 +99,10 @@ public:
ASIO_DECL ~thread_pool();
/// Obtains the executor associated with the pool.
- executor_type get_executor() ASIO_NOEXCEPT;
+ executor_type get_executor() noexcept;
+
+ /// Obtains the executor associated with the pool.
+ executor_type executor() noexcept;
/// Stops the threads.
/**
@@ -58,6 +111,14 @@ public:
*/
ASIO_DECL void stop();
+ /// Attaches the current thread to the pool.
+ /**
+ * This function attaches the current thread to the pool so that it may be
+ * used for executing submitted function objects. Blocks the calling thread
+ * until the pool is stopped or joined and has no outstanding work.
+ */
+ ASIO_DECL void attach();
+
/// Joins the threads.
/**
* This function blocks until the threads in the pool have completed. If @c
@@ -66,23 +127,425 @@ public:
*/
ASIO_DECL void join();
+ /// Waits for threads to complete.
+ /**
+ * This function blocks until the threads in the pool have completed. If @c
+ * stop() is not called prior to @c wait(), the @c wait() call will wait
+ * until the pool has no more outstanding work.
+ */
+ ASIO_DECL void wait();
+
private:
- friend class executor_type;
+ thread_pool(const thread_pool&) = delete;
+ thread_pool& operator=(const thread_pool&) = delete;
+
struct thread_function;
+ // Helper function to create the underlying scheduler.
+ ASIO_DECL detail::scheduler& add_scheduler(detail::scheduler* s);
+
// The underlying scheduler.
detail::scheduler& scheduler_;
// The threads in the pool.
detail::thread_group threads_;
+
+ // The current number of threads in the pool.
+ detail::atomic_count num_threads_;
};
-/// Executor used to submit functions to a thread pool.
-class thread_pool::executor_type
+/// Executor implementation type used to submit functions to a thread pool.
+template <typename Allocator, unsigned int Bits>
+class thread_pool::basic_executor_type : detail::thread_pool_bits
{
public:
+ /// Copy constructor.
+ basic_executor_type(const basic_executor_type& other) noexcept
+ : pool_(other.pool_),
+ allocator_(other.allocator_),
+ bits_(other.bits_)
+ {
+ if (Bits & outstanding_work_tracked)
+ if (pool_)
+ pool_->scheduler_.work_started();
+ }
+
+ /// Move constructor.
+ basic_executor_type(basic_executor_type&& other) noexcept
+ : pool_(other.pool_),
+ allocator_(static_cast<Allocator&&>(other.allocator_)),
+ bits_(other.bits_)
+ {
+ if (Bits & outstanding_work_tracked)
+ other.pool_ = 0;
+ }
+
+ /// Destructor.
+ ~basic_executor_type() noexcept
+ {
+ if (Bits & outstanding_work_tracked)
+ if (pool_)
+ pool_->scheduler_.work_finished();
+ }
+
+ /// Assignment operator.
+ basic_executor_type& operator=(const basic_executor_type& other) noexcept;
+
+ /// Move assignment operator.
+ basic_executor_type& operator=(basic_executor_type&& other) noexcept;
+
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ friend struct asio_require_fn::impl;
+ friend struct asio_prefer_fn::impl;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Obtain an executor with the @c blocking.possibly property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.possibly); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED(Bits & ~blocking_mask)>
+ require(execution::blocking_t::possibly_t) const
+ {
+ return basic_executor_type<Allocator, Bits & ~blocking_mask>(
+ pool_, allocator_, bits_ & ~blocking_mask);
+ }
+
+ /// Obtain an executor with the @c blocking.always property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.always); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED((Bits & ~blocking_mask) | blocking_always)>
+ require(execution::blocking_t::always_t) const
+ {
+ return basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED((Bits & ~blocking_mask) | blocking_always)>(
+ pool_, allocator_, bits_ & ~blocking_mask);
+ }
+
+ /// Obtain an executor with the @c blocking.never property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::blocking.never); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED(Bits & ~blocking_mask)>
+ require(execution::blocking_t::never_t) const
+ {
+ return basic_executor_type<Allocator, Bits & ~blocking_mask>(
+ pool_, allocator_, (bits_ & ~blocking_mask) | blocking_never);
+ }
+
+ /// Obtain an executor with the @c relationship.fork property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::relationship.fork); @endcode
+ */
+ constexpr basic_executor_type require(execution::relationship_t::fork_t) const
+ {
+ return basic_executor_type(pool_,
+ allocator_, bits_ & ~relationship_continuation);
+ }
+
+ /// Obtain an executor with the @c relationship.continuation property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::relationship.continuation); @endcode
+ */
+ constexpr basic_executor_type require(
+ execution::relationship_t::continuation_t) const
+ {
+ return basic_executor_type(pool_,
+ allocator_, bits_ | relationship_continuation);
+ }
+
+ /// Obtain an executor with the @c outstanding_work.tracked property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::outstanding_work.tracked); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED(Bits | outstanding_work_tracked)>
+ require(execution::outstanding_work_t::tracked_t) const
+ {
+ return basic_executor_type<Allocator, Bits | outstanding_work_tracked>(
+ pool_, allocator_, bits_);
+ }
+
+ /// Obtain an executor with the @c outstanding_work.untracked property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::outstanding_work.untracked); @endcode
+ */
+ constexpr basic_executor_type<Allocator,
+ ASIO_UNSPECIFIED(Bits & ~outstanding_work_tracked)>
+ require(execution::outstanding_work_t::untracked_t) const
+ {
+ return basic_executor_type<Allocator, Bits & ~outstanding_work_tracked>(
+ pool_, allocator_, bits_);
+ }
+
+ /// Obtain an executor with the specified @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::allocator(my_allocator)); @endcode
+ */
+ template <typename OtherAllocator>
+ constexpr basic_executor_type<OtherAllocator, Bits>
+ require(execution::allocator_t<OtherAllocator> a) const
+ {
+ return basic_executor_type<OtherAllocator, Bits>(
+ pool_, a.value(), bits_);
+ }
+
+ /// Obtain an executor with the default @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require customisation point.
+ *
+ * For example:
+ * @code auto ex1 = my_thread_pool.executor();
+ * auto ex2 = asio::require(ex1,
+ * asio::execution::allocator); @endcode
+ */
+ constexpr basic_executor_type<std::allocator<void>, Bits>
+ require(execution::allocator_t<void>) const
+ {
+ return basic_executor_type<std::allocator<void>, Bits>(
+ pool_, std::allocator<void>(), bits_);
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ friend struct asio_query_fn::impl;
+ friend struct asio::execution::detail::mapping_t<0>;
+ friend struct asio::execution::detail::outstanding_work_t<0>;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Query the current value of the @c mapping property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * if (asio::query(ex, asio::execution::mapping)
+ * == asio::execution::mapping.thread)
+ * ... @endcode
+ */
+ static constexpr execution::mapping_t query(execution::mapping_t) noexcept
+ {
+ return execution::mapping.thread;
+ }
+
+ /// Query the current value of the @c context property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * asio::thread_pool& pool = asio::query(
+ * ex, asio::execution::context); @endcode
+ */
+ thread_pool& query(execution::context_t) const noexcept
+ {
+ return *pool_;
+ }
+
+ /// Query the current value of the @c blocking property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * if (asio::query(ex, asio::execution::blocking)
+ * == asio::execution::blocking.always)
+ * ... @endcode
+ */
+ constexpr execution::blocking_t query(execution::blocking_t) const noexcept
+ {
+ return (bits_ & blocking_never)
+ ? execution::blocking_t(execution::blocking.never)
+ : ((Bits & blocking_always)
+ ? execution::blocking_t(execution::blocking.always)
+ : execution::blocking_t(execution::blocking.possibly));
+ }
+
+ /// Query the current value of the @c relationship property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * if (asio::query(ex, asio::execution::relationship)
+ * == asio::execution::relationship.continuation)
+ * ... @endcode
+ */
+ constexpr execution::relationship_t query(
+ execution::relationship_t) const noexcept
+ {
+ return (bits_ & relationship_continuation)
+ ? execution::relationship_t(execution::relationship.continuation)
+ : execution::relationship_t(execution::relationship.fork);
+ }
+
+ /// Query the current value of the @c outstanding_work property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * if (asio::query(ex, asio::execution::outstanding_work)
+ * == asio::execution::outstanding_work.tracked)
+ * ... @endcode
+ */
+ static constexpr execution::outstanding_work_t query(
+ execution::outstanding_work_t) noexcept
+ {
+ return (Bits & outstanding_work_tracked)
+ ? execution::outstanding_work_t(execution::outstanding_work.tracked)
+ : execution::outstanding_work_t(execution::outstanding_work.untracked);
+ }
+
+ /// Query the current value of the @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * auto alloc = asio::query(ex,
+ * asio::execution::allocator); @endcode
+ */
+ template <typename OtherAllocator>
+ constexpr Allocator query(
+ execution::allocator_t<OtherAllocator>) const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Query the current value of the @c allocator property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * auto alloc = asio::query(ex,
+ * asio::execution::allocator); @endcode
+ */
+ constexpr Allocator query(execution::allocator_t<void>) const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Query the occupancy (recommended number of work items) for the pool.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::query customisation point.
+ *
+ * For example:
+ * @code auto ex = my_thread_pool.executor();
+ * std::size_t occupancy = asio::query(
+ * ex, asio::execution::occupancy); @endcode
+ */
+ std::size_t query(execution::occupancy_t) const noexcept
+ {
+ return static_cast<std::size_t>(pool_->num_threads_);
+ }
+
+public:
+ /// Determine whether the thread pool is running in the current thread.
+ /**
+ * @return @c true if the current thread is running the thread pool. Otherwise
+ * returns @c false.
+ */
+ bool running_in_this_thread() const noexcept;
+
+ /// Compare two executors for equality.
+ /**
+ * Two executors are equal if they refer to the same underlying thread pool.
+ */
+ friend bool operator==(const basic_executor_type& a,
+ const basic_executor_type& b) noexcept
+ {
+ return a.pool_ == b.pool_
+ && a.allocator_ == b.allocator_
+ && a.bits_ == b.bits_;
+ }
+
+ /// Compare two executors for inequality.
+ /**
+ * Two executors are equal if they refer to the same underlying thread pool.
+ */
+ friend bool operator!=(const basic_executor_type& a,
+ const basic_executor_type& b) noexcept
+ {
+ return a.pool_ != b.pool_
+ || a.allocator_ != b.allocator_
+ || a.bits_ != b.bits_;
+ }
+
+ /// Execution function.
+ template <typename Function>
+ void execute(Function&& f) const
+ {
+ this->do_execute(static_cast<Function&&>(f),
+ integral_constant<bool, (Bits & blocking_always) != 0>());
+ }
+
+public:
+#if !defined(ASIO_NO_TS_EXECUTORS)
/// Obtain the underlying execution context.
- thread_pool& context() const ASIO_NOEXCEPT;
+ thread_pool& context() const noexcept;
/// Inform the thread pool that it has some outstanding work to do.
/**
@@ -90,7 +553,7 @@ public:
* This ensures that the thread pool's join() function will not return while
* the work is underway.
*/
- void on_work_started() const ASIO_NOEXCEPT;
+ void on_work_started() const noexcept;
/// Inform the thread pool that some work is no longer outstanding.
/**
@@ -98,7 +561,7 @@ public:
* finished. Once the count of unfinished work reaches zero, the thread
* pool's join() function is permitted to exit.
*/
- void on_work_finished() const ASIO_NOEXCEPT;
+ void on_work_finished() const noexcept;
/// Request the thread pool to invoke the given function object.
/**
@@ -114,8 +577,8 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void dispatch(Function&& f, const OtherAllocator& a) const;
/// Request the thread pool to invoke the given function object.
/**
@@ -130,8 +593,8 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void post(Function&& f, const OtherAllocator& a) const;
/// Request the thread pool to invoke the given function object.
/**
@@ -150,46 +613,344 @@ public:
* @param a An allocator that may be used by the executor to allocate the
* internal storage needed for function invocation.
*/
- template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ template <typename Function, typename OtherAllocator>
+ void defer(Function&& f, const OtherAllocator& a) const;
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
- /// Determine whether the thread pool is running in the current thread.
- /**
- * @return @c true if the current thread belongs to the pool. Otherwise
- * returns @c false.
- */
- bool running_in_this_thread() const ASIO_NOEXCEPT;
+private:
+ friend class thread_pool;
+ template <typename, unsigned int> friend class basic_executor_type;
- /// Compare two executors for equality.
- /**
- * Two executors are equal if they refer to the same underlying thread pool.
- */
- friend bool operator==(const executor_type& a,
- const executor_type& b) ASIO_NOEXCEPT
+ // Constructor used by thread_pool::get_executor().
+ explicit basic_executor_type(thread_pool& p) noexcept
+ : pool_(&p),
+ allocator_(),
+ bits_(0)
{
- return &a.pool_ == &b.pool_;
+ if (Bits & outstanding_work_tracked)
+ pool_->scheduler_.work_started();
}
- /// Compare two executors for inequality.
- /**
- * Two executors are equal if they refer to the same underlying thread pool.
- */
- friend bool operator!=(const executor_type& a,
- const executor_type& b) ASIO_NOEXCEPT
+ // Constructor used by require().
+ basic_executor_type(thread_pool* p,
+ const Allocator& a, unsigned int bits) noexcept
+ : pool_(p),
+ allocator_(a),
+ bits_(bits)
{
- return &a.pool_ != &b.pool_;
+ if (Bits & outstanding_work_tracked)
+ if (pool_)
+ pool_->scheduler_.work_started();
}
-private:
- friend class thread_pool;
+ /// Execution helper implementation for possibly and never blocking.
+ template <typename Function>
+ void do_execute(Function&& f, false_type) const;
- // Constructor.
- explicit executor_type(thread_pool& p) : pool_(p) {}
+ /// Execution helper implementation for always blocking.
+ template <typename Function>
+ void do_execute(Function&& f, true_type) const;
// The underlying thread pool.
- thread_pool& pool_;
+ thread_pool* pool_;
+
+ // The allocator used for execution functions.
+ Allocator allocator_;
+
+ // The runtime-switched properties of the thread pool executor.
+ unsigned int bits_;
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename Allocator, unsigned int Bits>
+struct equality_comparable<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Allocator, unsigned int Bits, typename Function>
+struct execute_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ Function
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::blocking_t::possibly_t
+ > : asio::detail::thread_pool_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::thread_pool::basic_executor_type<
+ Allocator, Bits & ~blocking_mask> result_type;
};
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::blocking_t::always_t
+ > : asio::detail::thread_pool_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<Allocator,
+ (Bits & ~blocking_mask) | blocking_always> result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::blocking_t::never_t
+ > : asio::detail::thread_pool_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ Allocator, Bits & ~blocking_mask> result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::relationship_t::fork_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ Allocator, Bits> result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::relationship_t::continuation_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ Allocator, Bits> result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::outstanding_work_t::tracked_t
+ > : asio::detail::thread_pool_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ Allocator, Bits | outstanding_work_tracked> result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::outstanding_work_t::untracked_t
+ > : asio::detail::thread_pool_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ Allocator, Bits & ~outstanding_work_tracked> result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<void>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ std::allocator<void>, Bits> result_type;
+};
+
+template <unsigned int Bits,
+ typename Allocator, typename OtherAllocator>
+struct require_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<OtherAllocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef asio::thread_pool::basic_executor_type<
+ OtherAllocator, Bits> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Allocator, unsigned int Bits, typename Property>
+struct query_static_constexpr_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::outstanding_work_t
+ >::value
+ >::type
+ > : asio::detail::thread_pool_bits
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::outstanding_work_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return (Bits & outstanding_work_tracked)
+ ? execution::outstanding_work_t(execution::outstanding_work.tracked)
+ : execution::outstanding_work_t(execution::outstanding_work.untracked);
+ }
+};
+
+template <typename Allocator, unsigned int Bits, typename Property>
+struct query_static_constexpr_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::mapping_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::mapping_t::thread_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Allocator, unsigned int Bits, typename Property>
+struct query_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::blocking_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::blocking_t result_type;
+};
+
+template <typename Allocator, unsigned int Bits, typename Property>
+struct query_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::relationship_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::execution::relationship_t result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct query_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::occupancy_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef std::size_t result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct query_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::context_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::thread_pool& result_type;
+};
+
+template <typename Allocator, unsigned int Bits>
+struct query_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<void>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Allocator result_type;
+};
+
+template <typename Allocator, unsigned int Bits, typename OtherAllocator>
+struct query_member<
+ asio::thread_pool::basic_executor_type<Allocator, Bits>,
+ asio::execution::allocator_t<OtherAllocator>
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef Allocator result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+
+namespace execution {
+
+template <>
+struct is_executor<thread_pool> : false_type
+{
+};
+
+} // namespace execution
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/time_traits.hpp b/3rdparty/asio/include/asio/time_traits.hpp
index c046794228a..f3980233eab 100644
--- a/3rdparty/asio/include/asio/time_traits.hpp
+++ b/3rdparty/asio/include/asio/time_traits.hpp
@@ -2,7 +2,7 @@
// time_traits.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/traits/equality_comparable.hpp b/3rdparty/asio/include/asio/traits/equality_comparable.hpp
new file mode 100644
index 00000000000..0a6decf2d93
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/equality_comparable.hpp
@@ -0,0 +1,100 @@
+//
+// traits/equality_comparable.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_EQUALITY_COMPARABLE_HPP
+#define ASIO_TRAITS_EQUALITY_COMPARABLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename = void>
+struct equality_comparable_default;
+
+template <typename T, typename = void>
+struct equality_comparable;
+
+} // namespace traits
+namespace detail {
+
+struct no_equality_comparable
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename T, typename = void>
+struct equality_comparable_trait : no_equality_comparable
+{
+};
+
+template <typename T>
+struct equality_comparable_trait<T,
+ void_t<
+ decltype(
+ static_cast<void>(
+ static_cast<bool>(declval<const T>() == declval<const T>())
+ ),
+ static_cast<void>(
+ static_cast<bool>(declval<const T>() != declval<const T>())
+ )
+ )
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ static constexpr bool is_noexcept =
+ noexcept(declval<const T>() == declval<const T>())
+ && noexcept(declval<const T>() != declval<const T>());
+};
+
+#else // defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename T, typename = void>
+struct equality_comparable_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value,
+ no_equality_comparable,
+ traits::equality_comparable<decay_t<T>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename>
+struct equality_comparable_default : detail::equality_comparable_trait<T>
+{
+};
+
+template <typename T, typename>
+struct equality_comparable : equality_comparable_default<T>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#endif // ASIO_TRAITS_EQUALITY_COMPARABLE_HPP
diff --git a/3rdparty/asio/include/asio/traits/execute_member.hpp b/3rdparty/asio/include/asio/traits/execute_member.hpp
new file mode 100644
index 00000000000..fc0760bef05
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/execute_member.hpp
@@ -0,0 +1,104 @@
+//
+// traits/execute_member.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_EXECUTE_MEMBER_HPP
+#define ASIO_TRAITS_EXECUTE_MEMBER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename F, typename = void>
+struct execute_member_default;
+
+template <typename T, typename F, typename = void>
+struct execute_member;
+
+} // namespace traits
+namespace detail {
+
+struct no_execute_member
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename T, typename F, typename = void>
+struct execute_member_trait : no_execute_member
+{
+};
+
+template <typename T, typename F>
+struct execute_member_trait<T, F,
+ void_t<
+ decltype(declval<T>().execute(declval<F>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ declval<T>().execute(declval<F>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().execute(declval<F>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename T, typename F, typename = void>
+struct execute_member_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<F, decay_t<F>>::value,
+ no_execute_member,
+ traits::execute_member<
+ decay_t<T>,
+ decay_t<F>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename F, typename>
+struct execute_member_default :
+ detail::execute_member_trait<T, F>
+{
+};
+
+template <typename T, typename F, typename>
+struct execute_member :
+ execute_member_default<T, F>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_EXECUTE_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/prefer_free.hpp b/3rdparty/asio/include/asio/traits/prefer_free.hpp
new file mode 100644
index 00000000000..c6104d636ed
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/prefer_free.hpp
@@ -0,0 +1,104 @@
+//
+// traits/prefer_free.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_PREFER_FREE_HPP
+#define ASIO_TRAITS_PREFER_FREE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct prefer_free_default;
+
+template <typename T, typename Property, typename = void>
+struct prefer_free;
+
+} // namespace traits
+namespace detail {
+
+struct no_prefer_free
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct prefer_free_trait : no_prefer_free
+{
+};
+
+template <typename T, typename Property>
+struct prefer_free_trait<T, Property,
+ void_t<
+ decltype(prefer(declval<T>(), declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ prefer(declval<T>(), declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(prefer(declval<T>(), declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct prefer_free_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_prefer_free,
+ traits::prefer_free<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct prefer_free_default :
+ detail::prefer_free_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct prefer_free :
+ prefer_free_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_PREFER_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/prefer_member.hpp b/3rdparty/asio/include/asio/traits/prefer_member.hpp
new file mode 100644
index 00000000000..278c25c9964
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/prefer_member.hpp
@@ -0,0 +1,104 @@
+//
+// traits/prefer_member.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_PREFER_MEMBER_HPP
+#define ASIO_TRAITS_PREFER_MEMBER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct prefer_member_default;
+
+template <typename T, typename Property, typename = void>
+struct prefer_member;
+
+} // namespace traits
+namespace detail {
+
+struct no_prefer_member
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct prefer_member_trait : no_prefer_member
+{
+};
+
+template <typename T, typename Property>
+struct prefer_member_trait<T, Property,
+ void_t<
+ decltype(declval<T>().prefer(declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ declval<T>().prefer(declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().prefer(declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct prefer_member_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_prefer_member,
+ traits::prefer_member<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct prefer_member_default :
+ detail::prefer_member_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct prefer_member :
+ prefer_member_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_PREFER_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/query_free.hpp b/3rdparty/asio/include/asio/traits/query_free.hpp
new file mode 100644
index 00000000000..a54016adddc
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/query_free.hpp
@@ -0,0 +1,104 @@
+//
+// traits/query_free.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_QUERY_FREE_HPP
+#define ASIO_TRAITS_QUERY_FREE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct query_free_default;
+
+template <typename T, typename Property, typename = void>
+struct query_free;
+
+} // namespace traits
+namespace detail {
+
+struct no_query_free
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct query_free_trait : no_query_free
+{
+};
+
+template <typename T, typename Property>
+struct query_free_trait<T, Property,
+ void_t<
+ decltype(query(declval<T>(), declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ query(declval<T>(), declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(query(declval<T>(), declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct query_free_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_query_free,
+ traits::query_free<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct query_free_default :
+ detail::query_free_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct query_free :
+ query_free_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_QUERY_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/query_member.hpp b/3rdparty/asio/include/asio/traits/query_member.hpp
new file mode 100644
index 00000000000..2202c9dab4b
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/query_member.hpp
@@ -0,0 +1,104 @@
+//
+// traits/query_member.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_QUERY_MEMBER_HPP
+#define ASIO_TRAITS_QUERY_MEMBER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct query_member_default;
+
+template <typename T, typename Property, typename = void>
+struct query_member;
+
+} // namespace traits
+namespace detail {
+
+struct no_query_member
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct query_member_trait : no_query_member
+{
+};
+
+template <typename T, typename Property>
+struct query_member_trait<T, Property,
+ void_t<
+ decltype(declval<T>().query(declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ declval<T>().query(declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().query(declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct query_member_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_query_member,
+ traits::query_member<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct query_member_default :
+ detail::query_member_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct query_member :
+ query_member_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_QUERY_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp b/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp
new file mode 100644
index 00000000000..95bdb7db376
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp
@@ -0,0 +1,101 @@
+//
+// traits/query_static_constexpr_member.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_QUERY_STATIC_CONSTEXPR_MEMBER_HPP
+#define ASIO_TRAITS_QUERY_STATIC_CONSTEXPR_MEMBER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE) \
+ && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT 1
+#endif // defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
+ // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct query_static_constexpr_member_default;
+
+template <typename T, typename Property, typename = void>
+struct query_static_constexpr_member;
+
+} // namespace traits
+namespace detail {
+
+struct no_query_static_constexpr_member
+{
+ static constexpr bool is_valid = false;
+};
+
+template <typename T, typename Property, typename = void>
+struct query_static_constexpr_member_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_query_static_constexpr_member,
+ traits::query_static_constexpr_member<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename T, typename Property>
+struct query_static_constexpr_member_trait<T, Property,
+ enable_if_t<
+ (static_cast<void>(T::query(Property{})), true)
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(T::query(Property{}));
+
+ static constexpr bool is_noexcept = noexcept(T::query(Property{}));
+
+ static constexpr result_type value() noexcept(is_noexcept)
+ {
+ return T::query(Property{});
+ }
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct query_static_constexpr_member_default :
+ detail::query_static_constexpr_member_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct query_static_constexpr_member :
+ query_static_constexpr_member_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_QUERY_STATIC_CONSTEXPR_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/require_concept_free.hpp b/3rdparty/asio/include/asio/traits/require_concept_free.hpp
new file mode 100644
index 00000000000..1ae2ad7801d
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/require_concept_free.hpp
@@ -0,0 +1,104 @@
+//
+// traits/require_concept_free.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_REQUIRE_CONCEPT_FREE_HPP
+#define ASIO_TRAITS_REQUIRE_CONCEPT_FREE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct require_concept_free_default;
+
+template <typename T, typename Property, typename = void>
+struct require_concept_free;
+
+} // namespace traits
+namespace detail {
+
+struct no_require_concept_free
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_concept_free_trait : no_require_concept_free
+{
+};
+
+template <typename T, typename Property>
+struct require_concept_free_trait<T, Property,
+ void_t<
+ decltype(require_concept(declval<T>(), declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ require_concept(declval<T>(), declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(require_concept(declval<T>(), declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_concept_free_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_require_concept_free,
+ traits::require_concept_free<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct require_concept_free_default :
+ detail::require_concept_free_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct require_concept_free :
+ require_concept_free_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_REQUIRE_CONCEPT_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/require_concept_member.hpp b/3rdparty/asio/include/asio/traits/require_concept_member.hpp
new file mode 100644
index 00000000000..f6b6535e9bd
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/require_concept_member.hpp
@@ -0,0 +1,104 @@
+//
+// traits/require_concept_member.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_REQUIRE_CONCEPT_MEMBER_HPP
+#define ASIO_TRAITS_REQUIRE_CONCEPT_MEMBER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct require_concept_member_default;
+
+template <typename T, typename Property, typename = void>
+struct require_concept_member;
+
+} // namespace traits
+namespace detail {
+
+struct no_require_concept_member
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_concept_member_trait : no_require_concept_member
+{
+};
+
+template <typename T, typename Property>
+struct require_concept_member_trait<T, Property,
+ void_t<
+ decltype(declval<T>().require_concept(declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ declval<T>().require_concept(declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().require_concept(declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_concept_member_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_require_concept_member,
+ traits::require_concept_member<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct require_concept_member_default :
+ detail::require_concept_member_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct require_concept_member :
+ require_concept_member_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_REQUIRE_CONCEPT_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/require_free.hpp b/3rdparty/asio/include/asio/traits/require_free.hpp
new file mode 100644
index 00000000000..02b558676b1
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/require_free.hpp
@@ -0,0 +1,104 @@
+//
+// traits/require_free.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_REQUIRE_FREE_HPP
+#define ASIO_TRAITS_REQUIRE_FREE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct require_free_default;
+
+template <typename T, typename Property, typename = void>
+struct require_free;
+
+} // namespace traits
+namespace detail {
+
+struct no_require_free
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_free_trait : no_require_free
+{
+};
+
+template <typename T, typename Property>
+struct require_free_trait<T, Property,
+ void_t<
+ decltype(require(declval<T>(), declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ require(declval<T>(), declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(require(declval<T>(), declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_free_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_require_free,
+ traits::require_free<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct require_free_default :
+ detail::require_free_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct require_free :
+ require_free_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_REQUIRE_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/require_member.hpp b/3rdparty/asio/include/asio/traits/require_member.hpp
new file mode 100644
index 00000000000..af733e3b270
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/require_member.hpp
@@ -0,0 +1,104 @@
+//
+// traits/require_member.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_REQUIRE_MEMBER_HPP
+#define ASIO_TRAITS_REQUIRE_MEMBER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT 1
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct require_member_default;
+
+template <typename T, typename Property, typename = void>
+struct require_member;
+
+} // namespace traits
+namespace detail {
+
+struct no_require_member
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+#if defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_member_trait : no_require_member
+{
+};
+
+template <typename T, typename Property>
+struct require_member_trait<T, Property,
+ void_t<
+ decltype(declval<T>().require(declval<Property>()))
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ declval<T>().require(declval<Property>()));
+
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().require(declval<Property>()));
+};
+
+#else // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename T, typename Property, typename = void>
+struct require_member_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_require_member,
+ traits::require_member<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct require_member_default :
+ detail::require_member_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct require_member :
+ require_member_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_REQUIRE_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/static_query.hpp b/3rdparty/asio/include/asio/traits/static_query.hpp
new file mode 100644
index 00000000000..b177a9d5304
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/static_query.hpp
@@ -0,0 +1,102 @@
+//
+// traits/static_query.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_STATIC_QUERY_HPP
+#define ASIO_TRAITS_STATIC_QUERY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES) \
+ && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+# define ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT 1
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
+ // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct static_query_default;
+
+template <typename T, typename Property, typename = void>
+struct static_query;
+
+} // namespace traits
+namespace detail {
+
+struct no_static_query
+{
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
+};
+
+template <typename T, typename Property, typename = void>
+struct static_query_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_static_query,
+ traits::static_query<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+
+template <typename T, typename Property>
+struct static_query_trait<T, Property,
+ void_t<
+ decltype(decay_t<Property>::template static_query_v<T>)
+ >>
+{
+ static constexpr bool is_valid = true;
+
+ using result_type = decltype(
+ decay_t<Property>::template static_query_v<T>);
+
+ static constexpr bool is_noexcept =
+ noexcept(decay_t<Property>::template static_query_v<T>);
+
+ static constexpr result_type value() noexcept(is_noexcept)
+ {
+ return decay_t<Property>::template static_query_v<T>;
+ }
+};
+
+#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct static_query_default : detail::static_query_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct static_query : static_query_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_STATIC_QUERY_HPP
diff --git a/3rdparty/asio/include/asio/traits/static_require.hpp b/3rdparty/asio/include/asio/traits/static_require.hpp
new file mode 100644
index 00000000000..4ef4a617390
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/static_require.hpp
@@ -0,0 +1,115 @@
+//
+// traits/static_require.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_STATIC_REQUIRE_HPP
+#define ASIO_TRAITS_STATIC_REQUIRE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/traits/static_query.hpp"
+
+#define ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT 1
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct static_require_default;
+
+template <typename T, typename Property, typename = void>
+struct static_require;
+
+} // namespace traits
+namespace detail {
+
+struct no_static_require
+{
+ static constexpr bool is_valid = false;
+};
+
+template <typename T, typename Property, typename = void>
+struct static_require_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_static_require,
+ traits::static_require<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+template <typename T, typename Property>
+struct static_require_trait<T, Property,
+ enable_if_t<
+ decay_t<Property>::value() == traits::static_query<T, Property>::value()
+ >>
+{
+ static constexpr bool is_valid = true;
+};
+
+#else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+false_type static_require_test(...);
+
+template <typename T, typename Property>
+true_type static_require_test(T*, Property*,
+ enable_if_t<
+ Property::value() == traits::static_query<T, Property>::value()
+ >* = 0);
+
+template <typename T, typename Property>
+struct has_static_require
+{
+ static constexpr bool value =
+ decltype((static_require_test)(
+ static_cast<T*>(0), static_cast<Property*>(0)))::value;
+};
+
+template <typename T, typename Property>
+struct static_require_trait<T, Property,
+ enable_if_t<
+ has_static_require<decay_t<T>,
+ decay_t<Property>>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+};
+
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct static_require_default : detail::static_require_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct static_require : static_require_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_STATIC_REQUIRE_HPP
diff --git a/3rdparty/asio/include/asio/traits/static_require_concept.hpp b/3rdparty/asio/include/asio/traits/static_require_concept.hpp
new file mode 100644
index 00000000000..6861f46aa0d
--- /dev/null
+++ b/3rdparty/asio/include/asio/traits/static_require_concept.hpp
@@ -0,0 +1,116 @@
+//
+// traits/static_require_concept.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_TRAITS_STATIC_REQUIRE_CONCEPT_HPP
+#define ASIO_TRAITS_STATIC_REQUIRE_CONCEPT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/traits/static_query.hpp"
+
+#define ASIO_HAS_DEDUCED_STATIC_REQUIRE_CONCEPT_TRAIT 1
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace traits {
+
+template <typename T, typename Property, typename = void>
+struct static_require_concept_default;
+
+template <typename T, typename Property, typename = void>
+struct static_require_concept;
+
+} // namespace traits
+namespace detail {
+
+struct no_static_require_concept
+{
+ static constexpr bool is_valid = false;
+};
+
+template <typename T, typename Property, typename = void>
+struct static_require_concept_trait :
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
+ no_static_require_concept,
+ traits::static_require_concept<
+ decay_t<T>,
+ decay_t<Property>>
+ >
+{
+};
+
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+template <typename T, typename Property>
+struct static_require_concept_trait<T, Property,
+ enable_if_t<
+ decay_t<Property>::value() == traits::static_query<T, Property>::value()
+ >>
+{
+ static constexpr bool is_valid = true;
+};
+
+#else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+false_type static_require_concept_test(...);
+
+template <typename T, typename Property>
+true_type static_require_concept_test(T*, Property*,
+ enable_if_t<
+ Property::value() == traits::static_query<T, Property>::value()
+ >* = 0);
+
+template <typename T, typename Property>
+struct has_static_require_concept
+{
+ static constexpr bool value =
+ decltype((static_require_concept_test)(
+ static_cast<T*>(0), static_cast<Property*>(0)))::value;
+};
+
+template <typename T, typename Property>
+struct static_require_concept_trait<T, Property,
+ enable_if_t<
+ has_static_require_concept<decay_t<T>,
+ decay_t<Property>>::value
+ >>
+{
+ static constexpr bool is_valid = true;
+};
+
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+
+} // namespace detail
+namespace traits {
+
+template <typename T, typename Property, typename>
+struct static_require_concept_default :
+ detail::static_require_concept_trait<T, Property>
+{
+};
+
+template <typename T, typename Property, typename>
+struct static_require_concept : static_require_concept_default<T, Property>
+{
+};
+
+} // namespace traits
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_TRAITS_STATIC_REQUIRE_CONCEPT_HPP
diff --git a/3rdparty/asio/include/asio/ts/buffer.hpp b/3rdparty/asio/include/asio/ts/buffer.hpp
index 257de209ce8..6c74a50ca66 100644
--- a/3rdparty/asio/include/asio/ts/buffer.hpp
+++ b/3rdparty/asio/include/asio/ts/buffer.hpp
@@ -2,7 +2,7 @@
// ts/buffer.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ts/executor.hpp b/3rdparty/asio/include/asio/ts/executor.hpp
index d67c72e5201..df28bbf44bb 100644
--- a/3rdparty/asio/include/asio/ts/executor.hpp
+++ b/3rdparty/asio/include/asio/ts/executor.hpp
@@ -2,7 +2,7 @@
// ts/executor.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,7 +15,6 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/handler_type.hpp"
#include "asio/async_result.hpp"
#include "asio/associated_allocator.hpp"
#include "asio/execution_context.hpp"
@@ -25,6 +24,7 @@
#include "asio/executor_work_guard.hpp"
#include "asio/system_executor.hpp"
#include "asio/executor.hpp"
+#include "asio/any_io_executor.hpp"
#include "asio/dispatch.hpp"
#include "asio/post.hpp"
#include "asio/defer.hpp"
diff --git a/3rdparty/asio/include/asio/ts/internet.hpp b/3rdparty/asio/include/asio/ts/internet.hpp
index 39e5b851935..eb2c35cd628 100644
--- a/3rdparty/asio/include/asio/ts/internet.hpp
+++ b/3rdparty/asio/include/asio/ts/internet.hpp
@@ -2,7 +2,7 @@
// ts/internet.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ts/io_context.hpp b/3rdparty/asio/include/asio/ts/io_context.hpp
index fc7e8f82881..c688f160e7a 100644
--- a/3rdparty/asio/include/asio/ts/io_context.hpp
+++ b/3rdparty/asio/include/asio/ts/io_context.hpp
@@ -2,7 +2,7 @@
// ts/io_context.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ts/net.hpp b/3rdparty/asio/include/asio/ts/net.hpp
index 5af4c6f8cd0..f82113b930a 100644
--- a/3rdparty/asio/include/asio/ts/net.hpp
+++ b/3rdparty/asio/include/asio/ts/net.hpp
@@ -2,7 +2,7 @@
// ts/net.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ts/netfwd.hpp b/3rdparty/asio/include/asio/ts/netfwd.hpp
index 59029218e19..a575b6e497a 100644
--- a/3rdparty/asio/include/asio/ts/netfwd.hpp
+++ b/3rdparty/asio/include/asio/ts/netfwd.hpp
@@ -2,7 +2,7 @@
// ts/netfwd.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,15 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO)
-# include "asio/detail/chrono.hpp"
-#endif // defined(ASIO_HAS_CHRONO)
+#include "asio/detail/chrono.hpp"
#if defined(ASIO_HAS_BOOST_DATE_TIME)
# include "asio/detail/date_time_fwd.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/execution/relationship.hpp"
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
#if !defined(GENERATING_DOCUMENTATION)
#include "asio/detail/push_options.hpp"
@@ -36,13 +39,47 @@ class execution_context;
template <typename T, typename Executor>
class executor_binder;
-template <typename Executor>
+#if !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
+#define ASIO_EXECUTOR_WORK_GUARD_DECL
+
+template <typename Executor, typename = void, typename = void>
class executor_work_guard;
-class system_executor;
+#endif // !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
+
+template <typename Blocking, typename Relationship, typename Allocator>
+class basic_system_executor;
+
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
class executor;
+typedef executor any_io_executor;
+
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+namespace execution {
+
+#if !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
+#define ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL
+
+template <typename... SupportableProperties>
+class any_executor;
+
+#endif // !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
+
+template <typename U>
+struct context_as_t;
+
+template <typename Property>
+struct prefer_only;
+
+} // namespace execution
+
+class any_io_executor;
+
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
template <typename Executor>
class strand;
@@ -58,32 +95,16 @@ struct time_traits;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-template <typename Clock, typename WaitTraits>
-class waitable_timer_service;
-
-#if defined(ASIO_HAS_BOOST_DATE_TIME)
-
-template <typename TimeType, typename TimeTraits>
-class deadline_timer_service;
-
-#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#if !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
#define ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
template <typename Clock,
- typename WaitTraits = asio::wait_traits<Clock>
- ASIO_SVC_TPARAM_DEF2(= waitable_timer_service<Clock, WaitTraits>)>
+ typename WaitTraits = wait_traits<Clock>,
+ typename Executor = any_io_executor>
class basic_waitable_timer;
#endif // !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
-#if defined(ASIO_HAS_CHRONO)
-
typedef basic_waitable_timer<chrono::system_clock> system_timer;
typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
@@ -91,35 +112,51 @@ typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
typedef basic_waitable_timer<chrono::high_resolution_clock>
high_resolution_timer;
-#endif // defined(ASIO_HAS_CHRONO)
+#if !defined(ASIO_BASIC_SOCKET_FWD_DECL)
+#define ASIO_BASIC_SOCKET_FWD_DECL
-template <class Protocol ASIO_SVC_TPARAM>
+template <typename Protocol, typename Executor = any_io_executor>
class basic_socket;
-template <typename Protocol ASIO_SVC_TPARAM>
+#endif // !defined(ASIO_BASIC_SOCKET_FWD_DECL)
+
+#if !defined(ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+#define ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL
+
+template <typename Protocol, typename Executor = any_io_executor>
class basic_datagram_socket;
-template <typename Protocol ASIO_SVC_TPARAM>
+#endif // !defined(ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
+
+#if !defined(ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+#define ASIO_BASIC_STREAM_SOCKET_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Protocol, typename Executor = any_io_executor>
class basic_stream_socket;
-template <typename Protocol ASIO_SVC_TPARAM>
+#endif // !defined(ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
+
+#if !defined(ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+#define ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL
+
+template <typename Protocol, typename Executor = any_io_executor>
class basic_socket_acceptor;
+#endif // !defined(ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
+
#if !defined(ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
#define ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
// Forward declaration with defaulted arguments.
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
+template <typename Protocol,
#if defined(ASIO_HAS_BOOST_DATE_TIME) \
|| defined(GENERATING_DOCUMENTATION)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
+ typename WaitTraits = time_traits<Clock>>
#else
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
+ typename WaitTraits = wait_traits<Clock>>
#endif
class basic_socket_streambuf;
@@ -129,17 +166,14 @@ class basic_socket_streambuf;
#define ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
// Forward declaration with defaulted arguments.
-template <typename Protocol
- ASIO_SVC_TPARAM_DEF1(= stream_socket_service<Protocol>),
+template <typename Protocol,
#if defined(ASIO_HAS_BOOST_DATE_TIME) \
|| defined(GENERATING_DOCUMENTATION)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock>
- ASIO_SVC_TPARAM1_DEF2(= deadline_timer_service<Clock, WaitTraits>)>
+ typename WaitTraits = time_traits<Clock>>
#else
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock>
- ASIO_SVC_TPARAM1_DEF1(= steady_timer::service_type)>
+ typename WaitTraits = wait_traits<Clock>>
#endif
class basic_socket_iostream;
@@ -180,9 +214,14 @@ class basic_resolver_entry;
template <typename InternetProtocol>
class basic_resolver_results;
-template <typename InternetProtocol ASIO_SVC_TPARAM>
+#if !defined(ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+#define ASIO_IP_BASIC_RESOLVER_FWD_DECL
+
+template <typename InternetProtocol, typename Executor = any_io_executor>
class basic_resolver;
+#endif // !defined(ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+
class tcp;
class udp;
diff --git a/3rdparty/asio/include/asio/ts/socket.hpp b/3rdparty/asio/include/asio/ts/socket.hpp
index ecc4a2e3472..d54e0778264 100644
--- a/3rdparty/asio/include/asio/ts/socket.hpp
+++ b/3rdparty/asio/include/asio/ts/socket.hpp
@@ -2,7 +2,7 @@
// ts/socket.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/ts/timer.hpp b/3rdparty/asio/include/asio/ts/timer.hpp
index a47d6565d53..3b3d6facf11 100644
--- a/3rdparty/asio/include/asio/ts/timer.hpp
+++ b/3rdparty/asio/include/asio/ts/timer.hpp
@@ -2,7 +2,7 @@
// ts/timer.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -15,7 +15,7 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include <chrono>
+#include "asio/detail/chrono.hpp"
#include "asio/wait_traits.hpp"
#include "asio/basic_waitable_timer.hpp"
diff --git a/3rdparty/asio/include/asio/unyield.hpp b/3rdparty/asio/include/asio/unyield.hpp
index ccbb043547e..f843d6137a2 100644
--- a/3rdparty/asio/include/asio/unyield.hpp
+++ b/3rdparty/asio/include/asio/unyield.hpp
@@ -2,7 +2,7 @@
// unyield.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/use_awaitable.hpp b/3rdparty/asio/include/asio/use_awaitable.hpp
new file mode 100644
index 00000000000..6dd42f3d6e3
--- /dev/null
+++ b/3rdparty/asio/include/asio/use_awaitable.hpp
@@ -0,0 +1,161 @@
+//
+// use_awaitable.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_USE_AWAITABLE_HPP
+#define ASIO_USE_AWAITABLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/awaitable.hpp"
+#include "asio/detail/handler_tracking.hpp"
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+# include "asio/detail/source_location.hpp"
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// A @ref completion_token that represents the currently executing coroutine.
+/**
+ * The @c use_awaitable_t class, with its value @c use_awaitable, is used to
+ * represent the currently executing coroutine. This completion token may be
+ * passed as a handler to an asynchronous operation. For example:
+ *
+ * @code awaitable<void> my_coroutine()
+ * {
+ * std::size_t n = co_await my_socket.async_read_some(buffer, use_awaitable);
+ * ...
+ * } @endcode
+ *
+ * When used with co_await, the initiating function (@c async_read_some in the
+ * above example) suspends the current coroutine. The coroutine is resumed when
+ * the asynchronous operation completes, and the result of the operation is
+ * returned.
+ */
+template <typename Executor = any_io_executor>
+struct use_awaitable_t
+{
+ /// Default constructor.
+ constexpr use_awaitable_t(
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ detail::source_location location = detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ : file_name_(location.file_name()),
+ line_(location.line()),
+ function_name_(location.function_name())
+# else // defined(ASIO_HAS_SOURCE_LOCATION)
+ : file_name_(0),
+ line_(0),
+ function_name_(0)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+ }
+
+ /// Constructor used to specify file name, line, and function name.
+ constexpr use_awaitable_t(const char* file_name,
+ int line, const char* function_name)
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+ : file_name_(file_name),
+ line_(line),
+ function_name_(function_name)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+#if !defined(ASIO_ENABLE_HANDLER_TRACKING)
+ (void)file_name;
+ (void)line;
+ (void)function_name;
+#endif // !defined(ASIO_ENABLE_HANDLER_TRACKING)
+ }
+
+ /// Adapts an executor to add the @c use_awaitable_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c use_awaitable_t as the default completion token type.
+ typedef use_awaitable_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c use_awaitable_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c use_awaitable_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+ const char* file_name_;
+ int line_;
+ const char* function_name_;
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+};
+
+/// A @ref completion_token object that represents the currently executing
+/// coroutine.
+/**
+ * See the documentation for asio::use_awaitable_t for a usage example.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+constexpr use_awaitable_t<> use_awaitable;
+#else
+constexpr use_awaitable_t<> use_awaitable(0, 0, 0);
+#endif
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/use_awaitable.hpp"
+
+#endif // defined(ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_USE_AWAITABLE_HPP
diff --git a/3rdparty/asio/include/asio/use_future.hpp b/3rdparty/asio/include/asio/use_future.hpp
index 2a0e24ff94d..26f5ae1fed0 100644
--- a/3rdparty/asio/include/asio/use_future.hpp
+++ b/3rdparty/asio/include/asio/use_future.hpp
@@ -2,7 +2,7 @@
// use_future.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,8 +16,9 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/future.hpp"
-#if defined(ASIO_HAS_STD_FUTURE) \
+#if defined(ASIO_HAS_STD_FUTURE_CLASS) \
|| defined(GENERATING_DOCUMENTATION)
#include <memory>
@@ -36,12 +37,14 @@ class packaged_handler;
} // namespace detail
-/// Class used to specify that an asynchronous operation should return a future.
+/// A @ref completion_token type that causes an asynchronous operation to return
+/// a future.
/**
- * The use_future_t class is used to indicate that an asynchronous operation
- * should return a std::future object. A use_future_t object may be passed as a
- * handler to an asynchronous operation, typically using the special value @c
- * asio::use_future. For example:
+ * The use_future_t class is a completion token type that is used to indicate
+ * that an asynchronous operation should return a std::future object. A
+ * use_future_t object may be passed as a completion token to an asynchronous
+ * operation, typically using the special value @c asio::use_future. For
+ * example:
*
* @code std::future<std::size_t> my_future
* = my_socket.async_read_some(my_buffer, asio::use_future); @endcode
@@ -51,7 +54,7 @@ class packaged_handler;
* completes with an error_code indicating failure, it is converted into a
* system_error and passed back to the caller via the future.
*/
-template <typename Allocator = std::allocator<void> >
+template <typename Allocator = std::allocator<void>>
class use_future_t
{
public:
@@ -60,7 +63,7 @@ public:
typedef Allocator allocator_type;
/// Construct using default-constructed allocator.
- ASIO_CONSTEXPR use_future_t()
+ constexpr use_future_t()
{
}
@@ -113,23 +116,36 @@ public:
#if defined(GENERATING_DOCUMENTATION)
unspecified
#else // defined(GENERATING_DOCUMENTATION)
- detail::packaged_token<typename decay<Function>::type, Allocator>
+ detail::packaged_token<decay_t<Function>, Allocator>
#endif // defined(GENERATING_DOCUMENTATION)
- operator()(ASIO_MOVE_ARG(Function) f) const;
+ operator()(Function&& f) const;
private:
- Allocator allocator_;
+ // Helper type to ensure that use_future can be constexpr default-constructed
+ // even when std::allocator<void> can't be.
+ struct std_allocator_void
+ {
+ constexpr std_allocator_void()
+ {
+ }
+
+ operator std::allocator<void>() const
+ {
+ return std::allocator<void>();
+ }
+ };
+
+ conditional_t<
+ is_same<std::allocator<void>, Allocator>::value,
+ std_allocator_void, Allocator> allocator_;
};
-/// A special value, similar to std::nothrow.
+/// A @ref completion_token object that causes an asynchronous operation to
+/// return a future.
/**
* See the documentation for asio::use_future_t for a usage example.
*/
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr use_future_t<> use_future;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) use_future_t<> use_future;
-#endif
} // namespace asio
@@ -137,7 +153,7 @@ __declspec(selectany) use_future_t<> use_future;
#include "asio/impl/use_future.hpp"
-#endif // defined(ASIO_HAS_STD_FUTURE)
+#endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
// || defined(GENERATING_DOCUMENTATION)
#endif // ASIO_USE_FUTURE_HPP
diff --git a/3rdparty/asio/include/asio/uses_executor.hpp b/3rdparty/asio/include/asio/uses_executor.hpp
index 53b727275fb..ff475cad4a1 100644
--- a/3rdparty/asio/include/asio/uses_executor.hpp
+++ b/3rdparty/asio/include/asio/uses_executor.hpp
@@ -2,7 +2,7 @@
// uses_executor.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -34,7 +34,7 @@ namespace asio {
struct executor_arg_t
{
/// Constructor.
- ASIO_CONSTEXPR executor_arg_t() ASIO_NOEXCEPT
+ constexpr executor_arg_t() noexcept
{
}
};
@@ -45,11 +45,7 @@ struct executor_arg_t
* See asio::executor_arg_t and asio::uses_executor
* for more information.
*/
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr executor_arg_t executor_arg;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) executor_arg_t executor_arg;
-#endif
/// The uses_executor trait detects whether a type T has an associated executor
/// that is convertible from type Executor.
diff --git a/3rdparty/asio/include/asio/version.hpp b/3rdparty/asio/include/asio/version.hpp
index 40b4e9aae97..c52fdd45b58 100644
--- a/3rdparty/asio/include/asio/version.hpp
+++ b/3rdparty/asio/include/asio/version.hpp
@@ -2,7 +2,7 @@
// version.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,6 +18,6 @@
// ASIO_VERSION % 100 is the sub-minor version
// ASIO_VERSION / 100 % 1000 is the minor version
// ASIO_VERSION / 100000 is the major version
-#define ASIO_VERSION 101100 // 1.11.0
+#define ASIO_VERSION 103002 // 1.30.2
#endif // ASIO_VERSION_HPP
diff --git a/3rdparty/asio/include/asio/wait_traits.hpp b/3rdparty/asio/include/asio/wait_traits.hpp
index 0cc60985242..5f5e876da66 100644
--- a/3rdparty/asio/include/asio/wait_traits.hpp
+++ b/3rdparty/asio/include/asio/wait_traits.hpp
@@ -2,7 +2,7 @@
// wait_traits.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/include/asio/waitable_timer_service.hpp b/3rdparty/asio/include/asio/waitable_timer_service.hpp
deleted file mode 100644
index bcb228d2ebc..00000000000
--- a/3rdparty/asio/include/asio/waitable_timer_service.hpp
+++ /dev/null
@@ -1,210 +0,0 @@
-//
-// waitable_timer_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_WAITABLE_TIMER_SERVICE_HPP
-#define ASIO_WAITABLE_TIMER_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/chrono_time_traits.hpp"
-#include "asio/detail/deadline_timer_service.hpp"
-#include "asio/io_context.hpp"
-#include "asio/wait_traits.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/// Default service implementation for a timer.
-template <typename Clock,
- typename WaitTraits = asio::wait_traits<Clock> >
-class waitable_timer_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<
- waitable_timer_service<Clock, WaitTraits> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
- /// The clock type.
- typedef Clock clock_type;
-
- /// The duration type of the clock.
- typedef typename clock_type::duration duration;
-
- /// The time point type of the clock.
- typedef typename clock_type::time_point time_point;
-
- /// The wait traits type.
- typedef WaitTraits traits_type;
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::deadline_timer_service<
- detail::chrono_time_traits<Clock, WaitTraits> > service_impl_type;
-
-public:
- /// The implementation type of the waitable timer.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new timer service for the specified io_context.
- explicit waitable_timer_service(asio::io_context& io_context)
- : asio::detail::service_base<
- waitable_timer_service<Clock, WaitTraits> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new timer implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- /// Destroy a timer implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new timer implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another timer implementation.
- void move_assign(implementation_type& impl,
- waitable_timer_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Cancel any asynchronous wait operations associated with the timer.
- std::size_t cancel(implementation_type& impl, asio::error_code& ec)
- {
- return service_impl_.cancel(impl, ec);
- }
-
- /// Cancels one asynchronous wait operation associated with the timer.
- std::size_t cancel_one(implementation_type& impl,
- asio::error_code& ec)
- {
- return service_impl_.cancel_one(impl, ec);
- }
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the expiry time for the timer as an
- /// absolute time.
- time_point expires_at(const implementation_type& impl) const
- {
- return service_impl_.expiry(impl);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- /// Get the expiry time for the timer as an absolute time.
- time_point expiry(const implementation_type& impl) const
- {
- return service_impl_.expiry(impl);
- }
-
- /// Set the expiry time for the timer as an absolute time.
- std::size_t expires_at(implementation_type& impl,
- const time_point& expiry_time, asio::error_code& ec)
- {
- return service_impl_.expires_at(impl, expiry_time, ec);
- }
-
- /// Set the expiry time for the timer relative to now.
- std::size_t expires_after(implementation_type& impl,
- const duration& expiry_time, asio::error_code& ec)
- {
- return service_impl_.expires_after(impl, expiry_time, ec);
- }
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use expiry().) Get the expiry time for the timer relative to
- /// now.
- duration expires_from_now(const implementation_type& impl) const
- {
- typedef detail::chrono_time_traits<Clock, WaitTraits> traits;
- return traits::subtract(service_impl_.expiry(impl), traits::now());
- }
-
- /// (Deprecated: Use expires_after().) Set the expiry time for the timer
- /// relative to now.
- std::size_t expires_from_now(implementation_type& impl,
- const duration& expiry_time, asio::error_code& ec)
- {
- return service_impl_.expires_after(impl, expiry_time, ec);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- // Perform a blocking wait on the timer.
- void wait(implementation_type& impl, asio::error_code& ec)
- {
- service_impl_.wait(impl, ec);
- }
-
- // Start an asynchronous wait on the timer.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_WAITABLE_TIMER_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/windows/basic_handle.hpp b/3rdparty/asio/include/asio/windows/basic_handle.hpp
deleted file mode 100644
index 3b1ce2cc2db..00000000000
--- a/3rdparty/asio/include/asio/windows/basic_handle.hpp
+++ /dev/null
@@ -1,273 +0,0 @@
-//
-// windows/basic_handle.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_WINDOWS_BASIC_HANDLE_HPP
-#define ASIO_WINDOWS_BASIC_HANDLE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace windows {
-
-/// Provides Windows handle functionality.
-/**
- * The windows::basic_handle class template provides the ability to wrap a
- * Windows handle.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename HandleService>
-class basic_handle
- : public basic_io_object<HandleService>
-{
-public:
- /// The native representation of a handle.
- typedef typename HandleService::native_handle_type native_handle_type;
-
- /// A basic_handle is always the lowest layer.
- typedef basic_handle<HandleService> lowest_layer_type;
-
- /// Construct a basic_handle without opening it.
- /**
- * This constructor creates a handle without opening it.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit basic_handle(asio::io_context& io_context)
- : basic_io_object<HandleService>(io_context)
- {
- }
-
- /// Construct a basic_handle on an existing native handle.
- /**
- * This constructor creates a handle object to hold an existing native handle.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle A native handle.
- *
- * @throws asio::system_error Thrown on failure.
- */
- basic_handle(asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_io_object<HandleService>(io_context)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_handle from another.
- /**
- * This constructor moves a handle from one object to another.
- *
- * @param other The other basic_handle 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_handle(io_context&) constructor.
- */
- basic_handle(basic_handle&& other)
- : basic_io_object<HandleService>(
- ASIO_MOVE_CAST(basic_handle)(other))
- {
- }
-
- /// Move-assign a basic_handle from another.
- /**
- * This assignment operator moves a handle from one object to another.
- *
- * @param other The other basic_handle 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_handle(io_context&) constructor.
- */
- basic_handle& operator=(basic_handle&& other)
- {
- basic_io_object<HandleService>::operator=(
- ASIO_MOVE_CAST(basic_handle)(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since a basic_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since a basic_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void assign(const native_handle_type& handle)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
- asio::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(), handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void close()
- {
- asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "close");
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID close(asio::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * handle. This is intended to allow access to native handle functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void cancel()
- {
- asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~basic_handle()
- {
- }
-};
-
-} // namespace windows
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_WINDOWS_BASIC_HANDLE_HPP
diff --git a/3rdparty/asio/include/asio/windows/basic_object_handle.hpp b/3rdparty/asio/include/asio/windows/basic_object_handle.hpp
index d134dbfb1db..bb10efc2a0a 100644
--- a/3rdparty/asio/include/asio/windows/basic_object_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_object_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_object_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -18,15 +18,17 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
#if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/io_object_impl.hpp"
#include "asio/detail/throw_error.hpp"
+#include "asio/detail/win_object_handle_service.hpp"
#include "asio/error.hpp"
-#include "asio/windows/basic_handle.hpp"
-#include "asio/windows/object_handle_service.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/push_options.hpp"
@@ -35,85 +37,338 @@ namespace windows {
/// Provides object-oriented handle functionality.
/**
- * The windows::basic_object_handle class template provides asynchronous and
- * blocking object-oriented handle functionality.
+ * The windows::basic_object_handle class provides asynchronous and blocking
+ * object-oriented handle functionality.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename ObjectHandleService = object_handle_service>
+template <typename Executor = any_io_executor>
class basic_object_handle
- : public basic_handle<ObjectHandleService>
{
+private:
+ class initiate_async_wait;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the handle type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The handle type when rebound to the specified executor.
+ typedef basic_object_handle<Executor1> other;
+ };
+
/// The native representation of a handle.
- typedef typename ObjectHandleService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef asio::detail::win_object_handle_service::native_handle_type
+ native_handle_type;
+#endif
- /// Construct a basic_object_handle without opening it.
+ /// An object handle is always the lowest layer.
+ typedef basic_object_handle lowest_layer_type;
+
+ /// Construct an object handle without opening it.
/**
* This constructor creates an object handle without opening it.
*
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
+ * @param ex The I/O executor that the object handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * object handle.
*/
- explicit basic_object_handle(asio::io_context& io_context)
- : basic_handle<ObjectHandleService>(io_context)
+ explicit basic_object_handle(const executor_type& ex)
+ : impl_(0, ex)
{
}
- /// Construct a basic_object_handle on an existing native handle.
+ /// Construct an object handle without opening it.
+ /**
+ * This constructor creates an object handle without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the object handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the object handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_object_handle(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct an object handle on an existing native handle.
/**
* This constructor creates an object handle object to hold an existing native
* handle.
*
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
+ * @param ex The I/O executor that the object handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * object handle.
*
* @param native_handle The new underlying handle implementation.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_object_handle(asio::io_context& io_context,
+ basic_object_handle(const executor_type& ex,
const native_handle_type& native_handle)
- : basic_handle<ObjectHandleService>(io_context, native_handle)
+ : impl_(0, ex)
{
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_object_handle from another.
+ /// Construct an object handle on an existing native handle.
+ /**
+ * This constructor creates an object handle object to hold an existing native
+ * handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the object handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the object handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_object_handle(ExecutionContext& context,
+ const native_handle_type& native_handle,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct an object handle from another.
/**
* This constructor moves an object handle from one object to another.
*
- * @param other The other basic_object_handle object from which the move will
+ * @param other The other object handle 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_object_handle(io_context&) constructor.
+ * constructed using the @c basic_object_handle(const executor_type&)
+ * constructor.
*/
basic_object_handle(basic_object_handle&& other)
- : basic_handle<ObjectHandleService>(
- ASIO_MOVE_CAST(basic_object_handle)(other))
+ : impl_(std::move(other.impl_))
{
}
- /// Move-assign a basic_object_handle from another.
+ /// Move-assign an object handle from another.
/**
* This assignment operator moves an object handle from one object to another.
*
- * @param other The other basic_object_handle object from which the move will
+ * @param other The other object handle 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_object_handle(io_context&) constructor.
+ * constructed using the @c basic_object_handle(const executor_type&)
+ * constructor.
*/
basic_object_handle& operator=(basic_object_handle&& other)
{
- basic_handle<ObjectHandleService>::operator=(
- ASIO_MOVE_CAST(basic_object_handle)(other));
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All handles have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_object_handle;
+
+ /// Move-construct an object handle from a handle of another executor type.
+ /**
+ * This constructor moves an object handle from one object to another.
+ *
+ * @param other The other object handle 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_object_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_object_handle(basic_object_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an object handle from a handle of another executor type.
+ /**
+ * This assignment operator moves an object handle from one object to another.
+ *
+ * @param other The other object handle 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_object_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_object_handle&
+ > operator=(basic_object_handle<Executor1>&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since an object handle cannot contain any further layers, it simply
+ * returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since an object handle cannot contain any further layers, it simply
+ * returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& handle)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the handle is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the native handle representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * handle. This is intended to allow access to native handle functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
/// Perform a blocking wait on the object handle.
/**
@@ -126,7 +381,7 @@ public:
void wait()
{
asio::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
+ impl_.get_service().wait(impl_.get_implementation(), ec);
asio::detail::throw_error(ec, "wait");
}
@@ -140,33 +395,83 @@ public:
*/
void wait(asio::error_code& ec)
{
- this->get_service().wait(this->get_implementation(), ec);
+ impl_.get_service().wait(impl_.get_implementation(), ec);
}
/// Start an asynchronous wait on the object handle.
/**
* This function is be used to initiate an asynchronous wait against the
- * object handle. It always returns immediately.
+ * object handle. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
- * @param handler The handler to be called when the object handle is set to
- * the signalled state. Copies will be made of the handler as required. The
- * function signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*/
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(ASIO_MOVE_ARG(WaitHandler) handler)
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token))
{
- return this->get_service().async_wait(this->get_implementation(),
- ASIO_MOVE_CAST(WaitHandler)(handler));
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token);
}
+
+private:
+ // Disallow copying and assignment.
+ basic_object_handle(const basic_object_handle&) = delete;
+ basic_object_handle& operator=(const basic_object_handle&) = delete;
+
+ class initiate_async_wait
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_wait(basic_object_handle* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WaitHandler>
+ void operator()(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.
+ 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_object_handle* self_;
+ };
+
+ asio::detail::io_object_impl<
+ asio::detail::win_object_handle_service, Executor> impl_;
};
} // namespace windows
@@ -177,6 +482,4 @@ public:
#endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
diff --git a/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp b/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp
new file mode 100644
index 00000000000..8b8475b0006
--- /dev/null
+++ b/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp
@@ -0,0 +1,455 @@
+//
+// windows/basic_overlapped_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_WINDOWS_BASIC_OVERLAPPED_HANDLE_HPP
+#define ASIO_WINDOWS_BASIC_OVERLAPPED_HANDLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
+ || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/win_iocp_handle_service.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace windows {
+
+/// Provides Windows handle functionality for objects that support
+/// overlapped I/O.
+/**
+ * The windows::overlapped_handle class provides the ability to wrap a Windows
+ * handle. The underlying object referred to by the handle must support
+ * overlapped I/O.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = any_io_executor>
+class basic_overlapped_handle
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the handle type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The handle type when rebound to the specified executor.
+ typedef basic_overlapped_handle<Executor1> other;
+ };
+
+ /// The native representation of a handle.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef asio::detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// An overlapped_handle is always the lowest layer.
+ typedef basic_overlapped_handle lowest_layer_type;
+
+ /// Construct an overlapped handle without opening it.
+ /**
+ * This constructor creates an overlapped handle without opening it.
+ *
+ * @param ex The I/O executor that the overlapped handle will use, by default,
+ * to dispatch handlers for any asynchronous operations performed on the
+ * overlapped handle.
+ */
+ explicit basic_overlapped_handle(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct an overlapped handle without opening it.
+ /**
+ * This constructor creates an overlapped handle without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the overlapped handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the overlapped handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_overlapped_handle(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct an overlapped handle on an existing native handle.
+ /**
+ * This constructor creates an overlapped handle object to hold an existing
+ * native handle.
+ *
+ * @param ex The I/O executor that the overlapped handle will use, by default,
+ * to dispatch handlers for any asynchronous operations performed on the
+ * overlapped handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_overlapped_handle(const executor_type& ex,
+ const native_handle_type& native_handle)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct an overlapped handle on an existing native handle.
+ /**
+ * This constructor creates an overlapped handle object to hold an existing
+ * native handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the overlapped handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the overlapped handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_overlapped_handle(ExecutionContext& context,
+ const native_handle_type& native_handle,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_handle, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct an overlapped handle from another.
+ /**
+ * This constructor moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle 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 overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ basic_overlapped_handle(basic_overlapped_handle&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an overlapped handle from another.
+ /**
+ * This assignment operator moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle 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 overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ basic_overlapped_handle& operator=(basic_overlapped_handle&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All overlapped handles have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_overlapped_handle;
+
+ /// Move-construct an overlapped handle from a handle of another executor
+ /// type.
+ /**
+ * This constructor moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle 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 overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_overlapped_handle(basic_overlapped_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an overlapped handle from a handle of another executor type.
+ /**
+ * This assignment operator moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle 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 overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_overlapped_handle&
+ > operator=(basic_overlapped_handle<Executor1>&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since an overlapped_handle cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since an overlapped_handle cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& handle)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native handle to the handle.
+ /*
+ * This function opens the handle to hold an existing native handle.
+ *
+ * @param handle A native handle.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), handle, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the handle is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the handle.
+ /**
+ * This function is used to close the handle. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native handle.
+ /**
+ * This function causes all outstanding asynchronous operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error. Ownership of the native handle
+ * is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native handle.
+ /**
+ * This function causes all outstanding asynchronous operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error. Ownership of the native handle
+ * is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native handle representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * handle. This is intended to allow access to native handle functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ /**
+ * This function causes all outstanding asynchronous read or write operations
+ * to finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the handle, cancelling any outstanding asynchronous
+ * wait operations associated with the handle as if by calling @c cancel.
+ */
+ ~basic_overlapped_handle()
+ {
+ }
+
+ asio::detail::io_object_impl<
+ asio::detail::win_iocp_handle_service, Executor> impl_;
+
+private:
+ // Disallow copying and assignment.
+ basic_overlapped_handle(const basic_overlapped_handle&) = delete;
+ basic_overlapped_handle& operator=(
+ const basic_overlapped_handle&) = delete;
+};
+
+} // namespace windows
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+ // || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_WINDOWS_BASIC_OVERLAPPED_HANDLE_HPP
diff --git a/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp b/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp
index 4e9ebe5b7dc..e66e943c6b5 100644
--- a/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,19 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
+#include "asio/windows/basic_overlapped_handle.hpp"
#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
-#include <cstddef>
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/windows/basic_handle.hpp"
-#include "asio/windows/random_access_handle_service.hpp"
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -36,92 +28,194 @@ namespace windows {
/// Provides random-access handle functionality.
/**
- * The windows::basic_random_access_handle class template provides asynchronous
- * and blocking random-access handle functionality.
+ * The windows::basic_random_access_handle class provides asynchronous and
+ * blocking random-access handle functionality.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename RandomAccessHandleService = random_access_handle_service>
+template <typename Executor = any_io_executor>
class basic_random_access_handle
- : public basic_handle<RandomAccessHandleService>
+ : public basic_overlapped_handle<Executor>
{
+private:
+ class initiate_async_write_some_at;
+ class initiate_async_read_some_at;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the handle type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The handle type when rebound to the specified executor.
+ typedef basic_random_access_handle<Executor1> other;
+ };
+
/// The native representation of a handle.
- typedef typename RandomAccessHandleService::native_handle_type
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef asio::detail::win_iocp_handle_service::native_handle_type
native_handle_type;
+#endif
- /// Construct a basic_random_access_handle without opening it.
+ /// Construct a random-access handle without opening it.
+ /**
+ * This constructor creates a random-access handle without opening it.
+ *
+ * @param ex The I/O executor that the random-access handle will use, by
+ * default, to dispatch handlers for any asynchronous operations performed on
+ * the random-access handle.
+ */
+ explicit basic_random_access_handle(const executor_type& ex)
+ : basic_overlapped_handle<Executor>(ex)
+ {
+ }
+
+ /// Construct a random-access handle without opening it.
/**
* This constructor creates a random-access handle without opening it. The
- * handle needs to be opened before data can be written to or read from it.
+ * handle needs to be opened or assigned before data can be written to or read
+ * from it.
*
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
+ * @param context An execution context which provides the I/O executor that
+ * the random-access handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the random-access handle.
*/
- explicit basic_random_access_handle(asio::io_context& io_context)
- : basic_handle<RandomAccessHandleService>(io_context)
+ template <typename ExecutionContext>
+ explicit basic_random_access_handle(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_overlapped_handle<Executor>(context)
{
}
- /// Construct a basic_random_access_handle on an existing native handle.
+ /// Construct a random-access handle on an existing native handle.
/**
* This constructor creates a random-access handle object to hold an existing
* native handle.
*
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
+ * @param ex The I/O executor that the random-access handle will use, by
+ * default, to dispatch handlers for any asynchronous operations performed on
+ * the random-access handle.
*
* @param handle The new underlying handle implementation.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_random_access_handle(asio::io_context& io_context,
+ basic_random_access_handle(const executor_type& ex,
const native_handle_type& handle)
- : basic_handle<RandomAccessHandleService>(io_context, handle)
+ : basic_overlapped_handle<Executor>(ex, handle)
+ {
+ }
+
+ /// Construct a random-access handle on an existing native handle.
+ /**
+ * This constructor creates a random-access handle object to hold an existing
+ * native handle.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the random-access handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the random-access handle.
+ *
+ * @param handle The new underlying handle implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_handle(ExecutionContext& context,
+ const native_handle_type& handle,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_overlapped_handle<Executor>(context, handle)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_random_access_handle from another.
+ /// Move-construct a random-access handle from another.
/**
* This constructor moves a random-access handle from one object to another.
*
- * @param other The other basic_random_access_handle object from which the
+ * @param other The other random-access handle 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_random_access_handle(io_context&)
+ * constructed using the @c basic_random_access_handle(const executor_type&)
* constructor.
*/
basic_random_access_handle(basic_random_access_handle&& other)
- : basic_handle<RandomAccessHandleService>(
- ASIO_MOVE_CAST(basic_random_access_handle)(other))
+ : basic_overlapped_handle<Executor>(std::move(other))
{
}
- /// Move-assign a basic_random_access_handle from another.
+ /// Move-assign a random-access handle from another.
/**
* This assignment operator moves a random-access handle from one object to
* another.
*
- * @param other The other basic_random_access_handle object from which the
+ * @param other The other random-access handle 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_random_access_handle(io_context&)
+ * constructed using the @c basic_random_access_handle(const executor_type&)
* constructor.
*/
basic_random_access_handle& operator=(basic_random_access_handle&& other)
{
- basic_handle<RandomAccessHandleService>::operator=(
- ASIO_MOVE_CAST(basic_random_access_handle)(other));
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a random-access handle from a handle of another executor
+ /// type.
+ /**
+ * This constructor moves a random-access handle from one object to another.
+ *
+ * @param other The other random-access handle 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_random_access_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_random_access_handle(basic_random_access_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_overlapped_handle<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a random-access handle from a handle of another executor
+ /// type.
+ /**
+ * This assignment operator moves a random-access handle from one object to
+ * another.
+ *
+ * @param other The other random-access handle 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_random_access_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_random_access_handle&
+ > operator=(basic_random_access_handle<Executor1>&& other)
+ {
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Write some data to the handle at the specified offset.
/**
@@ -157,8 +251,8 @@ public:
const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
+ std::size_t s = this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
asio::detail::throw_error(ec, "write_some_at");
return s;
}
@@ -185,33 +279,39 @@ public:
std::size_t write_some_at(uint64_t offset,
const ConstBufferSequence& buffers, asio::error_code& ec)
{
- return this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
+ return this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
}
/// Start an asynchronous write at the specified offset.
/**
* This function is used to asynchronously write data to the random-access
- * handle. The function call always returns immediately.
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param offset The offset at which the data will be written.
*
* @param buffers One or more data buffers to be written to the handle.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write_at function if you need to ensure that
@@ -225,20 +325,30 @@ public:
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some_at(uint64_t offset, const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some_at>(), token, offset, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- return this->get_service().async_write_some_at(this->get_implementation(),
- offset, buffers, ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some_at(this), token, offset, buffers);
}
/// Read some data from the handle at the specified offset.
@@ -276,8 +386,8 @@ public:
const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
+ std::size_t s = this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
asio::detail::throw_error(ec, "read_some_at");
return s;
}
@@ -305,33 +415,39 @@ public:
std::size_t read_some_at(uint64_t offset,
const MutableBufferSequence& buffers, asio::error_code& ec)
{
- return this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
+ return this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
}
/// Start an asynchronous read at the specified offset.
/**
* This function is used to asynchronously read data from the random-access
- * handle. The function call always returns immediately.
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param offset The offset at which the data will be read.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read_at function if you need to ensure that
@@ -346,21 +462,98 @@ public:
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some_at(uint64_t offset, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some_at>(), token, offset, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- return this->get_service().async_read_some_at(this->get_implementation(),
- offset, buffers, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some_at(this), token, offset, buffers);
}
+
+private:
+ class initiate_async_write_some_at
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some_at(basic_random_access_handle* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ uint64_t offset, const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some_at(
+ self_->impl_.get_implementation(), offset, buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_random_access_handle* self_;
+ };
+
+ class initiate_async_read_some_at
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some_at(basic_random_access_handle* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ uint64_t offset, const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some_at(
+ self_->impl_.get_implementation(), offset, buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_random_access_handle* self_;
+ };
};
} // namespace windows
@@ -371,6 +564,4 @@ public:
#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_WINDOWS_BASIC_RANDOM_ACCESS_HANDLE_HPP
diff --git a/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp b/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp
index c0a11fcf1af..0331d9dfa03 100644
--- a/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,19 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
+#include "asio/windows/basic_overlapped_handle.hpp"
#if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
-#include <cstddef>
-#include "asio/detail/handler_type_requirements.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/error.hpp"
-#include "asio/windows/basic_handle.hpp"
-#include "asio/windows/stream_handle_service.hpp"
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -36,8 +28,8 @@ namespace windows {
/// Provides stream-oriented handle functionality.
/**
- * The windows::basic_stream_handle class template provides asynchronous and
- * blocking stream-oriented handle functionality.
+ * The windows::basic_stream_handle class provides asynchronous and blocking
+ * stream-oriented handle functionality.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
@@ -46,81 +38,182 @@ namespace windows {
* @par Concepts:
* AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
*/
-template <typename StreamHandleService = stream_handle_service>
+template <typename Executor = any_io_executor>
class basic_stream_handle
- : public basic_handle<StreamHandleService>
+ : public basic_overlapped_handle<Executor>
{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the handle type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The handle type when rebound to the specified executor.
+ typedef basic_stream_handle<Executor1> other;
+ };
+
/// The native representation of a handle.
- typedef typename StreamHandleService::native_handle_type native_handle_type;
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef asio::detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#endif
- /// Construct a basic_stream_handle without opening it.
+ /// Construct a stream handle without opening it.
+ /**
+ * This constructor creates a stream handle without opening it.
+ *
+ * @param ex The I/O executor that the stream handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the stream
+ * handle.
+ */
+ explicit basic_stream_handle(const executor_type& ex)
+ : basic_overlapped_handle<Executor>(ex)
+ {
+ }
+
+ /// Construct a stream handle without opening it.
/**
* This constructor creates a stream handle without opening it. The handle
- * needs to be opened and then connected or accepted before data can be sent
- * or received on it.
+ * needs to be opened or assigned before data can be written to or read from
+ * it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the stream handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the stream handle.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_handle(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_overlapped_handle<Executor>(context)
+ {
+ }
+
+ /// Construct a stream handle on an existing native handle.
+ /**
+ * This constructor creates a stream handle object to hold an existing native
+ * handle.
+ *
+ * @param ex The I/O executor that the stream handle will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the stream
+ * handle.
+ *
+ * @param handle The new underlying handle implementation.
*
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
+ * @throws asio::system_error Thrown on failure.
*/
- explicit basic_stream_handle(asio::io_context& io_context)
- : basic_handle<StreamHandleService>(io_context)
+ basic_stream_handle(const executor_type& ex, const native_handle_type& handle)
+ : basic_overlapped_handle<Executor>(ex, handle)
{
}
- /// Construct a basic_stream_handle on an existing native handle.
+ /// Construct a stream handle on an existing native handle.
/**
* This constructor creates a stream handle object to hold an existing native
* handle.
*
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
+ * @param context An execution context which provides the I/O executor that
+ * the stream handle will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the stream handle.
*
* @param handle The new underlying handle implementation.
*
* @throws asio::system_error Thrown on failure.
*/
- basic_stream_handle(asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_handle<StreamHandleService>(io_context, handle)
+ template <typename ExecutionContext>
+ basic_stream_handle(ExecutionContext& context,
+ const native_handle_type& handle,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : basic_overlapped_handle<Executor>(context, handle)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_stream_handle from another.
+ /// Move-construct a stream handle from another.
/**
* This constructor moves a stream handle from one object to another.
*
- * @param other The other basic_stream_handle object from which the move
+ * @param other The other stream handle 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_stream_handle(io_context&) constructor.
+ * constructed using the @c basic_stream_handle(const executor_type&)
+ * constructor.
*/
basic_stream_handle(basic_stream_handle&& other)
- : basic_handle<StreamHandleService>(
- ASIO_MOVE_CAST(basic_stream_handle)(other))
+ : basic_overlapped_handle<Executor>(std::move(other))
{
}
- /// Move-assign a basic_stream_handle from another.
+ /// Move-assign a stream handle from another.
/**
* This assignment operator moves a stream handle from one object to
* another.
*
- * @param other The other basic_stream_handle object from which the move
- * will occur.
+ * @param other The other stream handle 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_stream_handle(io_context&) constructor.
+ * constructed using the @c basic_stream_handle(const executor_type&)
+ * constructor.
*/
basic_stream_handle& operator=(basic_stream_handle&& other)
{
- basic_handle<StreamHandleService>::operator=(
- ASIO_MOVE_CAST(basic_stream_handle)(other));
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a stream handle from a handle of another executor type.
+ /**
+ * This constructor moves a stream handle from one object to another.
+ *
+ * @param other The other stream handle 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_stream_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_stream_handle(basic_stream_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_overlapped_handle<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a stream handle from a handle of another executor type.
+ /**
+ * This assignment operator moves a stream handle from one object to
+ * another.
+ *
+ * @param other The other stream handle 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_stream_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_stream_handle&
+ > operator=(basic_stream_handle<Executor1>&& other)
+ {
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Write some data to the handle.
/**
@@ -153,8 +246,8 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
+ std::size_t s = this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
asio::detail::throw_error(ec, "write_some");
return s;
}
@@ -179,31 +272,37 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().write_some(
- this->get_implementation(), buffers, ec);
+ return this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
}
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream handle.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be written to the handle.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
@@ -217,19 +316,30 @@ public:
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- return this->get_service().async_write_some(this->get_implementation(),
- buffers, ASIO_MOVE_CAST(WriteHandler)(handler));
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the handle.
@@ -264,8 +374,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
asio::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
+ std::size_t s = this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
asio::detail::throw_error(ec, "read_some");
return s;
}
@@ -291,31 +401,37 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
asio::error_code& ec)
{
- return this->get_service().read_some(
- this->get_implementation(), buffers, ec);
+ return this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
}
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the stream handle.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
@@ -330,20 +446,98 @@ public:
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- return this->get_service().async_read_some(this->get_implementation(),
- buffers, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
}
+
+private:
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_stream_handle* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_handle* self_;
+ };
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_stream_handle* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_handle* self_;
+ };
};
} // namespace windows
@@ -354,6 +548,4 @@ public:
#endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_WINDOWS_BASIC_STREAM_HANDLE_HPP
diff --git a/3rdparty/asio/include/asio/windows/object_handle.hpp b/3rdparty/asio/include/asio/windows/object_handle.hpp
index 6b5ad598b11..243d9455ce2 100644
--- a/3rdparty/asio/include/asio/windows/object_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/object_handle.hpp
@@ -2,7 +2,7 @@
// windows/object_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -21,360 +21,17 @@
#if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
-#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/detail/win_object_handle_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/windows/basic_object_handle.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#define ASIO_SVC_T asio::detail::win_object_handle_service
-
-#include "asio/detail/push_options.hpp"
+#include "asio/windows/basic_object_handle.hpp"
namespace asio {
namespace windows {
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of an object handle.
+/// Typedef for the typical usage of an object handle.
typedef basic_object_handle<> object_handle;
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-/// Provides object-oriented handle functionality.
-/**
- * The windows::object_handle class provides asynchronous and blocking
- * object-oriented handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class object_handle
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a handle.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// An object_handle is always the lowest layer.
- typedef object_handle lowest_layer_type;
-
- /// Construct an object_handle without opening it.
- /**
- * This constructor creates an object handle without opening it.
- *
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit object_handle(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct an object_handle on an existing native handle.
- /**
- * This constructor creates an object handle object to hold an existing native
- * handle.
- *
- * @param io_context The io_context object that the object handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param native_handle The new underlying handle implementation.
- *
- * @throws asio::system_error Thrown on failure.
- */
- object_handle(asio::io_context& io_context,
- const native_handle_type& native_handle)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(), native_handle, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct an object_handle from another.
- /**
- * This constructor moves an object handle from one object to another.
- *
- * @param other The other object_handle 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 object_handle(io_context&) constructor.
- */
- object_handle(object_handle&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign an object_handle from another.
- /**
- * This assignment operator moves an object handle from one object to another.
- *
- * @param other The other object_handle 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 object_handle(io_context&) constructor.
- */
- object_handle& operator=(object_handle&& other)
- {
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- /// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
- {
- return basic_io_object<ASIO_SVC_T>::get_executor();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since an object_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since an object_handle cannot contain any further layers, it simply
- * returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void assign(const native_handle_type& handle)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
- asio::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(), handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void close()
- {
- asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "close");
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID close(asio::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * handle. This is intended to allow access to native handle functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void cancel()
- {
- asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform a blocking wait on the object handle.
- /**
- * This function is used to wait for the object handle to be set to the
- * signalled state. This function blocks and does not return until the object
- * handle has been set to the signalled state.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void wait()
- {
- asio::error_code ec;
- this->get_service().wait(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "wait");
- }
-
- /// Perform a blocking wait on the object handle.
- /**
- * This function is used to wait for the object handle to be set to the
- * signalled state. This function blocks and does not return until the object
- * handle has been set to the signalled state.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- void wait(asio::error_code& ec)
- {
- this->get_service().wait(this->get_implementation(), ec);
- }
-
- /// Start an asynchronous wait on the object handle.
- /**
- * This function is be used to initiate an asynchronous wait against the
- * object handle. It always returns immediately.
- *
- * @param handler The handler to be called when the object handle is set to
- * the signalled state. Copies will be made of the handler as required. The
- * function signature of the handler must be:
- * @code void handler(
- * const asio::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. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- */
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(ASIO_MOVE_ARG(WaitHandler) handler)
- {
- asio::async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- this->get_service().async_wait(this->get_implementation(),
- init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
} // namespace windows
} // namespace asio
-#include "asio/detail/pop_options.hpp"
-
-#undef ASIO_SVC_T
-
#endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/windows/object_handle_service.hpp b/3rdparty/asio/include/asio/windows/object_handle_service.hpp
deleted file mode 100644
index 524a9f89003..00000000000
--- a/3rdparty/asio/include/asio/windows/object_handle_service.hpp
+++ /dev/null
@@ -1,183 +0,0 @@
-//
-// windows/object_handle_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
-//
-// 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 ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
-#define ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include "asio/async_result.hpp"
-#include "asio/detail/win_object_handle_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace windows {
-
-/// Default service implementation for an object handle.
-class object_handle_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<object_handle_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::win_object_handle_service service_impl_type;
-
-public:
- /// The type of an object handle implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new object handle service for the specified io_context.
- explicit object_handle_service(asio::io_context& io_context)
- : asio::detail::service_base<object_handle_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new object handle implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new object handle implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another object handle implementation.
- void move_assign(implementation_type& impl,
- object_handle_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy an object handle implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native handle to an object handle.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, asio::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close an object handle implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- // Wait for a signaled state.
- void wait(implementation_type& impl, asio::error_code& ec)
- {
- service_impl_.wait(impl, ec);
- }
-
- /// Start an asynchronous wait.
- template <typename WaitHandler>
- ASIO_INITFN_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(implementation_type& impl,
- ASIO_MOVE_ARG(WaitHandler) handler)
- {
- asio::async_completion<WaitHandler,
- void (asio::error_code)> init(handler);
-
- service_impl_.async_wait(impl, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace windows
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/windows/overlapped_handle.hpp b/3rdparty/asio/include/asio/windows/overlapped_handle.hpp
index 3db0f1dac3c..fc12865b48c 100644
--- a/3rdparty/asio/include/asio/windows/overlapped_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/overlapped_handle.hpp
@@ -2,7 +2,7 @@
// windows/overlapped_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,315 +17,23 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_ENABLE_OLD_SERVICES)
-
#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
|| defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/basic_io_object.hpp"
-#include "asio/detail/throw_error.hpp"
-#include "asio/detail/win_iocp_handle_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
-#define ASIO_SVC_T asio::detail::win_iocp_handle_service
-
-#include "asio/detail/push_options.hpp"
+#include "asio/windows/basic_overlapped_handle.hpp"
namespace asio {
namespace windows {
-/// Provides Windows handle functionality for objects that support
-/// overlapped I/O.
-/**
- * The windows::overlapped_handle class provides the ability to wrap a Windows
- * handle. The underlying object referred to by the handle must support
- * overlapped I/O.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class overlapped_handle
- : ASIO_SVC_ACCESS basic_io_object<ASIO_SVC_T>
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The native representation of a handle.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef ASIO_SVC_T::native_handle_type native_handle_type;
-#endif
-
- /// An overlapped_handle is always the lowest layer.
- typedef overlapped_handle lowest_layer_type;
-
- /// Construct an overlapped_handle without opening it.
- /**
- * This constructor creates a handle without opening it.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit overlapped_handle(asio::io_context& io_context)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- }
-
- /// Construct an overlapped_handle on an existing native handle.
- /**
- * This constructor creates a handle object to hold an existing native handle.
- *
- * @param io_context The io_context object that the handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle A native handle.
- *
- * @throws asio::system_error Thrown on failure.
- */
- overlapped_handle(asio::io_context& io_context,
- const native_handle_type& handle)
- : basic_io_object<ASIO_SVC_T>(io_context)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct an overlapped_handle from another.
- /**
- * This constructor moves a handle from one object to another.
- *
- * @param other The other overlapped_handle 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 overlapped_handle(io_context&) constructor.
- */
- overlapped_handle(overlapped_handle&& other)
- : basic_io_object<ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign an overlapped_handle from another.
- /**
- * This assignment operator moves a handle from one object to another.
- *
- * @param other The other overlapped_handle 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 overlapped_handle(io_context&) constructor.
- */
- overlapped_handle& operator=(overlapped_handle&& other)
- {
- basic_io_object<ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_context()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- asio::io_context& get_io_service()
- {
- return basic_io_object<ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-
- /// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
- {
- return basic_io_object<ASIO_SVC_T>::get_executor();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * layers. Since an overlapped_handle cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A reference to the lowest layer in the stack of layers. Ownership
- * is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return *this;
- }
-
- /// Get a const reference to the lowest layer.
- /**
- * This function returns a const reference to the lowest layer in a stack of
- * layers. Since an overlapped_handle cannot contain any further layers, it
- * simply returns a reference to itself.
- *
- * @return A const reference to the lowest layer in the stack of layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return *this;
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void assign(const native_handle_type& handle)
- {
- asio::error_code ec;
- this->get_service().assign(this->get_implementation(), handle, ec);
- asio::detail::throw_error(ec, "assign");
- }
-
- /// Assign an existing native handle to the handle.
- /*
- * This function opens the handle to hold an existing native handle.
- *
- * @param handle A native handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID assign(const native_handle_type& handle,
- asio::error_code& ec)
- {
- this->get_service().assign(this->get_implementation(), handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open() const
- {
- return this->get_service().is_open(this->get_implementation());
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void close()
- {
- asio::error_code ec;
- this->get_service().close(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "close");
- }
-
- /// Close the handle.
- /**
- * This function is used to close the handle. Any asynchronous read or write
- * operations will be cancelled immediately, and will complete with the
- * asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID close(asio::error_code& ec)
- {
- this->get_service().close(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle representation.
- /**
- * This function may be used to obtain the underlying representation of the
- * handle. This is intended to allow access to native handle functionality
- * that is not otherwise provided.
- */
- native_handle_type native_handle()
- {
- return this->get_service().native_handle(this->get_implementation());
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @throws asio::system_error Thrown on failure.
- */
- void cancel()
- {
- asio::error_code ec;
- this->get_service().cancel(this->get_implementation(), ec);
- asio::detail::throw_error(ec, "cancel");
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- /**
- * This function causes all outstanding asynchronous read or write operations
- * to finish immediately, and the handlers for cancelled operations will be
- * passed the asio::error::operation_aborted error.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
- {
- this->get_service().cancel(this->get_implementation(), ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- /**
- * This function destroys the handle, cancelling any outstanding asynchronous
- * wait operations associated with the handle as if by calling @c cancel.
- */
- ~overlapped_handle()
- {
- }
-};
+/// Typedef for the typical usage of an overlapped handle.
+typedef basic_overlapped_handle<> overlapped_handle;
} // namespace windows
} // namespace asio
-#include "asio/detail/pop_options.hpp"
-
-#undef ASIO_SVC_T
-
#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
// || defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
-#endif // !defined(ASIO_ENABLE_OLD_SERVICES)
-
#endif // ASIO_WINDOWS_OVERLAPPED_HANDLE_HPP
diff --git a/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp b/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp
index 00f3baaaacc..e1e6f8c841f 100644
--- a/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp
+++ b/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// windows/overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -49,10 +49,25 @@ public:
}
/// Construct an overlapped_ptr to contain the specified handler.
- template <typename Handler>
- explicit overlapped_ptr(asio::io_context& io_context,
- ASIO_MOVE_ARG(Handler) handler)
- : impl_(io_context, ASIO_MOVE_CAST(Handler)(handler))
+ template <typename ExecutionContext, typename Handler>
+ explicit overlapped_ptr(ExecutionContext& context,
+ Handler&& handler,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(context.get_executor(), static_cast<Handler&&>(handler))
+ {
+ }
+
+ /// Construct an overlapped_ptr to contain the specified handler.
+ template <typename Executor, typename Handler>
+ explicit overlapped_ptr(const Executor& ex,
+ Handler&& handler,
+ constraint_t<
+ execution::is_executor<Executor>::value
+ || is_executor<Executor>::value
+ > = 0)
+ : impl_(ex, static_cast<Handler&&>(handler))
{
}
@@ -69,11 +84,25 @@ public:
/// Reset to contain the specified handler, freeing any current OVERLAPPED
/// object.
- template <typename Handler>
- void reset(asio::io_context& io_context,
- ASIO_MOVE_ARG(Handler) handler)
+ template <typename ExecutionContext, typename Handler>
+ void reset(ExecutionContext& context, Handler&& handler,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ {
+ impl_.reset(context.get_executor(), static_cast<Handler&&>(handler));
+ }
+
+ /// Reset to contain the specified handler, freeing any current OVERLAPPED
+ /// object.
+ template <typename Executor, typename Handler>
+ void reset(const Executor& ex, Handler&& handler,
+ constraint_t<
+ execution::is_executor<Executor>::value
+ || is_executor<Executor>::value
+ > = 0)
{
- impl_.reset(io_context, ASIO_MOVE_CAST(Handler)(handler));
+ impl_.reset(ex, static_cast<Handler&&>(handler));
}
/// Get the contained OVERLAPPED object.
diff --git a/3rdparty/asio/include/asio/windows/random_access_handle.hpp b/3rdparty/asio/include/asio/windows/random_access_handle.hpp
index cc3ea5c22dd..88dfa36ecdd 100644
--- a/3rdparty/asio/include/asio/windows/random_access_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,362 +16,21 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/windows/overlapped_handle.hpp"
#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/windows/basic_random_access_handle.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/detail/push_options.hpp"
+#include "asio/windows/basic_random_access_handle.hpp"
namespace asio {
namespace windows {
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a random-access handle.
+/// Typedef for the typical usage of a random-access handle.
typedef basic_random_access_handle<> random_access_handle;
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-/// Provides random-access handle functionality.
-/**
- * The windows::random_access_handle class provides asynchronous and
- * blocking random-access handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-class random_access_handle
- : public overlapped_handle
-{
-public:
- /// Construct a random_access_handle without opening it.
- /**
- * This constructor creates a random-access handle without opening it. The
- * handle needs to be opened before data can be written to or read from it.
- *
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
- */
- explicit random_access_handle(asio::io_context& io_context)
- : overlapped_handle(io_context)
- {
- }
-
- /// Construct a random_access_handle on an existing native handle.
- /**
- * This constructor creates a random-access handle object to hold an existing
- * native handle.
- *
- * @param io_context The io_context object that the random-access handle will
- * use to dispatch handlers for any asynchronous operations performed on the
- * handle.
- *
- * @param handle The new underlying handle implementation.
- *
- * @throws asio::system_error Thrown on failure.
- */
- random_access_handle(asio::io_context& io_context,
- const native_handle_type& handle)
- : overlapped_handle(io_context, handle)
- {
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a random_access_handle from another.
- /**
- * This constructor moves a random-access handle from one object to another.
- *
- * @param other The other random_access_handle 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 random_access_handle(io_context&)
- * constructor.
- */
- random_access_handle(random_access_handle&& other)
- : overlapped_handle(std::move(other))
- {
- }
-
- /// Move-assign a random_access_handle from another.
- /**
- * This assignment operator moves a random-access handle from one object to
- * another.
- *
- * @param other The other random_access_handle 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 random_access_handle(io_context&)
- * constructor.
- */
- random_access_handle& operator=(random_access_handle&& other)
- {
- overlapped_handle::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the handle at the specified offset.
- /**
- * This function is used to write data to the random-access handle. The
- * function call will block until one or more bytes of the data has been
- * written successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @returns The number of bytes written.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The write_some_at operation may not write all of the data. Consider
- * using the @ref write_at function if you need to ensure that all data is
- * written before the blocking operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.write_some_at(42, asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
- asio::detail::throw_error(ec, "write_some_at");
- return s;
- }
-
- /// Write some data to the handle at the specified offset.
- /**
- * This function is used to write data to the random-access handle. The
- * function call will block until one or more bytes of the data has been
- * written successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. Returns 0 if an error occurred.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write_at function if you need to ensure that
- * all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers, asio::error_code& ec)
- {
- return this->get_service().write_some_at(
- this->get_implementation(), offset, buffers, ec);
- }
-
- /// Start an asynchronous write at the specified offset.
- /**
- * This function is used to asynchronously write data to the random-access
- * handle. The function call always returns immediately.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more data buffers to be written to the handle.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The write operation may not transmit all of the data to the peer.
- * Consider using the @ref async_write_at function if you need to ensure that
- * all data is written before the asynchronous operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_write_some_at(42, asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_write_some_at(this->get_implementation(),
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the handle at the specified offset.
- /**
- * This function is used to read data from the random-access handle. The
- * function call will block until one or more bytes of data has been read
- * successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read_at function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.read_some_at(42, asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
- asio::detail::throw_error(ec, "read_some_at");
- return s;
- }
-
- /// Read some data from the handle at the specified offset.
- /**
- * This function is used to read data from the random-access handle. The
- * function call will block until one or more bytes of data has been read
- * successfully, or until an error occurs.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. Returns 0 if an error occurred.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read_at function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers, asio::error_code& ec)
- {
- return this->get_service().read_some_at(
- this->get_implementation(), offset, buffers, ec);
- }
-
- /// Start an asynchronous read at the specified offset.
- /**
- * This function is used to asynchronously read data from the random-access
- * handle. The function call always returns immediately.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The read operation may not read all of the requested number of bytes.
- * Consider using the @ref async_read_at function if you need to ensure that
- * the requested amount of data is read before the asynchronous operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_read_some_at(42, asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_read_some_at(this->get_implementation(),
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
} // namespace windows
} // namespace asio
-#include "asio/detail/pop_options.hpp"
-
#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/windows/random_access_handle_service.hpp b/3rdparty/asio/include/asio/windows/random_access_handle_service.hpp
deleted file mode 100644
index b3df24abaf4..00000000000
--- a/3rdparty/asio/include/asio/windows/random_access_handle_service.hpp
+++ /dev/null
@@ -1,214 +0,0 @@
-//
-// windows/random_access_handle_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP
-#define ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/cstdint.hpp"
-#include "asio/detail/win_iocp_handle_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace windows {
-
-/// Default service implementation for a random-access handle.
-class random_access_handle_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<random_access_handle_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::win_iocp_handle_service service_impl_type;
-
-public:
- /// The type of a random-access handle implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new random-access handle service for the specified io_context.
- explicit random_access_handle_service(asio::io_context& io_context)
- : asio::detail::service_base<
- random_access_handle_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new random-access handle implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new random-access handle implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another random-access handle implementation.
- void move_assign(implementation_type& impl,
- random_access_handle_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a random-access handle implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native handle to a random-access handle.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, asio::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a random-access handle implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data at the specified offset.
- template <typename ConstBufferSequence>
- std::size_t write_some_at(implementation_type& impl, uint64_t offset,
- const ConstBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.write_some_at(impl, offset, buffers, ec);
- }
-
- /// Start an asynchronous write at the specified offset.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some_at(implementation_type& impl,
- uint64_t offset, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some_at(impl,
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the specified offset.
- template <typename MutableBufferSequence>
- std::size_t read_some_at(implementation_type& impl, uint64_t offset,
- const MutableBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.read_some_at(impl, offset, buffers, ec);
- }
-
- /// Start an asynchronous read at the specified offset.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some_at(implementation_type& impl,
- uint64_t offset, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some_at(impl,
- offset, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace windows
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/windows/stream_handle.hpp b/3rdparty/asio/include/asio/windows/stream_handle.hpp
index 583637af956..4b88b8cb699 100644
--- a/3rdparty/asio/include/asio/windows/stream_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,346 +16,21 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/windows/overlapped_handle.hpp"
#if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-# include "asio/windows/basic_stream_handle.hpp"
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#include "asio/detail/push_options.hpp"
+#include "asio/windows/basic_stream_handle.hpp"
namespace asio {
namespace windows {
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-// Typedef for the typical usage of a stream-oriented handle.
+/// Typedef for the typical usage of a stream-oriented handle.
typedef basic_stream_handle<> stream_handle;
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
-/// Provides stream-oriented handle functionality.
-/**
- * The windows::stream_handle class provides asynchronous and blocking
- * stream-oriented handle functionality.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-class stream_handle
- : public overlapped_handle
-{
-public:
- /// Construct a stream_handle without opening it.
- /**
- * This constructor creates a stream handle without opening it. The handle
- * needs to be opened and then connected or accepted before data can be sent
- * or received on it.
- *
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- */
- explicit stream_handle(asio::io_context& io_context)
- : overlapped_handle(io_context)
- {
- }
-
- /// Construct a stream_handle on an existing native handle.
- /**
- * This constructor creates a stream handle object to hold an existing native
- * handle.
- *
- * @param io_context The io_context object that the stream handle will use to
- * dispatch handlers for any asynchronous operations performed on the handle.
- *
- * @param handle The new underlying handle implementation.
- *
- * @throws asio::system_error Thrown on failure.
- */
- stream_handle(asio::io_context& io_context,
- const native_handle_type& handle)
- : overlapped_handle(io_context, handle)
- {
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a stream_handle from another.
- /**
- * This constructor moves a stream handle from one object to another.
- *
- * @param other The other stream_handle 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 stream_handle(io_context&) constructor.
- */
- stream_handle(stream_handle&& other)
- : overlapped_handle(std::move(other))
- {
- }
-
- /// Move-assign a stream_handle from another.
- /**
- * This assignment operator moves a stream handle from one object to
- * another.
- *
- * @param other The other stream_handle 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 stream_handle(io_context&) constructor.
- */
- stream_handle& operator=(stream_handle&& other)
- {
- overlapped_handle::operator=(std::move(other));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Write some data to the handle.
- /**
- * This function is used to write data to the stream handle. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @returns The number of bytes written.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that
- * all data is written before the blocking operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.write_some(asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- asio::detail::throw_error(ec, "write_some");
- return s;
- }
-
- /// Write some data to the handle.
- /**
- * This function is used to write data to the stream handle. The function call
- * will block until one or more bytes of the data has been written
- * successfully, or until an error occurs.
- *
- * @param buffers One or more data buffers to be written to the handle.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. Returns 0 if an error occurred.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that
- * all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- asio::error_code& ec)
- {
- return this->get_service().write_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write data to the stream handle.
- * The function call always returns immediately.
- *
- * @param buffers One or more data buffers to be written to the handle.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The write operation may not transmit all of the data to the peer.
- * Consider using the @ref async_write function if you need to ensure that all
- * data is written before the asynchronous operation completes.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_write_some(asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_write_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the handle.
- /**
- * This function is used to read data from the stream handle. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws asio::system_error Thrown on failure. An error code of
- * asio::error::eof indicates that the connection was closed by the
- * peer.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.read_some(asio::buffer(data, size));
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- asio::error_code ec;
- std::size_t s = this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- asio::detail::throw_error(ec, "read_some");
- return s;
- }
-
- /// Read some data from the handle.
- /**
- * This function is used to read data from the stream handle. The function
- * call will block until one or more bytes of data has been read successfully,
- * or until an error occurs.
- *
- * @param buffers One or more buffers into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. Returns 0 if an error occurred.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that
- * the requested amount of data is read before the blocking operation
- * completes.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- asio::error_code& ec)
- {
- return this->get_service().read_some(
- this->get_implementation(), buffers, ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read data from the stream handle.
- * The function call always returns immediately.
- *
- * @param buffers One or more buffers into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
- *
- * @note The read operation may not read all of the requested number of bytes.
- * Consider using the @ref async_read function if you need to ensure that the
- * requested amount of data is read before the asynchronous operation
- * completes.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * handle.async_read_some(asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- this->get_service().async_read_some(
- this->get_implementation(), buffers, init.completion_handler);
-
- return init.result.get();
- }
-};
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
} // namespace windows
} // namespace asio
-#include "asio/detail/pop_options.hpp"
-
#endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/windows/stream_handle_service.hpp b/3rdparty/asio/include/asio/windows/stream_handle_service.hpp
deleted file mode 100644
index 5da3dd7fc9f..00000000000
--- a/3rdparty/asio/include/asio/windows/stream_handle_service.hpp
+++ /dev/null
@@ -1,210 +0,0 @@
-//
-// windows/stream_handle_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ASIO_WINDOWS_STREAM_HANDLE_SERVICE_HPP
-#define ASIO_WINDOWS_STREAM_HANDLE_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_ENABLE_OLD_SERVICES)
-
-#if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <cstddef>
-#include "asio/async_result.hpp"
-#include "asio/detail/win_iocp_handle_service.hpp"
-#include "asio/error.hpp"
-#include "asio/io_context.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace windows {
-
-/// Default service implementation for a stream handle.
-class stream_handle_service
-#if defined(GENERATING_DOCUMENTATION)
- : public asio::io_context::service
-#else
- : public asio::detail::service_base<stream_handle_service>
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static asio::io_context::id id;
-#endif
-
-private:
- // The type of the platform-specific implementation.
- typedef detail::win_iocp_handle_service service_impl_type;
-
-public:
- /// The type of a stream handle implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef service_impl_type::implementation_type implementation_type;
-#endif
-
- /// The native handle type.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined native_handle_type;
-#else
- typedef service_impl_type::native_handle_type native_handle_type;
-#endif
-
- /// Construct a new stream handle service for the specified io_context.
- explicit stream_handle_service(asio::io_context& io_context)
- : asio::detail::service_base<stream_handle_service>(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new stream handle implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new stream handle implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another stream handle implementation.
- void move_assign(implementation_type& impl,
- stream_handle_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a stream handle implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Assign an existing native handle to a stream handle.
- ASIO_SYNC_OP_VOID assign(implementation_type& impl,
- const native_handle_type& handle, asio::error_code& ec)
- {
- service_impl_.assign(impl, handle, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Determine whether the handle is open.
- bool is_open(const implementation_type& impl) const
- {
- return service_impl_.is_open(impl);
- }
-
- /// Close a stream handle implementation.
- ASIO_SYNC_OP_VOID close(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.close(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Get the native handle implementation.
- native_handle_type native_handle(implementation_type& impl)
- {
- return service_impl_.native_handle(impl);
- }
-
- /// Cancel all asynchronous operations associated with the handle.
- ASIO_SYNC_OP_VOID cancel(implementation_type& impl,
- asio::error_code& ec)
- {
- service_impl_.cancel(impl, ec);
- ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Write the given data to the stream.
- template <typename ConstBufferSequence>
- std::size_t write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.write_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous write.
- template <typename ConstBufferSequence, typename WriteHandler>
- ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
- {
- asio::async_completion<WriteHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_write_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- template <typename MutableBufferSequence>
- std::size_t read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, asio::error_code& ec)
- {
- return service_impl_.read_some(impl, buffers, ec);
- }
-
- /// Start an asynchronous read.
- template <typename MutableBufferSequence, typename ReadHandler>
- ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
- {
- asio::async_completion<ReadHandler,
- void (asio::error_code, std::size_t)> init(handler);
-
- service_impl_.async_read_some(impl, buffers, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace windows
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
-
-#endif // ASIO_WINDOWS_STREAM_HANDLE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/writable_pipe.hpp b/3rdparty/asio/include/asio/writable_pipe.hpp
new file mode 100644
index 00000000000..27f408a4956
--- /dev/null
+++ b/3rdparty/asio/include/asio/writable_pipe.hpp
@@ -0,0 +1,35 @@
+//
+// writable_pipe.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_WRITABLE_PIPE_HPP
+#define ASIO_WRITABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_writable_pipe.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a writable pipe.
+typedef basic_writable_pipe<> writable_pipe;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_WRITABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/write.hpp b/3rdparty/asio/include/asio/write.hpp
index 001086202a7..ca3f002c025 100644
--- a/3rdparty/asio/include/asio/write.hpp
+++ b/3rdparty/asio/include/asio/write.hpp
@@ -2,7 +2,7 @@
// write.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#include <cstddef>
#include "asio/async_result.hpp"
#include "asio/buffer.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/error.hpp"
#if !defined(ASIO_NO_EXTENSIONS)
@@ -28,11 +29,21 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_write;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_write_dynbuf_v1;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_write_dynbuf_v2;
+
+} // namespace detail
/**
* @defgroup write asio::write
*
- * @brief Write a certain amount of data to a stream before returning.
+ * @brief The @c write function is a composed operation that writes a certain
+ * amount of data to a stream before returning.
*/
/*@{*/
@@ -74,9 +85,9 @@ namespace asio {
*/
template <typename SyncWriteStream, typename ConstBufferSequence>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
+ > = 0);
/// Write all of the supplied data to a stream before returning.
/**
@@ -117,9 +128,9 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename SyncWriteStream, typename ConstBufferSequence>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -171,9 +182,9 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -218,9 +229,11 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
+ > = 0);
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
/// Write all of the supplied data to a stream before returning.
/**
@@ -249,12 +262,15 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
* s, buffers,
* asio::transfer_all()); @endcode
*/
-template <typename SyncWriteStream, typename DynamicBuffer>
+template <typename SyncWriteStream, typename DynamicBuffer_v1>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Write all of the supplied data to a stream before returning.
/**
@@ -283,13 +299,16 @@ std::size_t write(SyncWriteStream& s,
* s, buffers,
* asio::transfer_all(), ec); @endcode
*/
-template <typename SyncWriteStream, typename DynamicBuffer>
+template <typename SyncWriteStream, typename DynamicBuffer_v1>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -327,14 +346,17 @@ std::size_t write(SyncWriteStream& s,
*
* @throws asio::system_error Thrown on failure.
*/
-template <typename SyncWriteStream, typename DynamicBuffer,
+template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -373,14 +395,17 @@ std::size_t write(SyncWriteStream& s,
* @returns The number of bytes written. If an error occurs, returns the total
* number of bytes successfully transferred prior to the error.
*/
-template <typename SyncWriteStream, typename DynamicBuffer,
+template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -527,13 +552,170 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code asio::write(
+ * s, buffers,
+ * asio::transfer_all()); @endcode
+ */
+template <typename SyncWriteStream, typename DynamicBuffer_v2>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code asio::write(
+ * s, buffers,
+ * asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncWriteStream, typename DynamicBuffer_v2>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+template <typename SyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncWriteStream, typename DynamicBuffer_v2,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0);
/*@}*/
/**
* @defgroup async_write asio::async_write
*
- * @brief Start an asynchronous operation to write a certain amount of data to a
- * stream.
+ * @brief The @c async_write function is a composed asynchronous operation that
+ * writes a certain amount of data to a stream before completion.
*/
/*@{*/
@@ -541,9 +723,9 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -562,23 +744,28 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
@@ -588,24 +775,41 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
*/
template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ WriteToken&& token
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -624,7 +828,7 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -640,21 +844,26 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
@@ -665,25 +874,44 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
*/
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+template <typename AsyncWriteStream,
+ typename ConstBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
+ WriteToken&& token,
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
+
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
/// Start an asynchronous operation to write all of the supplied data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied dynamic buffer sequence has been written.
*
@@ -701,43 +929,68 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* @param buffers The dynamic buffer sequence from which data will be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
*/
-template <typename AsyncWriteStream,
- typename DynamicBuffer, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+ WriteToken&& token
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied dynamic buffer sequence has been written.
*
@@ -755,8 +1008,8 @@ async_write(AsyncWriteStream& s,
* @param buffers The dynamic buffer sequence from which data will be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -772,33 +1025,56 @@ async_write(AsyncWriteStream& s,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
*/
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_dynamic_buffer<DynamicBuffer>::value
- >::type* = 0);
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -807,9 +1083,9 @@ async_write(AsyncWriteStream& s,
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -826,37 +1102,60 @@ async_write(AsyncWriteStream& s,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
*/
-template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler);
+template <typename AsyncWriteStream, typename Allocator,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ WriteToken&& token
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -873,7 +1172,7 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -889,32 +1188,220 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
*/
-template <typename AsyncWriteStream, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler);
+template <typename AsyncWriteStream,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+
+/// Start an asynchronous operation to write all of the supplied data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
+ */
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ WriteToken&& token
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all()));
+
+/// Start an asynchronous operation to write a certain amount of data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_write_some operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's async_write_some function.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncWriteStream type's
+ * @c async_write_some operation.
+ */
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition,
+ WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
/*@}*/
diff --git a/3rdparty/asio/include/asio/write_at.hpp b/3rdparty/asio/include/asio/write_at.hpp
index 17227748964..a33514e61a0 100644
--- a/3rdparty/asio/include/asio/write_at.hpp
+++ b/3rdparty/asio/include/asio/write_at.hpp
@@ -2,7 +2,7 @@
// write_at.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"
#include <cstddef>
#include "asio/async_result.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/error.hpp"
@@ -28,11 +29,20 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_write_at;
+#if !defined(ASIO_NO_IOSTREAM)
+template <typename> class initiate_async_write_at_streambuf;
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace detail
/**
* @defgroup write_at asio::write_at
*
- * @brief Write a certain amount of data at a specified offset before returning.
+ * @brief The @c write_at function is a composed operation that writes a
+ * certain amount of data at a specified offset before returning.
*/
/*@{*/
@@ -392,8 +402,9 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
/**
* @defgroup async_write_at asio::async_write_at
*
- * @brief Start an asynchronous operation to write a certain amount of data at
- * the specified offset.
+ * @brief The @c async_write_at function is a composed asynchronous operation
+ * that writes a certain amount of data at the specified offset before
+ * completion.
*/
/*@{*/
@@ -401,9 +412,10 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -426,11 +438,13 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -440,9 +454,12 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
@@ -452,22 +469,41 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessWriteDevice type's
+ * async_write_some_at operation.
*/
template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler);
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -490,7 +526,7 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -506,9 +542,11 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the device's async_write_some_at function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -518,9 +556,12 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
@@ -531,15 +572,35 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessWriteDevice type's
+ * async_write_some_at operation.
*/
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler);
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -548,9 +609,10 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -571,11 +633,13 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -585,24 +649,47 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessWriteDevice type's
+ * async_write_some_at operation.
*/
template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, ASIO_MOVE_ARG(WriteHandler) handler);
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -623,7 +710,7 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -639,9 +726,11 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the device's async_write_some_at function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -651,17 +740,40 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * asio::io_context::post().
+ * not, the completion 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * if they are also supported by the @c AsyncRandomAccessWriteDevice type's
+ * async_write_some_at operation.
*/
-template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
+template <typename AsyncRandomAccessWriteDevice,
+ typename Allocator, typename CompletionCondition,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler);
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
diff --git a/3rdparty/asio/include/asio/yield.hpp b/3rdparty/asio/include/asio/yield.hpp
index fa178172e5b..c180503dda9 100644
--- a/3rdparty/asio/include/asio/yield.hpp
+++ b/3rdparty/asio/include/asio/yield.hpp
@@ -2,7 +2,7 @@
// yield.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/install-sh b/3rdparty/asio/install-sh
new file mode 100755
index 00000000000..ec298b53740
--- /dev/null
+++ b/3rdparty/asio/install-sh
@@ -0,0 +1,541 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2020-11-14.01; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
+ -s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -p) cpprog="$cpprog -p";;
+
+ -s) stripcmd=$stripprog;;
+
+ -S) backupsuffix="$2"
+ shift;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/3rdparty/asio/missing b/3rdparty/asio/missing
new file mode 100755
index 00000000000..1fe1611f185
--- /dev/null
+++ b/3rdparty/asio/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/3rdparty/asio/release.pl b/3rdparty/asio/release.pl
deleted file mode 100644
index 332760c8d8f..00000000000
--- a/3rdparty/asio/release.pl
+++ /dev/null
@@ -1,439 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use Cwd qw(abs_path getcwd);
-use Date::Format;
-use File::Path;
-use File::Copy;
-use File::Basename;
-
-our $version_major;
-our $version_minor;
-our $version_sub_minor;
-our $asio_name;
-our $boost_asio_name;
-
-sub print_usage_and_exit
-{
- print("usage: ./release.pl <version>\n");
- print(" or: ./release.pl --package-asio\n");
- print("\n");
- print("examples:\n");
- print(" create new version and build packages for asio and boost.asio:\n");
- print(" ./release.pl 1.2.0\n");
- print(" create packages for asio only:\n");
- print(" ./release.pl --package-asio\n");
- exit(1);
-}
-
-sub determine_version($)
-{
- my $version_string = shift;
- if ($version_string =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)$/)
- {
- our $version_major = $1;
- our $version_minor = $2;
- our $version_sub_minor = $3;
-
- our $asio_name = "asio";
- $asio_name .= "-$version_major";
- $asio_name .= ".$version_minor";
- $asio_name .= ".$version_sub_minor";
-
- our $boost_asio_name = "boost_asio";
- $boost_asio_name .= "_$version_major";
- $boost_asio_name .= "_$version_minor";
- $boost_asio_name .= "_$version_sub_minor";
- }
- else
- {
- print_usage_and_exit();
- }
-}
-
-sub determine_version_from_configure()
-{
- my $from = "configure.ac";
- open(my $input, "<$from") or die("Can't open $from for reading");
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /^AC_INIT\(asio.*\[(.*)\]\)$/)
- {
- our $asio_name = "asio-$1";
- our $boost_asio_name = "boost_asio_$1";
- last;
- }
- }
-}
-
-sub update_configure_ac
-{
- # Open the files.
- my $from = "configure.ac";
- my $to = $from . ".tmp";
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
-
- # Copy the content.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /^AC_INIT\(asio.*\)$/)
- {
- $line = "AC_INIT(asio, [";
- $line .= "$version_major.$version_minor.$version_sub_minor";
- $line .= "])";
- }
- print($output "$line\n");
- }
-
- # Close the files and move the temporary output into position.
- close($input);
- close($output);
- move($to, $from);
- unlink($to);
-}
-
-sub update_readme
-{
- # Open the files.
- my $from = "README";
- my $to = $from . ".tmp";
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
-
- # Copy the content.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /^asio version/)
- {
- $line = "asio version ";
- $line .= "$version_major.$version_minor.$version_sub_minor";
- }
- elsif ($line =~ /^Released/)
- {
- my @time = localtime;
- $line = "Released " . strftime("%A, %d %B %Y", @time) . ".";
- }
- print($output "$line\n");
- }
-
- # Close the files and move the temporary output into position.
- close($input);
- close($output);
- move($to, $from);
- unlink($to);
-}
-
-sub update_asio_version_hpp
-{
- # Open the files.
- my $from = "include/asio/version.hpp";
- my $to = $from . ".tmp";
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
-
- # Copy the content.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /^#define ASIO_VERSION /)
- {
- my $version = $version_major * 100000;
- $version += $version_minor * 100;
- $version += $version_sub_minor + 0;
- $line = "#define ASIO_VERSION " . $version;
- $line .= " // $version_major.$version_minor.$version_sub_minor";
- }
- print($output "$line\n");
- }
-
- # Close the files and move the temporary output into position.
- close($input);
- close($output);
- move($to, $from);
- unlink($to);
-}
-
-sub update_boost_asio_version_hpp
-{
- # Open the files.
- my $from = "../boost/boost/asio/version.hpp";
- my $to = $from . ".tmp";
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
-
- # Copy the content.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /^#define BOOST_ASIO_VERSION /)
- {
- my $version = $version_major * 100000;
- $version += $version_minor * 100;
- $version += $version_sub_minor + 0;
- $line = "#define BOOST_ASIO_VERSION " . $version;
- $line .= " // $version_major.$version_minor.$version_sub_minor";
- }
- print($output "$line\n");
- }
-
- # Close the files and move the temporary output into position.
- close($input);
- close($output);
- move($to, $from);
- unlink($to);
-}
-
-sub build_asio_doc
-{
- $ENV{BOOST_ROOT} = abs_path("../boost");
- system("rm -rf doc");
- my $bjam = abs_path(glob("../boost/bjam"));
- chdir("src/doc");
- system("$bjam clean");
- system("rm -rf html");
- system("$bjam");
- chdir("../..");
- mkdir("doc");
- system("cp -vR src/doc/html/* doc");
-}
-
-sub build_example_diffs
-{
- my @cpp11_files = `find src/examples/cpp11 -type f -name "*.*pp"`;
- foreach my $cpp11_file (@cpp11_files)
- {
- chomp($cpp11_file);
-
- my $cpp03_file = $cpp11_file;
- $cpp03_file =~ s/\/cpp11\//\/cpp03\//;
- my $output_diff = $cpp11_file;
- $output_diff =~ s/src\/examples\/cpp11\///g;
- my ($output_diff_name, $output_dir) = fileparse($output_diff);
- my $output_html = $output_diff . ".html";
-
- mkpath("doc/examples/diffs/$output_dir");
- system("diff -U1000000 $cpp03_file $cpp11_file > doc/examples/diffs/$output_diff");
- system("cd doc/examples/diffs && diff2html.py -i $output_diff -o $output_html");
- unlink("doc/examples/diffs/$output_diff");
- }
-}
-
-sub make_asio_packages
-{
- our $asio_name;
- system("./autogen.sh");
- system("./configure");
- system("make dist");
- system("tar tfz $asio_name.tar.gz | sed -e 's/^[^\\/]*//' | sort -df > asio.manifest");
-}
-
-sub build_boost_asio_doc
-{
- my $cwd = getcwd();
- my $bjam = abs_path(glob("../boost/bjam"));
- chdir("../boost/doc");
- system("$bjam clean");
- system("rm -rf html/boost_asio");
- system("$bjam asio");
- chdir($cwd);
-}
-
-our $boost_asio_readme = <<"EOF";
-Copy the `boost', `doc' and `libs' directories into an existing boost 1.33.0,
-1.33.1, 1.34, 1.34.1, 1.35 or 1.36 distribution.
-
-Before using Boost.Asio, the Boost.System library needs to be built. This can
-be done by running bjam in the libs/system/build directory. Consult the Boost
-Getting Started page (http://www.boost.org/more/getting_started.html) for more
-information on how to build the Boost libraries.
-EOF
-
-our $boost_system_jamfile = <<"EOF";
-# Boost System Library Build Jamfile
-
-# (C) Copyright Beman Dawes 2002, 2006
-
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
-
-# See library home page at http://www.boost.org/libs/system
-
-subproject libs/system/build ;
-
-SOURCES = error_code ;
-
-lib boost_system
- : ../src/$(SOURCES).cpp
- : # build requirements
- <define>BOOST_SYSTEM_STATIC_LINK
- <sysinclude>$(BOOST_AUX_ROOT) <sysinclude>$(BOOST_ROOT)
- # common-variant-tag ensures that the library will
- # be named according to the rules used by the install
- # and auto-link features:
- common-variant-tag
- : debug release # build variants
- ;
-
-dll boost_system
- : ../src/$(SOURCES).cpp
- : # build requirements
- <define>BOOST_SYSTEM_DYN_LINK=1 # tell source we're building dll's
- <runtime-link>dynamic # build only for dynamic runtimes
- <sysinclude>$(BOOST_AUX_ROOT) <sysinclude>$(BOOST_ROOT)
- # common-variant-tag ensures that the library will
- # be named according to the rules used by the install
- # and auto-link features:
- common-variant-tag
- : debug release # build variants
- ;
-
-install system lib
- : <lib>boost_system <dll>boost_system
- ;
-
-stage stage/lib : <lib>boost_system <dll>boost_system
- :
- # copy to a path rooted at BOOST_ROOT:
- <locate>$(BOOST_ROOT)
- # make sure the names of the libraries are correctly named:
- common-variant-tag
- # add this target to the "stage" and "all" psuedo-targets:
- <target>stage
- <target>all
- :
- debug release
- ;
-
-# end
-EOF
-
-sub create_boost_asio_content
-{
- # Create directory structure.
- system("rm -rf $boost_asio_name");
- mkdir("$boost_asio_name");
- mkdir("$boost_asio_name/doc");
- mkdir("$boost_asio_name/doc/html");
- mkdir("$boost_asio_name/boost");
- mkdir("$boost_asio_name/boost/config");
- mkdir("$boost_asio_name/libs");
-
- # Copy files.
- system("cp -vLR ../boost/doc/html/boost_asio.html $boost_asio_name/doc/html");
- system("cp -vLR ../boost/doc/html/boost_asio $boost_asio_name/doc/html");
- system("cp -vLR ../boost/boost/asio.hpp $boost_asio_name/boost");
- system("cp -vLR ../boost/boost/asio $boost_asio_name/boost");
- system("cp -vLR ../boost/boost/cerrno.hpp $boost_asio_name/boost");
- system("cp -vLR ../boost/boost/config/warning_disable.hpp $boost_asio_name/boost/config");
- system("cp -vLR ../boost/boost/system $boost_asio_name/boost");
- system("cp -vLR ../boost/libs/asio $boost_asio_name/libs");
- system("cp -vLR ../boost/libs/system $boost_asio_name/libs");
-
- # Remove modular boost include directories.
- system("rm -rf $boost_asio_name/libs/asio/include");
- system("rm -rf $boost_asio_name/libs/system/include");
-
- # Add dummy definitions of BOOST_SYMBOL* to boost/system/config.hpp.
- my $from = "$boost_asio_name/boost/system/config.hpp";
- my $to = "$boost_asio_name/boost/system/config.hpp.new";
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
- while (my $line = <$input>)
- {
- print($output $line);
- if ($line =~ /<boost\/config\.hpp>/)
- {
- print($output "\n// These #defines added by the separate Boost.Asio package.\n");
- print($output "#if !defined(BOOST_SYMBOL_IMPORT)\n");
- print($output "# if defined(BOOST_HAS_DECLSPEC)\n");
- print($output "# define BOOST_SYMBOL_IMPORT __declspec(dllimport)\n");
- print($output "# else // defined(BOOST_HAS_DECLSPEC)\n");
- print($output "# define BOOST_SYMBOL_IMPORT\n");
- print($output "# endif // defined(BOOST_HAS_DECLSPEC)\n");
- print($output "#endif // !defined(BOOST_SYMBOL_IMPORT)\n");
- print($output "#if !defined(BOOST_SYMBOL_EXPORT)\n");
- print($output "# if defined(BOOST_HAS_DECLSPEC)\n");
- print($output "# define BOOST_SYMBOL_EXPORT __declspec(dllexport)\n");
- print($output "# else // defined(BOOST_HAS_DECLSPEC)\n");
- print($output "# define BOOST_SYMBOL_EXPORT\n");
- print($output "# endif // defined(BOOST_HAS_DECLSPEC)\n");
- print($output "#endif // !defined(BOOST_SYMBOL_EXPORT)\n");
- print($output "#if !defined(BOOST_SYMBOL_VISIBLE)\n");
- print($output "# define BOOST_SYMBOL_VISIBLE\n");
- print($output "#endif // !defined(BOOST_SYMBOL_VISIBLE)\n\n");
- }
- }
- close($input);
- close($output);
- system("mv $to $from");
-
- # Create readme.
- $to = "$boost_asio_name/README.txt";
- open($output, ">$to") or die("Can't open $to for writing");
- print($output $boost_asio_readme);
- close($output);
-
- # Create Boost.System Jamfile.
- $to = "$boost_asio_name/libs/system/build/Jamfile";
- open($output, ">$to") or die("Can't open $to for writing");
- print($output $boost_system_jamfile);
- close($output);
-
- # Remove SVN and git files.
- system("find $boost_asio_name -name .svn -exec rm -rf {} \\;");
- system("find $boost_asio_name -name .git -exec rm -rf {} \\;");
- system("find $boost_asio_name -name .gitignore -exec rm -rf {} \\;");
- system("find $boost_asio_name -name .gitattributes -exec rm -rf {} \\;");
-}
-
-sub make_boost_asio_packages
-{
- our $boost_asio_name;
- system("tar --format=ustar -chf - $boost_asio_name | gzip -c >$boost_asio_name.tar.gz");
- system("tar --format=ustar -chf - $boost_asio_name | bzip2 -9 -c >$boost_asio_name.tar.bz2");
- system("rm -f $boost_asio_name.zip");
- system("zip -rq $boost_asio_name.zip $boost_asio_name");
- system("rm -rf $boost_asio_name");
- system("tar tfz $boost_asio_name.tar.gz | sed -e 's/^[^\\/]*//' | sort -df > boost_asio.manifest");
-}
-
-(scalar(@ARGV) == 1) or print_usage_and_exit();
-my $new_version = 1;
-my $package_asio = 1;
-my $package_boost = 1;
-if ($ARGV[0] eq "--package-asio")
-{
- $new_version = 0;
- $package_boost = 0;
-}
-
-if ($new_version)
-{
- determine_version($ARGV[0]);
- update_configure_ac();
- update_readme();
- update_asio_version_hpp();
- update_boost_asio_version_hpp();
-}
-else
-{
- determine_version_from_configure();
-}
-
-if ($package_asio)
-{
- build_asio_doc();
- build_example_diffs();
- make_asio_packages();
-}
-
-if ($package_boost)
-{
- build_boost_asio_doc();
- create_boost_asio_content();
- make_boost_asio_packages();
-}
diff --git a/3rdparty/asio/src/.gitignore b/3rdparty/asio/src/.gitignore
deleted file mode 100644
index 8a91ad86de7..00000000000
--- a/3rdparty/asio/src/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-.deps
-*.a
-*.o
-*.obj
-*.lib
-*.pdb
-*.log
-*.trs
-*.dirstamp
diff --git a/3rdparty/asio/src/Makefile.am b/3rdparty/asio/src/Makefile.am
index c308ea0a769..587bb4935e8 100644
--- a/3rdparty/asio/src/Makefile.am
+++ b/3rdparty/asio/src/Makefile.am
@@ -1,14 +1,38 @@
-if STANDALONE
-SUBDIRS = examples/cpp11 tests
-else
-SUBDIRS = examples/cpp03 tests
+if HAVE_CXX11
+EXAMPLES_CPP11 = examples/cpp11
endif
-DIST_SUBDIRS = examples/cpp03 examples/cpp11 examples/cpp14 tests
+if HAVE_CXX14
+EXAMPLES_CPP14 = examples/cpp14
+endif
+
+if HAVE_CXX17
+EXAMPLES_CPP17 = examples/cpp17
+endif
+
+if HAVE_CXX20
+EXAMPLES_CPP20 = examples/cpp20
+endif
+
+SUBDIRS = \
+ $(EXAMPLES_CPP11) \
+ $(EXAMPLES_CPP14) \
+ $(EXAMPLES_CPP17) \
+ $(EXAMPLES_CPP20) \
+ tests
+
+DIST_SUBDIRS = \
+ examples/cpp11 \
+ examples/cpp14 \
+ examples/cpp17 \
+ examples/cpp20 \
+ tests
EXTRA_DIST = \
Makefile.mgw \
Makefile.msc \
+ tools/handlerlive.pl \
+ tools/handlertree.pl \
tools/handlerviz.pl
MAINTAINERCLEANFILES = \
diff --git a/3rdparty/asio/src/Makefile.in b/3rdparty/asio/src/Makefile.in
new file mode 100644
index 00000000000..63e9eaf7c34
--- /dev/null
+++ b/3rdparty/asio/src/Makefile.in
@@ -0,0 +1,619 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@HAVE_CXX11_TRUE@EXAMPLES_CPP11 = examples/cpp11
+@HAVE_CXX14_TRUE@EXAMPLES_CPP14 = examples/cpp14
+@HAVE_CXX17_TRUE@EXAMPLES_CPP17 = examples/cpp17
+@HAVE_CXX20_TRUE@EXAMPLES_CPP20 = examples/cpp20
+SUBDIRS = \
+ $(EXAMPLES_CPP11) \
+ $(EXAMPLES_CPP14) \
+ $(EXAMPLES_CPP17) \
+ $(EXAMPLES_CPP20) \
+ tests
+
+DIST_SUBDIRS = \
+ examples/cpp11 \
+ examples/cpp14 \
+ examples/cpp17 \
+ examples/cpp20 \
+ tests
+
+EXTRA_DIST = \
+ Makefile.mgw \
+ Makefile.msc \
+ tools/handlerlive.pl \
+ tools/handlertree.pl \
+ tools/handlerviz.pl
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic cscopelist-am ctags ctags-am \
+ distclean distclean-generic distclean-tags distdir dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/Makefile.mgw b/3rdparty/asio/src/Makefile.mgw
index ffbb1f27c93..1fea10c2cdc 100644
--- a/3rdparty/asio/src/Makefile.mgw
+++ b/3rdparty/asio/src/Makefile.mgw
@@ -1,10 +1,34 @@
+SHELL=cmd
+
ifndef BOOSTDIR
-BOOSTDIR = ../../boost_1_34_1
+BOOSTDIR = ../../boost_1_73_0
+endif
+
+ifdef OPTIMISED
+OPTIM_CXXFLAGS = -O2
+OPTIM_LDFLAGS = -O2
+else
+OPTIM_CXXFLAGS = -fno-inline
+OPTIM_LDFLAGS =
+endif
+
+ifndef STANDALONE
+BOOST_CXXFLAGS = -I$(BOOSTDIR) -DASIO_ENABLE_BOOST
+endif
+
+ifdef SEPARATE_COMPILATION
+SEPARATE_COMPILATION_LIB = libasio.a
+SEPARATE_COMPILATION_CXXFLAGS = \
+ -DASIO_SEPARATE_COMPILATION \
+ -DASIO_ENABLE_CANCELIO
endif
-CXXFLAGS = -g -O2 -Wall -mthreads -I../include -I$(BOOSTDIR)
-LDFLAGS = -g -O2 -mthreads
-LIBS = -lws2_32 -lmswsock
+CXXFLAGS = -g -Wall -Wextra -mthreads -I../include \
+ $(OPTIM_CXXFLAGS) \
+ $(BOOST_CXXFLAGS) \
+ $(SEPARATE_COMPILATION_CXXFLAGS)
+LDFLAGS = -g -mthreads $(OPTIM_LDFLAGS)
+LIBS = $(SEPARATE_COMPILATION_LIB) -lws2_32 -lmswsock
DEFINES = -D_WIN32_WINNT=0x0501
PERFORMANCE_TEST_EXES = \
@@ -12,28 +36,54 @@ PERFORMANCE_TEST_EXES = \
tests/performance/server.exe
UNIT_TEST_EXES = \
+ tests/unit/any_completion_executor.exe \
+ tests/unit/any_completion_handler.exe \
+ tests/unit/any_io_executor.exe \
+ tests/unit/associated_allocator.exe \
+ tests/unit/associated_executor.exe \
+ tests/unit/async_result.exe \
+ tests/unit/awaitable.exe \
tests/unit/basic_datagram_socket.exe \
tests/unit/basic_deadline_timer.exe \
tests/unit/basic_raw_socket.exe \
tests/unit/basic_seq_packet_socket.exe \
tests/unit/basic_serial_port.exe \
tests/unit/basic_signal_set.exe \
+ tests/unit/basic_socket.exe \
tests/unit/basic_socket_acceptor.exe \
tests/unit/basic_stream_socket.exe \
tests/unit/basic_streambuf.exe \
tests/unit/basic_waitable_timer.exe \
+ tests/unit/bind_cancellation_slot.exe \
+ tests/unit/bind_executor.exe \
tests/unit/buffered_read_stream.exe \
tests/unit/buffered_stream.exe \
tests/unit/buffered_write_stream.exe \
tests/unit/buffer.exe \
tests/unit/buffers_iterator.exe \
+ tests/unit/co_spawn.exe \
tests/unit/completion_condition.exe \
+ tests/unit/compose.exe \
tests/unit/connect.exe \
tests/unit/coroutine.exe \
- tests/unit/datagram_socket_service.exe \
- tests/unit/deadline_timer_service.exe \
tests/unit/deadline_timer.exe \
+ tests/unit/defer.exe \
+ tests/unit/detached.exe \
+ tests/unit/dispatch.exe \
tests/unit/error.exe \
+ tests/unit/execution_context.exe \
+ tests/unit/execution/any_executor.exe \
+ tests/unit/execution/blocking.exe \
+ tests/unit/execution/blocking_adaptation.exe \
+ tests/unit/execution/context_as.exe \
+ tests/unit/execution/executor.exe \
+ tests/unit/execution/invocable_archetype.exe \
+ tests/unit/execution/mapping.exe \
+ tests/unit/execution/outstanding_work.exe \
+ tests/unit/execution/prefer_only.exe \
+ tests/unit/execution/relationship.exe \
+ tests/unit/executor.exe \
+ tests/unit/executor_work_guard.exe \
tests/unit/generic/basic_endpoint.exe \
tests/unit/generic/datagram_protocol.exe \
tests/unit/generic/raw_protocol.exe \
@@ -41,9 +91,14 @@ UNIT_TEST_EXES = \
tests/unit/generic/stream_protocol.exe \
tests/unit/high_resolution_timer.exe \
tests/unit/io_context.exe \
+ tests/unit/io_context_strand.exe \
tests/unit/ip/address.exe \
tests/unit/ip/address_v4.exe \
+ tests/unit/ip/address_v4_iterator.exe \
+ tests/unit/ip/address_v4_range.exe \
tests/unit/ip/address_v6.exe \
+ tests/unit/ip/address_v6_iterator.exe \
+ tests/unit/ip/address_v6_range.exe \
tests/unit/ip/basic_endpoint.exe \
tests/unit/ip/basic_resolver.exe \
tests/unit/ip/basic_resolver_entry.exe \
@@ -52,101 +107,128 @@ UNIT_TEST_EXES = \
tests/unit/ip/host_name.exe \
tests/unit/ip/icmp.exe \
tests/unit/ip/multicast.exe \
+ tests/unit/ip/network_v4.exe \
+ tests/unit/ip/network_v6.exe \
tests/unit/ip/resolver_query_base.exe \
- tests/unit/ip/resolver_service.exe \
tests/unit/ip/tcp.exe \
tests/unit/ip/udp.exe \
tests/unit/ip/unicast.exe \
tests/unit/ip/v6_only.exe \
tests/unit/is_read_buffered.exe \
tests/unit/is_write_buffered.exe \
+ tests/unit/packaged_task.exe \
tests/unit/placeholders.exe \
- tests/unit/raw_socket_service.exe \
+ tests/unit/post.exe \
tests/unit/read.exe \
tests/unit/read_at.exe \
tests/unit/read_until.exe \
- tests/unit/seq_packet_socket_service.exe \
+ tests/unit/redirect_error.exe \
tests/unit/serial_port.exe \
tests/unit/serial_port_base.exe \
- tests/unit/serial_port_service.exe \
tests/unit/signal_set.exe \
- tests/unit/signal_set_service.exe \
- tests/unit/socket_acceptor_service.exe \
tests/unit/socket_base.exe \
+ tests/unit/static_thread_pool.exe \
tests/unit/steady_timer.exe \
tests/unit/strand.exe \
- tests/unit/stream_socket_service.exe \
tests/unit/streambuf.exe \
+ tests/unit/system_context.exe \
+ tests/unit/system_executor.exe \
tests/unit/system_timer.exe \
+ tests/unit/this_coro.exe \
tests/unit/thread.exe \
+ tests/unit/thread_pool.exe \
tests/unit/time_traits.exe \
- tests/unit/waitable_timer_service.exe \
- tests/unit/windows/basic_handle.exe \
+ tests/unit/ts/buffer.exe \
+ tests/unit/ts/executor.exe \
+ tests/unit/ts/internet.exe \
+ tests/unit/ts/io_context.exe \
+ tests/unit/ts/net.exe \
+ tests/unit/ts/netfwd.exe \
+ tests/unit/ts/socket.exe \
+ tests/unit/ts/timer.exe \
+ tests/unit/use_awaitable.exe \
+ tests/unit/use_future.exe \
+ tests/unit/uses_executor.exe \
+ tests/unit/wait_traits.exe \
tests/unit/windows/basic_object_handle.exe \
+ tests/unit/windows/basic_overlapped_handle.exe \
tests/unit/windows/basic_random_access_handle.exe \
tests/unit/windows/basic_stream_handle.exe \
tests/unit/windows/object_handle.exe \
- tests/unit/windows/object_handle_service.exe \
+ tests/unit/windows/overlapped_handle.exe \
tests/unit/windows/overlapped_ptr.exe \
tests/unit/windows/random_access_handle.exe \
- tests/unit/windows/random_access_handle_service.exe \
tests/unit/windows/stream_handle.exe \
- tests/unit/windows/stream_handle_service.exe \
tests/unit/write.exe \
tests/unit/write_at.exe
-EXAMPLE_EXES = \
- examples/cpp03/allocation/server.exe \
- examples/cpp03/buffers/reference_counted.exe \
- examples/cpp03/chat/chat_client.exe \
- examples/cpp03/chat/chat_server.exe \
- examples/cpp03/echo/async_tcp_echo_server.exe \
- examples/cpp03/echo/async_udp_echo_server.exe \
- examples/cpp03/echo/blocking_tcp_echo_client.exe \
- examples/cpp03/echo/blocking_tcp_echo_server.exe \
- examples/cpp03/echo/blocking_udp_echo_client.exe \
- examples/cpp03/echo/blocking_udp_echo_server.exe \
- examples/cpp03/http/client/async_client.exe \
- examples/cpp03/http/client/sync_client.exe \
- examples/cpp03/icmp/ping.exe \
- examples/cpp03/invocation/prioritised_handlers.exe \
- examples/cpp03/iostreams/daytime_client.exe \
- examples/cpp03/iostreams/daytime_server.exe \
- examples/cpp03/iostreams/http_client.exe \
- examples/cpp03/multicast/receiver.exe \
- examples/cpp03/multicast/sender.exe \
- examples/cpp03/socks4/sync_client.exe \
- examples/cpp03/timeouts/async_tcp_client.exe \
- examples/cpp03/timeouts/blocking_tcp_client.exe \
- examples/cpp03/timeouts/blocking_udp_client.exe \
- examples/cpp03/timeouts/server.exe \
- examples/cpp03/timers/tick_count_timer.exe \
- examples/cpp03/timers/time_t_timer.exe \
- examples/cpp03/tutorial/timer1/timer.exe \
- examples/cpp03/tutorial/timer2/timer.exe \
- examples/cpp03/tutorial/timer3/timer.exe \
- examples/cpp03/tutorial/timer4/timer.exe \
- examples/cpp03/tutorial/timer5/timer.exe \
- examples/cpp03/tutorial/daytime1/client.exe \
- examples/cpp03/tutorial/daytime2/server.exe \
- examples/cpp03/tutorial/daytime3/server.exe \
- examples/cpp03/tutorial/daytime4/client.exe \
- examples/cpp03/tutorial/daytime5/server.exe \
- examples/cpp03/tutorial/daytime6/server.exe \
- examples/cpp03/tutorial/daytime7/server.exe \
- examples/cpp03/windows/transmit_file.exe
-
-OTHER_EXAMPLE_EXES = \
- examples/cpp03/http/server/http_server.exe \
- examples/cpp03/http/server2/http_server.exe \
- examples/cpp03/http/server3/http_server.exe \
- examples/cpp03/services/daytime_client.exe
+CPP11_EXAMPLE_EXES = \
+ examples/cpp11/allocation/server.exe \
+ examples/cpp11/buffers/reference_counted.exe \
+ examples/cpp11/chat/chat_client.exe \
+ examples/cpp11/chat/chat_server.exe \
+ examples/cpp11/echo/async_tcp_echo_server.exe \
+ examples/cpp11/echo/async_udp_echo_server.exe \
+ examples/cpp11/echo/blocking_tcp_echo_client.exe \
+ examples/cpp11/echo/blocking_tcp_echo_server.exe \
+ examples/cpp11/echo/blocking_udp_echo_client.exe \
+ examples/cpp11/echo/blocking_udp_echo_server.exe \
+ examples/cpp11/http/client/async_client.exe \
+ examples/cpp11/http/client/sync_client.exe \
+ examples/cpp11/http/server/http_server.exe \
+ examples/cpp11/http/server2/http_server.exe \
+ examples/cpp11/http/server3/http_server.exe \
+ examples/cpp11/http/server4/http_server.exe \
+ examples/cpp11/icmp/ping.exe \
+ examples/cpp11/invocation/prioritised_handlers.exe \
+ examples/cpp11/iostreams/daytime_client.exe \
+ examples/cpp11/iostreams/daytime_server.exe \
+ examples/cpp11/iostreams/http_client.exe \
+ examples/cpp11/multicast/receiver.exe \
+ examples/cpp11/multicast/sender.exe \
+ examples/cpp11/nonblocking/third_party_lib.exe \
+ examples/cpp11/porthopper/client.exe \
+ examples/cpp11/porthopper/server.exe \
+ examples/cpp11/services/daytime_client.exe \
+ examples/cpp11/socks4/sync_client.exe \
+ examples/cpp11/timeouts/async_tcp_client.exe \
+ examples/cpp11/timeouts/blocking_tcp_client.exe \
+ examples/cpp11/timeouts/blocking_token_tcp_client.exe \
+ examples/cpp11/timeouts/blocking_udp_client.exe \
+ examples/cpp11/timeouts/server.exe \
+ examples/cpp11/timers/time_t_timer.exe \
+ examples/cpp11/tutorial/timer1/timer.exe \
+ examples/cpp11/tutorial/timer2/timer.exe \
+ examples/cpp11/tutorial/timer3/timer.exe \
+ examples/cpp11/tutorial/timer4/timer.exe \
+ examples/cpp11/tutorial/timer5/timer.exe \
+ examples/cpp11/tutorial/daytime1/client.exe \
+ examples/cpp11/tutorial/daytime2/server.exe \
+ examples/cpp11/tutorial/daytime3/server.exe \
+ examples/cpp11/tutorial/daytime4/client.exe \
+ examples/cpp11/tutorial/daytime5/server.exe \
+ examples/cpp11/tutorial/daytime6/server.exe \
+ examples/cpp11/tutorial/daytime7/server.exe \
+ examples/cpp11/windows/transmit_file.exe
+ifdef STANDALONE
+all: \
+ $(SEPARATE_COMPILATION_LIB) \
+ $(EXAMPLE_EXES) \
+ $(UNIT_TEST_EXES)
+else
all: \
+ $(SEPARATE_COMPILATION_LIB) \
$(PERFORMANCE_TEST_EXES) \
- $(UNIT_TEST_EXES) \
$(EXAMPLE_EXES) \
- $(OTHER_EXAMPLE_EXES)
+ $(OTHER_EXAMPLE_EXES) \
+ $(UNIT_TEST_EXES)
+endif
+
+ifdef SEPARATE_COMPILATION
+libasio.a: asio.o
+ ar ru libasio.a asio.o
+endif
check: $(UNIT_TEST_EXES) $(addprefix run.,$(UNIT_TEST_EXES))
@@ -156,15 +238,11 @@ $(addprefix run.,$(UNIT_TEST_EXES))::
@echo.
clean:
- -rm -f $(PERFORMANCE_TEST_EXES)
- -rm -f $(PERFORMANCE_TEST_EXES:.exe=.o)
- -rm -f $(UNIT_TEST_OBJ)
- -rm -f $(UNIT_TEST_EXES)
- -rm -f $(UNIT_TEST_EXES:.exe=.o)
- -rm -f $(EXAMPLE_EXES)
- -rm -f $(EXAMPLE_EXES:.exe=.o)
- -rm -f $(OTHER_EXAMPLE_EXES)
- -rm -f $(OTHER_EXAMPLE_EXES:.exe=.o)
+ -del libasio.a asio.o
+ -del /q /s tests\*.exe
+ -del /q /s tests\*.o
+ -del /q /s examples\*.exe
+ -del /q /s examples\*.o
$(UNIT_TEST_EXES): %.exe: %.o
g++ -o$@ $(LDFLAGS) $< $(LIBS)
@@ -172,41 +250,41 @@ $(UNIT_TEST_EXES): %.exe: %.o
$(PERFORMANCE_TEST_EXES) $(EXAMPLE_EXES): %.exe: %.o
g++ -o$@ $(LDFLAGS) $< $(LIBS)
-examples/cpp03/http/server/http_server.exe: \
- examples/cpp03/http/server/connection.o \
- examples/cpp03/http/server/connection_manager.o \
- examples/cpp03/http/server/main.o \
- examples/cpp03/http/server/mime_types.o \
- examples/cpp03/http/server/reply.o \
- examples/cpp03/http/server/request_handler.o \
- examples/cpp03/http/server/request_parser.o \
- examples/cpp03/http/server/server.o
+examples/cpp11/http/server/http_server.exe: \
+ examples/cpp11/http/server/connection.o \
+ examples/cpp11/http/server/connection_manager.o \
+ examples/cpp11/http/server/main.o \
+ examples/cpp11/http/server/mime_types.o \
+ examples/cpp11/http/server/reply.o \
+ examples/cpp11/http/server/request_handler.o \
+ examples/cpp11/http/server/request_parser.o \
+ examples/cpp11/http/server/server.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
-examples/cpp03/http/server2/http_server.exe: \
- examples/cpp03/http/server2/connection.o \
- examples/cpp03/http/server2/io_context_pool.o \
- examples/cpp03/http/server2/main.o \
- examples/cpp03/http/server2/mime_types.o \
- examples/cpp03/http/server2/reply.o \
- examples/cpp03/http/server2/request_handler.o \
- examples/cpp03/http/server2/request_parser.o \
- examples/cpp03/http/server2/server.o
+examples/cpp11/http/server2/http_server.exe: \
+ examples/cpp11/http/server2/connection.o \
+ examples/cpp11/http/server2/io_context_pool.o \
+ examples/cpp11/http/server2/main.o \
+ examples/cpp11/http/server2/mime_types.o \
+ examples/cpp11/http/server2/reply.o \
+ examples/cpp11/http/server2/request_handler.o \
+ examples/cpp11/http/server2/request_parser.o \
+ examples/cpp11/http/server2/server.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
-examples/cpp03/http/server3/http_server.exe: \
- examples/cpp03/http/server3/connection.o \
- examples/cpp03/http/server3/main.o \
- examples/cpp03/http/server3/mime_types.o \
- examples/cpp03/http/server3/reply.o \
- examples/cpp03/http/server3/request_handler.o \
- examples/cpp03/http/server3/request_parser.o \
- examples/cpp03/http/server3/server.o
+examples/cpp11/http/server3/http_server.exe: \
+ examples/cpp11/http/server3/connection.o \
+ examples/cpp11/http/server3/main.o \
+ examples/cpp11/http/server3/mime_types.o \
+ examples/cpp11/http/server3/reply.o \
+ examples/cpp11/http/server3/request_handler.o \
+ examples/cpp11/http/server3/request_parser.o \
+ examples/cpp11/http/server3/server.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
-examples/cpp03/services/daytime_client.exe: \
- examples/cpp03/services/daytime_client.o \
- examples/cpp03/services/logger_service.o
+examples/cpp11/services/daytime_client.exe: \
+ examples/cpp11/services/daytime_client.o \
+ examples/cpp11/services/logger_service.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
.cpp.o:
diff --git a/3rdparty/asio/src/Makefile.msc b/3rdparty/asio/src/Makefile.msc
index 7cb1c56d7f2..840dc7bebfe 100644
--- a/3rdparty/asio/src/Makefile.msc
+++ b/3rdparty/asio/src/Makefile.msc
@@ -4,6 +4,10 @@ BOOSTDIR = ../../boost_1_34_1
COMMON_CXXFLAGS = -nologo -EHac -GR -I. -I../include
+!ifdef CXXLATEST
+STD_CXXFLAGS = -std:c++latest -permissive-
+!endif
+
!ifdef WARNINGS
WARNINGS_CXXFLAGS = -W4 -wd4512 -wd4447
!endif
@@ -34,7 +38,7 @@ TRACKING_CXXFLAGS = -DASIO_ENABLE_HANDLER_TRACKING
! ifdef STORE
_WIN32_WINNT=0x0603
! else
-_WIN32_WINNT=0x0501
+_WIN32_WINNT=0x0601
! endif
!endif
@@ -42,22 +46,26 @@ _WIN32_WINNT=0x0501
DEFINES = \
-DASIO_DISABLE_IOCP \
-D_WIN32_WINNT=$(_WIN32_WINNT) \
- -DBOOST_ALL_NO_LIB
+ -DBOOST_ALL_NO_LIB \
+ -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
!else
! ifdef STORE
DEFINES = \
-DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP \
-DBOOST_ALL_NO_LIB -D_WIN32_WINNT=$(_WIN32_WINNT) \
- -DUNICODE -D_UNICODE
+ -DUNICODE -D_UNICODE \
+ -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
! else
! ifdef WINRT
DEFINES = \
-ZW -FI SDKDDKVer.h -FI winapifamily.h -DWINAPI_FAMILY=WINAPI_PARTITION_APP \
- -DBOOST_ALL_NO_LIB
+ -DBOOST_ALL_NO_LIB \
+ -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
! else
DEFINES = \
-D_WIN32_WINNT=$(_WIN32_WINNT) \
- -DBOOST_ALL_NO_LIB
+ -DBOOST_ALL_NO_LIB \
+ -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
! endif
! endif
!endif
@@ -72,11 +80,12 @@ SEPARATE_COMPILATION_CXXFLAGS = \
!ifdef STANDALONE
STANDALONE_CXXFLAGS = -DASIO_STANDALONE
!else
-STANDALONE_CXXFLAGS = -I$(BOOSTDIR)
+STANDALONE_CXXFLAGS = -I$(BOOSTDIR) -DASIO_ENABLE_BOOST
!endif
CXXFLAGS = \
$(COMMON_CXXFLAGS) \
+ $(STD_CXXFLAGS) \
$(WARNINGS_CXXFLAGS) \
$(DEBUG_CXXFLAGS) \
$(UNICODE_CXXFLAGS) \
@@ -106,28 +115,72 @@ PERFORMANCE_TEST_EXES = \
tests\performance\server.exe
UNIT_TEST_EXES = \
+ tests\unit\any_completion_executor.exe \
+ tests\unit\any_completion_handler.exe \
+ tests\unit\any_io_executor.exe \
+ tests\unit\append.exe \
+ tests\unit\as_tuple.exe \
+ tests\unit\associated_allocator.exe \
+ tests\unit\associated_cancellation_slot.exe \
+ tests\unit\associated_executor.exe \
+ tests\unit\associator.exe \
+ tests\unit\async_result.exe \
+ tests\unit\awaitable.exe \
tests\unit\basic_datagram_socket.exe \
tests\unit\basic_deadline_timer.exe \
+ tests\unit\basic_file.exe \
+ tests\unit\basic_random_access_file.exe \
tests\unit\basic_raw_socket.exe \
+ tests\unit\basic_readable_pipe.exe \
tests\unit\basic_seq_packet_socket.exe \
tests\unit\basic_serial_port.exe \
tests\unit\basic_signal_set.exe \
+ tests\unit\basic_socket.exe \
tests\unit\basic_socket_acceptor.exe \
+ tests\unit\basic_stream_file.exe \
tests\unit\basic_stream_socket.exe \
tests\unit\basic_streambuf.exe \
tests\unit\basic_waitable_timer.exe \
+ tests\unit\basic_writable_pipe.exe \
+ tests\unit\bind_allocator.exe \
+ tests\unit\bind_cancellation_slot.exe \
+ tests\unit\bind_executor.exe \
+ tests\unit\bind_immediate_executor.exe \
tests\unit\buffered_read_stream.exe \
tests\unit\buffered_stream.exe \
tests\unit\buffered_write_stream.exe \
tests\unit\buffer.exe \
+ tests\unit\buffer_registration.exe \
tests\unit\buffers_iterator.exe \
+ tests\unit\cancellation_signal.exe \
+ tests\unit\cancellation_state.exe \
+ tests\unit\cancellation_type.exe \
+ tests\unit\co_spawn.exe \
tests\unit\completion_condition.exe \
+ tests\unit\compose.exe \
tests\unit\connect.exe \
+ tests\unit\connect_pipe.exe \
tests\unit\coroutine.exe \
- tests\unit\datagram_socket_service.exe \
- tests\unit\deadline_timer_service.exe \
tests\unit\deadline_timer.exe \
+ tests\unit\defer.exe \
+ tests\unit\deferred.exe \
+ tests\unit\detached.exe \
+ tests\unit\dispatch.exe \
tests\unit\error.exe \
+ tests\unit\execution_context.exe \
+ tests\unit\execution\any_executor.exe \
+ tests\unit\execution\blocking.exe \
+ tests\unit\execution\blocking_adaptation.exe \
+ tests\unit\execution\context_as.exe \
+ tests\unit\execution\executor.exe \
+ tests\unit\execution\invocable_archetype.exe \
+ tests\unit\execution\mapping.exe \
+ tests\unit\execution\outstanding_work.exe \
+ tests\unit\execution\prefer_only.exe \
+ tests\unit\execution\relationship.exe \
+ tests\unit\executor.exe \
+ tests\unit\executor_work_guard.exe \
+ tests\unit\file_base.exe \
tests\unit\generic\basic_endpoint.exe \
tests\unit\generic\datagram_protocol.exe \
tests\unit\generic\raw_protocol.exe \
@@ -135,9 +188,14 @@ UNIT_TEST_EXES = \
tests\unit\generic\stream_protocol.exe \
tests\unit\high_resolution_timer.exe \
tests\unit\io_context.exe \
+ tests\unit\io_context_strand.exe \
tests\unit\ip\address.exe \
tests\unit\ip\address_v4.exe \
+ tests\unit\ip\address_v4_iterator.exe \
+ tests\unit\ip\address_v4_range.exe \
tests\unit\ip\address_v6.exe \
+ tests\unit\ip\address_v6_iterator.exe \
+ tests\unit\ip\address_v6_range.exe \
tests\unit\ip\basic_endpoint.exe \
tests\unit\ip\basic_resolver.exe \
tests\unit\ip\basic_resolver_entry.exe \
@@ -146,97 +204,121 @@ UNIT_TEST_EXES = \
tests\unit\ip\host_name.exe \
tests\unit\ip\icmp.exe \
tests\unit\ip\multicast.exe \
+ tests\unit\ip\network_v4.exe \
+ tests\unit\ip\network_v6.exe \
tests\unit\ip\resolver_query_base.exe \
- tests\unit\ip\resolver_service.exe \
tests\unit\ip\tcp.exe \
tests\unit\ip\udp.exe \
tests\unit\ip\unicast.exe \
tests\unit\ip\v6_only.exe \
+ tests\unit\local\basic_endpoint.exe \
+ tests\unit\local\connect_pair.exe \
+ tests\unit\local\datagram_protocol.exe \
+ tests\unit\local\stream_protocol.exe \
tests\unit\is_read_buffered.exe \
tests\unit\is_write_buffered.exe \
+ tests\unit\packaged_task.exe \
tests\unit\placeholders.exe \
- tests\unit\raw_socket_service.exe \
+ tests\unit\post.exe \
+ tests\unit\prepend.exe \
+ tests\unit\random_access_file.exe \
tests\unit\read.exe \
tests\unit\read_at.exe \
tests\unit\read_until.exe \
- tests\unit\seq_packet_socket_service.exe \
+ tests\unit\readable_pipe.exe \
+ tests\unit\recycling_allocator.exe \
+ tests\unit\redirect_error.exe \
+ tests\unit\registered_buffer.exe \
tests\unit\serial_port.exe \
tests\unit\serial_port_base.exe \
- tests\unit\serial_port_service.exe \
tests\unit\signal_set.exe \
- tests\unit\signal_set_service.exe \
- tests\unit\socket_acceptor_service.exe \
+ tests\unit\signal_set_base.exe \
tests\unit\socket_base.exe \
- tests\unit\strand.exe \
+ tests\unit\static_thread_pool.exe \
tests\unit\steady_timer.exe \
- tests\unit\stream_socket_service.exe \
+ tests\unit\strand.exe \
+ tests\unit\stream_file.exe \
tests\unit\streambuf.exe \
+ tests\unit\system_context.exe \
+ tests\unit\system_executor.exe \
tests\unit\system_timer.exe \
+ tests\unit\this_coro.exe \
tests\unit\thread.exe \
+ tests\unit\thread_pool.exe \
tests\unit\time_traits.exe \
- tests\unit\waitable_timer_service.exe \
- tests\unit\windows\basic_handle.exe \
+ tests\unit\ts\buffer.exe \
+ tests\unit\ts\executor.exe \
+ tests\unit\ts\internet.exe \
+ tests\unit\ts\io_context.exe \
+ tests\unit\ts\net.exe \
+ tests\unit\ts\netfwd.exe \
+ tests\unit\ts\socket.exe \
+ tests\unit\ts\timer.exe \
+ tests\unit\use_awaitable.exe \
+ tests\unit\use_future.exe \
+ tests\unit\uses_executor.exe \
+ tests\unit\wait_traits.exe \
tests\unit\windows\basic_object_handle.exe \
+ tests\unit\windows\basic_overlapped_handle.exe \
tests\unit\windows\basic_random_access_handle.exe \
tests\unit\windows\basic_stream_handle.exe \
tests\unit\windows\object_handle.exe \
- tests\unit\windows\object_handle_service.exe \
+ tests\unit\windows\overlapped_handle.exe \
tests\unit\windows\overlapped_ptr.exe \
tests\unit\windows\random_access_handle.exe \
- tests\unit\windows\random_access_handle_service.exe \
tests\unit\windows\stream_handle.exe \
- tests\unit\windows\stream_handle_service.exe \
+ tests\unit\writable_pipe.exe \
tests\unit\write.exe \
tests\unit\write_at.exe
-CPP03_EXAMPLE_EXES = \
- examples\cpp03\allocation\server.exe \
- examples\cpp03\buffers\reference_counted.exe \
- examples\cpp03\chat\chat_client.exe \
- examples\cpp03\chat\chat_server.exe \
- examples\cpp03\echo\async_tcp_echo_server.exe \
- examples\cpp03\echo\async_udp_echo_server.exe \
- examples\cpp03\echo\blocking_tcp_echo_client.exe \
- examples\cpp03\echo\blocking_tcp_echo_server.exe \
- examples\cpp03\echo\blocking_udp_echo_client.exe \
- examples\cpp03\echo\blocking_udp_echo_server.exe \
- examples\cpp03\http\client\async_client.exe \
- examples\cpp03\http\client\sync_client.exe \
- examples\cpp03\http\server\http_server.exe \
- examples\cpp03\http\server2\http_server.exe \
- examples\cpp03\http\server3\http_server.exe \
- examples\cpp03\http\server4\http_server.exe \
- examples\cpp03\icmp\ping.exe \
- examples\cpp03\invocation\prioritised_handlers.exe \
- examples\cpp03\iostreams\daytime_client.exe \
- examples\cpp03\iostreams\daytime_server.exe \
- examples\cpp03\iostreams\http_client.exe \
- examples\cpp03\multicast\receiver.exe \
- examples\cpp03\multicast\sender.exe \
- examples\cpp03\nonblocking\third_party_lib.exe \
- examples\cpp03\porthopper\client.exe \
- examples\cpp03\porthopper\server.exe \
- examples\cpp03\services\daytime_client.exe \
- examples\cpp03\socks4\sync_client.exe \
- examples\cpp03\timeouts\async_tcp_client.exe \
- examples\cpp03\timeouts\blocking_tcp_client.exe \
- examples\cpp03\timeouts\blocking_udp_client.exe \
- examples\cpp03\timeouts\server.exe \
- examples\cpp03\timers\tick_count_timer.exe \
- examples\cpp03\timers\time_t_timer.exe \
- examples\cpp03\tutorial\timer1\timer.exe \
- examples\cpp03\tutorial\timer2\timer.exe \
- examples\cpp03\tutorial\timer3\timer.exe \
- examples\cpp03\tutorial\timer4\timer.exe \
- examples\cpp03\tutorial\timer5\timer.exe \
- examples\cpp03\tutorial\daytime1\client.exe \
- examples\cpp03\tutorial\daytime2\server.exe \
- examples\cpp03\tutorial\daytime3\server.exe \
- examples\cpp03\tutorial\daytime4\client.exe \
- examples\cpp03\tutorial\daytime5\server.exe \
- examples\cpp03\tutorial\daytime6\server.exe \
- examples\cpp03\tutorial\daytime7\server.exe \
- examples\cpp03\windows\transmit_file.exe
+CPP11_EXAMPLE_EXES = \
+ examples\cpp11\allocation\server.exe \
+ examples\cpp11\buffers\reference_counted.exe \
+ examples\cpp11\chat\chat_client.exe \
+ examples\cpp11\chat\chat_server.exe \
+ examples\cpp11\echo\async_tcp_echo_server.exe \
+ examples\cpp11\echo\async_udp_echo_server.exe \
+ examples\cpp11\echo\blocking_tcp_echo_client.exe \
+ examples\cpp11\echo\blocking_tcp_echo_server.exe \
+ examples\cpp11\echo\blocking_udp_echo_client.exe \
+ examples\cpp11\echo\blocking_udp_echo_server.exe \
+ examples\cpp11\http\client\async_client.exe \
+ examples\cpp11\http\client\sync_client.exe \
+ examples\cpp11\http\server\http_server.exe \
+ examples\cpp11\http\server2\http_server.exe \
+ examples\cpp11\http\server3\http_server.exe \
+ examples\cpp11\http\server4\http_server.exe \
+ examples\cpp11\icmp\ping.exe \
+ examples\cpp11\invocation\prioritised_handlers.exe \
+ examples\cpp11\iostreams\daytime_client.exe \
+ examples\cpp11\iostreams\daytime_server.exe \
+ examples\cpp11\iostreams\http_client.exe \
+ examples\cpp11\multicast\receiver.exe \
+ examples\cpp11\multicast\sender.exe \
+ examples\cpp11\nonblocking\third_party_lib.exe \
+ examples\cpp11\porthopper\client.exe \
+ examples\cpp11\porthopper\server.exe \
+ examples\cpp11\services\daytime_client.exe \
+ examples\cpp11\socks4\sync_client.exe \
+ examples\cpp11\timeouts\async_tcp_client.exe \
+ examples\cpp11\timeouts\blocking_tcp_client.exe \
+ examples\cpp11\timeouts\blocking_token_tcp_client.exe \
+ examples\cpp11\timeouts\blocking_udp_client.exe \
+ examples\cpp11\timeouts\server.exe \
+ examples\cpp11\timers\time_t_timer.exe \
+ examples\cpp11\tutorial\timer1\timer.exe \
+ examples\cpp11\tutorial\timer2\timer.exe \
+ examples\cpp11\tutorial\timer3\timer.exe \
+ examples\cpp11\tutorial\timer4\timer.exe \
+ examples\cpp11\tutorial\timer5\timer.exe \
+ examples\cpp11\tutorial\daytime1\client.exe \
+ examples\cpp11\tutorial\daytime2\server.exe \
+ examples\cpp11\tutorial\daytime3\server.exe \
+ examples\cpp11\tutorial\daytime4\client.exe \
+ examples\cpp11\tutorial\daytime5\server.exe \
+ examples\cpp11\tutorial\daytime6\server.exe \
+ examples\cpp11\tutorial\daytime7\server.exe \
+ examples\cpp11\windows\transmit_file.exe
SSL_UNIT_TEST_EXES = \
tests\unit\ssl\basic_context.exe \
@@ -249,8 +331,8 @@ SSL_UNIT_TEST_EXES = \
tests\unit\ssl\stream_service.exe
SSL_EXAMPLE_EXES = \
- examples\cpp03\ssl\client.exe \
- examples\cpp03\ssl\server.exe
+ examples\cpp11\ssl\client.exe \
+ examples\cpp11\ssl\server.exe
!ifdef SEPARATE_COMPILATION
all: asio.lib
@@ -261,13 +343,14 @@ asio.lib: asio.cpp
!ifdef STANDALONE
all: \
+ $(CPP11_EXAMPLE_EXES) \
$(UNIT_TEST_EXES)
!else
all: \
$(LATENCY_TEST_EXES) \
$(PERFORMANCE_TEST_EXES) \
- $(UNIT_TEST_EXES) \
- $(CPP03_EXAMPLE_EXES)
+ $(CPP11_EXAMPLE_EXES) \
+ $(UNIT_TEST_EXES)
!endif
ssl: \
@@ -289,150 +372,165 @@ tests\unit\unit_test.obj: tests\unit\unit_test.cpp
{tests\unit}.cpp{tests\unit}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+{tests\unit\execution}.cpp{tests\unit\execution}.exe:
+ cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+
{tests\unit\generic}.cpp{tests\unit\generic}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
{tests\unit\ip}.cpp{tests\unit\ip}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+{tests\unit\local}.cpp{tests\unit\local}.exe:
+ cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+
{tests\unit\ssl}.cpp{tests\unit\ssl}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(SSL_CXXFLAGS) $(DEFINES) $< $(SSL_LIBS) $(LIBS) -link -opt:ref
+{tests\unit\ts}.cpp{tests\unit\ts}.exe:
+ cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+
{tests\unit\windows}.cpp{tests\unit\windows}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\allocation}.cpp{examples\cpp03\allocation}.exe:
+{examples\cpp11\allocation}.cpp{examples\cpp11\allocation}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\buffers}.cpp{examples\cpp03\buffers}.exe:
+{examples\cpp11\buffers}.cpp{examples\cpp11\buffers}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\chat}.cpp{examples\cpp03\chat}.exe:
+{examples\cpp11\chat}.cpp{examples\cpp11\chat}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\echo}.cpp{examples\cpp03\echo}.exe:
+{examples\cpp11\echo}.cpp{examples\cpp11\echo}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\http\client}.cpp{examples\cpp03\http\client}.exe:
+{examples\cpp11\http\client}.cpp{examples\cpp11\http\client}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\icmp}.cpp{examples\cpp03\icmp}.exe:
+{examples\cpp11\icmp}.cpp{examples\cpp11\icmp}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\invocation}.cpp{examples\cpp03\invocation}.exe:
+{examples\cpp11\invocation}.cpp{examples\cpp11\invocation}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\iostreams}.cpp{examples\cpp03\iostreams}.exe:
+{examples\cpp11\iostreams}.cpp{examples\cpp11\iostreams}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\multicast}.cpp{examples\cpp03\multicast}.exe:
+{examples\cpp11\multicast}.cpp{examples\cpp11\multicast}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\nonblocking}.cpp{examples\cpp03\nonblocking}.exe:
+{examples\cpp11\nonblocking}.cpp{examples\cpp11\nonblocking}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\porthopper}.cpp{examples\cpp03\porthopper}.exe:
+{examples\cpp11\porthopper}.cpp{examples\cpp11\porthopper}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\socks4}.cpp{examples\cpp03\socks4}.exe:
+{examples\cpp11\socks4}.cpp{examples\cpp11\socks4}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\ssl}.cpp{examples\cpp03\ssl}.exe:
+{examples\cpp11\ssl}.cpp{examples\cpp11\ssl}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(SSL_CXXFLAGS) $(DEFINES) $< $(SSL_LIBS) $(LIBS) -link -opt:ref
-{examples\cpp03\timeouts}.cpp{examples\cpp03\timeouts}.exe:
+{examples\cpp11\timeouts}.cpp{examples\cpp11\timeouts}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\timers}.cpp{examples\cpp03\timers}.exe:
+{examples\cpp11\timers}.cpp{examples\cpp11\timers}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer1}.cpp{examples\cpp03\tutorial\timer1}.exe:
+{examples\cpp11\tutorial\timer1}.cpp{examples\cpp11\tutorial\timer1}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer2}.cpp{examples\cpp03\tutorial\timer2}.exe:
+{examples\cpp11\tutorial\timer2}.cpp{examples\cpp11\tutorial\timer2}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer3}.cpp{examples\cpp03\tutorial\timer3}.exe:
+{examples\cpp11\tutorial\timer3}.cpp{examples\cpp11\tutorial\timer3}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer4}.cpp{examples\cpp03\tutorial\timer4}.exe:
+{examples\cpp11\tutorial\timer4}.cpp{examples\cpp11\tutorial\timer4}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer5}.cpp{examples\cpp03\tutorial\timer5}.exe:
+{examples\cpp11\tutorial\timer5}.cpp{examples\cpp11\tutorial\timer5}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime1}.cpp{examples\cpp03\tutorial\daytime1}.exe:
+{examples\cpp11\tutorial\daytime1}.cpp{examples\cpp11\tutorial\daytime1}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime2}.cpp{examples\cpp03\tutorial\daytime2}.exe:
+{examples\cpp11\tutorial\daytime2}.cpp{examples\cpp11\tutorial\daytime2}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime3}.cpp{examples\cpp03\tutorial\daytime3}.exe:
+{examples\cpp11\tutorial\daytime3}.cpp{examples\cpp11\tutorial\daytime3}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime4}.cpp{examples\cpp03\tutorial\daytime4}.exe:
+{examples\cpp11\tutorial\daytime4}.cpp{examples\cpp11\tutorial\daytime4}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime5}.cpp{examples\cpp03\tutorial\daytime5}.exe:
+{examples\cpp11\tutorial\daytime5}.cpp{examples\cpp11\tutorial\daytime5}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime6}.cpp{examples\cpp03\tutorial\daytime6}.exe:
+{examples\cpp11\tutorial\daytime6}.cpp{examples\cpp11\tutorial\daytime6}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime7}.cpp{examples\cpp03\tutorial\daytime7}.exe:
+{examples\cpp11\tutorial\daytime7}.cpp{examples\cpp11\tutorial\daytime7}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\windows}.cpp{examples\cpp03\windows}.exe:
+{examples\cpp11\windows}.cpp{examples\cpp11\windows}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
{examples\cpp11\executors}.cpp{examples\cpp11\executors}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-examples\cpp03\http\server\http_server.exe: \
- examples\cpp03\http\server\connection.cpp \
- examples\cpp03\http\server\connection_manager.cpp \
- examples\cpp03\http\server\main.cpp \
- examples\cpp03\http\server\mime_types.cpp \
- examples\cpp03\http\server\reply.cpp \
- examples\cpp03\http\server\request_handler.cpp \
- examples\cpp03\http\server\request_parser.cpp \
- examples\cpp03\http\server\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\http\server2\http_server.exe: \
- examples\cpp03\http\server2\connection.cpp \
- examples\cpp03\http\server2\io_context_pool.cpp \
- examples\cpp03\http\server2\main.cpp \
- examples\cpp03\http\server2\mime_types.cpp \
- examples\cpp03\http\server2\reply.cpp \
- examples\cpp03\http\server2\request_handler.cpp \
- examples\cpp03\http\server2\request_parser.cpp \
- examples\cpp03\http\server2\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server2\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\http\server3\http_server.exe: \
- examples\cpp03\http\server3\connection.cpp \
- examples\cpp03\http\server3\main.cpp \
- examples\cpp03\http\server3\mime_types.cpp \
- examples\cpp03\http\server3\reply.cpp \
- examples\cpp03\http\server3\request_handler.cpp \
- examples\cpp03\http\server3\request_parser.cpp \
- examples\cpp03\http\server3\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server3\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\http\server4\http_server.exe: \
- examples\cpp03\http\server4\file_handler.cpp \
- examples\cpp03\http\server4\main.cpp \
- examples\cpp03\http\server4\mime_types.cpp \
- examples\cpp03\http\server4\reply.cpp \
- examples\cpp03\http\server4\request_parser.cpp \
- examples\cpp03\http\server4\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server4\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\services\daytime_client.exe: \
- examples\cpp03\services\daytime_client.cpp \
- examples\cpp03\services\logger_service.cpp
- cl -Fe$@ -Foexamples\cpp03\services\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+{examples\cpp11\operations}.cpp{examples\cpp11\operations}.exe:
+ cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+
+{examples\cpp14\operations}.cpp{examples\cpp14\operations}.exe:
+ cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server\http_server.exe: \
+ examples\cpp11\http\server\connection.cpp \
+ examples\cpp11\http\server\connection_manager.cpp \
+ examples\cpp11\http\server\main.cpp \
+ examples\cpp11\http\server\mime_types.cpp \
+ examples\cpp11\http\server\reply.cpp \
+ examples\cpp11\http\server\request_handler.cpp \
+ examples\cpp11\http\server\request_parser.cpp \
+ examples\cpp11\http\server\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server2\http_server.exe: \
+ examples\cpp11\http\server2\connection.cpp \
+ examples\cpp11\http\server2\io_context_pool.cpp \
+ examples\cpp11\http\server2\main.cpp \
+ examples\cpp11\http\server2\mime_types.cpp \
+ examples\cpp11\http\server2\reply.cpp \
+ examples\cpp11\http\server2\request_handler.cpp \
+ examples\cpp11\http\server2\request_parser.cpp \
+ examples\cpp11\http\server2\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server2\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server3\http_server.exe: \
+ examples\cpp11\http\server3\connection.cpp \
+ examples\cpp11\http\server3\main.cpp \
+ examples\cpp11\http\server3\mime_types.cpp \
+ examples\cpp11\http\server3\reply.cpp \
+ examples\cpp11\http\server3\request_handler.cpp \
+ examples\cpp11\http\server3\request_parser.cpp \
+ examples\cpp11\http\server3\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server3\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server4\http_server.exe: \
+ examples\cpp11\http\server4\file_handler.cpp \
+ examples\cpp11\http\server4\main.cpp \
+ examples\cpp11\http\server4\mime_types.cpp \
+ examples\cpp11\http\server4\reply.cpp \
+ examples\cpp11\http\server4\request_parser.cpp \
+ examples\cpp11\http\server4\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server4\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\services\daytime_client.exe: \
+ examples\cpp11\services\daytime_client.cpp \
+ examples\cpp11\services\logger_service.cpp
+ cl -Fe$@ -Foexamples\cpp11\services\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
clean:
-del /q /s asio.lib
diff --git a/3rdparty/asio/src/asio.cpp b/3rdparty/asio/src/asio.cpp
index 2125d620fee..bd919afb87c 100644
--- a/3rdparty/asio/src/asio.cpp
+++ b/3rdparty/asio/src/asio.cpp
@@ -2,7 +2,7 @@
// asio.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/asio_ssl.cpp b/3rdparty/asio/src/asio_ssl.cpp
index 68a16c0c5f1..6a5a626a69a 100644
--- a/3rdparty/asio/src/asio_ssl.cpp
+++ b/3rdparty/asio/src/asio_ssl.cpp
@@ -2,7 +2,7 @@
// asio_ssl.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/doc/.gitignore b/3rdparty/asio/src/doc/.gitignore
deleted file mode 100644
index 32e513ae33f..00000000000
--- a/3rdparty/asio/src/doc/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-html
-reference.tags
-asio.docbook
-*.pdf
diff --git a/3rdparty/asio/src/doc/Jamfile.v2 b/3rdparty/asio/src/doc/Jamfile.v2
deleted file mode 100644
index 3e22af7cffe..00000000000
--- a/3rdparty/asio/src/doc/Jamfile.v2
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Copyright (c) 2003-2016 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)
-#
-
-project asio-doc ;
-
-import os ;
-local boost = [ os.environ BOOST_ROOT ] ;
-
-using quickbook ;
-
-xml asio : asio.qbk ;
-
-boostbook standalone
- :
- asio
- :
- <xsl:param>boost.image.src=asio.png
- <xsl:param>boost.image.alt="asio C++ library"
- <xsl:param>boost.image.w=250
- <xsl:param>boost.image.h=60
- <xsl:param>nav.layout=none
- <xsl:param>navig.graphics.path=""
- <xsl:param>admon.graphics.path=""
- <xsl:param>chapter.autolabel=0
- <xsl:param>chunk.section.depth=8
- <xsl:param>chunk.first.sections=1
- <xsl:param>toc.section.depth=2
- <xsl:param>toc.max.depth=1
- <xsl:param>generate.section.toc.level=1
- <xsl:param>generate.toc="chapter nop section nop"
- ;
-
-install html
- :
- $(boost)/doc/src/boostbook.css
- $(boost)/doc/src/images/blank.png
- $(boost)/doc/src/images/caution.png
- $(boost)/doc/src/images/draft.png
- $(boost)/doc/src/images/home.png
- $(boost)/doc/src/images/important.png
- $(boost)/doc/src/images/next_disabled.png
- $(boost)/doc/src/images/next.png
- $(boost)/doc/src/images/note.png
- $(boost)/doc/src/images/prev_disabled.png
- $(boost)/doc/src/images/prev.png
- $(boost)/doc/src/images/tip.png
- $(boost)/doc/src/images/up_disabled.png
- $(boost)/doc/src/images/up.png
- $(boost)/doc/src/images/warning.png
- overview/proactor.png
- overview/sync_op.png
- overview/async_op1.png
- overview/async_op2.png
- asio.png
- ;
-
-install asioref : standalone : <location>. <format>docbook ;
-explicit asioref ;
diff --git a/3rdparty/asio/src/doc/asio.png b/3rdparty/asio/src/doc/asio.png
deleted file mode 100644
index c05fd3a4514..00000000000
--- a/3rdparty/asio/src/doc/asio.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/asio/src/doc/asio.qbk b/3rdparty/asio/src/doc/asio.qbk
deleted file mode 100644
index 68cc2e0e4d2..00000000000
--- a/3rdparty/asio/src/doc/asio.qbk
+++ /dev/null
@@ -1,116 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[library Asio
- [quickbook 1.4]
- [copyright 2003 - 2016 Christopher M. Kohlhoff]
- [purpose Networking library]
- [license
- 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])
- ]
- [category template]
- [category generic]
-]
-
-[template mdash[] '''&mdash; ''']
-[template half_open_range[text] '''&#91;'''[text])]
-[template indexterm1[id term1] '''<indexterm id="'''[id]'''"><primary>'''[term1]'''</primary></indexterm>''']
-[template indexterm2[id term1 term2] '''<indexterm id="'''[id]'''"><primary>'''[term1]'''</primary><secondary>'''[term2]'''</secondary></indexterm>''']
-[template inline_note[text] \[['Note:] [text] '''&mdash;'''['end note]\] ]
-[template ticket[number]'''<ulink url="https://svn.boost.org/trac/boost/ticket/'''[number]'''">'''#[number]'''</ulink>''']
-[def __POSIX__ /POSIX/]
-[def __Windows__ /Windows/]
-[def __accept__ [@http://www.opengroup.org/onlinepubs/000095399/functions/accept.html `accept()`]]
-[def __connect__ [@http://www.opengroup.org/onlinepubs/000095399/functions/connect.html `connect()`]]
-[def __getpeername__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getpeername.html `getpeername()`]]
-[def __getsockname__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getsockname.html `getsockname()`]]
-[def __getsockopt__ [@http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html `getsockopt()`]]
-[def __ioctl__ [@http://www.opengroup.org/onlinepubs/000095399/functions/ioctl.html `ioctl()`]]
-[def __poll__ [@http://www.opengroup.org/onlinepubs/000095399/functions/poll.html `poll()`]]
-[def __recvfrom__ [@http://www.opengroup.org/onlinepubs/000095399/functions/recvfrom.html `recvfrom()`]]
-[def __sendto__ [@http://www.opengroup.org/onlinepubs/000095399/functions/sendto.html `sendto()`]]
-[def __setsockopt__ [@http://www.opengroup.org/onlinepubs/000095399/functions/setsockopt.html `setsockopt()`]]
-[def __shutdown__ [@http://www.opengroup.org/onlinepubs/000095399/functions/shutdown.html `shutdown()`]]
-[def __socket__ [@http://www.opengroup.org/onlinepubs/000095399/functions/socket.html `socket()`]]
-
-[/=============================================================================]
-
-Asio is a cross-platform C++ library for network and low-level I/O programming
-that provides developers with a consistent asynchronous model using a modern
-C++ approach.
-
-[variablelist
- [
- [
- [link asio.overview Overview]
- ]
- [
- An overview of the features included in Asio, plus rationale and design information.
- ]
- ]
- [
- [
- [link asio.using Using Asio]
- ]
- [
- How to use Asio in your applications. Includes information on
- library dependencies and supported platforms.
- ]
- ]
- [
- [
- [link asio.tutorial Tutorial]
- ]
- [
- A tutorial that introduces the fundamental concepts required to use
- Asio, and shows how to use Asio to develop simple client and
- server programs.
- ]
- ]
- [
- [
- [link asio.examples Examples]
- ]
- [
- Examples that illustrate the use of Asio in more complex applications.
- ]
- ]
- [
- [
- [link asio.reference Reference]
- ]
- [
- Detailed class and function reference.
- ]
- ]
- [
- [
- [link asio.history Revision History]
- ]
- [
- Log of Asio changes made in each release.
- ]
- ]
- [
- [
- [link asio.index Index]
- ]
- [
- Book-style text index of Asio documentation.
- ]
- ]
-]
-
-[include overview.qbk]
-[include using.qbk]
-[include tutorial.qbk]
-[include examples.qbk]
-[include reference.qbk]
-[include history.qbk]
-[xinclude index.xml]
diff --git a/3rdparty/asio/src/doc/asioref.sty b/3rdparty/asio/src/doc/asioref.sty
deleted file mode 100644
index 2bf5a8d0e91..00000000000
--- a/3rdparty/asio/src/doc/asioref.sty
+++ /dev/null
@@ -1,90 +0,0 @@
-%%
-%% This is a DocBook LaTeX style for Asio
-%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mybook}[2008/11/11 Asio DocBook Style]
-
-% The defined options
-\DeclareOption{hyperlink}{ \def\DBKhyperlink{yes} }
-\DeclareOption{nohyperlink}{ \def\DBKhyperlink{no} }
-
-% Default values
-\ExecuteOptions{nohyperlink}
-
-% If defined, process the options
-\ProcessOptions\relax
-
-% Needed packages
-\usepackage[top=2cm,bottom=2cm,left=1.5cm,right=1.5cm]{geometry}
-\usepackage{float}
-\usepackage{dbk_core}
-\usepackage{dbk_admonition}
-\usepackage{fancyvrb}
-
-% Text layout
-\setlength\parskip{\medskipamount}
-\setlength\parindent{0pt}
-\raggedbottom
-
-% Stuff we don't need
-\def\DBKinditem#1#2{}
-\newenvironment{DBKindtable}{}{}
-\newenvironment{DBKrevtable}{}{}
-\newenvironment{DBKlegalnotice}{}{}
-
-% Admonitions
-\floatstyle{boxed}
-\newfloat{DBKadmonition}{h}{lop}
-\newfloat{sidebar}{h}{lop}
-
-% Page break before sections
-\let\orig@section\section
-\renewcommand\section{
- \clearpage\orig@section
-}
-
-% Ensure line break after paragraph heading
-\renewcommand\paragraph{%
- \@startsection{paragraph}{4}{\z@}%
- {-2.25ex\@plus -1ex \@minus -.2ex}%
- {0.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}%
-}
-
-% Add page numbers to hyperlinks
-%\let\orig@hyperlink\hyperlink
-%\renewcommand{\hyperlink}[2]{
-% \orig@hyperlink{#1}{#2} (page \pageref{#1})
-%}
-
-% Extra indent on TOC section numbers
-\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{3.3em}}
-\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{4.2em}}
-\renewcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{5.1em}}
-
-% Title page
-\renewcommand\maketitle{
- \null
- \thispagestyle{empty}
- \begin{center}
- \null\vskip 7cm
- \begin{LARGE}
- asio C++ library
- \end{LARGE}
- \null\vskip 1cm
- \begin{large}
- \DBKsubtitle{}
- \end{large}
- \null\vskip 1cm
- \begin{Large}
- Reference Manual
- \end{Large}
- \null\vskip 5cm
- \begin{small}
- \DBKcopyright{}
- \end{small}
- \end{center}
- \vfill
- \null
- \cleardoublepage
-}
diff --git a/3rdparty/asio/src/doc/asioref.xsl b/3rdparty/asio/src/doc/asioref.xsl
deleted file mode 100644
index 09c6fefa45b..00000000000
--- a/3rdparty/asio/src/doc/asioref.xsl
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!--
- Copyright (c) 2003-2016 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)
--->
-
-<xsl:output method="xml"/>
-<xsl:strip-space elements="title"/>
-
-<xsl:param name="asio.version">X.Y.Z</xsl:param>
-
-<xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
-</xsl:template>
-
-<xsl:template match="blockquote/para">
- <xsl:apply-templates select="para"/>
-</xsl:template>
-
-<xsl:template match="title/link">
- <xsl:value-of select="normalize-space(.)"/>
-</xsl:template>
-
-<xsl:template match="bridgehead[count(link) &gt; 0]">
- <xsl:element name="bridgehead">
- <xsl:attribute name="renderas">
- <xsl:value-of select="@renderas"/>
- </xsl:attribute>
- <xsl:value-of select="normalize-space(link)"/>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="chapter">
- <article id="asio" name="Asio Reference Manual" dirname="asio">
- <xsl:apply-templates select="chapterinfo"/>
- <title>Asio Reference Manual</title>
- <xsl:apply-templates select="section"/>
- </article>
-</xsl:template>
-
-<xsl:template match="chapterinfo">
- <articleinfo>
- <xsl:apply-templates select="*"/>
- <subtitle><xsl:value-of select="$asio.version"/></subtitle>
- </articleinfo>
-</xsl:template>
-
-<xsl:template match="section[@id='asio.reference']/informaltable">
- <xsl:element name="informaltable">
- <xsl:attribute name="role">scriptsize</xsl:attribute>
- <xsl:apply-templates select="*"/>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="section[@id='asio.examples']/*/listitem">
- <xsl:element name="listitem">
- <xsl:value-of select="substring-after(normalize-space(ulink), '../')"/>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="imagedata">
- <xsl:element name="imagedata">
- <xsl:attribute name="fileref">
- <xsl:value-of select="@fileref"/>
- </xsl:attribute>
- <xsl:attribute name="scale">75</xsl:attribute>
- <xsl:attribute name="align">center</xsl:attribute>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="programlisting/phrase">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="programlisting/link">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="programlisting/emphasis">
- <xsl:if test="not(contains(., 'more...'))">
- <emphasis><xsl:apply-templates/></emphasis>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="section[@id='asio.index']"></xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/3rdparty/asio/src/doc/boost_bind_dox.txt b/3rdparty/asio/src/doc/boost_bind_dox.txt
deleted file mode 100644
index 19c635d951a..00000000000
--- a/3rdparty/asio/src/doc/boost_bind_dox.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
-\page boost_bind boost::bind
-See the <a href="http://www.boost.org/libs/bind/bind.html">Boost: bind.hpp
-documentation</a> for more information on how to use <tt>boost::bind</tt>.
-*/
diff --git a/3rdparty/asio/src/doc/doxy2qbk.pl b/3rdparty/asio/src/doc/doxy2qbk.pl
deleted file mode 100644
index 9e4e2a2b387..00000000000
--- a/3rdparty/asio/src/doc/doxy2qbk.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (c) 2003-2016 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)
-
-use strict;
-
-system("doxygen reference.dox");
-chdir("xml");
-system("xsltproc combine.xslt index.xml > all.xml");
-chdir("..");
-system("xsltproc reference.xsl xml/all.xml > reference.qbk");
-system("rm -rf xml");
-
-system("doxygen tutorial.dox");
-chdir("xml");
-system("xsltproc combine.xslt index.xml > all.xml");
-chdir("..");
-system("xsltproc tutorial.xsl xml/all.xml > tutorial.qbk");
-system("rm -rf xml reference.tags");
diff --git a/3rdparty/asio/src/doc/examples.qbk b/3rdparty/asio/src/doc/examples.qbk
deleted file mode 100644
index 17310eef7fa..00000000000
--- a/3rdparty/asio/src/doc/examples.qbk
+++ /dev/null
@@ -1,419 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:examples Examples]
-
-
-* [link asio.examples.cpp03_examples C++03 Examples]: Illustrates the use of
-Asio using only C++03 language and library features. Where necessary, the
-examples make use of selected Boost C++ libraries.
-
-* [link asio.examples.cpp11_examples C++11 Examples]: Contains a limited set of
-the C++03 Asio examples, updated to use only C++11 library and language
-facilities. These examples do not make direct use of Boost C++ libraries.
-[/boostify: non-boost docs start here]
-To show the changes between C++03 and C++11, these examples include a diff
-between the C++03 and C++11 versions.
-[/boostify: non-boost docs end here]
-
-
-[section:cpp03_examples C++03 Examples]
-
-
-[heading Allocation]
-
-This example shows how to customise the allocation of memory associated with
-asynchronous operations.
-
-* [@../src/examples/cpp03/allocation/server.cpp]
-
-
-[heading Buffers]
-
-This example demonstrates how to create reference counted buffers that can be
-used with socket read and write operations.
-
-* [@../src/examples/cpp03/buffers/reference_counted.cpp]
-
-
-[heading Chat]
-
-This example implements a chat server and client. The programs use a custom
-protocol with a fixed length message header and variable length message body.
-
-* [@../src/examples/cpp03/chat/chat_message.hpp]
-* [@../src/examples/cpp03/chat/chat_client.cpp]
-* [@../src/examples/cpp03/chat/chat_server.cpp]
-
-The following POSIX-specific chat client demonstrates how to use the
-[link asio.reference.posix__stream_descriptor posix::stream_descriptor] class to
-perform console input and output.
-
-* [@../src/examples/cpp03/chat/posix_chat_client.cpp]
-
-
-[heading Echo]
-
-A collection of simple clients and servers, showing the use of both synchronous
-and asynchronous operations.
-
-* [@../src/examples/cpp03/echo/async_tcp_echo_server.cpp]
-* [@../src/examples/cpp03/echo/async_udp_echo_server.cpp]
-* [@../src/examples/cpp03/echo/blocking_tcp_echo_client.cpp]
-* [@../src/examples/cpp03/echo/blocking_tcp_echo_server.cpp]
-* [@../src/examples/cpp03/echo/blocking_udp_echo_client.cpp]
-* [@../src/examples/cpp03/echo/blocking_udp_echo_server.cpp]
-
-
-[heading Fork]
-
-These POSIX-specific examples show how to use Asio in conjunction with the
-`fork()` system call. The first example illustrates the steps required to start
-a daemon process:
-
-* [@../src/examples/cpp03/fork/daemon.cpp]
-
-The second example demonstrates how it is possible to fork a process from
-within a completion handler.
-
-* [@../src/examples/cpp03/fork/process_per_connection.cpp]
-
-
-[heading HTTP Client]
-
-Example programs implementing simple HTTP 1.0 clients. These examples show how
-to use the [link asio.reference.read_until read_until] and [link
-asio.reference.async_read_until async_read_until] functions.
-
-* [@../src/examples/cpp03/http/client/sync_client.cpp]
-* [@../src/examples/cpp03/http/client/async_client.cpp]
-
-
-[heading HTTP Server]
-
-This example illustrates the use of asio in a simple single-threaded server
-implementation of HTTP 1.0. It demonstrates how to perform a clean shutdown by
-cancelling all outstanding asynchronous operations.
-
-* [@../src/examples/cpp03/http/server/connection.cpp]
-* [@../src/examples/cpp03/http/server/connection.hpp]
-* [@../src/examples/cpp03/http/server/connection_manager.cpp]
-* [@../src/examples/cpp03/http/server/connection_manager.hpp]
-* [@../src/examples/cpp03/http/server/header.hpp]
-* [@../src/examples/cpp03/http/server/main.cpp]
-* [@../src/examples/cpp03/http/server/mime_types.cpp]
-* [@../src/examples/cpp03/http/server/mime_types.hpp]
-* [@../src/examples/cpp03/http/server/reply.cpp]
-* [@../src/examples/cpp03/http/server/reply.hpp]
-* [@../src/examples/cpp03/http/server/request.hpp]
-* [@../src/examples/cpp03/http/server/request_handler.cpp]
-* [@../src/examples/cpp03/http/server/request_handler.hpp]
-* [@../src/examples/cpp03/http/server/request_parser.cpp]
-* [@../src/examples/cpp03/http/server/request_parser.hpp]
-* [@../src/examples/cpp03/http/server/server.cpp]
-* [@../src/examples/cpp03/http/server/server.hpp]
-
-
-[heading HTTP Server 2]
-
-An HTTP server using an io_context-per-CPU design.
-
-* [@../src/examples/cpp03/http/server2/connection.cpp]
-* [@../src/examples/cpp03/http/server2/connection.hpp]
-* [@../src/examples/cpp03/http/server2/header.hpp]
-* [@../src/examples/cpp03/http/server2/io_context_pool.cpp]
-* [@../src/examples/cpp03/http/server2/io_context_pool.hpp]
-* [@../src/examples/cpp03/http/server2/main.cpp]
-* [@../src/examples/cpp03/http/server2/mime_types.cpp]
-* [@../src/examples/cpp03/http/server2/mime_types.hpp]
-* [@../src/examples/cpp03/http/server2/reply.cpp]
-* [@../src/examples/cpp03/http/server2/reply.hpp]
-* [@../src/examples/cpp03/http/server2/request.hpp]
-* [@../src/examples/cpp03/http/server2/request_handler.cpp]
-* [@../src/examples/cpp03/http/server2/request_handler.hpp]
-* [@../src/examples/cpp03/http/server2/request_parser.cpp]
-* [@../src/examples/cpp03/http/server2/request_parser.hpp]
-* [@../src/examples/cpp03/http/server2/server.cpp]
-* [@../src/examples/cpp03/http/server2/server.hpp]
-
-
-[heading HTTP Server 3]
-
-An HTTP server using a single io_context and a thread pool calling `io_context::run()`.
-
-* [@../src/examples/cpp03/http/server3/connection.cpp]
-* [@../src/examples/cpp03/http/server3/connection.hpp]
-* [@../src/examples/cpp03/http/server3/header.hpp]
-* [@../src/examples/cpp03/http/server3/main.cpp]
-* [@../src/examples/cpp03/http/server3/mime_types.cpp]
-* [@../src/examples/cpp03/http/server3/mime_types.hpp]
-* [@../src/examples/cpp03/http/server3/reply.cpp]
-* [@../src/examples/cpp03/http/server3/reply.hpp]
-* [@../src/examples/cpp03/http/server3/request.hpp]
-* [@../src/examples/cpp03/http/server3/request_handler.cpp]
-* [@../src/examples/cpp03/http/server3/request_handler.hpp]
-* [@../src/examples/cpp03/http/server3/request_parser.cpp]
-* [@../src/examples/cpp03/http/server3/request_parser.hpp]
-* [@../src/examples/cpp03/http/server3/server.cpp]
-* [@../src/examples/cpp03/http/server3/server.hpp]
-
-
-[heading HTTP Server 4]
-
-A single-threaded HTTP server implemented using stackless coroutines.
-
-* [@../src/examples/cpp03/http/server4/file_handler.cpp]
-* [@../src/examples/cpp03/http/server4/file_handler.hpp]
-* [@../src/examples/cpp03/http/server4/header.hpp]
-* [@../src/examples/cpp03/http/server4/main.cpp]
-* [@../src/examples/cpp03/http/server4/mime_types.cpp]
-* [@../src/examples/cpp03/http/server4/mime_types.hpp]
-* [@../src/examples/cpp03/http/server4/reply.cpp]
-* [@../src/examples/cpp03/http/server4/reply.hpp]
-* [@../src/examples/cpp03/http/server4/request.hpp]
-* [@../src/examples/cpp03/http/server4/request_parser.cpp]
-* [@../src/examples/cpp03/http/server4/request_parser.hpp]
-* [@../src/examples/cpp03/http/server4/server.cpp]
-* [@../src/examples/cpp03/http/server4/server.hpp]
-
-
-[heading ICMP]
-
-This example shows how to use raw sockets with ICMP to ping a remote host.
-
-* [@../src/examples/cpp03/icmp/ping.cpp]
-* [@../src/examples/cpp03/icmp/ipv4_header.hpp]
-* [@../src/examples/cpp03/icmp/icmp_header.hpp]
-
-
-[heading Invocation]
-
-This example shows how to customise handler invocation. Completion handlers are
-added to a priority queue rather than executed immediately.
-
-* [@../src/examples/cpp03/invocation/prioritised_handlers.cpp]
-
-
-[heading Iostreams]
-
-Two examples showing how to use [link asio.reference.ip__tcp.iostream
-ip::tcp::iostream].
-
-* [@../src/examples/cpp03/iostreams/daytime_client.cpp]
-* [@../src/examples/cpp03/iostreams/daytime_server.cpp]
-* [@../src/examples/cpp03/iostreams/http_client.cpp]
-
-
-[heading Multicast]
-
-An example showing the use of multicast to transmit packets to a group of
-subscribers.
-
-* [@../src/examples/cpp03/multicast/receiver.cpp]
-* [@../src/examples/cpp03/multicast/sender.cpp]
-
-
-[heading Serialization]
-
-This example shows how Boost.Serialization can be used with asio to encode and
-decode structures for transmission over a socket.
-
-* [@../src/examples/cpp03/serialization/client.cpp]
-* [@../src/examples/cpp03/serialization/connection.hpp]
-* [@../src/examples/cpp03/serialization/server.cpp]
-* [@../src/examples/cpp03/serialization/stock.hpp]
-
-
-[heading Services]
-
-This example demonstrates how to integrate custom functionality (in this case,
-for logging) into asio's [link asio.reference.io_context io_context], and
-how to use a custom service with [link
-asio.reference.basic_stream_socket basic_stream_socket<>].
-
-* [@../src/examples/cpp03/services/basic_logger.hpp]
-* [@../src/examples/cpp03/services/daytime_client.cpp]
-* [@../src/examples/cpp03/services/logger.hpp]
-* [@../src/examples/cpp03/services/logger_service.cpp]
-* [@../src/examples/cpp03/services/logger_service.hpp]
-* [@../src/examples/cpp03/services/stream_socket_service.hpp]
-
-
-[heading SOCKS 4]
-
-Example client program implementing the SOCKS 4 protocol for communication via
-a proxy.
-
-* [@../src/examples/cpp03/socks4/sync_client.cpp]
-* [@../src/examples/cpp03/socks4/socks4.hpp]
-
-
-[heading SSL]
-
-Example client and server programs showing the use of the [link
-asio.reference.ssl__stream ssl::stream<>] template with asynchronous operations.
-
-* [@../src/examples/cpp03/ssl/client.cpp]
-* [@../src/examples/cpp03/ssl/server.cpp]
-
-
-[heading Timeouts]
-
-A collection of examples showing how to cancel long running asynchronous
-operations after a period of time.
-
-* [@../src/examples/cpp03/timeouts/async_tcp_client.cpp]
-* [@../src/examples/cpp03/timeouts/blocking_tcp_client.cpp]
-* [@../src/examples/cpp03/timeouts/blocking_udp_client.cpp]
-* [@../src/examples/cpp03/timeouts/server.cpp]
-
-
-[heading Timers]
-
-Examples showing how to customise deadline_timer using different time types.
-
-* [@../src/examples/cpp03/timers/tick_count_timer.cpp]
-* [@../src/examples/cpp03/timers/time_t_timer.cpp]
-
-
-[heading Porthopper]
-
-Example illustrating mixed synchronous and asynchronous operations, and how to
-use Boost.Lambda with Asio.
-
-* [@../src/examples/cpp03/porthopper/protocol.hpp]
-* [@../src/examples/cpp03/porthopper/client.cpp]
-* [@../src/examples/cpp03/porthopper/server.cpp]
-
-
-[heading Nonblocking]
-
-Example demonstrating reactor-style operations for integrating a third-party
-library that wants to perform the I/O operations itself.
-
-* [@../src/examples/cpp03/nonblocking/third_party_lib.cpp]
-
-
-[heading Spawn]
-
-Example of using the asio::spawn() function, a wrapper around the
-[@http://www.boost.org/doc/libs/release/libs/coroutine/index.html Boost.Coroutine]
-library, to implement a chain of asynchronous operations using stackful
-coroutines.
-
-* [@../src/examples/cpp03/spawn/echo_server.cpp]
-
-
-[heading UNIX Domain Sockets]
-
-Examples showing how to use UNIX domain (local) sockets.
-
-* [@../src/examples/cpp03/local/connect_pair.cpp]
-* [@../src/examples/cpp03/local/stream_server.cpp]
-* [@../src/examples/cpp03/local/stream_client.cpp]
-
-
-[heading Windows]
-
-An example showing how to use the Windows-specific function `TransmitFile`
-with Asio.
-
-* [@../src/examples/cpp03/windows/transmit_file.cpp]
-
-
-[endsect]
-
-
-[section:cpp11_examples C++11 Examples]
-
-
-[heading Allocation]
-
-This example shows how to customise the allocation of memory associated with
-asynchronous operations.
-
-* [@../src/examples/cpp11/allocation/server.cpp] ([@examples/diffs/allocation/server.cpp.html diff to C++03])
-
-
-[heading Buffers]
-
-This example demonstrates how to create reference counted buffers that can be
-used with socket read and write operations.
-
-* [@../src/examples/cpp11/buffers/reference_counted.cpp] ([@examples/diffs/buffers/reference_counted.cpp.html diff to C++03])
-
-
-[heading Chat]
-
-This example implements a chat server and client. The programs use a custom
-protocol with a fixed length message header and variable length message body.
-
-* [@../src/examples/cpp11/chat/chat_message.hpp] ([@examples/diffs/chat/chat_message.hpp.html diff to C++03])
-* [@../src/examples/cpp11/chat/chat_client.cpp] ([@examples/diffs/chat/chat_client.cpp.html diff to C++03])
-* [@../src/examples/cpp11/chat/chat_server.cpp] ([@examples/diffs/chat/chat_server.cpp.html diff to C++03])
-
-
-[heading Echo]
-
-A collection of simple clients and servers, showing the use of both synchronous
-and asynchronous operations.
-
-* [@../src/examples/cpp11/echo/async_tcp_echo_server.cpp] ([@examples/diffs/echo/async_tcp_echo_server.cpp.html diff to C++03])
-* [@../src/examples/cpp11/echo/async_udp_echo_server.cpp] ([@examples/diffs/echo/async_udp_echo_server.cpp.html diff to C++03])
-* [@../src/examples/cpp11/echo/blocking_tcp_echo_client.cpp] ([@examples/diffs/echo/blocking_tcp_echo_client.cpp.html diff to C++03])
-* [@../src/examples/cpp11/echo/blocking_tcp_echo_server.cpp] ([@examples/diffs/echo/blocking_tcp_echo_server.cpp.html diff to C++03])
-* [@../src/examples/cpp11/echo/blocking_udp_echo_client.cpp] ([@examples/diffs/echo/blocking_udp_echo_client.cpp.html diff to C++03])
-* [@../src/examples/cpp11/echo/blocking_udp_echo_server.cpp] ([@examples/diffs/echo/blocking_udp_echo_server.cpp.html diff to C++03])
-
-
-[heading Futures]
-
-This example demonstrates how to use std::future in conjunction with
-Asio's asynchronous operations.
-
-* [@../src/examples/cpp11/futures/daytime_client.cpp]
-
-
-[heading HTTP Server]
-
-This example illustrates the use of asio in a simple single-threaded server
-implementation of HTTP 1.0. It demonstrates how to perform a clean shutdown by
-cancelling all outstanding asynchronous operations.
-
-* [@../src/examples/cpp11/http/server/connection.cpp] ([@examples/diffs/http/server/connection.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/connection.hpp] ([@examples/diffs/http/server/connection.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/connection_manager.cpp] ([@examples/diffs/http/server/connection_manager.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/connection_manager.hpp] ([@examples/diffs/http/server/connection_manager.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/header.hpp] ([@examples/diffs/http/server/header.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/main.cpp] ([@examples/diffs/http/server/main.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/mime_types.cpp] ([@examples/diffs/http/server/mime_types.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/mime_types.hpp] ([@examples/diffs/http/server/mime_types.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/reply.cpp] ([@examples/diffs/http/server/reply.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/reply.hpp] ([@examples/diffs/http/server/reply.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/request.hpp] ([@examples/diffs/http/server/request.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/request_handler.cpp] ([@examples/diffs/http/server/request_handler.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/request_handler.hpp] ([@examples/diffs/http/server/request_handler.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/request_parser.cpp] ([@examples/diffs/http/server/request_parser.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/request_parser.hpp] ([@examples/diffs/http/server/request_parser.hpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/server.cpp] ([@examples/diffs/http/server/server.cpp.html diff to C++03])
-* [@../src/examples/cpp11/http/server/server.hpp] ([@examples/diffs/http/server/server.hpp.html diff to C++03])
-
-
-[heading Spawn]
-
-Example of using the asio::spawn() function, a wrapper around the
-[@http://www.boost.org/doc/libs/release/libs/coroutine/index.html Boost.Coroutine]
-library, to implement a chain of asynchronous operations using stackful
-coroutines.
-
-* [@../src/examples/cpp11/spawn/echo_server.cpp] ([@examples/diffs/spawn/echo_server.cpp.html diff to C++03])
-
-
-[endsect]
-
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/history.qbk b/3rdparty/asio/src/doc/history.qbk
deleted file mode 100644
index e5c3ddbeb80..00000000000
--- a/3rdparty/asio/src/doc/history.qbk
+++ /dev/null
@@ -1,1214 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:history Revision History]
-
-[heading Asio 1.11.0]
-
-* Implemented changes to substantially reflect the Networking Library Proposal
- ([@www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4370.html N4370]).
-
- * New `Executor` type requirements and classes to support an executor
- framework, including the `execution_context` base class, the
- `executor_work` class for tracking outstanding work, and the `executor`
- polymorphic wrapper. Free functions `dispatch()`, `post()` and `defer()`
- have been added and are used to submit function objects to executors.
-
- * Completion handlers now have an associated executor and associated
- allocator. The free function `wrap()` is used to associate an executor with
- a handler or other object. The handler hooks for allocation, invocation and
- continuation have been deprecated.
-
- * A `system_executor` class has been added as a default executor.
-
- * The `io_service` class is now derived from `execution_context` and
- implements the executor type requirements in its nested `executor_type`
- class. The member functions `dispatch()`, `post()`, `defer()` and `wrap()`
- have been deprecated. The `io_service::work` class has been deprecated.
-
- * The `io_service` member function `reset()` has been renamed to `restart()`.
- The old name is retained for backward compatibility but has been
- deprecated.
-
- * The `make_service<>()` function is now used to add a new service to an
- execution context such as an `io_service`. The `add_service()` function has
- been deprecated.
-
- * A new `strand<>` template has been added to allow strand functionality to
- be used with generic executor types.
-
- * I/O objects (such as sockets and timers) now provide access to their
- associated `io_service` via a `context()` member function. The
- `get_io_service()` member function is deprecated.
-
- * All asynchronous operations and executor operations now support move-only
- handlers. However, the deprecated `io_service::post()`,
- `io_service::dispatch()`, `io_service::strand::post()` and
- `io_service::strand::dispatch()` functions still require copyable handlers.
-
- * Waitable timer objects are now movable.
-
- * Waitable timers, socket iostreams and socket streambufs now provide an
- `expiry()` member function for obtaining the expiry time. The accessors
- `expires_at()` and `expires_after()` have been deprecated, though those
- names are retained for the mutating members.
-
- * The `std::packaged_task` class template is now supported as a completion
- handler. The initiating operation automatically returns the future
- associated with the task. The `package()` function has been added as a
- convenient factory for packaged tasks.
-
- * Sockets, socket acceptors and descriptors now provide `wait()` and
- `async_wait()` operations that may be used to wait for readiness. The
- `null_buffers` type has been deprecated.
-
- * The proposed error code enum classes are simulated using namespaces.
- Existing asio error codes now have a correspondence with the standard error
- conditions.
-
- * Conversion between IP address types, and conversion from string to address,
- is now supported via the `address_cast<>()`, `make_address()`,
- `make_address_v4()` and `make_address_v6()` free functions. The
- `from_string()`, `to_v4()`, `to_v6()` and `v4_mapped()` member functions
- have been deprecated.
-
- * A default-constructed `ip::address` now represents an invalid address value
- that is neither IPv4 nor IPv6.
-
- * New `buffer()` overloads that generate mutable buffers for non-const
- `string` objects.
-
- * Support for dynamic buffer sequences that automatically grow and shrink to
- accomodate data as it is read or written. This is a generic facility
- similar to the existing `asio::streambuf` class. This support includes:
-
- * New `dynamic_string_buffer` and `dynamic_vector_buffer` adapter classes
- that meet the `DynamicBufferSequence` type requirements.
-
- * New `dynamic_buffer()` factory functions for creating a dynamic buffer
- adapter for a `vector` or `string`.
-
- * New overloads for the `read()`, `async_read()`, `write()` and
- `async_write()`, `read_until()` and `async_read_until()` free functions
- that directly support dynamic buffer sequences.
-
- * Support for networks and address ranges. Thanks go to Oliver Kowalke for
- contributing to the design and providing the implementation on which this
- facility is based. The following new classes have been added:
-
- * `address_iterator_v4` for iterating across IPv4 addresses
- * `address_iterator_v6` for iterating across IPv6 addresses
- * `address_range_v4` to represent a range of IPv4 addresses
- * `address_range_v6` to represent a range of IPv6 addresses
- * `network_v4` for manipulating IPv4 CIDR addresses, e.g. 1.2.3.0/24
- * `network_v6` for manipulating IPv6 CIDR addresses, e.g. ffe0:/120
-
- * New convenience headers in [^<asio/ts/*.hpp>] that correspond to the headers
- in the proposal.
-
-* Added a new, executor-aware `thread_pool` class.
-
-* Changed `spawn()` to be executor-aware.
-
-* Added a new `spawn()` overload that takes only a function object.
-
-* Changed `spawn()` and `yield_context` to permit nested calls to the
- completion handler.
-
-* Removed previously deprecated functions.
-
-* Added options for disabling TLS v1.1 and v1.2.
-
-* Changed the SSL wrapper to call the password callback when loading an
- in-memory key.
-
-* Changed the tutorial to use `std::endl` to ensure output is flushed.
-
-* Fixed false SSL error reports by ensuring that the SSL error queue is cleared
- prior to each operation.
-
-* Fixed an `ssl::stream<>` bug that may result in spurious 'short read' errors.
-
-* Enabled perfect forwarding for the first `ssl::stream<>` constructor argument.
-
-* Added standalone Asio support for Clang when used with libstdc++ and C++11.
-
-* Fixed an unsigned integer overflow reported by Clang's integer sanitizer.
-
-* Added support for move-only return types when using a `yield_context` object
- with asynchronous operations.
-
-* Ensured errors generated by Windows' `ConnectEx` function are mapped to their
- portable equivalents.
-
-* Changed multicast test to treat certain `join_group` failures as non-fatal.
-
-[heading Asio 1.10.5]
-
-* Fixed the [^kqueue] reactor so that it works on FreeBSD.
-
-* Fixed an issue in the [^kqueue] reactor which resulted in spinning when using
- serial ports on Mac OS.
-
-* Fixed [^kqueue] reactor support for read-only file descriptors.
-
-* Fixed a compile error when using the [^/dev/poll] reactor.
-
-* Changed the Windows backend to use `WSASocketW`, as `WSASocketA` has been
- deprecated.
-
-* Fixed some warnings reported by Visual C++ 2013.
-
-* Fixed integer type used in the WinRT version of the byte-order conversion
- functions.
-
-* Changed documentation to indicate that `use_future` and `spawn()` are not
- made available when including the `asio.hpp` convenience header.
-
-* Explicitly marked `asio::strand` as deprecated. Use
- `asio::io_service::strand` instead.
-
-[heading Asio 1.10.4]
-
-* Stopped using certain Winsock functions that are marked as deprecated in the
- latest Visual C++ and Windows SDK.
-
-* Fixed a shadow variable warning on Windows.
-
-* Fixed a regression in the [^kqueue] backend that was introduced in Asio
- 1.10.2.
-
-* Added a workaround for building the unit tests with [^gcc] on AIX.
-
-[heading Asio 1.10.3]
-
-* Worked around a [^gcc] problem to do with anonymous enums.
-
-* Reverted the Windows `HANDLE` backend change to ignore `ERROR_MORE_DATA`.
- Instead, the error will be propagated as with any other (i.e. in an
- `error_code` or thrown as a `system_error`), and the number of bytes
- transferred will be returned. For code that needs to handle partial messages,
- the `error_code` overload should be used.
-
-* Fixed an off-by-one error in the `signal_set` implementation's signal
- number check.
-
-* Changed the Windows IOCP backend to not assume that
- `SO_UPDATE_CONNECT_CONTEXT` is defined.
-
-* Fixed a Windows-specific issue, introduced in Asio 1.10.2, by using
- `VerifyVersionInfo` rather than `GetVersionEx`, as `GetVersionEx` has been
- deprecated.
-
-* Changed to use SSE2 intrinsics rather than inline assembly, to allow the
- Cray compiler to work.
-
-[heading Asio 1.10.2]
-
-* Fixed `asio::spawn()` to work correctly with new Boost.Coroutine interface.
-
-* Ensured that incomplete `asio::spawn()` coroutines are correctly unwound when
- cleaned up by the `io_service` destructor.
-
-* Fixed delegation of continuation hook for handlers produced by
- `io_service::wrap()` and `strand::wrap()`.
-
-* Changed the Windows I/O completion port backend to use `ConnectEx`, if
- available, for connection-oriented IP sockets.
-
-* Changed the `io_service` backend for non-Windows (and non-IOCP Windows)
- platforms to use a single condition variable per `io_service` instance.
- This addresses a potential race condition when `run_one()` is used from
- multiple threads.
-
-* Prevented integer overflow when computing timeouts based on some
- `boost::chrono` and `std::chrono` clocks.
-
-* Made further changes to `EV_CLEAR` handling in the kqueue backend, to address
- other cases where the `close()` system call may hang on Mac OS X.
-
-* Fixed infinite recursion in implementation of
- `resolver_query_base::flags::operator~`.
-
-* Made the `select` reactor more efficient on Windows for large numbers of
- sockets.
-
-* Fixed a Windows-specific type-aliasing issue reported by [^gcc].
-
-* Prevented execution of compile-time-only buffer test to avoid triggering an
- address sanitiser warning.
-
-* Disabled the `GetQueuedCompletionStatus` timeout workaround on recent
- versions of Windows.
-
-* Changed implementation for Windows Runtime to use `FormatMessageW` rather
- than `FormatMessageA`, as the Windows store does not permit the latter.
-
-* Added support for string-based scope IDs when using link-local multicast
- addresses.
-
-* Changed IPv6 multicast group join to use the address's scope ID as the
- interface, if an interface is not explicitly specified.
-
-* Fixed multicast test failure on Mac OS X and the BSDs by using a link-local
- multicast address.
-
-* Various minor documentation improvements.
-
-[heading Asio 1.10.1]
-
-* Implemented a limited port to Windows Runtime. This support requires that the
- language extensions be enabled. Due to the restricted facilities exposed by
- the Windows Runtime API, the port also comes with the following caveats:
-
- * The core facilities such as the `io_service`, `strand`, buffers, composed
- operations, timers, etc., should all work as normal.
-
- * For sockets, only client-side TCP is supported.
-
- * Explicit binding of a client-side TCP socket is not supported.
-
- * The `cancel()` function is not supported for sockets. Asynchronous
- operations may only be cancelled by closing the socket.
-
- * Operations that use `null_buffers` are not supported.
-
- * Only `tcp::no_delay` and `socket_base::keep_alive` options are supported.
-
- * Resolvers do not support service names, only numbers. I.e. you must
- use "80" rather than "http".
-
- * Most resolver query flags have no effect.
-
-* Extended the ability to use Asio without Boost to include Microsoft Visual
- Studio 2012. When using a C++11 compiler, most of Asio may now be used
- without a dependency on Boost header files or libraries. To use Asio in this
- way, define `ASIO_STANDALONE` on your compiler command line or as part of the
- project options. This standalone configuration has been tested for the
- following platforms and compilers:
-
- * Microsoft Visual Studio 2012
-
- * Linux with g++ 4.7 or 4.8 (requires [^-std=c++11])
-
- * Mac OS X with clang++ / Xcode 4.6 (requires [^-std=c++11 -stdlib=libc++])
-
-* Fixed a regression (introduced in 1.10.0) where, on some platforms, errors
- from `async_connect` were not correctly propagated through to the completion
- handler.
-
-* Fixed a Windows-specific regression (introduced in 1.10.0) that occurs when
- multiple threads are running an `io_service`. When the bug occurs, the result
- of an asynchronous operation (error and bytes tranferred) is incorrectly
- discarded and zero values used instead. For TCP sockets this results in
- spurious end-of-file notifications.
-
-* Fixed a bug in handler tracking, where it was not correctly printing out some
- handler IDs.
-
-* Fixed the comparison used to test for successful synchronous accept
- operations so that it works correctly with unsigned socket descriptors.
-
-* Ensured the signal number is correctly passed to the completion handler when
- starting an `async_wait` on a signal that is already raised.
-
-* Suppressed a g++ 4.8+ warning about unused typedefs.
-
-* Enabled the move optimisation for handlers that use the default invocation
- hook.
-
-* Clarified that programs must not issue overlapping `async_write_at`
- operations.
-
-* Changed the Windows `HANDLE` backend to treat `ERROR_MORE_DATA` as a
- non-fatal error when returned by `GetOverlappedResult` for a synchronous
- read.
-
-* Visual C++ language extensions use `generic` as a keyword. Added a
- workaround that renames the namespace to `cpp_generic` when those language
- extensions are in effect.
-
-* Fixed some asynchronous operations that missed out on getting `async_result`
- support in 1.10.0. In particular, the buffered stream templates have been
- updated so that they adhere to current handler patterns.
-
-* Enabled move support for Microsoft Visual Studio 2012.
-
-* Added `use_future` support for Microsoft Visual Studio 2012.
-
-* Removed a use of `std::min` in the Windows IOCP backend to avoid a
- dependency on the `<algorithm>` header.
-
-* Eliminated some unnecessary handler copies.
-
-* Fixed support for older versions of OpenSSL that do not provide the
- `SSL_CTX_clear_options` function.
-
-* Fixed various minor and cosmetic issues in code and documentation.
-
-[heading Asio 1.10.0]
-
-* Added new traits classes, `handler_type` and `async_result`, that allow the
- customisation of the return type of an initiating function.
-
-* Added the `asio::spawn()` function, a high-level wrapper for running
- stackful coroutines, based on the Boost.Coroutine library. The `spawn()`
- function enables programs to implement asynchronous logic in a synchronous
- manner. For example: `size_t n = my_socket.async_read_some(my_buffer, yield);`.
- For further information, see [link asio.overview.core.spawn Stackful
- Coroutines].
-
-* Added the `asio::use_future` special value, which provides first-class
- support for returning a C++11 `std::future` from an asynchronous
- operation's initiating function. For example:
- `future<size_t> = my_socket.async_read_some(my_buffer, asio::use_future);`.
- For further information, see [link asio.overview.cpp2011.futures C++
- 2011 Support - Futures].
-
-* Promoted the stackless coroutine class and macros to be part of Asio's
- documented interface, rather than part of the HTTP server 4 example.
- For further information, see [link asio.overview.core.coroutine
- Stackless Coroutines].
-
-* Added a new handler hook called `asio_handler_is_continuation`.
- Asynchronous operations may represent a continuation of the asynchronous
- control flow associated with the current executing handler. The
- `asio_handler_is_continuation` hook can be customised to return `true` if
- this is the case, and Asio's implementation can use this knowledge to
- optimise scheduling of the new handler. To cover common cases, Asio
- customises the hook for strands, `spawn()` and composed asynchronous
- operations.
-
-* Added four new generic protocol classes, `generic::datagram_protocol`,
- `generic::raw_protocol`, `generic::seq_packet_protocol` and
- `generic::stream_protocol`, which implement the `Protocol` type
- requirements, but allow the user to specify the address family (e.g.
- `AF_INET`) and protocol type (e.g. `IPPROTO_TCP`) at runtime.
- For further information, see [link
- asio.overview.networking.other_protocols Support for Other Protocols].
-
-* Added C++11 move constructors that allow the conversion of a socket (or
- acceptor) into a more generic type. For example, an `ip::tcp::socket` can
- be converted into a `generic::stream_protocol::socket` via move
- construction.
- For further information, see [link
- asio.overview.networking.other_protocols Support for Other Protocols].
-
-* Extended the `basic_socket_acceptor<>`'s `accept()` and `async_accept()`
- functions to allow a new connection to be accepted directly into a socket
- of a more generic type. For example, an `ip::tcp::acceptor` can be used to
- accept into a `generic::stream_protocol::socket` object.
- For further information, see [link
- asio.overview.networking.other_protocols Support for Other Protocols].
-
-* Moved existing examples into a C++03-specific directory, and added a new
- directory for C++11-specific examples. A limited subset of the C++03
- examples have been converted to their C++11 equivalents.
-
-* Add the ability to use Asio without Boost, for a limited set of platforms.
- When using a C++11 compiler, most of Asio may now be used without a
- dependency on Boost header files or libraries. To use Asio in this way,
- define `ASIO_STANDALONE` on your compiler command line or as part of the
- project options. This standalone configuration has currently been tested for
- the following platforms and compilers:
-
- * Linux with g++ 4.7 (requires [^-std=c++11])
-
- * Mac OS X with clang++ / Xcode 4.6 (requires [^-std=c++11 -stdlib=libc++])
-
-* Various SSL enhancements. Thanks go to Nick Jones, on whose work these changes
- are based.
-
- * Added support for SSL handshakes with re-use of data already read from
- the wire. New overloads of the `ssl::stream<>` class's `handshake()` and
- `async_handshake()` functions have been added. These accept a
- `ConstBufferSequence` to be used as initial input to the ssl engine for
- the handshake procedure.
-
- * Added support for creation of TLSv1.1 and TLSv1.2 `ssl::context` objects.
-
- * Added a `set_verify_depth()` function to the `ssl::context` and
- `ssl::stream<>` classes.
-
- * Added the ability to load SSL certificate and key data from memory
- buffers. New functions, `add_certificate_authority()`,
- `use_certificate()`, `use_certificate_chain()`, `use_private_key()`,
- `use_rsa_private_key()` and `use_tmp_dh()`, have been added to the
- `ssl::context` class.
-
- * Changed `ssl::context` to automatically disable SSL compression by
- default. To enable, use the new `ssl::context::clear_options()` function,
- as in `my_context.clear_options(ssl::context::no_compression)`.
-
-* Fixed a potential deadlock in `signal_set` implementation.
-
-* Fixed an error in acceptor example in documentation.
-
-* Fixed copy-paste errors in waitable timer documentation.
-
-* Added assertions to satisfy some code analysis tools.
-
-* Fixed a malformed `#warning` directive.
-
-* Fixed a potential data race in the Linux `epoll` implementation.
-
-* Fixed a Windows-specific bug, where certain operations might generate an
- `error_code` with an invalid (i.e. `NULL`) `error_category`.
-
-* Fixed `basic_waitable_timer`'s underlying implementation so that it can
- handle any `time_point` value without overflowing the intermediate duration
- objects.
-
-* Fixed a problem with lost thread wakeups that can occur when making
- concurrent calls to `run()` and `poll()` on the same `io_service` object.
-
-* Fixed implementation of asynchronous connect operation so that it can cope
- with spurious readiness notifications from the reactor.
-
-* Fixed a memory leak in the `ssl::rfc2818_verification` class.
-
-* Added a mechanism for disabling automatic Winsock initialisation. See the
- header file [^asio/detail/winsock_init.hpp] for details.
-
-[heading Asio 1.8.3]
-
-* Fixed some 64-to-32-bit conversion warnings.
-
-* Fixed various small errors in documentation and comments.
-
-* Fixed an error in the example embedded in `basic_socket::get_option`'s
- documentation.
-
-* Changed to use `long` rather than `int` for SSL_CTX options, to match OpenSSL.
-
-* Changed to use `_snwprintf` to address a compile error due to the changed
- `swprintf` signature in recent versions of MinGW.
-
-* Fixed a deadlock that can occur on Windows when shutting down a pool of
- `io_service` threads due to running out of work.
-
-* Changed UNIX domain socket example to treat errors from `accept` as non-fatal.
-
-* Added a small block recycling optimisation to improve default memory
- allocation behaviour.
-
-[heading Asio 1.8.2]
-
-* Fixed an incompatibility between `ip::tcp::iostream` and C++11.
-
-* Decorated GCC attribute names with underscores to prevent interaction
- with user-defined macros.
-
-* Added missing `#include <cctype>`, needed for some versions of MinGW.
-
-* Changed to use [^gcc]'s atomic builtins on ARM CPUs, when available.
-
-* Changed strand destruction to be a no-op, to allow strand objects to be
- destroyed after their associated `io_service` has been destroyed.
-
-* Added support for some newer versions of glibc which provide the
- `epoll_create1()` function but always fail with ENOSYS.
-
-* Changed the SSL implementation to throw an exception if SSL engine
- initialisation fails.
-
-* Fixed another regression in `buffered_write_stream`.
-
-* Implemented various minor performance improvements, primarily targeted at
- Linux x86 and x86-64 platforms.
-
-[heading Asio 1.8.1]
-
-* Changed the `epoll_reactor` backend to do lazy registration for `EPOLLOUT`
- events.
-
-* Fixed the `epoll_reactor` handling of out-of-band data, which was broken by
- an incomplete fix in the last release.
-
-* Changed Asio's SSL wrapper to respect OpenSSL's `OPENSSL_NO_ENGINE` feature
- test `#define`.
-
-* Fixed `windows::object_handle` so that it works with Windows compilers that
- support C++11 move semantics (such as [^g++]).
-
-* Improved the performance of strand rescheduling.
-
-* Added support for [^g++] 4.7 when compiling in C++11 mode.
-
-* Fixed a problem where `signal_set` handlers were not being delivered when
- the `io_service` was constructed with a `concurrency_hint` of 1.
-
-[heading Asio 1.8.0]
-
-* Added a new class template `basic_waitable_timer` based around the C++11 clock
- type requirements. It may be used with the clocks from the C++11 `<chrono>`
- library facility or, if those are not available, Boost.Chrono. The typedefs
- `high_resolution_timer`, `steady_timer` and `system_timer` may be used to
- create timer objects for the standard clock types.
-
-* Added a new `windows::object_handle` class for performing waits on Windows
- kernel objects. Thanks go to Boris Schaeling for contributing substantially
- to the development of this feature.
-
-* On Linux, `connect()` can return EAGAIN in certain circumstances. Remapped
- this to another error so that it doesn't look like a non-blocking operation.
-
-* Fixed a compile error on NetBSD.
-
-* Fixed deadlock on Mac OS X.
-
-* Fixed a regression in `buffered_write_stream`.
-
-* Fixed a non-paged pool "leak" on Windows when an `io_service` is repeatedly
- run without anything to do.
-
-* Reverted earlier change to allow some speculative operations to be performed
- without holding the lock, as it introduced a race condition in some
- multithreaded scenarios.
-
-* Fixed a bug where the second buffer in an array of two buffers may be ignored
- if the first buffer is empty.
-
-[heading Asio 1.6.1]
-
-* Implemented various performance improvements, including:
-
- * Using thread-local operation queues in single-threaded use cases (i.e. when
- `concurrency_hint` is 1) to eliminate a lock/unlock pair.
-
- * Allowing some `epoll_reactor` speculative operations to be performed
- without holding the lock.
-
- * Improving locality of reference by performing an `epoll_reactor`'s I/O
- operation immediately before the corresponding handler is called. This also
- improves scalability across CPUs when multiple threads are running the
- `io_service`.
-
- * Specialising asynchronous read and write operations for buffer sequences
- that are arrays (`boost::array` or `std::array`) of exactly two buffers.
-
-* Fixed a compile error in the regex overload of `async_read_until`.
-
-* Fixed a Windows-specific compile error by explicitly specifying the
- `signal()` function from the global namespace.
-
-* Changed the `deadline_timer` implementation so that it does not read the
- clock unless the timer heap is non-empty.
-
-* Changed the SSL stream's buffers' sizes so that they are large enough to hold
- a complete TLS record.
-
-* Fixed the behaviour of the synchronous `null_buffers` operations so that they
- obey the user's non-blocking setting.
-
-* Changed to set the size of the select `fd_set` at runtime when using Windows.
-
-* Disabled an MSVC warning due to const qualifier being applied to function type.
-
-* Fixed a crash that occurs when using the Intel C++ compiler.
-
-* Changed the initialisation of the OpenSSL library so that it supports all
- available algorithms.
-
-* Fixed the SSL error mapping used when the session is gracefully shut down.
-
-* Added some latency test programs.
-
-* Clarified that a read operation ends when the buffer is full.
-
-* Fixed an exception safety issue in `epoll_reactor` initialisation.
-
-* Made the number of strand implementations configurable by defining
- `(BOOST_)ASIO_STRAND_IMPLEMENTATIONS` to the desired number.
-
-* Added support for a new `(BOOST_)ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION` flag
- which switches the allocation of strand implementations to use a round-robin
- approach rather than hashing.
-
-* Fixed potential strand starvation issue that can occur when `strand.post()`
- is used.
-
-[heading Asio 1.6.0]
-
-* Improved support for C++0x move construction to further reduce copying of
- handler objects. In certain designs it is possible to eliminate virtually all
- copies. Move support is now enabled when compiling in [^-std=c++0x] mode on
- g++ 4.5 or higher.
-
-* Added build support for platforms that don't provide either of `signal()` or
- `sigaction()`.
-
-* Changed to use C++0x variadic templates when they are available, rather than
- generating function overloads using the Boost.Preprocessor library.
-
-* Ensured the value of `errno` is preserved across the implementation's signal
- handler.
-
-* On Windows, ensured the count of outstanding work is decremented for
- abandoned operations (i.e. operations that are being cleaned up within the
- `io_service` destructor).
-
-* Fixed behaviour of zero-length reads and writes in the new SSL implementation.
-
-* Added support for building with OpenSSL 1.0 when `OPENSSL_NO_SSL2` is defined.
-
-* Changed most examples to treat a failure by an accept operation as non-fatal.
-
-* Fixed an error in the [^tick_count_timer] example by making the duration type
- signed. Previously, a wait on an already-passed deadline would not return for
- a very long time.
-
-[heading Asio 1.5.3]
-
-* Added a new, completely rewritten SSL implementation. The new implementation
- compiles faster, shows substantially improved performance, and supports
- custom memory allocation and handler invocation. It includes new API features
- such as certificate verification callbacks and has improved error reporting.
- The new implementation is source-compatible with the old for most uses.
- However, if necessary, the old implementation may still be used by defining
- `(BOOST_)ASIO_ENABLE_OLD_SSL`.
-
-* Added new `asio::buffer()` overloads for `std::array`, when available. The
- support is automatically enabled when compiling in [^-std=c++0x] mode on g++
- 4.3 or higher, or when using MSVC 10. The support may be explicitly enabled
- by defining `(BOOST_)ASIO_HAS_STD_ARRAY`, or disabled by defining
- `(BOOST_)ASIO_DISABLE_STD_ARRAY`.
-
-* Changed to use the C++0x standard library templates `array`, `shared_ptr`,
- `weak_ptr` and `atomic` when they are available, rather than the Boost
- equivalents.
-
-* Support for `std::error_code` and `std::system_error` is no longer enabled by
- default for g++ 4.5, as that compiler's standard library does not implement
- `std::system_error::what()` correctly.
-
-[heading Asio 1.5.2]
-
-* Added support for C++0x move construction and assignment to sockets, serial
- ports, POSIX descriptors and Windows handles.
-
-* Added support for the `fork()` system call. Programs that use `fork()` must
- call `io_service.notify_fork()` at the appropriate times. Two new examples
- have been added showing how to use this feature.
-
-* Cleaned up the handling of errors reported by the `close()` system call. In
- particular, assume that most operating systems won't have `close()` fail with
- `EWOULDBLOCK`, but if it does then set the blocking mode and restart the call.
- If any other error occurs, assume the descriptor is closed.
-
-* The kqueue flag `EV_ONESHOT` seems to cause problems on some versions of Mac
- OS X, with the `io_service` destructor getting stuck inside the `close()`
- system call. Changed the kqueue backend to use `EV_CLEAR` instead.
-
-* Changed exception reporting to include the function name in exception `what()`
- messages.
-
-* Fixed an insufficient initialisers warning with MinGW.
-
-* Changed the `shutdown_service()` member functions to be private.
-
-* Added archetypes for testing socket option functions.
-
-* Added a missing lock in `signal_set_service::cancel()`.
-
-* Fixed a copy/paste error in `SignalHandler` example.
-
-* Added the inclusion of the signal header to `signal_set_service.hpp` so that
- constants like `NSIG` may be used.
-
-* Changed the `signal_set_service` implementation so that it doesn't assume
- that `SIGRTMAX` is a compile-time constant.
-
-* Changed the Boost.Asio examples so that they don't use Boost.Thread's
- convenience header. Use the header file that is specifically for the
- boost::thread class instead.
-
-[heading Asio 1.5.1]
-
-* Added support for signal handling, using a new class called `signal_set`.
- Programs may add one or more signals to the set, and then perform an
- `async_wait()` operation. The specified handler will be called when one of
- the signals occurs. The same signal number may registered with multiple
- `signal_set` objects, however the signal number must be used only with Asio.
-
-* Added handler tracking, a new debugging aid. When enabled by defining
- `(BOOST_)ASIO_ENABLE_HANDLER_TRACKING`, Asio writes debugging output to the
- standard error stream. The output records asynchronous operations and the
- relationships between their handlers. It may be post-processed using the
- included [^handlerviz.pl] tool to create a visual representation of the
- handlers (requires GraphViz).
-
-* Fixed a bug in `asio::streambuf` where the `consume()` function did not
- always update the internal buffer pointers correctly. The problem may occur
- when the `asio::streambuf` is filled with data using the standard C++ member
- functions such as `sputn()`. (Note: the problem does not manifest when the
- streambuf is populated by the Asio free functions `read()`,
- `async_read()`, `read_until()` or `async_read_until()`.)
-
-* Fixed a bug on kqueue-based platforms, where reactor read operations that
- return false from their `perform()` function are not correctly re-registered
- with kqueue.
-
-* Support for `std::error_code` and `std::system_error` is no longer enabled by
- default for MSVC10, as that compiler's standard library does not implement
- `std::system_error::what()` correctly.
-
-* Modified the `buffers_iterator<>` and `ip::basic_resolver_iterator` classes
- so that the value_type typedefs are non-const byte types.
-
-[heading Asio 1.5.0]
-
-* Added support for timeouts on socket iostreams, such as `ip::tcp::iostream`.
- A timeout is set by calling `expires_at()` or `expires_from_now()` to
- establish a deadline. Any socket operations which occur past the deadline
- will put the iostream into a bad state.
-
-* Added a new `error()` member function to socket iostreams, for retrieving the
- error code from the most recent system call.
-
-* Added a new `basic_deadline_timer::cancel_one()` function. This function lets
- you cancel a single waiting handler on a timer. Handlers are cancelled in
- FIFO order.
-
-* Added a new `transfer_exactly()` completion condition. This can be used to
- send or receive a specified number of bytes even if the total size of the
- buffer (or buffer sequence) is larger.
-
-* Added new free functions `connect()` and `async_connect()`. These operations
- try each endpoint in a list until the socket is successfully connected.
-
-* Extended the `buffer_size()` function so that it works for buffer sequences
- in addition to individual buffers.
-
-* Added a new `buffer_copy()` function that can be used to copy the raw bytes
- between individual buffers and buffer sequences.
-
-* Added new non-throwing overloads of `read()`, `read_at()`, `write()` and
- `write_at()` that do not require a completion condition.
-
-* Added friendlier compiler errors for when a completion handler does not meet
- the necessary type requirements. When C++0x is available (currently supported
- for g++ 4.5 or later, and MSVC 10), `static_assert` is also used to generate
- an informative error message. This checking may be disabled by defining
- `(BOOST_)ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS`.
-
-* Added support for using `std::error_code` and `std::system_error`, when
- available. The support is automatically enabled when compiling in
- [^-std=c++0x] mode on g++ 4.5 or higher, or when using MSVC 10. The support
- may be explicitly enabled by defining `ASIO_HAS_STD_SYSTEM_ERROR`, or
- disabled by defining `ASIO_DISABLE_STD_SYSTEM_ERROR`. (Available in non-Boost
- version of Asio only.)
-
-* Made the `is_loopback()`, `is_unspecified()` and `is_multicast()` functions
- consistently available across the `ip::address`, `ip::address_v4` and
- `ip::address_v6` classes.
-
-* Added new `non_blocking()` functions for managing the non-blocking behaviour
- of a socket or descriptor. The `io_control()` commands named `non_blocking_io`
- are now deprecated in favour of these new functions.
-
-* Added new `native_non_blocking()` functions for managing the non-blocking
- mode of the underlying socket or descriptor. These functions are intended to
- allow the encapsulation of arbitrary non-blocking system calls as
- asynchronous operations, in a way that is transparent to the user of the
- socket object. The functions have no effect on the behaviour of the
- synchronous operations of the socket or descriptor.
-
-* Added the `io_control()` member function for socket acceptors.
-
-* For consistency with the C++0x standard library, deprecated the `native_type`
- typedefs in favour of `native_handle_type`, and the `native()` member
- functions in favour of `native_handle()`.
-
-* Added a `release()` member function to posix descriptors. This function
- releases ownership of the underlying native descriptor to the caller.
-
-* Added support for sequenced packet sockets (`SOCK_SEQPACKET`).
-
-* Added a new `io_service::stopped()` function that can be used to determine
- whether the `io_service` has stopped (i.e. a `reset()` call is needed prior
- to any further calls to `run()`, `run_one()`, `poll()` or `poll_one()`).
-
-* Reduced the copying of handler function objects.
-
-* Added support for C++0x move construction to further reduce copying of
- handler objects. Move support is enabled when compiling in [^-std=c++0x] mode
- on g++ 4.5 or higher, or when using MSVC10.
-
-* Removed the dependency on OS-provided macros for the well-known IPv4 and IPv6
- addresses. This should eliminate the annoying "missing braces around
- initializer" warnings.
-
-* Reduced the size of `ip::basic_endpoint<>` objects (such as
- `ip::tcp::endpoint` and `ip::udp::endpoint`).
-
-* Changed the reactor backends to assume that any descriptors or sockets added
- using `assign()` may have been `dup()`-ed, and so require explicit
- deregistration from the reactor.
-
-* Changed the SSL error category to return error strings from the OpenSSL
- library.
-
-* Changed the separate compilation support such that, to use Asio's SSL
- capabilities, you should also include 'asio/ssl/impl/src.hpp` in one source
- file in your program.
-
-* Removed the deprecated member functions named `io_service()`. The
- `get_io_service()` member functions should be used instead.
-
-* Removed the deprecated typedefs `resolver_query` and `resolver_iterator` from
- the `ip::tcp`, `ip::udp` and `ip::icmp` classes.
-
-* Fixed a compile error on some versions of g++ due to anonymous enums.
-
-* Added an explicit cast to the `FIONBIO` constant to int to suppress a compiler
- warning on some platforms.
-
-* Fixed warnings reported by g++'s [^-Wshadow] compiler option.
-
-[heading Asio 1.4.8]
-
-* Fixed an integer overflow problem that occurs when
- `ip::address_v4::broadcast()` is used on 64-bit platforms.
-
-* Fixed a problem on older Linux kernels (where epoll is used without `timerfd`
- support) that prevents timely delivery of `deadline_timer` handlers, after the
- program has been running for some time.
-
-[heading Asio 1.4.7]
-
-* Fixed a problem on kqueue-based platforms where a `deadline_timer` may
- never fire if the `io_service` is running in a background thread.
-
-* Fixed a const-correctness issue that prevented valid uses of
- `has_service<>` from compiling.
-
-* Fixed MinGW cross-compilation.
-
-* Removed dependency on deprecated Boost.System functions (Boost.Asio only).
-
-* Ensured `close()`/`closesocket()` failures are correctly propagated.
-
-* Added a check for errors returned by `InitializeCriticalSectionAndSpinCount`.
-
-* Added support for hardware flow control on QNX.
-
-* Always use `pselect()` on HP-UX, if it is available.
-
-* Ensured handler arguments are passed as lvalues.
-
-* Fixed Windows build when thread support is disabled.
-
-* Fixed a Windows-specific problem where `deadline_timer` objects with expiry
- times set more than 5 minutes in the future may never expire.
-
-* Fixed the resolver backend on BSD platforms so that an empty service name
- resolves to port number `0`, as per the documentation.
-
-* Fixed read operations so that they do not accept buffer sequences of type
- `const_buffers_1`.
-
-* Redefined `Protocol` and `id` to avoid clashing with Objective-C++ keywords.
-
-* Fixed a `vector` reallocation performance issue that can occur when there are
- many active `deadline_timer` objects.
-
-* Fixed the kqueue backend so that it compiles on NetBSD.
-
-* Fixed the socket `io_control()` implementation on 64-bit Mac OS X and BSD
- platforms.
-
-* Fixed a Windows-specific problem where failures from `accept()` are
- incorrectly treated as successes.
-
-* Deprecated the separate compilation header `asio/impl/src.cpp` in
- favour of `asio/impl/src.hpp`.
-
-[heading Asio 1.4.6]
-
-* Reduced compile times. (Note that some programs may need to add additional
- `#include`s, e.g. if the program uses boost::array but does not explicitly
- include `<boost/array.hpp>`.)
-
-* Reduced the size of generated code.
-
-* Refactored `deadline_timer` implementation to improve performance.
-
-* Improved multiprocessor scalability on Windows by using a dedicated hidden
- thread to wait for timers.
-
-* Improved performance of `asio::streambuf` with `async_read()` and
- `async_read_until()`. These read operations now use the existing capacity of
- the `streambuf` when reading, rather than limiting the read to 512 bytes.
-
-* Added optional separate compilation. To enable, include
- `asio/impl/src.cpp` in one source file in a program, then
- build the program with `(BOOST_)ASIO_SEPARATE_COMPILATION` defined in the
- project\/compiler settings. Alternatively, `(BOOST_)ASIO_DYN_LINK` may be
- defined to build a separately-compiled Asio as part of a shared library.
-
-* Added new macro `(BOOST_)ASIO_DISABLE_FENCED_BLOCK` to permit the disabling of
- memory fences around completion handlers, even if thread support is enabled.
-
-* Reworked timeout examples to better illustrate typical use cases.
-
-* Ensured that handler arguments are passed as const types.
-
-* Fixed incorrect parameter order in `null_buffers` variant of `async_send_to`.
-
-* Ensured unsigned char is used with `isdigit` in `getaddrinfo` emulation.
-
-* Fixed handling of very small but non-zero timeouts.
-
-* Fixed crash that occurred when an empty buffer sequence was passed to a
- composed read or write operation.
-
-* Added missing operator+ overload in `buffers_iterator`.
-
-* Implemented cancellation of `null_buffers` operations on Windows.
-
-[heading Asio 1.4.5]
-
-* Improved performance.
-
-* Reduced compile times.
-
-* Reduced the size of generated code.
-
-* Extended the guarantee that background threads don't call user code to
- all asynchronous operations.
-
-* Changed to use edge-triggered epoll on Linux.
-
-* Changed to use `timerfd` for dispatching timers on Linux, when
- available.
-
-* Changed to use one-shot notifications with kqueue on Mac OS X and BSD
- platforms.
-
-* Added a bitmask type `ip::resolver_query_base::flags` as per the TR2
- proposal. This type prevents implicit conversion from `int` to
- `flags`, allowing the compiler to catch cases where users incorrectly
- pass a numeric port number as the service name.
-
-* Added `#define NOMINMAX` for all Windows compilers. Users can define
- `(BOOST_)ASIO_NO_NOMINMAX` to suppress this definition.
-
-* Fixed a bug where 0-byte asynchronous reads were incorrectly passing
- an `error::eof` result to the completion handler.
-
-* Changed the `io_control()` member functions to always call `ioctl` on
- the underlying descriptor when modifying blocking mode.
-
-* Changed the resolver implementation so that it no longer requires the
- typedefs `InternetProtocol::resolver_query` and
- `InternetProtocol::resolver_iterator`, as neither typedef is part of
- the documented `InternetProtocol` requirements. The corresponding
- typedefs in the `ip::tcp`, `ip::udp` and `ip::icmp` classes have been
- deprecated.
-
-* Fixed out-of-band handling for reactors not based on `select()`.
-
-* Added new `(BOOST_)ASIO_DISABLE_THREADS` macro that allows Asio's
- threading support to be independently disabled.
-
-* Minor documentation improvements.
-
-[heading Asio 1.4.4]
-
-* Added a new HTTP Server 4 example illustrating the use of stackless
- coroutines with Asio.
-
-* Changed handler allocation and invocation to use `boost::addressof` to
- get the address of handler objects, rather than applying `operator&`
- directly.
-
-* Restricted MSVC buffer debugging workaround to 2008, as it causes a
- crash with 2010 beta 2.
-
-* Fixed a problem with the lifetime of handler memory, where Windows
- needs the `OVERLAPPED` structure to be valid until both the initiating
- function call has returned and the completion packet has been
- delivered.
-
-* Don't block signals while performing system calls, but instead restart
- the calls if they are interrupted.
-
-* Documented the guarantee made by strand objects with respect to order
- of handler invocation.
-
-* Changed strands to use a pool of implementations, to make copying of
- strands cheaper.
-
-* Ensured that kqueue support is enabled for BSD platforms.
-
-* Added a `boost_` prefix to the `extern "C"` thread entry point
- function.
-
-* In `getaddrinfo` emulation, only check the socket type (`SOCK_STREAM`
- or `SOCK_DGRAM`) if a service name has been specified. This should
- allow the emulation to work with raw sockets.
-
-* Added a workaround for some broken Windows firewalls that make a
- socket appear bound to 0.0.0.0 when it is in fact bound to 127.0.0.1.
-
-* Applied a fix for reported excessive CPU usage under Solaris.
-
-* Added some support for platforms that use older compilers such as g++
- 2.95.
-
-[heading Asio 1.4.3]
-
-* Added a new ping example to illustrate the use of ICMP sockets.
-
-* Changed the `buffered*_stream<>` templates to treat 0-byte reads and
- writes as no-ops, to comply with the documented type requirements for
- `SyncReadStream`, `AsyncReadStream`, `SyncWriteStream` and
- `AsyncWriteStream`.
-
-* Changed some instances of the `throw` keyword to
- `boost::throw_exception()` to allow Asio to be used when exception
- support is disabled. Note that the SSL wrappers still require
- exception support.
-
-* Made Asio compatible with the OpenSSL 1.0 beta.
-
-* Eliminated a redundant system call in the Solaris /dev/poll backend.
-
-* Fixed a bug in resizing of the bucket array in the internal hash maps.
-
-* Ensured correct propagation of the error code when a synchronous
- accept fails.
-
-* Ensured correct propagation of the error code when a synchronous read
- or write on a Windows `HANDLE` fails.
-
-* Fixed failures reported when `_GLIBCXX_DEBUG` is defined.
-
-* Fixed custom memory allocation support for timers.
-
-* Tidied up various warnings reported by g++.
-
-* Various documentation improvements, including more obvious hyperlinks
- to function overloads, header file information, examples for the
- handler type requirements, and adding enum values to the index.
-
-[heading Asio 1.4.2]
-
-* Implement automatic resizing of the bucket array in the internal hash
- maps. This is to improve performance for very large numbers of
- asynchronous operations and also to reduce memory usage for very small
- numbers. A new macro `(BOOST_)ASIO_HASH_MAP_BUCKETS` may be used to
- tweak the sizes used for the bucket arrays. (N.B. this feature
- introduced a bug which was fixed in Asio 1.4.3 / Boost 1.40.)
-
-* Add performance optimisation for the Windows IOCP backend for when no
- timers are used.
-
-* Prevent locale settings from affecting formatting of TCP and UDP
- endpoints.
-
-* Fix a memory leak that occurred when an asynchronous SSL operation's
- completion handler threw an exception.
-
-* Fix the implementation of `io_control()` so that it adheres to the
- documented type requirements for IoControlCommand.
-
-* Fix incompatibility between Asio and ncurses.h.
-
-* On Windows, specifically handle the case when an overlapped `ReadFile`
- call fails with `ERROR_MORE_DATA`. This enables a hack where a
- `windows::stream_handle` can be used with a message-oriented named
- pipe.
-
-* Fix system call wrappers to always clear the error on success, as
- POSIX allows successful system calls to modify errno.
-
-* Don't include termios.h if `(BOOST_)ASIO_DISABLE_SERIAL_PORT` is
- defined.
-
-* Cleaned up some more MSVC level 4 warnings.
-
-* Various documentation fixes.
-
-[heading Asio 1.4.1]
-
-* Improved compatibility with some Windows firewall software.
-
-* Ensured arguments to `windows::overlapped_ptr::complete()` are correctly
- passed to the completion handler.
-
-* Fixed a link problem and multicast failure on QNX.
-
-* Fixed a compile error in SSL support on MinGW / g++ 3.4.5.
-
-* Drop back to using a pipe for notification if eventfd is not available
- at runtime on Linux.
-
-* Various minor bug and documentation fixes.
-
-[heading Asio 1.4.0]
-
-* Enhanced CompletionCondition concept with the signature
- `size_t CompletionCondition(error_code ec, size_t total)`, where the return
- value indicates the maximum number of bytes to be transferred on the next
- read or write operation. (The old CompletionCondition signature is still
- supported for backwards compatibility).
-
-* New `windows::overlapped_ptr` class to allow arbitrary overlapped I/O
- functions (such as `TransmitFile`) to be used with Asio.
-
-* On recent versions of Linux, an `eventfd` descriptor is now used (rather than
- a pipe) to interrupt a blocked select/epoll reactor.
-
-* Added const overloads of `lowest_layer()`.
-
-* Synchronous read, write, accept and connect operations are now thread safe
- (meaning that it is now permitted to perform concurrent synchronous
- operations on an individual socket, if supported by the OS).
-
-* Reactor-based `io_service` implementations now use lazy initialisation to
- reduce the memory usage of an `io_service` object used only as a message
- queue.
-
-[heading Asio 1.2.0]
-
-* Added support for serial ports.
-
-* Added support for UNIX domain sockets.
-
-* Added support for raw sockets and ICMP.
-
-* Added wrappers for POSIX stream-oriented file descriptors (excluding regular
- files).
-
-* Added wrappers for Windows stream-oriented `HANDLE`s such as named pipes
- (requires `HANDLE`s that work with I/O completion ports).
-
-* Added wrappers for Windows random-access `HANDLE`s such as files (requires
- `HANDLE`s that work with I/O completion ports).
-
-* Added support for reactor-style operations (i.e. they report readiness but
- perform no I/O) using a new `null_buffers` type.
-
-* Added an iterator type for bytewise traversal of buffer sequences.
-
-* Added new `read_until()` and `async_read_until()` overloads that take a
- user-defined function object for locating message boundaries.
-
-* Added an experimental two-lock queue (enabled by defining
- `(BOOST_)ASIO_ENABLE_TWO_LOCK_QUEUE`) that may provide better `io_service`
- scalability across many processors.
-
-* Various fixes, performance improvements, and more complete coverage of the
- custom memory allocation support.
-
-[heading Asio 1.0.0]
-
-First stable release of Asio.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/index.xml b/3rdparty/asio/src/doc/index.xml
deleted file mode 100644
index 3b7b556591c..00000000000
--- a/3rdparty/asio/src/doc/index.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "../../../boost/tools/boostbook/dtd/boostbook.dtd">
-
-<!--
- Copyright (c) 2003-2016 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)
--->
-
-<section id="asio.index">
- <index id="asio.index.index"/>
-</section>
diff --git a/3rdparty/asio/src/doc/makepdf.pl b/3rdparty/asio/src/doc/makepdf.pl
deleted file mode 100644
index 4bb90a4d3de..00000000000
--- a/3rdparty/asio/src/doc/makepdf.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (c) 2003-2016 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)
-
-use strict;
-
-# Determine version number
-my $version = "X.Y.Z";
-open(VERSION, "../../include/asio/version.hpp") or die("Can't open version.hpp");
-while (my $line = <VERSION>)
-{
- if ($line =~ /^#define ASIO_VERSION .* \/\/ (.*)$/)
- {
- $version = $1;
- }
-}
-close(VERSION);
-
-# Generate PDF output
-system("bjam asioref");
-system("xsltproc --stringparam asio.version $version asioref.xsl asio.docbook > asioref.docbook");
-system("dblatex -I overview -s asioref.sty -P table.in.float=0 -o asioref-$version.pdf asioref.docbook");
-system("rm asioref.docbook");
diff --git a/3rdparty/asio/src/doc/noncopyable_dox.txt b/3rdparty/asio/src/doc/noncopyable_dox.txt
deleted file mode 100644
index 949dabfc865..00000000000
--- a/3rdparty/asio/src/doc/noncopyable_dox.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
-\class noncopyable
-*/
diff --git a/3rdparty/asio/src/doc/overview.qbk b/3rdparty/asio/src/doc/overview.qbk
deleted file mode 100644
index 046b2cb6b6a..00000000000
--- a/3rdparty/asio/src/doc/overview.qbk
+++ /dev/null
@@ -1,97 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:overview Overview]
-
-* [link asio.overview.rationale Rationale]
-* [link asio.overview.core Core Concepts and Functionality]
- * [link asio.overview.core.basics Basic Asio Anatomy]
- * [link asio.overview.core.async The Proactor Design Pattern: Concurrency Without Threads]
- * [link asio.overview.core.threads Threads and Asio]
- * [link asio.overview.core.strands Strands: Use Threads Without Explicit Locking]
- * [link asio.overview.core.buffers Buffers]
- * [link asio.overview.core.streams Streams, Short Reads and Short Writes]
- * [link asio.overview.core.reactor Reactor-Style Operations]
- * [link asio.overview.core.line_based Line-Based Operations]
- * [link asio.overview.core.allocation Custom Memory Allocation]
- * [link asio.overview.core.handler_tracking Handler Tracking]
- * [link asio.overview.core.coroutine Stackless Coroutines]
- * [link asio.overview.core.spawn Stackful Coroutines]
-* [link asio.overview.networking Networking]
- * [link asio.overview.networking.protocols TCP, UDP and ICMP]
- * [link asio.overview.networking.other_protocols Support for Other Protocols]
- * [link asio.overview.networking.iostreams Socket Iostreams]
- * [link asio.overview.networking.bsd_sockets The BSD Socket API and Asio]
-* [link asio.overview.timers Timers]
-* [link asio.overview.serial_ports Serial Ports]
-* [link asio.overview.signals Signal Handling]
-* [link asio.overview.posix POSIX-Specific Functionality]
- * [link asio.overview.posix.local UNIX Domain Sockets]
- * [link asio.overview.posix.stream_descriptor Stream-Oriented File Descriptors]
-* [link asio.overview.windows Windows-Specific Functionality]
- * [link asio.overview.windows.stream_handle Stream-Oriented HANDLEs]
- * [link asio.overview.windows.random_access_handle Random-Access HANDLEs]
-* [link asio.overview.ssl SSL]
-* [link asio.overview.cpp2011 C++ 2011 Support]
-* [link asio.overview.implementation Platform-Specific Implementation Notes]
-
-[include overview/rationale.qbk]
-
-[section:core Core Concepts and Functionality]
-
-* [link asio.overview.core.basics Basic Asio Anatomy]
-* [link asio.overview.core.async The Proactor Design Pattern: Concurrency Without Threads]
-* [link asio.overview.core.threads Threads and Asio]
-* [link asio.overview.core.strands Strands: Use Threads Without Explicit Locking]
-* [link asio.overview.core.buffers Buffers]
-* [link asio.overview.core.streams Streams, Short Reads and Short Writes]
-* [link asio.overview.core.reactor Reactor-Style Operations]
-* [link asio.overview.core.line_based Line-Based Operations]
-* [link asio.overview.core.allocation Custom Memory Allocation]
-* [link asio.overview.core.handler_tracking Handler Tracking]
-* [link asio.overview.core.coroutine Stackless Coroutines]
-* [link asio.overview.core.spawn Stackful Coroutines]
-
-[include overview/basics.qbk]
-[include overview/async.qbk]
-[include overview/threads.qbk]
-[include overview/strands.qbk]
-[include overview/buffers.qbk]
-[include overview/streams.qbk]
-[include overview/reactor.qbk]
-[include overview/line_based.qbk]
-[include overview/allocation.qbk]
-[include overview/handler_tracking.qbk]
-[include overview/coroutine.qbk]
-[include overview/spawn.qbk]
-
-[endsect]
-
-[section:networking Networking]
-
-* [link asio.overview.networking.protocols TCP, UDP and ICMP]
-* [link asio.overview.networking.other_protocols Support for Other Protocols]
-* [link asio.overview.networking.iostreams Socket Iostreams]
-* [link asio.overview.networking.bsd_sockets The BSD Socket API and Asio]
-
-[include overview/protocols.qbk]
-[include overview/other_protocols.qbk]
-[include overview/iostreams.qbk]
-[include overview/bsd_sockets.qbk]
-
-[endsect]
-
-[include overview/timers.qbk]
-[include overview/serial_ports.qbk]
-[include overview/signals.qbk]
-[include overview/posix.qbk]
-[include overview/windows.qbk]
-[include overview/ssl.qbk]
-[include overview/cpp2011.qbk]
-[include overview/implementation.qbk]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/allocation.qbk b/3rdparty/asio/src/doc/overview/allocation.qbk
deleted file mode 100644
index ecdc71a5011..00000000000
--- a/3rdparty/asio/src/doc/overview/allocation.qbk
+++ /dev/null
@@ -1,58 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:allocation Custom Memory Allocation]
-
-Many asynchronous operations need to allocate an object to store state
-associated with the operation. For example, a Win32 implementation needs
-`OVERLAPPED`-derived objects to pass to Win32 API functions.
-
-Furthermore, programs typically contain easily identifiable chains of
-asynchronous operations. A half duplex protocol implementation (e.g. an HTTP
-server) would have a single chain of operations per client (receives followed
-by sends). A full duplex protocol implementation would have two chains
-executing in parallel. Programs should be able to leverage this knowledge to
-reuse memory for all asynchronous operations in a chain.
-
-Given a copy of a user-defined `Handler` object `h`, if the implementation
-needs to allocate memory associated with that handler it will execute the code:
-
- void* pointer = asio_handler_allocate(size, &h);
-
-Similarly, to deallocate the memory it will execute:
-
- asio_handler_deallocate(pointer, size, &h);
-
-These functions are located using argument-dependent lookup. The implementation
-provides default implementations of the above functions in the `asio` namespace:
-
- void* asio_handler_allocate(size_t, ...);
- void asio_handler_deallocate(void*, size_t, ...);
-
-which are implemented in terms of `::operator new()` and `::operator delete()`
-respectively.
-
-The implementation guarantees that the deallocation will occur before the
-associated handler is invoked, which means the memory is ready to be reused for
-any new asynchronous operations started by the handler.
-
-The custom memory allocation functions may be called from any user-created
-thread that is calling a library function. The implementation guarantees that,
-for the asynchronous operations included the library, the implementation will
-not make concurrent calls to the memory allocation functions for that handler.
-The implementation will insert appropriate memory barriers to ensure correct
-memory visibility should allocation functions need to be called from different
-threads.
-
-[heading See Also]
-
-[link asio.reference.asio_handler_allocate asio_handler_allocate],
-[link asio.reference.asio_handler_deallocate asio_handler_deallocate],
-[link asio.examples.cpp03_examples.allocation custom memory allocation example (C++03)],
-[link asio.examples.cpp11_examples.allocation custom memory allocation example (C++11)].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/async.qbk b/3rdparty/asio/src/doc/overview/async.qbk
deleted file mode 100644
index ff627872416..00000000000
--- a/3rdparty/asio/src/doc/overview/async.qbk
+++ /dev/null
@@ -1,185 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:async The Proactor Design Pattern: Concurrency Without Threads]
-
-The Asio library offers side-by-side support for synchronous and asynchronous
-operations. The asynchronous support is based on the Proactor design pattern
-[link asio.overview.core.async.references \[POSA2\]]. The advantages and
-disadvantages of this approach, when compared to a synchronous-only or Reactor
-approach, are outlined below.
-
-[heading Proactor and Asio]
-
-Let us examine how the Proactor design pattern is implemented in Asio,
-without reference to platform-specific details.
-
-[$proactor.png]
-
-[*Proactor design pattern (adapted from \[POSA2\])]
-
-[mdash] Asynchronous Operation
-
-[:Defines an operation that is executed asynchronously, such as an asynchronous
-read or write on a socket.]
-
-[mdash] Asynchronous Operation Processor
-
-[:Executes asynchronous operations and queues events on a completion event
-queue when operations complete. From a high-level point of view, internal
-services like `reactive_socket_service` are asynchronous operation processors.]
-
-[mdash] Completion Event Queue
-
-[:Buffers completion events until they are dequeued by an asynchronous event
-demultiplexer.]
-
-[mdash] Completion Handler
-
-[:Processes the result of an asynchronous operation. These are function
-objects, often created using `boost::bind`.]
-
-[mdash] Asynchronous Event Demultiplexer
-
-[:Blocks waiting for events to occur on the completion event queue, and returns
-a completed event to its caller.]
-
-[mdash] Proactor
-
-[:Calls the asynchronous event demultiplexer to dequeue events, and dispatches
-the completion handler (i.e. invokes the function object) associated with the
-event. This abstraction is represented by the `io_context` class.]
-
-[mdash] Initiator
-
-[:Application-specific code that starts asynchronous operations. The initiator
-interacts with an asynchronous operation processor via a high-level interface
-such as `basic_stream_socket`, which in turn delegates to a service like
-`reactive_socket_service`.]
-
-[heading Implementation Using Reactor]
-
-On many platforms, Asio implements the Proactor design pattern in terms
-of a Reactor, such as `select`, `epoll` or `kqueue`. This implementation
-approach corresponds to the Proactor design pattern as follows:
-
-[mdash] Asynchronous Operation Processor
-
-[:A reactor implemented using `select`, `epoll` or `kqueue`. When the reactor
-indicates that the resource is ready to perform the operation, the processor
-executes the asynchronous operation and enqueues the associated completion
-handler on the completion event queue.]
-
-[mdash] Completion Event Queue
-
-[:A linked list of completion handlers (i.e. function objects).]
-
-[mdash] Asynchronous Event Demultiplexer
-
-[:This is implemented by waiting on an event or condition variable until a
-completion handler is available in the completion event queue.]
-
-[heading Implementation Using Windows Overlapped I/O]
-
-On Windows NT, 2000 and XP, Asio takes advantage of overlapped I/O to
-provide an efficient implementation of the Proactor design pattern. This
-implementation approach corresponds to the Proactor design pattern as follows:
-
-[mdash] Asynchronous Operation Processor
-
-[:This is implemented by the operating system. Operations are initiated by
-calling an overlapped function such as `AcceptEx`.]
-
-[mdash] Completion Event Queue
-
-[:This is implemented by the operating system, and is associated with an I/O
-completion port. There is one I/O completion port for each `io_context`
-instance.]
-
-[mdash] Asynchronous Event Demultiplexer
-
-[:Called by Asio to dequeue events and their associated completion
-handlers.]
-
-[heading Advantages]
-
-[mdash] Portability.
-
-[:Many operating systems offer a native asynchronous I/O API (such as
-overlapped I/O on __Windows__) as the preferred option for developing high
-performance network applications. The library may be implemented in terms of
-native asynchronous I/O. However, if native support is not available, the
-library may also be implemented using synchronous event demultiplexors that
-typify the Reactor pattern, such as __POSIX__ `select()`.]
-
-[mdash] Decoupling threading from concurrency.
-
-[:Long-duration operations are performed asynchronously by the implementation
-on behalf of the application. Consequently applications do not need to spawn
-many threads in order to increase concurrency.]
-
-[mdash] Performance and scalability.
-
-[:Implementation strategies such as thread-per-connection (which a
-synchronous-only approach would require) can degrade system performance, due to
-increased context switching, synchronisation and data movement among CPUs. With
-asynchronous operations it is possible to avoid the cost of context switching
-by minimising the number of operating system threads [mdash] typically a
-limited resource [mdash] and only activating the logical threads of control
-that have events to process.]
-
-[mdash] Simplified application synchronisation.
-
-[:Asynchronous operation completion handlers can be written as though they
-exist in a single-threaded environment, and so application logic can be
-developed with little or no concern for synchronisation issues.]
-
-[mdash] Function composition.
-
-[:Function composition refers to the implementation of functions to provide a
-higher-level operation, such as sending a message in a particular format. Each
-function is implemented in terms of multiple calls to lower-level read or write
-operations.]
-
-[:For example, consider a protocol where each message consists of a
-fixed-length header followed by a variable length body, where the length of the
-body is specified in the header. A hypothetical read_message operation could be
-implemented using two lower-level reads, the first to receive the header and,
-once the length is known, the second to receive the body.]
-
-[:To compose functions in an asynchronous model, asynchronous operations can be
-chained together. That is, a completion handler for one operation can initiate
-the next. Starting the first call in the chain can be encapsulated so that the
-caller need not be aware that the higher-level operation is implemented as a
-chain of asynchronous operations.]
-
-[:The ability to compose new operations in this way simplifies the development
-of higher levels of abstraction above a networking library, such as functions
-to support a specific protocol.]
-
-[heading Disadvantages]
-
-[mdash] Program complexity.
-
-[:It is more difficult to develop applications using asynchronous mechanisms
-due to the separation in time and space between operation initiation and
-completion. Applications may also be harder to debug due to the inverted flow
-of control.]
-
-[mdash] Memory usage.
-
-[:Buffer space must be committed for the duration of a read or write operation,
-which may continue indefinitely, and a separate buffer is required for each
-concurrent operation. The Reactor pattern, on the other hand, does not require
-buffer space until a socket is ready for reading or writing.]
-
-[heading References]
-
-\[POSA2\] D. Schmidt et al, ['Pattern Oriented Software Architecture, Volume
-2]. Wiley, 2000.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/async_op1.dot b/3rdparty/asio/src/doc/overview/async_op1.dot
deleted file mode 100644
index cbb95fb6949..00000000000
--- a/3rdparty/asio/src/doc/overview/async_op1.dot
+++ /dev/null
@@ -1,78 +0,0 @@
-digraph g
-{
- graph
- [
- nodesep="0.2"
- ];
-
- edge
- [
- fontname="Helvetica",
- fontsize=10,
- labelfontname="Helvetica",
- labelfontsize=10
- ];
-
- node
- [
- fontname="Helvetica",
- fontsize=10,
- shape=box
- ];
-
- edge
- [
- arrowhead="open"
- ]
-
- // Program elements.
- {
- operating_system [ label="Operating System", shape=ellipse ];
- io_context [ label="io_context" ];
- io_object [ label="I/O Object\ne.g. socket" ];
- your_program [ label="Your Program" ];
- your_completion_handler [ label="Your Completion Handler" ];
- }
-
- // Owning relationships.
- {
- edge [ arrowtail="diamond" ];
- your_program:e -> your_completion_handler:n;
- your_program:w -> io_object:nw;
- your_program:se -> io_context:ne;
- }
-
- // Non-owning relationships;
- {
- io_object:sw -> io_context:w;
- }
-
- // Visible actions.
- {
- edge [ style="dashed", color="#808080" ];
-
- // Forward actions.
- {
- your_program:sw -> io_object:n [ label="1" ];
- io_object:s -> io_context:nw [ label="2" ];
- io_context:s -> operating_system:n [ label="3" ];
- }
- }
-
- // Invisible actions.
- {
- edge [ style="invis" ];
-
- // Forward actions.
- {
- your_program:s -> io_context:n [ label="5" ];
- }
-
- // Reverse actions.
- {
- edge [ arrowhead="none", arrowtail="open" ];
- //io_context:s -> operating_system:n [ label="4" ];
- your_completion_handler:s -> io_context:e [ label="6" ];
- }
- }
-}
diff --git a/3rdparty/asio/src/doc/overview/async_op1.png b/3rdparty/asio/src/doc/overview/async_op1.png
deleted file mode 100644
index 464bc90e683..00000000000
--- a/3rdparty/asio/src/doc/overview/async_op1.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/asio/src/doc/overview/async_op2.dot b/3rdparty/asio/src/doc/overview/async_op2.dot
deleted file mode 100644
index 60a3275c391..00000000000
--- a/3rdparty/asio/src/doc/overview/async_op2.dot
+++ /dev/null
@@ -1,78 +0,0 @@
-digraph g
-{
- graph
- [
- nodesep="0.2"
- ];
-
- edge
- [
- fontname="Helvetica",
- fontsize=10,
- labelfontname="Helvetica",
- labelfontsize=10
- ];
-
- node
- [
- fontname="Helvetica",
- fontsize=10,
- shape=box
- ];
-
- edge
- [
- arrowhead="open"
- ]
-
- // Program elements.
- {
- operating_system [ label="Operating System", shape=ellipse ];
- io_context [ label="io_context" ];
- io_object [ label="I/O Object\ne.g. socket" ];
- your_program [ label="Your Program" ];
- your_completion_handler [ label="Your Completion Handler" ];
- }
-
- // Owning relationships.
- {
- edge [ arrowtail="diamond" ];
- your_program:e -> your_completion_handler:n;
- your_program:w -> io_object:nw;
- your_program:se -> io_context:ne;
- }
-
- // Non-owning relationships;
- {
- io_object:sw -> io_context:w;
- }
-
- // Visible actions.
- {
- edge [ style="dashed", color="#808080" ];
-
- // Forward actions.
- {
- your_program:s -> io_context:n [ label="5" ];
- }
-
- // Reverse actions.
- {
- edge [ arrowhead="none", arrowtail="open" ];
- io_context:s -> operating_system:n [ label="4" ];
- your_completion_handler:s -> io_context:e [ label="6" ];
- }
- }
-
- // Invisible actions.
- {
- edge [ style="invis" ];
-
- // Forward actions.
- {
- your_program:sw -> io_object:n [ label="1" ];
- io_object:s -> io_context:nw [ label="2" ];
- //io_context:s -> operating_system:n [ label="3" ];
- }
- }
-}
diff --git a/3rdparty/asio/src/doc/overview/async_op2.png b/3rdparty/asio/src/doc/overview/async_op2.png
deleted file mode 100644
index ba256ec8e7f..00000000000
--- a/3rdparty/asio/src/doc/overview/async_op2.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/asio/src/doc/overview/basics.qbk b/3rdparty/asio/src/doc/overview/basics.qbk
deleted file mode 100644
index c867563840a..00000000000
--- a/3rdparty/asio/src/doc/overview/basics.qbk
+++ /dev/null
@@ -1,106 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:basics Basic Asio Anatomy]
-
-Asio may be used to perform both synchronous and asynchronous operations on I/O
-objects such as sockets. Before using Asio it may be useful to get a conceptual
-picture of the various parts of Asio, your program, and how they work together.
-
-As an introductory example, let's consider what happens when you perform a
-connect operation on a socket. We shall start by examining synchronous
-operations.
-
-[$sync_op.png]
-
-[*Your program] will have at least one [*io_context] object. The [*io_context]
-represents [*your program]'s link to the [*operating system]'s I/O services.
-
- asio::io_context io_context;
-
-To perform I/O operations [*your program] will need an [*I/O object] such as a
-TCP socket:
-
- asio::ip::tcp::socket socket(io_context);
-
-When a synchronous connect operation is performed, the following sequence of
-events occurs:
-
-1. [*Your program] initiates the connect operation by calling the [*I/O
-object]:
-
- socket.connect(server_endpoint);
-
-2. The [*I/O object] forwards the request to the [*io_context].
-
-3. The [*io_context] calls on the [*operating system] to perform the connect
-operation.
-
-4. The [*operating system] returns the result of the operation to the
-[*io_context].
-
-5. The [*io_context] translates any error resulting from the operation into an
-object of type `asio::error_code`. An `error_code` may be compared with
-specific values, or tested as a boolean (where a `false` result means that no
-error occurred). The result is then forwarded back up to the [*I/O object].
-
-6. The [*I/O object] throws an exception of type `asio::system_error` if the
-operation failed. If the code to initiate the operation had instead been
-written as:
-
- asio::error_code ec;
- socket.connect(server_endpoint, ec);
-
-then the `error_code` variable `ec` would be set to the result of the
-operation, and no exception would be thrown.
-
-When an asynchronous operation is used, a different sequence of events occurs.
-
-[$async_op1.png]
-
-1. [*Your program] initiates the connect operation by calling the [*I/O
-object]:
-
- socket.async_connect(server_endpoint, your_completion_handler);
-
-where `your_completion_handler` is a function or function object with the
-signature:
-
- void your_completion_handler(const asio::error_code& ec);
-
-The exact signature required depends on the asynchronous operation being
-performed. The reference documentation indicates the appropriate form for each
-operation.
-
-2. The [*I/O object] forwards the request to the [*io_context].
-
-3. The [*io_context] signals to the [*operating system] that it should start an
-asynchronous connect.
-
-Time passes. (In the synchronous case this wait would have been contained
-entirely within the duration of the connect operation.)
-
-[$async_op2.png]
-
-4. The [*operating system] indicates that the connect operation has completed
-by placing the result on a queue, ready to be picked up by the [*io_context].
-
-5. [*Your program] must make a call to `io_context::run()` (or to one of the
-similar [*io_context] member functions) in order for the result to be
-retrieved. A call to `io_context::run()` blocks while there are unfinished
-asynchronous operations, so you would typically call it as soon as you have
-started your first asynchronous operation.
-
-6. While inside the call to `io_context::run()`, the [*io_context] dequeues the
-result of the operation, translates it into an `error_code`, and then passes it
-to [*your completion handler].
-
-This is a simplified picture of how Asio operates. You will want to delve
-further into the documentation if your needs are more advanced, such as
-extending Asio to perform other types of asynchronous operations.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/bsd_sockets.qbk b/3rdparty/asio/src/doc/overview/bsd_sockets.qbk
deleted file mode 100644
index acc67da29d4..00000000000
--- a/3rdparty/asio/src/doc/overview/bsd_sockets.qbk
+++ /dev/null
@@ -1,270 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:bsd_sockets The BSD Socket API and Asio]
-
-The Asio library includes a low-level socket interface based on the BSD socket
-API, which is widely implemented and supported by extensive literature. It is
-also used as the basis for networking APIs in other languages, like Java. This
-low-level interface is designed to support the development of efficient and
-scalable applications. For example, it permits programmers to exert finer
-control over the number of system calls, avoid redundant data copying, minimise
-the use of resources like threads, and so on.
-
-Unsafe and error prone aspects of the BSD socket API not included. For example,
-the use of `int` to represent all sockets lacks type safety. The socket
-representation in Asio uses a distinct type for each protocol, e.g. for TCP one
-would use `ip::tcp::socket`, and for UDP one uses `ip::udp::socket`.
-
-The following table shows the mapping between the BSD socket API and Asio:
-
-[table
- [
- [BSD Socket API Elements]
- [Equivalents in Asio]
- ]
- [
- [socket descriptor - `int` (POSIX) or `SOCKET` (Windows)]
- [ For TCP: [link asio.reference.ip__tcp.socket ip::tcp::socket],
- [link asio.reference.ip__tcp.acceptor ip::tcp::acceptor]
-
- For UDP: [link asio.reference.ip__udp.socket ip::udp::socket]
-
- [link asio.reference.basic_socket basic_socket],
- [link asio.reference.basic_stream_socket basic_stream_socket],
- [link asio.reference.basic_datagram_socket basic_datagram_socket],
- [link asio.reference.basic_raw_socket basic_raw_socket] ]
- ]
- [
- [`in_addr`,
- `in6_addr`]
- [ [link asio.reference.ip__address ip::address],
- [link asio.reference.ip__address ip::address_v4],
- [link asio.reference.ip__address ip::address_v6] ]
- ]
- [
- [`sockaddr_in`,
- `sockaddr_in6`]
- [ For TCP: [link asio.reference.ip__tcp.endpoint ip::tcp::endpoint]
-
- For UDP: [link asio.reference.ip__udp.endpoint ip::udp::endpoint]
-
- [link asio.reference.ip__basic_endpoint ip::basic_endpoint] ]
- ]
- [
- [`accept()`]
- [ For TCP: [link asio.reference.basic_socket_acceptor.accept ip::tcp::acceptor::accept()]
-
- [link asio.reference.basic_socket_acceptor.accept basic_socket_acceptor::accept()] ]
- ]
- [
- [`bind()`]
- [ For TCP: [link asio.reference.basic_socket.bind ip::tcp::acceptor::bind()],
- [link asio.reference.basic_socket.bind ip::tcp::socket::bind()]
-
- For UDP: [link asio.reference.basic_socket.bind ip::udp::socket::bind()]
-
- [link asio.reference.basic_socket.bind basic_socket::bind()] ]
- ]
- [
- [`close()`]
- [ For TCP: [link asio.reference.basic_socket.close ip::tcp::acceptor::close()],
- [link asio.reference.basic_socket.close ip::tcp::socket::close()]
-
- For UDP: [link asio.reference.basic_socket.close ip::udp::socket::close()]
-
- [link asio.reference.basic_socket.close basic_socket::close()] ]
- ]
- [
- [`connect()`]
- [ For TCP: [link asio.reference.basic_socket.connect ip::tcp::socket::connect()]
-
- For UDP: [link asio.reference.basic_socket.connect ip::udp::socket::connect()]
-
- [link asio.reference.basic_socket.connect basic_socket::connect()] ]
- ]
- [
- [`getaddrinfo()`,
- `gethostbyaddr()`,
- `gethostbyname()`,
- `getnameinfo()`,
- `getservbyname()`,
- `getservbyport()`]
- [ For TCP: [link asio.reference.ip__basic_resolver.resolve ip::tcp::resolver::resolve()],
- [link asio.reference.ip__basic_resolver.async_resolve ip::tcp::resolver::async_resolve()]
-
- For UDP: [link asio.reference.ip__basic_resolver.resolve ip::udp::resolver::resolve()],
- [link asio.reference.ip__basic_resolver.async_resolve ip::udp::resolver::async_resolve()]
-
- [link asio.reference.ip__basic_resolver.resolve ip::basic_resolver::resolve()],
- [link asio.reference.ip__basic_resolver.async_resolve ip::basic_resolver::async_resolve()] ]
- ]
- [
- [`gethostname()`]
- [ [link asio.reference.ip__host_name ip::host_name()] ]
- ]
- [
- [`getpeername()`]
- [ For TCP: [link asio.reference.basic_socket.remote_endpoint ip::tcp::socket::remote_endpoint()]
-
- For UDP: [link asio.reference.basic_socket.remote_endpoint ip::udp::socket::remote_endpoint()]
-
- [link asio.reference.basic_socket.remote_endpoint basic_socket::remote_endpoint()] ]
- ]
- [
- [`getsockname()`]
- [ For TCP: [link asio.reference.basic_socket.local_endpoint ip::tcp::acceptor::local_endpoint()],
- [link asio.reference.basic_socket.local_endpoint ip::tcp::socket::local_endpoint()]
-
- For UDP: [link asio.reference.basic_socket.local_endpoint ip::udp::socket::local_endpoint()]
-
- [link asio.reference.basic_socket.local_endpoint basic_socket::local_endpoint()] ]
- ]
- [
- [`getsockopt()`]
- [ For TCP: [link asio.reference.basic_socket.get_option ip::tcp::acceptor::get_option()],
- [link asio.reference.basic_socket.get_option ip::tcp::socket::get_option()]
-
- For UDP: [link asio.reference.basic_socket.get_option ip::udp::socket::get_option()]
-
- [link asio.reference.basic_socket.get_option basic_socket::get_option()] ]
- ]
- [
- [`inet_addr()`,
- `inet_aton()`,
- `inet_pton()`]
- [ [link asio.reference.ip__address.from_string ip::address::from_string()],
- [link asio.reference.ip__address.from_string ip::address_v4::from_string()],
- [link asio.reference.ip__address.from_string ip_address_v6::from_string()] ]
- ]
- [
- [`inet_ntoa()`,
- `inet_ntop()`]
- [ [link asio.reference.ip__address.to_string ip::address::to_string()],
- [link asio.reference.ip__address.to_string ip::address_v4::to_string()],
- [link asio.reference.ip__address.to_string ip_address_v6::to_string()] ]
- ]
- [
- [`ioctl()`]
- [ For TCP: [link asio.reference.basic_socket.io_control ip::tcp::socket::io_control()]
-
- For UDP: [link asio.reference.basic_socket.io_control ip::udp::socket::io_control()]
-
- [link asio.reference.basic_socket.io_control basic_socket::io_control()] ]
- ]
- [
- [`listen()`]
- [ For TCP: [link asio.reference.basic_socket_acceptor.listen ip::tcp::acceptor::listen()]
-
- [link asio.reference.basic_socket_acceptor.listen basic_socket_acceptor::listen()] ]
- ]
- [
- [`poll()`,
- `select()`,
- `pselect()`]
- [ [link asio.reference.io_context.run io_context::run()],
- [link asio.reference.io_context.run_one io_context::run_one()],
- [link asio.reference.io_context.poll io_context::poll()],
- [link asio.reference.io_context.poll_one io_context::poll_one()]
-
- Note: in conjunction with asynchronous operations. ]
- ]
- [
- [`readv()`,
- `recv()`,
- `read()`]
- [ For TCP: [link asio.reference.basic_stream_socket.read_some ip::tcp::socket::read_some()],
- [link asio.reference.basic_stream_socket.async_read_some ip::tcp::socket::async_read_some()],
- [link asio.reference.basic_stream_socket.receive ip::tcp::socket::receive()],
- [link asio.reference.basic_stream_socket.async_receive ip::tcp::socket::async_receive()]
-
- For UDP: [link asio.reference.basic_datagram_socket.receive ip::udp::socket::receive()],
- [link asio.reference.basic_datagram_socket.async_receive ip::udp::socket::async_receive()]
-
- [link asio.reference.basic_stream_socket.read_some basic_stream_socket::read_some()],
- [link asio.reference.basic_stream_socket.async_read_some basic_stream_socket::async_read_some()],
- [link asio.reference.basic_stream_socket.receive basic_stream_socket::receive()],
- [link asio.reference.basic_stream_socket.async_receive basic_stream_socket::async_receive()],
- [link asio.reference.basic_datagram_socket.receive basic_datagram_socket::receive()],
- [link asio.reference.basic_datagram_socket.async_receive basic_datagram_socket::async_receive()] ]
- ]
- [
- [`recvfrom()`]
- [ For UDP: [link asio.reference.basic_datagram_socket.receive_from ip::udp::socket::receive_from()],
- [link asio.reference.basic_datagram_socket.async_receive_from ip::udp::socket::async_receive_from()]
-
- [link asio.reference.basic_datagram_socket.receive_from basic_datagram_socket::receive_from()],
- [link asio.reference.basic_datagram_socket.async_receive_from basic_datagram_socket::async_receive_from()] ]
- ]
- [
- [`send()`,
- `write()`,
- `writev()`]
- [ For TCP: [link asio.reference.basic_stream_socket.write_some ip::tcp::socket::write_some()],
- [link asio.reference.basic_stream_socket.async_write_some ip::tcp::socket::async_write_some()],
- [link asio.reference.basic_stream_socket.send ip::tcp::socket::send()],
- [link asio.reference.basic_stream_socket.async_send ip::tcp::socket::async_send()]
-
- For UDP: [link asio.reference.basic_datagram_socket.send ip::udp::socket::send()],
- [link asio.reference.basic_datagram_socket.async_send ip::udp::socket::async_send()]
-
- [link asio.reference.basic_stream_socket.write_some basic_stream_socket::write_some()],
- [link asio.reference.basic_stream_socket.async_write_some basic_stream_socket::async_write_some()],
- [link asio.reference.basic_stream_socket.send basic_stream_socket::send()],
- [link asio.reference.basic_stream_socket.async_send basic_stream_socket::async_send()],
- [link asio.reference.basic_datagram_socket.send basic_datagram_socket::send()],
- [link asio.reference.basic_datagram_socket.async_send basic_datagram_socket::async_send()] ]
- ]
- [
- [`sendto()`]
- [ For UDP: [link asio.reference.basic_datagram_socket.send_to ip::udp::socket::send_to()],
- [link asio.reference.basic_datagram_socket.async_send_to ip::udp::socket::async_send_to()]
-
- [link asio.reference.basic_datagram_socket.send_to basic_datagram_socket::send_to()],
- [link asio.reference.basic_datagram_socket.async_send_to basic_datagram_socket::async_send_to()] ]
- ]
- [
- [`setsockopt()`]
- [ For TCP: [link asio.reference.basic_socket.set_option ip::tcp::acceptor::set_option()],
- [link asio.reference.basic_socket.set_option ip::tcp::socket::set_option()]
-
- For UDP: [link asio.reference.basic_socket.set_option ip::udp::socket::set_option()]
-
- [link asio.reference.basic_socket.set_option basic_socket::set_option()] ]
- ]
- [
- [`shutdown()`]
- [ For TCP: [link asio.reference.basic_socket.shutdown ip::tcp::socket::shutdown()]
-
- For UDP: [link asio.reference.basic_socket.shutdown ip::udp::socket::shutdown()]
-
- [link asio.reference.basic_socket.shutdown basic_socket::shutdown()] ]
- ]
- [
- [`sockatmark()`]
- [ For TCP: [link asio.reference.basic_socket.at_mark ip::tcp::socket::at_mark()]
-
- [link asio.reference.basic_socket.at_mark basic_socket::at_mark()] ]
- ]
- [
- [`socket()`]
- [ For TCP: [link asio.reference.basic_socket.open ip::tcp::acceptor::open()],
- [link asio.reference.basic_socket.open ip::tcp::socket::open()]
-
- For UDP: [link asio.reference.basic_socket.open ip::udp::socket::open()]
-
- [link asio.reference.basic_socket.open basic_socket::open()] ]
- ]
- [
- [`socketpair()`]
- [ [link asio.reference.local__connect_pair local::connect_pair()]
-
- Note: POSIX operating systems only. ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/buffers.qbk b/3rdparty/asio/src/doc/overview/buffers.qbk
deleted file mode 100644
index bd8760d458f..00000000000
--- a/3rdparty/asio/src/doc/overview/buffers.qbk
+++ /dev/null
@@ -1,163 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:buffers Buffers]
-
-Fundamentally, I/O involves the transfer of data to and from contiguous regions
-of memory, called buffers. These buffers can be simply expressed as a tuple
-consisting of a pointer and a size in bytes. However, to allow the development
-of efficient network applications, Asio includes support for scatter-gather
-operations. These operations involve one or more buffers:
-
-* A scatter-read receives data into multiple buffers.
-* A gather-write transmits multiple buffers.
-
-Therefore we require an abstraction to represent a collection of buffers. The
-approach used in Asio is to define a type (actually two types) to
-represent a single buffer. These can be stored in a container, which may be
-passed to the scatter-gather operations.
-
-In addition to specifying buffers as a pointer and size in bytes, Asio makes a
-distinction between modifiable memory (called mutable) and non-modifiable
-memory (where the latter is created from the storage for a const-qualified
-variable). These two types could therefore be defined as follows:
-
- typedef std::pair<void*, std::size_t> mutable_buffer;
- typedef std::pair<const void*, std::size_t> const_buffer;
-
-Here, a mutable_buffer would be convertible to a const_buffer, but conversion
-in the opposite direction is not valid.
-
-However, Asio does not use the above definitions as-is, but instead defines two
-classes: `mutable_buffer` and `const_buffer`. The goal of these is to provide
-an opaque representation of contiguous memory, where:
-
-* Types behave as std::pair would in conversions. That is, a `mutable_buffer` is
- convertible to a `const_buffer`, but the opposite conversion is disallowed.
-
-* There is protection against buffer overruns. Given a buffer instance, a user
- can only create another buffer representing the same range of memory or a
- sub-range of it. To provide further safety, the library also includes
- mechanisms for automatically determining the size of a buffer from an array,
- `boost::array` or `std::vector` of POD elements, or from a `std::string`.
-
-* The underlying memory is explicitly accessed using the `data()` member
- function. In general an application should never need to do this, but it is
- required by the library implementation to pass the raw memory to the
- underlying operating system functions.
-
-Finally, multiple buffers can be passed to scatter-gather operations (such as
-[link asio.reference.read read()] or [link asio.reference.write write()]) by
-putting the buffer objects into a container. The `MutableBufferSequence` and
-`ConstBufferSequence` concepts have been defined so that containers such as
-`std::vector`, `std::list`, `std::vector` or `boost::array` can be used.
-
-[heading Streambuf for Integration with Iostreams]
-
-The class `asio::basic_streambuf` is derived from `std::basic_streambuf` to
-associate the input sequence and output sequence with one or more objects of
-some character array type, whose elements store arbitrary values. These
-character array objects are internal to the streambuf object, but direct access
-to the array elements is provided to permit them to be used with I/O
-operations, such as the send or receive operations of a socket:
-
-* The input sequence of the streambuf is accessible via the [link
- asio.reference.basic_streambuf.data data()] member function. The return type
- of this function meets the `ConstBufferSequence` requirements.
-
-* The output sequence of the streambuf is accessible via the [link
- asio.reference.basic_streambuf.data prepare()] member function. The return
- type of this function meets the `MutableBufferSequence` requirements.
-
-* Data is transferred from the front of the output sequence to the back of the
- input sequence by calling the [link asio.reference.basic_streambuf.commit
- commit()] member function.
-
-* Data is removed from the front of the input sequence by calling the [link
- asio.reference.basic_streambuf.consume consume()] member function.
-
-The streambuf constructor accepts a `size_t` argument specifying the maximum of
-the sum of the sizes of the input sequence and output sequence. Any operation
-that would, if successful, grow the internal data beyond this limit will throw
-a `std::length_error` exception.
-
-[heading Bytewise Traversal of Buffer Sequences]
-
-The `buffers_iterator<>` class template allows buffer sequences (i.e. types
-meeting `MutableBufferSequence` or `ConstBufferSequence` requirements) to be
-traversed as though they were a contiguous sequence of bytes. Helper functions
-called buffers_begin() and buffers_end() are also provided, where the
-buffers_iterator<> template parameter is automatically deduced.
-
-As an example, to read a single line from a socket and into a `std::string`,
-you may write:
-
- asio::streambuf sb;
- ...
- std::size_t n = asio::read_until(sock, sb, '\n');
- asio::streambuf::const_buffers_type bufs = sb.data();
- std::string line(
- asio::buffers_begin(bufs),
- asio::buffers_begin(bufs) + n);
-
-[heading Buffer Debugging]
-
-Some standard library implementations, such as the one that ships with
-Microsoft Visual C++ 8.0 and later, provide a feature called iterator
-debugging. What this means is that the validity of iterators is checked at
-runtime. If a program tries to use an iterator that has been invalidated, an
-assertion will be triggered. For example:
-
- std::vector<int> v(1)
- std::vector<int>::iterator i = v.begin();
- v.clear(); // invalidates iterators
- *i = 0; // assertion!
-
-Asio takes advantage of this feature to add buffer debugging. Consider the
-following code:
-
- void dont_do_this()
- {
- std::string msg = "Hello, world!";
- asio::async_write(sock, asio::buffer(msg), my_handler);
- }
-
-When you call an asynchronous read or write you need to ensure that the buffers
-for the operation are valid until the completion handler is called. In the
-above example, the buffer is the `std::string` variable `msg`. This variable is
-on the stack, and so it goes out of scope before the asynchronous operation
-completes. If you're lucky then the application will crash, but random failures
-are more likely.
-
-When buffer debugging is enabled, Asio stores an iterator into the string until
-the asynchronous operation completes, and then dereferences it to check its
-validity. In the above example you would observe an assertion failure just
-before Asio tries to call the completion handler.
-
-This feature is automatically made available for Microsoft Visual Studio 8.0 or
-later and for GCC when `_GLIBCXX_DEBUG` is defined. There is a performance cost
-to this checking, so buffer debugging is only enabled in debug builds. For
-other compilers it may be enabled by defining `ASIO_ENABLE_BUFFER_DEBUGGING`.
-It can also be explicitly disabled by defining `ASIO_DISABLE_BUFFER_DEBUGGING`.
-
-[heading See Also]
-
-[link asio.reference.buffer buffer],
-[link asio.reference.buffers_begin buffers_begin],
-[link asio.reference.buffers_end buffers_end],
-[link asio.reference.buffers_iterator buffers_iterator],
-[link asio.reference.const_buffer const_buffer],
-[link asio.reference.const_buffers_1 const_buffers_1],
-[link asio.reference.mutable_buffer mutable_buffer],
-[link asio.reference.mutable_buffers_1 mutable_buffers_1],
-[link asio.reference.streambuf streambuf],
-[link asio.reference.ConstBufferSequence ConstBufferSequence],
-[link asio.reference.MutableBufferSequence MutableBufferSequence],
-[link asio.examples.cpp03_examples.buffers buffers example (C++03)],
-[link asio.examples.cpp11_examples.buffers buffers example (c++11)].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/coroutine.qbk b/3rdparty/asio/src/doc/overview/coroutine.qbk
deleted file mode 100644
index 67453674eae..00000000000
--- a/3rdparty/asio/src/doc/overview/coroutine.qbk
+++ /dev/null
@@ -1,51 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:coroutine Stackless Coroutines]
-
-The [link asio.reference.coroutine `coroutine`] class provides support for
-stackless coroutines. Stackless coroutines enable programs to implement
-asynchronous logic in a synchronous manner, with minimal overhead, as shown in
-the following example:
-
- struct session : asio::coroutine
- {
- boost::shared_ptr<tcp::socket> socket_;
- boost::shared_ptr<std::vector<char> > buffer_;
-
- session(boost::shared_ptr<tcp::socket> socket)
- : socket_(socket),
- buffer_(new std::vector<char>(1024))
- {
- }
-
- void operator()(asio::error_code ec = asio::error_code(), std::size_t n = 0)
- {
- if (!ec) reenter (this)
- {
- for (;;)
- {
- yield socket_->async_read_some(asio::buffer(*buffer_), *this);
- yield asio::async_write(*socket_, asio::buffer(*buffer_, n), *this);
- }
- }
- }
- };
-
-The `coroutine` class is used in conjunction with the pseudo-keywords
-`reenter`, `yield` and `fork`. These are preprocessor macros, and are
-implemented in terms of a `switch` statement using a technique similar to
-Duff's Device. The [link asio.reference.coroutine `coroutine`] class's
-documentation provides a complete description of these pseudo-keywords.
-
-[heading See Also]
-
-[link asio.reference.coroutine coroutine],
-[link asio.examples.cpp03_examples.http_server_4 HTTP Server 4 example],
-[link asio.overview.core.spawn Stackful Coroutines].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/cpp2011.qbk b/3rdparty/asio/src/doc/overview/cpp2011.qbk
deleted file mode 100644
index fa9e6622b67..00000000000
--- a/3rdparty/asio/src/doc/overview/cpp2011.qbk
+++ /dev/null
@@ -1,275 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:cpp2011 C++ 2011 Support]
-
-[/boostify: non-boost docs start here]
-
-[link asio.overview.cpp2011.system_error System Errors and Error Codes]
-
-[/boostify: non-boost docs end here]
-
-[link asio.overview.cpp2011.move_objects Movable I/O Objects]
-
-[link asio.overview.cpp2011.move_handlers Movable Handlers]
-
-[link asio.overview.cpp2011.variadic Variadic Templates]
-
-[link asio.overview.cpp2011.array Array Container]
-
-[link asio.overview.cpp2011.atomic Atomics]
-
-[link asio.overview.cpp2011.shared_ptr Shared Pointers]
-
-[link asio.overview.cpp2011.chrono Chrono]
-
-[link asio.overview.cpp2011.futures Futures]
-
-[/boostify: non-boost docs start here]
-
-[section:system_error System Errors and Error Codes]
-
-When available, Asio can use the `std::error_code` and `std::system_error`
-classes for reporting errors. In this case, the names `asio::error_code` and
-`asio::system_error` will be typedefs for these standard classes.
-
-System error support is automatically enabled for [^g++] 4.6 and later, when
-the [^-std=c++0x] or [^-std=gnu++0x] compiler options are used. It may be
-disabled by defining `ASIO_DISABLE_STD_SYSTEM_ERROR`, or explicitly enabled for
-other compilers by defining `ASIO_HAS_STD_SYSTEM_ERROR`.
-
-[endsect]
-
-[/boostify: non-boost docs end here]
-
-[section:move_objects Movable I/O Objects]
-
-When move support is available (via rvalue references), Asio allows move
-construction and assignment of sockets, serial ports, POSIX descriptors and
-Windows handles.
-
-Move support allows you to write code like:
-
- tcp::socket make_socket(io_context& i)
- {
- tcp::socket s(i);
- ...
- std::move(s);
- }
-
-or:
-
- class connection : public enable_shared_from_this<connection>
- {
- private:
- tcp::socket socket_;
- ...
- public:
- connection(tcp::socket&& s) : socket_(std::move(s)) {}
- ...
- };
-
- ...
-
- class server
- {
- private:
- tcp::acceptor acceptor_;
- tcp::socket socket_;
- ...
- void handle_accept(error_code ec)
- {
- if (!ec)
- std::make_shared<connection>(std::move(socket_))->go();
- acceptor_.async_accept(socket_, ...);
- }
- ...
- };
-
-as well as:
-
- std::vector<tcp::socket> sockets;
- sockets.push_back(tcp::socket(...));
-
-A word of warning: There is nothing stopping you from moving these objects
-while there are pending asynchronous operations, but it is unlikely to be a
-good idea to do so. In particular, composed operations like [link
-asio.reference.async_read async_read()] store a reference to the stream object.
-Moving during the composed operation means that the composed operation may
-attempt to access a moved-from object.
-
-Move support is automatically enabled for [^g++] 4.5 and later, when the
-[^-std=c++0x] or [^-std=gnu++0x] compiler options are used. It may be disabled
-by defining `ASIO_DISABLE_MOVE`, or explicitly enabled for other compilers by
-defining `ASIO_HAS_MOVE`. Note that these macros also affect the availability
-of [link asio.overview.cpp2011.move_handlers movable handlers].
-
-[endsect]
-
-[section:move_handlers Movable Handlers]
-
-As an optimisation, user-defined completion handlers may provide move
-constructors, and Asio's implementation will use a handler's move constructor
-in preference to its copy constructor. In certain circumstances, Asio may be
-able to eliminate all calls to a handler's copy constructor. However, handler
-types are still required to be copy constructible.
-
-When move support is enabled, asynchronous that are documented as follows:
-
- template <typename Handler>
- void async_XYZ(..., Handler handler);
-
-are actually declared as:
-
- template <typename Handler>
- void async_XYZ(..., Handler&& handler);
-
-The handler argument is perfectly forwarded and the move construction occurs
-within the body of `async_XYZ()`. This ensures that all other function
-arguments are evaluated prior to the move. This is critical when the other
-arguments to `async_XYZ()` are members of the handler. For example:
-
- struct my_operation
- {
- shared_ptr<tcp::socket> socket;
- shared_ptr<vector<char>> buffer;
- ...
- void operator(error_code ec, size_t length)
- {
- ...
- socket->async_read_some(asio::buffer(*buffer), std::move(*this));
- ...
- }
- };
-
-Move support is automatically enabled for [^g++] 4.5 and later, when the
-[^-std=c++0x] or [^-std=gnu++0x] compiler options are used. It may be disabled
-by defining `ASIO_DISABLE_MOVE`, or explicitly enabled for other compilers by
-defining `ASIO_HAS_MOVE`. Note that these macros also affect the availability
-of [link asio.overview.cpp2011.move_objects movable I/O objects].
-
-[endsect]
-
-[section:variadic Variadic Templates]
-
-When supported by a compiler, Asio can use variadic templates to implement the
-[link asio.reference.basic_socket_streambuf.connect
-basic_socket_streambuf::connect()] and [link
-asio.reference.basic_socket_iostream.connect basic_socket_iostream::connect()]
-functions.
-
-Support for variadic templates is automatically enabled for [^g++] 4.3 and
-later, when the [^-std=c++0x] or [^-std=gnu++0x] compiler options are used. It
-may be disabled by defining `ASIO_DISABLE_VARIADIC_TEMPLATES`, or explicitly
-enabled for other compilers by defining `ASIO_HAS_VARIADIC_TEMPLATES`.
-
-[endsect]
-
-[section:array Array Container]
-
-Where the standard library provides `std::array<>`, Asio:
-
-* Provides overloads for the [link asio.reference.buffer buffer()] function.
-
-* Uses it in preference to `boost::array<>` for the
- [link asio.reference.ip__address_v4.bytes_type ip::address_v4::bytes_type] and
- [link asio.reference.ip__address_v6.bytes_type ip::address_v6::bytes_type]
- types.
-
-* Uses it in preference to `boost::array<>` where a fixed size array type is
- needed in the implementation.
-
-Support for `std::array<>` is automatically enabled for [^g++] 4.3 and later,
-when the [^-std=c++0x] or [^-std=gnu++0x] compiler options are used, as well as
-for Microsoft Visual C++ 10. It may be disabled by defining
-`ASIO_DISABLE_STD_ARRAY`, or explicitly enabled for other compilers by
-defining `ASIO_HAS_STD_ARRAY`.
-
-[endsect]
-
-[section:atomic Atomics]
-
-Asio's implementation can use `std::atomic<>` in preference to
-`boost::detail::atomic_count`.
-
-Support for the standard atomic integer template is automatically enabled for
-[^g++] 4.5 and later, when the [^-std=c++0x] or [^-std=gnu++0x] compiler
-options are used. It may be disabled by defining `ASIO_DISABLE_STD_ATOMIC`, or
-explicitly enabled for other compilers by defining `ASIO_HAS_STD_ATOMIC`.
-
-[endsect]
-
-[section:shared_ptr Shared Pointers]
-
-Asio's implementation can use `std::shared_ptr<>` and `std::weak_ptr<>` in
-preference to the Boost equivalents.
-
-Support for the standard smart pointers is automatically enabled for [^g++] 4.3
-and later, when the [^-std=c++0x] or [^-std=gnu++0x] compiler options are used,
-as well as for Microsoft Visual C++ 10. It may be disabled by defining
-`ASIO_DISABLE_STD_SHARED_PTR`, or explicitly enabled for other compilers by
-defining `ASIO_HAS_STD_SHARED_PTR`.
-
-[endsect]
-
-[section:chrono Chrono]
-
-Asio provides timers based on the `std::chrono` facilities via the [link
-asio.reference.basic_waitable_timer basic_waitable_timer] class template.
-The typedefs [link asio.reference.system_timer system_timer], [link
-asio.reference.steady_timer steady_timer] and [link
-asio.reference.high_resolution_timer high_resolution_timer] utilise the
-standard clocks `system_clock`, `steady_clock` and `high_resolution_clock`
-respectively.
-
-Support for the `std::chrono` facilities is automatically enabled for [^g++]
-4.6 and later, when the [^-std=c++0x] or [^-std=gnu++0x] compiler options are
-used. (Note that, for [^g++], the draft-standard `monotonic_clock` is used in
-place of `steady_clock`.) Support may be disabled by defining
-`ASIO_DISABLE_STD_CHRONO`, or explicitly enabled for other compilers by
-defining `ASIO_HAS_STD_CHRONO`.
-
-When standard `chrono` is unavailable, Asio will otherwise use the Boost.Chrono
-library. The [link asio.reference.basic_waitable_timer basic_waitable_timer]
-class template may be used with either.
-
-[endsect]
-
-[section:futures Futures]
-
-The `asio::use_future` special value provides first-class support for returning a
-C++11 `std::future` from an asynchronous operation's initiating function.
-
-To use `asio::use_future`, pass it to an asynchronous operation instead of
-a normal completion handler. For example:
-
- std::future<std::size_t> length =
- my_socket.async_read_some(my_buffer, asio::use_future);
-
-Where a handler signature has the form:
-
- void handler(asio::error_code ec, result_type result);
-
-the initiating function returns a `std::future` templated on `result_type`.
-In the above example, this is `std::size_t`. If the asynchronous operation
-fails, the `error_code` is converted into a `system_error` exception and
-passed back to the caller through the future.
-
-Where a handler signature has the form:
-
- void handler(asio::error_code ec);
-
-the initiating function returns `std::future<void>`. As above, an error
-is passed back in the future as a `system_error` exception.
-
-[link asio.reference.use_future use_future],
-[link asio.reference.use_future_t use_future_t],
-[link asio.examples.cpp11_examples.futures Futures example (C++11)].
-
-[endsect]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/handler_tracking.qbk b/3rdparty/asio/src/doc/overview/handler_tracking.qbk
deleted file mode 100644
index 3c2635254b5..00000000000
--- a/3rdparty/asio/src/doc/overview/handler_tracking.qbk
+++ /dev/null
@@ -1,102 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:handler_tracking Handler Tracking]
-
-To aid in debugging asynchronous programs, Asio provides support for handler
-tracking. When enabled by defining `ASIO_ENABLE_HANDLER_TRACKING`, Asio
-writes debugging output to the standard error stream. The output records
-asynchronous operations and the relationships between their handlers.
-
-[teletype]
-This feature is useful when debugging and you need to know how your
-asynchronous operations are chained together, or what the pending asynchronous
-operations are. As an illustration, here is the output when you run the HTTP
-Server example, handle a single request, then shut down via Ctrl+C:
-
- @asio|1298160085.070638|0*1|signal_set@0x7fff50528f40.async_wait
- @asio|1298160085.070888|0*2|socket@0x7fff50528f60.async_accept
- @asio|1298160085.070913|0|resolver@0x7fff50528e28.cancel
- @asio|1298160118.075438|>2|ec=asio.system:0
- @asio|1298160118.075472|2*3|socket@0xb39048.async_receive
- @asio|1298160118.075507|2*4|socket@0x7fff50528f60.async_accept
- @asio|1298160118.075527|<2|
- @asio|1298160118.075540|>3|ec=asio.system:0,bytes_transferred=122
- @asio|1298160118.075731|3*5|socket@0xb39048.async_send
- @asio|1298160118.075778|<3|
- @asio|1298160118.075793|>5|ec=asio.system:0,bytes_transferred=156
- @asio|1298160118.075831|5|socket@0xb39048.close
- @asio|1298160118.075855|<5|
- @asio|1298160122.827317|>1|ec=asio.system:0,signal_number=2
- @asio|1298160122.827333|1|socket@0x7fff50528f60.close
- @asio|1298160122.827359|<1|
- @asio|1298160122.827370|>4|ec=asio.system:125
- @asio|1298160122.827378|<4|
- @asio|1298160122.827394|0|signal_set@0x7fff50528f40.cancel
-
-Each line is of the form:
-
- <tag>|<timestamp>|<action>|<description>
-
-The `<tag>` is always `@asio`, and is used to identify and extract the handler
-tracking messages from the program output.
-
-The `<timestamp>` is seconds and microseconds from 1 Jan 1970 UTC.
-
-The `<action>` takes one of the following forms:
-
-[variablelist
- [
- [>n]
- [The program entered the handler number `n`. The `<description>` shows the
- arguments to the handler.]
- ]
- [
- [<n]
- [The program left handler number `n`.]
- ]
- [
- [!n]
- [The program left handler number n due to an exception.]
- ]
- [
- [~n]
- [The handler number `n` was destroyed without having been invoked. This is
- usually the case for any unfinished asynchronous operations when the
- `io_context` is destroyed.]
- ]
- [
- [n*m]
- [The handler number `n` created a new asynchronous operation with completion
- handler number `m`. The `<description>` shows what asynchronous operation
- was started.]
- ]
- [
- [n]
- [The handler number n performed some other operation. The `<description>`
- shows what function was called. Currently only `close()` and `cancel()`
- operations are logged, as these may affect the state of pending
- asynchronous operations.]
- ]
-]
-
-Where the `<description>` shows a synchronous or asynchronous operation, the
-format is `<object-type>@<pointer>.<operation>`. For handler entry, it shows a
-comma-separated list of arguments and their values.
-
-As shown above, Each handler is assigned a numeric identifier. Where the
-handler tracking output shows a handler number of 0, it means that the action
-was performed outside of any handler.
-
-[heading Visual Representations]
-
-The handler tracking output may be post-processed using the included
-[^handlerviz.pl] tool to create a visual representation of the handlers
-(requires the GraphViz tool [^dot]).
-[c++]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/implementation.qbk b/3rdparty/asio/src/doc/overview/implementation.qbk
deleted file mode 100644
index 34c92f013e8..00000000000
--- a/3rdparty/asio/src/doc/overview/implementation.qbk
+++ /dev/null
@@ -1,305 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:implementation Platform-Specific Implementation Notes]
-
-This section lists platform-specific implementation details, such as the
-default demultiplexing mechanism, the number of threads created internally, and
-when threads are created.
-
-
-[heading Linux Kernel 2.4]
-
-Demultiplexing mechanism:
-
-* Uses `select` for demultiplexing. This means that the number of file
-descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
-
-Threads:
-
-* Demultiplexing using `select` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-[heading Linux Kernel 2.6]
-
-Demultiplexing mechanism:
-
-* Uses `epoll` for demultiplexing.
-
-Threads:
-
-* Demultiplexing using `epoll` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading Solaris]
-
-Demultiplexing mechanism:
-
-* Uses [^/dev/poll] for demultiplexing.
-
-Threads:
-
-* Demultiplexing using [^/dev/poll] is performed in one of the threads that
-calls `io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading QNX Neutrino]
-
-Demultiplexing mechanism:
-
-* Uses `select` for demultiplexing. This means that the number of file
-descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
-
-Threads:
-
-* Demultiplexing using `select` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading Mac OS X]
-
-Demultiplexing mechanism:
-
-* Uses `kqueue` for demultiplexing.
-
-Threads:
-
-* Demultiplexing using `kqueue` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading FreeBSD]
-
-Demultiplexing mechanism:
-
-* Uses `kqueue` for demultiplexing.
-
-Threads:
-
-* Demultiplexing using `kqueue` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading AIX]
-
-Demultiplexing mechanism:
-
-* Uses `select` for demultiplexing. This means that the number of file
-descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
-
-Threads:
-
-* Demultiplexing using `select` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading HP-UX]
-
-Demultiplexing mechanism:
-
-* Uses `select` for demultiplexing. This means that the number of file
-descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
-
-Threads:
-
-* Demultiplexing using `select` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading Tru64]
-
-Demultiplexing mechanism:
-
-* Uses `select` for demultiplexing. This means that the number of file
-descriptors in the process cannot be permitted to exceed `FD_SETSIZE`.
-
-Threads:
-
-* Demultiplexing using `select` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* At most `min(64,IOV_MAX)` buffers may be transferred in a single operation.
-
-
-[heading Windows 95, 98 and Me]
-
-Demultiplexing mechanism:
-
-* Uses `select` for demultiplexing.
-
-Threads:
-
-* Demultiplexing using `select` is performed in one of the threads that calls
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* For sockets, at most 16 buffers may be transferred in a single operation.
-
-
-[heading Windows NT, 2000, XP, 2003, Vista, 7 and 8]
-
-Demultiplexing mechanism:
-
-* Uses overlapped I/O and I/O completion ports for all asynchronous socket
-operations except for asynchronous connect.
-
-* Uses `select` for emulating asynchronous connect.
-
-Threads:
-
-* Demultiplexing using I/O completion ports is performed in all threads that call
-`io_context::run()`, `io_context::run_one()`, `io_context::poll()` or
-`io_context::poll_one()`.
-
-* An additional thread per `io_context` is used to trigger timers. This thread
-is created on construction of the first `basic_deadline_timer` or
-`basic_waitable_timer` objects.
-
-* An additional thread per `io_context` is used for the `select`
-demultiplexing. This thread is created on the first call to `async_connect()`.
-
-* An additional thread per `io_context` is used to emulate asynchronous host
-resolution. This thread is created on the first call to either
-`ip::tcp::resolver::async_resolve()` or `ip::udp::resolver::async_resolve()`.
-
-Scatter-Gather:
-
-* For sockets, at most 64 buffers may be transferred in a single operation.
-
-* For stream-oriented handles, only one buffer may be transferred in a single
-operation.
-
-[heading Windows Runtime]
-
-Asio provides limited support for the Windows Runtime. It requires that the
-language extensions be enabled. Due to the restricted facilities exposed by the
-Windows Runtime API, the support comes with the following caveats:
-
-* The core facilities such as the `io_context`, `strand`, buffers, composed
- operations, timers, etc., should all work as normal.
-
-* For sockets, only client-side TCP is supported.
-
-* Explicit binding of a client-side TCP socket is not supported.
-
-* The `cancel()` function is not supported for sockets. Asynchronous
- operations may only be cancelled by closing the socket.
-
-* Operations that use `null_buffers` are not supported.
-
-* Only `tcp::no_delay` and `socket_base::keep_alive` options are supported.
-
-* Resolvers do not support service names, only numbers. I.e. you must
- use "80" rather than "http".
-
-* Most resolver query flags have no effect.
-
-Demultiplexing mechanism:
-
-* Uses the `Windows::Networking::Sockets::StreamSocket` class to implement
- asynchronous TCP socket operations.
-
-Threads:
-
-* Event completions are delivered to the Windows thread pool and posted to the
- `io_context` for the handler to be executed.
-
-* An additional thread per `io_context` is used to trigger timers. This thread
- is created on construction of the first timer objects.
-
-Scatter-Gather:
-
-* For sockets, at most one buffer may be transferred in a single operation.
-
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/iostreams.qbk b/3rdparty/asio/src/doc/overview/iostreams.qbk
deleted file mode 100644
index f738f9edec5..00000000000
--- a/3rdparty/asio/src/doc/overview/iostreams.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:iostreams Socket Iostreams]
-
-Asio includes classes that implement iostreams on top of sockets. These hide
-away the complexities associated with endpoint resolution, protocol
-independence, etc. To create a connection one might simply write:
-
- ip::tcp::iostream stream("www.boost.org", "http");
- if (!stream)
- {
- // Can't connect.
- }
-
-The iostream class can also be used in conjunction with an acceptor to create
-simple servers. For example:
-
- io_context ioc;
-
- ip::tcp::endpoint endpoint(tcp::v4(), 80);
- ip::tcp::acceptor acceptor(ios, endpoint);
-
- for (;;)
- {
- ip::tcp::iostream stream;
- acceptor.accept(stream.socket());
- ...
- }
-
-Timeouts may be set by calling `expires_at()` or `expires_from_now()` to
-establish a deadline. Any socket operations that occur past the deadline will
-put the iostream into a "bad" state.
-
-For example, a simple client program like this:
-
- ip::tcp::iostream stream;
- stream.expires_from_now(boost::posix_time::seconds(60));
- stream.connect("www.boost.org", "http");
- stream << "GET /LICENSE_1_0.txt HTTP/1.0\r\n";
- stream << "Host: www.boost.org\r\n";
- stream << "Accept: */*\r\n";
- stream << "Connection: close\r\n\r\n";
- stream.flush();
- std::cout << stream.rdbuf();
-
-will fail if all the socket operations combined take longer than 60 seconds.
-
-If an error does occur, the iostream's `error()` member function may be used to
-retrieve the error code from the most recent system call:
-
- if (!stream)
- {
- std::cout << "Error: " << stream.error().message() << "\n";
- }
-
-[heading See Also]
-
-[link asio.reference.ip__tcp.iostream ip::tcp::iostream],
-[link asio.reference.basic_socket_iostream basic_socket_iostream],
-[link asio.examples.cpp03_examples.iostreams iostreams examples].
-
-[heading Notes]
-
-These iostream templates only support `char`, not `wchar_t`, and do not perform
-any code conversion.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/line_based.qbk b/3rdparty/asio/src/doc/overview/line_based.qbk
deleted file mode 100644
index df007adc3f8..00000000000
--- a/3rdparty/asio/src/doc/overview/line_based.qbk
+++ /dev/null
@@ -1,118 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:line_based Line-Based Operations]
-
-Many commonly-used internet protocols are line-based, which means that they
-have protocol elements that are delimited by the character sequence `"\r\n"`.
-Examples include HTTP, SMTP and FTP. To more easily permit the implementation
-of line-based protocols, as well as other protocols that use delimiters, Asio
-includes the functions `read_until()` and `async_read_until()`.
-
-The following example illustrates the use of `async_read_until()` in an HTTP
-server, to receive the first line of an HTTP request from a client:
-
- class http_connection
- {
- ...
-
- void start()
- {
- asio::async_read_until(socket_, data_, "\r\n",
- boost::bind(&http_connection::handle_request_line, this, _1));
- }
-
- void handle_request_line(asio::error_code ec)
- {
- if (!ec)
- {
- std::string method, uri, version;
- char sp1, sp2, cr, lf;
- std::istream is(&data_);
- is.unsetf(std::ios_base::skipws);
- is >> method >> sp1 >> uri >> sp2 >> version >> cr >> lf;
- ...
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket_;
- asio::streambuf data_;
- };
-
-The `streambuf` data member serves as a place to store the data that has been
-read from the socket before it is searched for the delimiter. It is important
-to remember that there may be additional data ['after] the delimiter. This
-surplus data should be left in the `streambuf` so that it may be inspected by a
-subsequent call to `read_until()` or `async_read_until()`.
-
-The delimiters may be specified as a single `char`, a `std::string` or a
-`boost::regex`. The `read_until()` and `async_read_until()` functions also
-include overloads that accept a user-defined function object called a match
-condition. For example, to read data into a streambuf until whitespace is
-encountered:
-
- typedef asio::buffers_iterator<
- asio::streambuf::const_buffers_type> iterator;
-
- std::pair<iterator, bool>
- match_whitespace(iterator begin, iterator end)
- {
- iterator i = begin;
- while (i != end)
- if (std::isspace(*i++))
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
- ...
- asio::streambuf b;
- asio::read_until(s, b, match_whitespace);
-
-To read data into a streambuf until a matching character is found:
-
- class match_char
- {
- public:
- explicit match_char(char c) : c_(c) {}
-
- template <typename Iterator>
- std::pair<Iterator, bool> operator()(
- Iterator begin, Iterator end) const
- {
- Iterator i = begin;
- while (i != end)
- if (c_ == *i++)
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
-
- private:
- char c_;
- };
-
- namespace asio {
- template <> struct is_match_condition<match_char>
- : public boost::true_type {};
- } // namespace asio
- ...
- asio::streambuf b;
- asio::read_until(s, b, match_char('a'));
-
-The `is_match_condition<>` type trait automatically evaluates to true for
-functions, and for function objects with a nested `result_type` typedef. For
-other types the trait must be explicitly specialised, as shown above.
-
-[heading See Also]
-
-[link asio.reference.async_read_until async_read_until()],
-[link asio.reference.is_match_condition is_match_condition],
-[link asio.reference.read_until read_until()],
-[link asio.reference.streambuf streambuf],
-[link asio.examples.cpp03_examples.http_client HTTP client example].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/other_protocols.qbk b/3rdparty/asio/src/doc/overview/other_protocols.qbk
deleted file mode 100644
index 9a6fe077ea1..00000000000
--- a/3rdparty/asio/src/doc/overview/other_protocols.qbk
+++ /dev/null
@@ -1,94 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:other_protocols Support for Other Protocols]
-
-Support for other socket protocols (such as Bluetooth or IRCOMM sockets) can be
-added by implementing the [link asio.reference.Protocol protocol type
-requirements]. However, in many cases these protocols may also be used with
-Asio's generic protocol support. For this, Asio provides the following four
-classes:
-
-* [link asio.reference.generic__datagram_protocol `generic::datagram_protocol`]
-* [link asio.reference.generic__raw_protocol `generic::raw_protocol`]
-* [link asio.reference.generic__seq_packet_protocol `generic::seq_packet_protocol`]
-* [link asio.reference.generic__stream_protocol `generic::stream_protocol`]
-
-These classes implement the [link asio.reference.Protocol protocol type
-requirements], but allow the user to specify the address family (e.g. `AF_INET`)
-and protocol type (e.g. `IPPROTO_TCP`) at runtime. For example:
-
- asio::generic::stream_protocol::socket my_socket(my_io_context);
- my_socket.open(asio::generic::stream_protocol(AF_INET, IPPROTO_TCP));
- ...
-
-An endpoint class template, [link asio.reference.generic__basic_endpoint
-`asio::generic::basic_endpoint`], is included to support these protocol
-classes. This endpoint can hold any other endpoint type, provided its native
-representation fits into a `sockaddr_storage` object. This class will also
-convert from other types that implement the [link asio.reference.Endpoint
-endpoint] type requirements:
-
- asio::ip::tcp::endpoint my_endpoint1 = ...;
- asio::generic::stream_protocol::endpoint my_endpoint2(my_endpoint1);
-
-The conversion is implicit, so as to support the following use cases:
-
- asio::generic::stream_protocol::socket my_socket(my_io_context);
- asio::ip::tcp::endpoint my_endpoint = ...;
- my_socket.connect(my_endpoint);
-
-[heading C++11 Move Construction]
-
-When using C++11, it is possible to perform move construction from a socket (or
-acceptor) object to convert to the more generic protocol's socket (or acceptor)
-type. If the protocol conversion is valid:
-
- Protocol1 p1 = ...;
- Protocol2 p2(p1);
-
-then the corresponding socket conversion is allowed:
-
- Protocol1::socket my_socket1(my_io_context);
- ...
- Protocol2::socket my_socket2(std::move(my_socket1));
-
-For example, one possible conversion is from a TCP socket to a generic
-stream-oriented socket:
-
- asio::ip::tcp::socket my_socket1(my_io_context);
- ...
- asio::generic::stream_protocol::socket my_socket2(std::move(my_socket1));
-
-These conversions are also available for move-assignment.
-
-These conversions are not limited to the above generic protocol classes.
-User-defined protocols may take advantage of this feature by similarly ensuring
-the conversion from `Protocol1` to `Protocol2` is valid, as above.
-
-[heading Accepting Generic Sockets]
-
-As a convenience, a socket acceptor's `accept()` and `async_accept()` functions
-can directly accept into a different protocol's socket type, provided the
-corresponding protocol conversion is valid. For example, the following is
-supported because the protocol `asio::ip::tcp` is convertible to
-`asio::generic::stream_protocol`:
-
- asio::ip::tcp::acceptor my_acceptor(my_io_context);
- ...
- asio::generic::stream_protocol::socket my_socket(my_io_context);
- my_acceptor.accept(my_socket);
-
-[heading See Also]
-
-[link asio.reference.generic__datagram_protocol `generic::datagram_protocol`],
-[link asio.reference.generic__raw_protocol `generic::raw_protocol`],
-[link asio.reference.generic__seq_packet_protocol `generic::seq_packet_protocol`],
-[link asio.reference.generic__stream_protocol `generic::stream_protocol`],
-[link asio.reference.Protocol protocol type requirements].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/posix.qbk b/3rdparty/asio/src/doc/overview/posix.qbk
deleted file mode 100644
index 19c91783e64..00000000000
--- a/3rdparty/asio/src/doc/overview/posix.qbk
+++ /dev/null
@@ -1,152 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:posix POSIX-Specific Functionality]
-
-[link asio.overview.posix.local UNIX Domain Sockets]
-
-[link asio.overview.posix.stream_descriptor Stream-Oriented File Descriptors]
-
-[link asio.overview.posix.fork Fork]
-
-[section:local UNIX Domain Sockets]
-
-Asio provides basic support UNIX domain sockets (also known as local sockets).
-The simplest use involves creating a pair of connected sockets. The following
-code:
-
- local::stream_protocol::socket socket1(my_io_context);
- local::stream_protocol::socket socket2(my_io_context);
- local::connect_pair(socket1, socket2);
-
-will create a pair of stream-oriented sockets. To do the same for
-datagram-oriented sockets, use:
-
- local::datagram_protocol::socket socket1(my_io_context);
- local::datagram_protocol::socket socket2(my_io_context);
- local::connect_pair(socket1, socket2);
-
-A UNIX domain socket server may be created by binding an acceptor to an
-endpoint, in much the same way as one does for a TCP server:
-
- ::unlink("/tmp/foobar"); // Remove previous binding.
- local::stream_protocol::endpoint ep("/tmp/foobar");
- local::stream_protocol::acceptor acceptor(my_io_context, ep);
- local::stream_protocol::socket socket(my_io_context);
- acceptor.accept(socket);
-
-A client that connects to this server might look like:
-
- local::stream_protocol::endpoint ep("/tmp/foobar");
- local::stream_protocol::socket socket(my_io_context);
- socket.connect(ep);
-
-Transmission of file descriptors or credentials across UNIX domain sockets is
-not directly supported within Asio, but may be achieved by accessing the
-socket's underlying descriptor using the [link
-asio.reference.basic_socket.native_handle native_handle()] member function.
-
-[heading See Also]
-
-[link asio.reference.local__connect_pair local::connect_pair],
-[link asio.reference.local__datagram_protocol local::datagram_protocol],
-[link asio.reference.local__datagram_protocol.endpoint local::datagram_protocol::endpoint],
-[link asio.reference.local__datagram_protocol.socket local::datagram_protocol::socket],
-[link asio.reference.local__stream_protocol local::stream_protocol],
-[link asio.reference.local__stream_protocol.acceptor local::stream_protocol::acceptor],
-[link asio.reference.local__stream_protocol.endpoint local::stream_protocol::endpoint],
-[link asio.reference.local__stream_protocol.iostream local::stream_protocol::iostream],
-[link asio.reference.local__stream_protocol.socket local::stream_protocol::socket],
-[link asio.examples.cpp03_examples.unix_domain_sockets UNIX domain sockets examples].
-
-[heading Notes]
-
-UNIX domain sockets are only available at compile time if supported by the
-target operating system. A program may test for the macro
-`ASIO_HAS_LOCAL_SOCKETS` to determine whether they are supported.
-
-[endsect]
-
-[section:stream_descriptor Stream-Oriented File Descriptors]
-
-Asio includes classes added to permit synchronous and asynchronous read and
-write operations to be performed on POSIX file descriptors, such as pipes,
-standard input and output, and various devices.
-
-These classes also provide limited support for regular files. This support
-assumes that the underlying read and write operations provided by the operating
-system never fail with `EAGAIN` or `EWOULDBLOCK`. (This assumption normally
-holds for buffered file I/O.) Synchronous and asynchronous read and write
-operations on file descriptors will succeed but the I/O will always be
-performed immediately. Wait operations, and operations involving
-`asio::null_buffers`, are not portably supported.
-
-For example, to perform read and write operations on standard input
-and output, the following objects may be created:
-
- posix::stream_descriptor in(my_io_context, ::dup(STDIN_FILENO));
- posix::stream_descriptor out(my_io_context, ::dup(STDOUT_FILENO));
-
-These are then used as synchronous or asynchronous read and write streams. This
-means the objects can be used with any of the [link asio.reference.read
-read()], [link asio.reference.async_read async_read()], [link
-asio.reference.write write()], [link asio.reference.async_write async_write()],
-[link asio.reference.read_until read_until()] or [link
-asio.reference.async_read_until async_read_until()] free functions.
-
-[heading See Also]
-
-[link asio.reference.posix__stream_descriptor posix::stream_descriptor],
-[link asio.examples.cpp03_examples.chat Chat example (C++03)],
-[link asio.examples.cpp11_examples.chat Chat example (C++11)].
-
-[heading Notes]
-
-POSIX stream descriptors are only available at compile time if supported by the
-target operating system. A program may test for the macro
-`ASIO_HAS_POSIX_STREAM_DESCRIPTOR` to determine whether they are supported.
-
-[endsect]
-
-[section:fork Fork]
-
-Asio supports programs that utilise the `fork()` system call. Provided the
-program calls `io_context.notify_fork()` at the appropriate times, Asio will
-recreate any internal file descriptors (such as the "self-pipe trick"
-descriptor used for waking up a reactor). The notification is usually performed
-as follows:
-
- io_context_.notify_fork(asio::io_context::fork_prepare);
- if (fork() == 0)
- {
- io_context_.notify_fork(asio::io_context::fork_child);
- ...
- }
- else
- {
- io_context_.notify_fork(asio::io_context::fork_parent);
- ...
- }
-
-User-defined services can also be made fork-aware by overriding the
-`io_context::service::notify_fork()` virtual function.
-
-Note that any file descriptors accessible via Asio's public API (e.g. the
-descriptors underlying `basic_socket<>`, `posix::stream_descriptor`, etc.) are
-not altered during a fork. It is the program's responsibility to manage these
-as required.
-
-[heading See Also]
-
-[link asio.reference.io_context.notify_fork io_context::notify_fork()],
-[link asio.reference.io_context.fork_event io_context::fork_event],
-[link asio.reference.execution_context__service.notify_fork io_context::service::notify_fork()],
-[link asio.examples.cpp03_examples.fork Fork examples].
-
-[endsect]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/proactor.dot b/3rdparty/asio/src/doc/overview/proactor.dot
deleted file mode 100644
index 871723408b9..00000000000
--- a/3rdparty/asio/src/doc/overview/proactor.dot
+++ /dev/null
@@ -1,100 +0,0 @@
-digraph g
-{
- edge
- [
- fontname="Helvetica",
- fontsize=10,
- labelfontname="Helvetica",
- labelfontsize=10
- ];
-
- node
- [
- fontname="Helvetica",
- fontsize=10,
- shape=record
- ];
-
- initiator
- [
- label="Initiator"
- ];
-
- async_processor
- [
- label="Asynchronous\nOperation Processor"
- ];
-
- async_op
- [
- label="Asynchronous\nOperation"
- ];
-
- completion_queue
- [
- label="Completion\nEvent Queue"
- ];
-
- async_event_demuxer
- [
- label="Asynchronous\nEvent Demultiplexer"
- ];
-
- proactor
- [
- label="Proactor"
- ];
-
- handler
- [
- label="Completion\nHandler"
- ];
-
- initiator -> async_processor
- [
- label="uses",
- style="dashed"
- ];
-
- initiator -> async_op
- [
- label="starts",
- style="dashed"
- ];
-
- initiator -> handler
- [
- label="creates",
- style="dashed"
- ];
-
- async_processor -> async_op
- [
- label="executes",
- style="dashed"
- ];
-
- async_processor -> completion_queue
- [
- label="enqueues",
- style="dashed"
- ];
-
- async_op -> handler;
-
- async_event_demuxer -> completion_queue
- [
- label="dequeues",
- style="dashed"
- ];
-
- proactor -> async_event_demuxer
- [
- ];
-
- proactor -> handler
- [
- label="demultiplexes\n& dispatches"
- style="dashed"
- ];
-}
diff --git a/3rdparty/asio/src/doc/overview/proactor.png b/3rdparty/asio/src/doc/overview/proactor.png
deleted file mode 100644
index a0653b0106c..00000000000
--- a/3rdparty/asio/src/doc/overview/proactor.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/asio/src/doc/overview/protocols.qbk b/3rdparty/asio/src/doc/overview/protocols.qbk
deleted file mode 100644
index eed070c7511..00000000000
--- a/3rdparty/asio/src/doc/overview/protocols.qbk
+++ /dev/null
@@ -1,149 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:protocols TCP, UDP and ICMP]
-
-Asio provides off-the-shelf support for the internet protocols TCP, UDP and
-ICMP.
-
-[heading TCP Clients]
-
-Hostname resolution is performed using a resolver, where host and service names
-are looked up and converted into one or more endpoints:
-
- ip::tcp::resolver resolver(my_io_context);
- ip::tcp::resolver::query query("www.boost.org", "http");
- ip::tcp::resolver::iterator iter = resolver.resolve(query);
- ip::tcp::resolver::iterator end; // End marker.
- while (iter != end)
- {
- ip::tcp::endpoint endpoint = *iter++;
- std::cout << endpoint << std::endl;
- }
-
-The list of endpoints obtained above could contain both IPv4 and IPv6 endpoints,
-so a program should try each of them until it finds one that works. This keeps the
-client program independent of a specific IP version.
-
-To simplify the development of protocol-independent programs, TCP clients may
-establish connections using the free functions [link asio.reference.connect
-connect()] and [link asio.reference.async_connect async_connect()]. These
-operations try each endpoint in a list until the socket is successfully
-connected. For example, a single call:
-
- ip::tcp::socket socket(my_io_context);
- asio::connect(socket, resolver.resolve(query));
-
-will synchronously try all endpoints until one is successfully connected.
-Similarly, an asynchronous connect may be performed by writing:
-
- asio::async_connect(socket_, iter,
- boost::bind(&client::handle_connect, this,
- asio::placeholders::error));
-
- // ...
-
- void handle_connect(const error_code& error)
- {
- if (!error)
- {
- // Start read or write operations.
- }
- else
- {
- // Handle error.
- }
- }
-
-When a specific endpoint is available, a socket can be created and connected:
-
- ip::tcp::socket socket(my_io_context);
- socket.connect(endpoint);
-
-Data may be read from or written to a connected TCP socket using the [link
-asio.reference.basic_stream_socket.receive receive()], [link
-asio.reference.basic_stream_socket.async_receive async_receive()], [link
-asio.reference.basic_stream_socket.send send()] or [link
-asio.reference.basic_stream_socket.async_send async_send()] member functions.
-However, as these could result in [link asio.overview.core.streams short writes
-or reads], an application will typically use the following operations instead:
-[link asio.reference.read read()], [link asio.reference.async_read
-async_read()], [link asio.reference.write write()] and [link
-asio.reference.async_write async_write()].
-
-[heading TCP Servers]
-
-A program uses an acceptor to accept incoming TCP connections:
-
- ip::tcp::acceptor acceptor(my_io_context, my_endpoint);
- ...
- ip::tcp::socket socket(my_io_context);
- acceptor.accept(socket);
-
-After a socket has been successfully accepted, it may be read from or written
-to as illustrated for TCP clients above.
-
-[heading UDP]
-
-UDP hostname resolution is also performed using a resolver:
-
- ip::udp::resolver resolver(my_io_context);
- ip::udp::resolver::query query("localhost", "daytime");
- ip::udp::resolver::iterator iter = resolver.resolve(query);
- ...
-
-A UDP socket is typically bound to a local endpoint. The following code will
-create an IP version 4 UDP socket and bind it to the "any" address on port
-`12345`:
-
- ip::udp::endpoint endpoint(ip::udp::v4(), 12345);
- ip::udp::socket socket(my_io_context, endpoint);
-
-Data may be read from or written to an unconnected UDP socket using the [link
-asio.reference.basic_datagram_socket.receive_from receive_from()], [link
-asio.reference.basic_datagram_socket.async_receive_from async_receive_from()],
-[link asio.reference.basic_datagram_socket.send_to send_to()] or [link
-asio.reference.basic_datagram_socket.async_send_to async_send_to()] member
-functions. For a connected UDP socket, use the [link
-asio.reference.basic_datagram_socket.receive receive()], [link
-asio.reference.basic_datagram_socket.async_receive async_receive()], [link
-asio.reference.basic_datagram_socket.send send()] or [link
-asio.reference.basic_datagram_socket.async_send async_send()] member functions.
-
-[heading ICMP]
-
-As with TCP and UDP, ICMP hostname resolution is performed using a resolver:
-
- ip::icmp::resolver resolver(my_io_context);
- ip::icmp::resolver::query query("localhost", "");
- ip::icmp::resolver::iterator iter = resolver.resolve(query);
- ...
-
-An ICMP socket may be bound to a local endpoint. The following code will create
-an IP version 6 ICMP socket and bind it to the "any" address:
-
- ip::icmp::endpoint endpoint(ip::icmp::v6(), 0);
- ip::icmp::socket socket(my_io_context, endpoint);
-
-The port number is not used for ICMP.
-
-Data may be read from or written to an unconnected ICMP socket using the [link
-asio.reference.basic_raw_socket.receive_from receive_from()], [link
-asio.reference.basic_raw_socket.async_receive_from async_receive_from()],
-[link asio.reference.basic_raw_socket.send_to send_to()] or [link
-asio.reference.basic_raw_socket.async_send_to async_send_to()] member
-functions.
-
-[heading See Also]
-
-[link asio.reference.ip__tcp ip::tcp],
-[link asio.reference.ip__udp ip::udp],
-[link asio.reference.ip__icmp ip::icmp],
-[link asio.tutorial.tutdaytime1 daytime protocol tutorials],
-[link asio.examples.cpp03_examples.icmp ICMP ping example].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/rationale.qbk b/3rdparty/asio/src/doc/overview/rationale.qbk
deleted file mode 100644
index 13491cd53d0..00000000000
--- a/3rdparty/asio/src/doc/overview/rationale.qbk
+++ /dev/null
@@ -1,54 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:rationale Rationale]
-
-Most programs interact with the outside world in some way, whether it be via a
-file, a network, a serial cable, or the console. Sometimes, as is the case with
-networking, individual I/O operations can take a long time to complete. This
-poses particular challenges to application development.
-
-Asio provides the tools to manage these long running operations, without
-requiring programs to use concurrency models based on threads and explicit
-locking.
-
-The Asio library is intended for programmers using C++ for systems programming,
-where access to operating system functionality such as networking is often
-required. In particular, Asio addresses the following goals:
-
-* [*Portability.] The library should support a range of commonly used operating
-systems, and provide consistent behaviour across these operating systems.
-
-* [*Scalability.] The library should facilitate the development of network
-applications that scale to thousands of concurrent connections. The library
-implementation for each operating system should use the mechanism that best
-enables this scalability.
-
-* [*Efficiency.] The library should support techniques such as scatter-gather
-I/O, and allow programs to minimise data copying.
-
-* [*Model concepts from established APIs, such as BSD sockets.] The
-BSD socket API is widely implemented and understood, and is covered in much
-literature. Other programming languages often use a similar interface for
-networking APIs. As far as is reasonable, Asio should leverage existing
-practice.
-
-* [*Ease of use.] The library should provide a lower entry barrier for new
-users by taking a toolkit, rather than framework, approach. That is, it should
-try to minimise the up-front investment in time to just learning a few basic
-rules and guidelines. After that, a library user should only need to understand
-the specific functions that are being used.
-
-* [*Basis for further abstraction.] The library should permit the development
-of other libraries that provide higher levels of abstraction. For example,
-implementations of commonly used protocols such as HTTP.
-
-Although Asio started life focused primarily on networking, its concepts of
-asynchronous I/O have been extended to include other operating system resources
-such as serial ports, file descriptors, and so on.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/reactor.qbk b/3rdparty/asio/src/doc/overview/reactor.qbk
deleted file mode 100644
index 468645ad4c0..00000000000
--- a/3rdparty/asio/src/doc/overview/reactor.qbk
+++ /dev/null
@@ -1,44 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:reactor Reactor-Style Operations]
-
-Sometimes a program must be integrated with a third-party library that wants to
-perform the I/O operations itself. To facilitate this, Asio includes
-synchronous and asynchronous operations that may be used to wait for a socket
-to become ready to read, ready to write, or to have a pending error condition.
-
-As an example, to perform a non-blocking read something like the following may
-be used:
-
- ip::tcp::socket socket(my_io_context);
- ...
- socket.non_blocking(true);
- ...
- socket.async_wait(ip::tcp::socket::wait_read, read_handler);
- ...
- void read_handler(asio::error_code ec)
- {
- if (!ec)
- {
- std::vector<char> buf(socket.available());
- socket.read_some(buffer(buf));
- }
- }
-
-These operations are supported for sockets on all platforms, and for the POSIX
-stream-oriented descriptor classes.
-
-[heading See Also]
-
-[link asio.reference.basic_socket.wait basic_socket::wait()],
-[link asio.reference.basic_socket.async_wait basic_socket::async_wait()],
-[link asio.reference.basic_socket.non_blocking basic_socket::non_blocking()],
-[link asio.reference.basic_socket.native_non_blocking basic_socket::native_non_blocking()],
-[link asio.examples.cpp03_examples.nonblocking nonblocking example].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/serial_ports.qbk b/3rdparty/asio/src/doc/overview/serial_ports.qbk
deleted file mode 100644
index dd049cd2fa1..00000000000
--- a/3rdparty/asio/src/doc/overview/serial_ports.qbk
+++ /dev/null
@@ -1,45 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:serial_ports Serial Ports]
-
-Asio includes classes for creating and manipulating serial ports in a portable
-manner. For example, a serial port may be opened using:
-
- serial_port port(my_io_context, name);
-
-where name is something like `"COM1"` on Windows, and `"/dev/ttyS0"` on POSIX
-platforms.
-
-Once opened, the serial port may be used as a [link asio.overview.core.streams
-stream]. This means the objects can be used with any of the [link
-asio.reference.read read()], [link asio.reference.async_read async_read()],
-[link asio.reference.write write()], [link asio.reference.async_write
-async_write()], [link asio.reference.read_until read_until()] or [link
-asio.reference.async_read_until async_read_until()] free functions.
-
-The serial port implementation also includes option classes for configuring the
-port's baud rate, flow control type, parity, stop bits and character size.
-
-[heading See Also]
-
-[link asio.reference.serial_port serial_port],
-[link asio.reference.serial_port_base serial_port_base],
-[link asio.reference.serial_port_base__baud_rate serial_port_base::baud_rate],
-[link asio.reference.serial_port_base__flow_control serial_port_base::flow_control],
-[link asio.reference.serial_port_base__parity serial_port_base::parity],
-[link asio.reference.serial_port_base__stop_bits serial_port_base::stop_bits],
-[link asio.reference.serial_port_base__character_size serial_port_base::character_size].
-
-[heading Notes]
-
-Serial ports are available on all POSIX platforms. For Windows, serial ports
-are only available at compile time when the I/O completion port backend is used
-(which is the default). A program may test for the macro
-`ASIO_HAS_SERIAL_PORT` to determine whether they are supported.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/signals.qbk b/3rdparty/asio/src/doc/overview/signals.qbk
deleted file mode 100644
index d626ead861c..00000000000
--- a/3rdparty/asio/src/doc/overview/signals.qbk
+++ /dev/null
@@ -1,44 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:signals Signal Handling]
-
-Asio supports signal handling using a class called [link
-asio.reference.signal_set signal_set]. Programs may add one or more signals to
-the set, and then perform an `async_wait()` operation. The specified handler
-will be called when one of the signals occurs. The same signal number may be
-registered with multiple [link asio.reference.signal_set signal_set] objects,
-however the signal number must be used only with Asio.
-
- void handler(
- const asio::error_code& error,
- int signal_number)
- {
- if (!error)
- {
- // A signal occurred.
- }
- }
-
- ...
-
- // Construct a signal set registered for process termination.
- asio::signal_set signals(io_context, SIGINT, SIGTERM);
-
- // Start an asynchronous wait for one of the signals to occur.
- signals.async_wait(handler);
-
-Signal handling also works on Windows, as the Microsoft Visual C++ runtime
-library maps console events like Ctrl+C to the equivalent signal.
-
-[heading See Also]
-
-[link asio.reference.signal_set signal_set],
-[link asio.examples.cpp03_examples.http_server HTTP server example (C++03)],
-[link asio.examples.cpp11_examples.http_server HTTP server example (C++11)].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/spawn.qbk b/3rdparty/asio/src/doc/overview/spawn.qbk
deleted file mode 100644
index 908d78f72ae..00000000000
--- a/3rdparty/asio/src/doc/overview/spawn.qbk
+++ /dev/null
@@ -1,102 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:spawn Stackful Coroutines]
-
-The [link asio.reference.spawn `spawn()`] function is a high-level wrapper for
-running stackful coroutines. It is based on the Boost.Coroutine library. The
-`spawn()` function enables programs to implement asynchronous logic in a
-synchronous manner, as shown in the following example:
-
- asio::spawn(my_strand, do_echo);
-
- // ...
-
- void do_echo(asio::yield_context yield)
- {
- try
- {
- char data[128];
- for (;;)
- {
- std::size_t length =
- my_socket.async_read_some(
- asio::buffer(data), yield);
-
- asio::async_write(my_socket,
- asio::buffer(data, length), yield);
- }
- }
- catch (std::exception& e)
- {
- // ...
- }
- }
-
-The first argument to `spawn()` may be a
-[link asio.reference.io_context__strand `strand`],
-[link asio.reference.io_context `io_context`], or
-[link asio.reference.CompletionHandler completion handler].
-This argument determines the context in which the coroutine is permitted to
-execute. For example, a server's per-client object may consist of multiple
-coroutines; they should all run on the same `strand` so that no explicit
-synchronisation is required.
-
-The second argument is a function object with signature:
-
- void coroutine(asio::yield_context yield);
-
-that specifies the code to be run as part of the coroutine. The parameter
-`yield` may be passed to an asynchronous operation in place of the completion
-handler, as in:
-
- std::size_t length =
- my_socket.async_read_some(
- asio::buffer(data), yield);
-
-This starts the asynchronous operation and suspends the coroutine. The
-coroutine will be resumed automatically when the asynchronous operation
-completes.
-
-Where an asynchronous operation's handler signature has the form:
-
- void handler(asio::error_code ec, result_type result);
-
-the initiating function returns the result_type. In the `async_read_some`
-example above, this is `size_t`. If the asynchronous operation fails, the
-`error_code` is converted into a `system_error` exception and thrown.
-
-Where a handler signature has the form:
-
- void handler(asio::error_code ec);
-
-the initiating function returns `void`. As above, an error is passed back to
-the coroutine as a `system_error` exception.
-
-To collect the `error_code` from an operation, rather than have it throw an
-exception, associate the output variable with the `yield_context` as follows:
-
- asio::error_code ec;
- std::size_t length =
- my_socket.async_read_some(
- asio::buffer(data), yield[ec]);
-
-[*Note:] if `spawn()` is used with a custom completion handler of type
-`Handler`, the function object signature is actually:
-
- void coroutine(asio::basic_yield_context<Handler> yield);
-
-[heading See Also]
-
-[link asio.reference.spawn spawn],
-[link asio.reference.yield_context yield_context],
-[link asio.reference.basic_yield_context basic_yield_context],
-[link asio.examples.cpp03_examples.spawn Spawn example (C++03)],
-[link asio.examples.cpp11_examples.spawn Spawn example (C++11)],
-[link asio.overview.core.coroutine Stackless Coroutines].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/ssl.qbk b/3rdparty/asio/src/doc/overview/ssl.qbk
deleted file mode 100644
index e5a4d73c010..00000000000
--- a/3rdparty/asio/src/doc/overview/ssl.qbk
+++ /dev/null
@@ -1,123 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ssl SSL]
-
-Asio contains classes and class templates for basic SSL support. These classes
-allow encrypted communication to be layered on top of an existing stream, such
-as a TCP socket.
-
-Before creating an encrypted stream, an application must construct an SSL
-context object. This object is used to set SSL options such as verification
-mode, certificate files, and so on. As an illustration, client-side
-initialisation may look something like:
-
- ssl::context ctx(ssl::context::sslv23);
- ctx.set_verify_mode(ssl::verify_peer);
- ctx.load_verify_file("ca.pem");
-
-To use SSL with a TCP socket, one may write:
-
- ssl::stream<ip::tcp::socket> ssl_sock(my_io_context, ctx);
-
-To perform socket-specific operations, such as establishing an outbound
-connection or accepting an incoming one, the underlying socket must first be
-obtained using the `ssl::stream` template's [link
-asio.reference.ssl__stream.lowest_layer `lowest_layer()`] member function:
-
- ip::tcp::socket::lowest_layer_type& sock = ssl_sock.lowest_layer();
- sock.connect(my_endpoint);
-
-In some use cases the underlying stream object will need to have a longer
-lifetime than the SSL stream, in which case the template parameter should be a
-reference to the stream type:
-
- ip::tcp::socket sock(my_io_context);
- ssl::stream<ip::tcp::socket&> ssl_sock(sock, ctx);
-
-SSL handshaking must be performed prior to transmitting or receiving data over
-an encrypted connection. This is accomplished using the `ssl::stream`
-template's [link asio.reference.ssl__stream.handshake handshake()] or [link
-asio.reference.ssl__stream.async_handshake async_handshake()] member functions.
-
-Once connected, SSL stream objects are used as synchronous or asynchronous read
-and write streams. This means the objects can be used with any of the [link
-asio.reference.read read()], [link asio.reference.async_read async_read()],
-[link asio.reference.write write()], [link asio.reference.async_write
-async_write()], [link asio.reference.read_until read_until()] or [link
-asio.reference.async_read_until async_read_until()] free functions.
-
-[heading Certificate Verification]
-
-Asio provides various methods for configuring the way SSL certificates are
-verified:
-
-* [link asio.reference.ssl__context.set_default_verify_paths ssl::context::set_default_verify_paths()]
-* [link asio.reference.ssl__context.set_verify_mode ssl::context::set_verify_mode()]
-* [link asio.reference.ssl__context.set_verify_callback ssl::context::set_verify_callback()]
-* [link asio.reference.ssl__context.load_verify_file ssl::context::load_verify_file()]
-* [link asio.reference.ssl__stream.set_verify_mode ssl::stream::set_verify_mode()]
-* [link asio.reference.ssl__stream.set_verify_callback ssl::stream::set_verify_callback()]
-
-To simplify use cases where certificates are verified according to the rules in
-RFC 2818 (certificate verification for HTTPS), Asio provides a reusable
-verification callback as a function object:
-
-* [link asio.reference.ssl__rfc2818_verification ssl::rfc2818_verification]
-
-The following example shows verification of a remote host's certificate
-according to the rules used by HTTPS:
-
- using asio::ip::tcp;
- namespace ssl = asio::ssl;
- typedef ssl::stream<tcp::socket> ssl_socket;
-
- // Create a context that uses the default paths for
- // finding CA certificates.
- ssl::context ctx(ssl::context::sslv23);
- ctx.set_default_verify_paths();
-
- // Open a socket and connect it to the remote host.
- asio::io_context io_context;
- ssl_socket sock(io_context, ctx);
- tcp::resolver resolver(io_context);
- tcp::resolver::query query("host.name", "https");
- asio::connect(sock.lowest_layer(), resolver.resolve(query));
- sock.lowest_layer().set_option(tcp::no_delay(true));
-
- // Perform SSL handshake and verify the remote host's
- // certificate.
- sock.set_verify_mode(ssl::verify_peer);
- sock.set_verify_callback(ssl::rfc2818_verification("host.name"));
- sock.handshake(ssl_socket::client);
-
- // ... read and write as normal ...
-
-[heading SSL and Threads]
-
-SSL stream objects perform no locking of their own. Therefore, it is essential
-that all asynchronous SSL operations are performed in an implicit or explicit
-[link asio.overview.core.strands strand]. Note that this means that no
-synchronisation is required (and so no locking overhead is incurred) in single
-threaded programs.
-
-[heading See Also]
-
-[link asio.reference.ssl__context ssl::context],
-[link asio.reference.ssl__rfc2818_verification ssl::rfc2818_verification],
-[link asio.reference.ssl__stream ssl::stream],
-[link asio.examples.cpp03_examples.ssl SSL example].
-
-[heading Notes]
-
-[@http://www.openssl.org OpenSSL] is required to make use of Asio's SSL
-support. When an application needs to use OpenSSL functionality that is not
-wrapped by Asio, the underlying OpenSSL types may be obtained by calling [link
-asio.reference.ssl__context.native_handle `ssl::context::native_handle()`] or
-[link asio.reference.ssl__stream.native_handle `ssl::stream::native_handle()`].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/strands.qbk b/3rdparty/asio/src/doc/overview/strands.qbk
deleted file mode 100644
index 0b6ff050dc6..00000000000
--- a/3rdparty/asio/src/doc/overview/strands.qbk
+++ /dev/null
@@ -1,85 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:strands Strands: Use Threads Without Explicit Locking]
-
-A strand is defined as a strictly sequential invocation of event handlers (i.e.
-no concurrent invocation). Use of strands allows execution of code in a
-multithreaded program without the need for explicit locking (e.g. using
-mutexes).
-
-Strands may be either implicit or explicit, as illustrated by the following
-alternative approaches:
-
-* Calling io_context::run() from only one thread means all event handlers
- execute in an implicit strand, due to the io_context's guarantee that handlers
- are only invoked from inside run().
-
-* Where there is a single chain of asynchronous operations associated with a
- connection (e.g. in a half duplex protocol implementation like HTTP) there is
- no possibility of concurrent execution of the handlers. This is an implicit
- strand.
-
-* An explicit strand is an instance of `strand<>` or `io_context::strand`. All
- event handler function objects need to be bound to the strand using
- `asio::bind_executor()` or otherwise posted/dispatched through the strand
- object.
-
-In the case of composed asynchronous operations, such as `async_read()` or
-`async_read_until()`, if a completion handler goes through a strand, then all
-intermediate handlers should also go through the same strand. This is needed to
-ensure thread safe access for any objects that are shared between the caller
-and the composed operation (in the case of `async_read()` it's the socket,
-which the caller can `close()` to cancel the operation).
-
-This is done by partially specialising the `asio::ssociated_executor<>` trait
-for all intermediate handlers. This trait forwards to the corresponding trait
-specialisation for the final handler:
-
- struct my_handler
- {
- void operator()() { ... }
- };
-
- namespace asio {
-
- template <class Executor>
- struct associated_executor<my_handler, Executor>
- {
- // Custom implementation of Executor type requirements.
- typedef my_executor type;
-
- // Return a custom executor implementation.
- static type get(const my_handler&, const Executor& = Executor())
- {
- return my_executor();
- }
- };
-
- } // namespace asio
-
-The `asio::bind_executor()` function is a helper to bind a specific executor
-object, such as a strand, to a completion handler. This binding automatically
-specialises the `associated_executor` trait as shown above. For example, to
-bind a strand to a completion handler we would simply write:
-
- my_socket.async_read_some(my_buffer,
- asio::bind_executor(my_strand,
- [](error_code ec, size_t length)
- {
- // ...
- }));
-
-[heading See Also]
-
-[link asio.reference.bind_executor bind_executor],
-[link asio.reference.strand strand],
-[link asio.reference.io_context__strand io_context::strand],
-[link asio.tutorial.tuttimer5 tutorial Timer.5],
-[link asio.examples.cpp03_examples.http_server_3 HTTP server 3 example].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/streams.qbk b/3rdparty/asio/src/doc/overview/streams.qbk
deleted file mode 100644
index ea89e8b5d62..00000000000
--- a/3rdparty/asio/src/doc/overview/streams.qbk
+++ /dev/null
@@ -1,62 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:streams Streams, Short Reads and Short Writes]
-
-Many I/O objects in Asio are stream-oriented. This means that:
-
-* There are no message boundaries. The data being transferred is a continuous
- sequence of bytes.
-
-* Read or write operations may transfer fewer bytes than requested. This is
- referred to as a short read or short write.
-
-Objects that provide stream-oriented I/O model one or more of the following
-type requirements:
-
-* `SyncReadStream`, where synchronous read operations are performed using a
- member function called `read_some()`.
-
-* `AsyncReadStream`, where asynchronous read operations are performed using a
- member function called `async_read_some()`.
-
-* `SyncWriteStream`, where synchronous write operations are performed using a
- member function called `write_some()`.
-
-* `AsyncWriteStream`, where synchronous write operations are performed using a
- member function called `async_write_some()`.
-
-Examples of stream-oriented I/O objects include `ip::tcp::socket`,
-`ssl::stream<>`, `posix::stream_descriptor`, `windows::stream_handle`, etc.
-
-Programs typically want to transfer an exact number of bytes. When a short read
-or short write occurs the program must restart the operation, and continue to
-do so until the required number of bytes has been transferred. Asio provides
-generic functions that do this automatically: `read()`, `async_read()`,
-`write()` and `async_write()`.
-
-[heading Why EOF is an Error]
-
-* The end of a stream can cause `read`, `async_read`, `read_until` or
- `async_read_until` functions to violate their contract. E.g.
- a read of N bytes may finish early due to EOF.
-
-* An EOF error may be used to distinguish the end of a stream from a successful
- read of size 0.
-
-[heading See Also]
-
-[link asio.reference.async_read async_read()],
-[link asio.reference.async_write async_write()],
-[link asio.reference.read read()],
-[link asio.reference.write write()],
-[link asio.reference.AsyncReadStream AsyncReadStream],
-[link asio.reference.AsyncWriteStream AsyncWriteStream],
-[link asio.reference.SyncReadStream SyncReadStream],
-[link asio.reference.SyncWriteStream SyncWriteStream].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/sync_op.dot b/3rdparty/asio/src/doc/overview/sync_op.dot
deleted file mode 100644
index f3eb4dd4008..00000000000
--- a/3rdparty/asio/src/doc/overview/sync_op.dot
+++ /dev/null
@@ -1,67 +0,0 @@
-digraph g
-{
- graph
- [
- nodesep="0.6"
- ];
-
- edge
- [
- fontname="Helvetica",
- fontsize=10,
- labelfontname="Helvetica",
- labelfontsize=10
- ];
-
- node
- [
- fontname="Helvetica",
- fontsize=10,
- shape=box
- ];
-
- edge
- [
- arrowhead="open"
- ]
-
- // Program elements.
- {
- operating_system [ label="Operating System", shape=ellipse ];
- io_context [ label="io_context" ];
- io_object [ label="I/O Object\ne.g. socket" ];
- your_program [ label="Your Program" ];
- }
-
- // Owning relationships.
- {
- edge [ arrowtail="diamond" ];
- your_program:w -> io_object:nw;
- your_program:se -> io_context:ne;
- }
-
- // Non-owning relationships;
- {
- io_object:sw -> io_context:w;
- }
-
- // Actions.
- {
- edge [ style="dashed", color="#808080" ];
-
- // Forward actions.
- {
- your_program:sw -> io_object:n [ label="1" ];
- io_object:s -> io_context:nw [ label="2" ];
- io_context:sw -> operating_system:nw [ label="3" ];
- }
-
- // Reverse actions.
- {
- edge [ arrowhead="none", arrowtail="open" ];
- io_context:se -> operating_system:ne [ label="4" ];
- io_object:se -> io_context:n [ label="5" ];
- your_program:s -> io_object:ne [ label="6" ];
- }
- }
-}
diff --git a/3rdparty/asio/src/doc/overview/sync_op.png b/3rdparty/asio/src/doc/overview/sync_op.png
deleted file mode 100644
index a96c8351b9f..00000000000
--- a/3rdparty/asio/src/doc/overview/sync_op.png
+++ /dev/null
Binary files differ
diff --git a/3rdparty/asio/src/doc/overview/threads.qbk b/3rdparty/asio/src/doc/overview/threads.qbk
deleted file mode 100644
index b5239d9828e..00000000000
--- a/3rdparty/asio/src/doc/overview/threads.qbk
+++ /dev/null
@@ -1,66 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:threads Threads and Asio]
-
-[heading Thread Safety]
-
-In general, it is safe to make concurrent use of distinct objects, but unsafe
-to make concurrent use of a single object. However, types such as `io_context`
-provide a stronger guarantee that it is safe to use a single object
-concurrently.
-
-[heading Thread Pools]
-
-Multiple threads may call `io_context::run()` to set up a pool of threads from
-which completion handlers may be invoked. This approach may also be used with
-`io_context::post()` to use a means to perform any computational tasks across a
-thread pool.
-
-Note that all threads that have joined an `io_context`'s pool are considered
-equivalent, and the `io_context` may distribute work across them in an
-arbitrary fashion.
-
-[heading Internal Threads]
-
-The implementation of this library for a particular platform may make use of
-one or more internal threads to emulate asynchronicity. As far as possible,
-these threads must be invisible to the library user. In particular, the threads:
-
-* must not call the user's code directly; and
-
-* must block all signals.
-
-This approach is complemented by the following guarantee:
-
-* Asynchronous completion handlers will only be called from threads that are
- currently calling `io_context::run()`.
-
-Consequently, it is the library user's responsibility to create and manage all
-threads to which the notifications will be delivered.
-
-The reasons for this approach include:
-
-* By only calling `io_context::run()` from a single thread, the user's code can
- avoid the development complexity associated with synchronisation. For
- example, a library user can implement scalable servers that are
- single-threaded (from the user's point of view).
-
-* A library user may need to perform initialisation in a thread shortly after
- the thread starts and before any other application code is executed. For
- example, users of Microsoft's COM must call `CoInitializeEx` before any other
- COM operations can be called from that thread.
-
-* The library interface is decoupled from interfaces for thread creation and
- management, and permits implementations on platforms where threads are not
- available.
-
-[heading See Also]
-
-[link asio.reference.io_context io_context].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/timers.qbk b/3rdparty/asio/src/doc/overview/timers.qbk
deleted file mode 100644
index 0c5528dcc1b..00000000000
--- a/3rdparty/asio/src/doc/overview/timers.qbk
+++ /dev/null
@@ -1,52 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:timers Timers]
-
-Long running I/O operations will often have a deadline by which they must have
-completed. These deadlines may be expressed as absolute times, but are often
-calculated relative to the current time.
-
-As a simple example, to perform a synchronous wait operation on a timer using a
-relative time one may write:
-
- io_context i;
- ...
- deadline_timer t(i);
- t.expires_from_now(boost::posix_time::seconds(5));
- t.wait();
-
-More commonly, a program will perform an asynchronous wait operation on a
-timer:
-
- void handler(asio::error_code ec) { ... }
- ...
- io_context i;
- ...
- deadline_timer t(i);
- t.expires_from_now(boost::posix_time::milliseconds(400));
- t.async_wait(handler);
- ...
- i.run();
-
-The deadline associated with a timer may also be obtained as a relative time:
-
- boost::posix_time::time_duration time_until_expiry
- = t.expires_from_now();
-
-or as an absolute time to allow composition of timers:
-
- deadline_timer t2(i);
- t2.expires_at(t.expires_at() + boost::posix_time::seconds(30));
-
-[heading See Also]
-
-[link asio.reference.basic_deadline_timer basic_deadline_timer],
-[link asio.reference.deadline_timer deadline_timer],
-[link asio.tutorial.tuttimer1 timer tutorials].
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/overview/windows.qbk b/3rdparty/asio/src/doc/overview/windows.qbk
deleted file mode 100644
index da49a0b409e..00000000000
--- a/3rdparty/asio/src/doc/overview/windows.qbk
+++ /dev/null
@@ -1,126 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:windows Windows-Specific Functionality]
-
-[link asio.overview.windows.stream_handle Stream-Oriented HANDLEs]
-
-[link asio.overview.windows.random_access_handle Random-Access HANDLEs]
-
-[link asio.overview.windows.object_handle Object HANDLEs]
-
-[section:stream_handle Stream-Oriented HANDLEs]
-
-Asio contains classes to allow asynchronous read and write operations to be
-performed on Windows `HANDLE`s, such as named pipes.
-
-For example, to perform asynchronous operations on a named pipe, the following
-object may be created:
-
- HANDLE handle = ::CreateFile(...);
- windows::stream_handle pipe(my_io_context, handle);
-
-These are then used as synchronous or asynchronous read and write streams. This
-means the objects can be used with any of the [link asio.reference.read
-read()], [link asio.reference.async_read async_read()], [link
-asio.reference.write write()], [link asio.reference.async_write
-async_write()], [link asio.reference.read_until read_until()] or [link
-asio.reference.async_read_until async_read_until()] free functions.
-
-The kernel object referred to by the `HANDLE` must support use with I/O
-completion ports (which means that named pipes are supported, but anonymous
-pipes and console streams are not).
-
-[heading See Also]
-
-[link asio.reference.windows__stream_handle windows::stream_handle].
-
-[heading Notes]
-
-Windows stream `HANDLE`s are only available at compile time when targeting
-Windows and only when the I/O completion port backend is used (which is the
-default). A program may test for the macro `ASIO_HAS_WINDOWS_STREAM_HANDLE` to
-determine whether they are supported.
-
-[endsect]
-
-[/-----------------------------------------------------------------------------]
-
-[section:random_access_handle Random-Access HANDLEs]
-
-Asio provides Windows-specific classes that permit asynchronous read and write
-operations to be performed on HANDLEs that refer to regular files.
-
-For example, to perform asynchronous operations on a file the following object
-may be created:
-
- HANDLE handle = ::CreateFile(...);
- windows::random_access_handle file(my_io_context, handle);
-
-Data may be read from or written to the handle using one of the
-`read_some_at()`, `async_read_some_at()`, `write_some_at()` or
-`async_write_some_at()` member functions. However, like the equivalent
-functions (`read_some()`, etc.) on streams, these functions are only required
-to transfer one or more bytes in a single operation. Therefore free functions
-called [link asio.reference.read_at read_at()], [link
-asio.reference.async_read_at async_read_at()], [link asio.reference.write_at
-write_at()] and [link asio.reference.async_write_at async_write_at()] have been
-created to repeatedly call the corresponding [^[**]_some_at()] function until
-all data has been transferred.
-
-[heading See Also]
-
-[link asio.reference.windows__random_access_handle windows::random_access_handle].
-
-[heading Notes]
-
-Windows random-access `HANDLE`s are only available at compile time when
-targeting Windows and only when the I/O completion port backend is used (which
-is the default). A program may test for the macro
-`ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE` to determine whether they are
-supported.
-
-[endsect]
-
-[/-----------------------------------------------------------------------------]
-
-[section:object_handle Object HANDLEs]
-
-Asio provides Windows-specific classes that permit asynchronous wait operations
-to be performed on HANDLEs to kernel objects of the following types:
-
-* Change notification
-* Console input
-* Event
-* Memory resource notification
-* Process
-* Semaphore
-* Thread
-* Waitable timer
-
-For example, to perform asynchronous operations on an event, the following
-object may be created:
-
- HANDLE handle = ::CreateEvent(...);
- windows::object_handle file(my_io_context, handle);
-
-The `wait()` and `async_wait()` member functions may then be used to wait until
-the kernel object is signalled.
-
-[heading See Also]
-
-[link asio.reference.windows__object_handle windows::object_handle].
-
-[heading Notes]
-
-Windows object `HANDLE`s are only available at compile time when targeting
-Windows. Programs may test for the macro `ASIO_HAS_WINDOWS_OBJECT_HANDLE` to
-determine whether they are supported.
-
-[endsect]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/project-root.jam b/3rdparty/asio/src/doc/project-root.jam
deleted file mode 100644
index 218d8921e51..00000000000
--- a/3rdparty/asio/src/doc/project-root.jam
+++ /dev/null
@@ -1 +0,0 @@
-# This file intentionally left blank.
diff --git a/3rdparty/asio/src/doc/quickref.xml b/3rdparty/asio/src/doc/quickref.xml
deleted file mode 100644
index 7d2632a1fd9..00000000000
--- a/3rdparty/asio/src/doc/quickref.xml
+++ /dev/null
@@ -1,514 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "../../../boost/tools/boostbook/dtd/boostbook.dtd">
-
-<!--
- Copyright (c) 2003-2016 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)
--->
-
-<informaltable frame="all">
- <tgroup cols="4">
- <colspec colname="a"/>
- <colspec colname="b"/>
- <colspec colname="c"/>
- <colspec colname="d"/>
- <thead>
- <row>
- <entry valign="center" namest="a" nameend="d">
- <bridgehead renderas="sect2">Core</bridgehead>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.coroutine">coroutine</link></member>
- <member><link linkend="asio.reference.error_code">error_code</link></member>
- <member><link linkend="asio.reference.execution_context">execution_context</link></member>
- <member><link linkend="asio.reference.execution_context__id">execution_context::id</link></member>
- <member><link linkend="asio.reference.execution_context__service">execution_context::service</link></member>
- <member><link linkend="asio.reference.executor">executor</link></member>
- <member><link linkend="asio.reference.executor_arg_t">executor_arg_t</link></member>
- <member><link linkend="asio.reference.invalid_service_owner">invalid_service_owner</link></member>
- <member><link linkend="asio.reference.io_context">io_context</link></member>
- <member><link linkend="asio.reference.io_context__executor_type">io_context::executor_type</link></member>
- <member><link linkend="asio.reference.io_context__service">io_context::service</link></member>
- <member><link linkend="asio.reference.io_context__strand">io_context::strand</link></member>
- <member><link linkend="asio.reference.io_context__work">io_context::work</link> (deprecated)</member>
- <member><link linkend="asio.reference.service_already_exists">service_already_exists</link></member>
- <member><link linkend="asio.reference.system_error">system_error</link></member>
- <member><link linkend="asio.reference.system_executor">system_executor</link></member>
- <member><link linkend="asio.reference.thread">thread</link></member>
- <member><link linkend="asio.reference.thread_pool">thread_pool</link></member>
- <member><link linkend="asio.reference.thread_pool__executor_type">thread_pool::executor_type</link></member>
- <member><link linkend="asio.reference.yield_context">yield_context</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Free Functions</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.add_service">add_service</link></member>
- <member><link linkend="asio.reference.asio_handler_allocate">asio_handler_allocate</link></member>
- <member><link linkend="asio.reference.asio_handler_deallocate">asio_handler_deallocate</link></member>
- <member><link linkend="asio.reference.asio_handler_invoke">asio_handler_invoke</link></member>
- <member><link linkend="asio.reference.asio_handler_is_continuation">asio_handler_is_continuation</link></member>
- <member><link linkend="asio.reference.bind_executor">bind_executor</link></member>
- <member><link linkend="asio.reference.dispatch">dispatch</link></member>
- <member><link linkend="asio.reference.defer">defer</link></member>
- <member><link linkend="asio.reference.get_associated_allocator">get_associated_allocator</link></member>
- <member><link linkend="asio.reference.get_associated_executor">get_associated_executor</link></member>
- <member><link linkend="asio.reference.has_service">has_service</link></member>
- <member><link linkend="asio.reference.make_work_guard">make_work_guard</link></member>
- <member><link linkend="asio.reference.post">post</link></member>
- <member><link linkend="asio.reference.spawn">spawn</link></member>
- <member><link linkend="asio.reference.use_service">use_service</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Class Templates</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.async_completion">async_completion</link></member>
- <member><link linkend="asio.reference.basic_io_object">basic_io_object</link></member>
- <member><link linkend="asio.reference.basic_yield_context">basic_yield_context</link></member>
- <member><link linkend="asio.reference.executor_binder">executor_binder</link></member>
- <member><link linkend="asio.reference.executor_work_guard">executor_work_guard</link></member>
- <member><link linkend="asio.reference.strand">strand</link></member>
- <member><link linkend="asio.reference.use_future_t">use_future_t</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Special Values</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.executor_arg">executor_arg</link></member>
- <member><link linkend="asio.reference.use_future">use_future</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Boost.Bind Placeholders</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.placeholders__bytes_transferred">placeholders::bytes_transferred</link></member>
- <member><link linkend="asio.reference.placeholders__endpoint">placeholders::endpoint</link></member>
- <member><link linkend="asio.reference.placeholders__error">placeholders::error</link></member>
- <member><link linkend="asio.reference.placeholders__iterator">placeholders::iterator</link></member>
- <member><link linkend="asio.reference.placeholders__results">placeholders::results</link></member>
- <member><link linkend="asio.reference.placeholders__signal_number">placeholders::signal_number</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Error Codes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.error__basic_errors">error::basic_errors</link></member>
- <member><link linkend="asio.reference.error__netdb_errors">error::netdb_errors</link></member>
- <member><link linkend="asio.reference.error__addrinfo_errors">error::addrinfo_errors</link></member>
- <member><link linkend="asio.reference.error__misc_errors">error::misc_errors</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Traits</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.associated_allocator">associated_allocator</link></member>
- <member><link linkend="asio.reference.associated_executor">associated_executor</link></member>
- <member><link linkend="asio.reference.async_result">async_result</link></member>
- <member><link linkend="asio.reference.handler_type">handler_type </link> (deprecated)</member>
- <member><link linkend="asio.reference.is_executor">is_executor</link></member>
- <member><link linkend="asio.reference.uses_executor">uses_executor</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.asynchronous_operations">Asynchronous operations</link></member>
- <member><link linkend="asio.reference.CompletionHandler">CompletionHandler</link></member>
- <member><link linkend="asio.reference.ExecutionContext">ExecutionContext</link></member>
- <member><link linkend="asio.reference.Executor1">Executor</link></member>
- <member><link linkend="asio.reference.Handler">Handler</link></member>
- <member><link linkend="asio.reference.Service">Service</link></member>
- </simplelist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- <tgroup cols="4">
- <colspec colname="a"/>
- <colspec colname="b"/>
- <colspec colname="c"/>
- <colspec colname="d"/>
- <thead>
- <row>
- <entry valign="center" namest="a" nameend="d">
- <bridgehead renderas="sect2">Buffers and Buffer-Oriented Operations</bridgehead>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.const_buffer">const_buffer</link></member>
- <member><link linkend="asio.reference.mutable_buffer">mutable_buffer</link></member>
- <member><link linkend="asio.reference.const_buffers_1">const_buffers_1 </link> (deprecated)</member>
- <member><link linkend="asio.reference.mutable_buffers_1">mutable_buffers_1 </link> (deprecated)</member>
- <member><link linkend="asio.reference.null_buffers">null_buffers</link> (deprecated)</member>
- <member><link linkend="asio.reference.streambuf">streambuf</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Class Templates</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.basic_streambuf">basic_streambuf</link></member>
- <member><link linkend="asio.reference.buffered_read_stream">buffered_read_stream</link></member>
- <member><link linkend="asio.reference.buffered_stream">buffered_stream</link></member>
- <member><link linkend="asio.reference.buffered_write_stream">buffered_write_stream</link></member>
- <member><link linkend="asio.reference.buffers_iterator">buffers_iterator</link></member>
- <member><link linkend="asio.reference.dynamic_string_buffer">dynamic_string_buffer</link></member>
- <member><link linkend="asio.reference.dynamic_vector_buffer">dynamic_vector_buffer</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Free Functions</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.async_read">async_read</link></member>
- <member><link linkend="asio.reference.async_read_at">async_read_at</link></member>
- <member><link linkend="asio.reference.async_read_until">async_read_until</link></member>
- <member><link linkend="asio.reference.async_write">async_write</link></member>
- <member><link linkend="asio.reference.async_write_at">async_write_at</link></member>
- <member><link linkend="asio.reference.buffer">buffer</link></member>
- <member><link linkend="asio.reference.buffer_cast">buffer_cast </link> (deprecated)</member>
- <member><link linkend="asio.reference.buffer_copy">buffer_copy</link></member>
- <member><link linkend="asio.reference.buffer_size">buffer_size</link></member>
- <member><link linkend="asio.reference.buffers_begin">buffers_begin</link></member>
- <member><link linkend="asio.reference.buffers_end">buffers_end</link></member>
- <member><link linkend="asio.reference.dynamic_buffer">dynamic_buffer</link></member>
- <member><link linkend="asio.reference.read">read</link></member>
- <member><link linkend="asio.reference.read_at">read_at</link></member>
- <member><link linkend="asio.reference.read_until">read_until</link></member>
- <member><link linkend="asio.reference.transfer_all">transfer_all</link></member>
- <member><link linkend="asio.reference.transfer_at_least">transfer_at_least</link></member>
- <member><link linkend="asio.reference.transfer_exactly">transfer_exactly</link></member>
- <member><link linkend="asio.reference.write">write</link></member>
- <member><link linkend="asio.reference.write_at">write_at</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Type Traits</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.is_const_buffer_sequence">is_const_buffer_sequence</link></member>
- <member><link linkend="asio.reference.is_match_condition">is_match_condition</link></member>
- <member><link linkend="asio.reference.is_mutable_buffer_sequence">is_mutable_buffer_sequence</link></member>
- <member><link linkend="asio.reference.is_read_buffered">is_read_buffered</link></member>
- <member><link linkend="asio.reference.is_write_buffered">is_write_buffered</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.read_write_operations">Read and write operations</link></member>
- <member><link linkend="asio.reference.AsyncRandomAccessReadDevice">AsyncRandomAccessReadDevice</link></member>
- <member><link linkend="asio.reference.AsyncRandomAccessWriteDevice">AsyncRandomAccessWriteDevice</link></member>
- <member><link linkend="asio.reference.AsyncReadStream">AsyncReadStream</link></member>
- <member><link linkend="asio.reference.AsyncWriteStream">AsyncWriteStream</link></member>
- <member><link linkend="asio.reference.CompletionCondition">CompletionCondition</link></member>
- <member><link linkend="asio.reference.ConstBufferSequence">ConstBufferSequence</link></member>
- <member><link linkend="asio.reference.DynamicBuffer">DynamicBuffer</link></member>
- <member><link linkend="asio.reference.MutableBufferSequence">MutableBufferSequence</link></member>
- <member><link linkend="asio.reference.ReadHandler">ReadHandler</link></member>
- <member><link linkend="asio.reference.SyncRandomAccessReadDevice">SyncRandomAccessReadDevice</link></member>
- <member><link linkend="asio.reference.SyncRandomAccessWriteDevice">SyncRandomAccessWriteDevice</link></member>
- <member><link linkend="asio.reference.SyncReadStream">SyncReadStream</link></member>
- <member><link linkend="asio.reference.SyncWriteStream">SyncWriteStream</link></member>
- <member><link linkend="asio.reference.WriteHandler">WriteHandler</link></member>
- </simplelist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- <tgroup cols="4">
- <colspec colname="a"/>
- <colspec colname="b"/>
- <colspec colname="c"/>
- <colspec colname="d"/>
- <thead>
- <row>
- <entry valign="center" namest="a" nameend="d">
- <bridgehead renderas="sect2">Networking</bridgehead>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.generic__datagram_protocol">generic::datagram_protocol</link></member>
- <member><link linkend="asio.reference.generic__datagram_protocol.endpoint">generic::datagram_protocol::endpoint</link></member>
- <member><link linkend="asio.reference.generic__datagram_protocol.socket">generic::datagram_protocol::socket</link></member>
- <member><link linkend="asio.reference.generic__raw_protocol">generic::raw_protocol</link></member>
- <member><link linkend="asio.reference.generic__raw_protocol.endpoint">generic::raw_protocol::endpoint</link></member>
- <member><link linkend="asio.reference.generic__raw_protocol.socket">generic::raw_protocol::socket</link></member>
- <member><link linkend="asio.reference.generic__seq_packet_protocol">generic::seq_packet_protocol</link></member>
- <member><link linkend="asio.reference.generic__seq_packet_protocol.endpoint">generic::seq_packet_protocol::endpoint</link></member>
- <member><link linkend="asio.reference.generic__seq_packet_protocol.socket">generic::seq_packet_protocol::socket</link></member>
- <member><link linkend="asio.reference.generic__stream_protocol">generic::stream_protocol</link></member>
- <member><link linkend="asio.reference.generic__stream_protocol.endpoint">generic::stream_protocol::endpoint</link></member>
- <member><link linkend="asio.reference.generic__stream_protocol.iostream">generic::stream_protocol::iostream</link></member>
- <member><link linkend="asio.reference.generic__stream_protocol.socket">generic::stream_protocol::socket</link></member>
- <member><link linkend="asio.reference.ip__address">ip::address</link></member>
- <member><link linkend="asio.reference.ip__address_v4">ip::address_v4</link></member>
- <member><link linkend="asio.reference.ip__address_v4_iterator">ip::address_v4_iterator</link></member>
- <member><link linkend="asio.reference.ip__address_v4_range">ip::address_v4_range</link></member>
- <member><link linkend="asio.reference.ip__address_v6">ip::address_v6</link></member>
- <member><link linkend="asio.reference.ip__address_v6_iterator">ip::address_v6_iterator</link></member>
- <member><link linkend="asio.reference.ip__address_v6_range">ip::address_v6_range</link></member>
- <member><link linkend="asio.reference.ip__icmp">ip::icmp</link></member>
- <member><link linkend="asio.reference.ip__icmp.endpoint">ip::icmp::endpoint</link></member>
- <member><link linkend="asio.reference.ip__icmp.resolver">ip::icmp::resolver</link></member>
- <member><link linkend="asio.reference.ip__icmp.socket">ip::icmp::socket</link></member>
- <member><link linkend="asio.reference.ip__network_v4">ip::network_v4</link></member>
- <member><link linkend="asio.reference.ip__network_v6">ip::network_v6</link></member>
- <member><link linkend="asio.reference.ip__resolver_query_base">ip::resolver_query_base</link></member>
- <member><link linkend="asio.reference.ip__tcp">ip::tcp</link></member>
- <member><link linkend="asio.reference.ip__tcp.acceptor">ip::tcp::acceptor</link></member>
- <member><link linkend="asio.reference.ip__tcp.endpoint">ip::tcp::endpoint</link></member>
- <member><link linkend="asio.reference.ip__tcp.iostream">ip::tcp::iostream</link></member>
- <member><link linkend="asio.reference.ip__tcp.resolver">ip::tcp::resolver</link></member>
- <member><link linkend="asio.reference.ip__tcp.socket">ip::tcp::socket</link></member>
- <member><link linkend="asio.reference.ip__udp">ip::udp</link></member>
- <member><link linkend="asio.reference.ip__udp.endpoint">ip::udp::endpoint</link></member>
- <member><link linkend="asio.reference.ip__udp.resolver">ip::udp::resolver</link></member>
- <member><link linkend="asio.reference.ip__udp.socket">ip::udp::socket</link></member>
- <member><link linkend="asio.reference.socket_base">socket_base</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Free Functions</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.async_connect">async_connect</link></member>
- <member><link linkend="asio.reference.connect">connect</link></member>
- <member><link linkend="asio.reference.ip__host_name">ip::host_name</link></member>
- <member><link linkend="asio.reference.ip__address.make_address">ip::make_address</link></member>
- <member><link linkend="asio.reference.ip__address_v4.make_address_v4">ip::make_address_v4</link></member>
- <member><link linkend="asio.reference.ip__address_v6.make_address_v6">ip::make_address_v6</link></member>
- <member><link linkend="asio.reference.ip__network_v4.make_network_v4">ip::make_network_v4</link></member>
- <member><link linkend="asio.reference.ip__network_v6.make_network_v6">ip::make_network_v6</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Class Templates</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.basic_datagram_socket">basic_datagram_socket</link></member>
- <member><link linkend="asio.reference.basic_raw_socket">basic_raw_socket</link></member>
- <member><link linkend="asio.reference.basic_seq_packet_socket">basic_seq_packet_socket</link></member>
- <member><link linkend="asio.reference.basic_socket">basic_socket</link></member>
- <member><link linkend="asio.reference.basic_socket_acceptor">basic_socket_acceptor</link></member>
- <member><link linkend="asio.reference.basic_socket_iostream">basic_socket_iostream</link></member>
- <member><link linkend="asio.reference.basic_socket_streambuf">basic_socket_streambuf</link></member>
- <member><link linkend="asio.reference.basic_stream_socket">basic_stream_socket</link></member>
- <member><link linkend="asio.reference.generic__basic_endpoint">generic::basic_endpoint</link></member>
- <member><link linkend="asio.reference.ip__basic_endpoint">ip::basic_endpoint</link></member>
- <member><link linkend="asio.reference.ip__basic_resolver">ip::basic_resolver</link></member>
- <member><link linkend="asio.reference.ip__basic_resolver_entry">ip::basic_resolver_entry</link></member>
- <member><link linkend="asio.reference.ip__basic_resolver_iterator">ip::basic_resolver_iterator</link></member>
- <member><link linkend="asio.reference.ip__basic_resolver_query">ip::basic_resolver_query</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Socket Options</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.ip__multicast__enable_loopback">ip::multicast::enable_loopback</link></member>
- <member><link linkend="asio.reference.ip__multicast__hops">ip::multicast::hops</link></member>
- <member><link linkend="asio.reference.ip__multicast__join_group">ip::multicast::join_group</link></member>
- <member><link linkend="asio.reference.ip__multicast__leave_group">ip::multicast::leave_group</link></member>
- <member><link linkend="asio.reference.ip__multicast__outbound_interface">ip::multicast::outbound_interface</link></member>
- <member><link linkend="asio.reference.ip__tcp.no_delay">ip::tcp::no_delay</link></member>
- <member><link linkend="asio.reference.ip__unicast__hops">ip::unicast::hops</link></member>
- <member><link linkend="asio.reference.ip__v6_only">ip::v6_only</link></member>
- <member><link linkend="asio.reference.socket_base.broadcast">socket_base::broadcast</link></member>
- <member><link linkend="asio.reference.socket_base.debug">socket_base::debug</link></member>
- <member><link linkend="asio.reference.socket_base.do_not_route">socket_base::do_not_route</link></member>
- <member><link linkend="asio.reference.socket_base.enable_connection_aborted">socket_base::enable_connection_aborted</link></member>
- <member><link linkend="asio.reference.socket_base.keep_alive">socket_base::keep_alive</link></member>
- <member><link linkend="asio.reference.socket_base.linger">socket_base::linger</link></member>
- <member><link linkend="asio.reference.socket_base.receive_buffer_size">socket_base::receive_buffer_size</link></member>
- <member><link linkend="asio.reference.socket_base.receive_low_watermark">socket_base::receive_low_watermark</link></member>
- <member><link linkend="asio.reference.socket_base.reuse_address">socket_base::reuse_address</link></member>
- <member><link linkend="asio.reference.socket_base.send_buffer_size">socket_base::send_buffer_size</link></member>
- <member><link linkend="asio.reference.socket_base.send_low_watermark">socket_base::send_low_watermark</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">I/O Control Commands</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.socket_base.bytes_readable">socket_base::bytes_readable</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.synchronous_socket_operations">Synchronous socket operations</link></member>
- <member><link linkend="asio.reference.asynchronous_socket_operations">Asynchronous socket operations</link></member>
- <member><link linkend="asio.reference.AcceptableProtocol">AcceptableProtocol</link></member>
- <member><link linkend="asio.reference.AcceptHandler">AcceptHandler</link></member>
- <member><link linkend="asio.reference.ConnectCondition">ConnectCondition</link></member>
- <member><link linkend="asio.reference.ConnectHandler">ConnectHandler</link></member>
- <member><link linkend="asio.reference.Endpoint">Endpoint</link></member>
- <member><link linkend="asio.reference.EndpointSequence">EndpointSequence</link></member>
- <member><link linkend="asio.reference.GettableSocketOption">GettableSocketOption</link></member>
- <member><link linkend="asio.reference.InternetProtocol">InternetProtocol</link></member>
- <member><link linkend="asio.reference.IoControlCommand">IoControlCommand</link></member>
- <member><link linkend="asio.reference.IteratorConnectHandler">IteratorConnectHandler</link></member>
- <member><link linkend="asio.reference.MoveAcceptHandler">MoveAcceptHandler</link></member>
- <member><link linkend="asio.reference.Protocol">Protocol</link></member>
- <member><link linkend="asio.reference.RangeConnectHandler">RangeConnectHandler</link></member>
- <member><link linkend="asio.reference.ResolveHandler">ResolveHandler</link></member>
- <member><link linkend="asio.reference.SettableSocketOption">SettableSocketOption</link></member>
- </simplelist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- <tgroup cols="4">
- <colspec colname="a"/>
- <colspec colname="b"/>
- <colspec colname="c"/>
- <colspec colname="d"/>
- <thead>
- <row>
- <entry valign="center" namest="a" nameend="a">
- <bridgehead renderas="sect2">Timers</bridgehead>
- </entry>
- <entry valign="center" namest="b" nameend="b">
- <bridgehead renderas="sect2">SSL</bridgehead>
- </entry>
- <entry valign="center" namest="c" nameend="c">
- <bridgehead renderas="sect2">Serial Ports</bridgehead>
- </entry>
- <entry valign="center" namest="d" nameend="d">
- <bridgehead renderas="sect2">Signal Handling</bridgehead>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.deadline_timer">deadline_timer</link></member>
- <member><link linkend="asio.reference.high_resolution_timer">high_resolution_timer</link></member>
- <member><link linkend="asio.reference.steady_timer">steady_timer</link></member>
- <member><link linkend="asio.reference.system_timer">system_timer</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Class Templates</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.basic_deadline_timer">basic_deadline_timer</link></member>
- <member><link linkend="asio.reference.basic_waitable_timer">basic_waitable_timer</link></member>
- <member><link linkend="asio.reference.time_traits_lt__ptime__gt_">time_traits</link></member>
- <member><link linkend="asio.reference.wait_traits">wait_traits</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.TimeTraits">TimeTraits</link></member>
- <member><link linkend="asio.reference.WaitHandler">WaitHandler</link></member>
- <member><link linkend="asio.reference.WaitTraits">WaitTraits</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.ssl__context">ssl::context</link></member>
- <member><link linkend="asio.reference.ssl__context_base">ssl::context_base</link></member>
- <member><link linkend="asio.reference.ssl__rfc2818_verification">ssl::rfc2818_verification</link></member>
- <member><link linkend="asio.reference.ssl__stream_base">ssl::stream_base</link></member>
- <member><link linkend="asio.reference.ssl__verify_context">ssl::verify_context</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Class Templates</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.ssl__stream">ssl::stream</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.BufferedHandshakeHandler">BufferedHandshakeHandler</link></member>
- <member><link linkend="asio.reference.HandshakeHandler">HandshakeHandler</link></member>
- <member><link linkend="asio.reference.ShutdownHandler">ShutdownHandler</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.serial_port">serial_port</link></member>
- <member><link linkend="asio.reference.serial_port_base">serial_port_base</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Serial Port Options</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.serial_port_base__baud_rate">serial_port_base::baud_rate</link></member>
- <member><link linkend="asio.reference.serial_port_base__flow_control">serial_port_base::flow_control</link></member>
- <member><link linkend="asio.reference.serial_port_base__parity">serial_port_base::parity</link></member>
- <member><link linkend="asio.reference.serial_port_base__stop_bits">serial_port_base::stop_bits</link></member>
- <member><link linkend="asio.reference.serial_port_base__character_size">serial_port_base::character_size</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.GettableSerialPortOption">GettableSerialPortOption</link></member>
- <member><link linkend="asio.reference.SettableSerialPortOption">SettableSerialPortOption</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.signal_set">signal_set</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Type Requirements</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.SignalHandler">SignalHandler</link></member>
- </simplelist>
- </entry>
- </row>
- </tbody>
- </tgroup>
- <tgroup cols="4">
- <colspec colname="a"/>
- <colspec colname="b"/>
- <colspec colname="c"/>
- <colspec colname="d"/>
- <thead>
- <row>
- <entry valign="center" namest="a" nameend="b">
- <bridgehead renderas="sect2">POSIX-specific</bridgehead>
- </entry>
- <entry valign="center" namest="c" nameend="d">
- <bridgehead renderas="sect2">Windows-specific</bridgehead>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry valign="top">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.local__stream_protocol">local::stream_protocol</link></member>
- <member><link linkend="asio.reference.local__stream_protocol.acceptor">local::stream_protocol::acceptor</link></member>
- <member><link linkend="asio.reference.local__stream_protocol.endpoint">local::stream_protocol::endpoint</link></member>
- <member><link linkend="asio.reference.local__stream_protocol.iostream">local::stream_protocol::iostream</link></member>
- <member><link linkend="asio.reference.local__stream_protocol.socket">local::stream_protocol::socket</link></member>
- <member><link linkend="asio.reference.local__datagram_protocol">local::datagram_protocol</link></member>
- <member><link linkend="asio.reference.local__datagram_protocol.endpoint">local::datagram_protocol::endpoint</link></member>
- <member><link linkend="asio.reference.local__datagram_protocol.socket">local::datagram_protocol::socket</link></member>
- <member><link linkend="asio.reference.posix__descriptor">posix::descriptor</link></member>
- <member><link linkend="asio.reference.posix__descriptor_base">posix::descriptor_base</link></member>
- <member><link linkend="asio.reference.posix__stream_descriptor">posix::stream_descriptor</link></member>
- </simplelist>
- </entry>
- <entry valign="top">
- <bridgehead renderas="sect3">Free Functions</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.local__connect_pair">local::connect_pair</link></member>
- </simplelist>
- <bridgehead renderas="sect3">Class Templates</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.local__basic_endpoint">local::basic_endpoint</link></member>
- </simplelist>
- </entry>
- <entry valign="top" namest="c" nameend="d">
- <bridgehead renderas="sect3">Classes</bridgehead>
- <simplelist type="vert" columns="1">
- <member><link linkend="asio.reference.windows__object_handle">windows::object_handle</link></member>
- <member><link linkend="asio.reference.windows__overlapped_handle">windows::overlapped_handle</link></member>
- <member><link linkend="asio.reference.windows__overlapped_ptr">windows::overlapped_ptr</link></member>
- <member><link linkend="asio.reference.windows__random_access_handle">windows::random_access_handle</link></member>
- <member><link linkend="asio.reference.windows__stream_handle">windows::stream_handle</link></member>
- </simplelist>
- </entry>
- </row>
- </tbody>
- </tgroup>
-</informaltable>
diff --git a/3rdparty/asio/src/doc/reference.dox b/3rdparty/asio/src/doc/reference.dox
deleted file mode 100644
index d0d56779840..00000000000
--- a/3rdparty/asio/src/doc/reference.dox
+++ /dev/null
@@ -1,256 +0,0 @@
-# Doxyfile 1.4.5
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Asio Reference"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = .
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = ./../../include/
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = NO
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-BUILTIN_STL_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ./../../include/asio.hpp \
- ./../../include/asio \
- ./../../include/asio/generic \
- ./../../include/asio/impl \
- ./../../include/asio/ip \
- ./../../include/asio/local \
- ./../../include/asio/posix \
- ./../../include/asio/ssl \
- ./../../include/asio/windows \
- ./noncopyable_dox.txt \
- ./std_exception_dox.txt
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-USE_HTAGS = NO
-VERBATIM_HEADERS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = YES
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = NO
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = GENERATING_DOCUMENTATION \
- ASIO_SOCKET_ERROR(e)=implementation_defined \
- ASIO_NETDB_ERROR(e)=implementation_defined \
- ASIO_EOF_ERROR(e)=implementation_defined \
- ASIO_OS_ERROR(e1,e2)=implementation_defined \
- ASIO_MOVE_ARG(a)=a&& \
- ASIO_DECL= \
- ASIO_CONSTEXPR=constexpr \
- ASIO_NOEXCEPT=noexcept \
- ASIO_INITFN_RESULT_TYPE(t,a)=void_or_deduced \
- ASIO_SVC_TPARAM= \
- ASIO_SVC_TPARAM_DEF1()= \
- ASIO_SVC_TPARAM_DEF2()= \
- ASIO_SVC_TARG= \
- ASIO_SVC_TPARAM1= \
- ASIO_SVC_TPARAM1_DEF1()= \
- ASIO_SVC_TPARAM1_DEF2()= \
- ASIO_SVC_TARG1= \
- ASIO_SVC_T=asio::detail::service \
- ASIO_SVC_T1=asio::detail::service \
- ASIO_CONST_BUFFER=const_buffer \
- ASIO_MUTABLE_BUFFER=mutable_buffer \
- ASIO_SYNC_OP_VOID=void \
- ASIO_STRING_VIEW_PARAM=string_view
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE = reference.tags
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = NO
-GROUP_GRAPHS = NO
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = NO
-INCLUDED_BY_GRAPH = NO
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = NO
-DIRECTORY_GRAPH = NO
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 640
-MAX_DOT_GRAPH_HEIGHT = 640
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = NO
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
diff --git a/3rdparty/asio/src/doc/reference.qbk b/3rdparty/asio/src/doc/reference.qbk
deleted file mode 100644
index 7b9eb6441e2..00000000000
--- a/3rdparty/asio/src/doc/reference.qbk
+++ /dev/null
@@ -1,112844 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:reference Reference]
-
-[xinclude quickref.xml]
-
-[include requirements/asynchronous_operations.qbk]
-[include requirements/read_write_operations.qbk]
-[include requirements/synchronous_socket_operations.qbk]
-[include requirements/asynchronous_socket_operations.qbk]
-[include requirements/AcceptableProtocol.qbk]
-[include requirements/AcceptHandler.qbk]
-[include requirements/AsyncRandomAccessReadDevice.qbk]
-[include requirements/AsyncRandomAccessWriteDevice.qbk]
-[include requirements/AsyncReadStream.qbk]
-[include requirements/AsyncWriteStream.qbk]
-[include requirements/BufferedHandshakeHandler.qbk]
-[include requirements/CompletionCondition.qbk]
-[include requirements/CompletionHandler.qbk]
-[include requirements/ConnectCondition.qbk]
-[include requirements/ConnectHandler.qbk]
-[include requirements/ConstBufferSequence.qbk]
-[include requirements/DynamicBuffer.qbk]
-[include requirements/Endpoint.qbk]
-[include requirements/EndpointSequence.qbk]
-[include requirements/ExecutionContext.qbk]
-[include requirements/Executor.qbk]
-[include requirements/GettableSerialPortOption.qbk]
-[include requirements/GettableSocketOption.qbk]
-[include requirements/Handler.qbk]
-[include requirements/HandshakeHandler.qbk]
-[include requirements/InternetProtocol.qbk]
-[include requirements/IoControlCommand.qbk]
-[include requirements/IoObjectService.qbk]
-[include requirements/IteratorConnectHandler.qbk]
-[include requirements/MoveAcceptHandler.qbk]
-[include requirements/MutableBufferSequence.qbk]
-[include requirements/ProtoAllocator.qbk]
-[include requirements/Protocol.qbk]
-[include requirements/RangeConnectHandler.qbk]
-[include requirements/ReadHandler.qbk]
-[include requirements/ResolveHandler.qbk]
-[include requirements/Service.qbk]
-[include requirements/SettableSerialPortOption.qbk]
-[include requirements/SettableSocketOption.qbk]
-[include requirements/ShutdownHandler.qbk]
-[include requirements/SignalHandler.qbk]
-[include requirements/SyncRandomAccessReadDevice.qbk]
-[include requirements/SyncRandomAccessWriteDevice.qbk]
-[include requirements/SyncReadStream.qbk]
-[include requirements/SyncWriteStream.qbk]
-[include requirements/TimeTraits.qbk]
-[include requirements/WaitHandler.qbk]
-[include requirements/WaitTraits.qbk]
-[include requirements/WriteHandler.qbk]
-
-
-
-[section:add_service add_service]
-
-[indexterm1 asio.indexterm.add_service..add_service]
-
- template<
- typename ``[link asio.reference.Service Service]``>
- void add_service(
- execution_context & e,
- Service * svc);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[svc][The service object. On success, ownership of the service object is transferred to the [link asio.reference.execution_context `execution_context`]. When the [link asio.reference.execution_context `execution_context`] object is destroyed, it will destroy the service object by performing:
-``
- delete static_cast<execution_context::service*>(svc)
-``
-]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`].]]
-
-[[asio::invalid_service_owner][Thrown if the service's owning [link asio.reference.execution_context `execution_context`] is not the [link asio.reference.execution_context `execution_context`] object specified by the `e` parameter. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/impl/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:asio_handler_allocate asio_handler_allocate]
-
-[indexterm1 asio.indexterm.asio_handler_allocate..asio_handler_allocate]
-Default allocation function for handlers.
-
-
- void * asio_handler_allocate(
- std::size_t size,
- ... );
-
-
-Asynchronous operations may need to allocate temporary objects. Since asynchronous operations have a handler function object, these temporary objects can be said to be associated with the handler.
-
-Implement asio\_handler\_allocate and asio\_handler\_deallocate for your own handlers to provide custom allocation for these temporary objects.
-
-The default implementation of these allocation hooks uses `operator new` and `operator delete`.
-
-
-[heading Remarks]
-
-All temporary objects associated with a handler will be deallocated before the upcall to the handler is performed. This allows the same memory to be reused for a subsequent asynchronous operation initiated by the handler.
-
-
-[heading Example]
-
-
-
- class my_handler;
-
- void* asio_handler_allocate(std::size_t size, my_handler* context)
- {
- return ::operator new(size);
- }
-
- void asio_handler_deallocate(void* pointer, std::size_t size,
- my_handler* context)
- {
- ::operator delete(pointer);
- }
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/handler_alloc_hook.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:asio_handler_deallocate asio_handler_deallocate]
-
-[indexterm1 asio.indexterm.asio_handler_deallocate..asio_handler_deallocate]
-Default deallocation function for handlers.
-
-
- void asio_handler_deallocate(
- void * pointer,
- std::size_t size,
- ... );
-
-
-Implement asio\_handler\_allocate and asio\_handler\_deallocate for your own handlers to provide custom allocation for the associated temporary objects.
-
-The default implementation of these allocation hooks uses `operator new` and `operator delete`.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/handler_alloc_hook.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:asio_handler_invoke asio_handler_invoke]
-
-[indexterm1 asio.indexterm.asio_handler_invoke..asio_handler_invoke]
-Default invoke function for handlers.
-
-
- template<
- typename Function>
- void ``[link asio.reference.asio_handler_invoke.overload1 asio_handler_invoke]``(
- Function & function,
- ... );
- `` [''''&raquo;''' [link asio.reference.asio_handler_invoke.overload1 more...]]``
-
- template<
- typename Function>
- void ``[link asio.reference.asio_handler_invoke.overload2 asio_handler_invoke]``(
- const Function & function,
- ... );
- `` [''''&raquo;''' [link asio.reference.asio_handler_invoke.overload2 more...]]``
-
-Completion handlers for asynchronous operations are invoked by the [link asio.reference.io_context `io_context`] associated with the corresponding object (e.g. a socket or deadline\_timer). Certain guarantees are made on when the handler may be invoked, in particular that a handler can only be invoked from a thread that is currently calling `run()` on the corresponding [link asio.reference.io_context `io_context`] object. Handlers may subsequently be invoked through other objects (such as [link asio.reference.io_context__strand `io_context::strand`] objects) that provide additional guarantees.
-
-When asynchronous operations are composed from other asynchronous operations, all intermediate handlers should be invoked using the same method as the final handler. This is required to ensure that user-defined objects are not accessed in a way that may violate the guarantees. This hooking function ensures that the invoked method used for the final handler is accessible at each intermediate step.
-
-Implement asio\_handler\_invoke for your own handlers to specify a custom invocation strategy.
-
-This default implementation invokes the function object like so:
-
- function();
-
-
-If necessary, the default implementation makes a copy of the function object so that the non-const operator() can be used.
-
-
-[heading Example]
-
-
-
- class my_handler;
-
- template <typename Function>
- void asio_handler_invoke(Function function, my_handler* context)
- {
- context->strand_.dispatch(function);
- }
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/handler_invoke_hook.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 asio_handler_invoke (1 of 2 overloads)]
-
-
-Default handler invocation hook used for non-const function objects.
-
-
- template<
- typename Function>
- void asio_handler_invoke(
- Function & function,
- ... );
-
-
-
-[endsect]
-
-
-
-[section:overload2 asio_handler_invoke (2 of 2 overloads)]
-
-
-Default handler invocation hook used for const function objects.
-
-
- template<
- typename Function>
- void asio_handler_invoke(
- const Function & function,
- ... );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:asio_handler_is_continuation asio_handler_is_continuation]
-
-[indexterm1 asio.indexterm.asio_handler_is_continuation..asio_handler_is_continuation]
-Default continuation function for handlers.
-
-
- bool asio_handler_is_continuation(
- ... );
-
-
-Asynchronous operations may represent a continuation of the asynchronous control flow associated with the current handler. The implementation can use this knowledge to optimise scheduling of the handler.
-
-Implement asio\_handler\_is\_continuation for your own handlers to indicate when a handler represents a continuation.
-
-The default implementation of the continuation hook returns `false`.
-
-
-[heading Example]
-
-
-
- class my_handler;
-
- bool asio_handler_is_continuation(my_handler* context)
- {
- return true;
- }
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/handler_continuation_hook.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:associated_allocator associated_allocator]
-
-
-Traits type used to obtain the allocator associated with an object.
-
-
- template<
- typename T,
- typename Allocator = std::allocator<void>>
- struct associated_allocator
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.associated_allocator.type [*type]]]
- [If T has a nested type allocator_type, T::allocator_type. Otherwise Allocator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.associated_allocator.get [*get]]]
- [If T has a nested type allocator_type, returns t.get_allocator(). Otherwise returns a. ]
- ]
-
-]
-
-A program may specialise this traits type if the `T` template parameter in the specialisation is a user-defined type. The template parameter `Allocator` shall be a type meeting the Allocator requirements.
-
-Specialisations shall meet the following requirements, where `t` is a const reference to an object of type `T`, and `a` is an object of type `Allocator`.
-
-
-* Provide a nested typedef `type` that identifies a type meeting the Allocator requirements.
-
-
-* Provide a noexcept static member function named `get`, callable as `get(t)` and with return type `type`.
-
-
-* Provide a noexcept static member function named `get`, callable as `get(t,a)` and with return type `type`.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/associated_allocator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:get associated_allocator::get]
-
-[indexterm2 asio.indexterm.associated_allocator.get..get..associated_allocator]
-If `T` has a nested type `allocator_type`, returns `t.get_allocator()`. Otherwise returns `a`.
-
-
- static type get(
- const T & t,
- const Allocator & a = Allocator());
-
-
-
-[endsect]
-
-
-
-[section:type associated_allocator::type]
-
-[indexterm2 asio.indexterm.associated_allocator.type..type..associated_allocator]
-If `T` has a nested type `allocator_type`, `T::allocator_type`. Otherwise `Allocator`.
-
-
- typedef see_below type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/associated_allocator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:associated_executor associated_executor]
-
-
-Traits type used to obtain the executor associated with an object.
-
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]`` = system_executor>
- struct associated_executor
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.associated_executor.type [*type]]]
- [If T has a nested type executor_type, T::executor_type. Otherwise Executor. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.associated_executor.get [*get]]]
- [If T has a nested type executor_type, returns t.get_executor(). Otherwise returns ex. ]
- ]
-
-]
-
-A program may specialise this traits type if the `T` template parameter in the specialisation is a user-defined type. The template parameter `Executor` shall be a type meeting the Executor requirements.
-
-Specialisations shall meet the following requirements, where `t` is a const reference to an object of type `T`, and `e` is an object of type `Executor`.
-
-
-* Provide a nested typedef `type` that identifies a type meeting the Executor requirements.
-
-
-* Provide a noexcept static member function named `get`, callable as `get(t)` and with return type `type`.
-
-
-* Provide a noexcept static member function named `get`, callable as `get(t,e)` and with return type `type`.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/associated_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:get associated_executor::get]
-
-[indexterm2 asio.indexterm.associated_executor.get..get..associated_executor]
-If `T` has a nested type `executor_type`, returns `t.get_executor()`. Otherwise returns `ex`.
-
-
- static type get(
- const T & t,
- const Executor & ex = Executor());
-
-
-
-[endsect]
-
-
-
-[section:type associated_executor::type]
-
-[indexterm2 asio.indexterm.associated_executor.type..type..associated_executor]
-If `T` has a nested type `executor_type`, `T::executor_type`. Otherwise `Executor`.
-
-
- typedef see_below type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/associated_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:async_completion async_completion]
-
-
-Helper template to deduce the handler type from a CompletionToken, capture a local copy of the handler, and then create an [link asio.reference.async_result `async_result`] for the handler.
-
-
- template<
- typename CompletionToken,
- typename Signature>
- struct async_completion
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.async_completion.completion_handler_type [*completion_handler_type]]]
- [The real handler type to be used for the asynchronous operation. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.async_completion.async_completion [*async_completion]]]
- [Constructor. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.async_completion.completion_handler [*completion_handler]]]
- [A copy of, or reference to, a real handler object. ]
- ]
-
- [
- [[link asio.reference.async_completion.result [*result]]]
- [The result of the asynchronous operation's initiating function. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_completion async_completion::async_completion]
-
-[indexterm2 asio.indexterm.async_completion.async_completion..async_completion..async_completion]
-Constructor.
-
-
- async_completion(
- CompletionToken & token);
-
-
-The constructor creates the concrete completion handler and makes the link between the handler and the asynchronous result.
-
-
-[endsect]
-
-
-
-[section:completion_handler async_completion::completion_handler]
-
-[indexterm2 asio.indexterm.async_completion.completion_handler..completion_handler..async_completion]
-A copy of, or reference to, a real handler object.
-
-
- conditional< is_same< CompletionToken, completion_handler_type >::value, completion_handler_type &, completion_handler_type >::type completion_handler;
-
-
-
-[endsect]
-
-
-
-[section:completion_handler_type async_completion::completion_handler_type]
-
-[indexterm2 asio.indexterm.async_completion.completion_handler_type..completion_handler_type..async_completion]
-The real handler type to be used for the asynchronous operation.
-
-
- typedef asio::async_result< typename decay< CompletionToken >::type, Signature >::completion_handler_type completion_handler_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.async_result.completion_handler_type [*completion_handler_type]]]
- [The concrete completion handler type for the specific signature. ]
-
- ]
-
- [
-
- [[link asio.reference.async_result.return_type [*return_type]]]
- [The return type of the initiating function. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.async_result.async_result [*async_result]]]
- [Construct an async result from a given handler. ]
- ]
-
- [
- [[link asio.reference.async_result.get [*get]]]
- [Obtain the value to be returned from the initiating function. ]
- ]
-
-]
-
-The [link asio.reference.async_result `async_result`] traits class is used for determining:
-
-
-* the concrete completion handler type to be called at the end of the asynchronous operation;
-
-
-* the initiating function return type; and
-
-
-* how the return value of the initiating function is obtained.
-
-The trait allows the handler and return types to be determined at the point where the specific completion handler signature is known.
-
-This template may be specialised for user-defined completion token types. The primary template assumes that the CompletionToken is the completion handler.
-
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:result async_completion::result]
-
-[indexterm2 asio.indexterm.async_completion.result..result..async_completion]
-The result of the asynchronous operation's initiating function.
-
-
- async_result< typename decay< CompletionToken >::type, Signature > result;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:async_connect async_connect]
-
-[indexterm1 asio.indexterm.async_connect..async_connect]
-Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload1 async_connect]``(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- RangeConnectHandler && handler,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_connect.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload2 async_connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- IteratorConnectHandler && handler,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_connect.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload3 async_connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- IteratorConnectHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_connect.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
- typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload4 async_connect]``(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- ConnectCondition connect_condition,
- RangeConnectHandler && handler,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_connect.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload5 async_connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- ConnectCondition connect_condition,
- IteratorConnectHandler && handler,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_connect.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_connect.overload6 async_connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- ConnectCondition connect_condition,
- IteratorConnectHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_connect.overload6 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/connect.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 async_connect (1 of 6 overloads)]
-
-
-Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- RangeConnectHandler && handler,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `async_connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[endpoints][A sequence of endpoints.]]
-
-[[handler][The handler to be called when the connect operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation. if the sequence is empty, set to
- // asio::error::not_found. Otherwise, contains the
- // error from the last connection attempt.
- const asio::error_code& error,
-
- // On success, the successfully connected endpoint.
- // Otherwise, a default-constructed endpoint.
- const typename Protocol::endpoint& endpoint
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
-
- // ...
-
- r.async_resolve(q, resolve_handler);
-
- // ...
-
- void resolve_handler(
- const asio::error_code& ec,
- tcp::resolver::results_type results)
- {
- if (!ec)
- {
- asio::async_connect(s, results, connect_handler);
- }
- }
-
- // ...
-
- void connect_handler(
- const asio::error_code& ec,
- const tcp::endpoint& endpoint)
- {
- // ...
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 async_connect (2 of 6 overloads)]
-
-
-(Deprecated.) Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- IteratorConnectHandler && handler,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `async_connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[handler][The handler to be called when the connect operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation. if the sequence is empty, set to
- // asio::error::not_found. Otherwise, contains the
- // error from the last connection attempt.
- const asio::error_code& error,
-
- // On success, an iterator denoting the successfully
- // connected endpoint. Otherwise, the end iterator.
- Iterator iterator
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-This overload assumes that a default constructed object of type `Iterator` represents the end of the sequence. This is a valid assumption for iterator types such as `asio::ip::tcp::resolver::iterator`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 async_connect (3 of 6 overloads)]
-
-
-Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- IteratorConnectHandler && handler);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `async_connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[end][An iterator pointing to the end of a sequence of endpoints.]]
-
-[[handler][The handler to be called when the connect operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation. if the sequence is empty, set to
- // asio::error::not_found. Otherwise, contains the
- // error from the last connection attempt.
- const asio::error_code& error,
-
- // On success, an iterator denoting the successfully
- // connected endpoint. Otherwise, the end iterator.
- Iterator iterator
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- std::vector<tcp::endpoint> endpoints = ...;
- tcp::socket s(io_context);
- asio::async_connect(s,
- endpoints.begin(), endpoints.end(),
- connect_handler);
-
- // ...
-
- void connect_handler(
- const asio::error_code& ec,
- std::vector<tcp::endpoint>::iterator i)
- {
- // ...
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 async_connect (4 of 6 overloads)]
-
-
-Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
- typename ``[link asio.reference.RangeConnectHandler RangeConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- ConnectCondition connect_condition,
- RangeConnectHandler && handler,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `async_connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[endpoints][A sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-[[handler][The handler to be called when the connect operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation. if the sequence is empty, set to
- // asio::error::not_found. Otherwise, contains the
- // error from the last connection attempt.
- const asio::error_code& error,
-
- // On success, an iterator denoting the successfully
- // connected endpoint. Otherwise, the end iterator.
- Iterator iterator
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-The following connect condition function object can be used to output information about the individual connection attempts:
-
- struct my_connect_condition
- {
- bool operator()(
- const asio::error_code& ec,
- const::tcp::endpoint& next)
- {
- if (ec) std::cout << "Error: " << ec.message() << std::endl;
- std::cout << "Trying: " << next << std::endl;
- return true;
- }
- };
-
-
-It would be used with the `asio::connect` function as follows:
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
-
- // ...
-
- r.async_resolve(q, resolve_handler);
-
- // ...
-
- void resolve_handler(
- const asio::error_code& ec,
- tcp::resolver::results_type results)
- {
- if (!ec)
- {
- asio::async_connect(s, results,
- my_connect_condition(),
- connect_handler);
- }
- }
-
- // ...
-
- void connect_handler(
- const asio::error_code& ec,
- const tcp::endpoint& endpoint)
- {
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- std::cout << "Connected to: " << endpoint << std::endl;
- }
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 async_connect (5 of 6 overloads)]
-
-
-(Deprecated.) Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- ConnectCondition connect_condition,
- IteratorConnectHandler && handler,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `async_connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-[[handler][The handler to be called when the connect operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation. if the sequence is empty, set to
- // asio::error::not_found. Otherwise, contains the
- // error from the last connection attempt.
- const asio::error_code& error,
-
- // On success, an iterator denoting the successfully
- // connected endpoint. Otherwise, the end iterator.
- Iterator iterator
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-This overload assumes that a default constructed object of type `Iterator` represents the end of the sequence. This is a valid assumption for iterator types such as `asio::ip::tcp::resolver::iterator`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 async_connect (6 of 6 overloads)]
-
-
-Asynchronously establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``,
- typename ``[link asio.reference.IteratorConnectHandler IteratorConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- ConnectCondition connect_condition,
- IteratorConnectHandler && handler);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `async_connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[end][An iterator pointing to the end of a sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-[[handler][The handler to be called when the connect operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation. if the sequence is empty, set to
- // asio::error::not_found. Otherwise, contains the
- // error from the last connection attempt.
- const asio::error_code& error,
-
- // On success, an iterator denoting the successfully
- // connected endpoint. Otherwise, the end iterator.
- Iterator iterator
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-The following connect condition function object can be used to output information about the individual connection attempts:
-
- struct my_connect_condition
- {
- bool operator()(
- const asio::error_code& ec,
- const::tcp::endpoint& next)
- {
- if (ec) std::cout << "Error: " << ec.message() << std::endl;
- std::cout << "Trying: " << next << std::endl;
- return true;
- }
- };
-
-
-It would be used with the `asio::connect` function as follows:
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
-
- // ...
-
- r.async_resolve(q, resolve_handler);
-
- // ...
-
- void resolve_handler(
- const asio::error_code& ec,
- tcp::resolver::iterator i)
- {
- if (!ec)
- {
- tcp::resolver::iterator end;
- asio::async_connect(s, i, end,
- my_connect_condition(),
- connect_handler);
- }
- }
-
- // ...
-
- void connect_handler(
- const asio::error_code& ec,
- tcp::resolver::iterator i)
- {
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- std::cout << "Connected to: " << i->endpoint() << std::endl;
- }
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_read async_read]
-
-[indexterm1 asio.indexterm.async_read..async_read]
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload1 async_read]``(
- AsyncReadStream & s,
- const MutableBufferSequence & buffers,
- ReadHandler && handler,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_read.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload2 async_read]``(
- AsyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- ReadHandler && handler,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_read.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload3 async_read]``(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- ReadHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_read.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload4 async_read]``(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- ReadHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_read.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload5 async_read]``(
- AsyncReadStream & s,
- basic_streambuf< Allocator > & b,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload6 async_read]``(
- AsyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read.overload6 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/read.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 async_read (1 of 6 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
- AsyncReadStream & s,
- const MutableBufferSequence & buffers,
- ReadHandler && handler,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes copied into the
- // buffers. If an error occurred,
- // this will be the number of
- // bytes successfully transferred
- // prior to the error.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_read(s, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::async_read(
- s, buffers,
- asio::transfer_all(),
- handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 async_read (2 of 6 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
- AsyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- ReadHandler && handler,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's async\_read\_some function.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes copied into the
- // buffers. If an error occurred,
- // this will be the number of
- // bytes successfully transferred
- // prior to the error.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_read(s,
- asio::buffer(data, size),
- asio::transfer_at_least(32),
- handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 async_read (3 of 6 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- ReadHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The specified dynamic buffer sequence is full (that is, it has reached maximum size).
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes copied into the
- // buffers. If an error occurred,
- // this will be the number of
- // bytes successfully transferred
- // prior to the error.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::async_read(
- s, buffers,
- asio::transfer_all(),
- handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 async_read (4 of 6 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- ReadHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The specified dynamic buffer sequence is full (that is, it has reached maximum size).
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's async\_read\_some function.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes copied into the
- // buffers. If an error occurred,
- // this will be the number of
- // bytes successfully transferred
- // prior to the error.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 async_read (5 of 6 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
- AsyncReadStream & s,
- basic_streambuf< Allocator > & b,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes copied into the
- // buffers. If an error occurred,
- // this will be the number of
- // bytes successfully transferred
- // prior to the error.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::async_read(
- s, b,
- asio::transfer_all(),
- handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 async_read (6 of 6 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data from a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
- AsyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's async\_read\_some function.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes copied into the
- // buffers. If an error occurred,
- // this will be the number of
- // bytes successfully transferred
- // prior to the error.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_read_at async_read_at]
-
-[indexterm1 asio.indexterm.async_read_at..async_read_at]
-Start an asynchronous operation to read a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload1 async_read_at]``(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_at.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload2 async_read_at]``(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_at.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload3 async_read_at]``(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_at.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_at.overload4 async_read_at]``(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_at.overload4 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/read_at.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 async_read_at (1 of 4 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's async\_read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes copied into the buffers. If an error
- // occurred, this will be the number of bytes successfully
- // transferred prior to the error.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_read_at(d, 42, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::async_read_at(
- d, 42, buffers,
- asio::transfer_all(),
- handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 async_read_at (2 of 4 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_read_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the device's async\_read\_some\_at function.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes copied into the buffers. If an error
- // occurred, this will be the number of bytes successfully
- // transferred prior to the error.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_read_at(d, 42,
- asio::buffer(data, size),
- asio::transfer_at_least(32),
- handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 async_read_at (3 of 4 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's async\_read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes copied into the buffers. If an error
- // occurred, this will be the number of bytes successfully
- // transferred prior to the error.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::async_read_at(
- d, 42, b,
- asio::transfer_all(),
- handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 async_read_at (4 of 4 overloads)]
-
-
-Start an asynchronous operation to read a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessReadDevice AsyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_at(
- AsyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read a certain number of bytes of data from a random access device at the specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's async\_read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the AsyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_read_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the device's async\_read\_some\_at function.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes copied into the buffers. If an error
- // occurred, this will be the number of bytes successfully
- // transferred prior to the error.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_read_until async_read_until]
-
-[indexterm1 asio.indexterm.async_read_until..async_read_until]
-Start an asynchronous operation to read data into a dynamic buffer sequence, or into a streambuf, until it contains a delimiter, matches a regular expression, or a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload1 async_read_until]``(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- char delim,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload2 async_read_until]``(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- string_view delim,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload3 async_read_until]``(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- const boost::regex & expr,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename MatchCondition,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload4 async_read_until]``(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- MatchCondition match_condition,
- ReadHandler && handler,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload5 async_read_until]``(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- char delim,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload6 async_read_until]``(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- string_view delim,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload7 async_read_until]``(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename MatchCondition,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload8 async_read_until]``(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- MatchCondition match_condition,
- ReadHandler && handler,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_read_until.overload8 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/read_until.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 async_read_until (1 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a dynamic buffer sequence until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- char delim,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The get area of the dynamic buffer sequence contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the dynamic buffer sequence's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[delim][The delimiter character.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the dynamic buffer sequence's
- // get area up to and including the delimiter.
- // 0 if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the dynamic buffer sequence may contain additional data beyond the delimiter. An application will typically leave that data in the dynamic buffer sequence for a subsequent async\_read\_until operation to examine.
-
-
-[heading Example]
-
-To asynchronously read data into a `std::string` until a newline is encountered:
-
- std::string data;
- ...
- void handler(const asio::error_code& e, std::size_t size)
- {
- if (!e)
- {
- std::string line = data.substr(0, n);
- data.erase(0, n);
- ...
- }
- }
- ...
- asio::async_read_until(s, data, '\n', handler);
-
-
-After the `async_read_until` operation completes successfully, the buffer `data` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... }
-
-
-The call to `substr` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\n' }
-
-
-After the call to `erase`, the remaining data is left in the buffer `data` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 async_read_until (2 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a dynamic buffer sequence until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- string_view delim,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The get area of the dynamic buffer sequence contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the dynamic buffer sequence's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[delim][The delimiter string.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the dynamic buffer sequence's
- // get area up to and including the delimiter.
- // 0 if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the dynamic buffer sequence may contain additional data beyond the delimiter. An application will typically leave that data in the dynamic buffer sequence for a subsequent async\_read\_until operation to examine.
-
-
-[heading Example]
-
-To asynchronously read data into a `std::string` until a CR-LF sequence is encountered:
-
- std::string data;
- ...
- void handler(const asio::error_code& e, std::size_t size)
- {
- if (!e)
- {
- std::string line = data.substr(0, n);
- data.erase(0, n);
- ...
- }
- }
- ...
- asio::async_read_until(s, data, "\r\n", handler);
-
-
-After the `async_read_until` operation completes successfully, the string `data` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `substr` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-After the call to `erase`, the remaining data is left in the string `data` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 async_read_until (3 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a dynamic buffer sequence until some part of its data matches a regular expression.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- const boost::regex & expr,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains some data that matches a regular expression. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* A substring of the dynamic buffer sequence's get area matches the regular expression.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the dynamic buffer sequence's get area already contains data that matches the regular expression, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[expr][The regular expression.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the dynamic buffer
- // sequence's get area up to and including the
- // substring that matches the regular expression.
- // 0 if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the dynamic buffer sequence may contain additional data beyond that which matched the regular expression. An application will typically leave that data in the dynamic buffer sequence for a subsequent async\_read\_until operation to examine.
-
-
-[heading Example]
-
-To asynchronously read data into a `std::string` until a CR-LF sequence is encountered:
-
- std::string data;
- ...
- void handler(const asio::error_code& e, std::size_t size)
- {
- if (!e)
- {
- std::string line = data.substr(0, n);
- data.erase(0, n);
- ...
- }
- }
- ...
- asio::async_read_until(s, data,
- boost::regex("\r\n"), handler);
-
-
-After the `async_read_until` operation completes successfully, the string `data` contains the data which matched the regular expression:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `substr` then extracts the data up to and including the match, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-After the call to `erase`, the remaining data is left in the string `data` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 async_read_until (4 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a dynamic buffer sequence until a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename MatchCondition,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- DynamicBuffer && buffers,
- MatchCondition match_condition,
- ReadHandler && handler,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
-
-
-This function is used to asynchronously read data into the specified dynamic buffer sequence until a user-defined match condition function object, when applied to the data contained in the dynamic buffer sequence, indicates a successful match. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The match condition function object returns a std::pair where the second element evaluates to true.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the match condition function object already indicates a match, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
-``
- pair<iterator, bool> match_condition(iterator begin, iterator end);
-``
-where `iterator` represents the type:
-``
- buffers_iterator<typename DynamicBuffer::const_buffers_type>
-``
-The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the dynamic buffer sequence's
- // get area that have been fully consumed by the match
- // function. O if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the dynamic buffer sequence may contain additional data beyond that which matched the function object. An application will typically leave that data in the dynamic buffer sequence for a subsequent async\_read\_until operation to examine.
-
-The default implementation of the `is_match_condition` type trait evaluates to true for function pointers and function objects with a `result_type` typedef. It must be specialised for other user-defined function objects.
-
-
-[heading Examples]
-
-To asynchronously read data into a `std::string` until whitespace is encountered:
-
- typedef asio::buffers_iterator<
- asio::const_buffers_1> iterator;
-
- std::pair<iterator, bool>
- match_whitespace(iterator begin, iterator end)
- {
- iterator i = begin;
- while (i != end)
- if (std::isspace(*i++))
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
- ...
- void handler(const asio::error_code& e, std::size_t size);
- ...
- std::string data;
- asio::async_read_until(s, data, match_whitespace, handler);
-
-
-
-
-To asynchronously read data into a `std::string` until a matching character is found:
-
- class match_char
- {
- public:
- explicit match_char(char c) : c_(c) {}
-
- template <typename Iterator>
- std::pair<Iterator, bool> operator()(
- Iterator begin, Iterator end) const
- {
- Iterator i = begin;
- while (i != end)
- if (c_ == *i++)
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
-
- private:
- char c_;
- };
-
- namespace asio {
- template <> struct is_match_condition<match_char>
- : public boost::true_type {};
- } // namespace asio
- ...
- void handler(const asio::error_code& e, std::size_t size);
- ...
- std::string data;
- asio::async_read_until(s, data, match_char('a'), handler);
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 async_read_until (5 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a streambuf until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- char delim,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[delim][The delimiter character.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the streambuf's get
- // area up to and including the delimiter.
- // 0 if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the streambuf may contain additional data beyond the delimiter. An application will typically leave that data in the streambuf for a subsequent async\_read\_until operation to examine.
-
-
-[heading Example]
-
-To asynchronously read data into a streambuf until a newline is encountered:
-
- asio::streambuf b;
- ...
- void handler(const asio::error_code& e, std::size_t size)
- {
- if (!e)
- {
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
- ...
- }
- }
- ...
- asio::async_read_until(s, b, '\n', handler);
-
-
-After the `async_read_until` operation completes successfully, the buffer `b` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... }
-
-
-The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\n' }
-
-
-The remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 async_read_until (6 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a streambuf until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- string_view delim,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[delim][The delimiter string.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the streambuf's get
- // area up to and including the delimiter.
- // 0 if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the streambuf may contain additional data beyond the delimiter. An application will typically leave that data in the streambuf for a subsequent async\_read\_until operation to examine.
-
-
-[heading Example]
-
-To asynchronously read data into a streambuf until a newline is encountered:
-
- asio::streambuf b;
- ...
- void handler(const asio::error_code& e, std::size_t size)
- {
- if (!e)
- {
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
- ...
- }
- }
- ...
- asio::async_read_until(s, b, "\r\n", handler);
-
-
-After the `async_read_until` operation completes successfully, the buffer `b` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-The remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 async_read_until (7 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a streambuf until some part of its data matches a regular expression.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* A substring of the streambuf's get area matches the regular expression.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the streambuf's get area already contains data that matches the regular expression, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[expr][The regular expression.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the streambuf's get
- // area up to and including the substring
- // that matches the regular. expression.
- // 0 if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the streambuf may contain additional data beyond that which matched the regular expression. An application will typically leave that data in the streambuf for a subsequent async\_read\_until operation to examine.
-
-
-[heading Example]
-
-To asynchronously read data into a streambuf until a CR-LF sequence is encountered:
-
- asio::streambuf b;
- ...
- void handler(const asio::error_code& e, std::size_t size)
- {
- if (!e)
- {
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
- ...
- }
- }
- ...
- asio::async_read_until(s, b, boost::regex("\r\n"), handler);
-
-
-After the `async_read_until` operation completes successfully, the buffer `b` contains the data which matched the regular expression:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `std::getline` then extracts the data up to and including the match, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-The remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 async_read_until (8 of 8 overloads)]
-
-
-Start an asynchronous operation to read data into a streambuf until a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
- typename Allocator,
- typename MatchCondition,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
- AsyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- MatchCondition match_condition,
- ReadHandler && handler,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
-
-
-This function is used to asynchronously read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* The match condition function object returns a std::pair where the second element evaluates to true.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a ['composed operation]. If the match condition function object already indicates a match, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the AsyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
-``
- pair<iterator, bool> match_condition(iterator begin, iterator end);
-``
-where `iterator` represents the type:
-``
- buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
-``
-The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // The number of bytes in the streambuf's get
- // area that have been fully consumed by the
- // match function. O if an error occurred.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful async\_read\_until operation, the streambuf may contain additional data beyond that which matched the function object. An application will typically leave that data in the streambuf for a subsequent async\_read\_until operation to examine.
-
-The default implementation of the `is_match_condition` type trait evaluates to true for function pointers and function objects with a `result_type` typedef. It must be specialised for other user-defined function objects.
-
-
-[heading Examples]
-
-To asynchronously read data into a streambuf until whitespace is encountered:
-
- typedef asio::buffers_iterator<
- asio::streambuf::const_buffers_type> iterator;
-
- std::pair<iterator, bool>
- match_whitespace(iterator begin, iterator end)
- {
- iterator i = begin;
- while (i != end)
- if (std::isspace(*i++))
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
- ...
- void handler(const asio::error_code& e, std::size_t size);
- ...
- asio::streambuf b;
- asio::async_read_until(s, b, match_whitespace, handler);
-
-
-
-
-To asynchronously read data into a streambuf until a matching character is found:
-
- class match_char
- {
- public:
- explicit match_char(char c) : c_(c) {}
-
- template <typename Iterator>
- std::pair<Iterator, bool> operator()(
- Iterator begin, Iterator end) const
- {
- Iterator i = begin;
- while (i != end)
- if (c_ == *i++)
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
-
- private:
- char c_;
- };
-
- namespace asio {
- template <> struct is_match_condition<match_char>
- : public boost::true_type {};
- } // namespace asio
- ...
- void handler(const asio::error_code& e, std::size_t size);
- ...
- asio::streambuf b;
- asio::async_read_until(s, b, match_char('a'), handler);
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_result async_result]
-
-
-An interface for customising the behaviour of an initiating function.
-
-
- template<
- typename CompletionToken,
- typename Signature>
- class async_result
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.async_result.completion_handler_type [*completion_handler_type]]]
- [The concrete completion handler type for the specific signature. ]
-
- ]
-
- [
-
- [[link asio.reference.async_result.return_type [*return_type]]]
- [The return type of the initiating function. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.async_result.async_result [*async_result]]]
- [Construct an async result from a given handler. ]
- ]
-
- [
- [[link asio.reference.async_result.get [*get]]]
- [Obtain the value to be returned from the initiating function. ]
- ]
-
-]
-
-The [link asio.reference.async_result `async_result`] traits class is used for determining:
-
-
-* the concrete completion handler type to be called at the end of the asynchronous operation;
-
-
-* the initiating function return type; and
-
-
-* how the return value of the initiating function is obtained.
-
-The trait allows the handler and return types to be determined at the point where the specific completion handler signature is known.
-
-This template may be specialised for user-defined completion token types. The primary template assumes that the CompletionToken is the completion handler.
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_result async_result::async_result]
-
-[indexterm2 asio.indexterm.async_result.async_result..async_result..async_result]
-Construct an async result from a given handler.
-
-
- async_result(
- completion_handler_type & h);
-
-
-When using a specalised [link asio.reference.async_result `async_result`], the constructor has an opportunity to initialise some state associated with the completion handler, which is then returned from the initiating function.
-
-
-[endsect]
-
-
-
-[section:completion_handler_type async_result::completion_handler_type]
-
-[indexterm2 asio.indexterm.async_result.completion_handler_type..completion_handler_type..async_result]
-The concrete completion handler type for the specific signature.
-
-
- typedef CompletionToken completion_handler_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get async_result::get]
-
-[indexterm2 asio.indexterm.async_result.get..get..async_result]
-Obtain the value to be returned from the initiating function.
-
-
- return_type get();
-
-
-
-[endsect]
-
-
-
-[section:return_type async_result::return_type]
-
-[indexterm2 asio.indexterm.async_result.return_type..return_type..async_result]
-The return type of the initiating function.
-
-
- typedef void return_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:async_result_lt__Handler__gt_ async_result< Handler >]
-
-
-(Deprecated: Use two-parameter version of [link asio.reference.async_result `async_result`].) An interface for customising the behaviour of an initiating function.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- class async_result< Handler >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.async_result_lt__Handler__gt_.type [*type]]]
- [The return type of the initiating function. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.async_result_lt__Handler__gt_.async_result [*async_result]]]
- [Construct an async result from a given handler. ]
- ]
-
- [
- [[link asio.reference.async_result_lt__Handler__gt_.get [*get]]]
- [Obtain the value to be returned from the initiating function. ]
- ]
-
-]
-
-This template may be specialised for user-defined handler types.
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_result async_result< Handler >::async_result]
-
-[indexterm2 asio.indexterm.async_result_lt__Handler__gt_.async_result..async_result..async_result< Handler >]
-Construct an async result from a given handler.
-
-
- async_result(
- Handler & );
-
-
-When using a specalised [link asio.reference.async_result `async_result`], the constructor has an opportunity to initialise some state associated with the handler, which is then returned from the initiating function.
-
-
-[endsect]
-
-
-
-[section:get async_result< Handler >::get]
-
-[indexterm2 asio.indexterm.async_result_lt__Handler__gt_.get..get..async_result< Handler >]
-Obtain the value to be returned from the initiating function.
-
-
- type get();
-
-
-
-[endsect]
-
-
-
-[section:type async_result< Handler >::type]
-
-[indexterm2 asio.indexterm.async_result_lt__Handler__gt_.type..type..async_result< Handler >]
-The return type of the initiating function.
-
-
- typedef void type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/async_result.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_ async_result< std::packaged_task< Result(Args...)>, Signature >]
-
-
-Partial specialisation of `async_result` for `std::packaged_task`.
-
-
- template<
- typename Result,
- typename... Args,
- typename Signature>
- class async_result< std::packaged_task< Result(Args...)>, Signature >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.completion_handler_type [*completion_handler_type]]]
- [The packaged task is the concrete completion handler type. ]
-
- ]
-
- [
-
- [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.return_type [*return_type]]]
- [The return type of the initiating function is the future obtained from the packaged task. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.async_result [*async_result]]]
- [The constructor extracts the future from the packaged task. ]
- ]
-
- [
- [[link asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.get [*get]]]
- [Returns the packaged task's future. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/packaged_task.hpp]
-
-['Convenience header: ]None
-
-
-[section:async_result async_result< std::packaged_task< Result(Args...)>, Signature >::async_result]
-
-[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.async_result..async_result..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >]
-The constructor extracts the future from the packaged task.
-
-
- async_result(
- completion_handler_type & h);
-
-
-
-[endsect]
-
-
-
-[section:completion_handler_type async_result< std::packaged_task< Result(Args...)>, Signature >::completion_handler_type]
-
-[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.completion_handler_type..completion_handler_type..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >]
-The packaged task is the concrete completion handler type.
-
-
- typedef std::packaged_task< Result(Args...)> completion_handler_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/packaged_task.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[section:get async_result< std::packaged_task< Result(Args...)>, Signature >::get]
-
-[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.get..get..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >]
-Returns the packaged task's future.
-
-
- return_type get();
-
-
-
-[endsect]
-
-
-
-[section:return_type async_result< std::packaged_task< Result(Args...)>, Signature >::return_type]
-
-[indexterm2 asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.return_type..return_type..async_result< std::packaged_task< Result(Args\.\.\.)>, Signature >]
-The return type of the initiating function is the future obtained from the packaged task.
-
-
- typedef std::future< Result > return_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/packaged_task.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:async_write async_write]
-
-[indexterm1 asio.indexterm.async_write..async_write]
-Start an asynchronous operation to write a certain amount of data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload1 async_write]``(
- AsyncWriteStream & s,
- const ConstBufferSequence & buffers,
- WriteHandler && handler,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_write.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload2 async_write]``(
- AsyncWriteStream & s,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- WriteHandler && handler,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_write.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload3 async_write]``(
- AsyncWriteStream & s,
- DynamicBuffer && buffers,
- WriteHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_write.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload4 async_write]``(
- AsyncWriteStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- WriteHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.async_write.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload5 async_write]``(
- AsyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_write.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload6 async_write]``(
- AsyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_write.overload6 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/write.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 async_write (1 of 6 overloads)]
-
-
-Start an asynchronous operation to write all of the supplied data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
- AsyncWriteStream & s,
- const ConstBufferSequence & buffers,
- WriteHandler && handler,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]]
-
-[[buffers][One or more buffers containing the data to be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes written from the
- // buffers. If an error occurred,
- // this will be less than the sum
- // of the buffer sizes.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_write(s, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 async_write (2 of 6 overloads)]
-
-
-Start an asynchronous operation to write a certain amount of data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
- AsyncWriteStream & s,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- WriteHandler && handler,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]]
-
-[[buffers][One or more buffers containing the data to be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's async\_write\_some function.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes written from the
- // buffers. If an error occurred,
- // this will be less than the sum
- // of the buffer sizes.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_write(s,
- asio::buffer(data, size),
- asio::transfer_at_least(32),
- handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 async_write (3 of 6 overloads)]
-
-
-Start an asynchronous operation to write all of the supplied data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
- AsyncWriteStream & s,
- DynamicBuffer && buffers,
- WriteHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied dynamic buffer sequence has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]]
-
-[[buffers][The dynamic buffer sequence from which data will be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. Successfully written data is automatically consumed from the buffers.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes written from the
- // buffers. If an error occurred,
- // this will be less than the sum
- // of the buffer sizes.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 async_write (4 of 6 overloads)]
-
-
-Start an asynchronous operation to write a certain amount of data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
- AsyncWriteStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- WriteHandler && handler,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied dynamic buffer sequence has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]]
-
-[[buffers][The dynamic buffer sequence from which data will be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. Successfully written data is automatically consumed from the buffers.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's async\_write\_some function.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes written from the
- // buffers. If an error occurred,
- // this will be less than the sum
- // of the buffer sizes.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 async_write (5 of 6 overloads)]
-
-
-Start an asynchronous operation to write all of the supplied data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
- AsyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes written from the
- // buffers. If an error occurred,
- // this will be less than the sum
- // of the buffer sizes.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 async_write (6 of 6 overloads)]
-
-
-Start an asynchronous operation to write a certain amount of data to a stream.
-
-
- template<
- typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
- AsyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a ['composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the AsyncWriteStream concept.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's async\_write\_some function.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
-
- std::size_t bytes_transferred // Number of bytes written from the
- // buffers. If an error occurred,
- // this will be less than the sum
- // of the buffer sizes.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_write_at async_write_at]
-
-[indexterm1 asio.indexterm.async_write_at..async_write_at]
-Start an asynchronous operation to write a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload1 async_write_at]``(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_write_at.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload2 async_write_at]``(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_write_at.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload3 async_write_at]``(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_write_at.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write_at.overload4 async_write_at]``(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.async_write_at.overload4 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/write_at.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 async_write_at (1 of 4 overloads)]
-
-
-Start an asynchronous operation to write all of the supplied data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's async\_write\_some\_at function, and is known as a ['composed operation]. The program must ensure that the device performs no ['overlapping] write operations (such as async\_write\_at, the device's async\_write\_some\_at function, or any other composed operations that perform writes) until this operation completes. Operations are overlapping if the regions defined by their offsets, and the numbers of bytes to write, intersect.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more buffers containing the data to be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes written from the buffers. If an error
- // occurred, this will be less than the sum of the buffer sizes.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_write_at(d, 42, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 async_write_at (2 of 4 overloads)]
-
-
-Start an asynchronous operation to write a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's async\_write\_some\_at function, and is known as a ['composed operation]. The program must ensure that the device performs no ['overlapping] write operations (such as async\_write\_at, the device's async\_write\_some\_at function, or any other composed operations that perform writes) until this operation completes. Operations are overlapping if the regions defined by their offsets, and the numbers of bytes to write, intersect.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more buffers containing the data to be written. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_write_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the device's async\_write\_some\_at function.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes written from the buffers. If an error
- // occurred, this will be less than the sum of the buffer sizes.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::async_write_at(d, 42,
- asio::buffer(data, size),
- asio::transfer_at_least(32),
- handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 async_write_at (3 of 4 overloads)]
-
-
-Start an asynchronous operation to write all of the supplied data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's async\_write\_some\_at function, and is known as a ['composed operation]. The program must ensure that the device performs no ['overlapping] write operations (such as async\_write\_at, the device's async\_write\_some\_at function, or any other composed operations that perform writes) until this operation completes. Operations are overlapping if the regions defined by their offsets, and the numbers of bytes to write, intersect.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes written from the buffers. If an error
- // occurred, this will be less than the sum of the buffer sizes.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 async_write_at (4 of 4 overloads)]
-
-
-Start an asynchronous operation to write a certain amount of data at the specified offset.
-
-
- template<
- typename ``[link asio.reference.AsyncRandomAccessWriteDevice AsyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_at(
- AsyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write a certain number of bytes of data to a random access device at a specified offset. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's async\_write\_some\_at function, and is known as a ['composed operation]. The program must ensure that the device performs no ['overlapping] write operations (such as async\_write\_at, the device's async\_write\_some\_at function, or any other composed operations that perform writes) until this operation completes. Operations are overlapping if the regions defined by their offsets, and the numbers of bytes to write, intersect.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the AsyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[b][A [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written. Ownership of the streambuf is retained by the caller, which must guarantee that it remains valid until the handler is called.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest async_write_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the device's async\_write\_some\_at function.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- // Result of operation.
- const asio::error_code& error,
-
- // Number of bytes written from the buffers. If an error
- // occurred, this will be less than the sum of the buffer sizes.
- std::size_t bytes_transferred
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bad_executor bad_executor]
-
-
-Exception thrown when trying to access an empty polymorphic executor.
-
-
- class bad_executor :
- public std::exception
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.bad_executor.bad_executor [*bad_executor]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.bad_executor.what [*what]]]
- [Obtain message associated with exception. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:bad_executor bad_executor::bad_executor]
-
-[indexterm2 asio.indexterm.bad_executor.bad_executor..bad_executor..bad_executor]
-Constructor.
-
-
- bad_executor();
-
-
-
-[endsect]
-
-
-
-[section:what bad_executor::what]
-
-[indexterm2 asio.indexterm.bad_executor.what..what..bad_executor]
-Obtain message associated with exception.
-
-
- virtual const char * what() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_datagram_socket basic_datagram_socket]
-
-
-Provides datagram-oriented socket functionality.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_datagram_socket :
- public basic_socket< Protocol >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
- [Construct a basic_datagram_socket without opening it.
-
- Construct and open a basic_datagram_socket.
-
- Construct a basic_datagram_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_datagram_socket on an existing native socket.
-
- Move-construct a basic_datagram_socket from another.
-
- Move-construct a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_datagram_socket from another.
-
- Move-assign a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
- [Receive a datagram with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send_to [*send_to]]]
- [Send a datagram to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_datagram_socket `basic_datagram_socket`] class template provides asynchronous and blocking datagram-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign basic_datagram_socket::assign]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.assign..assign..basic_datagram_socket]
-Assign an existing native socket to the socket.
-
-
- void ``[link asio.reference.basic_datagram_socket.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.assign.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.assign.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::assign (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::assign (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_connect basic_datagram_socket::async_connect]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.async_connect..async_connect..basic_datagram_socket]
-Start an asynchronous connect.
-
-
- template<
- typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- const endpoint_type & peer_endpoint,
- ConnectHandler && handler);
-
-
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void connect_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Connect succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:async_receive basic_datagram_socket::async_receive]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.async_receive..async_receive..basic_datagram_socket]
-Start an asynchronous receive on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive.overload1 async_receive]``(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive.overload2 async_receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_receive.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::async_receive (1 of 2 overloads)]
-
-
-Start an asynchronous receive on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the datagram socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected datagram socket.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::async_receive (2 of 2 overloads)]
-
-
-Start an asynchronous receive on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the datagram socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected datagram socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_receive_from basic_datagram_socket::async_receive_from]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.async_receive_from..async_receive_from..basic_datagram_socket]
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive_from.overload1 async_receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_receive_from.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_receive_from.overload2 async_receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_receive_from.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::async_receive_from (1 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive a datagram. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive_from(
- asio::buffer(data, size), sender_endpoint, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::async_receive_from (2 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive a datagram. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_send basic_datagram_socket::async_send]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.async_send..async_send..basic_datagram_socket]
-Start an asynchronous send on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send.overload1 async_send]``(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send.overload2 async_send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_send.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::async_send (1 of 2 overloads)]
-
-
-Start an asynchronous send on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send data on the datagram socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected datagram socket.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_send(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::async_send (2 of 2 overloads)]
-
-
-Start an asynchronous send on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send data on the datagram socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected datagram socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_send_to basic_datagram_socket::async_send_to]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.async_send_to..async_send_to..basic_datagram_socket]
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send_to.overload1 async_send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_send_to.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_datagram_socket.async_send_to.overload2 async_send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.async_send_to.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::async_send_to (1 of 2 overloads)]
-
-
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send a datagram to the specified remote endpoint. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[destination][The remote endpoint to which the data will be sent. Copies will be made of the endpoint as required.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::ip::udp::endpoint destination(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_send_to(
- asio::buffer(data, size), destination, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::async_send_to (2 of 2 overloads)]
-
-
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send a datagram to the specified remote endpoint. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[destination][The remote endpoint to which the data will be sent. Copies will be made of the endpoint as required.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait basic_datagram_socket::async_wait]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.async_wait..async_wait..basic_datagram_socket]
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:at_mark basic_datagram_socket::at_mark]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.at_mark..at_mark..basic_datagram_socket]
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool ``[link asio.reference.basic_datagram_socket.at_mark.overload1 at_mark]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.at_mark.overload1 more...]]``
-
- bool ``[link asio.reference.basic_datagram_socket.at_mark.overload2 at_mark]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.at_mark.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::at_mark (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark() const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::at_mark (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark(
- asio::error_code & ec) const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:available basic_datagram_socket::available]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.available..available..basic_datagram_socket]
-Determine the number of bytes available for reading.
-
-
- std::size_t ``[link asio.reference.basic_datagram_socket.available.overload1 available]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.available.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_datagram_socket.available.overload2 available]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.available.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::available (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available() const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::available (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available(
- asio::error_code & ec) const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_datagram_socket basic_datagram_socket::basic_datagram_socket]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.basic_datagram_socket..basic_datagram_socket..basic_datagram_socket]
-Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] without opening it.
-
-
- explicit ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload1 basic_datagram_socket]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.basic_datagram_socket `basic_datagram_socket`].
-
-
- ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload2 basic_datagram_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload2 more...]]``
-
-
-Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`], opening it and binding it to the given local endpoint.
-
-
- ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload3 basic_datagram_socket]``(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] on an existing native socket.
-
-
- ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload4 basic_datagram_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from another.
-
-
- ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload5 basic_datagram_socket]``(
- basic_datagram_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload5 more...]]``
-
-
-Move-construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- ``[link asio.reference.basic_datagram_socket.basic_datagram_socket.overload6 basic_datagram_socket]``(
- basic_datagram_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.basic_datagram_socket.overload6 more...]]``
-
-
-[section:overload1 basic_datagram_socket::basic_datagram_socket (1 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] without opening it.
-
-
- basic_datagram_socket(
- asio::io_context & io_context);
-
-
-This constructor creates a datagram socket without opening it. The `open()` function must be called before data can be sent or received on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the datagram socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::basic_datagram_socket (2 of 6 overloads)]
-
-
-Construct and open a [link asio.reference.basic_datagram_socket `basic_datagram_socket`].
-
-
- basic_datagram_socket(
- asio::io_context & io_context,
- const protocol_type & protocol);
-
-
-This constructor creates and opens a datagram socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the datagram socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::basic_datagram_socket (3 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`], opening it and binding it to the given local endpoint.
-
-
- basic_datagram_socket(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
-
-
-This constructor creates a datagram socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the datagram socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[endpoint][An endpoint on the local machine to which the datagram socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_datagram_socket::basic_datagram_socket (4 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] on an existing native socket.
-
-
- basic_datagram_socket(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-This constructor creates a datagram socket object to hold an existing native socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the datagram socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_socket][The new underlying socket implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_datagram_socket::basic_datagram_socket (5 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from another.
-
-
- basic_datagram_socket(
- basic_datagram_socket && other);
-
-
-This constructor moves a datagram socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_datagram_socket `basic_datagram_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_datagram_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_datagram_socket::basic_datagram_socket (6 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- basic_datagram_socket(
- basic_datagram_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
-
-
-This constructor moves a datagram socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_datagram_socket `basic_datagram_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_datagram_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_datagram_socket::bind]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.bind..bind..basic_datagram_socket]
-Bind the socket to the given local endpoint.
-
-
- void ``[link asio.reference.basic_datagram_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.bind.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.bind.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::bind (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::bind (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint,
- asio::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- asio::error_code ec;
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_datagram_socket::broadcast]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.broadcast..broadcast..basic_datagram_socket]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable basic_datagram_socket::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.bytes_readable..bytes_readable..basic_datagram_socket]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_datagram_socket::cancel]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.cancel..cancel..basic_datagram_socket]
-Cancel all asynchronous operations associated with the socket.
-
-
- void ``[link asio.reference.basic_datagram_socket.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.cancel.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_datagram_socket::close]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.close..close..basic_datagram_socket]
-Close the socket.
-
-
- void ``[link asio.reference.basic_datagram_socket.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.close.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.close.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::close (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close();
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:connect basic_datagram_socket::connect]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.connect..connect..basic_datagram_socket]
-Connect the socket to the specified endpoint.
-
-
- void ``[link asio.reference.basic_datagram_socket.connect.overload1 connect]``(
- const endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.connect.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.connect.overload2 connect]``(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.connect.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::connect (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.connect(endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::connect (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- asio::error_code ec;
- socket.connect(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:debug basic_datagram_socket::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.debug..debug..basic_datagram_socket]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_datagram_socket::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.do_not_route..do_not_route..basic_datagram_socket]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_datagram_socket::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.enable_connection_aborted..enable_connection_aborted..basic_datagram_socket]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_datagram_socket::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.endpoint_type..endpoint_type..basic_datagram_socket]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_datagram_socket::executor_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.executor_type..executor_type..basic_datagram_socket]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_datagram_socket::get_executor]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.get_executor..get_executor..basic_datagram_socket]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_datagram_socket::get_io_context]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.get_io_context..get_io_context..basic_datagram_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_datagram_socket::get_io_service]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.get_io_service..get_io_service..basic_datagram_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_datagram_socket::get_option]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.get_option..get_option..basic_datagram_socket]
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_datagram_socket.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_datagram_socket.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::get_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option,
- asio::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- asio::error_code ec;
- socket.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:io_control basic_datagram_socket::io_control]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.io_control..io_control..basic_datagram_socket]
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_datagram_socket.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_datagram_socket.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- asio::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open basic_datagram_socket::is_open]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.is_open..is_open..basic_datagram_socket]
-Determine whether the socket is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_datagram_socket::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.keep_alive..keep_alive..basic_datagram_socket]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_datagram_socket::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.linger..linger..basic_datagram_socket]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:local_endpoint basic_datagram_socket::local_endpoint]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.local_endpoint..local_endpoint..basic_datagram_socket]
-Get the local endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_datagram_socket.local_endpoint.overload1 local_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.local_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_datagram_socket.local_endpoint.overload2 local_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::local_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer basic_datagram_socket::lowest_layer]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.lowest_layer..lowest_layer..basic_datagram_socket]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.basic_datagram_socket.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.basic_datagram_socket.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_datagram_socket::lowest_layer_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.lowest_layer_type..lowest_layer_type..basic_datagram_socket]
-A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer.
-
-
- typedef basic_socket< Protocol > lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it.
-
- Construct and open a basic_socket.
-
- Construct a basic_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_socket on an existing native socket.
-
- Move-construct a basic_socket from another.
-
- Move-construct a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket from another.
-
- Move-assign a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections basic_datagram_socket::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.max_connections..max_connections..basic_datagram_socket]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections basic_datagram_socket::max_listen_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.max_listen_connections..max_listen_connections..basic_datagram_socket]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_datagram_socket::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.message_do_not_route..message_do_not_route..basic_datagram_socket]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_datagram_socket::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.message_end_of_record..message_end_of_record..basic_datagram_socket]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_datagram_socket::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.message_flags..message_flags..basic_datagram_socket]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_datagram_socket::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.message_out_of_band..message_out_of_band..basic_datagram_socket]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_datagram_socket::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.message_peek..message_peek..basic_datagram_socket]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_datagram_socket::native_handle]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.native_handle..native_handle..basic_datagram_socket]
-Get the native socket representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_datagram_socket::native_handle_type]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.native_handle_type..native_handle_type..basic_datagram_socket]
-The native representation of a socket.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_datagram_socket::native_non_blocking]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.native_non_blocking..native_non_blocking..basic_datagram_socket]
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool ``[link asio.reference.basic_datagram_socket.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void ``[link asio.reference.basic_datagram_socket.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_datagram_socket::native_non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native socket. This mode has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying socket is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the socket object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native socket.
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::native_non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::native_non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_datagram_socket::non_blocking]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.non_blocking..non_blocking..basic_datagram_socket]
-Gets the non-blocking mode of the socket.
-
-
- bool ``[link asio.reference.basic_datagram_socket.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket.
-
-
- void ``[link asio.reference.basic_datagram_socket.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_datagram_socket::non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the socket.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_datagram_socket::open]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.open..open..basic_datagram_socket]
-Open the socket using the specified protocol.
-
-
- void ``[link asio.reference.basic_datagram_socket.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.open.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.open.overload2 open]``(
- const protocol_type & protocol,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.open.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::open (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::open (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol,
- asio::error_code & ec);
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::error_code ec;
- socket.open(asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq_ basic_datagram_socket::operator=]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.operator_eq_..operator=..basic_datagram_socket]
-Move-assign a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from another.
-
-
- basic_datagram_socket & ``[link asio.reference.basic_datagram_socket.operator_eq_.overload1 operator=]``(
- basic_datagram_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.operator_eq_.overload1 more...]]``
-
-
-Move-assign a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_datagram_socket >::type & ``[link asio.reference.basic_datagram_socket.operator_eq_.overload2 operator=]``(
- basic_datagram_socket< Protocol1 > && other);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::operator= (1 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from another.
-
-
- basic_datagram_socket & operator=(
- basic_datagram_socket && other);
-
-
-This assignment operator moves a datagram socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_datagram_socket `basic_datagram_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_datagram_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::operator= (2 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_datagram_socket `basic_datagram_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_datagram_socket >::type & operator=(
- basic_datagram_socket< Protocol1 > && other);
-
-
-This assignment operator moves a datagram socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_datagram_socket `basic_datagram_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_datagram_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol_type basic_datagram_socket::protocol_type]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.protocol_type..protocol_type..basic_datagram_socket]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:receive basic_datagram_socket::receive]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.receive..receive..basic_datagram_socket]
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.receive.overload1 receive]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.receive.overload2 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.receive.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.receive.overload3 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.receive.overload3 more...]]``
-
-
-[section:overload1 basic_datagram_socket::receive (1 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers);
-
-
-This function is used to receive data on the datagram socket. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected datagram socket.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.receive(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::receive (2 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to receive data on the datagram socket. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected datagram socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::receive (3 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to receive data on the datagram socket. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Remarks]
-
-The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected datagram socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:receive_buffer_size basic_datagram_socket::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.receive_buffer_size..receive_buffer_size..basic_datagram_socket]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:receive_from basic_datagram_socket::receive_from]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.receive_from..receive_from..basic_datagram_socket]
-Receive a datagram with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.receive_from.overload1 receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.receive_from.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.receive_from.overload2 receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.receive_from.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.receive_from.overload3 receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.receive_from.overload3 more...]]``
-
-
-[section:overload1 basic_datagram_socket::receive_from (1 of 3 overloads)]
-
-
-Receive a datagram with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint);
-
-
-This function is used to receive a datagram. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::ip::udp::endpoint sender_endpoint;
- socket.receive_from(
- asio::buffer(data, size), sender_endpoint);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::receive_from (2 of 3 overloads)]
-
-
-Receive a datagram with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags);
-
-
-This function is used to receive a datagram. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::receive_from (3 of 3 overloads)]
-
-
-Receive a datagram with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to receive a datagram. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the datagram.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:receive_low_watermark basic_datagram_socket::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.receive_low_watermark..receive_low_watermark..basic_datagram_socket]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remote_endpoint basic_datagram_socket::remote_endpoint]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.remote_endpoint..remote_endpoint..basic_datagram_socket]
-Get the remote endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_datagram_socket.remote_endpoint.overload1 remote_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.remote_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_datagram_socket.remote_endpoint.overload2 remote_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.remote_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::remote_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint() const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::remote_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:reuse_address basic_datagram_socket::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.reuse_address..reuse_address..basic_datagram_socket]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:send basic_datagram_socket::send]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.send..send..basic_datagram_socket]
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.send.overload1 send]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.send.overload2 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.send.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.send.overload3 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.send.overload3 more...]]``
-
-
-[section:overload1 basic_datagram_socket::send (1 of 3 overloads)]
-
-
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers);
-
-
-This function is used to send data on the datagram socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One ore more data buffers to be sent on the socket.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected datagram socket.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.send(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::send (2 of 3 overloads)]
-
-
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to send data on the datagram socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One ore more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected datagram socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::send (3 of 3 overloads)]
-
-
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to send data on the datagram socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Remarks]
-
-The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected datagram socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:send_buffer_size basic_datagram_socket::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.send_buffer_size..send_buffer_size..basic_datagram_socket]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_datagram_socket::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.send_low_watermark..send_low_watermark..basic_datagram_socket]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_datagram_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:send_to basic_datagram_socket::send_to]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.send_to..send_to..basic_datagram_socket]
-Send a datagram to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.send_to.overload1 send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.send_to.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.send_to.overload2 send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.send_to.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_datagram_socket.send_to.overload3 send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.send_to.overload3 more...]]``
-
-
-[section:overload1 basic_datagram_socket::send_to (1 of 3 overloads)]
-
-
-Send a datagram to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination);
-
-
-This function is used to send a datagram to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint.]]
-
-[[destination][The remote endpoint to which the data will be sent.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::ip::udp::endpoint destination(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.send_to(asio::buffer(data, size), destination);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::send_to (2 of 3 overloads)]
-
-
-Send a datagram to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags);
-
-
-This function is used to send a datagram to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint.]]
-
-[[destination][The remote endpoint to which the data will be sent.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_datagram_socket::send_to (3 of 3 overloads)]
-
-
-Send a datagram to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to send a datagram to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint.]]
-
-[[destination][The remote endpoint to which the data will be sent.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_option basic_datagram_socket::set_option]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.set_option..set_option..basic_datagram_socket]
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_datagram_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_datagram_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::set_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::set_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- asio::error_code ec;
- socket.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:shutdown basic_datagram_socket::shutdown]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.shutdown..shutdown..basic_datagram_socket]
-Disable sends or receives on the socket.
-
-
- void ``[link asio.reference.basic_datagram_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.shutdown.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.shutdown.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::shutdown (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what,
- asio::error_code & ec);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_datagram_socket::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type..shutdown_type..basic_datagram_socket]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_datagram_socket]
-[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type.shutdown_send..shutdown_send..basic_datagram_socket]
-[indexterm2 asio.indexterm.basic_datagram_socket.shutdown_type.shutdown_both..shutdown_both..basic_datagram_socket]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:wait basic_datagram_socket::wait]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.wait..wait..basic_datagram_socket]
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.basic_datagram_socket.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_datagram_socket.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_datagram_socket.wait.overload2 more...]]``
-
-
-[section:overload1 basic_datagram_socket::wait (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.wait(asio::ip::tcp::socket::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_datagram_socket::wait (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.wait(asio::ip::tcp::socket::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_datagram_socket::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_datagram_socket.wait_type..wait_type..basic_datagram_socket]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.basic_datagram_socket.wait_type.wait_read..wait_read..basic_datagram_socket]
-[indexterm2 asio.indexterm.basic_datagram_socket.wait_type.wait_write..wait_write..basic_datagram_socket]
-[indexterm2 asio.indexterm.basic_datagram_socket.wait_type.wait_error..wait_error..basic_datagram_socket]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_basic_datagram_socket basic_datagram_socket::~basic_datagram_socket]
-
-[indexterm2 asio.indexterm.basic_datagram_socket._basic_datagram_socket..~basic_datagram_socket..basic_datagram_socket]
-Destroys the socket.
-
-
- ~basic_datagram_socket();
-
-
-This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_deadline_timer basic_deadline_timer]
-
-
-Provides waitable timer functionality.
-
-
- template<
- typename Time,
- typename ``[link asio.reference.TimeTraits TimeTraits]`` = asio::time_traits<Time>>
- class basic_deadline_timer
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_deadline_timer.duration_type [*duration_type]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_deadline_timer.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_deadline_timer.time_type [*time_type]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_deadline_timer.traits_type [*traits_type]]]
- [The time traits type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_deadline_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.basic_deadline_timer [*basic_deadline_timer]]]
- [Constructor.
-
- Constructor to set a particular expiry time as an absolute time.
-
- Constructor to set a particular expiry time relative to now.
-
- Move-construct a basic_deadline_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.cancel_one [*cancel_one]]]
- [Cancels one asynchronous operation that is waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.expires_at [*expires_at]]]
- [Get the timer's expiry time as an absolute time.
-
- Set the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.expires_from_now [*expires_from_now]]]
- [Get the timer's expiry time relative to now.
-
- Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.operator_eq_ [*operator=]]]
- [Move-assign a basic_deadline_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer._basic_deadline_timer [*~basic_deadline_timer]]]
- [Destroys the timer. ]
- ]
-
-]
-
-The [link asio.reference.basic_deadline_timer `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 [link asio.reference.deadline_timer `deadline_timer`] typedef.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Examples]
-
-Performing a blocking wait:
-
- // Construct a timer without setting an expiry time.
- asio::deadline_timer timer(io_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();
-
-
-
-
-
-Performing an asynchronous wait:
-
- void handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
-
- ...
-
- // Construct a timer with an absolute expiry time.
- asio::deadline_timer timer(io_context,
- boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
-
- // Start an asynchronous wait.
- timer.async_wait(handler);
-
-
-
-
-
-[heading 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:
-
-
-
- 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 asio::error_code& e)
- {
- if (e != asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
-
-
-
-
-
-* The `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.
-
-
-* If a wait handler is cancelled, the [link asio.reference.error_code `error_code`] passed to it contains the value `asio::error::operation_aborted`.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_wait basic_deadline_timer::async_wait]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.async_wait..async_wait..basic_deadline_timer]
-Start an asynchronous wait on the timer.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- WaitHandler && handler);
-
-
-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:
-
-
-* The timer has expired.
-
-
-* The timer was cancelled, in which case the handler is passed the error code `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[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:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:basic_deadline_timer basic_deadline_timer::basic_deadline_timer]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.basic_deadline_timer..basic_deadline_timer..basic_deadline_timer]
-Constructor.
-
-
- explicit ``[link asio.reference.basic_deadline_timer.basic_deadline_timer.overload1 basic_deadline_timer]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.basic_deadline_timer.overload1 more...]]``
-
-
-Constructor to set a particular expiry time as an absolute time.
-
-
- ``[link asio.reference.basic_deadline_timer.basic_deadline_timer.overload2 basic_deadline_timer]``(
- asio::io_context & io_context,
- const time_type & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.basic_deadline_timer.overload2 more...]]``
-
-
-Constructor to set a particular expiry time relative to now.
-
-
- ``[link asio.reference.basic_deadline_timer.basic_deadline_timer.overload3 basic_deadline_timer]``(
- asio::io_context & io_context,
- const duration_type & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.basic_deadline_timer.overload3 more...]]``
-
-
-Move-construct a [link asio.reference.basic_deadline_timer `basic_deadline_timer`] from another.
-
-
- ``[link asio.reference.basic_deadline_timer.basic_deadline_timer.overload4 basic_deadline_timer]``(
- basic_deadline_timer && other);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.basic_deadline_timer.overload4 more...]]``
-
-
-[section:overload1 basic_deadline_timer::basic_deadline_timer (1 of 4 overloads)]
-
-
-Constructor.
-
-
- basic_deadline_timer(
- asio::io_context & io_context);
-
-
-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.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the timer will use to dispatch handlers for any asynchronous operations performed on the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::basic_deadline_timer (2 of 4 overloads)]
-
-
-Constructor to set a particular expiry time as an absolute time.
-
-
- basic_deadline_timer(
- asio::io_context & io_context,
- const time_type & expiry_time);
-
-
-This constructor creates a timer and sets the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the timer will use to dispatch handlers for any asynchronous operations performed on the timer.]]
-
-[[expiry_time][The expiry time to be used for the timer, expressed as an absolute time. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_deadline_timer::basic_deadline_timer (3 of 4 overloads)]
-
-
-Constructor to set a particular expiry time relative to now.
-
-
- basic_deadline_timer(
- asio::io_context & io_context,
- const duration_type & expiry_time);
-
-
-This constructor creates a timer and sets the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the timer will use to dispatch handlers for any asynchronous operations performed on the timer.]]
-
-[[expiry_time][The expiry time to be used for the timer, relative to now. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_deadline_timer::basic_deadline_timer (4 of 4 overloads)]
-
-
-Move-construct a [link asio.reference.basic_deadline_timer `basic_deadline_timer`] from another.
-
-
- basic_deadline_timer(
- basic_deadline_timer && other);
-
-
-This constructor moves a timer from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_deadline_timer `basic_deadline_timer`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_deadline_timer(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel basic_deadline_timer::cancel]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.cancel..cancel..basic_deadline_timer]
-Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t ``[link asio.reference.basic_deadline_timer.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.cancel.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_deadline_timer.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_deadline_timer::cancel (1 of 2 overloads)]
-
-
-Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t cancel();
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::cancel (2 of 2 overloads)]
-
-
-Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t cancel(
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel_one basic_deadline_timer::cancel_one]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.cancel_one..cancel_one..basic_deadline_timer]
-Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t ``[link asio.reference.basic_deadline_timer.cancel_one.overload1 cancel_one]``();
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.cancel_one.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_deadline_timer.cancel_one.overload2 cancel_one]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.cancel_one.overload2 more...]]``
-
-
-[section:overload1 basic_deadline_timer::cancel_one (1 of 2 overloads)]
-
-
-Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t cancel_one();
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled. That is, either 0 or 1.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel_one()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::cancel_one (2 of 2 overloads)]
-
-
-Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t cancel_one(
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled. That is, either 0 or 1.
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel_one()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:duration_type basic_deadline_timer::duration_type]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.duration_type..duration_type..basic_deadline_timer]
-The duration type.
-
-
- typedef traits_type::duration_type duration_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_deadline_timer::executor_type]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.executor_type..executor_type..basic_deadline_timer]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:expires_at basic_deadline_timer::expires_at]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.expires_at..expires_at..basic_deadline_timer]
-Get the timer's expiry time as an absolute time.
-
-
- time_type ``[link asio.reference.basic_deadline_timer.expires_at.overload1 expires_at]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.expires_at.overload1 more...]]``
-
-
-Set the timer's expiry time as an absolute time.
-
-
- std::size_t ``[link asio.reference.basic_deadline_timer.expires_at.overload2 expires_at]``(
- const time_type & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.expires_at.overload2 more...]]``
-
- std::size_t ``[link asio.reference.basic_deadline_timer.expires_at.overload3 expires_at]``(
- const time_type & expiry_time,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.expires_at.overload3 more...]]``
-
-
-[section:overload1 basic_deadline_timer::expires_at (1 of 3 overloads)]
-
-
-Get the timer's expiry time as an absolute time.
-
-
- time_type expires_at() const;
-
-
-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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::expires_at (2 of 3 overloads)]
-
-
-Set the timer's expiry time as an absolute time.
-
-
- std::size_t expires_at(
- const time_type & expiry_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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_at()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload3 basic_deadline_timer::expires_at (3 of 3 overloads)]
-
-
-Set the timer's expiry time as an absolute time.
-
-
- std::size_t expires_at(
- const time_type & expiry_time,
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_at()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:expires_from_now basic_deadline_timer::expires_from_now]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.expires_from_now..expires_from_now..basic_deadline_timer]
-Get the timer's expiry time relative to now.
-
-
- duration_type ``[link asio.reference.basic_deadline_timer.expires_from_now.overload1 expires_from_now]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.expires_from_now.overload1 more...]]``
-
-
-Set the timer's expiry time relative to now.
-
-
- std::size_t ``[link asio.reference.basic_deadline_timer.expires_from_now.overload2 expires_from_now]``(
- const duration_type & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.expires_from_now.overload2 more...]]``
-
- std::size_t ``[link asio.reference.basic_deadline_timer.expires_from_now.overload3 expires_from_now]``(
- const duration_type & expiry_time,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.expires_from_now.overload3 more...]]``
-
-
-[section:overload1 basic_deadline_timer::expires_from_now (1 of 3 overloads)]
-
-
-Get the timer's expiry time relative to now.
-
-
- duration_type expires_from_now() const;
-
-
-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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::expires_from_now (2 of 3 overloads)]
-
-
-Set the timer's expiry time relative to now.
-
-
- std::size_t expires_from_now(
- const duration_type & expiry_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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_from_now()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload3 basic_deadline_timer::expires_from_now (3 of 3 overloads)]
-
-
-Set the timer's expiry time relative to now.
-
-
- std::size_t expires_from_now(
- const duration_type & expiry_time,
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_from_now()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_executor basic_deadline_timer::get_executor]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.get_executor..get_executor..basic_deadline_timer]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_deadline_timer::get_io_context]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.get_io_context..get_io_context..basic_deadline_timer]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_deadline_timer::get_io_service]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.get_io_service..get_io_service..basic_deadline_timer]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ basic_deadline_timer::operator=]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.operator_eq_..operator=..basic_deadline_timer]
-Move-assign a [link asio.reference.basic_deadline_timer `basic_deadline_timer`] from another.
-
-
- basic_deadline_timer & operator=(
- basic_deadline_timer && other);
-
-
-This assignment operator moves a timer from one object to another. Cancels any outstanding asynchronous operations associated with the target object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_deadline_timer `basic_deadline_timer`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_deadline_timer(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:time_type basic_deadline_timer::time_type]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.time_type..time_type..basic_deadline_timer]
-The time type.
-
-
- typedef traits_type::time_type time_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:traits_type basic_deadline_timer::traits_type]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.traits_type..traits_type..basic_deadline_timer]
-The time traits type.
-
-
- typedef TimeTraits traits_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:wait basic_deadline_timer::wait]
-
-[indexterm2 asio.indexterm.basic_deadline_timer.wait..wait..basic_deadline_timer]
-Perform a blocking wait on the timer.
-
-
- void ``[link asio.reference.basic_deadline_timer.wait.overload1 wait]``();
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_deadline_timer.wait.overload2 wait]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_deadline_timer.wait.overload2 more...]]``
-
-
-[section:overload1 basic_deadline_timer::wait (1 of 2 overloads)]
-
-
-Perform a blocking wait on the timer.
-
-
- void wait();
-
-
-This function is used to wait for the timer to expire. This function blocks and does not return until the timer has expired.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_deadline_timer::wait (2 of 2 overloads)]
-
-
-Perform a blocking wait on the timer.
-
-
- void wait(
- asio::error_code & ec);
-
-
-This function is used to wait for the timer to expire. This function blocks and does not return until the timer has expired.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_basic_deadline_timer basic_deadline_timer::~basic_deadline_timer]
-
-[indexterm2 asio.indexterm.basic_deadline_timer._basic_deadline_timer..~basic_deadline_timer..basic_deadline_timer]
-Destroys the timer.
-
-
- ~basic_deadline_timer();
-
-
-This function destroys the timer, cancelling any outstanding asynchronous wait operations associated with the timer as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_io_object basic_io_object]
-
-
-Base class for all I/O objects.
-
-
- template<
- typename ``[link asio.reference.IoObjectService IoObjectService]``>
- class basic_io_object
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_io_object.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_io_object.implementation_type [*implementation_type]]]
- [The underlying implementation type of I/O object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_io_object.service_type [*service_type]]]
- [The type of the service that will be used to provide I/O operations. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_io_object.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_io_object.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_io_object.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_io_object.basic_io_object [*basic_io_object]]]
- [Construct a basic_io_object.
-
- Move-construct a basic_io_object. ]
- ]
-
- [
- [[link asio.reference.basic_io_object.get_implementation [*get_implementation]]]
- [Get the underlying implementation of the I/O object. ]
- ]
-
- [
- [[link asio.reference.basic_io_object.get_service [*get_service]]]
- [Get the service associated with the I/O object. ]
- ]
-
- [
- [[link asio.reference.basic_io_object.operator_eq_ [*operator=]]]
- [Move-assign a basic_io_object. ]
- ]
-
- [
- [[link asio.reference.basic_io_object._basic_io_object [*~basic_io_object]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-
-[heading Remarks]
-
-All I/O objects are non-copyable. However, when using C++0x, certain I/O objects do support move construction and move assignment.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_io_object.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_io_object basic_io_object::basic_io_object]
-
-[indexterm2 asio.indexterm.basic_io_object.basic_io_object..basic_io_object..basic_io_object]
-Construct a [link asio.reference.basic_io_object `basic_io_object`].
-
-
- explicit ``[link asio.reference.basic_io_object.basic_io_object.overload1 basic_io_object]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_io_object.basic_io_object.overload1 more...]]``
-
-
-Move-construct a [link asio.reference.basic_io_object `basic_io_object`].
-
-
- ``[link asio.reference.basic_io_object.basic_io_object.overload2 basic_io_object]``(
- basic_io_object && other);
- `` [''''&raquo;''' [link asio.reference.basic_io_object.basic_io_object.overload2 more...]]``
-
-
-[section:overload1 basic_io_object::basic_io_object (1 of 2 overloads)]
-
-
-Construct a [link asio.reference.basic_io_object `basic_io_object`].
-
-
- basic_io_object(
- asio::io_context & io_context);
-
-
-Performs:
-
- get_service().construct(get_implementation());
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_io_object::basic_io_object (2 of 2 overloads)]
-
-
-Move-construct a [link asio.reference.basic_io_object `basic_io_object`].
-
-
- basic_io_object(
- basic_io_object && other);
-
-
-Performs:
-
- get_service().move_construct(
- get_implementation(), other.get_implementation());
-
-
-
-
-
-[heading Remarks]
-
-Available only for services that support movability,
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type basic_io_object::executor_type]
-
-[indexterm2 asio.indexterm.basic_io_object.executor_type..executor_type..basic_io_object]
-The type of the executor associated with the object.
-
-
- typedef asio::io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_io_object.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_io_object::get_executor]
-
-[indexterm2 asio.indexterm.basic_io_object.get_executor..get_executor..basic_io_object]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-[section:get_implementation basic_io_object::get_implementation]
-
-[indexterm2 asio.indexterm.basic_io_object.get_implementation..get_implementation..basic_io_object]
-Get the underlying implementation of the I/O object.
-
-
- implementation_type & ``[link asio.reference.basic_io_object.get_implementation.overload1 get_implementation]``();
- `` [''''&raquo;''' [link asio.reference.basic_io_object.get_implementation.overload1 more...]]``
-
- const implementation_type & ``[link asio.reference.basic_io_object.get_implementation.overload2 get_implementation]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_io_object.get_implementation.overload2 more...]]``
-
-
-[section:overload1 basic_io_object::get_implementation (1 of 2 overloads)]
-
-
-Get the underlying implementation of the I/O object.
-
-
- implementation_type & get_implementation();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_io_object::get_implementation (2 of 2 overloads)]
-
-
-Get the underlying implementation of the I/O object.
-
-
- const implementation_type & get_implementation() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context basic_io_object::get_io_context]
-
-[indexterm2 asio.indexterm.basic_io_object.get_io_context..get_io_context..basic_io_object]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_io_object::get_io_service]
-
-[indexterm2 asio.indexterm.basic_io_object.get_io_service..get_io_service..basic_io_object]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_service basic_io_object::get_service]
-
-[indexterm2 asio.indexterm.basic_io_object.get_service..get_service..basic_io_object]
-Get the service associated with the I/O object.
-
-
- service_type & ``[link asio.reference.basic_io_object.get_service.overload1 get_service]``();
- `` [''''&raquo;''' [link asio.reference.basic_io_object.get_service.overload1 more...]]``
-
- const service_type & ``[link asio.reference.basic_io_object.get_service.overload2 get_service]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_io_object.get_service.overload2 more...]]``
-
-
-[section:overload1 basic_io_object::get_service (1 of 2 overloads)]
-
-
-Get the service associated with the I/O object.
-
-
- service_type & get_service();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_io_object::get_service (2 of 2 overloads)]
-
-
-Get the service associated with the I/O object.
-
-
- const service_type & get_service() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:implementation_type basic_io_object::implementation_type]
-
-[indexterm2 asio.indexterm.basic_io_object.implementation_type..implementation_type..basic_io_object]
-The underlying implementation type of I/O object.
-
-
- typedef service_type::implementation_type implementation_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_io_object.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ basic_io_object::operator=]
-
-[indexterm2 asio.indexterm.basic_io_object.operator_eq_..operator=..basic_io_object]
-Move-assign a [link asio.reference.basic_io_object `basic_io_object`].
-
-
- basic_io_object & operator=(
- basic_io_object && other);
-
-
-Performs:
-
- get_service().move_assign(get_implementation(),
- other.get_service(), other.get_implementation());
-
-
-
-
-
-[heading Remarks]
-
-Available only for services that support movability,
-
-
-
-
-[endsect]
-
-
-
-[section:service_type basic_io_object::service_type]
-
-[indexterm2 asio.indexterm.basic_io_object.service_type..service_type..basic_io_object]
-The type of the service that will be used to provide I/O operations.
-
-
- typedef IoObjectService service_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_io_object.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:_basic_io_object basic_io_object::~basic_io_object]
-
-[indexterm2 asio.indexterm.basic_io_object._basic_io_object..~basic_io_object..basic_io_object]
-Protected destructor to prevent deletion through this type.
-
-
- ~basic_io_object();
-
-
-Performs:
-
- get_service().destroy(get_implementation());
-
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_raw_socket basic_raw_socket]
-
-
-Provides raw-oriented socket functionality.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_raw_socket :
- public basic_socket< Protocol >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_raw_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_raw_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.basic_raw_socket [*basic_raw_socket]]]
- [Construct a basic_raw_socket without opening it.
-
- Construct and open a basic_raw_socket.
-
- Construct a basic_raw_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_raw_socket on an existing native socket.
-
- Move-construct a basic_raw_socket from another.
-
- Move-construct a basic_raw_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_raw_socket from another.
-
- Move-assign a basic_raw_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.receive_from [*receive_from]]]
- [Receive raw data with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.send_to [*send_to]]]
- [Send raw data to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket._basic_raw_socket [*~basic_raw_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_raw_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_raw_socket `basic_raw_socket`] class template provides asynchronous and blocking raw-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign basic_raw_socket::assign]
-
-[indexterm2 asio.indexterm.basic_raw_socket.assign..assign..basic_raw_socket]
-Assign an existing native socket to the socket.
-
-
- void ``[link asio.reference.basic_raw_socket.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.assign.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.assign.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::assign (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::assign (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_connect basic_raw_socket::async_connect]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.async_connect..async_connect..basic_raw_socket]
-Start an asynchronous connect.
-
-
- template<
- typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- const endpoint_type & peer_endpoint,
- ConnectHandler && handler);
-
-
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void connect_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Connect succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:async_receive basic_raw_socket::async_receive]
-
-[indexterm2 asio.indexterm.basic_raw_socket.async_receive..async_receive..basic_raw_socket]
-Start an asynchronous receive on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive.overload1 async_receive]``(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive.overload2 async_receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_receive.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::async_receive (1 of 2 overloads)]
-
-
-Start an asynchronous receive on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the raw socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected raw socket.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::async_receive (2 of 2 overloads)]
-
-
-Start an asynchronous receive on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the raw socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_receive operation can only be used with a connected socket. Use the async\_receive\_from function to receive data on an unconnected raw socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_receive_from basic_raw_socket::async_receive_from]
-
-[indexterm2 asio.indexterm.basic_raw_socket.async_receive_from..async_receive_from..basic_raw_socket]
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive_from.overload1 async_receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_receive_from.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_receive_from.overload2 async_receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_receive_from.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::async_receive_from (1 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive raw data. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive_from(
- asio::buffer(data, size), 0, sender_endpoint, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::async_receive_from (2 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive raw data. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data. Ownership of the sender\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_send basic_raw_socket::async_send]
-
-[indexterm2 asio.indexterm.basic_raw_socket.async_send..async_send..basic_raw_socket]
-Start an asynchronous send on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send.overload1 async_send]``(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send.overload2 async_send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_send.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::async_send (1 of 2 overloads)]
-
-
-Start an asynchronous send on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected raw socket.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_send(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::async_send (2 of 2 overloads)]
-
-
-Start an asynchronous send on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
-
-
-This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The async\_send operation can only be used with a connected socket. Use the async\_send\_to function to send data on an unconnected raw socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_send_to basic_raw_socket::async_send_to]
-
-[indexterm2 asio.indexterm.basic_raw_socket.async_send_to..async_send_to..basic_raw_socket]
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send_to.overload1 async_send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_send_to.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_raw_socket.async_send_to.overload2 async_send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.async_send_to.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::async_send_to (1 of 2 overloads)]
-
-
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send raw data to the specified remote endpoint. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[destination][The remote endpoint to which the data will be sent. Copies will be made of the endpoint as required.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::ip::udp::endpoint destination(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_send_to(
- asio::buffer(data, size), destination, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::async_send_to (2 of 2 overloads)]
-
-
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send raw data to the specified remote endpoint. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[destination][The remote endpoint to which the data will be sent. Copies will be made of the endpoint as required.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait basic_raw_socket::async_wait]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.async_wait..async_wait..basic_raw_socket]
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:at_mark basic_raw_socket::at_mark]
-
-[indexterm2 asio.indexterm.basic_raw_socket.at_mark..at_mark..basic_raw_socket]
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool ``[link asio.reference.basic_raw_socket.at_mark.overload1 at_mark]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.at_mark.overload1 more...]]``
-
- bool ``[link asio.reference.basic_raw_socket.at_mark.overload2 at_mark]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.at_mark.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::at_mark (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark() const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::at_mark (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark(
- asio::error_code & ec) const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:available basic_raw_socket::available]
-
-[indexterm2 asio.indexterm.basic_raw_socket.available..available..basic_raw_socket]
-Determine the number of bytes available for reading.
-
-
- std::size_t ``[link asio.reference.basic_raw_socket.available.overload1 available]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.available.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_raw_socket.available.overload2 available]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.available.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::available (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available() const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::available (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available(
- asio::error_code & ec) const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_raw_socket basic_raw_socket::basic_raw_socket]
-
-[indexterm2 asio.indexterm.basic_raw_socket.basic_raw_socket..basic_raw_socket..basic_raw_socket]
-Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] without opening it.
-
-
- explicit ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload1 basic_raw_socket]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.basic_raw_socket `basic_raw_socket`].
-
-
- ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload2 basic_raw_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload2 more...]]``
-
-
-Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`], opening it and binding it to the given local endpoint.
-
-
- ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload3 basic_raw_socket]``(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] on an existing native socket.
-
-
- ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload4 basic_raw_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] from another.
-
-
- ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload5 basic_raw_socket]``(
- basic_raw_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload5 more...]]``
-
-
-Move-construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- ``[link asio.reference.basic_raw_socket.basic_raw_socket.overload6 basic_raw_socket]``(
- basic_raw_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.basic_raw_socket.overload6 more...]]``
-
-
-[section:overload1 basic_raw_socket::basic_raw_socket (1 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] without opening it.
-
-
- basic_raw_socket(
- asio::io_context & io_context);
-
-
-This constructor creates a raw socket without opening it. The `open()` function must be called before data can be sent or received on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::basic_raw_socket (2 of 6 overloads)]
-
-
-Construct and open a [link asio.reference.basic_raw_socket `basic_raw_socket`].
-
-
- basic_raw_socket(
- asio::io_context & io_context,
- const protocol_type & protocol);
-
-
-This constructor creates and opens a raw socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::basic_raw_socket (3 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`], opening it and binding it to the given local endpoint.
-
-
- basic_raw_socket(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
-
-
-This constructor creates a raw socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[endpoint][An endpoint on the local machine to which the raw socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_raw_socket::basic_raw_socket (4 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] on an existing native socket.
-
-
- basic_raw_socket(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-This constructor creates a raw socket object to hold an existing native socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the raw socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_socket][The new underlying socket implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_raw_socket::basic_raw_socket (5 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] from another.
-
-
- basic_raw_socket(
- basic_raw_socket && other);
-
-
-This constructor moves a raw socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_raw_socket `basic_raw_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_raw_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_raw_socket::basic_raw_socket (6 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_raw_socket `basic_raw_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- basic_raw_socket(
- basic_raw_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
-
-
-This constructor moves a raw socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_raw_socket `basic_raw_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_raw_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_raw_socket::bind]
-
-[indexterm2 asio.indexterm.basic_raw_socket.bind..bind..basic_raw_socket]
-Bind the socket to the given local endpoint.
-
-
- void ``[link asio.reference.basic_raw_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.bind.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.bind.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::bind (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::bind (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint,
- asio::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- asio::error_code ec;
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_raw_socket::broadcast]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.broadcast..broadcast..basic_raw_socket]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable basic_raw_socket::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.bytes_readable..bytes_readable..basic_raw_socket]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_raw_socket::cancel]
-
-[indexterm2 asio.indexterm.basic_raw_socket.cancel..cancel..basic_raw_socket]
-Cancel all asynchronous operations associated with the socket.
-
-
- void ``[link asio.reference.basic_raw_socket.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.cancel.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_raw_socket::close]
-
-[indexterm2 asio.indexterm.basic_raw_socket.close..close..basic_raw_socket]
-Close the socket.
-
-
- void ``[link asio.reference.basic_raw_socket.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.close.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.close.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::close (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close();
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:connect basic_raw_socket::connect]
-
-[indexterm2 asio.indexterm.basic_raw_socket.connect..connect..basic_raw_socket]
-Connect the socket to the specified endpoint.
-
-
- void ``[link asio.reference.basic_raw_socket.connect.overload1 connect]``(
- const endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.connect.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.connect.overload2 connect]``(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.connect.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::connect (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.connect(endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::connect (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- asio::error_code ec;
- socket.connect(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:debug basic_raw_socket::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.debug..debug..basic_raw_socket]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_raw_socket::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.do_not_route..do_not_route..basic_raw_socket]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_raw_socket::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.enable_connection_aborted..enable_connection_aborted..basic_raw_socket]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_raw_socket::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_raw_socket.endpoint_type..endpoint_type..basic_raw_socket]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_raw_socket::executor_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.executor_type..executor_type..basic_raw_socket]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_raw_socket::get_executor]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.get_executor..get_executor..basic_raw_socket]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_raw_socket::get_io_context]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.get_io_context..get_io_context..basic_raw_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_raw_socket::get_io_service]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.get_io_service..get_io_service..basic_raw_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_raw_socket::get_option]
-
-[indexterm2 asio.indexterm.basic_raw_socket.get_option..get_option..basic_raw_socket]
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_raw_socket.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_raw_socket.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::get_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option,
- asio::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- asio::error_code ec;
- socket.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:io_control basic_raw_socket::io_control]
-
-[indexterm2 asio.indexterm.basic_raw_socket.io_control..io_control..basic_raw_socket]
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_raw_socket.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_raw_socket.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- asio::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open basic_raw_socket::is_open]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.is_open..is_open..basic_raw_socket]
-Determine whether the socket is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_raw_socket::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.keep_alive..keep_alive..basic_raw_socket]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_raw_socket::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.linger..linger..basic_raw_socket]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:local_endpoint basic_raw_socket::local_endpoint]
-
-[indexterm2 asio.indexterm.basic_raw_socket.local_endpoint..local_endpoint..basic_raw_socket]
-Get the local endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_raw_socket.local_endpoint.overload1 local_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.local_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_raw_socket.local_endpoint.overload2 local_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::local_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer basic_raw_socket::lowest_layer]
-
-[indexterm2 asio.indexterm.basic_raw_socket.lowest_layer..lowest_layer..basic_raw_socket]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.basic_raw_socket.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.basic_raw_socket.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_raw_socket::lowest_layer_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.lowest_layer_type..lowest_layer_type..basic_raw_socket]
-A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer.
-
-
- typedef basic_socket< Protocol > lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it.
-
- Construct and open a basic_socket.
-
- Construct a basic_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_socket on an existing native socket.
-
- Move-construct a basic_socket from another.
-
- Move-construct a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket from another.
-
- Move-assign a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections basic_raw_socket::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.max_connections..max_connections..basic_raw_socket]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections basic_raw_socket::max_listen_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.max_listen_connections..max_listen_connections..basic_raw_socket]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_raw_socket::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.message_do_not_route..message_do_not_route..basic_raw_socket]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_raw_socket::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.message_end_of_record..message_end_of_record..basic_raw_socket]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_raw_socket::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.message_flags..message_flags..basic_raw_socket]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_raw_socket::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.message_out_of_band..message_out_of_band..basic_raw_socket]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_raw_socket::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.message_peek..message_peek..basic_raw_socket]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_raw_socket::native_handle]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.native_handle..native_handle..basic_raw_socket]
-Get the native socket representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_raw_socket::native_handle_type]
-
-[indexterm2 asio.indexterm.basic_raw_socket.native_handle_type..native_handle_type..basic_raw_socket]
-The native representation of a socket.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_raw_socket::native_non_blocking]
-
-[indexterm2 asio.indexterm.basic_raw_socket.native_non_blocking..native_non_blocking..basic_raw_socket]
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool ``[link asio.reference.basic_raw_socket.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void ``[link asio.reference.basic_raw_socket.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_raw_socket::native_non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native socket. This mode has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying socket is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the socket object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native socket.
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::native_non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::native_non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_raw_socket::non_blocking]
-
-[indexterm2 asio.indexterm.basic_raw_socket.non_blocking..non_blocking..basic_raw_socket]
-Gets the non-blocking mode of the socket.
-
-
- bool ``[link asio.reference.basic_raw_socket.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket.
-
-
- void ``[link asio.reference.basic_raw_socket.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_raw_socket::non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the socket.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_raw_socket::open]
-
-[indexterm2 asio.indexterm.basic_raw_socket.open..open..basic_raw_socket]
-Open the socket using the specified protocol.
-
-
- void ``[link asio.reference.basic_raw_socket.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.open.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.open.overload2 open]``(
- const protocol_type & protocol,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.open.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::open (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::open (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol,
- asio::error_code & ec);
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::error_code ec;
- socket.open(asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq_ basic_raw_socket::operator=]
-
-[indexterm2 asio.indexterm.basic_raw_socket.operator_eq_..operator=..basic_raw_socket]
-Move-assign a [link asio.reference.basic_raw_socket `basic_raw_socket`] from another.
-
-
- basic_raw_socket & ``[link asio.reference.basic_raw_socket.operator_eq_.overload1 operator=]``(
- basic_raw_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.operator_eq_.overload1 more...]]``
-
-
-Move-assign a [link asio.reference.basic_raw_socket `basic_raw_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_raw_socket >::type & ``[link asio.reference.basic_raw_socket.operator_eq_.overload2 operator=]``(
- basic_raw_socket< Protocol1 > && other);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::operator= (1 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_raw_socket `basic_raw_socket`] from another.
-
-
- basic_raw_socket & operator=(
- basic_raw_socket && other);
-
-
-This assignment operator moves a raw socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_raw_socket `basic_raw_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_raw_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::operator= (2 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_raw_socket `basic_raw_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_raw_socket >::type & operator=(
- basic_raw_socket< Protocol1 > && other);
-
-
-This assignment operator moves a raw socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_raw_socket `basic_raw_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_raw_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol_type basic_raw_socket::protocol_type]
-
-[indexterm2 asio.indexterm.basic_raw_socket.protocol_type..protocol_type..basic_raw_socket]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:receive basic_raw_socket::receive]
-
-[indexterm2 asio.indexterm.basic_raw_socket.receive..receive..basic_raw_socket]
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.receive.overload1 receive]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.receive.overload2 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.receive.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.receive.overload3 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.receive.overload3 more...]]``
-
-
-[section:overload1 basic_raw_socket::receive (1 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers);
-
-
-This function is used to receive data on the raw socket. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected raw socket.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.receive(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::receive (2 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to receive data on the raw socket. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected raw socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::receive (3 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to receive data on the raw socket. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Remarks]
-
-The receive operation can only be used with a connected socket. Use the receive\_from function to receive data on an unconnected raw socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:receive_buffer_size basic_raw_socket::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.receive_buffer_size..receive_buffer_size..basic_raw_socket]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:receive_from basic_raw_socket::receive_from]
-
-[indexterm2 asio.indexterm.basic_raw_socket.receive_from..receive_from..basic_raw_socket]
-Receive raw data with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.receive_from.overload1 receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.receive_from.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.receive_from.overload2 receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.receive_from.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.receive_from.overload3 receive_from]``(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.receive_from.overload3 more...]]``
-
-
-[section:overload1 basic_raw_socket::receive_from (1 of 3 overloads)]
-
-
-Receive raw data with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint);
-
-
-This function is used to receive raw data. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::ip::udp::endpoint sender_endpoint;
- socket.receive_from(
- asio::buffer(data, size), sender_endpoint);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::receive_from (2 of 3 overloads)]
-
-
-Receive raw data with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags);
-
-
-This function is used to receive raw data. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::receive_from (3 of 3 overloads)]
-
-
-Receive raw data with the endpoint of the sender.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive_from(
- const MutableBufferSequence & buffers,
- endpoint_type & sender_endpoint,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to receive raw data. The function call will block until data has been received successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[sender_endpoint][An endpoint object that receives the endpoint of the remote sender of the data.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:receive_low_watermark basic_raw_socket::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.receive_low_watermark..receive_low_watermark..basic_raw_socket]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remote_endpoint basic_raw_socket::remote_endpoint]
-
-[indexterm2 asio.indexterm.basic_raw_socket.remote_endpoint..remote_endpoint..basic_raw_socket]
-Get the remote endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_raw_socket.remote_endpoint.overload1 remote_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.remote_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_raw_socket.remote_endpoint.overload2 remote_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.remote_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::remote_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint() const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::remote_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:reuse_address basic_raw_socket::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.reuse_address..reuse_address..basic_raw_socket]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:send basic_raw_socket::send]
-
-[indexterm2 asio.indexterm.basic_raw_socket.send..send..basic_raw_socket]
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.send.overload1 send]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.send.overload2 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.send.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.send.overload3 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.send.overload3 more...]]``
-
-
-[section:overload1 basic_raw_socket::send (1 of 3 overloads)]
-
-
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers);
-
-
-This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One ore more data buffers to be sent on the socket.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected raw socket.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.send(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::send (2 of 3 overloads)]
-
-
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One ore more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected raw socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::send (3 of 3 overloads)]
-
-
-Send some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to send data on the raw socket. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Remarks]
-
-The send operation can only be used with a connected socket. Use the send\_to function to send data on an unconnected raw socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:send_buffer_size basic_raw_socket::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.send_buffer_size..send_buffer_size..basic_raw_socket]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_raw_socket::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.send_low_watermark..send_low_watermark..basic_raw_socket]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_raw_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:send_to basic_raw_socket::send_to]
-
-[indexterm2 asio.indexterm.basic_raw_socket.send_to..send_to..basic_raw_socket]
-Send raw data to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.send_to.overload1 send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.send_to.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.send_to.overload2 send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.send_to.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_raw_socket.send_to.overload3 send_to]``(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.send_to.overload3 more...]]``
-
-
-[section:overload1 basic_raw_socket::send_to (1 of 3 overloads)]
-
-
-Send raw data to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination);
-
-
-This function is used to send raw data to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint.]]
-
-[[destination][The remote endpoint to which the data will be sent.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::ip::udp::endpoint destination(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.send_to(asio::buffer(data, size), destination);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::send_to (2 of 3 overloads)]
-
-
-Send raw data to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags);
-
-
-This function is used to send raw data to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint.]]
-
-[[destination][The remote endpoint to which the data will be sent.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_raw_socket::send_to (3 of 3 overloads)]
-
-
-Send raw data to the specified endpoint.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send_to(
- const ConstBufferSequence & buffers,
- const endpoint_type & destination,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to send raw data to the specified remote endpoint. The function call will block until the data has been sent successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent to the remote endpoint.]]
-
-[[destination][The remote endpoint to which the data will be sent.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_option basic_raw_socket::set_option]
-
-[indexterm2 asio.indexterm.basic_raw_socket.set_option..set_option..basic_raw_socket]
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_raw_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_raw_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::set_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::set_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- asio::error_code ec;
- socket.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:shutdown basic_raw_socket::shutdown]
-
-[indexterm2 asio.indexterm.basic_raw_socket.shutdown..shutdown..basic_raw_socket]
-Disable sends or receives on the socket.
-
-
- void ``[link asio.reference.basic_raw_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.shutdown.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.shutdown.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::shutdown (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what,
- asio::error_code & ec);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_raw_socket::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type..shutdown_type..basic_raw_socket]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_raw_socket]
-[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type.shutdown_send..shutdown_send..basic_raw_socket]
-[indexterm2 asio.indexterm.basic_raw_socket.shutdown_type.shutdown_both..shutdown_both..basic_raw_socket]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:wait basic_raw_socket::wait]
-
-[indexterm2 asio.indexterm.basic_raw_socket.wait..wait..basic_raw_socket]
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.basic_raw_socket.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_raw_socket.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_raw_socket.wait.overload2 more...]]``
-
-
-[section:overload1 basic_raw_socket::wait (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.wait(asio::ip::tcp::socket::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_raw_socket::wait (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.wait(asio::ip::tcp::socket::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_raw_socket::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_raw_socket.wait_type..wait_type..basic_raw_socket]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.basic_raw_socket.wait_type.wait_read..wait_read..basic_raw_socket]
-[indexterm2 asio.indexterm.basic_raw_socket.wait_type.wait_write..wait_write..basic_raw_socket]
-[indexterm2 asio.indexterm.basic_raw_socket.wait_type.wait_error..wait_error..basic_raw_socket]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_basic_raw_socket basic_raw_socket::~basic_raw_socket]
-
-[indexterm2 asio.indexterm.basic_raw_socket._basic_raw_socket..~basic_raw_socket..basic_raw_socket]
-Destroys the socket.
-
-
- ~basic_raw_socket();
-
-
-This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_seq_packet_socket basic_seq_packet_socket]
-
-
-Provides sequenced packet socket functionality.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_seq_packet_socket :
- public basic_socket< Protocol >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_seq_packet_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket [*basic_seq_packet_socket]]]
- [Construct a basic_seq_packet_socket without opening it.
-
- Construct and open a basic_seq_packet_socket.
-
- Construct a basic_seq_packet_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_seq_packet_socket on an existing native socket.
-
- Move-construct a basic_seq_packet_socket from another.
-
- Move-construct a basic_seq_packet_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_seq_packet_socket from another.
-
- Move-assign a basic_seq_packet_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.receive [*receive]]]
- [Receive some data on the socket.
-
- Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.send [*send]]]
- [Send some data on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket._basic_seq_packet_socket [*~basic_seq_packet_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_seq_packet_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] class template provides asynchronous and blocking sequenced packet socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign basic_seq_packet_socket::assign]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.assign..assign..basic_seq_packet_socket]
-Assign an existing native socket to the socket.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.assign.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.assign.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::assign (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::assign (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_connect basic_seq_packet_socket::async_connect]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.async_connect..async_connect..basic_seq_packet_socket]
-Start an asynchronous connect.
-
-
- template<
- typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- const endpoint_type & peer_endpoint,
- ConnectHandler && handler);
-
-
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void connect_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Connect succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:async_receive basic_seq_packet_socket::async_receive]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.async_receive..async_receive..basic_seq_packet_socket]
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_seq_packet_socket.async_receive.overload1 async_receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags & out_flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.async_receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_seq_packet_socket.async_receive.overload2 async_receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags & out_flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.async_receive.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::async_receive (1 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags & out_flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the sequenced packet socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[out_flags][Once the asynchronous operation completes, contains flags associated with the received data. For example, if the `socket_base::message_end_of_record` bit is set then the received data marks the end of a record. The caller must guarantee that the referenced variable remains valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive(asio::buffer(data, size), out_flags, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::async_receive (2 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags & out_flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the sequenced data socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[in_flags][Flags specifying how the receive call is to be made.]]
-
-[[out_flags][Once the asynchronous operation completes, contains flags associated with the received data. For example, if the `socket_base::message_end_of_record` bit is set then the received data marks the end of a record. The caller must guarantee that the referenced variable remains valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive(
- asio::buffer(data, size),
- 0, out_flags, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_send basic_seq_packet_socket::async_send]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.async_send..async_send..basic_seq_packet_socket]
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send data on the sequenced packet socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_send(asio::buffer(data, size), 0, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:async_wait basic_seq_packet_socket::async_wait]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.async_wait..async_wait..basic_seq_packet_socket]
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:at_mark basic_seq_packet_socket::at_mark]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.at_mark..at_mark..basic_seq_packet_socket]
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool ``[link asio.reference.basic_seq_packet_socket.at_mark.overload1 at_mark]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.at_mark.overload1 more...]]``
-
- bool ``[link asio.reference.basic_seq_packet_socket.at_mark.overload2 at_mark]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.at_mark.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::at_mark (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark() const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::at_mark (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark(
- asio::error_code & ec) const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:available basic_seq_packet_socket::available]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.available..available..basic_seq_packet_socket]
-Determine the number of bytes available for reading.
-
-
- std::size_t ``[link asio.reference.basic_seq_packet_socket.available.overload1 available]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.available.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_seq_packet_socket.available.overload2 available]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.available.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::available (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available() const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::available (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available(
- asio::error_code & ec) const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_seq_packet_socket basic_seq_packet_socket::basic_seq_packet_socket]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.basic_seq_packet_socket..basic_seq_packet_socket..basic_seq_packet_socket]
-Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] without opening it.
-
-
- explicit ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload1 basic_seq_packet_socket]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`].
-
-
- ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload2 basic_seq_packet_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload2 more...]]``
-
-
-Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`], opening it and binding it to the given local endpoint.
-
-
- ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload3 basic_seq_packet_socket]``(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] on an existing native socket.
-
-
- ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload4 basic_seq_packet_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from another.
-
-
- ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload5 basic_seq_packet_socket]``(
- basic_seq_packet_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload5 more...]]``
-
-
-Move-construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- ``[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload6 basic_seq_packet_socket]``(
- basic_seq_packet_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket.overload6 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::basic_seq_packet_socket (1 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] without opening it.
-
-
- basic_seq_packet_socket(
- asio::io_context & io_context);
-
-
-This constructor creates a sequenced packet socket without opening it. The socket needs to be opened and then connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::basic_seq_packet_socket (2 of 6 overloads)]
-
-
-Construct and open a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`].
-
-
- basic_seq_packet_socket(
- asio::io_context & io_context,
- const protocol_type & protocol);
-
-
-This constructor creates and opens a sequenced\_packet socket. The socket needs to be connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_seq_packet_socket::basic_seq_packet_socket (3 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`], opening it and binding it to the given local endpoint.
-
-
- basic_seq_packet_socket(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
-
-
-This constructor creates a sequenced packet socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[endpoint][An endpoint on the local machine to which the sequenced packet socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_seq_packet_socket::basic_seq_packet_socket (4 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] on an existing native socket.
-
-
- basic_seq_packet_socket(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-This constructor creates a sequenced packet socket object to hold an existing native socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_socket][The new underlying socket implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_seq_packet_socket::basic_seq_packet_socket (5 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from another.
-
-
- basic_seq_packet_socket(
- basic_seq_packet_socket && other);
-
-
-This constructor moves a sequenced packet socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_seq_packet_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_seq_packet_socket::basic_seq_packet_socket (6 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- basic_seq_packet_socket(
- basic_seq_packet_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
-
-
-This constructor moves a sequenced packet socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_seq_packet_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_seq_packet_socket::bind]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.bind..bind..basic_seq_packet_socket]
-Bind the socket to the given local endpoint.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.bind.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.bind.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::bind (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::bind (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint,
- asio::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- asio::error_code ec;
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_seq_packet_socket::broadcast]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.broadcast..broadcast..basic_seq_packet_socket]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable basic_seq_packet_socket::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.bytes_readable..bytes_readable..basic_seq_packet_socket]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_seq_packet_socket::cancel]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.cancel..cancel..basic_seq_packet_socket]
-Cancel all asynchronous operations associated with the socket.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.cancel.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_seq_packet_socket::close]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.close..close..basic_seq_packet_socket]
-Close the socket.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.close.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.close.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::close (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close();
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:connect basic_seq_packet_socket::connect]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.connect..connect..basic_seq_packet_socket]
-Connect the socket to the specified endpoint.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.connect.overload1 connect]``(
- const endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.connect.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.connect.overload2 connect]``(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.connect.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::connect (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.connect(endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::connect (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- asio::error_code ec;
- socket.connect(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:debug basic_seq_packet_socket::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.debug..debug..basic_seq_packet_socket]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_seq_packet_socket::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.do_not_route..do_not_route..basic_seq_packet_socket]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_seq_packet_socket::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.enable_connection_aborted..enable_connection_aborted..basic_seq_packet_socket]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_seq_packet_socket::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.endpoint_type..endpoint_type..basic_seq_packet_socket]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_seq_packet_socket::executor_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.executor_type..executor_type..basic_seq_packet_socket]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_seq_packet_socket::get_executor]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.get_executor..get_executor..basic_seq_packet_socket]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_seq_packet_socket::get_io_context]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.get_io_context..get_io_context..basic_seq_packet_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_seq_packet_socket::get_io_service]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.get_io_service..get_io_service..basic_seq_packet_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_seq_packet_socket::get_option]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.get_option..get_option..basic_seq_packet_socket]
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_seq_packet_socket.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_seq_packet_socket.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::get_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option,
- asio::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- asio::error_code ec;
- socket.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:io_control basic_seq_packet_socket::io_control]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.io_control..io_control..basic_seq_packet_socket]
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_seq_packet_socket.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_seq_packet_socket.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- asio::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open basic_seq_packet_socket::is_open]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.is_open..is_open..basic_seq_packet_socket]
-Determine whether the socket is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_seq_packet_socket::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.keep_alive..keep_alive..basic_seq_packet_socket]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_seq_packet_socket::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.linger..linger..basic_seq_packet_socket]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:local_endpoint basic_seq_packet_socket::local_endpoint]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.local_endpoint..local_endpoint..basic_seq_packet_socket]
-Get the local endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_seq_packet_socket.local_endpoint.overload1 local_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.local_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_seq_packet_socket.local_endpoint.overload2 local_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::local_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer basic_seq_packet_socket::lowest_layer]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.lowest_layer..lowest_layer..basic_seq_packet_socket]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.basic_seq_packet_socket.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.basic_seq_packet_socket.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_seq_packet_socket::lowest_layer_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.lowest_layer_type..lowest_layer_type..basic_seq_packet_socket]
-A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer.
-
-
- typedef basic_socket< Protocol > lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it.
-
- Construct and open a basic_socket.
-
- Construct a basic_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_socket on an existing native socket.
-
- Move-construct a basic_socket from another.
-
- Move-construct a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket from another.
-
- Move-assign a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections basic_seq_packet_socket::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.max_connections..max_connections..basic_seq_packet_socket]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections basic_seq_packet_socket::max_listen_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.max_listen_connections..max_listen_connections..basic_seq_packet_socket]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_seq_packet_socket::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.message_do_not_route..message_do_not_route..basic_seq_packet_socket]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_seq_packet_socket::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.message_end_of_record..message_end_of_record..basic_seq_packet_socket]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_seq_packet_socket::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.message_flags..message_flags..basic_seq_packet_socket]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_seq_packet_socket::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.message_out_of_band..message_out_of_band..basic_seq_packet_socket]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_seq_packet_socket::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.message_peek..message_peek..basic_seq_packet_socket]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_seq_packet_socket::native_handle]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.native_handle..native_handle..basic_seq_packet_socket]
-Get the native socket representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_seq_packet_socket::native_handle_type]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.native_handle_type..native_handle_type..basic_seq_packet_socket]
-The native representation of a socket.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_seq_packet_socket::native_non_blocking]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.native_non_blocking..native_non_blocking..basic_seq_packet_socket]
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool ``[link asio.reference.basic_seq_packet_socket.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::native_non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native socket. This mode has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying socket is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the socket object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native socket.
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::native_non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_seq_packet_socket::native_non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_seq_packet_socket::non_blocking]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.non_blocking..non_blocking..basic_seq_packet_socket]
-Gets the non-blocking mode of the socket.
-
-
- bool ``[link asio.reference.basic_seq_packet_socket.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the socket.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_seq_packet_socket::non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_seq_packet_socket::open]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.open..open..basic_seq_packet_socket]
-Open the socket using the specified protocol.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.open.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.open.overload2 open]``(
- const protocol_type & protocol,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.open.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::open (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::open (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol,
- asio::error_code & ec);
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::error_code ec;
- socket.open(asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq_ basic_seq_packet_socket::operator=]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.operator_eq_..operator=..basic_seq_packet_socket]
-Move-assign a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from another.
-
-
- basic_seq_packet_socket & ``[link asio.reference.basic_seq_packet_socket.operator_eq_.overload1 operator=]``(
- basic_seq_packet_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.operator_eq_.overload1 more...]]``
-
-
-Move-assign a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_seq_packet_socket >::type & ``[link asio.reference.basic_seq_packet_socket.operator_eq_.overload2 operator=]``(
- basic_seq_packet_socket< Protocol1 > && other);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::operator= (1 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from another.
-
-
- basic_seq_packet_socket & operator=(
- basic_seq_packet_socket && other);
-
-
-This assignment operator moves a sequenced packet socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_seq_packet_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::operator= (2 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_seq_packet_socket >::type & operator=(
- basic_seq_packet_socket< Protocol1 > && other);
-
-
-This assignment operator moves a sequenced packet socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_seq_packet_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol_type basic_seq_packet_socket::protocol_type]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.protocol_type..protocol_type..basic_seq_packet_socket]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:receive basic_seq_packet_socket::receive]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.receive..receive..basic_seq_packet_socket]
-Receive some data on the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_seq_packet_socket.receive.overload1 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags & out_flags);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_seq_packet_socket.receive.overload2 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags & out_flags);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.receive.overload2 more...]]``
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_seq_packet_socket.receive.overload3 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags & out_flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.receive.overload3 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::receive (1 of 3 overloads)]
-
-
-Receive some data on the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags & out_flags);
-
-
-This function is used to receive data on the sequenced packet socket. The function call will block until data has been received successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[out_flags][After the receive call completes, contains flags associated with the received data. For example, if the `socket_base::message_end_of_record` bit is set then the received data marks the end of a record.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.receive(asio::buffer(data, size), out_flags);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::receive (2 of 3 overloads)]
-
-
-Receive some data on the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags & out_flags);
-
-
-This function is used to receive data on the sequenced packet socket. The function call will block until data has been received successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[in_flags][Flags specifying how the receive call is to be made.]]
-
-[[out_flags][After the receive call completes, contains flags associated with the received data. For example, if the `socket_base::message_end_of_record` bit is set then the received data marks the end of a record.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.receive(asio::buffer(data, size), 0, out_flags);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_seq_packet_socket::receive (3 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags in_flags,
- socket_base::message_flags & out_flags,
- asio::error_code & ec);
-
-
-This function is used to receive data on the sequenced packet socket. The function call will block until data has been received successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[in_flags][Flags specifying how the receive call is to be made.]]
-
-[[out_flags][After the receive call completes, contains flags associated with the received data. For example, if the `socket_base::message_end_of_record` bit is set then the received data marks the end of a record.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:receive_buffer_size basic_seq_packet_socket::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.receive_buffer_size..receive_buffer_size..basic_seq_packet_socket]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_low_watermark basic_seq_packet_socket::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.receive_low_watermark..receive_low_watermark..basic_seq_packet_socket]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remote_endpoint basic_seq_packet_socket::remote_endpoint]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.remote_endpoint..remote_endpoint..basic_seq_packet_socket]
-Get the remote endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_seq_packet_socket.remote_endpoint.overload1 remote_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.remote_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_seq_packet_socket.remote_endpoint.overload2 remote_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.remote_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::remote_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint() const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::remote_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:reuse_address basic_seq_packet_socket::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.reuse_address..reuse_address..basic_seq_packet_socket]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:send basic_seq_packet_socket::send]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.send..send..basic_seq_packet_socket]
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_seq_packet_socket.send.overload1 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_seq_packet_socket.send.overload2 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.send.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::send (1 of 2 overloads)]
-
-
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to send data on the sequenced packet socket. The function call will block until the data has been sent successfully, or an until error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.send(asio::buffer(data, size), 0);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::send (2 of 2 overloads)]
-
-
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to send data on the sequenced packet socket. The function call will block the data has been sent successfully, or an until error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:send_buffer_size basic_seq_packet_socket::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.send_buffer_size..send_buffer_size..basic_seq_packet_socket]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_seq_packet_socket::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.send_low_watermark..send_low_watermark..basic_seq_packet_socket]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_seq_packet_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:set_option basic_seq_packet_socket::set_option]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.set_option..set_option..basic_seq_packet_socket]
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_seq_packet_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_seq_packet_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::set_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::set_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- asio::error_code ec;
- socket.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:shutdown basic_seq_packet_socket::shutdown]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown..shutdown..basic_seq_packet_socket]
-Disable sends or receives on the socket.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.shutdown.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.shutdown.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::shutdown (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what,
- asio::error_code & ec);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_seq_packet_socket::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type..shutdown_type..basic_seq_packet_socket]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_seq_packet_socket]
-[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type.shutdown_send..shutdown_send..basic_seq_packet_socket]
-[indexterm2 asio.indexterm.basic_seq_packet_socket.shutdown_type.shutdown_both..shutdown_both..basic_seq_packet_socket]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:wait basic_seq_packet_socket::wait]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.wait..wait..basic_seq_packet_socket]
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.basic_seq_packet_socket.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_seq_packet_socket.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_seq_packet_socket.wait.overload2 more...]]``
-
-
-[section:overload1 basic_seq_packet_socket::wait (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.wait(asio::ip::tcp::socket::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_seq_packet_socket::wait (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.wait(asio::ip::tcp::socket::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_seq_packet_socket::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type..wait_type..basic_seq_packet_socket]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type.wait_read..wait_read..basic_seq_packet_socket]
-[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type.wait_write..wait_write..basic_seq_packet_socket]
-[indexterm2 asio.indexterm.basic_seq_packet_socket.wait_type.wait_error..wait_error..basic_seq_packet_socket]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_basic_seq_packet_socket basic_seq_packet_socket::~basic_seq_packet_socket]
-
-[indexterm2 asio.indexterm.basic_seq_packet_socket._basic_seq_packet_socket..~basic_seq_packet_socket..basic_seq_packet_socket]
-Destroys the socket.
-
-
- ~basic_seq_packet_socket();
-
-
-This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_socket basic_socket]
-
-
-Provides socket functionality.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_socket :
- public socket_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it.
-
- Construct and open a basic_socket.
-
- Construct a basic_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_socket on an existing native socket.
-
- Move-construct a basic_socket from another.
-
- Move-construct a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket from another.
-
- Move-assign a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign basic_socket::assign]
-
-[indexterm2 asio.indexterm.basic_socket.assign..assign..basic_socket]
-Assign an existing native socket to the socket.
-
-
- void ``[link asio.reference.basic_socket.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_socket.assign.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.assign.overload2 more...]]``
-
-
-[section:overload1 basic_socket::assign (1 of 2 overloads)]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::assign (2 of 2 overloads)]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_connect basic_socket::async_connect]
-
-[indexterm2 asio.indexterm.basic_socket.async_connect..async_connect..basic_socket]
-Start an asynchronous connect.
-
-
- template<
- typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- const endpoint_type & peer_endpoint,
- ConnectHandler && handler);
-
-
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void connect_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Connect succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:async_wait basic_socket::async_wait]
-
-[indexterm2 asio.indexterm.basic_socket.async_wait..async_wait..basic_socket]
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:at_mark basic_socket::at_mark]
-
-[indexterm2 asio.indexterm.basic_socket.at_mark..at_mark..basic_socket]
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool ``[link asio.reference.basic_socket.at_mark.overload1 at_mark]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.at_mark.overload1 more...]]``
-
- bool ``[link asio.reference.basic_socket.at_mark.overload2 at_mark]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.at_mark.overload2 more...]]``
-
-
-[section:overload1 basic_socket::at_mark (1 of 2 overloads)]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark() const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::at_mark (2 of 2 overloads)]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark(
- asio::error_code & ec) const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:available basic_socket::available]
-
-[indexterm2 asio.indexterm.basic_socket.available..available..basic_socket]
-Determine the number of bytes available for reading.
-
-
- std::size_t ``[link asio.reference.basic_socket.available.overload1 available]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.available.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_socket.available.overload2 available]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.available.overload2 more...]]``
-
-
-[section:overload1 basic_socket::available (1 of 2 overloads)]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available() const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::available (2 of 2 overloads)]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available(
- asio::error_code & ec) const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_socket basic_socket::basic_socket]
-
-[indexterm2 asio.indexterm.basic_socket.basic_socket..basic_socket..basic_socket]
-Construct a [link asio.reference.basic_socket `basic_socket`] without opening it.
-
-
- explicit ``[link asio.reference.basic_socket.basic_socket.overload1 basic_socket]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.basic_socket `basic_socket`].
-
-
- ``[link asio.reference.basic_socket.basic_socket.overload2 basic_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol);
- `` [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload2 more...]]``
-
-
-Construct a [link asio.reference.basic_socket `basic_socket`], opening it and binding it to the given local endpoint.
-
-
- ``[link asio.reference.basic_socket.basic_socket.overload3 basic_socket]``(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_socket `basic_socket`] on an existing native socket.
-
-
- ``[link asio.reference.basic_socket.basic_socket.overload4 basic_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_socket `basic_socket`] from another.
-
-
- ``[link asio.reference.basic_socket.basic_socket.overload5 basic_socket]``(
- basic_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload5 more...]]``
-
-
-Move-construct a [link asio.reference.basic_socket `basic_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- ``[link asio.reference.basic_socket.basic_socket.overload6 basic_socket]``(
- basic_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_socket.basic_socket.overload6 more...]]``
-
-
-[section:overload1 basic_socket::basic_socket (1 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_socket `basic_socket`] without opening it.
-
-
- basic_socket(
- asio::io_context & io_context);
-
-
-This constructor creates a socket without opening it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::basic_socket (2 of 6 overloads)]
-
-
-Construct and open a [link asio.reference.basic_socket `basic_socket`].
-
-
- basic_socket(
- asio::io_context & io_context,
- const protocol_type & protocol);
-
-
-This constructor creates and opens a socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket::basic_socket (3 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_socket `basic_socket`], opening it and binding it to the given local endpoint.
-
-
- basic_socket(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
-
-
-This constructor creates a socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_socket::basic_socket (4 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_socket `basic_socket`] on an existing native socket.
-
-
- basic_socket(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-This constructor creates a socket object to hold an existing native socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_socket][A native socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_socket::basic_socket (5 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_socket `basic_socket`] from another.
-
-
- basic_socket(
- basic_socket && other);
-
-
-This constructor moves a socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket `basic_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_socket::basic_socket (6 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_socket `basic_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- basic_socket(
- basic_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
-
-
-This constructor moves a socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket `basic_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_socket::bind]
-
-[indexterm2 asio.indexterm.basic_socket.bind..bind..basic_socket]
-Bind the socket to the given local endpoint.
-
-
- void ``[link asio.reference.basic_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket.bind.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.bind.overload2 more...]]``
-
-
-[section:overload1 basic_socket::bind (1 of 2 overloads)]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::bind (2 of 2 overloads)]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint,
- asio::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- asio::error_code ec;
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_socket::broadcast]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.broadcast..broadcast..basic_socket]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable basic_socket::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.bytes_readable..bytes_readable..basic_socket]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_socket::cancel]
-
-[indexterm2 asio.indexterm.basic_socket.cancel..cancel..basic_socket]
-Cancel all asynchronous operations associated with the socket.
-
-
- void ``[link asio.reference.basic_socket.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket.cancel.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_socket::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_socket::close]
-
-[indexterm2 asio.indexterm.basic_socket.close..close..basic_socket]
-Close the socket.
-
-
- void ``[link asio.reference.basic_socket.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket.close.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.close.overload2 more...]]``
-
-
-[section:overload1 basic_socket::close (1 of 2 overloads)]
-
-
-Close the socket.
-
-
- void close();
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::close (2 of 2 overloads)]
-
-
-Close the socket.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:connect basic_socket::connect]
-
-[indexterm2 asio.indexterm.basic_socket.connect..connect..basic_socket]
-Connect the socket to the specified endpoint.
-
-
- void ``[link asio.reference.basic_socket.connect.overload1 connect]``(
- const endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket.connect.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.connect.overload2 connect]``(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.connect.overload2 more...]]``
-
-
-[section:overload1 basic_socket::connect (1 of 2 overloads)]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.connect(endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::connect (2 of 2 overloads)]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- asio::error_code ec;
- socket.connect(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:debug basic_socket::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.debug..debug..basic_socket]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_socket::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.do_not_route..do_not_route..basic_socket]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_socket::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.enable_connection_aborted..enable_connection_aborted..basic_socket]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_socket::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_socket.endpoint_type..endpoint_type..basic_socket]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_socket::executor_type]
-
-[indexterm2 asio.indexterm.basic_socket.executor_type..executor_type..basic_socket]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_socket::get_executor]
-
-[indexterm2 asio.indexterm.basic_socket.get_executor..get_executor..basic_socket]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_socket::get_io_context]
-
-[indexterm2 asio.indexterm.basic_socket.get_io_context..get_io_context..basic_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_socket::get_io_service]
-
-[indexterm2 asio.indexterm.basic_socket.get_io_service..get_io_service..basic_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_socket::get_option]
-
-[indexterm2 asio.indexterm.basic_socket.get_option..get_option..basic_socket]
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_socket.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_socket.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_socket::get_option (1 of 2 overloads)]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::get_option (2 of 2 overloads)]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option,
- asio::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- asio::error_code ec;
- socket.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:io_control basic_socket::io_control]
-
-[indexterm2 asio.indexterm.basic_socket.io_control..io_control..basic_socket]
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_socket.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.basic_socket.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_socket.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_socket::io_control (1 of 2 overloads)]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::io_control (2 of 2 overloads)]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- asio::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open basic_socket::is_open]
-
-[indexterm2 asio.indexterm.basic_socket.is_open..is_open..basic_socket]
-Determine whether the socket is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_socket::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.keep_alive..keep_alive..basic_socket]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_socket::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.linger..linger..basic_socket]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:local_endpoint basic_socket::local_endpoint]
-
-[indexterm2 asio.indexterm.basic_socket.local_endpoint..local_endpoint..basic_socket]
-Get the local endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_socket.local_endpoint.overload1 local_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.local_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_socket.local_endpoint.overload2 local_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_socket::local_endpoint (1 of 2 overloads)]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::local_endpoint (2 of 2 overloads)]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer basic_socket::lowest_layer]
-
-[indexterm2 asio.indexterm.basic_socket.lowest_layer..lowest_layer..basic_socket]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.basic_socket.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.basic_socket.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_socket::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_socket::lowest_layer_type]
-
-[indexterm2 asio.indexterm.basic_socket.lowest_layer_type..lowest_layer_type..basic_socket]
-A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer.
-
-
- typedef basic_socket< Protocol > lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it.
-
- Construct and open a basic_socket.
-
- Construct a basic_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_socket on an existing native socket.
-
- Move-construct a basic_socket from another.
-
- Move-construct a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket from another.
-
- Move-assign a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections basic_socket::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.max_connections..max_connections..basic_socket]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections basic_socket::max_listen_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.max_listen_connections..max_listen_connections..basic_socket]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_socket::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.message_do_not_route..message_do_not_route..basic_socket]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_socket::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.message_end_of_record..message_end_of_record..basic_socket]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_socket::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.message_flags..message_flags..basic_socket]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_socket::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.message_out_of_band..message_out_of_band..basic_socket]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_socket::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.message_peek..message_peek..basic_socket]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_socket::native_handle]
-
-[indexterm2 asio.indexterm.basic_socket.native_handle..native_handle..basic_socket]
-Get the native socket representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_socket::native_handle_type]
-
-[indexterm2 asio.indexterm.basic_socket.native_handle_type..native_handle_type..basic_socket]
-The native representation of a socket.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_socket::native_non_blocking]
-
-[indexterm2 asio.indexterm.basic_socket.native_non_blocking..native_non_blocking..basic_socket]
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool ``[link asio.reference.basic_socket.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void ``[link asio.reference.basic_socket.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_socket.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_socket.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_socket::native_non_blocking (1 of 3 overloads)]
-
-
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native socket. This mode has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying socket is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the socket object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native socket.
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::native_non_blocking (2 of 3 overloads)]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket::native_non_blocking (3 of 3 overloads)]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_socket::non_blocking]
-
-[indexterm2 asio.indexterm.basic_socket.non_blocking..non_blocking..basic_socket]
-Gets the non-blocking mode of the socket.
-
-
- bool ``[link asio.reference.basic_socket.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket.
-
-
- void ``[link asio.reference.basic_socket.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_socket.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_socket.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_socket::non_blocking (1 of 3 overloads)]
-
-
-Gets the non-blocking mode of the socket.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::non_blocking (2 of 3 overloads)]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket::non_blocking (3 of 3 overloads)]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_socket::open]
-
-[indexterm2 asio.indexterm.basic_socket.open..open..basic_socket]
-Open the socket using the specified protocol.
-
-
- void ``[link asio.reference.basic_socket.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
- `` [''''&raquo;''' [link asio.reference.basic_socket.open.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.open.overload2 open]``(
- const protocol_type & protocol,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.open.overload2 more...]]``
-
-
-[section:overload1 basic_socket::open (1 of 2 overloads)]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::open (2 of 2 overloads)]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol,
- asio::error_code & ec);
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::error_code ec;
- socket.open(asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq_ basic_socket::operator=]
-
-[indexterm2 asio.indexterm.basic_socket.operator_eq_..operator=..basic_socket]
-Move-assign a [link asio.reference.basic_socket `basic_socket`] from another.
-
-
- basic_socket & ``[link asio.reference.basic_socket.operator_eq_.overload1 operator=]``(
- basic_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket.operator_eq_.overload1 more...]]``
-
-
-Move-assign a [link asio.reference.basic_socket `basic_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket >::type & ``[link asio.reference.basic_socket.operator_eq_.overload2 operator=]``(
- basic_socket< Protocol1 > && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 basic_socket::operator= (1 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_socket `basic_socket`] from another.
-
-
- basic_socket & operator=(
- basic_socket && other);
-
-
-This assignment operator moves a socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket `basic_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::operator= (2 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_socket `basic_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket >::type & operator=(
- basic_socket< Protocol1 > && other);
-
-
-This assignment operator moves a socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket `basic_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol_type basic_socket::protocol_type]
-
-[indexterm2 asio.indexterm.basic_socket.protocol_type..protocol_type..basic_socket]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_buffer_size basic_socket::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.receive_buffer_size..receive_buffer_size..basic_socket]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_low_watermark basic_socket::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.receive_low_watermark..receive_low_watermark..basic_socket]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remote_endpoint basic_socket::remote_endpoint]
-
-[indexterm2 asio.indexterm.basic_socket.remote_endpoint..remote_endpoint..basic_socket]
-Get the remote endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_socket.remote_endpoint.overload1 remote_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.remote_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_socket.remote_endpoint.overload2 remote_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket.remote_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_socket::remote_endpoint (1 of 2 overloads)]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint() const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::remote_endpoint (2 of 2 overloads)]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:reuse_address basic_socket::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.reuse_address..reuse_address..basic_socket]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_buffer_size basic_socket::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.send_buffer_size..send_buffer_size..basic_socket]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_socket::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.send_low_watermark..send_low_watermark..basic_socket]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:set_option basic_socket::set_option]
-
-[indexterm2 asio.indexterm.basic_socket.set_option..set_option..basic_socket]
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_socket.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_socket::set_option (1 of 2 overloads)]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::set_option (2 of 2 overloads)]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- asio::error_code ec;
- socket.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:shutdown basic_socket::shutdown]
-
-[indexterm2 asio.indexterm.basic_socket.shutdown..shutdown..basic_socket]
-Disable sends or receives on the socket.
-
-
- void ``[link asio.reference.basic_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
- `` [''''&raquo;''' [link asio.reference.basic_socket.shutdown.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.shutdown.overload2 more...]]``
-
-
-[section:overload1 basic_socket::shutdown (1 of 2 overloads)]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::shutdown (2 of 2 overloads)]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what,
- asio::error_code & ec);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_socket::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.shutdown_type..shutdown_type..basic_socket]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.basic_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_socket]
-[indexterm2 asio.indexterm.basic_socket.shutdown_type.shutdown_send..shutdown_send..basic_socket]
-[indexterm2 asio.indexterm.basic_socket.shutdown_type.shutdown_both..shutdown_both..basic_socket]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:wait basic_socket::wait]
-
-[indexterm2 asio.indexterm.basic_socket.wait..wait..basic_socket]
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.basic_socket.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.basic_socket.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket.wait.overload2 more...]]``
-
-
-[section:overload1 basic_socket::wait (1 of 2 overloads)]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.wait(asio::ip::tcp::socket::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket::wait (2 of 2 overloads)]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.wait(asio::ip::tcp::socket::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_socket::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket.wait_type..wait_type..basic_socket]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.basic_socket.wait_type.wait_read..wait_read..basic_socket]
-[indexterm2 asio.indexterm.basic_socket.wait_type.wait_write..wait_write..basic_socket]
-[indexterm2 asio.indexterm.basic_socket.wait_type.wait_error..wait_error..basic_socket]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_basic_socket basic_socket::~basic_socket]
-
-[indexterm2 asio.indexterm.basic_socket._basic_socket..~basic_socket..basic_socket]
-Protected destructor to prevent deletion through this type.
-
-
- ~basic_socket();
-
-
-This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_socket_acceptor basic_socket_acceptor]
-
-
-Provides the ability to accept new connections.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_socket_acceptor :
- public socket_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.native_handle_type [*native_handle_type]]]
- [The native representation of an acceptor. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_acceptor.accept [*accept]]]
- [Accept a new connection.
-
- Accept a new connection and obtain the endpoint of the peer. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.assign [*assign]]]
- [Assigns an existing native acceptor to the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
- [Start an asynchronous accept. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.async_wait [*async_wait]]]
- [Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
- [Construct an acceptor without opening it.
-
- Construct an open acceptor.
-
- Construct an acceptor opened on the given endpoint.
-
- Construct a basic_socket_acceptor on an existing native acceptor.
-
- Move-construct a basic_socket_acceptor from another.
-
- Move-construct a basic_socket_acceptor from an acceptor of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.bind [*bind]]]
- [Bind the acceptor to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.close [*close]]]
- [Close the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_option [*get_option]]]
- [Get an option from the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.io_control [*io_control]]]
- [Perform an IO control command on the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.is_open [*is_open]]]
- [Determine whether the acceptor is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.listen [*listen]]]
- [Place the acceptor into the state where it will listen for new connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.native_handle [*native_handle]]]
- [Get the native acceptor representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native acceptor implementation.
-
- Sets the non-blocking mode of the native acceptor implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the acceptor.
-
- Sets the non-blocking mode of the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.open [*open]]]
- [Open the acceptor using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_acceptor from another.
-
- Move-assign a basic_socket_acceptor from an acceptor of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.set_option [*set_option]]]
- [Set an option on the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.wait [*wait]]]
- [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor._basic_socket_acceptor [*~basic_socket_acceptor]]]
- [Destroys the acceptor. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] class template is used for accepting new socket connections.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Example]
-
-Opening a socket acceptor with the SO\_REUSEADDR option enabled:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), port);
- acceptor.open(endpoint.protocol());
- acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen();
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:accept basic_socket_acceptor::accept]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.accept..accept..basic_socket_acceptor]
-Accept a new connection.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- void ``[link asio.reference.basic_socket_acceptor.accept.overload1 accept]``(
- basic_socket< Protocol1 > & peer,
- typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- void ``[link asio.reference.basic_socket_acceptor.accept.overload2 accept]``(
- basic_socket< Protocol1 > & peer,
- asio::error_code & ec,
- typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload2 more...]]``
-
-
-Accept a new connection and obtain the endpoint of the peer.
-
-
- void ``[link asio.reference.basic_socket_acceptor.accept.overload3 accept]``(
- basic_socket< protocol_type > & peer,
- endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload3 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.accept.overload4 accept]``(
- basic_socket< protocol_type > & peer,
- endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload4 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload5 accept]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload5 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload6 accept]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload6 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload7 accept]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload7 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload8 accept]``(
- asio::io_context & io_context,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload8 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload9 accept]``(
- endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload9 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload10 accept]``(
- endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload10 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload11 accept]``(
- asio::io_context & io_context,
- endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload11 more...]]``
-
- Protocol::socket ``[link asio.reference.basic_socket_acceptor.accept.overload12 accept]``(
- asio::io_context & io_context,
- endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.accept.overload12 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::accept (1 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- void accept(
- basic_socket< Protocol1 > & peer,
- typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type * = 0);
-
-
-This function is used to accept a new connection from a peer into the given socket. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer][The socket into which the new connection will be accepted.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(io_context);
- acceptor.accept(socket);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::accept (2 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- void accept(
- basic_socket< Protocol1 > & peer,
- asio::error_code & ec,
- typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type * = 0);
-
-
-This function is used to accept a new connection from a peer into the given socket. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer][The socket into which the new connection will be accepted.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(io_context);
- asio::error_code ec;
- acceptor.accept(socket, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_acceptor::accept (3 of 12 overloads)]
-
-
-Accept a new connection and obtain the endpoint of the peer.
-
-
- void accept(
- basic_socket< protocol_type > & peer,
- endpoint_type & peer_endpoint);
-
-
-This function is used to accept a new connection from a peer into the given socket, and additionally provide the endpoint of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer][The socket into which the new connection will be accepted.]]
-
-[[peer_endpoint][An endpoint object which will receive the endpoint of the remote peer.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint;
- acceptor.accept(socket, endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_socket_acceptor::accept (4 of 12 overloads)]
-
-
-Accept a new connection and obtain the endpoint of the peer.
-
-
- void accept(
- basic_socket< protocol_type > & peer,
- endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to accept a new connection from a peer into the given socket, and additionally provide the endpoint of the remote peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer][The socket into which the new connection will be accepted.]]
-
-[[peer_endpoint][An endpoint object which will receive the endpoint of the remote peer.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint;
- asio::error_code ec;
- acceptor.accept(socket, endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_socket_acceptor::accept (5 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept();
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Return Value]
-
-A socket object representing the newly accepted connection.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(acceptor.accept());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_socket_acceptor::accept (6 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- asio::error_code & ec);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-On success, a socket object representing the newly accepted connection. On error, a socket object where `is_open()` is false.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(acceptor.accept(ec));
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 basic_socket_acceptor::accept (7 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- asio::io_context & io_context);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object to be used for the newly accepted socket.]]
-
-]
-
-
-[heading Return Value]
-
-A socket object representing the newly accepted connection.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(acceptor.accept());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 basic_socket_acceptor::accept (8 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- asio::io_context & io_context,
- asio::error_code & ec);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object to be used for the newly accepted socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-On success, a socket object representing the newly accepted connection. On error, a socket object where `is_open()` is false.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(acceptor.accept(io_context2, ec));
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload9 basic_socket_acceptor::accept (9 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- endpoint_type & peer_endpoint);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written.]]
-
-]
-
-
-[heading Return Value]
-
-A socket object representing the newly accepted connection.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint;
- asio::ip::tcp::socket socket(acceptor.accept(endpoint));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload10 basic_socket_acceptor::accept (10 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-On success, a socket object representing the newly accepted connection. On error, a socket object where `is_open()` is false.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint;
- asio::ip::tcp::socket socket(acceptor.accept(endpoint, ec));
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload11 basic_socket_acceptor::accept (11 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- asio::io_context & io_context,
- endpoint_type & peer_endpoint);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object to be used for the newly accepted socket.]]
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written.]]
-
-]
-
-
-[heading Return Value]
-
-A socket object representing the newly accepted connection.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint;
- asio::ip::tcp::socket socket(
- acceptor.accept(io_context2, endpoint));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 basic_socket_acceptor::accept (12 of 12 overloads)]
-
-
-Accept a new connection.
-
-
- Protocol::socket accept(
- asio::io_context & io_context,
- endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to accept a new connection from a peer. The function call will block until a new connection has been accepted successfully or an error occurs.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object to be used for the newly accepted socket.]]
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-On success, a socket object representing the newly accepted connection. On error, a socket object where `is_open()` is false.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint;
- asio::ip::tcp::socket socket(
- acceptor.accept(io_context2, endpoint, ec));
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:assign basic_socket_acceptor::assign]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.assign..assign..basic_socket_acceptor]
-Assigns an existing native acceptor to the acceptor.
-
-
- void ``[link asio.reference.basic_socket_acceptor.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_acceptor);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.assign.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_acceptor,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.assign.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::assign (1 of 2 overloads)]
-
-
-Assigns an existing native acceptor to the acceptor.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_acceptor);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::assign (2 of 2 overloads)]
-
-
-Assigns an existing native acceptor to the acceptor.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_acceptor,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_accept basic_socket_acceptor::async_accept]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.async_accept..async_accept..basic_socket_acceptor]
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``,
- typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload1 async_accept]``(
- basic_socket< Protocol1 > & peer,
- AcceptHandler && handler,
- typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload2 async_accept]``(
- basic_socket< protocol_type > & peer,
- endpoint_type & peer_endpoint,
- AcceptHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload3 async_accept]``(
- MoveAcceptHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload4 async_accept]``(
- asio::io_context & io_context,
- MoveAcceptHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload5 async_accept]``(
- endpoint_type & peer_endpoint,
- MoveAcceptHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_socket_acceptor.async_accept.overload6 async_accept]``(
- asio::io_context & io_context,
- endpoint_type & peer_endpoint,
- MoveAcceptHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.async_accept.overload6 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::async_accept (1 of 6 overloads)]
-
-
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``,
- typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
- basic_socket< Protocol1 > & peer,
- AcceptHandler && handler,
- typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type * = 0);
-
-
-This function is used to asynchronously accept a new connection into a socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer][The socket into which the new connection will be accepted. Ownership of the peer object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void accept_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Accept succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::socket socket(io_context);
- acceptor.async_accept(socket, accept_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::async_accept (2 of 6 overloads)]
-
-
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.AcceptHandler AcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
- basic_socket< protocol_type > & peer,
- endpoint_type & peer_endpoint,
- AcceptHandler && handler);
-
-
-This function is used to asynchronously accept a new connection into a socket, and additionally obtain the endpoint of the remote peer. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer][The socket into which the new connection will be accepted. Ownership of the peer object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written. Ownership of the peer\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_acceptor::async_accept (3 of 6 overloads)]
-
-
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
- MoveAcceptHandler && handler);
-
-
-This function is used to asynchronously accept a new connection. The function call always returns immediately.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- typename Protocol::socket peer // On success, the newly accepted socket.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void accept_handler(const asio::error_code& error,
- asio::ip::tcp::socket peer)
- {
- if (!error)
- {
- // Accept succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- acceptor.async_accept(accept_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_socket_acceptor::async_accept (4 of 6 overloads)]
-
-
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
- asio::io_context & io_context,
- MoveAcceptHandler && handler);
-
-
-This function is used to asynchronously accept a new connection. The function call always returns immediately.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object to be used for the newly accepted socket.]]
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- typename Protocol::socket peer // On success, the newly accepted socket.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void accept_handler(const asio::error_code& error,
- asio::ip::tcp::socket peer)
- {
- if (!error)
- {
- // Accept succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- acceptor.async_accept(io_context2, accept_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_socket_acceptor::async_accept (5 of 6 overloads)]
-
-
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
- endpoint_type & peer_endpoint,
- MoveAcceptHandler && handler);
-
-
-This function is used to asynchronously accept a new connection. The function call always returns immediately.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written. Ownership of the peer\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- typename Protocol::socket peer // On success, the newly accepted socket.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void accept_handler(const asio::error_code& error,
- asio::ip::tcp::socket peer)
- {
- if (!error)
- {
- // Accept succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint;
- acceptor.async_accept(endpoint, accept_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_socket_acceptor::async_accept (6 of 6 overloads)]
-
-
-Start an asynchronous accept.
-
-
- template<
- typename ``[link asio.reference.MoveAcceptHandler MoveAcceptHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_accept(
- asio::io_context & io_context,
- endpoint_type & peer_endpoint,
- MoveAcceptHandler && handler);
-
-
-This function is used to asynchronously accept a new connection. The function call always returns immediately.
-
-This overload requires that the Protocol template parameter satisfy the AcceptableProtocol type requirements.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object to be used for the newly accepted socket.]]
-
-[[peer_endpoint][An endpoint object into which the endpoint of the remote peer will be written. Ownership of the peer\_endpoint object is retained by the caller, which must guarantee that it is valid until the handler is called.]]
-
-[[handler][The handler to be called when the accept operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- typename Protocol::socket peer // On success, the newly accepted socket.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void accept_handler(const asio::error_code& error,
- asio::ip::tcp::socket peer)
- {
- if (!error)
- {
- // Accept succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint;
- acceptor.async_accept(io_context2, endpoint, accept_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait basic_socket_acceptor::async_wait]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.async_wait..async_wait..basic_socket_acceptor]
-Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for an acceptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired acceptor state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- acceptor.async_wait(
- asio::ip::tcp::acceptor::wait_read,
- wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-[section:basic_socket_acceptor basic_socket_acceptor::basic_socket_acceptor]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.basic_socket_acceptor..basic_socket_acceptor..basic_socket_acceptor]
-Construct an acceptor without opening it.
-
-
- explicit ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload1 basic_socket_acceptor]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload1 more...]]``
-
-
-Construct an open acceptor.
-
-
- ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload2 basic_socket_acceptor]``(
- asio::io_context & io_context,
- const protocol_type & protocol);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload2 more...]]``
-
-
-Construct an acceptor opened on the given endpoint.
-
-
- ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload3 basic_socket_acceptor]``(
- asio::io_context & io_context,
- const endpoint_type & endpoint,
- bool reuse_addr = true);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] on an existing native acceptor.
-
-
- ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload4 basic_socket_acceptor]``(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_acceptor);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from another.
-
-
- ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload5 basic_socket_acceptor]``(
- basic_socket_acceptor && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload5 more...]]``
-
-
-Move-construct a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from an acceptor of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- ``[link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload6 basic_socket_acceptor]``(
- basic_socket_acceptor< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.basic_socket_acceptor.overload6 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::basic_socket_acceptor (1 of 6 overloads)]
-
-
-Construct an acceptor without opening it.
-
-
- basic_socket_acceptor(
- asio::io_context & io_context);
-
-
-This constructor creates an acceptor without opening it to listen for new connections. The `open()` function must be called before the acceptor can accept new socket connections.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::basic_socket_acceptor (2 of 6 overloads)]
-
-
-Construct an open acceptor.
-
-
- basic_socket_acceptor(
- asio::io_context & io_context,
- const protocol_type & protocol);
-
-
-This constructor creates an acceptor and automatically opens it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_acceptor::basic_socket_acceptor (3 of 6 overloads)]
-
-
-Construct an acceptor opened on the given endpoint.
-
-
- basic_socket_acceptor(
- asio::io_context & io_context,
- const endpoint_type & endpoint,
- bool reuse_addr = true);
-
-
-This constructor creates an acceptor and automatically opens it to listen for new connections on the specified endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
-
-[[endpoint][An endpoint on the local machine on which the acceptor will listen for new connections.]]
-
-[[reuse_addr][Whether the constructor should set the socket option `socket_base::reuse_address`.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This constructor is equivalent to the following code:
-
- basic_socket_acceptor<Protocol> acceptor(io_context);
- acceptor.open(endpoint.protocol());
- if (reuse_addr)
- acceptor.set_option(socket_base::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen(listen_backlog);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_socket_acceptor::basic_socket_acceptor (4 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] on an existing native acceptor.
-
-
- basic_socket_acceptor(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_acceptor);
-
-
-This constructor creates an acceptor object to hold an existing native acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the acceptor will use to dispatch handlers for any asynchronous operations performed on the acceptor.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_acceptor][A native acceptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_socket_acceptor::basic_socket_acceptor (5 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from another.
-
-
- basic_socket_acceptor(
- basic_socket_acceptor && other);
-
-
-This constructor moves an acceptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket_acceptor(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_socket_acceptor::basic_socket_acceptor (6 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from an acceptor of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- basic_socket_acceptor(
- basic_socket_acceptor< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
-
-
-This constructor moves an acceptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_socket_acceptor::bind]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.bind..bind..basic_socket_acceptor]
-Bind the acceptor to the given local endpoint.
-
-
- void ``[link asio.reference.basic_socket_acceptor.bind.overload1 bind]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.bind.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.bind.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::bind (1 of 2 overloads)]
-
-
-Bind the acceptor to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket acceptor to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket acceptor will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 12345);
- acceptor.open(endpoint.protocol());
- acceptor.bind(endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::bind (2 of 2 overloads)]
-
-
-Bind the acceptor to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint,
- asio::error_code & ec);
-
-
-This function binds the socket acceptor to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket acceptor will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 12345);
- acceptor.open(endpoint.protocol());
- asio::error_code ec;
- acceptor.bind(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_socket_acceptor::broadcast]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.broadcast..broadcast..basic_socket_acceptor]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable basic_socket_acceptor::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.bytes_readable..bytes_readable..basic_socket_acceptor]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_socket_acceptor::cancel]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.cancel..cancel..basic_socket_acceptor]
-Cancel all asynchronous operations associated with the acceptor.
-
-
- void ``[link asio.reference.basic_socket_acceptor.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.cancel.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the acceptor.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the acceptor.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_socket_acceptor::close]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.close..close..basic_socket_acceptor]
-Close the acceptor.
-
-
- void ``[link asio.reference.basic_socket_acceptor.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.close.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.close.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::close (1 of 2 overloads)]
-
-
-Close the acceptor.
-
-
- void close();
-
-
-This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
-
-A subsequent call to `open()` is required before the acceptor can again be used to again perform socket accept operations.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::close (2 of 2 overloads)]
-
-
-Close the acceptor.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
-
-A subsequent call to `open()` is required before the acceptor can again be used to again perform socket accept operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::error_code ec;
- acceptor.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:debug basic_socket_acceptor::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.debug..debug..basic_socket_acceptor]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_socket_acceptor::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.do_not_route..do_not_route..basic_socket_acceptor]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_socket_acceptor::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.enable_connection_aborted..enable_connection_aborted..basic_socket_acceptor]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_socket_acceptor::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.endpoint_type..endpoint_type..basic_socket_acceptor]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_socket_acceptor::executor_type]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.executor_type..executor_type..basic_socket_acceptor]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_socket_acceptor::get_executor]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.get_executor..get_executor..basic_socket_acceptor]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_socket_acceptor::get_io_context]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.get_io_context..get_io_context..basic_socket_acceptor]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_socket_acceptor::get_io_service]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.get_io_service..get_io_service..basic_socket_acceptor]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_socket_acceptor::get_option]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.get_option..get_option..basic_socket_acceptor]
-Get an option from the acceptor.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_socket_acceptor.get_option.overload1 get_option]``(
- GettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_socket_acceptor.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::get_option (1 of 2 overloads)]
-
-
-Get an option from the acceptor.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option);
-
-
-This function is used to get the current value of an option on the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the acceptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_REUSEADDR option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::acceptor::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::get_option (2 of 2 overloads)]
-
-
-Get an option from the acceptor.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to get the current value of an option on the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the acceptor.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_REUSEADDR option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::acceptor::reuse_address option;
- asio::error_code ec;
- acceptor.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:io_control basic_socket_acceptor::io_control]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.io_control..io_control..basic_socket_acceptor]
-Perform an IO control command on the acceptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_socket_acceptor.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_socket_acceptor.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::io_control (1 of 2 overloads)]
-
-
-Perform an IO control command on the acceptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the acceptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::acceptor::non_blocking_io command(true);
- socket.io_control(command);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::io_control (2 of 2 overloads)]
-
-
-Perform an IO control command on the acceptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the acceptor.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::acceptor::non_blocking_io command(true);
- asio::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open basic_socket_acceptor::is_open]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.is_open..is_open..basic_socket_acceptor]
-Determine whether the acceptor is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_socket_acceptor::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.keep_alive..keep_alive..basic_socket_acceptor]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_socket_acceptor::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.linger..linger..basic_socket_acceptor]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:listen basic_socket_acceptor::listen]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.listen..listen..basic_socket_acceptor]
-Place the acceptor into the state where it will listen for new connections.
-
-
- void ``[link asio.reference.basic_socket_acceptor.listen.overload1 listen]``(
- int backlog = socket_base::max_listen_connections);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.listen.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.listen.overload2 listen]``(
- int backlog,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.listen.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::listen (1 of 2 overloads)]
-
-
-Place the acceptor into the state where it will listen for new connections.
-
-
- void listen(
- int backlog = socket_base::max_listen_connections);
-
-
-This function puts the socket acceptor into the state where it may accept new connections.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[backlog][The maximum length of the queue of pending connections.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::listen (2 of 2 overloads)]
-
-
-Place the acceptor into the state where it will listen for new connections.
-
-
- void listen(
- int backlog,
- asio::error_code & ec);
-
-
-This function puts the socket acceptor into the state where it may accept new connections.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[backlog][The maximum length of the queue of pending connections.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::error_code ec;
- acceptor.listen(asio::socket_base::max_listen_connections, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:local_endpoint basic_socket_acceptor::local_endpoint]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.local_endpoint..local_endpoint..basic_socket_acceptor]
-Get the local endpoint of the acceptor.
-
-
- endpoint_type ``[link asio.reference.basic_socket_acceptor.local_endpoint.overload1 local_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.local_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_socket_acceptor.local_endpoint.overload2 local_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::local_endpoint (1 of 2 overloads)]
-
-
-Get the local endpoint of the acceptor.
-
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the acceptor.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the acceptor.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::local_endpoint (2 of 2 overloads)]
-
-
-Get the local endpoint of the acceptor.
-
-
- endpoint_type local_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the acceptor. Returns a default-constructed endpoint object if an error occurred and the error handler did not throw an exception.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:max_connections basic_socket_acceptor::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.max_connections..max_connections..basic_socket_acceptor]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections basic_socket_acceptor::max_listen_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.max_listen_connections..max_listen_connections..basic_socket_acceptor]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_socket_acceptor::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.message_do_not_route..message_do_not_route..basic_socket_acceptor]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_socket_acceptor::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.message_end_of_record..message_end_of_record..basic_socket_acceptor]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_socket_acceptor::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.message_flags..message_flags..basic_socket_acceptor]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_socket_acceptor::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.message_out_of_band..message_out_of_band..basic_socket_acceptor]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_socket_acceptor::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.message_peek..message_peek..basic_socket_acceptor]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_socket_acceptor::native_handle]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.native_handle..native_handle..basic_socket_acceptor]
-Get the native acceptor representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the acceptor. This is intended to allow access to native acceptor functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_socket_acceptor::native_handle_type]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.native_handle_type..native_handle_type..basic_socket_acceptor]
-The native representation of an acceptor.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_socket_acceptor::native_non_blocking]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.native_non_blocking..native_non_blocking..basic_socket_acceptor]
-Gets the non-blocking mode of the native acceptor implementation.
-
-
- bool ``[link asio.reference.basic_socket_acceptor.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native acceptor implementation.
-
-
- void ``[link asio.reference.basic_socket_acceptor.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::native_non_blocking (1 of 3 overloads)]
-
-
-Gets the non-blocking mode of the native acceptor implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native acceptor. This mode has no effect on the behaviour of the acceptor object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying acceptor is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the acceptor object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native acceptor.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::native_non_blocking (2 of 3 overloads)]
-
-
-Sets the non-blocking mode of the native acceptor implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native acceptor. It has no effect on the behaviour of the acceptor object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying acceptor is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_acceptor::native_non_blocking (3 of 3 overloads)]
-
-
-Sets the non-blocking mode of the native acceptor implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native acceptor. It has no effect on the behaviour of the acceptor object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying acceptor is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_socket_acceptor::non_blocking]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.non_blocking..non_blocking..basic_socket_acceptor]
-Gets the non-blocking mode of the acceptor.
-
-
- bool ``[link asio.reference.basic_socket_acceptor.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the acceptor.
-
-
- void ``[link asio.reference.basic_socket_acceptor.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::non_blocking (1 of 3 overloads)]
-
-
-Gets the non-blocking mode of the acceptor.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the acceptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::non_blocking (2 of 3 overloads)]
-
-
-Sets the non-blocking mode of the acceptor.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the acceptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_acceptor::non_blocking (3 of 3 overloads)]
-
-
-Sets the non-blocking mode of the acceptor.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the acceptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_socket_acceptor::open]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.open..open..basic_socket_acceptor]
-Open the acceptor using the specified protocol.
-
-
- void ``[link asio.reference.basic_socket_acceptor.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.open.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.open.overload2 open]``(
- const protocol_type & protocol,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.open.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::open (1 of 2 overloads)]
-
-
-Open the acceptor using the specified protocol.
-
-
- void open(
- const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket acceptor so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- acceptor.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::open (2 of 2 overloads)]
-
-
-Open the acceptor using the specified protocol.
-
-
- void open(
- const protocol_type & protocol,
- asio::error_code & ec);
-
-
-This function opens the socket acceptor so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::acceptor acceptor(io_context);
- asio::error_code ec;
- acceptor.open(asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq_ basic_socket_acceptor::operator=]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.operator_eq_..operator=..basic_socket_acceptor]
-Move-assign a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from another.
-
-
- basic_socket_acceptor & ``[link asio.reference.basic_socket_acceptor.operator_eq_.overload1 operator=]``(
- basic_socket_acceptor && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.operator_eq_.overload1 more...]]``
-
-
-Move-assign a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from an acceptor of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket_acceptor >::type & ``[link asio.reference.basic_socket_acceptor.operator_eq_.overload2 operator=]``(
- basic_socket_acceptor< Protocol1 > && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::operator= (1 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from another.
-
-
- basic_socket_acceptor & operator=(
- basic_socket_acceptor && other);
-
-
-This assignment operator moves an acceptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket_acceptor(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::operator= (2 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] from an acceptor of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_socket_acceptor >::type & operator=(
- basic_socket_acceptor< Protocol1 > && other);
-
-
-This assignment operator moves an acceptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol_type basic_socket_acceptor::protocol_type]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.protocol_type..protocol_type..basic_socket_acceptor]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_buffer_size basic_socket_acceptor::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.receive_buffer_size..receive_buffer_size..basic_socket_acceptor]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_low_watermark basic_socket_acceptor::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.receive_low_watermark..receive_low_watermark..basic_socket_acceptor]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reuse_address basic_socket_acceptor::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.reuse_address..reuse_address..basic_socket_acceptor]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_buffer_size basic_socket_acceptor::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.send_buffer_size..send_buffer_size..basic_socket_acceptor]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_socket_acceptor::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.send_low_watermark..send_low_watermark..basic_socket_acceptor]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_acceptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:set_option basic_socket_acceptor::set_option]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.set_option..set_option..basic_socket_acceptor]
-Set an option on the acceptor.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_socket_acceptor.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_socket_acceptor.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::set_option (1 of 2 overloads)]
-
-
-Set an option on the acceptor.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
-
-
-This function is used to set an option on the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the acceptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the SOL\_SOCKET/SO\_REUSEADDR option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::acceptor::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::set_option (2 of 2 overloads)]
-
-
-Set an option on the acceptor.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the acceptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the acceptor.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the SOL\_SOCKET/SO\_REUSEADDR option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::ip::tcp::acceptor::reuse_address option(true);
- asio::error_code ec;
- acceptor.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_socket_acceptor::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type..shutdown_type..basic_socket_acceptor]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type.shutdown_receive..shutdown_receive..basic_socket_acceptor]
-[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type.shutdown_send..shutdown_send..basic_socket_acceptor]
-[indexterm2 asio.indexterm.basic_socket_acceptor.shutdown_type.shutdown_both..shutdown_both..basic_socket_acceptor]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:wait basic_socket_acceptor::wait]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.wait..wait..basic_socket_acceptor]
-Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.basic_socket_acceptor.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_socket_acceptor.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_socket_acceptor.wait.overload2 more...]]``
-
-
-[section:overload1 basic_socket_acceptor::wait (1 of 2 overloads)]
-
-
-Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for an acceptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired acceptor state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for an acceptor to become readable.
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- acceptor.wait(asio::ip::tcp::acceptor::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_acceptor::wait (2 of 2 overloads)]
-
-
-Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for an acceptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired acceptor state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for an acceptor to become readable.
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::error_code ec;
- acceptor.wait(asio::ip::tcp::acceptor::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_socket_acceptor::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type..wait_type..basic_socket_acceptor]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type.wait_read..wait_read..basic_socket_acceptor]
-[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type.wait_write..wait_write..basic_socket_acceptor]
-[indexterm2 asio.indexterm.basic_socket_acceptor.wait_type.wait_error..wait_error..basic_socket_acceptor]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_basic_socket_acceptor basic_socket_acceptor::~basic_socket_acceptor]
-
-[indexterm2 asio.indexterm.basic_socket_acceptor._basic_socket_acceptor..~basic_socket_acceptor..basic_socket_acceptor]
-Destroys the acceptor.
-
-
- ~basic_socket_acceptor();
-
-
-This function destroys the acceptor, cancelling any outstanding asynchronous operations associated with the acceptor as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_socket_iostream basic_socket_iostream]
-
-
-Iostream interface for a socket.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Clock = chrono::steady_clock,
- typename ``[link asio.reference.WaitTraits WaitTraits]`` = wait_traits<Clock>>
- class basic_socket_iostream
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration [*duration]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration_type [*duration_type]]]
- [(Deprecated: Use duration.) The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_type [*time_type]]]
- [(Deprecated: Use time_point.) The time type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
- [Construct a basic_socket_iostream without establishing a connection.
-
- Construct a basic_socket_iostream from the supplied socket.
-
- Move-construct a basic_socket_iostream from another.
-
- Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.connect [*connect]]]
- [Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.error [*error]]]
- [Get the last error associated with the stream. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_after [*expires_after]]]
- [Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time as an absolute time.
-
- Set the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expiry [*expiry]]]
- [Get the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_iostream from another. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
- [Return a pointer to the underlying streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.socket [*socket]]]
- [Get a reference to the underlying socket. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_socket_iostream basic_socket_iostream::basic_socket_iostream]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.basic_socket_iostream..basic_socket_iostream..basic_socket_iostream]
-Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] without establishing a connection.
-
-
- ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload1 basic_socket_iostream]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload1 more...]]``
-
-
-Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from the supplied socket.
-
-
- explicit ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 basic_socket_iostream]``(
- basic_stream_socket< protocol_type > s);
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from another.
-
-
- ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload3 basic_socket_iostream]``(
- basic_socket_iostream && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload3 more...]]``
-
-
-Establish a connection to an endpoint corresponding to a resolver query.
-
-
- template<
- typename T1,
- ... ,
- typename TN>
- explicit ``[link asio.reference.basic_socket_iostream.basic_socket_iostream.overload4 basic_socket_iostream]``(
- T1 t1,
- ... ,
- TN tn);
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.basic_socket_iostream.overload4 more...]]``
-
-
-[section:overload1 basic_socket_iostream::basic_socket_iostream (1 of 4 overloads)]
-
-
-Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] without establishing a connection.
-
-
- basic_socket_iostream();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_iostream::basic_socket_iostream (2 of 4 overloads)]
-
-
-Construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from the supplied socket.
-
-
- basic_socket_iostream(
- basic_stream_socket< protocol_type > s);
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_iostream::basic_socket_iostream (3 of 4 overloads)]
-
-
-Move-construct a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from another.
-
-
- basic_socket_iostream(
- basic_socket_iostream && other);
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_socket_iostream::basic_socket_iostream (4 of 4 overloads)]
-
-
-Establish a connection to an endpoint corresponding to a resolver query.
-
-
- template<
- typename T1,
- ... ,
- typename TN>
- basic_socket_iostream(
- T1 t1,
- ... ,
- TN tn);
-
-
-This constructor automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:clock_type basic_socket_iostream::clock_type]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.clock_type..clock_type..basic_socket_iostream]
-The clock type.
-
-
- typedef Clock clock_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:close basic_socket_iostream::close]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.close..close..basic_socket_iostream]
-Close the connection.
-
-
- void close();
-
-
-
-[endsect]
-
-
-
-[section:connect basic_socket_iostream::connect]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.connect..connect..basic_socket_iostream]
-Establish a connection to an endpoint corresponding to a resolver query.
-
-
- template<
- typename T1,
- ... ,
- typename TN>
- void connect(
- T1 t1,
- ... ,
- TN tn);
-
-
-This function automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
-
-
-[endsect]
-
-
-
-[section:duration basic_socket_iostream::duration]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.duration..duration..basic_socket_iostream]
-The duration type.
-
-
- typedef WaitTraits::duration duration;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:duration_type basic_socket_iostream::duration_type]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.duration_type..duration_type..basic_socket_iostream]
-(Deprecated: Use duration.) The duration type.
-
-
- typedef WaitTraits::duration_type duration_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_socket_iostream::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.endpoint_type..endpoint_type..basic_socket_iostream]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error basic_socket_iostream::error]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.error..error..basic_socket_iostream]
-Get the last error associated with the stream.
-
-
- const asio::error_code & error() const;
-
-
-
-[heading Return Value]
-
-An `error_code` corresponding to the last error from the stream.
-
-
-[heading Example]
-
-To print the error associated with a failure to establish a connection:
-
- tcp::iostream s("www.boost.org", "http");
- if (!s)
- {
- std::cout << "Error: " << s.error().message() << std::endl;
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:expires_after basic_socket_iostream::expires_after]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.expires_after..expires_after..basic_socket_iostream]
-Set the stream's expiry time relative to now.
-
-
- void expires_after(
- const duration & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:expires_at basic_socket_iostream::expires_at]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.expires_at..expires_at..basic_socket_iostream]
-(Deprecated: Use `expiry()`.) Get the stream's expiry time as an absolute time.
-
-
- time_point ``[link asio.reference.basic_socket_iostream.expires_at.overload1 expires_at]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.expires_at.overload1 more...]]``
-
-
-Set the stream's expiry time as an absolute time.
-
-
- void ``[link asio.reference.basic_socket_iostream.expires_at.overload2 expires_at]``(
- const time_point & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.expires_at.overload2 more...]]``
-
-
-[section:overload1 basic_socket_iostream::expires_at (1 of 2 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the stream's expiry time as an absolute time.
-
-
- time_point expires_at() const;
-
-
-
-[heading Return Value]
-
-An absolute time value representing the stream's expiry time.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_iostream::expires_at (2 of 2 overloads)]
-
-
-Set the stream's expiry time as an absolute time.
-
-
- void expires_at(
- const time_point & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the stream. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:expires_from_now basic_socket_iostream::expires_from_now]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.expires_from_now..expires_from_now..basic_socket_iostream]
-(Deprecated: Use `expiry()`.) Get the stream's expiry time relative to now.
-
-
- duration ``[link asio.reference.basic_socket_iostream.expires_from_now.overload1 expires_from_now]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.expires_from_now.overload1 more...]]``
-
-
-(Deprecated: Use `expires_after()`.) Set the stream's expiry time relative to now.
-
-
- void ``[link asio.reference.basic_socket_iostream.expires_from_now.overload2 expires_from_now]``(
- const duration & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_socket_iostream.expires_from_now.overload2 more...]]``
-
-
-[section:overload1 basic_socket_iostream::expires_from_now (1 of 2 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the stream's expiry time relative to now.
-
-
- duration expires_from_now() const;
-
-
-
-[heading Return Value]
-
-A relative time value representing the stream's expiry time.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_iostream::expires_from_now (2 of 2 overloads)]
-
-
-(Deprecated: Use `expires_after()`.) Set the stream's expiry time relative to now.
-
-
- void expires_from_now(
- const duration & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:expiry basic_socket_iostream::expiry]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.expiry..expiry..basic_socket_iostream]
-Get the stream's expiry time as an absolute time.
-
-
- time_point expiry() const;
-
-
-
-[heading Return Value]
-
-An absolute time value representing the stream's expiry time.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ basic_socket_iostream::operator=]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.operator_eq_..operator=..basic_socket_iostream]
-Move-assign a [link asio.reference.basic_socket_iostream `basic_socket_iostream`] from another.
-
-
- basic_socket_iostream & operator=(
- basic_socket_iostream && other);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type basic_socket_iostream::protocol_type]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.protocol_type..protocol_type..basic_socket_iostream]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:rdbuf basic_socket_iostream::rdbuf]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.rdbuf..rdbuf..basic_socket_iostream]
-Return a pointer to the underlying streambuf.
-
-
- basic_socket_streambuf< Protocol, Clock, WaitTraits > * rdbuf() const;
-
-
-
-[endsect]
-
-
-
-[section:socket basic_socket_iostream::socket]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.socket..socket..basic_socket_iostream]
-Get a reference to the underlying socket.
-
-
- basic_socket< Protocol > & socket();
-
-
-
-[endsect]
-
-
-
-[section:time_point basic_socket_iostream::time_point]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.time_point..time_point..basic_socket_iostream]
-The time type.
-
-
- typedef WaitTraits::time_point time_point;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:time_type basic_socket_iostream::time_type]
-
-[indexterm2 asio.indexterm.basic_socket_iostream.time_type..time_type..basic_socket_iostream]
-(Deprecated: Use time\_point.) The time type.
-
-
- typedef WaitTraits::time_type time_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_iostream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_socket_streambuf basic_socket_streambuf]
-
-
-Iostream streambuf for a socket.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Clock = chrono::steady_clock,
- typename ``[link asio.reference.WaitTraits WaitTraits]`` = wait_traits<Clock>>
- class basic_socket_streambuf :
- basic_socket< Protocol >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.duration [*duration]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.duration_type [*duration_type]]]
- [(Deprecated: Use duration.) The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.time_point [*time_point]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_streambuf.time_type [*time_type]]]
- [(Deprecated: Use time_point.) The time type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_streambuf.basic_socket_streambuf [*basic_socket_streambuf]]]
- [Construct a basic_socket_streambuf without establishing a connection.
-
- Construct a basic_socket_streambuf from the supplied socket.
-
- Move-construct a basic_socket_streambuf from another. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.connect [*connect]]]
- [Establish a connection. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.error [*error]]]
- [Get the last error associated with the stream buffer. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.expires_after [*expires_after]]]
- [Set the stream buffer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the stream buffer's expiry time as an absolute time.
-
- Set the stream buffer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the stream buffer's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the stream buffer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.expiry [*expiry]]]
- [Get the stream buffer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_streambuf from another. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.puberror [*puberror]]]
- [(Deprecated: Use error().) Get the last error associated with the stream buffer. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.socket [*socket]]]
- [Get a reference to the underlying socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf._basic_socket_streambuf [*~basic_socket_streambuf]]]
- [Destructor flushes buffered data. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_streambuf.overflow [*overflow]]]
- []
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.setbuf [*setbuf]]]
- []
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.sync [*sync]]]
- []
- ]
-
- [
- [[link asio.reference.basic_socket_streambuf.underflow [*underflow]]]
- []
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_socket_streambuf basic_socket_streambuf::basic_socket_streambuf]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.basic_socket_streambuf..basic_socket_streambuf..basic_socket_streambuf]
-Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] without establishing a connection.
-
-
- ``[link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload1 basic_socket_streambuf]``();
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload1 more...]]``
-
-
-Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from the supplied socket.
-
-
- explicit ``[link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload2 basic_socket_streambuf]``(
- basic_stream_socket< protocol_type > s);
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from another.
-
-
- ``[link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload3 basic_socket_streambuf]``(
- basic_socket_streambuf && other);
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.basic_socket_streambuf.overload3 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::basic_socket_streambuf (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] without establishing a connection.
-
-
- basic_socket_streambuf();
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::basic_socket_streambuf (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from the supplied socket.
-
-
- basic_socket_streambuf(
- basic_stream_socket< protocol_type > s);
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_socket_streambuf::basic_socket_streambuf (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from another.
-
-
- basic_socket_streambuf(
- basic_socket_streambuf && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:clock_type basic_socket_streambuf::clock_type]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.clock_type..clock_type..basic_socket_streambuf]
-The clock type.
-
-
- typedef Clock clock_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:close basic_socket_streambuf::close]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.close..close..basic_socket_streambuf]
-Close the connection.
-
-
- basic_socket_streambuf * close();
-
-
-
-[heading Return Value]
-
-`this` if a connection was successfully established, a null pointer otherwise.
-
-
-
-
-[endsect]
-
-
-[section:connect basic_socket_streambuf::connect]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.connect..connect..basic_socket_streambuf]
-Establish a connection.
-
-
- basic_socket_streambuf * ``[link asio.reference.basic_socket_streambuf.connect.overload1 connect]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.connect.overload1 more...]]``
-
- template<
- typename T1,
- ... ,
- typename TN>
- basic_socket_streambuf * ``[link asio.reference.basic_socket_streambuf.connect.overload2 connect]``(
- T1 t1,
- ... ,
- TN tn);
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.connect.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::connect (1 of 2 overloads)]
-
-
-Establish a connection.
-
-
- basic_socket_streambuf * connect(
- const endpoint_type & endpoint);
-
-
-This function establishes a connection to the specified endpoint.
-
-
-[heading Return Value]
-
-`this` if a connection was successfully established, a null pointer otherwise.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::connect (2 of 2 overloads)]
-
-
-Establish a connection.
-
-
- template<
- typename T1,
- ... ,
- typename TN>
- basic_socket_streambuf * connect(
- T1 t1,
- ... ,
- TN tn);
-
-
-This function automatically establishes a connection based on the supplied resolver query parameters. The arguments are used to construct a resolver query object.
-
-
-[heading Return Value]
-
-`this` if a connection was successfully established, a null pointer otherwise.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:duration basic_socket_streambuf::duration]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.duration..duration..basic_socket_streambuf]
-The duration type.
-
-
- typedef WaitTraits::duration duration;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:duration_type basic_socket_streambuf::duration_type]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.duration_type..duration_type..basic_socket_streambuf]
-(Deprecated: Use duration.) The duration type.
-
-
- typedef WaitTraits::duration_type duration_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_socket_streambuf::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.endpoint_type..endpoint_type..basic_socket_streambuf]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error basic_socket_streambuf::error]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.error..error..basic_socket_streambuf]
-Get the last error associated with the stream buffer.
-
-
- const asio::error_code & error() const;
-
-
-
-[heading Return Value]
-
-An `error_code` corresponding to the last error from the stream buffer.
-
-
-
-
-[endsect]
-
-
-
-[section:expires_after basic_socket_streambuf::expires_after]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.expires_after..expires_after..basic_socket_streambuf]
-Set the stream buffer's expiry time relative to now.
-
-
- void expires_after(
- const duration & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:expires_at basic_socket_streambuf::expires_at]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.expires_at..expires_at..basic_socket_streambuf]
-(Deprecated: Use `expiry()`.) Get the stream buffer's expiry time as an absolute time.
-
-
- time_point ``[link asio.reference.basic_socket_streambuf.expires_at.overload1 expires_at]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.expires_at.overload1 more...]]``
-
-
-Set the stream buffer's expiry time as an absolute time.
-
-
- void ``[link asio.reference.basic_socket_streambuf.expires_at.overload2 expires_at]``(
- const time_point & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.expires_at.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::expires_at (1 of 2 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the stream buffer's expiry time as an absolute time.
-
-
- time_point expires_at() const;
-
-
-
-[heading Return Value]
-
-An absolute time value representing the stream buffer's expiry time.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::expires_at (2 of 2 overloads)]
-
-
-Set the stream buffer's expiry time as an absolute time.
-
-
- void expires_at(
- const time_point & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the stream. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:expires_from_now basic_socket_streambuf::expires_from_now]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.expires_from_now..expires_from_now..basic_socket_streambuf]
-(Deprecated: Use `expiry()`.) Get the stream buffer's expiry time relative to now.
-
-
- duration ``[link asio.reference.basic_socket_streambuf.expires_from_now.overload1 expires_from_now]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.expires_from_now.overload1 more...]]``
-
-
-(Deprecated: Use `expires_after()`.) Set the stream buffer's expiry time relative to now.
-
-
- void ``[link asio.reference.basic_socket_streambuf.expires_from_now.overload2 expires_from_now]``(
- const duration & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_socket_streambuf.expires_from_now.overload2 more...]]``
-
-
-[section:overload1 basic_socket_streambuf::expires_from_now (1 of 2 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the stream buffer's expiry time relative to now.
-
-
- duration expires_from_now() const;
-
-
-
-[heading Return Value]
-
-A relative time value representing the stream buffer's expiry time.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_socket_streambuf::expires_from_now (2 of 2 overloads)]
-
-
-(Deprecated: Use `expires_after()`.) Set the stream buffer's expiry time relative to now.
-
-
- void expires_from_now(
- const duration & expiry_time);
-
-
-This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:expiry basic_socket_streambuf::expiry]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.expiry..expiry..basic_socket_streambuf]
-Get the stream buffer's expiry time as an absolute time.
-
-
- time_point expiry() const;
-
-
-
-[heading Return Value]
-
-An absolute time value representing the stream buffer's expiry time.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ basic_socket_streambuf::operator=]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.operator_eq_..operator=..basic_socket_streambuf]
-Move-assign a [link asio.reference.basic_socket_streambuf `basic_socket_streambuf`] from another.
-
-
- basic_socket_streambuf & operator=(
- basic_socket_streambuf && other);
-
-
-
-[endsect]
-
-
-
-[section:overflow basic_socket_streambuf::overflow]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.overflow..overflow..basic_socket_streambuf]
-
- int_type overflow(
- int_type c);
-
-
-
-[endsect]
-
-
-
-[section:protocol_type basic_socket_streambuf::protocol_type]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.protocol_type..protocol_type..basic_socket_streambuf]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:puberror basic_socket_streambuf::puberror]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.puberror..puberror..basic_socket_streambuf]
-(Deprecated: Use `error()`.) Get the last error associated with the stream buffer.
-
-
- const asio::error_code & puberror() const;
-
-
-
-[heading Return Value]
-
-An `error_code` corresponding to the last error from the stream buffer.
-
-
-
-
-[endsect]
-
-
-
-[section:setbuf basic_socket_streambuf::setbuf]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.setbuf..setbuf..basic_socket_streambuf]
-
- std::streambuf * setbuf(
- char_type * s,
- std::streamsize n);
-
-
-
-[endsect]
-
-
-
-[section:socket basic_socket_streambuf::socket]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.socket..socket..basic_socket_streambuf]
-Get a reference to the underlying socket.
-
-
- basic_socket< Protocol > & socket();
-
-
-
-[endsect]
-
-
-
-[section:sync basic_socket_streambuf::sync]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.sync..sync..basic_socket_streambuf]
-
- int sync();
-
-
-
-[endsect]
-
-
-
-[section:time_point basic_socket_streambuf::time_point]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.time_point..time_point..basic_socket_streambuf]
-The time type.
-
-
- typedef WaitTraits::time_point time_point;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:time_type basic_socket_streambuf::time_type]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.time_type..time_type..basic_socket_streambuf]
-(Deprecated: Use time\_point.) The time type.
-
-
- typedef WaitTraits::time_type time_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_socket_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:underflow basic_socket_streambuf::underflow]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf.underflow..underflow..basic_socket_streambuf]
-
- int_type underflow();
-
-
-
-[endsect]
-
-
-
-[section:_basic_socket_streambuf basic_socket_streambuf::~basic_socket_streambuf]
-
-[indexterm2 asio.indexterm.basic_socket_streambuf._basic_socket_streambuf..~basic_socket_streambuf..basic_socket_streambuf]
-Destructor flushes buffered data.
-
-
- virtual ~basic_socket_streambuf();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_stream_socket basic_stream_socket]
-
-
-Provides stream-oriented socket functionality.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_stream_socket :
- public basic_socket< Protocol >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_stream_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
- [Construct a basic_stream_socket without opening it.
-
- Construct and open a basic_stream_socket.
-
- Construct a basic_stream_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_stream_socket on an existing native socket.
-
- Move-construct a basic_stream_socket from another.
-
- Move-construct a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_stream_socket from another.
-
- Move-assign a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.read_some [*read_some]]]
- [Read some data from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.receive [*receive]]]
- [Receive some data on the socket.
-
- Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.send [*send]]]
- [Send some data on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.write_some [*write_some]]]
- [Write some data to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_stream_socket `basic_stream_socket`] class template provides asynchronous and blocking stream-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign basic_stream_socket::assign]
-
-[indexterm2 asio.indexterm.basic_stream_socket.assign..assign..basic_stream_socket]
-Assign an existing native socket to the socket.
-
-
- void ``[link asio.reference.basic_stream_socket.assign.overload1 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.assign.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.assign.overload2 assign]``(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.assign.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::assign (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::assign (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Assign an existing native socket to the socket.
-
-
- void assign(
- const protocol_type & protocol,
- const native_handle_type & native_socket,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_connect basic_stream_socket::async_connect]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.async_connect..async_connect..basic_stream_socket]
-Start an asynchronous connect.
-
-
- template<
- typename ``[link asio.reference.ConnectHandler ConnectHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_connect(
- const endpoint_type & peer_endpoint,
- ConnectHandler && handler);
-
-
-This function is used to asynchronously connect a socket to the specified remote endpoint. The function call always returns immediately.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected. Copies will be made of the endpoint object as required.]]
-
-[[handler][The handler to be called when the connection operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void connect_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Connect succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.async_connect(endpoint, connect_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:async_read_some basic_stream_socket::async_read_some]
-
-[indexterm2 asio.indexterm.basic_stream_socket.async_read_some..async_read_some..basic_stream_socket]
-Start an asynchronous read.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the stream socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_read_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[section:async_receive basic_stream_socket::async_receive]
-
-[indexterm2 asio.indexterm.basic_stream_socket.async_receive..async_receive..basic_stream_socket]
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_receive.overload1 async_receive]``(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.async_receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_receive.overload2 async_receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.async_receive.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::async_receive (1 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is received before the asynchronous operation completes.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::async_receive (2 of 2 overloads)]
-
-
-Start an asynchronous receive.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- ReadHandler && handler);
-
-
-This function is used to asynchronously receive data from the stream socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[handler][The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes received.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is received before the asynchronous operation completes.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_receive(asio::buffer(data, size), 0, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:async_send basic_stream_socket::async_send]
-
-[indexterm2 asio.indexterm.basic_stream_socket.async_send..async_send..basic_stream_socket]
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_send.overload1 async_send]``(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.async_send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.basic_stream_socket.async_send.overload2 async_send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.async_send.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::async_send (1 of 2 overloads)]
-
-
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send data on the stream socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_send(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::async_send (2 of 2 overloads)]
-
-
-Start an asynchronous send.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- WriteHandler && handler);
-
-
-This function is used to asynchronously send data on the stream socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[handler][The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes sent.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_send(asio::buffer(data, size), 0, handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait basic_stream_socket::async_wait]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.async_wait..async_wait..basic_stream_socket]
-Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.async_wait(asio::ip::tcp::socket::wait_read, wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some basic_stream_socket::async_write_some]
-
-[indexterm2 asio.indexterm.basic_stream_socket.async_write_some..async_write_some..basic_stream_socket]
-Start an asynchronous write.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the stream socket. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.async_write_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[section:at_mark basic_stream_socket::at_mark]
-
-[indexterm2 asio.indexterm.basic_stream_socket.at_mark..at_mark..basic_stream_socket]
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool ``[link asio.reference.basic_stream_socket.at_mark.overload1 at_mark]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.at_mark.overload1 more...]]``
-
- bool ``[link asio.reference.basic_stream_socket.at_mark.overload2 at_mark]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.at_mark.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::at_mark (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark() const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::at_mark (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine whether the socket is at the out-of-band data mark.
-
-
- bool at_mark(
- asio::error_code & ec) const;
-
-
-This function is used to check whether the socket input is currently positioned at the out-of-band data mark.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A bool indicating whether the socket is at the out-of-band data mark.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:available basic_stream_socket::available]
-
-[indexterm2 asio.indexterm.basic_stream_socket.available..available..basic_stream_socket]
-Determine the number of bytes available for reading.
-
-
- std::size_t ``[link asio.reference.basic_stream_socket.available.overload1 available]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.available.overload1 more...]]``
-
- std::size_t ``[link asio.reference.basic_stream_socket.available.overload2 available]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.available.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::available (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available() const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::available (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Determine the number of bytes available for reading.
-
-
- std::size_t available(
- asio::error_code & ec) const;
-
-
-This function is used to determine the number of bytes that may be read without blocking.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes that may be read without blocking, or 0 if an error occurs.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_stream_socket basic_stream_socket::basic_stream_socket]
-
-[indexterm2 asio.indexterm.basic_stream_socket.basic_stream_socket..basic_stream_socket..basic_stream_socket]
-Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] without opening it.
-
-
- explicit ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload1 basic_stream_socket]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.basic_stream_socket `basic_stream_socket`].
-
-
- ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload2 basic_stream_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload2 more...]]``
-
-
-Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`], opening it and binding it to the given local endpoint.
-
-
- ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload3 basic_stream_socket]``(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload3 more...]]``
-
-
-Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] on an existing native socket.
-
-
- ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload4 basic_stream_socket]``(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] from another.
-
-
- ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload5 basic_stream_socket]``(
- basic_stream_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload5 more...]]``
-
-
-Move-construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- ``[link asio.reference.basic_stream_socket.basic_stream_socket.overload6 basic_stream_socket]``(
- basic_stream_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.basic_stream_socket.overload6 more...]]``
-
-
-[section:overload1 basic_stream_socket::basic_stream_socket (1 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] without opening it.
-
-
- basic_stream_socket(
- asio::io_context & io_context);
-
-
-This constructor creates a stream socket without opening it. The socket needs to be opened and then connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::basic_stream_socket (2 of 6 overloads)]
-
-
-Construct and open a [link asio.reference.basic_stream_socket `basic_stream_socket`].
-
-
- basic_stream_socket(
- asio::io_context & io_context,
- const protocol_type & protocol);
-
-
-This constructor creates and opens a stream socket. The socket needs to be connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_stream_socket::basic_stream_socket (3 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`], opening it and binding it to the given local endpoint.
-
-
- basic_stream_socket(
- asio::io_context & io_context,
- const endpoint_type & endpoint);
-
-
-This constructor creates a stream socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[endpoint][An endpoint on the local machine to which the stream socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_stream_socket::basic_stream_socket (4 of 6 overloads)]
-
-
-Construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] on an existing native socket.
-
-
- basic_stream_socket(
- asio::io_context & io_context,
- const protocol_type & protocol,
- const native_handle_type & native_socket);
-
-
-This constructor creates a stream socket object to hold an existing native socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream socket will use to dispatch handlers for any asynchronous operations performed on the socket.]]
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-[[native_socket][The new underlying socket implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 basic_stream_socket::basic_stream_socket (5 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] from another.
-
-
- basic_stream_socket(
- basic_stream_socket && other);
-
-
-This constructor moves a stream socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_stream_socket `basic_stream_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 basic_stream_socket::basic_stream_socket (6 of 6 overloads)]
-
-
-Move-construct a [link asio.reference.basic_stream_socket `basic_stream_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- basic_stream_socket(
- basic_stream_socket< Protocol1 > && other,
- typename enable_if< is_convertible< Protocol1, Protocol >::value >::type * = 0);
-
-
-This constructor moves a stream socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_stream_socket `basic_stream_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:bind basic_stream_socket::bind]
-
-[indexterm2 asio.indexterm.basic_stream_socket.bind..bind..basic_stream_socket]
-Bind the socket to the given local endpoint.
-
-
- void ``[link asio.reference.basic_stream_socket.bind.overload1 bind]``(
- const endpoint_type & endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.bind.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.bind.overload2 bind]``(
- const endpoint_type & endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.bind.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::bind (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::bind (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Bind the socket to the given local endpoint.
-
-
- void bind(
- const endpoint_type & endpoint,
- asio::error_code & ec);
-
-
-This function binds the socket to the specified endpoint on the local machine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[endpoint][An endpoint on the local machine to which the socket will be bound.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
- asio::error_code ec;
- socket.bind(asio::ip::tcp::endpoint(
- asio::ip::tcp::v4(), 12345), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:broadcast basic_stream_socket::broadcast]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.broadcast..broadcast..basic_stream_socket]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable basic_stream_socket::bytes_readable]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.bytes_readable..bytes_readable..basic_stream_socket]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel basic_stream_socket::cancel]
-
-[indexterm2 asio.indexterm.basic_stream_socket.cancel..cancel..basic_stream_socket]
-Cancel all asynchronous operations associated with the socket.
-
-
- void ``[link asio.reference.basic_stream_socket.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.cancel.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::cancel (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::cancel (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Cancel all asynchronous operations associated with the socket.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous connect, send and receive operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls to `cancel()` will always fail with `asio::error::operation_not_supported` when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:
-
-
-* It will only cancel asynchronous operations that were initiated in the current thread.
-
-
-* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed.
-
-For portable cancellation, consider using one of the following alternatives:
-
-
-* Disable asio's I/O completion port backend by defining ASIO\_DISABLE\_IOCP.
-
-
-* Use the `close()` function to simultaneously cancel the outstanding operations and close the socket.
-
-When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close basic_stream_socket::close]
-
-[indexterm2 asio.indexterm.basic_stream_socket.close..close..basic_stream_socket]
-Close the socket.
-
-
- void ``[link asio.reference.basic_stream_socket.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.close.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.close.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::close (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close();
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::close (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Close the socket.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the socket. Any asynchronous send, receive or connect operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.close(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-[heading Remarks]
-
-For portable behaviour with respect to graceful closure of a connected socket, call `shutdown()` before closing the socket.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:connect basic_stream_socket::connect]
-
-[indexterm2 asio.indexterm.basic_stream_socket.connect..connect..basic_stream_socket]
-Connect the socket to the specified endpoint.
-
-
- void ``[link asio.reference.basic_stream_socket.connect.overload1 connect]``(
- const endpoint_type & peer_endpoint);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.connect.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.connect.overload2 connect]``(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.connect.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::connect (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- socket.connect(endpoint);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::connect (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Connect the socket to the specified endpoint.
-
-
- void connect(
- const endpoint_type & peer_endpoint,
- asio::error_code & ec);
-
-
-This function is used to connect a socket to the specified remote endpoint. The function call will block until the connection is successfully made or an error occurs.
-
-The socket is automatically opened if it is not already open. If the connect fails, and the socket was automatically opened, the socket is not returned to the closed state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[peer_endpoint][The remote endpoint to which the socket will be connected.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::ip::tcp::endpoint endpoint(
- asio::ip::address::from_string("1.2.3.4"), 12345);
- asio::error_code ec;
- socket.connect(endpoint, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:debug basic_stream_socket::debug]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.debug..debug..basic_stream_socket]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route basic_stream_socket::do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.do_not_route..do_not_route..basic_stream_socket]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted basic_stream_socket::enable_connection_aborted]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.enable_connection_aborted..enable_connection_aborted..basic_stream_socket]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint_type basic_stream_socket::endpoint_type]
-
-[indexterm2 asio.indexterm.basic_stream_socket.endpoint_type..endpoint_type..basic_stream_socket]
-The endpoint type.
-
-
- typedef Protocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_stream_socket::executor_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.executor_type..executor_type..basic_stream_socket]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor basic_stream_socket::get_executor]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.get_executor..get_executor..basic_stream_socket]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_stream_socket::get_io_context]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.get_io_context..get_io_context..basic_stream_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_stream_socket::get_io_service]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.get_io_service..get_io_service..basic_stream_socket]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option basic_stream_socket::get_option]
-
-[indexterm2 asio.indexterm.basic_stream_socket.get_option..get_option..basic_stream_socket]
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_stream_socket.get_option.overload1 get_option]``(
- GettableSocketOption & option) const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void ``[link asio.reference.basic_stream_socket.get_option.overload2 get_option]``(
- GettableSocketOption & option,
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.get_option.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::get_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::get_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get an option from the socket.
-
-
- template<
- typename ``[link asio.reference.GettableSocketOption GettableSocketOption]``>
- void get_option(
- GettableSocketOption & option,
- asio::error_code & ec) const;
-
-
-This function is used to get the current value of an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the value of the SOL\_SOCKET/SO\_KEEPALIVE option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::keep_alive option;
- asio::error_code ec;
- socket.get_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
- bool is_set = option.value();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:io_control basic_stream_socket::io_control]
-
-[indexterm2 asio.indexterm.basic_stream_socket.io_control..io_control..basic_stream_socket]
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_stream_socket.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.basic_stream_socket.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.io_control.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::io_control (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::io_control (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Perform an IO control command on the socket.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::socket::bytes_readable command;
- asio::error_code ec;
- socket.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open basic_stream_socket::is_open]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.is_open..is_open..basic_stream_socket]
-Determine whether the socket is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-
-[section:keep_alive basic_stream_socket::keep_alive]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.keep_alive..keep_alive..basic_stream_socket]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger basic_stream_socket::linger]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.linger..linger..basic_stream_socket]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:local_endpoint basic_stream_socket::local_endpoint]
-
-[indexterm2 asio.indexterm.basic_stream_socket.local_endpoint..local_endpoint..basic_stream_socket]
-Get the local endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_stream_socket.local_endpoint.overload1 local_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.local_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_stream_socket.local_endpoint.overload2 local_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.local_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::local_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint() const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::local_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the local endpoint of the socket.
-
-
- endpoint_type local_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the locally bound endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the local endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.local_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer basic_stream_socket::lowest_layer]
-
-[indexterm2 asio.indexterm.basic_stream_socket.lowest_layer..lowest_layer..basic_stream_socket]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.basic_stream_socket.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.basic_stream_socket.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.basic_socket `basic_socket`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type basic_stream_socket::lowest_layer_type]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.lowest_layer_type..lowest_layer_type..basic_stream_socket]
-A [link asio.reference.basic_socket `basic_socket`] is always the lowest layer.
-
-
- typedef basic_socket< Protocol > lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_socket.basic_socket [*basic_socket]]]
- [Construct a basic_socket without opening it.
-
- Construct and open a basic_socket.
-
- Construct a basic_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_socket on an existing native socket.
-
- Move-construct a basic_socket from another.
-
- Move-construct a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket from another.
-
- Move-assign a basic_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket._basic_socket [*~basic_socket]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket `basic_socket`] class template provides functionality that is common to both stream-oriented and datagram-oriented sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections basic_stream_socket::max_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.max_connections..max_connections..basic_stream_socket]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections basic_stream_socket::max_listen_connections]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.max_listen_connections..max_listen_connections..basic_stream_socket]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route basic_stream_socket::message_do_not_route]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.message_do_not_route..message_do_not_route..basic_stream_socket]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record basic_stream_socket::message_end_of_record]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.message_end_of_record..message_end_of_record..basic_stream_socket]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags basic_stream_socket::message_flags]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.message_flags..message_flags..basic_stream_socket]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band basic_stream_socket::message_out_of_band]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.message_out_of_band..message_out_of_band..basic_stream_socket]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek basic_stream_socket::message_peek]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.message_peek..message_peek..basic_stream_socket]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:native_handle basic_stream_socket::native_handle]
-
-
-['Inherited from basic_socket.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.native_handle..native_handle..basic_stream_socket]
-Get the native socket representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the socket. This is intended to allow access to native socket functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type basic_stream_socket::native_handle_type]
-
-[indexterm2 asio.indexterm.basic_stream_socket.native_handle_type..native_handle_type..basic_stream_socket]
-The native representation of a socket.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking basic_stream_socket::native_non_blocking]
-
-[indexterm2 asio.indexterm.basic_stream_socket.native_non_blocking..native_non_blocking..basic_stream_socket]
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool ``[link asio.reference.basic_stream_socket.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void ``[link asio.reference.basic_stream_socket.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_stream_socket::native_non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the native socket implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native socket. This mode has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying socket is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the socket object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native socket.
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::native_non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_stream_socket::native_non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the native socket implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native socket. It has no effect on the behaviour of the socket object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying socket is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense.]]
-
-]
-
-
-[heading Example]
-
-This function is intended to allow the encapsulation of arbitrary non-blocking system calls as asynchronous operations, in a way that is transparent to the user of the socket object. The following example illustrates how Linux's `sendfile` system call might be encapsulated:
-
- template <typename Handler>
- struct sendfile_op
- {
- tcp::socket& sock_;
- int fd_;
- Handler handler_;
- off_t offset_;
- std::size_t total_bytes_transferred_;
-
- // Function call operator meeting WriteHandler requirements.
- // Used as the handler for the async_write_some operation.
- void operator()(asio::error_code ec, std::size_t)
- {
- // Put the underlying socket into non-blocking mode.
- if (!ec)
- if (!sock_.native_non_blocking())
- sock_.native_non_blocking(true, ec);
-
- if (!ec)
- {
- for (;;)
- {
- // Try the system call.
- errno = 0;
- int n = ::sendfile(sock_.native_handle(), fd_, &offset_, 65536);
- ec = asio::error_code(n < 0 ? errno : 0,
- asio::error::get_system_category());
- total_bytes_transferred_ += ec ? 0 : n;
-
- // Retry operation immediately if interrupted by signal.
- if (ec == asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == asio::error::would_block
- || ec == asio::error::try_again)
- {
- // We have to wait for the socket to become ready again.
- sock_.async_wait(tcp::socket::wait_write, *this);
- return;
- }
-
- if (ec || n == 0)
- {
- // An error occurred, or we have reached the end of the file.
- // Either way we must exit the loop so we can call the handler.
- break;
- }
-
- // Loop around to try calling sendfile again.
- }
- }
-
- // Pass result back to user's handler.
- handler_(ec, total_bytes_transferred_);
- }
- };
-
- template <typename Handler>
- void async_sendfile(tcp::socket& sock, int fd, Handler h)
- {
- sendfile_op<Handler> op = { sock, fd, h, 0, 0 };
- sock.async_wait(tcp::socket::wait_write, op);
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking basic_stream_socket::non_blocking]
-
-[indexterm2 asio.indexterm.basic_stream_socket.non_blocking..non_blocking..basic_stream_socket]
-Gets the non-blocking mode of the socket.
-
-
- bool ``[link asio.reference.basic_stream_socket.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the socket.
-
-
- void ``[link asio.reference.basic_stream_socket.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.non_blocking.overload3 more...]]``
-
-
-[section:overload1 basic_stream_socket::non_blocking (1 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Gets the non-blocking mode of the socket.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::non_blocking (2 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_stream_socket::non_blocking (3 of 3 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Sets the non-blocking mode of the socket.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the socket's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:open basic_stream_socket::open]
-
-[indexterm2 asio.indexterm.basic_stream_socket.open..open..basic_stream_socket]
-Open the socket using the specified protocol.
-
-
- void ``[link asio.reference.basic_stream_socket.open.overload1 open]``(
- const protocol_type & protocol = protocol_type());
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.open.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.open.overload2 open]``(
- const protocol_type & protocol,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.open.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::open (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol = protocol_type());
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying protocol parameters to be used.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- socket.open(asio::ip::tcp::v4());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::open (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Open the socket using the specified protocol.
-
-
- void open(
- const protocol_type & protocol,
- asio::error_code & ec);
-
-
-This function opens the socket so that it will use the specified protocol.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][An object specifying which protocol is to be used.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- asio::error_code ec;
- socket.open(asio::ip::tcp::v4(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq_ basic_stream_socket::operator=]
-
-[indexterm2 asio.indexterm.basic_stream_socket.operator_eq_..operator=..basic_stream_socket]
-Move-assign a [link asio.reference.basic_stream_socket `basic_stream_socket`] from another.
-
-
- basic_stream_socket & ``[link asio.reference.basic_stream_socket.operator_eq_.overload1 operator=]``(
- basic_stream_socket && other);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.operator_eq_.overload1 more...]]``
-
-
-Move-assign a [link asio.reference.basic_stream_socket `basic_stream_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_stream_socket >::type & ``[link asio.reference.basic_stream_socket.operator_eq_.overload2 operator=]``(
- basic_stream_socket< Protocol1 > && other);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::operator= (1 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_stream_socket `basic_stream_socket`] from another.
-
-
- basic_stream_socket & operator=(
- basic_stream_socket && other);
-
-
-This assignment operator moves a stream socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_stream_socket `basic_stream_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::operator= (2 of 2 overloads)]
-
-
-Move-assign a [link asio.reference.basic_stream_socket `basic_stream_socket`] from a socket of another protocol type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol1]``>
- enable_if< is_convertible< Protocol1, Protocol >::value, basic_stream_socket >::type & operator=(
- basic_stream_socket< Protocol1 > && other);
-
-
-This assignment operator moves a stream socket from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_stream_socket `basic_stream_socket`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_stream_socket(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol_type basic_stream_socket::protocol_type]
-
-[indexterm2 asio.indexterm.basic_stream_socket.protocol_type..protocol_type..basic_stream_socket]
-The protocol type.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:read_some basic_stream_socket::read_some]
-
-[indexterm2 asio.indexterm.basic_stream_socket.read_some..read_some..basic_stream_socket]
-Read some data from the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.read_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.read_some.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::read_some (1 of 2 overloads)]
-
-
-Read some data from the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the stream socket. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.read_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::read_some (2 of 2 overloads)]
-
-
-Read some data from the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read data from the stream socket. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:receive basic_stream_socket::receive]
-
-[indexterm2 asio.indexterm.basic_stream_socket.receive..receive..basic_stream_socket]
-Receive some data on the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.receive.overload1 receive]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.receive.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.receive.overload2 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.receive.overload2 more...]]``
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.receive.overload3 receive]``(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.receive.overload3 more...]]``
-
-
-[section:overload1 basic_stream_socket::receive (1 of 3 overloads)]
-
-
-Receive some data on the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers);
-
-
-This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.receive(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::receive (2 of 3 overloads)]
-
-
-Receive some data on the socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To receive into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.receive(asio::buffer(data, size), 0);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_stream_socket::receive (3 of 3 overloads)]
-
-
-Receive some data on a connected socket.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t receive(
- const MutableBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to receive data on the stream socket. The function call will block until one or more bytes of data has been received successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be received.]]
-
-[[flags][Flags specifying how the receive call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes received. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The receive operation may not receive all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:receive_buffer_size basic_stream_socket::receive_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.receive_buffer_size..receive_buffer_size..basic_stream_socket]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_low_watermark basic_stream_socket::receive_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.receive_low_watermark..receive_low_watermark..basic_stream_socket]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:remote_endpoint basic_stream_socket::remote_endpoint]
-
-[indexterm2 asio.indexterm.basic_stream_socket.remote_endpoint..remote_endpoint..basic_stream_socket]
-Get the remote endpoint of the socket.
-
-
- endpoint_type ``[link asio.reference.basic_stream_socket.remote_endpoint.overload1 remote_endpoint]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.remote_endpoint.overload1 more...]]``
-
- endpoint_type ``[link asio.reference.basic_stream_socket.remote_endpoint.overload2 remote_endpoint]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.remote_endpoint.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::remote_endpoint (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint() const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::remote_endpoint (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Get the remote endpoint of the socket.
-
-
- endpoint_type remote_endpoint(
- asio::error_code & ec) const;
-
-
-This function is used to obtain the remote endpoint of the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-An object that represents the remote endpoint of the socket. Returns a default-constructed endpoint object if an error occurred.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:reuse_address basic_stream_socket::reuse_address]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.reuse_address..reuse_address..basic_stream_socket]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:send basic_stream_socket::send]
-
-[indexterm2 asio.indexterm.basic_stream_socket.send..send..basic_stream_socket]
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.send.overload1 send]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.send.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.send.overload2 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.send.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.send.overload3 send]``(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.send.overload3 more...]]``
-
-
-[section:overload1 basic_stream_socket::send (1 of 3 overloads)]
-
-
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers);
-
-
-This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.send(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::send (2 of 3 overloads)]
-
-
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags);
-
-
-This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To send a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.send(asio::buffer(data, size), 0);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on sending multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_stream_socket::send (3 of 3 overloads)]
-
-
-Send some data on the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t send(
- const ConstBufferSequence & buffers,
- socket_base::message_flags flags,
- asio::error_code & ec);
-
-
-This function is used to send data on the stream socket. The function call will block until one or more bytes of the data has been sent successfully, or an until error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be sent on the socket.]]
-
-[[flags][Flags specifying how the send call is to be made.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes sent. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The send operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:send_buffer_size basic_stream_socket::send_buffer_size]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.send_buffer_size..send_buffer_size..basic_stream_socket]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark basic_stream_socket::send_low_watermark]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.send_low_watermark..send_low_watermark..basic_stream_socket]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_stream_socket.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:set_option basic_stream_socket::set_option]
-
-[indexterm2 asio.indexterm.basic_stream_socket.set_option..set_option..basic_stream_socket]
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_stream_socket.set_option.overload1 set_option]``(
- const SettableSocketOption & option);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void ``[link asio.reference.basic_stream_socket.set_option.overload2 set_option]``(
- const SettableSocketOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.set_option.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::set_option (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::set_option (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Set an option on the socket.
-
-
- template<
- typename ``[link asio.reference.SettableSocketOption SettableSocketOption]``>
- void set_option(
- const SettableSocketOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the socket.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The new option value to be set on the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Setting the IPPROTO\_TCP/TCP\_NODELAY option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- asio::error_code ec;
- socket.set_option(option, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:shutdown basic_stream_socket::shutdown]
-
-[indexterm2 asio.indexterm.basic_stream_socket.shutdown..shutdown..basic_stream_socket]
-Disable sends or receives on the socket.
-
-
- void ``[link asio.reference.basic_stream_socket.shutdown.overload1 shutdown]``(
- shutdown_type what);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.shutdown.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.shutdown.overload2 shutdown]``(
- shutdown_type what,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.shutdown.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::shutdown (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.shutdown(asio::ip::tcp::socket::shutdown_send);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::shutdown (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Disable sends or receives on the socket.
-
-
- void shutdown(
- shutdown_type what,
- asio::error_code & ec);
-
-
-This function is used to disable send operations, receive operations, or both.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[what][Determines what types of operation will no longer be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Shutting down the send side of the socket:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.shutdown(asio::ip::tcp::socket::shutdown_send, ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:shutdown_type basic_stream_socket::shutdown_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type..shutdown_type..basic_stream_socket]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type.shutdown_receive..shutdown_receive..basic_stream_socket]
-[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type.shutdown_send..shutdown_send..basic_stream_socket]
-[indexterm2 asio.indexterm.basic_stream_socket.shutdown_type.shutdown_both..shutdown_both..basic_stream_socket]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:wait basic_stream_socket::wait]
-
-[indexterm2 asio.indexterm.basic_stream_socket.wait..wait..basic_stream_socket]
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.basic_stream_socket.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_stream_socket.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.wait.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::wait (1 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- socket.wait(asio::ip::tcp::socket::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::wait (2 of 2 overloads)]
-
-
-['Inherited from basic_socket.]
-
-
-Wait for the socket to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a socket to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired socket state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a socket to become readable.
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::error_code ec;
- socket.wait(asio::ip::tcp::socket::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type basic_stream_socket::wait_type]
-
-
-['Inherited from socket_base.]
-
-[indexterm2 asio.indexterm.basic_stream_socket.wait_type..wait_type..basic_stream_socket]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.basic_stream_socket.wait_type.wait_read..wait_read..basic_stream_socket]
-[indexterm2 asio.indexterm.basic_stream_socket.wait_type.wait_write..wait_write..basic_stream_socket]
-[indexterm2 asio.indexterm.basic_stream_socket.wait_type.wait_error..wait_error..basic_stream_socket]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-[section:write_some basic_stream_socket::write_some]
-
-[indexterm2 asio.indexterm.basic_stream_socket.write_some..write_some..basic_stream_socket]
-Write some data to the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.write_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.basic_stream_socket.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_stream_socket.write_some.overload2 more...]]``
-
-
-[section:overload1 basic_stream_socket::write_some (1 of 2 overloads)]
-
-
-Write some data to the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the stream socket. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the socket.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- socket.write_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_stream_socket::write_some (2 of 2 overloads)]
-
-
-Write some data to the socket.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write data to the stream socket. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the socket.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_basic_stream_socket basic_stream_socket::~basic_stream_socket]
-
-[indexterm2 asio.indexterm.basic_stream_socket._basic_stream_socket..~basic_stream_socket..basic_stream_socket]
-Destroys the socket.
-
-
- ~basic_stream_socket();
-
-
-This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_streambuf basic_streambuf]
-
-
-Automatically resizable buffer class based on std::streambuf.
-
-
- template<
- typename Allocator = std::allocator<char>>
- class basic_streambuf :
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
- [Construct a basic_streambuf object. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.capacity [*capacity]]]
- [Get the current capacity of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.commit [*commit]]]
- [Move characters from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.max_size [*max_size]]]
- [Get the maximum size of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.overflow [*overflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.reserve [*reserve]]]
- []
- ]
-
- [
- [[link asio.reference.basic_streambuf.underflow [*underflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
-]
-
-The `basic_streambuf` class is derived from `std::streambuf` to associate the streambuf's input and output sequences with one or more character arrays. These character arrays are internal to the `basic_streambuf` object, but direct access to the array elements is provided to permit them to be used efficiently with I/O operations. Characters written to the output sequence of a `basic_streambuf` object are appended to the input sequence of the same object.
-
-The `basic_streambuf` class's public interface is intended to permit the following implementation strategies:
-
-
-* A single contiguous character array, which is reallocated as necessary to accommodate changes in the size of the character sequence. This is the implementation approach currently used in Asio.
-
-
-* A sequence of one or more character arrays, where each array is of the same size. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-
-* A sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-The constructor for [link asio.reference.basic_streambuf `basic_streambuf`] accepts a `size_t` argument specifying the maximum of the sum of the sizes of the input sequence and output sequence. During the lifetime of the `basic_streambuf` object, the following invariant holds:
-
- size() <= max_size()
-
-
-Any member function that would, if successful, cause the invariant to be violated shall throw an exception of class `std::length_error`.
-
-The constructor for `basic_streambuf` takes an Allocator argument. A copy of this argument is used for any memory allocation performed, by the constructor and by all member functions, during the lifetime of each `basic_streambuf` object.
-
-
-[heading Examples]
-
-Writing directly from an streambuf to a socket:
-
- asio::streambuf b;
- std::ostream os(&b);
- os << "Hello, World!\n";
-
- // try sending some data in input sequence
- size_t n = sock.send(b.data());
-
- b.consume(n); // sent data is removed from input sequence
-
-
-
-
-Reading from a socket directly into a streambuf:
-
- asio::streambuf b;
-
- // reserve 512 bytes in output sequence
- asio::streambuf::mutable_buffers_type bufs = b.prepare(512);
-
- size_t n = sock.receive(bufs);
-
- // received data is "committed" from output sequence to input sequence
- b.commit(n);
-
- std::istream is(&b);
- std::string s;
- is >> s;
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:basic_streambuf basic_streambuf::basic_streambuf]
-
-[indexterm2 asio.indexterm.basic_streambuf.basic_streambuf..basic_streambuf..basic_streambuf]
-Construct a [link asio.reference.basic_streambuf `basic_streambuf`] object.
-
-
- basic_streambuf(
- std::size_t maximum_size = (std::numeric_limits< std::size_t >::max)(),
- const Allocator & allocator = Allocator());
-
-
-Constructs a streambuf with the specified maximum size. The initial size of the streambuf's input sequence is 0.
-
-
-[endsect]
-
-
-
-[section:capacity basic_streambuf::capacity]
-
-[indexterm2 asio.indexterm.basic_streambuf.capacity..capacity..basic_streambuf]
-Get the current capacity of the [link asio.reference.basic_streambuf `basic_streambuf`].
-
-
- std::size_t capacity() const;
-
-
-
-[heading Return Value]
-
-The current total capacity of the streambuf, i.e. for both the input sequence and output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:commit basic_streambuf::commit]
-
-[indexterm2 asio.indexterm.basic_streambuf.commit..commit..basic_streambuf]
-Move characters from the output sequence to the input sequence.
-
-
- void commit(
- std::size_t n);
-
-
-Appends `n` characters from the start of the output sequence to the input sequence. The beginning of the output sequence is advanced by `n` characters.
-
-Requires a preceding call `prepare(x)` where `x >= n`, and no intervening operations that modify the input or output sequence.
-
-
-[heading Remarks]
-
-If `n` is greater than the size of the output sequence, the entire output sequence is moved to the input sequence and no error is issued.
-
-
-
-
-[endsect]
-
-
-
-[section:const_buffers_type basic_streambuf::const_buffers_type]
-
-[indexterm2 asio.indexterm.basic_streambuf.const_buffers_type..const_buffers_type..basic_streambuf]
-The type used to represent the input sequence as a list of buffers.
-
-
- typedef implementation_defined const_buffers_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:consume basic_streambuf::consume]
-
-[indexterm2 asio.indexterm.basic_streambuf.consume..consume..basic_streambuf]
-Remove characters from the input sequence.
-
-
- void consume(
- std::size_t n);
-
-
-Removes `n` characters from the beginning of the input sequence.
-
-
-[heading Remarks]
-
-If `n` is greater than the size of the input sequence, the entire input sequence is consumed and no error is issued.
-
-
-
-
-[endsect]
-
-
-
-[section:data basic_streambuf::data]
-
-[indexterm2 asio.indexterm.basic_streambuf.data..data..basic_streambuf]
-Get a list of buffers that represents the input sequence.
-
-
- const_buffers_type data() const;
-
-
-
-[heading Return Value]
-
-An object of type `const_buffers_type` that satisfies ConstBufferSequence requirements, representing all character arrays in the input sequence.
-
-
-[heading Remarks]
-
-The returned object is invalidated by any `basic_streambuf` member function that modifies the input sequence or output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:max_size basic_streambuf::max_size]
-
-[indexterm2 asio.indexterm.basic_streambuf.max_size..max_size..basic_streambuf]
-Get the maximum size of the [link asio.reference.basic_streambuf `basic_streambuf`].
-
-
- std::size_t max_size() const;
-
-
-
-[heading Return Value]
-
-The allowed maximum of the sum of the sizes of the input sequence and output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:mutable_buffers_type basic_streambuf::mutable_buffers_type]
-
-[indexterm2 asio.indexterm.basic_streambuf.mutable_buffers_type..mutable_buffers_type..basic_streambuf]
-The type used to represent the output sequence as a list of buffers.
-
-
- typedef implementation_defined mutable_buffers_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overflow basic_streambuf::overflow]
-
-[indexterm2 asio.indexterm.basic_streambuf.overflow..overflow..basic_streambuf]
-Override std::streambuf behaviour.
-
-
- int_type overflow(
- int_type c);
-
-
-Behaves according to the specification of `std::streambuf::overflow()`, with the specialisation that `std::length_error` is thrown if appending the character to the input sequence would require the condition `size() > max_size()` to be true.
-
-
-[endsect]
-
-
-
-[section:prepare basic_streambuf::prepare]
-
-[indexterm2 asio.indexterm.basic_streambuf.prepare..prepare..basic_streambuf]
-Get a list of buffers that represents the output sequence, with the given size.
-
-
- mutable_buffers_type prepare(
- std::size_t n);
-
-
-Ensures that the output sequence can accommodate `n` characters, reallocating character array objects as necessary.
-
-
-[heading Return Value]
-
-An object of type `mutable_buffers_type` that satisfies MutableBufferSequence requirements, representing character array objects at the start of the output sequence such that the sum of the buffer sizes is `n`.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[std::length_error][If `size() + n > max_size()`.]]
-
-]
-
-
-[heading Remarks]
-
-The returned object is invalidated by any `basic_streambuf` member function that modifies the input sequence or output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:reserve basic_streambuf::reserve]
-
-[indexterm2 asio.indexterm.basic_streambuf.reserve..reserve..basic_streambuf]
-
- void reserve(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:size basic_streambuf::size]
-
-[indexterm2 asio.indexterm.basic_streambuf.size..size..basic_streambuf]
-Get the size of the input sequence.
-
-
- std::size_t size() const;
-
-
-
-[heading Return Value]
-
-The size of the input sequence. The value is equal to that calculated for `s` in the following code:
-
- size_t s = 0;
- const_buffers_type bufs = data();
- const_buffers_type::const_iterator i = bufs.begin();
- while (i != bufs.end())
- {
- const_buffer buf(*i++);
- s += buf.size();
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:underflow basic_streambuf::underflow]
-
-[indexterm2 asio.indexterm.basic_streambuf.underflow..underflow..basic_streambuf]
-Override std::streambuf behaviour.
-
-
- int_type underflow();
-
-
-Behaves according to the specification of `std::streambuf::underflow()`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_streambuf_ref basic_streambuf_ref]
-
-
-Adapts [link asio.reference.basic_streambuf `basic_streambuf`] to the dynamic buffer sequence type requirements.
-
-
- template<
- typename Allocator = std::allocator<char>>
- class basic_streambuf_ref
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_streambuf_ref.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_streambuf_ref.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf_ref.basic_streambuf_ref [*basic_streambuf_ref]]]
- [Construct a basic_streambuf_ref for the given basic_streambuf object.
-
- Copy construct a basic_streambuf_ref.
-
- Move construct a basic_streambuf_ref. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.capacity [*capacity]]]
- [Get the current capacity of the dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.commit [*commit]]]
- [Move bytes from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.max_size [*max_size]]]
- [Get the maximum size of the dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf_ref.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/basic_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_streambuf_ref basic_streambuf_ref::basic_streambuf_ref]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.basic_streambuf_ref..basic_streambuf_ref..basic_streambuf_ref]
-Construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`] for the given [link asio.reference.basic_streambuf `basic_streambuf`] object.
-
-
- explicit ``[link asio.reference.basic_streambuf_ref.basic_streambuf_ref.overload1 basic_streambuf_ref]``(
- basic_streambuf< Allocator > & sb);
- `` [''''&raquo;''' [link asio.reference.basic_streambuf_ref.basic_streambuf_ref.overload1 more...]]``
-
-
-Copy construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`].
-
-
- ``[link asio.reference.basic_streambuf_ref.basic_streambuf_ref.overload2 basic_streambuf_ref]``(
- const basic_streambuf_ref & other);
- `` [''''&raquo;''' [link asio.reference.basic_streambuf_ref.basic_streambuf_ref.overload2 more...]]``
-
-
-Move construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`].
-
-
- ``[link asio.reference.basic_streambuf_ref.basic_streambuf_ref.overload3 basic_streambuf_ref]``(
- basic_streambuf_ref && other);
- `` [''''&raquo;''' [link asio.reference.basic_streambuf_ref.basic_streambuf_ref.overload3 more...]]``
-
-
-[section:overload1 basic_streambuf_ref::basic_streambuf_ref (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`] for the given [link asio.reference.basic_streambuf `basic_streambuf`] object.
-
-
- basic_streambuf_ref(
- basic_streambuf< Allocator > & sb);
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_streambuf_ref::basic_streambuf_ref (2 of 3 overloads)]
-
-
-Copy construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`].
-
-
- basic_streambuf_ref(
- const basic_streambuf_ref & other);
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_streambuf_ref::basic_streambuf_ref (3 of 3 overloads)]
-
-
-Move construct a [link asio.reference.basic_streambuf_ref `basic_streambuf_ref`].
-
-
- basic_streambuf_ref(
- basic_streambuf_ref && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:capacity basic_streambuf_ref::capacity]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.capacity..capacity..basic_streambuf_ref]
-Get the current capacity of the dynamic buffer.
-
-
- std::size_t capacity() const;
-
-
-
-[endsect]
-
-
-
-[section:commit basic_streambuf_ref::commit]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.commit..commit..basic_streambuf_ref]
-Move bytes from the output sequence to the input sequence.
-
-
- void commit(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:const_buffers_type basic_streambuf_ref::const_buffers_type]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.const_buffers_type..const_buffers_type..basic_streambuf_ref]
-The type used to represent the input sequence as a list of buffers.
-
-
- typedef basic_streambuf< Allocator >::const_buffers_type const_buffers_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
- [Construct a basic_streambuf object. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.capacity [*capacity]]]
- [Get the current capacity of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.commit [*commit]]]
- [Move characters from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.max_size [*max_size]]]
- [Get the maximum size of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.overflow [*overflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.reserve [*reserve]]]
- []
- ]
-
- [
- [[link asio.reference.basic_streambuf.underflow [*underflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
-]
-
-The `basic_streambuf` class is derived from `std::streambuf` to associate the streambuf's input and output sequences with one or more character arrays. These character arrays are internal to the `basic_streambuf` object, but direct access to the array elements is provided to permit them to be used efficiently with I/O operations. Characters written to the output sequence of a `basic_streambuf` object are appended to the input sequence of the same object.
-
-The `basic_streambuf` class's public interface is intended to permit the following implementation strategies:
-
-
-* A single contiguous character array, which is reallocated as necessary to accommodate changes in the size of the character sequence. This is the implementation approach currently used in Asio.
-
-
-* A sequence of one or more character arrays, where each array is of the same size. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-
-* A sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-The constructor for [link asio.reference.basic_streambuf `basic_streambuf`] accepts a `size_t` argument specifying the maximum of the sum of the sizes of the input sequence and output sequence. During the lifetime of the `basic_streambuf` object, the following invariant holds:
-
- size() <= max_size()
-
-
-Any member function that would, if successful, cause the invariant to be violated shall throw an exception of class `std::length_error`.
-
-The constructor for `basic_streambuf` takes an Allocator argument. A copy of this argument is used for any memory allocation performed, by the constructor and by all member functions, during the lifetime of each `basic_streambuf` object.
-
-
-[heading Examples]
-
-Writing directly from an streambuf to a socket:
-
- asio::streambuf b;
- std::ostream os(&b);
- os << "Hello, World!\n";
-
- // try sending some data in input sequence
- size_t n = sock.send(b.data());
-
- b.consume(n); // sent data is removed from input sequence
-
-
-
-
-Reading from a socket directly into a streambuf:
-
- asio::streambuf b;
-
- // reserve 512 bytes in output sequence
- asio::streambuf::mutable_buffers_type bufs = b.prepare(512);
-
- size_t n = sock.receive(bufs);
-
- // received data is "committed" from output sequence to input sequence
- b.commit(n);
-
- std::istream is(&b);
- std::string s;
- is >> s;
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:consume basic_streambuf_ref::consume]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.consume..consume..basic_streambuf_ref]
-Remove characters from the input sequence.
-
-
- void consume(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:data basic_streambuf_ref::data]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.data..data..basic_streambuf_ref]
-Get a list of buffers that represents the input sequence.
-
-
- const_buffers_type data() const;
-
-
-
-[endsect]
-
-
-
-[section:max_size basic_streambuf_ref::max_size]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.max_size..max_size..basic_streambuf_ref]
-Get the maximum size of the dynamic buffer.
-
-
- std::size_t max_size() const;
-
-
-
-[endsect]
-
-
-
-[section:mutable_buffers_type basic_streambuf_ref::mutable_buffers_type]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.mutable_buffers_type..mutable_buffers_type..basic_streambuf_ref]
-The type used to represent the output sequence as a list of buffers.
-
-
- typedef basic_streambuf< Allocator >::mutable_buffers_type mutable_buffers_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
- [Construct a basic_streambuf object. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.capacity [*capacity]]]
- [Get the current capacity of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.commit [*commit]]]
- [Move characters from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.max_size [*max_size]]]
- [Get the maximum size of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.overflow [*overflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.reserve [*reserve]]]
- []
- ]
-
- [
- [[link asio.reference.basic_streambuf.underflow [*underflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
-]
-
-The `basic_streambuf` class is derived from `std::streambuf` to associate the streambuf's input and output sequences with one or more character arrays. These character arrays are internal to the `basic_streambuf` object, but direct access to the array elements is provided to permit them to be used efficiently with I/O operations. Characters written to the output sequence of a `basic_streambuf` object are appended to the input sequence of the same object.
-
-The `basic_streambuf` class's public interface is intended to permit the following implementation strategies:
-
-
-* A single contiguous character array, which is reallocated as necessary to accommodate changes in the size of the character sequence. This is the implementation approach currently used in Asio.
-
-
-* A sequence of one or more character arrays, where each array is of the same size. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-
-* A sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-The constructor for [link asio.reference.basic_streambuf `basic_streambuf`] accepts a `size_t` argument specifying the maximum of the sum of the sizes of the input sequence and output sequence. During the lifetime of the `basic_streambuf` object, the following invariant holds:
-
- size() <= max_size()
-
-
-Any member function that would, if successful, cause the invariant to be violated shall throw an exception of class `std::length_error`.
-
-The constructor for `basic_streambuf` takes an Allocator argument. A copy of this argument is used for any memory allocation performed, by the constructor and by all member functions, during the lifetime of each `basic_streambuf` object.
-
-
-[heading Examples]
-
-Writing directly from an streambuf to a socket:
-
- asio::streambuf b;
- std::ostream os(&b);
- os << "Hello, World!\n";
-
- // try sending some data in input sequence
- size_t n = sock.send(b.data());
-
- b.consume(n); // sent data is removed from input sequence
-
-
-
-
-Reading from a socket directly into a streambuf:
-
- asio::streambuf b;
-
- // reserve 512 bytes in output sequence
- asio::streambuf::mutable_buffers_type bufs = b.prepare(512);
-
- size_t n = sock.receive(bufs);
-
- // received data is "committed" from output sequence to input sequence
- b.commit(n);
-
- std::istream is(&b);
- std::string s;
- is >> s;
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:prepare basic_streambuf_ref::prepare]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.prepare..prepare..basic_streambuf_ref]
-Get a list of buffers that represents the output sequence, with the given size.
-
-
- mutable_buffers_type prepare(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:size basic_streambuf_ref::size]
-
-[indexterm2 asio.indexterm.basic_streambuf_ref.size..size..basic_streambuf_ref]
-Get the size of the input sequence.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_waitable_timer basic_waitable_timer]
-
-
-Provides waitable timer functionality.
-
-
- template<
- typename Clock,
- typename ``[link asio.reference.WaitTraits WaitTraits]``>
- class basic_waitable_timer
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_waitable_timer.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.duration [*duration]]]
- [The duration type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
- [The time point type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.traits_type [*traits_type]]]
- [The wait traits type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_waitable_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.basic_waitable_timer [*basic_waitable_timer]]]
- [Constructor.
-
- Constructor to set a particular expiry time as an absolute time.
-
- Constructor to set a particular expiry time relative to now.
-
- Move-construct a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
- [Cancels one asynchronous operation that is waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_after [*expires_after]]]
- [Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time.
-
- Set the timer's expiry time as an absolute time.
-
- (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expiry [*expiry]]]
- [Get the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.operator_eq_ [*operator=]]]
- [Move-assign a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
- [Destroys the timer. ]
- ]
-
-]
-
-The [link asio.reference.basic_waitable_timer `basic_waitable_timer`] class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
-
-A waitable 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 one of the [link asio.reference.steady_timer `steady_timer`], [link asio.reference.system_timer `system_timer`] or [link asio.reference.high_resolution_timer `high_resolution_timer`] typedefs.
-
-
-[heading Remarks]
-
-This waitable timer functionality is for use with the C++11 standard library's `<chrono>` facility, or with the Boost.Chrono library.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Examples]
-
-Performing a blocking wait (C++11):
-
- // Construct a timer without setting an expiry time.
- asio::steady_timer timer(io_context);
-
- // Set an expiry time relative to now.
- timer.expires_after(std::chrono::seconds(5));
-
- // Wait for the timer to expire.
- timer.wait();
-
-
-
-
-
-Performing an asynchronous wait (C++11):
-
- void handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
-
- ...
-
- // Construct a timer with an absolute expiry time.
- asio::steady_timer timer(io_context,
- std::chrono::steady_clock::now() + std::chrono::seconds(60));
-
- // Start an asynchronous wait.
- timer.async_wait(handler);
-
-
-
-
-
-[heading Changing an active waitable 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:
-
-
-
- void on_some_event()
- {
- if (my_timer.expires_after(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 asio::error_code& e)
- {
- if (e != asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
-
-
-
-
-
-* The `asio::basic_waitable_timer::expires_after()` 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.
-
-
-* If a wait handler is cancelled, the [link asio.reference.error_code `error_code`] passed to it contains the value `asio::error::operation_aborted`.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_wait basic_waitable_timer::async_wait]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.async_wait..async_wait..basic_waitable_timer]
-Start an asynchronous wait on the timer.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- WaitHandler && handler);
-
-
-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:
-
-
-* The timer has expired.
-
-
-* The timer was cancelled, in which case the handler is passed the error code `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[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:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:basic_waitable_timer basic_waitable_timer::basic_waitable_timer]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.basic_waitable_timer..basic_waitable_timer..basic_waitable_timer]
-Constructor.
-
-
- explicit ``[link asio.reference.basic_waitable_timer.basic_waitable_timer.overload1 basic_waitable_timer]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.basic_waitable_timer.overload1 more...]]``
-
-
-Constructor to set a particular expiry time as an absolute time.
-
-
- ``[link asio.reference.basic_waitable_timer.basic_waitable_timer.overload2 basic_waitable_timer]``(
- asio::io_context & io_context,
- const time_point & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.basic_waitable_timer.overload2 more...]]``
-
-
-Constructor to set a particular expiry time relative to now.
-
-
- ``[link asio.reference.basic_waitable_timer.basic_waitable_timer.overload3 basic_waitable_timer]``(
- asio::io_context & io_context,
- const duration & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.basic_waitable_timer.overload3 more...]]``
-
-
-Move-construct a [link asio.reference.basic_waitable_timer `basic_waitable_timer`] from another.
-
-
- ``[link asio.reference.basic_waitable_timer.basic_waitable_timer.overload4 basic_waitable_timer]``(
- basic_waitable_timer && other);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.basic_waitable_timer.overload4 more...]]``
-
-
-[section:overload1 basic_waitable_timer::basic_waitable_timer (1 of 4 overloads)]
-
-
-Constructor.
-
-
- basic_waitable_timer(
- asio::io_context & io_context);
-
-
-This constructor creates a timer without setting an expiry time. The `expires_at()` or `expires_after()` functions must be called to set an expiry time before the timer can be waited on.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the timer will use to dispatch handlers for any asynchronous operations performed on the timer. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::basic_waitable_timer (2 of 4 overloads)]
-
-
-Constructor to set a particular expiry time as an absolute time.
-
-
- basic_waitable_timer(
- asio::io_context & io_context,
- const time_point & expiry_time);
-
-
-This constructor creates a timer and sets the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the timer will use to dispatch handlers for any asynchronous operations performed on the timer.]]
-
-[[expiry_time][The expiry time to be used for the timer, expressed as an absolute time. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 basic_waitable_timer::basic_waitable_timer (3 of 4 overloads)]
-
-
-Constructor to set a particular expiry time relative to now.
-
-
- basic_waitable_timer(
- asio::io_context & io_context,
- const duration & expiry_time);
-
-
-This constructor creates a timer and sets the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the timer will use to dispatch handlers for any asynchronous operations performed on the timer.]]
-
-[[expiry_time][The expiry time to be used for the timer, relative to now. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 basic_waitable_timer::basic_waitable_timer (4 of 4 overloads)]
-
-
-Move-construct a [link asio.reference.basic_waitable_timer `basic_waitable_timer`] from another.
-
-
- basic_waitable_timer(
- basic_waitable_timer && other);
-
-
-This constructor moves a timer from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_waitable_timer `basic_waitable_timer`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_waitable_timer(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel basic_waitable_timer::cancel]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.cancel..cancel..basic_waitable_timer]
-Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel.overload1 more...]]``
-
-
-(Deprecated: Use non-error\_code overload.) Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel.overload2 more...]]``
-
-
-[section:overload1 basic_waitable_timer::cancel (1 of 2 overloads)]
-
-
-Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t cancel();
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::cancel (2 of 2 overloads)]
-
-
-(Deprecated: Use non-error\_code overload.) Cancel any asynchronous operations that are waiting on the timer.
-
-
- std::size_t cancel(
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel_one basic_waitable_timer::cancel_one]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.cancel_one..cancel_one..basic_waitable_timer]
-Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.cancel_one.overload1 cancel_one]``();
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel_one.overload1 more...]]``
-
-
-(Deprecated: Use non-error\_code overload.) Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.cancel_one.overload2 cancel_one]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.cancel_one.overload2 more...]]``
-
-
-[section:overload1 basic_waitable_timer::cancel_one (1 of 2 overloads)]
-
-
-Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t cancel_one();
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled. That is, either 0 or 1.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel_one()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::cancel_one (2 of 2 overloads)]
-
-
-(Deprecated: Use non-error\_code overload.) Cancels one asynchronous operation that is waiting on the timer.
-
-
- std::size_t cancel_one(
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-Cancelling the timer does not change the expiry time.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled. That is, either 0 or 1.
-
-
-[heading Remarks]
-
-If the timer has already expired when `cancel_one()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:clock_type basic_waitable_timer::clock_type]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.clock_type..clock_type..basic_waitable_timer]
-The clock type.
-
-
- typedef Clock clock_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:duration basic_waitable_timer::duration]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.duration..duration..basic_waitable_timer]
-The duration type of the clock.
-
-
- typedef clock_type::duration duration;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type basic_waitable_timer::executor_type]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.executor_type..executor_type..basic_waitable_timer]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:expires_after basic_waitable_timer::expires_after]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.expires_after..expires_after..basic_waitable_timer]
-Set the timer's expiry time relative to now.
-
-
- std::size_t expires_after(
- const duration & expiry_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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_after()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[section:expires_at basic_waitable_timer::expires_at]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.expires_at..expires_at..basic_waitable_timer]
-(Deprecated: Use `expiry()`.) Get the timer's expiry time as an absolute time.
-
-
- time_point ``[link asio.reference.basic_waitable_timer.expires_at.overload1 expires_at]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_at.overload1 more...]]``
-
-
-Set the timer's expiry time as an absolute time.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.expires_at.overload2 expires_at]``(
- const time_point & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_at.overload2 more...]]``
-
-
-(Deprecated: Use non-error\_code overload.) Set the timer's expiry time as an absolute time.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.expires_at.overload3 expires_at]``(
- const time_point & expiry_time,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_at.overload3 more...]]``
-
-
-[section:overload1 basic_waitable_timer::expires_at (1 of 3 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the timer's expiry time as an absolute time.
-
-
- time_point expires_at() const;
-
-
-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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::expires_at (2 of 3 overloads)]
-
-
-Set the timer's expiry time as an absolute time.
-
-
- std::size_t expires_at(
- const time_point & expiry_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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_at()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload3 basic_waitable_timer::expires_at (3 of 3 overloads)]
-
-
-(Deprecated: Use non-error\_code overload.) Set the timer's expiry time as an absolute time.
-
-
- std::size_t expires_at(
- const time_point & expiry_time,
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_at()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:expires_from_now basic_waitable_timer::expires_from_now]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.expires_from_now..expires_from_now..basic_waitable_timer]
-(Deprecated: Use `expiry()`.) Get the timer's expiry time relative to now.
-
-
- duration ``[link asio.reference.basic_waitable_timer.expires_from_now.overload1 expires_from_now]``() const;
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_from_now.overload1 more...]]``
-
-
-(Deprecated: Use `expires_after()`.) Set the timer's expiry time relative to now.
-
-
- std::size_t ``[link asio.reference.basic_waitable_timer.expires_from_now.overload2 expires_from_now]``(
- const duration & expiry_time);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_from_now.overload2 more...]]``
-
- std::size_t ``[link asio.reference.basic_waitable_timer.expires_from_now.overload3 expires_from_now]``(
- const duration & expiry_time,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.expires_from_now.overload3 more...]]``
-
-
-[section:overload1 basic_waitable_timer::expires_from_now (1 of 3 overloads)]
-
-
-(Deprecated: Use `expiry()`.) Get the timer's expiry time relative to now.
-
-
- duration expires_from_now() const;
-
-
-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.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::expires_from_now (2 of 3 overloads)]
-
-
-(Deprecated: Use `expires_after()`.) Set the timer's expiry time relative to now.
-
-
- std::size_t expires_from_now(
- const duration & expiry_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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_from_now()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload3 basic_waitable_timer::expires_from_now (3 of 3 overloads)]
-
-
-(Deprecated: Use `expires_after()`.) Set the timer's expiry time relative to now.
-
-
- std::size_t expires_from_now(
- const duration & expiry_time,
- asio::error_code & ec);
-
-
-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 `asio::error::operation_aborted` error code.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[expiry_time][The expiry time to be used for the timer.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of asynchronous operations that were cancelled.
-
-
-[heading Remarks]
-
-If the timer has already expired when `expires_from_now()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:expiry basic_waitable_timer::expiry]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.expiry..expiry..basic_waitable_timer]
-Get the timer's expiry time as an absolute time.
-
-
- time_point expiry() const;
-
-
-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.
-
-
-[endsect]
-
-
-
-[section:get_executor basic_waitable_timer::get_executor]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.get_executor..get_executor..basic_waitable_timer]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context basic_waitable_timer::get_io_context]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.get_io_context..get_io_context..basic_waitable_timer]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service basic_waitable_timer::get_io_service]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.get_io_service..get_io_service..basic_waitable_timer]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ basic_waitable_timer::operator=]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.operator_eq_..operator=..basic_waitable_timer]
-Move-assign a [link asio.reference.basic_waitable_timer `basic_waitable_timer`] from another.
-
-
- basic_waitable_timer & operator=(
- basic_waitable_timer && other);
-
-
-This assignment operator moves a timer from one object to another. Cancels any outstanding asynchronous operations associated with the target object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.basic_waitable_timer `basic_waitable_timer`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_waitable_timer(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:time_point basic_waitable_timer::time_point]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.time_point..time_point..basic_waitable_timer]
-The time point type of the clock.
-
-
- typedef clock_type::time_point time_point;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:traits_type basic_waitable_timer::traits_type]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.traits_type..traits_type..basic_waitable_timer]
-The wait traits type.
-
-
- typedef WaitTraits traits_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/basic_waitable_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:wait basic_waitable_timer::wait]
-
-[indexterm2 asio.indexterm.basic_waitable_timer.wait..wait..basic_waitable_timer]
-Perform a blocking wait on the timer.
-
-
- void ``[link asio.reference.basic_waitable_timer.wait.overload1 wait]``();
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.wait.overload1 more...]]``
-
- void ``[link asio.reference.basic_waitable_timer.wait.overload2 wait]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.basic_waitable_timer.wait.overload2 more...]]``
-
-
-[section:overload1 basic_waitable_timer::wait (1 of 2 overloads)]
-
-
-Perform a blocking wait on the timer.
-
-
- void wait();
-
-
-This function is used to wait for the timer to expire. This function blocks and does not return until the timer has expired.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 basic_waitable_timer::wait (2 of 2 overloads)]
-
-
-Perform a blocking wait on the timer.
-
-
- void wait(
- asio::error_code & ec);
-
-
-This function is used to wait for the timer to expire. This function blocks and does not return until the timer has expired.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_basic_waitable_timer basic_waitable_timer::~basic_waitable_timer]
-
-[indexterm2 asio.indexterm.basic_waitable_timer._basic_waitable_timer..~basic_waitable_timer..basic_waitable_timer]
-Destroys the timer.
-
-
- ~basic_waitable_timer();
-
-
-This function destroys the timer, cancelling any outstanding asynchronous wait operations associated with the timer as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:basic_yield_context basic_yield_context]
-
-
-Context object the represents the currently executing coroutine.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- class basic_yield_context
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_yield_context.callee_type [*callee_type]]]
- [The coroutine callee type, used by the implementation. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_yield_context.caller_type [*caller_type]]]
- [The coroutine caller type, used by the implementation. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_yield_context.basic_yield_context [*basic_yield_context]]]
- [Construct a yield context to represent the specified coroutine.
-
- Construct a yield context from another yield context type. ]
- ]
-
- [
- [[link asio.reference.basic_yield_context.operator_lb__rb_ [*operator\[\]]]]
- [Return a yield context that sets the specified error_code. ]
- ]
-
-]
-
-The [link asio.reference.basic_yield_context `basic_yield_context`] class is used to represent the currently executing stackful coroutine. A [link asio.reference.basic_yield_context `basic_yield_context`] may be passed as a handler to an asynchronous operation. For example:
-
-
-
- template <typename Handler>
- void my_coroutine(basic_yield_context<Handler> yield)
- {
- ...
- std::size_t n = my_socket.async_read_some(buffer, yield);
- ...
- }
-
-
-
-
-The initiating function (async\_read\_some in the above example) suspends the current coroutine. The coroutine is resumed when the asynchronous operation completes, and the result of the operation is returned.
-
-[heading Requirements]
-
-['Header: ][^asio/spawn.hpp]
-
-['Convenience header: ]None
-
-[section:basic_yield_context basic_yield_context::basic_yield_context]
-
-[indexterm2 asio.indexterm.basic_yield_context.basic_yield_context..basic_yield_context..basic_yield_context]
-Construct a yield context to represent the specified coroutine.
-
-
- ``[link asio.reference.basic_yield_context.basic_yield_context.overload1 basic_yield_context]``(
- const detail::weak_ptr< callee_type > & coro,
- caller_type & ca,
- Handler & handler);
- `` [''''&raquo;''' [link asio.reference.basic_yield_context.basic_yield_context.overload1 more...]]``
-
-
-Construct a yield context from another yield context type.
-
-
- template<
- typename OtherHandler>
- ``[link asio.reference.basic_yield_context.basic_yield_context.overload2 basic_yield_context]``(
- const basic_yield_context< OtherHandler > & other);
- `` [''''&raquo;''' [link asio.reference.basic_yield_context.basic_yield_context.overload2 more...]]``
-
-
-[section:overload1 basic_yield_context::basic_yield_context (1 of 2 overloads)]
-
-
-Construct a yield context to represent the specified coroutine.
-
-
- basic_yield_context(
- const detail::weak_ptr< callee_type > & coro,
- caller_type & ca,
- Handler & handler);
-
-
-Most applications do not need to use this constructor. Instead, the `spawn()` function passes a yield context as an argument to the coroutine function.
-
-
-[endsect]
-
-
-
-[section:overload2 basic_yield_context::basic_yield_context (2 of 2 overloads)]
-
-
-Construct a yield context from another yield context type.
-
-
- template<
- typename OtherHandler>
- basic_yield_context(
- const basic_yield_context< OtherHandler > & other);
-
-
-Requires that OtherHandler be convertible to Handler.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:callee_type basic_yield_context::callee_type]
-
-[indexterm2 asio.indexterm.basic_yield_context.callee_type..callee_type..basic_yield_context]
-The coroutine callee type, used by the implementation.
-
-
- typedef implementation_defined callee_type;
-
-
-
-When using Boost.Coroutine v1, this type is:
-
- typename coroutine<void()>
-
-
-When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
-
- push_coroutine<void>
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/spawn.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[section:caller_type basic_yield_context::caller_type]
-
-[indexterm2 asio.indexterm.basic_yield_context.caller_type..caller_type..basic_yield_context]
-The coroutine caller type, used by the implementation.
-
-
- typedef implementation_defined caller_type;
-
-
-
-When using Boost.Coroutine v1, this type is:
-
- typename coroutine<void()>::caller_type
-
-
-When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
-
- pull_coroutine<void>
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/spawn.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[section:operator_lb__rb_ basic_yield_context::operator\[\]]
-
-[indexterm2 asio.indexterm.basic_yield_context.operator_lb__rb_..operator\[\]..basic_yield_context]
-Return a yield context that sets the specified [link asio.reference.error_code `error_code`].
-
-
- basic_yield_context operator[](
- asio::error_code & ec) const;
-
-
-By default, when a yield context is used with an asynchronous operation, a non-success [link asio.reference.error_code `error_code`] is converted to [link asio.reference.system_error `system_error`] and thrown. This operator may be used to specify an [link asio.reference.error_code `error_code`] object that should instead be set with the asynchronous operation's result. For example:
-
-
-
- template <typename Handler>
- void my_coroutine(basic_yield_context<Handler> yield)
- {
- ...
- std::size_t n = my_socket.async_read_some(buffer, yield[ec]);
- if (ec)
- {
- // An error occurred.
- }
- ...
- }
-
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:bind_executor bind_executor]
-
-[indexterm1 asio.indexterm.bind_executor..bind_executor]
-Associate an object of type `T` with an executor of type `Executor`.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename T>
- executor_binder< typename decay< T >::type, Executor > ``[link asio.reference.bind_executor.overload1 bind_executor]``(
- const Executor & ex,
- T && t,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.bind_executor.overload1 more...]]``
-
- template<
- typename ExecutionContext,
- typename T>
- executor_binder< typename decay< T >::type, typename ExecutionContext::executor_type > ``[link asio.reference.bind_executor.overload2 bind_executor]``(
- ExecutionContext & ctx,
- T && t,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.bind_executor.overload2 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 bind_executor (1 of 2 overloads)]
-
-
-Associate an object of type `T` with an executor of type `Executor`.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename T>
- executor_binder< typename decay< T >::type, Executor > bind_executor(
- const Executor & ex,
- T && t,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload2 bind_executor (2 of 2 overloads)]
-
-
-Associate an object of type `T` with an execution context's executor.
-
-
- template<
- typename ExecutionContext,
- typename T>
- executor_binder< typename decay< T >::type, typename ExecutionContext::executor_type > bind_executor(
- ExecutionContext & ctx,
- T && t,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffer buffer]
-
-[indexterm1 asio.indexterm.buffer..buffer]
-The `asio::buffer` function is used to create a buffer object to represent raw memory, an array of POD elements, a vector of POD elements, or a std::string.
-
-
- mutable_buffer ``[link asio.reference.buffer.overload1 buffer]``(
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer.overload1 more...]]``
-
- mutable_buffer ``[link asio.reference.buffer.overload2 buffer]``(
- const mutable_buffer & b,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload2 more...]]``
-
- const_buffer ``[link asio.reference.buffer.overload3 buffer]``(
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer.overload3 more...]]``
-
- const_buffer ``[link asio.reference.buffer.overload4 buffer]``(
- const const_buffer & b,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload4 more...]]``
-
- mutable_buffer ``[link asio.reference.buffer.overload5 buffer]``(
- void * data,
- std::size_t size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload5 more...]]``
-
- const_buffer ``[link asio.reference.buffer.overload6 buffer]``(
- const void * data,
- std::size_t size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload6 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer ``[link asio.reference.buffer.overload7 buffer]``(
- PodType (&data)[N]);
- `` [''''&raquo;''' [link asio.reference.buffer.overload7 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer ``[link asio.reference.buffer.overload8 buffer]``(
- PodType (&data)[N],
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload8 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload9 buffer]``(
- const PodType (&data)[N]);
- `` [''''&raquo;''' [link asio.reference.buffer.overload9 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload10 buffer]``(
- const PodType (&data)[N],
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload10 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer ``[link asio.reference.buffer.overload11 buffer]``(
- boost::array< PodType, N > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload11 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer ``[link asio.reference.buffer.overload12 buffer]``(
- boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload12 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload13 buffer]``(
- boost::array< const PodType, N > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload13 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload14 buffer]``(
- boost::array< const PodType, N > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload14 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload15 buffer]``(
- const boost::array< PodType, N > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload15 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload16 buffer]``(
- const boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload16 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer ``[link asio.reference.buffer.overload17 buffer]``(
- std::array< PodType, N > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload17 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer ``[link asio.reference.buffer.overload18 buffer]``(
- std::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload18 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload19 buffer]``(
- std::array< const PodType, N > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload19 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload20 buffer]``(
- std::array< const PodType, N > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload20 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload21 buffer]``(
- const std::array< PodType, N > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload21 more...]]``
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer ``[link asio.reference.buffer.overload22 buffer]``(
- const std::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload22 more...]]``
-
- template<
- typename PodType,
- typename Allocator>
- mutable_buffer ``[link asio.reference.buffer.overload23 buffer]``(
- std::vector< PodType, Allocator > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload23 more...]]``
-
- template<
- typename PodType,
- typename Allocator>
- mutable_buffer ``[link asio.reference.buffer.overload24 buffer]``(
- std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload24 more...]]``
-
- template<
- typename PodType,
- typename Allocator>
- const_buffer ``[link asio.reference.buffer.overload25 buffer]``(
- const std::vector< PodType, Allocator > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload25 more...]]``
-
- template<
- typename PodType,
- typename Allocator>
- const_buffer ``[link asio.reference.buffer.overload26 buffer]``(
- const std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload26 more...]]``
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- mutable_buffer ``[link asio.reference.buffer.overload27 buffer]``(
- std::basic_string< Elem, Traits, Allocator > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload27 more...]]``
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- mutable_buffer ``[link asio.reference.buffer.overload28 buffer]``(
- std::basic_string< Elem, Traits, Allocator > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload28 more...]]``
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- const_buffer ``[link asio.reference.buffer.overload29 buffer]``(
- const std::basic_string< Elem, Traits, Allocator > & data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload29 more...]]``
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- const_buffer ``[link asio.reference.buffer.overload30 buffer]``(
- const std::basic_string< Elem, Traits, Allocator > & data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload30 more...]]``
-
- template<
- typename Elem,
- typename Traits>
- const_buffer ``[link asio.reference.buffer.overload31 buffer]``(
- basic_string_view< Elem, Traits > data);
- `` [''''&raquo;''' [link asio.reference.buffer.overload31 more...]]``
-
- template<
- typename Elem,
- typename Traits>
- const_buffer ``[link asio.reference.buffer.overload32 buffer]``(
- basic_string_view< Elem, Traits > data,
- std::size_t max_size_in_bytes);
- `` [''''&raquo;''' [link asio.reference.buffer.overload32 more...]]``
-
-A buffer object represents a contiguous region of memory as a 2-tuple consisting of a pointer and size in bytes. A tuple of the form `{void*, size_t}` specifies a mutable (modifiable) region of memory. Similarly, a tuple of the form `{const void*, size_t}` specifies a const (non-modifiable) region of memory. These two forms correspond to the classes [link asio.reference.mutable_buffer `mutable_buffer`] and [link asio.reference.const_buffer `const_buffer`], respectively. To mirror C++'s conversion rules, a [link asio.reference.mutable_buffer `mutable_buffer`] is implicitly convertible to a [link asio.reference.const_buffer `const_buffer`], and the opposite conversion is not permitted.
-
-The simplest use case involves reading or writing a single buffer of a specified size:
-
-
-
- sock.send(asio::buffer(data, size));
-
-
-
-
-In the above example, the return value of `asio::buffer` meets the requirements of the ConstBufferSequence concept so that it may be directly passed to the socket's write function. A buffer created for modifiable memory also meets the requirements of the MutableBufferSequence concept.
-
-An individual buffer may be created from a builtin array, std::vector, std::array or boost::array of POD elements. This helps prevent buffer overruns by automatically determining the size of the buffer:
-
-
-
- char d1[128];
- size_t bytes_transferred = sock.receive(asio::buffer(d1));
-
- std::vector<char> d2(128);
- bytes_transferred = sock.receive(asio::buffer(d2));
-
- std::array<char, 128> d3;
- bytes_transferred = sock.receive(asio::buffer(d3));
-
- boost::array<char, 128> d4;
- bytes_transferred = sock.receive(asio::buffer(d4));
-
-
-
-
-In all three cases above, the buffers created are exactly 128 bytes long. Note that a vector is ['never] automatically resized when creating or using a buffer. The buffer size is determined using the vector's `size()` member function, and not its capacity.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::mutable_buffer b1 = ...;
- std::size_t s1 = b1.size();
- unsigned char* p1 = static_cast<unsigned char*>(b1.data());
-
- asio::const_buffer b2 = ...;
- std::size_t s2 = b2.size();
- const void* p2 = b2.data();
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-For convenience, a [link asio.reference.buffer_size `buffer_size`] function is provided that works with both buffers and buffer sequences (that is, types meeting the ConstBufferSequence or MutableBufferSequence type requirements). In this case, the function returns the total size of all buffers in the sequence.
-
-
-[heading Buffer Copying]
-
-
-
-The [link asio.reference.buffer_copy `buffer_copy`] function may be used to copy raw bytes between individual buffers and buffer sequences.
-
-In particular, when used with the [link asio.reference.buffer_size `buffer_size`] function, the [link asio.reference.buffer_copy `buffer_copy`] function can be used to linearise a sequence of buffers. For example:
-
-
-
- vector<const_buffer> buffers = ...;
-
- vector<unsigned char> data(asio::buffer_size(buffers));
- asio::buffer_copy(asio::buffer(data), buffers);
-
-
-
-
-Note that [link asio.reference.buffer_copy `buffer_copy`] is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions.
-
-
-[heading Buffer Invalidation]
-
-
-
-A buffer object does not have any ownership of the memory it refers to. It is the responsibility of the application to ensure the memory region remains valid until it is no longer required for an I/O operation. When the memory is no longer available, the buffer is said to have been invalidated.
-
-For the `asio::buffer` overloads that accept an argument of type std::vector, the buffer objects returned are invalidated by any vector operation that also invalidates all references, pointers and iterators referring to the elements in the sequence (C++ Std, 23.2.4)
-
-For the `asio::buffer` overloads that accept an argument of type std::basic\_string, the buffer objects returned are invalidated according to the rules defined for invalidation of references, pointers and iterators referring to elements of the sequence (C++ Std, 21.3).
-
-
-[heading Buffer Arithmetic]
-
-
-
-Buffer objects may be manipulated using simple arithmetic in a safe way which helps prevent buffer overruns. Consider an array initialised as follows:
-
-
-
- boost::array<char, 6> a = { 'a', 'b', 'c', 'd', 'e' };
-
-
-
-
-A buffer object `b1` created using:
-
-
-
- b1 = asio::buffer(a);
-
-
-
-
-represents the entire array, `{ 'a', 'b', 'c', 'd', 'e' }`. An optional second argument to the `asio::buffer` function may be used to limit the size, in bytes, of the buffer:
-
-
-
- b2 = asio::buffer(a, 3);
-
-
-
-
-such that `b2` represents the data `{ 'a', 'b', 'c' }`. Even if the size argument exceeds the actual size of the array, the size of the buffer object created will be limited to the array size.
-
-An offset may be applied to an existing buffer to create a new one:
-
-
-
- b3 = b1 + 2;
-
-
-
-
-where `b3` will set to represent `{ 'c', 'd', 'e' }`. If the offset exceeds the size of the existing buffer, the newly created buffer will be empty.
-
-Both an offset and size may be specified to create a buffer that corresponds to a specific range of bytes within an existing buffer:
-
-
-
- b4 = asio::buffer(b1 + 1, 3);
-
-
-
-
-so that `b4` will refer to the bytes `{ 'b', 'c', 'd' }`.
-
-
-[heading Buffers and Scatter-Gather I/O]
-
-
-
-To read or write using multiple buffers (i.e. scatter-gather I/O), multiple buffer objects may be assigned into a container that supports the MutableBufferSequence (for read) or ConstBufferSequence (for write) concepts:
-
-
-
- char d1[128];
- std::vector<char> d2(128);
- boost::array<char, 128> d3;
-
- boost::array<mutable_buffer, 3> bufs1 = {
- asio::buffer(d1),
- asio::buffer(d2),
- asio::buffer(d3) };
- bytes_transferred = sock.receive(bufs1);
-
- std::vector<const_buffer> bufs2;
- bufs2.push_back(asio::buffer(d1));
- bufs2.push_back(asio::buffer(d2));
- bufs2.push_back(asio::buffer(d3));
- bytes_transferred = sock.send(bufs2);
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 buffer (1 of 32 overloads)]
-
-
-Create a new modifiable buffer from an existing buffer.
-
-
- mutable_buffer buffer(
- const mutable_buffer & b);
-
-
-
-[heading Return Value]
-
-`mutable_buffer(b)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffer (2 of 32 overloads)]
-
-
-Create a new modifiable buffer from an existing buffer.
-
-
- mutable_buffer buffer(
- const mutable_buffer & b,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- b.data(),
- min(b.size(), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 buffer (3 of 32 overloads)]
-
-
-Create a new non-modifiable buffer from an existing buffer.
-
-
- const_buffer buffer(
- const const_buffer & b);
-
-
-
-[heading Return Value]
-
-`const_buffer(b)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 buffer (4 of 32 overloads)]
-
-
-Create a new non-modifiable buffer from an existing buffer.
-
-
- const_buffer buffer(
- const const_buffer & b,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- b.data(),
- min(b.size(), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 buffer (5 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given memory range.
-
-
- mutable_buffer buffer(
- void * data,
- std::size_t size_in_bytes);
-
-
-
-[heading Return Value]
-
-`mutable_buffer(data, size_in_bytes)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 buffer (6 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given memory range.
-
-
- const_buffer buffer(
- const void * data,
- std::size_t size_in_bytes);
-
-
-
-[heading Return Value]
-
-`const_buffer(data, size_in_bytes)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 buffer (7 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer buffer(
- PodType (&data)[N]);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- static_cast<void*>(data),
- N * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 buffer (8 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer buffer(
- PodType (&data)[N],
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- static_cast<void*>(data),
- min(N * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload9 buffer (9 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- const PodType (&data)[N]);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- static_cast<const void*>(data),
- N * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload10 buffer (10 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- const PodType (&data)[N],
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- static_cast<const void*>(data),
- min(N * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload11 buffer (11 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer buffer(
- boost::array< PodType, N > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.data(),
- data.size() * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 buffer (12 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer buffer(
- boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.data(),
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload13 buffer (13 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- boost::array< const PodType, N > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- data.size() * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload14 buffer (14 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- boost::array< const PodType, N > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload15 buffer (15 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- const boost::array< PodType, N > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- data.size() * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload16 buffer (16 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- const boost::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload17 buffer (17 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer buffer(
- std::array< PodType, N > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.data(),
- data.size() * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload18 buffer (18 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- mutable_buffer buffer(
- std::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.data(),
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload19 buffer (19 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- std::array< const PodType, N > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- data.size() * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload20 buffer (20 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- std::array< const PodType, N > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload21 buffer (21 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- const std::array< PodType, N > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- data.size() * sizeof(PodType));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload22 buffer (22 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD array.
-
-
- template<
- typename PodType,
- std::size_t N>
- const_buffer buffer(
- const std::array< PodType, N > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload23 buffer (23 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD vector.
-
-
- template<
- typename PodType,
- typename Allocator>
- mutable_buffer buffer(
- std::vector< PodType, Allocator > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.size() ? &data[0] : 0,
- data.size() * sizeof(PodType));
-
-
-
-
-
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
-
-
-
-
-[endsect]
-
-
-
-[section:overload24 buffer (24 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given POD vector.
-
-
- template<
- typename PodType,
- typename Allocator>
- mutable_buffer buffer(
- std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.size() ? &data[0] : 0,
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
-
-
-
-
-[endsect]
-
-
-
-[section:overload25 buffer (25 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD vector.
-
-
- template<
- typename PodType,
- typename Allocator>
- const_buffer buffer(
- const std::vector< PodType, Allocator > & data);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.size() ? &data[0] : 0,
- data.size() * sizeof(PodType));
-
-
-
-
-
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
-
-
-
-
-[endsect]
-
-
-
-[section:overload26 buffer (26 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given POD vector.
-
-
- template<
- typename PodType,
- typename Allocator>
- const_buffer buffer(
- const std::vector< PodType, Allocator > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.size() ? &data[0] : 0,
- min(data.size() * sizeof(PodType), max_size_in_bytes));
-
-
-
-
-
-[heading Remarks]
-
-The buffer is invalidated by any vector operation that would also invalidate iterators.
-
-
-
-
-[endsect]
-
-
-
-[section:overload27 buffer (27 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- mutable_buffer buffer(
- std::basic_string< Elem, Traits, Allocator > & data);
-
-
-
-[heading Return Value]
-
-`mutable_buffer(data.size() ? &data[0] : 0, data.size() * sizeof(Elem))`.
-
-
-[heading Remarks]
-
-The buffer is invalidated by any non-const operation called on the given string object.
-
-
-
-
-[endsect]
-
-
-
-[section:overload28 buffer (28 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- mutable_buffer buffer(
- std::basic_string< Elem, Traits, Allocator > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.size() ? &data[0] : 0,
- min(data.size() * sizeof(Elem), max_size_in_bytes));
-
-
-
-
-
-[heading Remarks]
-
-The buffer is invalidated by any non-const operation called on the given string object.
-
-
-
-
-[endsect]
-
-
-
-[section:overload29 buffer (29 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- const_buffer buffer(
- const std::basic_string< Elem, Traits, Allocator > & data);
-
-
-
-[heading Return Value]
-
-`const_buffer(data.data(), data.size() * sizeof(Elem))`.
-
-
-[heading Remarks]
-
-The buffer is invalidated by any non-const operation called on the given string object.
-
-
-
-
-[endsect]
-
-
-
-[section:overload30 buffer (30 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- const_buffer buffer(
- const std::basic_string< Elem, Traits, Allocator > & data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.const_buffer `const_buffer`] value equivalent to:
-
- const_buffer(
- data.data(),
- min(data.size() * sizeof(Elem), max_size_in_bytes));
-
-
-
-
-
-[heading Remarks]
-
-The buffer is invalidated by any non-const operation called on the given string object.
-
-
-
-
-[endsect]
-
-
-
-[section:overload31 buffer (31 of 32 overloads)]
-
-
-Create a new modifiable buffer that represents the given string\_view.
-
-
- template<
- typename Elem,
- typename Traits>
- const_buffer buffer(
- basic_string_view< Elem, Traits > data);
-
-
-
-[heading Return Value]
-
-`mutable_buffer(data.size() ? &data[0] : 0, data.size() * sizeof(Elem))`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload32 buffer (32 of 32 overloads)]
-
-
-Create a new non-modifiable buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits>
- const_buffer buffer(
- basic_string_view< Elem, Traits > data,
- std::size_t max_size_in_bytes);
-
-
-
-[heading Return Value]
-
-A [link asio.reference.mutable_buffer `mutable_buffer`] value equivalent to:
-
- mutable_buffer(
- data.size() ? &data[0] : 0,
- min(data.size() * sizeof(Elem), max_size_in_bytes));
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffer_cast buffer_cast]
-
-[indexterm1 asio.indexterm.buffer_cast..buffer_cast]
-(Deprecated: Use the `data()` member function.) The `asio::buffer_cast` function is used to obtain a pointer to the underlying memory region associated with a buffer.
-
-
- template<
- typename PointerToPodType>
- PointerToPodType ``[link asio.reference.buffer_cast.overload1 buffer_cast]``(
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer_cast.overload1 more...]]``
-
- template<
- typename PointerToPodType>
- PointerToPodType ``[link asio.reference.buffer_cast.overload2 buffer_cast]``(
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer_cast.overload2 more...]]``
-
-
-[heading Examples:]
-
-
-
-To access the memory of a non-modifiable buffer, use:
-
- asio::const_buffer b1 = ...;
- const unsigned char* p1 = asio::buffer_cast<const unsigned char*>(b1);
-
-
-
-
-To access the memory of a modifiable buffer, use:
-
- asio::mutable_buffer b2 = ...;
- unsigned char* p2 = asio::buffer_cast<unsigned char*>(b2);
-
-
-
-
-The `asio::buffer_cast` function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 buffer_cast (1 of 2 overloads)]
-
-
-Cast a non-modifiable buffer to a specified pointer to POD type.
-
-
- template<
- typename PointerToPodType>
- PointerToPodType buffer_cast(
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffer_cast (2 of 2 overloads)]
-
-
-Cast a non-modifiable buffer to a specified pointer to POD type.
-
-
- template<
- typename PointerToPodType>
- PointerToPodType buffer_cast(
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffer_copy buffer_copy]
-
-[indexterm1 asio.indexterm.buffer_copy..buffer_copy]
-The `asio::buffer_copy` function is used to copy bytes from a source buffer (or buffer sequence) to a target buffer (or buffer sequence).
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffer_copy.overload1 buffer_copy]``(
- const MutableBufferSequence & target,
- const ConstBufferSequence & source);
- `` [''''&raquo;''' [link asio.reference.buffer_copy.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffer_copy.overload2 buffer_copy]``(
- const MutableBufferSequence & target,
- const ConstBufferSequence & source,
- std::size_t max_bytes_to_copy);
- `` [''''&raquo;''' [link asio.reference.buffer_copy.overload2 more...]]``
-
-The `buffer_copy` function is available in two forms:
-
-
-* A 2-argument form: `buffer_copy(target, source)`
-
-
-* A 3-argument form: `buffer_copy(target, source, max_bytes_to_copy)`
-
-Both forms return the number of bytes actually copied. The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)`
-
-
-* `buffer_size(source)`
-
-
-* `If` specified, `max_bytes_to_copy`.
-
-This prevents buffer overflow, regardless of the buffer sizes used in the copy operation.
-
-Note that [link asio.reference.buffer_copy `buffer_copy`] is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 buffer_copy (1 of 2 overloads)]
-
-
-Copies bytes from a source buffer sequence to a target buffer sequence.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t buffer_copy(
- const MutableBufferSequence & target,
- const ConstBufferSequence & source);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes copied.
-
-
-[heading Remarks]
-
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)`
-
-
-* `buffer_size(source)`
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions.
-
-
-[endsect]
-
-
-
-[section:overload2 buffer_copy (2 of 2 overloads)]
-
-
-Copies a limited number of bytes from a source buffer sequence to a target buffer sequence.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t buffer_copy(
- const MutableBufferSequence & target,
- const ConstBufferSequence & source,
- std::size_t max_bytes_to_copy);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[target][A modifiable buffer sequence representing the memory regions to which the bytes will be copied.]]
-
-[[source][A non-modifiable buffer sequence representing the memory regions from which the bytes will be copied.]]
-
-[[max_bytes_to_copy][The maximum number of bytes to be copied.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes copied.
-
-
-[heading Remarks]
-
-The number of bytes copied is the lesser of:
-
-
-* `buffer_size(target)`
-
-
-* `buffer_size(source)`
-
-
-* `max_bytes_to_copy`
-
-This function is implemented in terms of `memcpy`, and consequently it cannot be used to copy between overlapping memory regions.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffer_sequence_begin buffer_sequence_begin]
-
-[indexterm1 asio.indexterm.buffer_sequence_begin..buffer_sequence_begin]
-The `asio::buffer_sequence_begin` function returns an iterator pointing to the first element in a buffer sequence.
-
-
- const mutable_buffer * ``[link asio.reference.buffer_sequence_begin.overload1 buffer_sequence_begin]``(
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload1 more...]]``
-
- const const_buffer * ``[link asio.reference.buffer_sequence_begin.overload2 buffer_sequence_begin]``(
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload2 more...]]``
-
- template<
- typename C>
- auto ``[link asio.reference.buffer_sequence_begin.overload3 buffer_sequence_begin]``(
- C & c);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload3 more...]]``
-
- template<
- typename C>
- auto ``[link asio.reference.buffer_sequence_begin.overload4 buffer_sequence_begin]``(
- const C & c);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_begin.overload4 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 buffer_sequence_begin (1 of 4 overloads)]
-
-
-Get an iterator to the first element in a buffer sequence.
-
-
- const mutable_buffer * buffer_sequence_begin(
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffer_sequence_begin (2 of 4 overloads)]
-
-
-Get an iterator to the first element in a buffer sequence.
-
-
- const const_buffer * buffer_sequence_begin(
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-
-[section:overload3 buffer_sequence_begin (3 of 4 overloads)]
-
-
-Get an iterator to the first element in a buffer sequence.
-
-
- template<
- typename C>
- auto buffer_sequence_begin(
- C & c);
-
-
-
-[endsect]
-
-
-
-[section:overload4 buffer_sequence_begin (4 of 4 overloads)]
-
-
-Get an iterator to the first element in a buffer sequence.
-
-
- template<
- typename C>
- auto buffer_sequence_begin(
- const C & c);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffer_sequence_end buffer_sequence_end]
-
-[indexterm1 asio.indexterm.buffer_sequence_end..buffer_sequence_end]
-The `asio::buffer_sequence_end` function returns an iterator pointing to one past the end element in a buffer sequence.
-
-
- const mutable_buffer * ``[link asio.reference.buffer_sequence_end.overload1 buffer_sequence_end]``(
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload1 more...]]``
-
- const const_buffer * ``[link asio.reference.buffer_sequence_end.overload2 buffer_sequence_end]``(
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload2 more...]]``
-
- template<
- typename C>
- auto ``[link asio.reference.buffer_sequence_end.overload3 buffer_sequence_end]``(
- C & c);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload3 more...]]``
-
- template<
- typename C>
- auto ``[link asio.reference.buffer_sequence_end.overload4 buffer_sequence_end]``(
- const C & c);
- `` [''''&raquo;''' [link asio.reference.buffer_sequence_end.overload4 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 buffer_sequence_end (1 of 4 overloads)]
-
-
-Get an iterator to one past the end element in a buffer sequence.
-
-
- const mutable_buffer * buffer_sequence_end(
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffer_sequence_end (2 of 4 overloads)]
-
-
-Get an iterator to one past the end element in a buffer sequence.
-
-
- const const_buffer * buffer_sequence_end(
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-
-[section:overload3 buffer_sequence_end (3 of 4 overloads)]
-
-
-Get an iterator to one past the end element in a buffer sequence.
-
-
- template<
- typename C>
- auto buffer_sequence_end(
- C & c);
-
-
-
-[endsect]
-
-
-
-[section:overload4 buffer_sequence_end (4 of 4 overloads)]
-
-
-Get an iterator to one past the end element in a buffer sequence.
-
-
- template<
- typename C>
- auto buffer_sequence_end(
- const C & c);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:buffer_size buffer_size]
-
-[indexterm1 asio.indexterm.buffer_size..buffer_size]
-Get the total number of bytes in a buffer sequence.
-
-
- template<
- typename BufferSequence>
- std::size_t buffer_size(
- const BufferSequence & b);
-
-
-The `buffer_size` function determines the total size of all buffers in the buffer sequence, as if computed as follows:
-
-
-
- size_t total_size = 0;
- auto i = asio::buffer_sequence_begin(buffers);
- auto end = asio::buffer_sequence_end(buffers);
- for (; i != end; ++i)
- {
- const_buffer b(*i);
- total_size += b.size();
- }
- return total_size;
-
-
-
-
-The `BufferSequence` template parameter may meet either of the `ConstBufferSequence` or `MutableBufferSequence` type requirements.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:buffered_read_stream buffered_read_stream]
-
-
-Adds buffering to the read-related operations of a stream.
-
-
- template<
- typename Stream>
- class buffered_read_stream :
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.buffered_read_stream.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.buffered_read_stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.buffered_read_stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffered_read_stream.async_fill [*async_fill]]]
- [Start an asynchronous fill. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.buffered_read_stream [*buffered_read_stream]]]
- [Construct, passing the specified argument to initialise the next layer. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.close [*close]]]
- [Close the stream. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.fill [*fill]]]
- [Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
-
- Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.peek [*peek]]]
- [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
- Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.read_some [*read_some]]]
- [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
- Read some data from the stream. Returns the number of bytes read or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_read_stream.write_some [*write_some]]]
- [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
- Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffered_read_stream.default_buffer_size [*default_buffer_size]]]
- [The default buffer size. ]
- ]
-
-]
-
-The [link asio.reference.buffered_read_stream `buffered_read_stream`] class template can be used to add buffering to the synchronous and asynchronous read operations of a stream.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_read_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_fill buffered_read_stream::async_fill]
-
-[indexterm2 asio.indexterm.buffered_read_stream.async_fill..async_fill..buffered_read_stream]
-Start an asynchronous fill.
-
-
- template<
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_fill(
- ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_read_some buffered_read_stream::async_read_some]
-
-[indexterm2 asio.indexterm.buffered_read_stream.async_read_some..async_read_some..buffered_read_stream]
-Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some buffered_read_stream::async_write_some]
-
-[indexterm2 asio.indexterm.buffered_read_stream.async_write_some..async_write_some..buffered_read_stream]
-Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-
-[endsect]
-
-
-[section:buffered_read_stream buffered_read_stream::buffered_read_stream]
-
-[indexterm2 asio.indexterm.buffered_read_stream.buffered_read_stream..buffered_read_stream..buffered_read_stream]
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- explicit ``[link asio.reference.buffered_read_stream.buffered_read_stream.overload1 buffered_read_stream]``(
- Arg & a);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.buffered_read_stream.overload1 more...]]``
-
- template<
- typename Arg>
- ``[link asio.reference.buffered_read_stream.buffered_read_stream.overload2 buffered_read_stream]``(
- Arg & a,
- std::size_t buffer_size);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.buffered_read_stream.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::buffered_read_stream (1 of 2 overloads)]
-
-
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- buffered_read_stream(
- Arg & a);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::buffered_read_stream (2 of 2 overloads)]
-
-
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- buffered_read_stream(
- Arg & a,
- std::size_t buffer_size);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close buffered_read_stream::close]
-
-[indexterm2 asio.indexterm.buffered_read_stream.close..close..buffered_read_stream]
-Close the stream.
-
-
- void ``[link asio.reference.buffered_read_stream.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.close.overload1 more...]]``
-
- void ``[link asio.reference.buffered_read_stream.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.close.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::close (1 of 2 overloads)]
-
-
-Close the stream.
-
-
- void close();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::close (2 of 2 overloads)]
-
-
-Close the stream.
-
-
- void close(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:default_buffer_size buffered_read_stream::default_buffer_size]
-
-[indexterm2 asio.indexterm.buffered_read_stream.default_buffer_size..default_buffer_size..buffered_read_stream]
-The default buffer size.
-
-
- static const std::size_t default_buffer_size = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:executor_type buffered_read_stream::executor_type]
-
-[indexterm2 asio.indexterm.buffered_read_stream.executor_type..executor_type..buffered_read_stream]
-The type of the executor associated with the object.
-
-
- typedef lowest_layer_type::executor_type executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_read_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:fill buffered_read_stream::fill]
-
-[indexterm2 asio.indexterm.buffered_read_stream.fill..fill..buffered_read_stream]
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
-
-
- std::size_t ``[link asio.reference.buffered_read_stream.fill.overload1 fill]``();
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.fill.overload1 more...]]``
-
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
-
-
- std::size_t ``[link asio.reference.buffered_read_stream.fill.overload2 fill]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.fill.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::fill (1 of 2 overloads)]
-
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
-
-
- std::size_t fill();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::fill (2 of 2 overloads)]
-
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
-
-
- std::size_t fill(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_executor buffered_read_stream::get_executor]
-
-[indexterm2 asio.indexterm.buffered_read_stream.get_executor..get_executor..buffered_read_stream]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context buffered_read_stream::get_io_context]
-
-[indexterm2 asio.indexterm.buffered_read_stream.get_io_context..get_io_context..buffered_read_stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service buffered_read_stream::get_io_service]
-
-[indexterm2 asio.indexterm.buffered_read_stream.get_io_service..get_io_service..buffered_read_stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-[section:in_avail buffered_read_stream::in_avail]
-
-[indexterm2 asio.indexterm.buffered_read_stream.in_avail..in_avail..buffered_read_stream]
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t ``[link asio.reference.buffered_read_stream.in_avail.overload1 in_avail]``();
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.in_avail.overload1 more...]]``
-
- std::size_t ``[link asio.reference.buffered_read_stream.in_avail.overload2 in_avail]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.in_avail.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::in_avail (1 of 2 overloads)]
-
-
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t in_avail();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::in_avail (2 of 2 overloads)]
-
-
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t in_avail(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer buffered_read_stream::lowest_layer]
-
-[indexterm2 asio.indexterm.buffered_read_stream.lowest_layer..lowest_layer..buffered_read_stream]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.buffered_read_stream.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.buffered_read_stream.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type buffered_read_stream::lowest_layer_type]
-
-[indexterm2 asio.indexterm.buffered_read_stream.lowest_layer_type..lowest_layer_type..buffered_read_stream]
-The type of the lowest layer.
-
-
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_read_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:next_layer buffered_read_stream::next_layer]
-
-[indexterm2 asio.indexterm.buffered_read_stream.next_layer..next_layer..buffered_read_stream]
-Get a reference to the next layer.
-
-
- next_layer_type & next_layer();
-
-
-
-[endsect]
-
-
-
-[section:next_layer_type buffered_read_stream::next_layer_type]
-
-[indexterm2 asio.indexterm.buffered_read_stream.next_layer_type..next_layer_type..buffered_read_stream]
-The type of the next layer.
-
-
- typedef remove_reference< Stream >::type next_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_read_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:peek buffered_read_stream::peek]
-
-[indexterm2 asio.indexterm.buffered_read_stream.peek..peek..buffered_read_stream]
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_read_stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.peek.overload1 more...]]``
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_read_stream.peek.overload2 peek]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.peek.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::peek (1 of 2 overloads)]
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::peek (2 of 2 overloads)]
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read_some buffered_read_stream::read_some]
-
-[indexterm2 asio.indexterm.buffered_read_stream.read_some..read_some..buffered_read_stream]
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_read_stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.read_some.overload1 more...]]``
-
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_read_stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.read_some.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::read_some (1 of 2 overloads)]
-
-
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::read_some (2 of 2 overloads)]
-
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some buffered_read_stream::write_some]
-
-[indexterm2 asio.indexterm.buffered_read_stream.write_some..write_some..buffered_read_stream]
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_read_stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.write_some.overload1 more...]]``
-
-
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_read_stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_read_stream.write_some.overload2 more...]]``
-
-
-[section:overload1 buffered_read_stream::write_some (1 of 2 overloads)]
-
-
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_read_stream::write_some (2 of 2 overloads)]
-
-
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffered_stream buffered_stream]
-
-
-Adds buffering to the read- and write-related operations of a stream.
-
-
- template<
- typename Stream>
- class buffered_stream :
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.buffered_stream.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.buffered_stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.buffered_stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffered_stream.async_fill [*async_fill]]]
- [Start an asynchronous fill. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.async_flush [*async_flush]]]
- [Start an asynchronous flush. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.buffered_stream [*buffered_stream]]]
- [Construct, passing the specified argument to initialise the next layer. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.close [*close]]]
- [Close the stream. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.fill [*fill]]]
- [Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
-
- Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.flush [*flush]]]
- [Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
- Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.peek [*peek]]]
- [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
- Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.read_some [*read_some]]]
- [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
- Read some data from the stream. Returns the number of bytes read or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_stream.write_some [*write_some]]]
- [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
- Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred. ]
- ]
-
-]
-
-The [link asio.reference.buffered_stream `buffered_stream`] class template can be used to add buffering to the synchronous and asynchronous read and write operations of a stream.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_fill buffered_stream::async_fill]
-
-[indexterm2 asio.indexterm.buffered_stream.async_fill..async_fill..buffered_stream]
-Start an asynchronous fill.
-
-
- template<
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_fill(
- ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_flush buffered_stream::async_flush]
-
-[indexterm2 asio.indexterm.buffered_stream.async_flush..async_flush..buffered_stream]
-Start an asynchronous flush.
-
-
- template<
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_flush(
- WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_read_some buffered_stream::async_read_some]
-
-[indexterm2 asio.indexterm.buffered_stream.async_read_some..async_read_some..buffered_stream]
-Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some buffered_stream::async_write_some]
-
-[indexterm2 asio.indexterm.buffered_stream.async_write_some..async_write_some..buffered_stream]
-Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-
-[endsect]
-
-
-[section:buffered_stream buffered_stream::buffered_stream]
-
-[indexterm2 asio.indexterm.buffered_stream.buffered_stream..buffered_stream..buffered_stream]
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- explicit ``[link asio.reference.buffered_stream.buffered_stream.overload1 buffered_stream]``(
- Arg & a);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.buffered_stream.overload1 more...]]``
-
- template<
- typename Arg>
- explicit ``[link asio.reference.buffered_stream.buffered_stream.overload2 buffered_stream]``(
- Arg & a,
- std::size_t read_buffer_size,
- std::size_t write_buffer_size);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.buffered_stream.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::buffered_stream (1 of 2 overloads)]
-
-
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- buffered_stream(
- Arg & a);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::buffered_stream (2 of 2 overloads)]
-
-
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- buffered_stream(
- Arg & a,
- std::size_t read_buffer_size,
- std::size_t write_buffer_size);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close buffered_stream::close]
-
-[indexterm2 asio.indexterm.buffered_stream.close..close..buffered_stream]
-Close the stream.
-
-
- void ``[link asio.reference.buffered_stream.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.buffered_stream.close.overload1 more...]]``
-
- void ``[link asio.reference.buffered_stream.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.close.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::close (1 of 2 overloads)]
-
-
-Close the stream.
-
-
- void close();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::close (2 of 2 overloads)]
-
-
-Close the stream.
-
-
- void close(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type buffered_stream::executor_type]
-
-[indexterm2 asio.indexterm.buffered_stream.executor_type..executor_type..buffered_stream]
-The type of the executor associated with the object.
-
-
- typedef lowest_layer_type::executor_type executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:fill buffered_stream::fill]
-
-[indexterm2 asio.indexterm.buffered_stream.fill..fill..buffered_stream]
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
-
-
- std::size_t ``[link asio.reference.buffered_stream.fill.overload1 fill]``();
- `` [''''&raquo;''' [link asio.reference.buffered_stream.fill.overload1 more...]]``
-
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
-
-
- std::size_t ``[link asio.reference.buffered_stream.fill.overload2 fill]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.fill.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::fill (1 of 2 overloads)]
-
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.
-
-
- std::size_t fill();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::fill (2 of 2 overloads)]
-
-
-Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.
-
-
- std::size_t fill(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:flush buffered_stream::flush]
-
-[indexterm2 asio.indexterm.buffered_stream.flush..flush..buffered_stream]
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
-
- std::size_t ``[link asio.reference.buffered_stream.flush.overload1 flush]``();
- `` [''''&raquo;''' [link asio.reference.buffered_stream.flush.overload1 more...]]``
-
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
-
-
- std::size_t ``[link asio.reference.buffered_stream.flush.overload2 flush]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.flush.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::flush (1 of 2 overloads)]
-
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
-
- std::size_t flush();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::flush (2 of 2 overloads)]
-
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
-
-
- std::size_t flush(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_executor buffered_stream::get_executor]
-
-[indexterm2 asio.indexterm.buffered_stream.get_executor..get_executor..buffered_stream]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context buffered_stream::get_io_context]
-
-[indexterm2 asio.indexterm.buffered_stream.get_io_context..get_io_context..buffered_stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service buffered_stream::get_io_service]
-
-[indexterm2 asio.indexterm.buffered_stream.get_io_service..get_io_service..buffered_stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-[section:in_avail buffered_stream::in_avail]
-
-[indexterm2 asio.indexterm.buffered_stream.in_avail..in_avail..buffered_stream]
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t ``[link asio.reference.buffered_stream.in_avail.overload1 in_avail]``();
- `` [''''&raquo;''' [link asio.reference.buffered_stream.in_avail.overload1 more...]]``
-
- std::size_t ``[link asio.reference.buffered_stream.in_avail.overload2 in_avail]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.in_avail.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::in_avail (1 of 2 overloads)]
-
-
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t in_avail();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::in_avail (2 of 2 overloads)]
-
-
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t in_avail(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer buffered_stream::lowest_layer]
-
-[indexterm2 asio.indexterm.buffered_stream.lowest_layer..lowest_layer..buffered_stream]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.buffered_stream.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.buffered_stream.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.buffered_stream.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.buffered_stream.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type buffered_stream::lowest_layer_type]
-
-[indexterm2 asio.indexterm.buffered_stream.lowest_layer_type..lowest_layer_type..buffered_stream]
-The type of the lowest layer.
-
-
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:next_layer buffered_stream::next_layer]
-
-[indexterm2 asio.indexterm.buffered_stream.next_layer..next_layer..buffered_stream]
-Get a reference to the next layer.
-
-
- next_layer_type & next_layer();
-
-
-
-[endsect]
-
-
-
-[section:next_layer_type buffered_stream::next_layer_type]
-
-[indexterm2 asio.indexterm.buffered_stream.next_layer_type..next_layer_type..buffered_stream]
-The type of the next layer.
-
-
- typedef remove_reference< Stream >::type next_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:peek buffered_stream::peek]
-
-[indexterm2 asio.indexterm.buffered_stream.peek..peek..buffered_stream]
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.peek.overload1 more...]]``
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_stream.peek.overload2 peek]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.peek.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::peek (1 of 2 overloads)]
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::peek (2 of 2 overloads)]
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read_some buffered_stream::read_some]
-
-[indexterm2 asio.indexterm.buffered_stream.read_some..read_some..buffered_stream]
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.read_some.overload1 more...]]``
-
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.read_some.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::read_some (1 of 2 overloads)]
-
-
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::read_some (2 of 2 overloads)]
-
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some buffered_stream::write_some]
-
-[indexterm2 asio.indexterm.buffered_stream.write_some..write_some..buffered_stream]
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.write_some.overload1 more...]]``
-
-
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_stream.write_some.overload2 more...]]``
-
-
-[section:overload1 buffered_stream::write_some (1 of 2 overloads)]
-
-
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_stream::write_some (2 of 2 overloads)]
-
-
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:buffered_write_stream buffered_write_stream]
-
-
-Adds buffering to the write-related operations of a stream.
-
-
- template<
- typename Stream>
- class buffered_write_stream :
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.buffered_write_stream.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.buffered_write_stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.buffered_write_stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffered_write_stream.async_flush [*async_flush]]]
- [Start an asynchronous flush. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.buffered_write_stream [*buffered_write_stream]]]
- [Construct, passing the specified argument to initialise the next layer. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.close [*close]]]
- [Close the stream. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.flush [*flush]]]
- [Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
- Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.in_avail [*in_avail]]]
- [Determine the amount of data that may be read without blocking. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.peek [*peek]]]
- [Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
- Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.read_some [*read_some]]]
- [Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
- Read some data from the stream. Returns the number of bytes read or 0 if an error occurred. ]
- ]
-
- [
- [[link asio.reference.buffered_write_stream.write_some [*write_some]]]
- [Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
- Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred and the error handler did not throw. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffered_write_stream.default_buffer_size [*default_buffer_size]]]
- [The default buffer size. ]
- ]
-
-]
-
-The [link asio.reference.buffered_write_stream `buffered_write_stream`] class template can be used to add buffering to the synchronous and asynchronous write operations of a stream.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_write_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:async_flush buffered_write_stream::async_flush]
-
-[indexterm2 asio.indexterm.buffered_write_stream.async_flush..async_flush..buffered_write_stream]
-Start an asynchronous flush.
-
-
- template<
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_flush(
- WriteHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_read_some buffered_write_stream::async_read_some]
-
-[indexterm2 asio.indexterm.buffered_write_stream.async_read_some..async_read_some..buffered_write_stream]
-Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-
-[endsect]
-
-
-
-[section:async_write_some buffered_write_stream::async_write_some]
-
-[indexterm2 asio.indexterm.buffered_write_stream.async_write_some..async_write_some..buffered_write_stream]
-Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-
-[endsect]
-
-
-[section:buffered_write_stream buffered_write_stream::buffered_write_stream]
-
-[indexterm2 asio.indexterm.buffered_write_stream.buffered_write_stream..buffered_write_stream..buffered_write_stream]
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- explicit ``[link asio.reference.buffered_write_stream.buffered_write_stream.overload1 buffered_write_stream]``(
- Arg & a);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.buffered_write_stream.overload1 more...]]``
-
- template<
- typename Arg>
- ``[link asio.reference.buffered_write_stream.buffered_write_stream.overload2 buffered_write_stream]``(
- Arg & a,
- std::size_t buffer_size);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.buffered_write_stream.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::buffered_write_stream (1 of 2 overloads)]
-
-
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- buffered_write_stream(
- Arg & a);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::buffered_write_stream (2 of 2 overloads)]
-
-
-Construct, passing the specified argument to initialise the next layer.
-
-
- template<
- typename Arg>
- buffered_write_stream(
- Arg & a,
- std::size_t buffer_size);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close buffered_write_stream::close]
-
-[indexterm2 asio.indexterm.buffered_write_stream.close..close..buffered_write_stream]
-Close the stream.
-
-
- void ``[link asio.reference.buffered_write_stream.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.close.overload1 more...]]``
-
- void ``[link asio.reference.buffered_write_stream.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.close.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::close (1 of 2 overloads)]
-
-
-Close the stream.
-
-
- void close();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::close (2 of 2 overloads)]
-
-
-Close the stream.
-
-
- void close(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:default_buffer_size buffered_write_stream::default_buffer_size]
-
-[indexterm2 asio.indexterm.buffered_write_stream.default_buffer_size..default_buffer_size..buffered_write_stream]
-The default buffer size.
-
-
- static const std::size_t default_buffer_size = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:executor_type buffered_write_stream::executor_type]
-
-[indexterm2 asio.indexterm.buffered_write_stream.executor_type..executor_type..buffered_write_stream]
-The type of the executor associated with the object.
-
-
- typedef lowest_layer_type::executor_type executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_write_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:flush buffered_write_stream::flush]
-
-[indexterm2 asio.indexterm.buffered_write_stream.flush..flush..buffered_write_stream]
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
-
- std::size_t ``[link asio.reference.buffered_write_stream.flush.overload1 flush]``();
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.flush.overload1 more...]]``
-
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
-
-
- std::size_t ``[link asio.reference.buffered_write_stream.flush.overload2 flush]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.flush.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::flush (1 of 2 overloads)]
-
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.
-
-
- std::size_t flush();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::flush (2 of 2 overloads)]
-
-
-Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.
-
-
- std::size_t flush(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_executor buffered_write_stream::get_executor]
-
-[indexterm2 asio.indexterm.buffered_write_stream.get_executor..get_executor..buffered_write_stream]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context buffered_write_stream::get_io_context]
-
-[indexterm2 asio.indexterm.buffered_write_stream.get_io_context..get_io_context..buffered_write_stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service buffered_write_stream::get_io_service]
-
-[indexterm2 asio.indexterm.buffered_write_stream.get_io_service..get_io_service..buffered_write_stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-[section:in_avail buffered_write_stream::in_avail]
-
-[indexterm2 asio.indexterm.buffered_write_stream.in_avail..in_avail..buffered_write_stream]
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t ``[link asio.reference.buffered_write_stream.in_avail.overload1 in_avail]``();
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.in_avail.overload1 more...]]``
-
- std::size_t ``[link asio.reference.buffered_write_stream.in_avail.overload2 in_avail]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.in_avail.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::in_avail (1 of 2 overloads)]
-
-
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t in_avail();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::in_avail (2 of 2 overloads)]
-
-
-Determine the amount of data that may be read without blocking.
-
-
- std::size_t in_avail(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:lowest_layer buffered_write_stream::lowest_layer]
-
-[indexterm2 asio.indexterm.buffered_write_stream.lowest_layer..lowest_layer..buffered_write_stream]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.buffered_write_stream.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.buffered_write_stream.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type buffered_write_stream::lowest_layer_type]
-
-[indexterm2 asio.indexterm.buffered_write_stream.lowest_layer_type..lowest_layer_type..buffered_write_stream]
-The type of the lowest layer.
-
-
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_write_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:next_layer buffered_write_stream::next_layer]
-
-[indexterm2 asio.indexterm.buffered_write_stream.next_layer..next_layer..buffered_write_stream]
-Get a reference to the next layer.
-
-
- next_layer_type & next_layer();
-
-
-
-[endsect]
-
-
-
-[section:next_layer_type buffered_write_stream::next_layer_type]
-
-[indexterm2 asio.indexterm.buffered_write_stream.next_layer_type..next_layer_type..buffered_write_stream]
-The type of the next layer.
-
-
- typedef remove_reference< Stream >::type next_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffered_write_stream.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:peek buffered_write_stream::peek]
-
-[indexterm2 asio.indexterm.buffered_write_stream.peek..peek..buffered_write_stream]
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_write_stream.peek.overload1 peek]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.peek.overload1 more...]]``
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_write_stream.peek.overload2 peek]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.peek.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::peek (1 of 2 overloads)]
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::peek (2 of 2 overloads)]
-
-
-Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t peek(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read_some buffered_write_stream::read_some]
-
-[indexterm2 asio.indexterm.buffered_write_stream.read_some..read_some..buffered_write_stream]
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_write_stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.read_some.overload1 more...]]``
-
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_write_stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.read_some.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::read_some (1 of 2 overloads)]
-
-
-Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::read_some (2 of 2 overloads)]
-
-
-Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some buffered_write_stream::write_some]
-
-[indexterm2 asio.indexterm.buffered_write_stream.write_some..write_some..buffered_write_stream]
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_write_stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.write_some.overload1 more...]]``
-
-
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred and the error handler did not throw.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.buffered_write_stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.buffered_write_stream.write_some.overload2 more...]]``
-
-
-[section:overload1 buffered_write_stream::write_some (1 of 2 overloads)]
-
-
-Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffered_write_stream::write_some (2 of 2 overloads)]
-
-
-Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred and the error handler did not throw.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:buffers_begin buffers_begin]
-
-[indexterm1 asio.indexterm.buffers_begin..buffers_begin]
-Construct an iterator representing the beginning of the buffers' data.
-
-
- template<
- typename BufferSequence>
- buffers_iterator< BufferSequence > buffers_begin(
- const BufferSequence & buffers);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:buffers_end buffers_end]
-
-[indexterm1 asio.indexterm.buffers_end..buffers_end]
-Construct an iterator representing the end of the buffers' data.
-
-
- template<
- typename BufferSequence>
- buffers_iterator< BufferSequence > buffers_end(
- const BufferSequence & buffers);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:buffers_iterator buffers_iterator]
-
-
-A random access iterator over the bytes in a buffer sequence.
-
-
- template<
- typename BufferSequence,
- typename ByteType = char>
- class buffers_iterator
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.buffers_iterator.difference_type [*difference_type]]]
- [The type used for the distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.buffers_iterator.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.buffers_iterator.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.buffers_iterator.reference [*reference]]]
- [The type of the result of applying operator*() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.buffers_iterator.value_type [*value_type]]]
- [The type of the value pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffers_iterator.begin [*begin]]]
- [Construct an iterator representing the beginning of the buffers' data. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.buffers_iterator [*buffers_iterator]]]
- [Default constructor. Creates an iterator in an undefined state. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.end [*end]]]
- [Construct an iterator representing the end of the buffers' data. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_plus__eq_ [*operator+=]]]
- [Addition operator. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_minus__minus_ [*operator--]]]
- [Decrement operator (prefix).
-
- Decrement operator (postfix). ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_minus__eq_ [*operator-=]]]
- [Subtraction operator. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_lb__rb_ [*operator\[\]]]]
- [Access an individual element. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.buffers_iterator.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_plus_ [*operator+]]]
- [Addition operator. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_minus_ [*operator-]]]
- [Subtraction operator. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_lt_ [*operator<]]]
- [Compare two iterators. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_lt__eq_ [*operator<=]]]
- [Compare two iterators. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_gt_ [*operator>]]]
- [Compare two iterators. ]
- ]
-
- [
- [[link asio.reference.buffers_iterator.operator_gt__eq_ [*operator>=]]]
- [Compare two iterators. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:begin buffers_iterator::begin]
-
-[indexterm2 asio.indexterm.buffers_iterator.begin..begin..buffers_iterator]
-Construct an iterator representing the beginning of the buffers' data.
-
-
- static buffers_iterator begin(
- const BufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:buffers_iterator buffers_iterator::buffers_iterator]
-
-[indexterm2 asio.indexterm.buffers_iterator.buffers_iterator..buffers_iterator..buffers_iterator]
-Default constructor. Creates an iterator in an undefined state.
-
-
- buffers_iterator();
-
-
-
-[endsect]
-
-
-
-[section:difference_type buffers_iterator::difference_type]
-
-[indexterm2 asio.indexterm.buffers_iterator.difference_type..difference_type..buffers_iterator]
-The type used for the distance between two iterators.
-
-
- typedef std::ptrdiff_t difference_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:end buffers_iterator::end]
-
-[indexterm2 asio.indexterm.buffers_iterator.end..end..buffers_iterator]
-Construct an iterator representing the end of the buffers' data.
-
-
- static buffers_iterator end(
- const BufferSequence & buffers);
-
-
-
-[endsect]
-
-
-
-[section:iterator_category buffers_iterator::iterator_category]
-
-[indexterm2 asio.indexterm.buffers_iterator.iterator_category..iterator_category..buffers_iterator]
-The iterator category.
-
-
- typedef std::random_access_iterator_tag iterator_category;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator__star_ buffers_iterator::operator *]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator__star_..operator *..buffers_iterator]
-Dereference an iterator.
-
-
- reference operator *() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ buffers_iterator::operator!=]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_not__eq_..operator!=..buffers_iterator]
-Test two iterators for inequality.
-
-
- friend bool operator!=(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_plus_ buffers_iterator::operator+]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_plus_..operator+..buffers_iterator]
-Addition operator.
-
-
- friend buffers_iterator ``[link asio.reference.buffers_iterator.operator_plus_.overload1 operator+]``(
- const buffers_iterator & iter,
- std::ptrdiff_t difference);
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_plus_.overload1 more...]]``
-
- friend buffers_iterator ``[link asio.reference.buffers_iterator.operator_plus_.overload2 operator+]``(
- std::ptrdiff_t difference,
- const buffers_iterator & iter);
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_plus_.overload2 more...]]``
-
-
-[section:overload1 buffers_iterator::operator+ (1 of 2 overloads)]
-
-
-Addition operator.
-
-
- friend buffers_iterator operator+(
- const buffers_iterator & iter,
- std::ptrdiff_t difference);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 buffers_iterator::operator+ (2 of 2 overloads)]
-
-
-Addition operator.
-
-
- friend buffers_iterator operator+(
- std::ptrdiff_t difference,
- const buffers_iterator & iter);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_plus__plus_ buffers_iterator::operator++]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_plus__plus_..operator++..buffers_iterator]
-Increment operator (prefix).
-
-
- buffers_iterator & ``[link asio.reference.buffers_iterator.operator_plus__plus_.overload1 operator++]``();
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_plus__plus_.overload1 more...]]``
-
-
-Increment operator (postfix).
-
-
- buffers_iterator ``[link asio.reference.buffers_iterator.operator_plus__plus_.overload2 operator++]``(
- int );
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_plus__plus_.overload2 more...]]``
-
-
-[section:overload1 buffers_iterator::operator++ (1 of 2 overloads)]
-
-
-Increment operator (prefix).
-
-
- buffers_iterator & operator++();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffers_iterator::operator++ (2 of 2 overloads)]
-
-
-Increment operator (postfix).
-
-
- buffers_iterator operator++(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_plus__eq_ buffers_iterator::operator+=]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_plus__eq_..operator+=..buffers_iterator]
-Addition operator.
-
-
- buffers_iterator & operator+=(
- std::ptrdiff_t difference);
-
-
-
-[endsect]
-
-
-[section:operator_minus_ buffers_iterator::operator-]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_minus_..operator-..buffers_iterator]
-Subtraction operator.
-
-
- friend buffers_iterator ``[link asio.reference.buffers_iterator.operator_minus_.overload1 operator-]``(
- const buffers_iterator & iter,
- std::ptrdiff_t difference);
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_minus_.overload1 more...]]``
-
- friend std::ptrdiff_t ``[link asio.reference.buffers_iterator.operator_minus_.overload2 operator-]``(
- const buffers_iterator & a,
- const buffers_iterator & b);
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_minus_.overload2 more...]]``
-
-
-[section:overload1 buffers_iterator::operator- (1 of 2 overloads)]
-
-
-Subtraction operator.
-
-
- friend buffers_iterator operator-(
- const buffers_iterator & iter,
- std::ptrdiff_t difference);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 buffers_iterator::operator- (2 of 2 overloads)]
-
-
-Subtraction operator.
-
-
- friend std::ptrdiff_t operator-(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_minus__minus_ buffers_iterator::operator--]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_minus__minus_..operator--..buffers_iterator]
-Decrement operator (prefix).
-
-
- buffers_iterator & ``[link asio.reference.buffers_iterator.operator_minus__minus_.overload1 operator--]``();
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_minus__minus_.overload1 more...]]``
-
-
-Decrement operator (postfix).
-
-
- buffers_iterator ``[link asio.reference.buffers_iterator.operator_minus__minus_.overload2 operator--]``(
- int );
- `` [''''&raquo;''' [link asio.reference.buffers_iterator.operator_minus__minus_.overload2 more...]]``
-
-
-[section:overload1 buffers_iterator::operator-- (1 of 2 overloads)]
-
-
-Decrement operator (prefix).
-
-
- buffers_iterator & operator--();
-
-
-
-[endsect]
-
-
-
-[section:overload2 buffers_iterator::operator-- (2 of 2 overloads)]
-
-
-Decrement operator (postfix).
-
-
- buffers_iterator operator--(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_minus__eq_ buffers_iterator::operator-=]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_minus__eq_..operator-=..buffers_iterator]
-Subtraction operator.
-
-
- buffers_iterator & operator-=(
- std::ptrdiff_t difference);
-
-
-
-[endsect]
-
-
-
-[section:operator_arrow_ buffers_iterator::operator->]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_arrow_..operator->..buffers_iterator]
-Dereference an iterator.
-
-
- pointer operator->() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_lt_ buffers_iterator::operator<]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_lt_..operator<..buffers_iterator]
-Compare two iterators.
-
-
- friend bool operator<(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt__eq_ buffers_iterator::operator<=]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_lt__eq_..operator<=..buffers_iterator]
-Compare two iterators.
-
-
- friend bool operator<=(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ buffers_iterator::operator==]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_eq__eq_..operator==..buffers_iterator]
-Test two iterators for equality.
-
-
- friend bool operator==(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ buffers_iterator::operator>]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_gt_..operator>..buffers_iterator]
-Compare two iterators.
-
-
- friend bool operator>(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ buffers_iterator::operator>=]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_gt__eq_..operator>=..buffers_iterator]
-Compare two iterators.
-
-
- friend bool operator>=(
- const buffers_iterator & a,
- const buffers_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lb__rb_ buffers_iterator::operator\[\]]
-
-[indexterm2 asio.indexterm.buffers_iterator.operator_lb__rb_..operator\[\]..buffers_iterator]
-Access an individual element.
-
-
- reference operator[](
- std::ptrdiff_t difference) const;
-
-
-
-[endsect]
-
-
-
-[section:pointer buffers_iterator::pointer]
-
-[indexterm2 asio.indexterm.buffers_iterator.pointer..pointer..buffers_iterator]
-The type of the result of applying `operator->()` to the iterator.
-
-
- typedef const_or_non_const_ByteType * pointer;
-
-
-
-If the buffer sequence stores buffer objects that are convertible to [link asio.reference.mutable_buffer `mutable_buffer`], this is a pointer to a non-const ByteType. Otherwise, a pointer to a const ByteType.
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reference buffers_iterator::reference]
-
-[indexterm2 asio.indexterm.buffers_iterator.reference..reference..buffers_iterator]
-The type of the result of applying `operator*()` to the iterator.
-
-
- typedef const_or_non_const_ByteType & reference;
-
-
-
-If the buffer sequence stores buffer objects that are convertible to [link asio.reference.mutable_buffer `mutable_buffer`], this is a reference to a non-const ByteType. Otherwise, a reference to a const ByteType.
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:value_type buffers_iterator::value_type]
-
-[indexterm2 asio.indexterm.buffers_iterator.value_type..value_type..buffers_iterator]
-The type of the value pointed to by the iterator.
-
-
- typedef ByteType value_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffers_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:connect connect]
-
-[indexterm1 asio.indexterm.connect..connect]
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
- Protocol::endpoint ``[link asio.reference.connect.overload1 connect]``(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
- Protocol::endpoint ``[link asio.reference.connect.overload2 connect]``(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- asio::error_code & ec,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator ``[link asio.reference.connect.overload3 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator ``[link asio.reference.connect.overload4 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- asio::error_code & ec,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator ``[link asio.reference.connect.overload5 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end);
- `` [''''&raquo;''' [link asio.reference.connect.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator ``[link asio.reference.connect.overload6 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.connect.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Protocol::endpoint ``[link asio.reference.connect.overload7 connect]``(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- ConnectCondition connect_condition,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Protocol::endpoint ``[link asio.reference.connect.overload8 connect]``(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- ConnectCondition connect_condition,
- asio::error_code & ec,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload8 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator ``[link asio.reference.connect.overload9 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- ConnectCondition connect_condition,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload9 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator ``[link asio.reference.connect.overload10 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- ConnectCondition connect_condition,
- asio::error_code & ec,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.connect.overload10 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator ``[link asio.reference.connect.overload11 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- ConnectCondition connect_condition);
- `` [''''&raquo;''' [link asio.reference.connect.overload11 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator ``[link asio.reference.connect.overload12 connect]``(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- ConnectCondition connect_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.connect.overload12 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/connect.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 connect (1 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
- Protocol::endpoint connect(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[endpoints][A sequence of endpoints.]]
-
-]
-
-
-[heading Return Value]
-
-The successfully connected endpoint.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the sequence is empty, the associated `error_code` is `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Example]
-
-
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
- asio::connect(s, r.resolve(q));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 connect (2 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``>
- Protocol::endpoint connect(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- asio::error_code & ec,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[endpoints][A sequence of endpoints.]]
-
-[[ec][Set to indicate what error occurred, if any. If the sequence is empty, set to `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Return Value]
-
-On success, the successfully connected endpoint. Otherwise, a default-constructed endpoint.
-
-
-[heading Example]
-
-
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
- asio::error_code ec;
- asio::connect(s, r.resolve(q), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 connect (3 of 12 overloads)]
-
-
-(Deprecated.) Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-]
-
-
-[heading Return Value]
-
-On success, an iterator denoting the successfully connected endpoint. Otherwise, the end iterator.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the sequence is empty, the associated `error_code` is `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Remarks]
-
-This overload assumes that a default constructed object of type `Iterator` represents the end of the sequence. This is a valid assumption for iterator types such as `asio::ip::tcp::resolver::iterator`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 connect (4 of 12 overloads)]
-
-
-(Deprecated.) Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- asio::error_code & ec,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[ec][Set to indicate what error occurred, if any. If the sequence is empty, set to `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Return Value]
-
-On success, an iterator denoting the successfully connected endpoint. Otherwise, the end iterator.
-
-
-[heading Remarks]
-
-This overload assumes that a default constructed object of type `Iterator` represents the end of the sequence. This is a valid assumption for iterator types such as `asio::ip::tcp::resolver::iterator`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 connect (5 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[end][An iterator pointing to the end of a sequence of endpoints.]]
-
-]
-
-
-[heading Return Value]
-
-An iterator denoting the successfully connected endpoint.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the sequence is empty, the associated `error_code` is `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Example]
-
-
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::resolver::results_type e = r.resolve(q);
- tcp::socket s(io_context);
- asio::connect(s, e.begin(), e.end());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 connect (6 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- asio::error_code & ec);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[end][An iterator pointing to the end of a sequence of endpoints.]]
-
-[[ec][Set to indicate what error occurred, if any. If the sequence is empty, set to `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Return Value]
-
-On success, an iterator denoting the successfully connected endpoint. Otherwise, the end iterator.
-
-
-[heading Example]
-
-
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::resolver::results_type e = r.resolve(q);
- tcp::socket s(io_context);
- asio::error_code ec;
- asio::connect(s, e.begin(), e.end(), ec);
- if (ec)
- {
- // An error occurred.
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 connect (7 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Protocol::endpoint connect(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- ConnectCondition connect_condition,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[endpoints][A sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-]
-
-
-[heading Return Value]
-
-The successfully connected endpoint.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the sequence is empty, the associated `error_code` is `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Example]
-
-The following connect condition function object can be used to output information about the individual connection attempts:
-
- struct my_connect_condition
- {
- bool operator()(
- const asio::error_code& ec,
- const::tcp::endpoint& next)
- {
- if (ec) std::cout << "Error: " << ec.message() << std::endl;
- std::cout << "Trying: " << next << std::endl;
- return true;
- }
- };
-
-
-It would be used with the `asio::connect` function as follows:
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
- tcp::endpoint e = asio::connect(s,
- r.resolve(q), my_connect_condition());
- std::cout << "Connected to: " << e << std::endl;
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 connect (8 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename ``[link asio.reference.EndpointSequence EndpointSequence]``,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Protocol::endpoint connect(
- basic_socket< Protocol > & s,
- const EndpointSequence & endpoints,
- ConnectCondition connect_condition,
- asio::error_code & ec,
- typename enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[endpoints][A sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-[[ec][Set to indicate what error occurred, if any. If the sequence is empty, set to `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Return Value]
-
-On success, the successfully connected endpoint. Otherwise, a default-constructed endpoint.
-
-
-[heading Example]
-
-The following connect condition function object can be used to output information about the individual connection attempts:
-
- struct my_connect_condition
- {
- bool operator()(
- const asio::error_code& ec,
- const::tcp::endpoint& next)
- {
- if (ec) std::cout << "Error: " << ec.message() << std::endl;
- std::cout << "Trying: " << next << std::endl;
- return true;
- }
- };
-
-
-It would be used with the `asio::connect` function as follows:
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::socket s(io_context);
- asio::error_code ec;
- tcp::endpoint e = asio::connect(s,
- r.resolve(q), my_connect_condition(), ec);
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- std::cout << "Connected to: " << e << std::endl;
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload9 connect (9 of 12 overloads)]
-
-
-(Deprecated.) Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- ConnectCondition connect_condition,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-]
-
-
-[heading Return Value]
-
-On success, an iterator denoting the successfully connected endpoint. Otherwise, the end iterator.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the sequence is empty, the associated `error_code` is `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Remarks]
-
-This overload assumes that a default constructed object of type `Iterator` represents the end of the sequence. This is a valid assumption for iterator types such as `asio::ip::tcp::resolver::iterator`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload10 connect (10 of 12 overloads)]
-
-
-(Deprecated.) Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- ConnectCondition connect_condition,
- asio::error_code & ec,
- typename enable_if<!is_endpoint_sequence< Iterator >::value >::type * = 0);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-[[ec][Set to indicate what error occurred, if any. If the sequence is empty, set to `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Return Value]
-
-On success, an iterator denoting the successfully connected endpoint. Otherwise, the end iterator.
-
-
-[heading Remarks]
-
-This overload assumes that a default constructed object of type `Iterator` represents the end of the sequence. This is a valid assumption for iterator types such as `asio::ip::tcp::resolver::iterator`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload11 connect (11 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- ConnectCondition connect_condition);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[end][An iterator pointing to the end of a sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-]
-
-
-[heading Return Value]
-
-An iterator denoting the successfully connected endpoint.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the sequence is empty, the associated `error_code` is `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Example]
-
-The following connect condition function object can be used to output information about the individual connection attempts:
-
- struct my_connect_condition
- {
- bool operator()(
- const asio::error_code& ec,
- const::tcp::endpoint& next)
- {
- if (ec) std::cout << "Error: " << ec.message() << std::endl;
- std::cout << "Trying: " << next << std::endl;
- return true;
- }
- };
-
-
-It would be used with the `asio::connect` function as follows:
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::resolver::results_type e = r.resolve(q);
- tcp::socket s(io_context);
- tcp::resolver::results_type::iterator i = asio::connect(
- s, e.begin(), e.end(), my_connect_condition());
- std::cout << "Connected to: " << i->endpoint() << std::endl;
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 connect (12 of 12 overloads)]
-
-
-Establishes a socket connection by trying each endpoint in a sequence.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``,
- typename Iterator,
- typename ``[link asio.reference.ConnectCondition ConnectCondition]``>
- Iterator connect(
- basic_socket< Protocol > & s,
- Iterator begin,
- Iterator end,
- ConnectCondition connect_condition,
- asio::error_code & ec);
-
-
-This function attempts to connect a socket to one of a sequence of endpoints. It does this by repeated calls to the socket's `connect` member function, once for each endpoint in the sequence, until a connection is successfully established.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The socket to be connected. If the socket is already open, it will be closed.]]
-
-[[begin][An iterator pointing to the start of a sequence of endpoints.]]
-
-[[end][An iterator pointing to the end of a sequence of endpoints.]]
-
-[[connect_condition][A function object that is called prior to each connection attempt. The signature of the function object must be:
-``
- bool connect_condition(
- const asio::error_code& ec,
- const typename Protocol::endpoint& next);
-``
-The `ec` parameter contains the result from the most recent connect operation. Before the first connection attempt, `ec` is always set to indicate success. The `next` parameter is the next endpoint to be tried. The function object should return true if the next endpoint should be tried, and false if it should be skipped.]]
-
-[[ec][Set to indicate what error occurred, if any. If the sequence is empty, set to `asio::error::not_found`. Otherwise, contains the error from the last connection attempt.]]
-
-]
-
-
-[heading Return Value]
-
-On success, an iterator denoting the successfully connected endpoint. Otherwise, the end iterator.
-
-
-[heading Example]
-
-The following connect condition function object can be used to output information about the individual connection attempts:
-
- struct my_connect_condition
- {
- bool operator()(
- const asio::error_code& ec,
- const::tcp::endpoint& next)
- {
- if (ec) std::cout << "Error: " << ec.message() << std::endl;
- std::cout << "Trying: " << next << std::endl;
- return true;
- }
- };
-
-
-It would be used with the `asio::connect` function as follows:
-
- tcp::resolver r(io_context);
- tcp::resolver::query q("host", "service");
- tcp::resolver::results_type e = r.resolve(q);
- tcp::socket s(io_context);
- asio::error_code ec;
- tcp::resolver::results_type::iterator i = asio::connect(
- s, e.begin(), e.end(), my_connect_condition());
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- std::cout << "Connected to: " << i->endpoint() << std::endl;
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:const_buffer const_buffer]
-
-
-Holds a buffer that cannot be modified.
-
-
- class const_buffer
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.const_buffer [*const_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range.
-
- Construct a non-modifiable buffer from a modifiable one. ]
- ]
-
- [
- [[link asio.reference.const_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.const_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.operator_plus_ [*operator+]]]
- [Create a new non-modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.const_buffer `const_buffer`] class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::const_buffer b1 = ...;
- std::size_t s1 = b1.size();
- const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:const_buffer const_buffer::const_buffer]
-
-[indexterm2 asio.indexterm.const_buffer.const_buffer..const_buffer..const_buffer]
-Construct an empty buffer.
-
-
- ``[link asio.reference.const_buffer.const_buffer.overload1 const_buffer]``();
- `` [''''&raquo;''' [link asio.reference.const_buffer.const_buffer.overload1 more...]]``
-
-
-Construct a buffer to represent a given memory range.
-
-
- ``[link asio.reference.const_buffer.const_buffer.overload2 const_buffer]``(
- const void * data,
- std::size_t size);
- `` [''''&raquo;''' [link asio.reference.const_buffer.const_buffer.overload2 more...]]``
-
-
-Construct a non-modifiable buffer from a modifiable one.
-
-
- ``[link asio.reference.const_buffer.const_buffer.overload3 const_buffer]``(
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.const_buffer.const_buffer.overload3 more...]]``
-
-
-[section:overload1 const_buffer::const_buffer (1 of 3 overloads)]
-
-
-Construct an empty buffer.
-
-
- const_buffer();
-
-
-
-[endsect]
-
-
-
-[section:overload2 const_buffer::const_buffer (2 of 3 overloads)]
-
-
-Construct a buffer to represent a given memory range.
-
-
- const_buffer(
- const void * data,
- std::size_t size);
-
-
-
-[endsect]
-
-
-
-[section:overload3 const_buffer::const_buffer (3 of 3 overloads)]
-
-
-Construct a non-modifiable buffer from a modifiable one.
-
-
- const_buffer(
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:data const_buffer::data]
-
-[indexterm2 asio.indexterm.const_buffer.data..data..const_buffer]
-Get a pointer to the beginning of the memory range.
-
-
- const void * data() const;
-
-
-
-[endsect]
-
-
-[section:operator_plus_ const_buffer::operator+]
-
-[indexterm2 asio.indexterm.const_buffer.operator_plus_..operator+..const_buffer]
-Create a new non-modifiable buffer that is offset from the start of another.
-
-
- const_buffer ``[link asio.reference.const_buffer.operator_plus_.overload1 operator+]``(
- const const_buffer & b,
- std::size_t n);
- `` [''''&raquo;''' [link asio.reference.const_buffer.operator_plus_.overload1 more...]]``
-
- const_buffer ``[link asio.reference.const_buffer.operator_plus_.overload2 operator+]``(
- std::size_t n,
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.const_buffer.operator_plus_.overload2 more...]]``
-
-
-[section:overload1 const_buffer::operator+ (1 of 2 overloads)]
-
-
-Create a new non-modifiable buffer that is offset from the start of another.
-
-
- const_buffer operator+(
- const const_buffer & b,
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:overload2 const_buffer::operator+ (2 of 2 overloads)]
-
-
-Create a new non-modifiable buffer that is offset from the start of another.
-
-
- const_buffer operator+(
- std::size_t n,
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_plus__eq_ const_buffer::operator+=]
-
-[indexterm2 asio.indexterm.const_buffer.operator_plus__eq_..operator+=..const_buffer]
-Move the start of the buffer by the specified number of bytes.
-
-
- const_buffer & operator+=(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:size const_buffer::size]
-
-[indexterm2 asio.indexterm.const_buffer.size..size..const_buffer]
-Get the size of the memory range.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:const_buffers_1 const_buffers_1]
-
-
-(Deprecated: Use [link asio.reference.const_buffer `const_buffer`].) Adapts a single non-modifiable buffer so that it meets the requirements of the ConstBufferSequence concept.
-
-
- class const_buffers_1 :
- public const_buffer
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.const_buffers_1.const_iterator [*const_iterator]]]
- [A random-access iterator type that may be used to read elements. ]
-
- ]
-
- [
-
- [[link asio.reference.const_buffers_1.value_type [*value_type]]]
- [The type for each element in the list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffers_1.begin [*begin]]]
- [Get a random-access iterator to the first element. ]
- ]
-
- [
- [[link asio.reference.const_buffers_1.const_buffers_1 [*const_buffers_1]]]
- [Construct to represent a given memory range.
-
- Construct to represent a single non-modifiable buffer. ]
- ]
-
- [
- [[link asio.reference.const_buffers_1.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.const_buffers_1.end [*end]]]
- [Get a random-access iterator for one past the last element. ]
- ]
-
- [
- [[link asio.reference.const_buffers_1.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.const_buffers_1.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffers_1.operator_plus_ [*operator+]]]
- [Create a new non-modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:begin const_buffers_1::begin]
-
-[indexterm2 asio.indexterm.const_buffers_1.begin..begin..const_buffers_1]
-Get a random-access iterator to the first element.
-
-
- const_iterator begin() const;
-
-
-
-[endsect]
-
-
-[section:const_buffers_1 const_buffers_1::const_buffers_1]
-
-[indexterm2 asio.indexterm.const_buffers_1.const_buffers_1..const_buffers_1..const_buffers_1]
-Construct to represent a given memory range.
-
-
- ``[link asio.reference.const_buffers_1.const_buffers_1.overload1 const_buffers_1]``(
- const void * data,
- std::size_t size);
- `` [''''&raquo;''' [link asio.reference.const_buffers_1.const_buffers_1.overload1 more...]]``
-
-
-Construct to represent a single non-modifiable buffer.
-
-
- explicit ``[link asio.reference.const_buffers_1.const_buffers_1.overload2 const_buffers_1]``(
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.const_buffers_1.const_buffers_1.overload2 more...]]``
-
-
-[section:overload1 const_buffers_1::const_buffers_1 (1 of 2 overloads)]
-
-
-Construct to represent a given memory range.
-
-
- const_buffers_1(
- const void * data,
- std::size_t size);
-
-
-
-[endsect]
-
-
-
-[section:overload2 const_buffers_1::const_buffers_1 (2 of 2 overloads)]
-
-
-Construct to represent a single non-modifiable buffer.
-
-
- const_buffers_1(
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:const_iterator const_buffers_1::const_iterator]
-
-[indexterm2 asio.indexterm.const_buffers_1.const_iterator..const_iterator..const_buffers_1]
-A random-access iterator type that may be used to read elements.
-
-
- typedef const const_buffer * const_iterator;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:data const_buffers_1::data]
-
-
-['Inherited from const_buffer.]
-
-[indexterm2 asio.indexterm.const_buffers_1.data..data..const_buffers_1]
-Get a pointer to the beginning of the memory range.
-
-
- const void * data() const;
-
-
-
-[endsect]
-
-
-
-[section:end const_buffers_1::end]
-
-[indexterm2 asio.indexterm.const_buffers_1.end..end..const_buffers_1]
-Get a random-access iterator for one past the last element.
-
-
- const_iterator end() const;
-
-
-
-[endsect]
-
-
-[section:operator_plus_ const_buffers_1::operator+]
-
-[indexterm2 asio.indexterm.const_buffers_1.operator_plus_..operator+..const_buffers_1]
-Create a new non-modifiable buffer that is offset from the start of another.
-
-
- const_buffer ``[link asio.reference.const_buffers_1.operator_plus_.overload1 operator+]``(
- const const_buffer & b,
- std::size_t n);
- `` [''''&raquo;''' [link asio.reference.const_buffers_1.operator_plus_.overload1 more...]]``
-
- const_buffer ``[link asio.reference.const_buffers_1.operator_plus_.overload2 operator+]``(
- std::size_t n,
- const const_buffer & b);
- `` [''''&raquo;''' [link asio.reference.const_buffers_1.operator_plus_.overload2 more...]]``
-
-
-[section:overload1 const_buffers_1::operator+ (1 of 2 overloads)]
-
-
-['Inherited from const_buffer.]
-
-
-Create a new non-modifiable buffer that is offset from the start of another.
-
-
- const_buffer operator+(
- const const_buffer & b,
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:overload2 const_buffers_1::operator+ (2 of 2 overloads)]
-
-
-['Inherited from const_buffer.]
-
-
-Create a new non-modifiable buffer that is offset from the start of another.
-
-
- const_buffer operator+(
- std::size_t n,
- const const_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_plus__eq_ const_buffers_1::operator+=]
-
-
-['Inherited from const_buffer.]
-
-[indexterm2 asio.indexterm.const_buffers_1.operator_plus__eq_..operator+=..const_buffers_1]
-Move the start of the buffer by the specified number of bytes.
-
-
- const_buffer & operator+=(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:size const_buffers_1::size]
-
-
-['Inherited from const_buffer.]
-
-[indexterm2 asio.indexterm.const_buffers_1.size..size..const_buffers_1]
-Get the size of the memory range.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[section:value_type const_buffers_1::value_type]
-
-[indexterm2 asio.indexterm.const_buffers_1.value_type..value_type..const_buffers_1]
-The type for each element in the list of buffers.
-
-
- typedef const_buffer value_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.const_buffer [*const_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range.
-
- Construct a non-modifiable buffer from a modifiable one. ]
- ]
-
- [
- [[link asio.reference.const_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.const_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.operator_plus_ [*operator+]]]
- [Create a new non-modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.const_buffer `const_buffer`] class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::const_buffer b1 = ...;
- std::size_t s1 = b1.size();
- const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:coroutine coroutine]
-
-
-Provides support for implementing stackless coroutines.
-
-
- class coroutine
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.coroutine.coroutine [*coroutine]]]
- [Constructs a coroutine in its initial state. ]
- ]
-
- [
- [[link asio.reference.coroutine.is_child [*is_child]]]
- [Returns true if the coroutine is the child of a fork. ]
- ]
-
- [
- [[link asio.reference.coroutine.is_complete [*is_complete]]]
- [Returns true if the coroutine has reached its terminal state. ]
- ]
-
- [
- [[link asio.reference.coroutine.is_parent [*is_parent]]]
- [Returns true if the coroutine is the parent of a fork. ]
- ]
-
-]
-
-The `coroutine` class may be used to implement stackless coroutines. The class itself is used to store the current state of the coroutine.
-
-Coroutines are copy-constructible and assignable, and the space overhead is a single int. They can be used as a base class:
-
-
-
- class session : coroutine
- {
- ...
- };
-
-
-
-
-or as a data member:
-
-
-
- class session
- {
- ...
- coroutine coro_;
- };
-
-
-
-
-or even bound in as a function argument using lambdas or `bind()`. The important thing is that as the application maintains a copy of the object for as long as the coroutine must be kept alive.
-
-
-[heading Pseudo-keywords]
-
-
-
-A coroutine is used in conjunction with certain "pseudo-keywords", which are implemented as macros. These macros are defined by a header file:
-
-
-
- #include <asio/yield.hpp>
-
-
-
-
-and may conversely be undefined as follows:
-
-
-
- #include <asio/unyield.hpp>
-
-
-
-
-[*reenter]
-
-The `reenter` macro is used to define the body of a coroutine. It takes a single argument: a pointer or reference to a coroutine object. For example, if the base class is a coroutine object you may write:
-
-
-
- reenter (this)
- {
- ... coroutine body ...
- }
-
-
-
-
-and if a data member or other variable you can write:
-
-
-
- reenter (coro_)
- {
- ... coroutine body ...
- }
-
-
-
-
-When `reenter` is executed at runtime, control jumps to the location of the last `yield` or `fork`.
-
-The coroutine body may also be a single statement, such as:
-
-
-
- reenter (this) for (;;)
- {
- ...
- }
-
-
-
-
-[*Limitation:] The `reenter` macro is implemented using a switch. This means that you must take care when using local variables within the coroutine body. The local variable is not allowed in a position where reentering the coroutine could bypass the variable definition.
-
-[*yield ['statement]]
-
-This form of the `yield` keyword is often used with asynchronous operations:
-
-
-
- yield socket_->async_read_some(buffer(*buffer_), *this);
-
-
-
-
-This divides into four logical steps:
-
-
-* `yield` saves the current state of the coroutine.
-
-* The statement initiates the asynchronous operation.
-
-* The resume point is defined immediately following the statement.
-
-* Control is transferred to the end of the coroutine body.
-
-When the asynchronous operation completes, the function object is invoked and `reenter` causes control to transfer to the resume point. It is important to remember to carry the coroutine state forward with the asynchronous operation. In the above snippet, the current class is a function object object with a coroutine object as base class or data member.
-
-The statement may also be a compound statement, and this permits us to define local variables with limited scope:
-
-
-
- yield
- {
- mutable_buffers_1 b = buffer(*buffer_);
- socket_->async_read_some(b, *this);
- }
-
-
-
-
-[*yield return ['expression] ;]
-
-This form of `yield` is often used in generators or coroutine-based parsers. For example, the function object:
-
-
-
- struct interleave : coroutine
- {
- istream& is1;
- istream& is2;
- char operator()(char c)
- {
- reenter (this) for (;;)
- {
- yield return is1.get();
- yield return is2.get();
- }
- }
- };
-
-
-
-
-defines a trivial coroutine that interleaves the characters from two input streams.
-
-This type of `yield` divides into three logical steps:
-
-
-* `yield` saves the current state of the coroutine.
-
-* The resume point is defined immediately following the semicolon.
-
-* The value of the expression is returned from the function.
-
-[*yield ;]
-
-This form of `yield` is equivalent to the following steps:
-
-
-* `yield` saves the current state of the coroutine.
-
-* The resume point is defined immediately following the semicolon.
-
-* Control is transferred to the end of the coroutine body.
-
-This form might be applied when coroutines are used for cooperative threading and scheduling is explicitly managed. For example:
-
-
-
- struct task : coroutine
- {
- ...
- void operator()()
- {
- reenter (this)
- {
- while (... not finished ...)
- {
- ... do something ...
- yield;
- ... do some more ...
- yield;
- }
- }
- }
- ...
- };
- ...
- task t1, t2;
- for (;;)
- {
- t1();
- t2();
- }
-
-
-
-
-[*yield break ;]
-
-The final form of `yield` is used to explicitly terminate the coroutine. This form is comprised of two steps:
-
-
-* `yield` sets the coroutine state to indicate termination.
-
-* Control is transferred to the end of the coroutine body.
-
-Once terminated, calls to `is_complete()` return true and the coroutine cannot be reentered.
-
-Note that a coroutine may also be implicitly terminated if the coroutine body is exited without a yield, e.g. by return, throw or by running to the end of the body.
-
-[*fork ['statement]]
-
-The `fork` pseudo-keyword is used when "forking" a coroutine, i.e. splitting it into two (or more) copies. One use of `fork` is in a server, where a new coroutine is created to handle each client connection:
-
-
-
- reenter (this)
- {
- do
- {
- socket_.reset(new tcp::socket(io_context_));
- yield acceptor->async_accept(*socket_, *this);
- fork server(*this)();
- } while (is_parent());
- ... client-specific handling follows ...
- }
-
-
-
-
-The logical steps involved in a `fork` are:
-
-
-* `fork` saves the current state of the coroutine.
-
-* The statement creates a copy of the coroutine and either executes it immediately or schedules it for later execution.
-
-* The resume point is defined immediately following the semicolon.
-
-* For the "parent", control immediately continues from the next line.
-
-The functions `is_parent()` and `is_child()` can be used to differentiate between parent and child. You would use these functions to alter subsequent control flow.
-
-Note that `fork` doesn't do the actual forking by itself. It is the application's responsibility to create a clone of the coroutine and call it. The clone can be called immediately, as above, or scheduled for delayed execution using something like `io_context::post()`.
-
-
-[heading Alternate macro names]
-
-
-
-If preferred, an application can use macro names that follow a more typical naming convention, rather than the pseudo-keywords. These are:
-
-
-* `ASIO_CORO_REENTER` instead of `reenter`
-
-* `ASIO_CORO_YIELD` instead of `yield`
-
-* `ASIO_CORO_FORK` instead of `fork`
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/coroutine.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:coroutine coroutine::coroutine]
-
-[indexterm2 asio.indexterm.coroutine.coroutine..coroutine..coroutine]
-Constructs a coroutine in its initial state.
-
-
- coroutine();
-
-
-
-[endsect]
-
-
-
-[section:is_child coroutine::is_child]
-
-[indexterm2 asio.indexterm.coroutine.is_child..is_child..coroutine]
-Returns true if the coroutine is the child of a fork.
-
-
- bool is_child() const;
-
-
-
-[endsect]
-
-
-
-[section:is_complete coroutine::is_complete]
-
-[indexterm2 asio.indexterm.coroutine.is_complete..is_complete..coroutine]
-Returns true if the coroutine has reached its terminal state.
-
-
- bool is_complete() const;
-
-
-
-[endsect]
-
-
-
-[section:is_parent coroutine::is_parent]
-
-[indexterm2 asio.indexterm.coroutine.is_parent..is_parent..coroutine]
-Returns true if the coroutine is the parent of a fork.
-
-
- bool is_parent() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:deadline_timer deadline_timer]
-
-[indexterm1 asio.indexterm.deadline_timer..deadline_timer]
-Typedef for the typical usage of timer. Uses a UTC clock.
-
-
- typedef basic_deadline_timer< boost::posix_time::ptime > deadline_timer;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_deadline_timer.duration_type [*duration_type]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_deadline_timer.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_deadline_timer.time_type [*time_type]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_deadline_timer.traits_type [*traits_type]]]
- [The time traits type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_deadline_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.basic_deadline_timer [*basic_deadline_timer]]]
- [Constructor.
-
- Constructor to set a particular expiry time as an absolute time.
-
- Constructor to set a particular expiry time relative to now.
-
- Move-construct a basic_deadline_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.cancel_one [*cancel_one]]]
- [Cancels one asynchronous operation that is waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.expires_at [*expires_at]]]
- [Get the timer's expiry time as an absolute time.
-
- Set the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.expires_from_now [*expires_from_now]]]
- [Get the timer's expiry time relative to now.
-
- Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.operator_eq_ [*operator=]]]
- [Move-assign a basic_deadline_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_deadline_timer._basic_deadline_timer [*~basic_deadline_timer]]]
- [Destroys the timer. ]
- ]
-
-]
-
-The [link asio.reference.basic_deadline_timer `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 [link asio.reference.deadline_timer `deadline_timer`] typedef.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Examples]
-
-Performing a blocking wait:
-
- // Construct a timer without setting an expiry time.
- asio::deadline_timer timer(io_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();
-
-
-
-
-
-Performing an asynchronous wait:
-
- void handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
-
- ...
-
- // Construct a timer with an absolute expiry time.
- asio::deadline_timer timer(io_context,
- boost::posix_time::time_from_string("2005-12-07 23:59:59.000"));
-
- // Start an asynchronous wait.
- timer.async_wait(handler);
-
-
-
-
-
-[heading 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:
-
-
-
- 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 asio::error_code& e)
- {
- if (e != asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
-
-
-
-
-
-* The `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.
-
-
-* If a wait handler is cancelled, the [link asio.reference.error_code `error_code`] passed to it contains the value `asio::error::operation_aborted`.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/deadline_timer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:defer defer]
-
-[indexterm1 asio.indexterm.defer..defer]
-Submits a completion token or function object for execution.
-
-
- template<
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.defer.overload1 defer]``(
- CompletionToken && token);
- `` [''''&raquo;''' [link asio.reference.defer.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.defer.overload2 defer]``(
- const Executor & ex,
- CompletionToken && token,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.defer.overload2 more...]]``
-
- template<
- typename ExecutionContext,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.defer.overload3 defer]``(
- ExecutionContext & ctx,
- CompletionToken && token,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.defer.overload3 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/defer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 defer (1 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` defer(
- CompletionToken && token);
-
-
-This function submits an object for execution using the object's associated executor. The function object is queued for execution, and is never called from the current thread prior to returning from `defer()`.
-
-This function has the following effects:
-
-
-* Constructs a function object handler of type `Handler`, initialized with `handler(forward<CompletionToken>(token))`.
-
-
-* Constructs an object `result` of type `async_result<Handler>`, initializing the object as `result(handler)`.
-
-
-* Obtains the handler's associated executor object `ex` by performing `get_associated_executor(handler)`.
-
-
-* Obtains the handler's associated allocator object `alloc` by performing `get_associated_allocator(handler)`.
-
-
-* Performs `ex.defer(std::move(handler), alloc)`.
-
-
-* Returns `result.get()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 defer (2 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` defer(
- const Executor & ex,
- CompletionToken && token,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-This function submits an object for execution using the specified executor. The function object is queued for execution, and is never called from the current thread prior to returning from `defer()`.
-
-This function has the following effects:
-
-
-* Constructs a function object handler of type `Handler`, initialized with `handler(forward<CompletionToken>(token))`.
-
-
-* Constructs an object `result` of type `async_result<Handler>`, initializing the object as `result(handler)`.
-
-
-* Obtains the handler's associated executor object `ex1` by performing `get_associated_executor(handler)`.
-
-
-* Creates a work object `w` by performing `make_work(ex1)`.
-
-
-* Obtains the handler's associated allocator object `alloc` by performing `get_associated_allocator(handler)`.
-
-
-* Constructs a function object `f` with a function call operator that performs `ex1.dispatch(std::move(handler), alloc)` followed by `w.reset()`.
-
-
-* Performs `Executor(ex).defer(std::move(f), alloc)`.
-
-
-* Returns `result.get()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 defer (3 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename ExecutionContext,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` defer(
- ExecutionContext & ctx,
- CompletionToken && token,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-
-[heading Return Value]
-
-`defer(ctx.get_executor(), forward<CompletionToken>(token))`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:dispatch dispatch]
-
-[indexterm1 asio.indexterm.dispatch..dispatch]
-Submits a completion token or function object for execution.
-
-
- template<
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.dispatch.overload1 dispatch]``(
- CompletionToken && token);
- `` [''''&raquo;''' [link asio.reference.dispatch.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.dispatch.overload2 dispatch]``(
- const Executor & ex,
- CompletionToken && token,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.dispatch.overload2 more...]]``
-
- template<
- typename ExecutionContext,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.dispatch.overload3 dispatch]``(
- ExecutionContext & ctx,
- CompletionToken && token,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.dispatch.overload3 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/dispatch.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 dispatch (1 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
- CompletionToken && token);
-
-
-This function submits an object for execution using the object's associated executor. The function object is queued for execution, and is never called from the current thread prior to returning from `dispatch()`.
-
-This function has the following effects:
-
-
-* Constructs a function object handler of type `Handler`, initialized with `handler(forward<CompletionToken>(token))`.
-
-
-* Constructs an object `result` of type `async_result<Handler>`, initializing the object as `result(handler)`.
-
-
-* Obtains the handler's associated executor object `ex` by performing `get_associated_executor(handler)`.
-
-
-* Obtains the handler's associated allocator object `alloc` by performing `get_associated_allocator(handler)`.
-
-
-* Performs `ex.dispatch(std::move(handler), alloc)`.
-
-
-* Returns `result.get()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 dispatch (2 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
- const Executor & ex,
- CompletionToken && token,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-This function submits an object for execution using the specified executor. The function object is queued for execution, and is never called from the current thread prior to returning from `dispatch()`.
-
-This function has the following effects:
-
-
-* Constructs a function object handler of type `Handler`, initialized with `handler(forward<CompletionToken>(token))`.
-
-
-* Constructs an object `result` of type `async_result<Handler>`, initializing the object as `result(handler)`.
-
-
-* Obtains the handler's associated executor object `ex1` by performing `get_associated_executor(handler)`.
-
-
-* Creates a work object `w` by performing `make_work(ex1)`.
-
-
-* Obtains the handler's associated allocator object `alloc` by performing `get_associated_allocator(handler)`.
-
-
-* Constructs a function object `f` with a function call operator that performs `ex1.dispatch(std::move(handler), alloc)` followed by `w.reset()`.
-
-
-* Performs `Executor(ex).dispatch(std::move(f), alloc)`.
-
-
-* Returns `result.get()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 dispatch (3 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename ExecutionContext,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
- ExecutionContext & ctx,
- CompletionToken && token,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-
-[heading Return Value]
-
-`dispatch(ctx.get_executor(), forward<CompletionToken>(token))`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:dynamic_buffer dynamic_buffer]
-
-[indexterm1 asio.indexterm.dynamic_buffer..dynamic_buffer]
-The `asio::dynamic_buffer` function is used to create a dynamically resized buffer from a `std::basic_string` or `std::vector`.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- dynamic_string_buffer< Elem, Traits, Allocator > ``[link asio.reference.dynamic_buffer.overload1 dynamic_buffer]``(
- std::basic_string< Elem, Traits, Allocator > & data);
- `` [''''&raquo;''' [link asio.reference.dynamic_buffer.overload1 more...]]``
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- dynamic_string_buffer< Elem, Traits, Allocator > ``[link asio.reference.dynamic_buffer.overload2 dynamic_buffer]``(
- std::basic_string< Elem, Traits, Allocator > & data,
- std::size_t max_size);
- `` [''''&raquo;''' [link asio.reference.dynamic_buffer.overload2 more...]]``
-
- template<
- typename Elem,
- typename Allocator>
- dynamic_vector_buffer< Elem, Allocator > ``[link asio.reference.dynamic_buffer.overload3 dynamic_buffer]``(
- std::vector< Elem, Allocator > & data);
- `` [''''&raquo;''' [link asio.reference.dynamic_buffer.overload3 more...]]``
-
- template<
- typename Elem,
- typename Allocator>
- dynamic_vector_buffer< Elem, Allocator > ``[link asio.reference.dynamic_buffer.overload4 dynamic_buffer]``(
- std::vector< Elem, Allocator > & data,
- std::size_t max_size);
- `` [''''&raquo;''' [link asio.reference.dynamic_buffer.overload4 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 dynamic_buffer (1 of 4 overloads)]
-
-
-Create a new dynamic buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- dynamic_string_buffer< Elem, Traits, Allocator > dynamic_buffer(
- std::basic_string< Elem, Traits, Allocator > & data);
-
-
-
-[heading Return Value]
-
-`dynamic_string_buffer<Elem, Traits, Allocator>(data)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 dynamic_buffer (2 of 4 overloads)]
-
-
-Create a new dynamic buffer that represents the given string.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- dynamic_string_buffer< Elem, Traits, Allocator > dynamic_buffer(
- std::basic_string< Elem, Traits, Allocator > & data,
- std::size_t max_size);
-
-
-
-[heading Return Value]
-
-`dynamic_string_buffer<Elem, Traits, Allocator>(data, max_size)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 dynamic_buffer (3 of 4 overloads)]
-
-
-Create a new dynamic buffer that represents the given vector.
-
-
- template<
- typename Elem,
- typename Allocator>
- dynamic_vector_buffer< Elem, Allocator > dynamic_buffer(
- std::vector< Elem, Allocator > & data);
-
-
-
-[heading Return Value]
-
-`dynamic_vector_buffer<Elem, Allocator>(data)`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 dynamic_buffer (4 of 4 overloads)]
-
-
-Create a new dynamic buffer that represents the given vector.
-
-
- template<
- typename Elem,
- typename Allocator>
- dynamic_vector_buffer< Elem, Allocator > dynamic_buffer(
- std::vector< Elem, Allocator > & data,
- std::size_t max_size);
-
-
-
-[heading Return Value]
-
-`dynamic_vector_buffer<Elem, Allocator>(data, max_size)`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:dynamic_string_buffer dynamic_string_buffer]
-
-
-Adapt a basic\_string to the DynamicBuffer requirements.
-
-
- template<
- typename Elem,
- typename Traits,
- typename Allocator>
- class dynamic_string_buffer
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.dynamic_string_buffer.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.dynamic_string_buffer.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.dynamic_string_buffer.capacity [*capacity]]]
- [Get the current capacity of the dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.commit [*commit]]]
- [Move bytes from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.dynamic_string_buffer [*dynamic_string_buffer]]]
- [Construct a dynamic buffer from a string.
-
- Move construct a dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.max_size [*max_size]]]
- [Get the maximum size of the dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.dynamic_string_buffer.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-Requires that `sizeof(Elem) == 1`.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:capacity dynamic_string_buffer::capacity]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.capacity..capacity..dynamic_string_buffer]
-Get the current capacity of the dynamic buffer.
-
-
- std::size_t capacity() const;
-
-
-
-[heading Return Value]
-
-The current total capacity of the buffer, i.e. for both the input sequence and output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:commit dynamic_string_buffer::commit]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.commit..commit..dynamic_string_buffer]
-Move bytes from the output sequence to the input sequence.
-
-
- void commit(
- std::size_t n);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[n][The number of bytes to append from the start of the output sequence to the end of the input sequence. The remainder of the output sequence is discarded.]]
-
-]
-
-Requires a preceding call `prepare(x)` where `x >= n`, and no intervening operations that modify the input or output sequence.
-
-
-[heading Remarks]
-
-If `n` is greater than the size of the output sequence, the entire output sequence is moved to the input sequence and no error is issued.
-
-
-
-
-[endsect]
-
-
-
-[section:const_buffers_type dynamic_string_buffer::const_buffers_type]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.const_buffers_type..const_buffers_type..dynamic_string_buffer]
-The type used to represent the input sequence as a list of buffers.
-
-
- typedef const_buffer const_buffers_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.const_buffer [*const_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range.
-
- Construct a non-modifiable buffer from a modifiable one. ]
- ]
-
- [
- [[link asio.reference.const_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.const_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.operator_plus_ [*operator+]]]
- [Create a new non-modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.const_buffer `const_buffer`] class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::const_buffer b1 = ...;
- std::size_t s1 = b1.size();
- const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:consume dynamic_string_buffer::consume]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.consume..consume..dynamic_string_buffer]
-Remove characters from the input sequence.
-
-
- void consume(
- std::size_t n);
-
-
-Removes `n` characters from the beginning of the input sequence.
-
-
-[heading Remarks]
-
-If `n` is greater than the size of the input sequence, the entire input sequence is consumed and no error is issued.
-
-
-
-
-[endsect]
-
-
-
-[section:data dynamic_string_buffer::data]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.data..data..dynamic_string_buffer]
-Get a list of buffers that represents the input sequence.
-
-
- const_buffers_type data() const;
-
-
-
-[heading Return Value]
-
-An object of type `const_buffers_type` that satisfies ConstBufferSequence requirements, representing the basic\_string memory in input sequence.
-
-
-[heading Remarks]
-
-The returned object is invalidated by any `dynamic_string_buffer` or `basic_string` member function that modifies the input sequence or output sequence.
-
-
-
-
-[endsect]
-
-
-[section:dynamic_string_buffer dynamic_string_buffer::dynamic_string_buffer]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.dynamic_string_buffer..dynamic_string_buffer..dynamic_string_buffer]
-Construct a dynamic buffer from a string.
-
-
- explicit ``[link asio.reference.dynamic_string_buffer.dynamic_string_buffer.overload1 dynamic_string_buffer]``(
- std::basic_string< Elem, Traits, Allocator > & s,
- std::size_t maximum_size = (std::numeric_limits< std::size_t >::max)());
- `` [''''&raquo;''' [link asio.reference.dynamic_string_buffer.dynamic_string_buffer.overload1 more...]]``
-
-
-Move construct a dynamic buffer.
-
-
- ``[link asio.reference.dynamic_string_buffer.dynamic_string_buffer.overload2 dynamic_string_buffer]``(
- dynamic_string_buffer && other);
- `` [''''&raquo;''' [link asio.reference.dynamic_string_buffer.dynamic_string_buffer.overload2 more...]]``
-
-
-[section:overload1 dynamic_string_buffer::dynamic_string_buffer (1 of 2 overloads)]
-
-
-Construct a dynamic buffer from a string.
-
-
- dynamic_string_buffer(
- std::basic_string< Elem, Traits, Allocator > & s,
- std::size_t maximum_size = (std::numeric_limits< std::size_t >::max)());
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The string to be used as backing storage for the dynamic buffer. Any existing data in the string is treated as the dynamic buffer's input sequence. The object stores a reference to the string and the user is responsible for ensuring that the string object remains valid until the [link asio.reference.dynamic_string_buffer `dynamic_string_buffer`] object is destroyed.]]
-
-[[maximum_size][Specifies a maximum size for the buffer, in bytes. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 dynamic_string_buffer::dynamic_string_buffer (2 of 2 overloads)]
-
-
-Move construct a dynamic buffer.
-
-
- dynamic_string_buffer(
- dynamic_string_buffer && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:max_size dynamic_string_buffer::max_size]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.max_size..max_size..dynamic_string_buffer]
-Get the maximum size of the dynamic buffer.
-
-
- std::size_t max_size() const;
-
-
-
-[heading Return Value]
-
-The allowed maximum of the sum of the sizes of the input sequence and output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:mutable_buffers_type dynamic_string_buffer::mutable_buffers_type]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.mutable_buffers_type..mutable_buffers_type..dynamic_string_buffer]
-The type used to represent the output sequence as a list of buffers.
-
-
- typedef mutable_buffer mutable_buffers_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
- [Create a new modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::mutable_buffer b1 = ...;
- std::size_t s1 = b1.size();
- unsigned char* p1 = static_cast<unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:prepare dynamic_string_buffer::prepare]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.prepare..prepare..dynamic_string_buffer]
-Get a list of buffers that represents the output sequence, with the given size.
-
-
- mutable_buffers_type prepare(
- std::size_t n);
-
-
-Ensures that the output sequence can accommodate `n` bytes, resizing the basic\_string object as necessary.
-
-
-[heading Return Value]
-
-An object of type `mutable_buffers_type` that satisfies MutableBufferSequence requirements, representing basic\_string memory at the start of the output sequence of size `n`.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[std::length_error][If `size() + n > max_size()`.]]
-
-]
-
-
-[heading Remarks]
-
-The returned object is invalidated by any `dynamic_string_buffer` or `basic_string` member function that modifies the input sequence or output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:size dynamic_string_buffer::size]
-
-[indexterm2 asio.indexterm.dynamic_string_buffer.size..size..dynamic_string_buffer]
-Get the size of the input sequence.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:dynamic_vector_buffer dynamic_vector_buffer]
-
-
-Adapt a vector to the DynamicBuffer requirements.
-
-
- template<
- typename Elem,
- typename Allocator>
- class dynamic_vector_buffer
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.dynamic_vector_buffer.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.dynamic_vector_buffer.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.dynamic_vector_buffer.capacity [*capacity]]]
- [Get the current capacity of the dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.commit [*commit]]]
- [Move bytes from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.dynamic_vector_buffer [*dynamic_vector_buffer]]]
- [Construct a dynamic buffer from a string.
-
- Move construct a dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.max_size [*max_size]]]
- [Get the maximum size of the dynamic buffer. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.dynamic_vector_buffer.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-Requires that `sizeof(Elem) == 1`.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:capacity dynamic_vector_buffer::capacity]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.capacity..capacity..dynamic_vector_buffer]
-Get the current capacity of the dynamic buffer.
-
-
- std::size_t capacity() const;
-
-
-
-[heading Return Value]
-
-The current total capacity of the buffer, i.e. for both the input sequence and output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:commit dynamic_vector_buffer::commit]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.commit..commit..dynamic_vector_buffer]
-Move bytes from the output sequence to the input sequence.
-
-
- void commit(
- std::size_t n);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[n][The number of bytes to append from the start of the output sequence to the end of the input sequence. The remainder of the output sequence is discarded.]]
-
-]
-
-Requires a preceding call `prepare(x)` where `x >= n`, and no intervening operations that modify the input or output sequence.
-
-
-[heading Remarks]
-
-If `n` is greater than the size of the output sequence, the entire output sequence is moved to the input sequence and no error is issued.
-
-
-
-
-[endsect]
-
-
-
-[section:const_buffers_type dynamic_vector_buffer::const_buffers_type]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.const_buffers_type..const_buffers_type..dynamic_vector_buffer]
-The type used to represent the input sequence as a list of buffers.
-
-
- typedef const_buffer const_buffers_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.const_buffer [*const_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range.
-
- Construct a non-modifiable buffer from a modifiable one. ]
- ]
-
- [
- [[link asio.reference.const_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.const_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.const_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.const_buffer.operator_plus_ [*operator+]]]
- [Create a new non-modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.const_buffer `const_buffer`] class provides a safe representation of a buffer that cannot be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::const_buffer b1 = ...;
- std::size_t s1 = b1.size();
- const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:consume dynamic_vector_buffer::consume]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.consume..consume..dynamic_vector_buffer]
-Remove characters from the input sequence.
-
-
- void consume(
- std::size_t n);
-
-
-Removes `n` characters from the beginning of the input sequence.
-
-
-[heading Remarks]
-
-If `n` is greater than the size of the input sequence, the entire input sequence is consumed and no error is issued.
-
-
-
-
-[endsect]
-
-
-
-[section:data dynamic_vector_buffer::data]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.data..data..dynamic_vector_buffer]
-Get a list of buffers that represents the input sequence.
-
-
- const_buffers_type data() const;
-
-
-
-[heading Return Value]
-
-An object of type `const_buffers_type` that satisfies ConstBufferSequence requirements, representing the basic\_string memory in input sequence.
-
-
-[heading Remarks]
-
-The returned object is invalidated by any `dynamic_vector_buffer` or `basic_string` member function that modifies the input sequence or output sequence.
-
-
-
-
-[endsect]
-
-
-[section:dynamic_vector_buffer dynamic_vector_buffer::dynamic_vector_buffer]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.dynamic_vector_buffer..dynamic_vector_buffer..dynamic_vector_buffer]
-Construct a dynamic buffer from a string.
-
-
- explicit ``[link asio.reference.dynamic_vector_buffer.dynamic_vector_buffer.overload1 dynamic_vector_buffer]``(
- std::vector< Elem, Allocator > & v,
- std::size_t maximum_size = (std::numeric_limits< std::size_t >::max)());
- `` [''''&raquo;''' [link asio.reference.dynamic_vector_buffer.dynamic_vector_buffer.overload1 more...]]``
-
-
-Move construct a dynamic buffer.
-
-
- ``[link asio.reference.dynamic_vector_buffer.dynamic_vector_buffer.overload2 dynamic_vector_buffer]``(
- dynamic_vector_buffer && other);
- `` [''''&raquo;''' [link asio.reference.dynamic_vector_buffer.dynamic_vector_buffer.overload2 more...]]``
-
-
-[section:overload1 dynamic_vector_buffer::dynamic_vector_buffer (1 of 2 overloads)]
-
-
-Construct a dynamic buffer from a string.
-
-
- dynamic_vector_buffer(
- std::vector< Elem, Allocator > & v,
- std::size_t maximum_size = (std::numeric_limits< std::size_t >::max)());
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[v][The vector to be used as backing storage for the dynamic buffer. Any existing data in the vector is treated as the dynamic buffer's input sequence. The object stores a reference to the vector and the user is responsible for ensuring that the vector object remains valid until the [link asio.reference.dynamic_vector_buffer `dynamic_vector_buffer`] object is destroyed.]]
-
-[[maximum_size][Specifies a maximum size for the buffer, in bytes. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 dynamic_vector_buffer::dynamic_vector_buffer (2 of 2 overloads)]
-
-
-Move construct a dynamic buffer.
-
-
- dynamic_vector_buffer(
- dynamic_vector_buffer && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:max_size dynamic_vector_buffer::max_size]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.max_size..max_size..dynamic_vector_buffer]
-Get the maximum size of the dynamic buffer.
-
-
- std::size_t max_size() const;
-
-
-
-[heading Return Value]
-
-The allowed maximum of the sum of the sizes of the input sequence and output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:mutable_buffers_type dynamic_vector_buffer::mutable_buffers_type]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.mutable_buffers_type..mutable_buffers_type..dynamic_vector_buffer]
-The type used to represent the output sequence as a list of buffers.
-
-
- typedef mutable_buffer mutable_buffers_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
- [Create a new modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::mutable_buffer b1 = ...;
- std::size_t s1 = b1.size();
- unsigned char* p1 = static_cast<unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:prepare dynamic_vector_buffer::prepare]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.prepare..prepare..dynamic_vector_buffer]
-Get a list of buffers that represents the output sequence, with the given size.
-
-
- mutable_buffers_type prepare(
- std::size_t n);
-
-
-Ensures that the output sequence can accommodate `n` bytes, resizing the basic\_string object as necessary.
-
-
-[heading Return Value]
-
-An object of type `mutable_buffers_type` that satisfies MutableBufferSequence requirements, representing basic\_string memory at the start of the output sequence of size `n`.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[std::length_error][If `size() + n > max_size()`.]]
-
-]
-
-
-[heading Remarks]
-
-The returned object is invalidated by any `dynamic_vector_buffer` or `basic_string` member function that modifies the input sequence or output sequence.
-
-
-
-
-[endsect]
-
-
-
-[section:size dynamic_vector_buffer::size]
-
-[indexterm2 asio.indexterm.dynamic_vector_buffer.size..size..dynamic_vector_buffer]
-Get the size of the input sequence.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:error__addrinfo_category error::addrinfo_category]
-
-[indexterm1 asio.indexterm.error__addrinfo_category..error::addrinfo_category]
-
- static const asio::error_category & addrinfo_category = asio::error::get_addrinfo_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__addrinfo_errors error::addrinfo_errors]
-
-[indexterm1 asio.indexterm.error__addrinfo_errors..error::addrinfo_errors]
-
- enum addrinfo_errors
-
-[indexterm2 asio.indexterm.error__addrinfo_errors.service_not_found..service_not_found..error::addrinfo_errors]
-[indexterm2 asio.indexterm.error__addrinfo_errors.socket_type_not_supported..socket_type_not_supported..error::addrinfo_errors]
-
-[heading Values]
-[variablelist
-
- [
- [service_not_found]
- [The service is not supported for the given socket type. ]
- ]
-
- [
- [socket_type_not_supported]
- [The socket type is not supported. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__basic_errors error::basic_errors]
-
-[indexterm1 asio.indexterm.error__basic_errors..error::basic_errors]
-
- enum basic_errors
-
-[indexterm2 asio.indexterm.error__basic_errors.access_denied..access_denied..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.address_family_not_supported..address_family_not_supported..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.address_in_use..address_in_use..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.already_connected..already_connected..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.already_started..already_started..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.broken_pipe..broken_pipe..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.connection_aborted..connection_aborted..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.connection_refused..connection_refused..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.connection_reset..connection_reset..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.bad_descriptor..bad_descriptor..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.fault..fault..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.host_unreachable..host_unreachable..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.in_progress..in_progress..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.interrupted..interrupted..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.invalid_argument..invalid_argument..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.message_size..message_size..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.name_too_long..name_too_long..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.network_down..network_down..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.network_reset..network_reset..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.network_unreachable..network_unreachable..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.no_descriptors..no_descriptors..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.no_buffer_space..no_buffer_space..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.no_memory..no_memory..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.no_permission..no_permission..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.no_protocol_option..no_protocol_option..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.no_such_device..no_such_device..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.not_connected..not_connected..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.not_socket..not_socket..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.operation_aborted..operation_aborted..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.operation_not_supported..operation_not_supported..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.shut_down..shut_down..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.timed_out..timed_out..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.try_again..try_again..error::basic_errors]
-[indexterm2 asio.indexterm.error__basic_errors.would_block..would_block..error::basic_errors]
-
-[heading Values]
-[variablelist
-
- [
- [access_denied]
- [Permission denied. ]
- ]
-
- [
- [address_family_not_supported]
- [Address family not supported by protocol. ]
- ]
-
- [
- [address_in_use]
- [Address already in use. ]
- ]
-
- [
- [already_connected]
- [Transport endpoint is already connected. ]
- ]
-
- [
- [already_started]
- [Operation already in progress. ]
- ]
-
- [
- [broken_pipe]
- [Broken pipe. ]
- ]
-
- [
- [connection_aborted]
- [A connection has been aborted. ]
- ]
-
- [
- [connection_refused]
- [Connection refused. ]
- ]
-
- [
- [connection_reset]
- [Connection reset by peer. ]
- ]
-
- [
- [bad_descriptor]
- [Bad file descriptor. ]
- ]
-
- [
- [fault]
- [Bad address. ]
- ]
-
- [
- [host_unreachable]
- [No route to host. ]
- ]
-
- [
- [in_progress]
- [Operation now in progress. ]
- ]
-
- [
- [interrupted]
- [Interrupted system call. ]
- ]
-
- [
- [invalid_argument]
- [Invalid argument. ]
- ]
-
- [
- [message_size]
- [Message too long. ]
- ]
-
- [
- [name_too_long]
- [The name was too long. ]
- ]
-
- [
- [network_down]
- [Network is down. ]
- ]
-
- [
- [network_reset]
- [Network dropped connection on reset. ]
- ]
-
- [
- [network_unreachable]
- [Network is unreachable. ]
- ]
-
- [
- [no_descriptors]
- [Too many open files. ]
- ]
-
- [
- [no_buffer_space]
- [No buffer space available. ]
- ]
-
- [
- [no_memory]
- [Cannot allocate memory. ]
- ]
-
- [
- [no_permission]
- [Operation not permitted. ]
- ]
-
- [
- [no_protocol_option]
- [Protocol not available. ]
- ]
-
- [
- [no_such_device]
- [No such device. ]
- ]
-
- [
- [not_connected]
- [Transport endpoint is not connected. ]
- ]
-
- [
- [not_socket]
- [Socket operation on non-socket. ]
- ]
-
- [
- [operation_aborted]
- [Operation cancelled. ]
- ]
-
- [
- [operation_not_supported]
- [Operation not supported. ]
- ]
-
- [
- [shut_down]
- [Cannot send after transport endpoint shutdown. ]
- ]
-
- [
- [timed_out]
- [Connection timed out. ]
- ]
-
- [
- [try_again]
- [Resource temporarily unavailable. ]
- ]
-
- [
- [would_block]
- [The socket is marked non-blocking and the requested operation would block. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__get_addrinfo_category error::get_addrinfo_category]
-
-[indexterm1 asio.indexterm.error__get_addrinfo_category..error::get_addrinfo_category]
-
- const asio::error_category & get_addrinfo_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__get_misc_category error::get_misc_category]
-
-[indexterm1 asio.indexterm.error__get_misc_category..error::get_misc_category]
-
- const asio::error_category & get_misc_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__get_netdb_category error::get_netdb_category]
-
-[indexterm1 asio.indexterm.error__get_netdb_category..error::get_netdb_category]
-
- const asio::error_category & get_netdb_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__get_ssl_category error::get_ssl_category]
-
-[indexterm1 asio.indexterm.error__get_ssl_category..error::get_ssl_category]
-
- const asio::error_category & get_ssl_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:error__get_system_category error::get_system_category]
-
-[indexterm1 asio.indexterm.error__get_system_category..error::get_system_category]
-
- const asio::error_category & get_system_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:error__make_error_code error::make_error_code]
-
-[indexterm1 asio.indexterm.error__make_error_code..error::make_error_code]
-
- asio::error_code ``[link asio.reference.error__make_error_code.overload1 make_error_code]``(
- basic_errors e);
- `` [''''&raquo;''' [link asio.reference.error__make_error_code.overload1 more...]]``
-
- asio::error_code ``[link asio.reference.error__make_error_code.overload2 make_error_code]``(
- netdb_errors e);
- `` [''''&raquo;''' [link asio.reference.error__make_error_code.overload2 more...]]``
-
- asio::error_code ``[link asio.reference.error__make_error_code.overload3 make_error_code]``(
- addrinfo_errors e);
- `` [''''&raquo;''' [link asio.reference.error__make_error_code.overload3 more...]]``
-
- asio::error_code ``[link asio.reference.error__make_error_code.overload4 make_error_code]``(
- misc_errors e);
- `` [''''&raquo;''' [link asio.reference.error__make_error_code.overload4 more...]]``
-
- asio::error_code ``[link asio.reference.error__make_error_code.overload5 make_error_code]``(
- ssl_errors e);
- `` [''''&raquo;''' [link asio.reference.error__make_error_code.overload5 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 error::make_error_code (1 of 5 overloads)]
-
-
-
- asio::error_code make_error_code(
- basic_errors e);
-
-
-
-[endsect]
-
-
-
-[section:overload2 error::make_error_code (2 of 5 overloads)]
-
-
-
- asio::error_code make_error_code(
- netdb_errors e);
-
-
-
-[endsect]
-
-
-
-[section:overload3 error::make_error_code (3 of 5 overloads)]
-
-
-
- asio::error_code make_error_code(
- addrinfo_errors e);
-
-
-
-[endsect]
-
-
-
-[section:overload4 error::make_error_code (4 of 5 overloads)]
-
-
-
- asio::error_code make_error_code(
- misc_errors e);
-
-
-
-[endsect]
-
-
-
-[section:overload5 error::make_error_code (5 of 5 overloads)]
-
-
-
- asio::error_code make_error_code(
- ssl_errors e);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:error__misc_category error::misc_category]
-
-[indexterm1 asio.indexterm.error__misc_category..error::misc_category]
-
- static const asio::error_category & misc_category = asio::error::get_misc_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__misc_errors error::misc_errors]
-
-[indexterm1 asio.indexterm.error__misc_errors..error::misc_errors]
-
- enum misc_errors
-
-[indexterm2 asio.indexterm.error__misc_errors.already_open..already_open..error::misc_errors]
-[indexterm2 asio.indexterm.error__misc_errors.eof..eof..error::misc_errors]
-[indexterm2 asio.indexterm.error__misc_errors.not_found..not_found..error::misc_errors]
-[indexterm2 asio.indexterm.error__misc_errors.fd_set_failure..fd_set_failure..error::misc_errors]
-
-[heading Values]
-[variablelist
-
- [
- [already_open]
- [Already open. ]
- ]
-
- [
- [eof]
- [End of file or stream. ]
- ]
-
- [
- [not_found]
- [Element not found. ]
- ]
-
- [
- [fd_set_failure]
- [The descriptor cannot fit into the select system call's fd_set. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__netdb_category error::netdb_category]
-
-[indexterm1 asio.indexterm.error__netdb_category..error::netdb_category]
-
- static const asio::error_category & netdb_category = asio::error::get_netdb_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__netdb_errors error::netdb_errors]
-
-[indexterm1 asio.indexterm.error__netdb_errors..error::netdb_errors]
-
- enum netdb_errors
-
-[indexterm2 asio.indexterm.error__netdb_errors.host_not_found..host_not_found..error::netdb_errors]
-[indexterm2 asio.indexterm.error__netdb_errors.host_not_found_try_again..host_not_found_try_again..error::netdb_errors]
-[indexterm2 asio.indexterm.error__netdb_errors.no_data..no_data..error::netdb_errors]
-[indexterm2 asio.indexterm.error__netdb_errors.no_recovery..no_recovery..error::netdb_errors]
-
-[heading Values]
-[variablelist
-
- [
- [host_not_found]
- [Host not found (authoritative). ]
- ]
-
- [
- [host_not_found_try_again]
- [Host not found (non-authoritative). ]
- ]
-
- [
- [no_data]
- [The query is valid but does not have associated address data. ]
- ]
-
- [
- [no_recovery]
- [A non-recoverable error occurred. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:error__ssl_category error::ssl_category]
-
-[indexterm1 asio.indexterm.error__ssl_category..error::ssl_category]
-
- static const asio::error_category & ssl_category = asio::error::get_ssl_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:error__ssl_errors error::ssl_errors]
-
-[indexterm1 asio.indexterm.error__ssl_errors..error::ssl_errors]
-
- enum ssl_errors
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:error__system_category error::system_category]
-
-[indexterm1 asio.indexterm.error__system_category..error::system_category]
-
- static const asio::error_category & system_category = asio::error::get_system_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:error_category error_category]
-
-
-Base class for all error categories.
-
-
- class error_category :
- noncopyable
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.error_category.message [*message]]]
- [Returns a string describing the error denoted by value. ]
- ]
-
- [
- [[link asio.reference.error_category.name [*name]]]
- [Returns a string naming the error gategory. ]
- ]
-
- [
- [[link asio.reference.error_category.operator_not__eq_ [*operator!=]]]
- [Inequality operator to compare two error categories. ]
- ]
-
- [
- [[link asio.reference.error_category.operator_eq__eq_ [*operator==]]]
- [Equality operator to compare two error categories. ]
- ]
-
- [
- [[link asio.reference.error_category._error_category [*~error_category]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:message error_category::message]
-
-[indexterm2 asio.indexterm.error_category.message..message..error_category]
-Returns a string describing the error denoted by `value`.
-
-
- std::string message(
- int value) const;
-
-
-
-[endsect]
-
-
-
-[section:name error_category::name]
-
-[indexterm2 asio.indexterm.error_category.name..name..error_category]
-Returns a string naming the error gategory.
-
-
- const char * name() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ error_category::operator!=]
-
-[indexterm2 asio.indexterm.error_category.operator_not__eq_..operator!=..error_category]
-Inequality operator to compare two error categories.
-
-
- bool operator!=(
- const error_category & rhs) const;
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ error_category::operator==]
-
-[indexterm2 asio.indexterm.error_category.operator_eq__eq_..operator==..error_category]
-Equality operator to compare two error categories.
-
-
- bool operator==(
- const error_category & rhs) const;
-
-
-
-[endsect]
-
-
-
-[section:_error_category error_category::~error_category]
-
-[indexterm2 asio.indexterm.error_category._error_category..~error_category..error_category]
-Destructor.
-
-
- virtual ~error_category();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:error_code error_code]
-
-
-Class to represent an error code value.
-
-
- class error_code
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.error_code__unspecified_bool_type_t [*unspecified_bool_type_t]]]
- []
-
- ]
-
- [
-
- [[link asio.reference.error_code.unspecified_bool_type [*unspecified_bool_type]]]
- []
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.error_code.category [*category]]]
- [Get the error category. ]
- ]
-
- [
- [[link asio.reference.error_code.error_code [*error_code]]]
- [Default constructor.
-
- Construct with specific error code and category.
-
- Construct from an error code enum. ]
- ]
-
- [
- [[link asio.reference.error_code.message [*message]]]
- [Get the message associated with the error. ]
- ]
-
- [
- [[link asio.reference.error_code.operator_unspecified_bool_type [*operator unspecified_bool_type]]]
- [Operator returns non-null if there is a non-success error code. ]
- ]
-
- [
- [[link asio.reference.error_code.operator_not_ [*operator!]]]
- [Operator to test if the error represents success. ]
- ]
-
- [
- [[link asio.reference.error_code.unspecified_bool_true [*unspecified_bool_true]]]
- []
- ]
-
- [
- [[link asio.reference.error_code.value [*value]]]
- [Get the error value. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.error_code.operator_not__eq_ [*operator!=]]]
- [Inequality operator to compare two error objects. ]
- ]
-
- [
- [[link asio.reference.error_code.operator_eq__eq_ [*operator==]]]
- [Equality operator to compare two error objects. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:category error_code::category]
-
-[indexterm2 asio.indexterm.error_code.category..category..error_code]
-Get the error category.
-
-
- const error_category & category() const;
-
-
-
-[endsect]
-
-
-[section:error_code error_code::error_code]
-
-[indexterm2 asio.indexterm.error_code.error_code..error_code..error_code]
-Default constructor.
-
-
- ``[link asio.reference.error_code.error_code.overload1 error_code]``();
- `` [''''&raquo;''' [link asio.reference.error_code.error_code.overload1 more...]]``
-
-
-Construct with specific error code and category.
-
-
- ``[link asio.reference.error_code.error_code.overload2 error_code]``(
- int v,
- const error_category & c);
- `` [''''&raquo;''' [link asio.reference.error_code.error_code.overload2 more...]]``
-
-
-Construct from an error code enum.
-
-
- template<
- typename ErrorEnum>
- ``[link asio.reference.error_code.error_code.overload3 error_code]``(
- ErrorEnum e);
- `` [''''&raquo;''' [link asio.reference.error_code.error_code.overload3 more...]]``
-
-
-[section:overload1 error_code::error_code (1 of 3 overloads)]
-
-
-Default constructor.
-
-
- error_code();
-
-
-
-[endsect]
-
-
-
-[section:overload2 error_code::error_code (2 of 3 overloads)]
-
-
-Construct with specific error code and category.
-
-
- error_code(
- int v,
- const error_category & c);
-
-
-
-[endsect]
-
-
-
-[section:overload3 error_code::error_code (3 of 3 overloads)]
-
-
-Construct from an error code enum.
-
-
- template<
- typename ErrorEnum>
- error_code(
- ErrorEnum e);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:message error_code::message]
-
-[indexterm2 asio.indexterm.error_code.message..message..error_code]
-Get the message associated with the error.
-
-
- std::string message() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_unspecified_bool_type error_code::operator unspecified_bool_type]
-
-[indexterm2 asio.indexterm.error_code.operator_unspecified_bool_type..operator unspecified_bool_type..error_code]
-Operator returns non-null if there is a non-success error code.
-
-
- operator unspecified_bool_type() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not_ error_code::operator!]
-
-[indexterm2 asio.indexterm.error_code.operator_not_..operator!..error_code]
-Operator to test if the error represents success.
-
-
- bool operator!() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ error_code::operator!=]
-
-[indexterm2 asio.indexterm.error_code.operator_not__eq_..operator!=..error_code]
-Inequality operator to compare two error objects.
-
-
- friend bool operator!=(
- const error_code & e1,
- const error_code & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ error_code::operator==]
-
-[indexterm2 asio.indexterm.error_code.operator_eq__eq_..operator==..error_code]
-Equality operator to compare two error objects.
-
-
- friend bool operator==(
- const error_code & e1,
- const error_code & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:unspecified_bool_true error_code::unspecified_bool_true]
-
-[indexterm2 asio.indexterm.error_code.unspecified_bool_true..unspecified_bool_true..error_code]
-
- static void unspecified_bool_true(
- unspecified_bool_type_t );
-
-
-
-[endsect]
-
-
-
-[section:unspecified_bool_type error_code::unspecified_bool_type]
-
-[indexterm2 asio.indexterm.error_code.unspecified_bool_type..unspecified_bool_type..error_code]
-
- typedef void(*) unspecified_bool_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:value error_code::value]
-
-[indexterm2 asio.indexterm.error_code.value..value..error_code]
-Get the error value.
-
-
- int value() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:error_code__unspecified_bool_type_t error_code::unspecified_bool_type_t]
-
-
-
- struct unspecified_bool_type_t
-
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-[section:execution_context execution_context]
-
-
-A context for function object execution.
-
-
- class execution_context :
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.execution_context__id [*id]]]
- [Class used to uniquely identify a service. ]
-
- ]
-
- [
-
- [[link asio.reference.execution_context__service [*service]]]
- [Base class for all io_context services. ]
-
- ]
-
- [
-
- [[link asio.reference.execution_context.fork_event [*fork_event]]]
- [Fork-related event notifications. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context.notify_fork [*notify_fork]]]
- [Notify the execution_context of a fork-related event. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context.destroy [*destroy]]]
- [Destroys all services in the context. ]
- ]
-
- [
- [[link asio.reference.execution_context.execution_context [*execution_context]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.execution_context.shutdown [*shutdown]]]
- [Shuts down all services in the context. ]
- ]
-
- [
- [[link asio.reference.execution_context._execution_context [*~execution_context]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context.add_service [*add_service]]]
- [(Deprecated: Use make_service().) Add a service object to the execution_context. ]
- ]
-
- [
- [[link asio.reference.execution_context.has_service [*has_service]]]
- [Determine if an execution_context contains a specified service type. ]
- ]
-
- [
- [[link asio.reference.execution_context.make_service [*make_service]]]
- [Creates a service object and adds it to the execution_context. ]
- ]
-
- [
- [[link asio.reference.execution_context.use_service [*use_service]]]
- [Obtain the service object corresponding to the given type. ]
- ]
-
-]
-
-An execution context represents a place where function objects will be executed. An `io_context` is an example of an execution context.
-
-
-[heading The execution_context class and services]
-
-
-
-Class [link asio.reference.execution_context `execution_context`] implements an extensible, type-safe, polymorphic set of services, indexed by service type.
-
-Services exist to manage the resources that are shared across an execution context. For example, timers may be implemented in terms of a single timer queue, and this queue would be stored in a service.
-
-Access to the services of an [link asio.reference.execution_context `execution_context`] is via three function templates, `use_service()`, `add_service()` and `has_service()`.
-
-In a call to `use_service<Service>()`, the type argument chooses a service, making available all members of the named type. If `Service` is not present in an [link asio.reference.execution_context `execution_context`], an object of type `Service` is created and added to the [link asio.reference.execution_context `execution_context`]. A C++ program can check if an [link asio.reference.execution_context `execution_context`] implements a particular service with the function template `has_service<Service>()`.
-
-Service objects may be explicitly added to an [link asio.reference.execution_context `execution_context`] using the function template `add_service<Service>()`. If the `Service` is already present, the [link asio.reference.service_already_exists `service_already_exists`] exception is thrown. If the owner of the service is not the same object as the [link asio.reference.execution_context `execution_context`] parameter, the [link asio.reference.invalid_service_owner `invalid_service_owner`] exception is thrown.
-
-Once a service reference is obtained from an [link asio.reference.execution_context `execution_context`] object by calling `use_service()`, that reference remains usable as long as the owning [link asio.reference.execution_context `execution_context`] object exists.
-
-All service implementations have [link asio.reference.execution_context__service `execution_context::service`] as a public base class. Custom services may be implemented by deriving from this class and then added to an [link asio.reference.execution_context `execution_context`] using the facilities described above.
-
-
-[heading The execution_context as a base class]
-
-
-
-Class [link asio.reference.execution_context `execution_context`] may be used only as a base class for concrete execution context types. The `io_context` is an example of such a derived type.
-
-On destruction, a class that is derived from [link asio.reference.execution_context `execution_context`] must perform `execution_context::shutdown()` followed by `execution_context::destroy()`.
-
-This destruction sequence permits programs to simplify their resource management by using `shared_ptr<>`. Where an object's lifetime is tied to the lifetime of a connection (or some other sequence of asynchronous operations), a `shared_ptr` to the object would be bound into the handlers for all asynchronous operations associated with it. This works as follows:
-
-
-* When a single connection ends, all associated asynchronous operations complete. The corresponding handler objects are destroyed, and all `shared_ptr` references to the objects are destroyed.
-
-
-* To shut down the whole program, the [link asio.reference.io_context `io_context`] function stop() is called to terminate any run() calls as soon as possible. The [link asio.reference.io_context `io_context`] destructor calls `shutdown()` and `destroy()` to destroy all pending handlers, causing all `shared_ptr` references to all connection objects to be destroyed.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:add_service execution_context::add_service]
-
-[indexterm2 asio.indexterm.execution_context.add_service..add_service..execution_context]
-(Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`].
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend void add_service(
- execution_context & e,
- Service * svc);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[svc][The service object. On success, ownership of the service object is transferred to the [link asio.reference.execution_context `execution_context`]. When the [link asio.reference.execution_context `execution_context`] object is destroyed, it will destroy the service object by performing:
-``
- delete static_cast<execution_context::service*>(svc)
-``
-]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`].]]
-
-[[asio::invalid_service_owner][Thrown if the service's owning [link asio.reference.execution_context `execution_context`] is not the [link asio.reference.execution_context `execution_context`] object specified by the `e` parameter. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:destroy execution_context::destroy]
-
-[indexterm2 asio.indexterm.execution_context.destroy..destroy..execution_context]
-Destroys all services in the context.
-
-
- void destroy();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order * of the beginning of service object lifetime, performs `delete static_cast<execution_context::service*>(svc)`.
-
-
-
-
-[endsect]
-
-
-
-[section:execution_context execution_context::execution_context]
-
-[indexterm2 asio.indexterm.execution_context.execution_context..execution_context..execution_context]
-Constructor.
-
-
- execution_context();
-
-
-
-[endsect]
-
-
-
-[section:fork_event execution_context::fork_event]
-
-[indexterm2 asio.indexterm.execution_context.fork_event..fork_event..execution_context]
-Fork-related event notifications.
-
-
- enum fork_event
-
-[indexterm2 asio.indexterm.execution_context.fork_event.fork_prepare..fork_prepare..execution_context]
-[indexterm2 asio.indexterm.execution_context.fork_event.fork_parent..fork_parent..execution_context]
-[indexterm2 asio.indexterm.execution_context.fork_event.fork_child..fork_child..execution_context]
-
-[heading Values]
-[variablelist
-
- [
- [fork_prepare]
- [Notify the context that the process is about to fork. ]
- ]
-
- [
- [fork_parent]
- [Notify the context that the process has forked and is the parent. ]
- ]
-
- [
- [fork_child]
- [Notify the context that the process has forked and is the child. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:has_service execution_context::has_service]
-
-[indexterm2 asio.indexterm.execution_context.has_service..has_service..execution_context]
-Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend bool has_service(
- execution_context & e);
-
-
-This function is used to determine whether the [link asio.reference.execution_context `execution_context`] contains a service object corresponding to the given service type.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-A boolean indicating whether the [link asio.reference.execution_context `execution_context`] contains the service.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:make_service execution_context::make_service]
-
-[indexterm2 asio.indexterm.execution_context.make_service..make_service..execution_context]
-Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`].
-
-
- template<
- typename ``[link asio.reference.Service Service]``,
- typename... Args>
- friend Service & make_service(
- execution_context & e,
- Args &&... args);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[args][Zero or more arguments to be passed to the service constructor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`]. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:notify_fork execution_context::notify_fork]
-
-[indexterm2 asio.indexterm.execution_context.notify_fork..notify_fork..execution_context]
-Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event.
-
-
- void notify_fork(
- fork_event event);
-
-
-This function is used to inform the [link asio.reference.execution_context `execution_context`] that the process is about to fork, or has just forked. This allows the [link asio.reference.execution_context `execution_context`], and the services it contains, to perform any necessary housekeeping to ensure correct operation following a fork.
-
-This function must not be called while any other [link asio.reference.execution_context `execution_context`] function, or any function associated with the execution\_context's derived class, is being called in another thread. It is, however, safe to call this function from within a completion handler, provided no other thread is accessing the [link asio.reference.execution_context `execution_context`] or its derived class.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[event][A fork-related event.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the notification fails the [link asio.reference.execution_context `execution_context`] object should no longer be used and should be destroyed.]]
-
-]
-
-
-[heading Example]
-
-The following code illustrates how to incorporate the `notify_fork()` function:
-
- my_execution_context.notify_fork(execution_context::fork_prepare);
- if (fork() == 0)
- {
- // This is the child process.
- my_execution_context.notify_fork(execution_context::fork_child);
- }
- else
- {
- // This is the parent process.
- my_execution_context.notify_fork(execution_context::fork_parent);
- }
-
-
-
-
-
-[heading Remarks]
-
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->notify_fork();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime.
-
-
-
-
-[endsect]
-
-
-
-[section:shutdown execution_context::shutdown]
-
-[indexterm2 asio.indexterm.execution_context.shutdown..shutdown..execution_context]
-Shuts down all services in the context.
-
-
- void shutdown();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`.
-
-
-
-
-[endsect]
-
-
-[section:use_service execution_context::use_service]
-
-[indexterm2 asio.indexterm.execution_context.use_service..use_service..execution_context]
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & ``[link asio.reference.execution_context.use_service.overload1 use_service]``(
- execution_context & e);
- `` [''''&raquo;''' [link asio.reference.execution_context.use_service.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & ``[link asio.reference.execution_context.use_service.overload2 use_service]``(
- io_context & ioc);
- `` [''''&raquo;''' [link asio.reference.execution_context.use_service.overload2 more...]]``
-
-
-[section:overload1 execution_context::use_service (1 of 2 overloads)]
-
-
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & use_service(
- execution_context & e);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.execution_context `execution_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 execution_context::use_service (2 of 2 overloads)]
-
-
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & use_service(
- io_context & ioc);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.io_context `io_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ioc][The [link asio.reference.io_context `io_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-[heading Remarks]
-
-This overload is preserved for backwards compatibility with services that inherit from [link asio.reference.io_context__service `io_context::service`].
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_execution_context execution_context::~execution_context]
-
-[indexterm2 asio.indexterm.execution_context._execution_context..~execution_context..execution_context]
-Destructor.
-
-
- ~execution_context();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:execution_context__id execution_context::id]
-
-
-Class used to uniquely identify a service.
-
-
- class id :
- noncopyable
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context__id.id [*id]]]
- [Constructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:id execution_context::id::id]
-
-[indexterm2 asio.indexterm.execution_context__id.id..id..execution_context::id]
-Constructor.
-
-
- id();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:execution_context__service execution_context::service]
-
-
-Base class for all [link asio.reference.io_context `io_context`] services.
-
-
- class service :
- noncopyable
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context__service.context [*context]]]
- [Get the context object that owns the service. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context__service.service [*service]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.execution_context__service._service [*~service]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Private Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.execution_context__service.notify_fork [*notify_fork]]]
- [Handle notification of a fork-related event to perform any necessary housekeeping. ]
- ]
-
- [
- [[link asio.reference.execution_context__service.shutdown [*shutdown]]]
- [Destroy all user-defined handler objects owned by the service. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context execution_context::service::context]
-
-[indexterm2 asio.indexterm.execution_context__service.context..context..execution_context::service]
-Get the context object that owns the service.
-
-
- execution_context & context();
-
-
-
-[endsect]
-
-
-
-[section:service execution_context::service::service]
-
-[indexterm2 asio.indexterm.execution_context__service.service..service..execution_context::service]
-Constructor.
-
-
- service(
- execution_context & owner);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[owner][The [link asio.reference.execution_context `execution_context`] object that owns the service. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:_service execution_context::service::~service]
-
-[indexterm2 asio.indexterm.execution_context__service._service..~service..execution_context::service]
-Destructor.
-
-
- virtual ~service();
-
-
-
-[endsect]
-
-
-
-[section:notify_fork execution_context::service::notify_fork]
-
-[indexterm2 asio.indexterm.execution_context__service.notify_fork..notify_fork..execution_context::service]
-Handle notification of a fork-related event to perform any necessary housekeeping.
-
-
- virtual void notify_fork(
- execution_context::fork_event event);
-
-
-This function is not a pure virtual so that services only have to implement it if necessary. The default implementation does nothing.
-
-
-[endsect]
-
-
-
-[section:shutdown execution_context::service::shutdown]
-
-[indexterm2 asio.indexterm.execution_context__service.shutdown..shutdown..execution_context::service]
-Destroy all user-defined handler objects owned by the service.
-
-
- void shutdown();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:executor executor]
-
-
-Polymorphic wrapper for executors.
-
-
- class executor
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.executor__unspecified_bool_type_t [*unspecified_bool_type_t]]]
- []
-
- ]
-
- [
-
- [[link asio.reference.executor.unspecified_bool_type [*unspecified_bool_type]]]
- []
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.executor.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.executor.defer [*defer]]]
- [Request the executor to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.executor.dispatch [*dispatch]]]
- [Request the executor to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.executor.executor [*executor]]]
- [Default constructor.
-
- Construct from nullptr.
-
- Copy constructor.
-
- Move constructor.
-
- Construct a polymorphic wrapper for the specified executor.
-
- Allocator-aware constructor to create a polymorphic wrapper for the specified executor. ]
- ]
-
- [
- [[link asio.reference.executor.on_work_finished [*on_work_finished]]]
- [Inform the executor that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.executor.on_work_started [*on_work_started]]]
- [Inform the executor that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.executor.operator_unspecified_bool_type [*operator unspecified_bool_type]]]
- [Operator to test if the executor contains a valid target. ]
- ]
-
- [
- [[link asio.reference.executor.operator_eq_ [*operator=]]]
- [Assignment operator.
-
-
-
- Assignment operator for nullptr_t.
-
- Assignment operator to create a polymorphic wrapper for the specified executor. ]
- ]
-
- [
- [[link asio.reference.executor.post [*post]]]
- [Request the executor to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.executor.target [*target]]]
- [Obtain a pointer to the target executor object. ]
- ]
-
- [
- [[link asio.reference.executor.target_type [*target_type]]]
- [Obtain type information for the target executor object. ]
- ]
-
- [
- [[link asio.reference.executor.unspecified_bool_true [*unspecified_bool_true]]]
- []
- ]
-
- [
- [[link asio.reference.executor._executor [*~executor]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.executor.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.executor.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context executor::context]
-
-[indexterm2 asio.indexterm.executor.context..context..executor]
-Obtain the underlying execution context.
-
-
- execution_context & context() const;
-
-
-
-[endsect]
-
-
-
-[section:defer executor::defer]
-
-[indexterm2 asio.indexterm.executor.defer..defer..executor]
-Request the executor to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void defer(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the executor to execute the given function object. The function object is executed according to the rules of the target executor object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:dispatch executor::dispatch]
-
-[indexterm2 asio.indexterm.executor.dispatch..dispatch..executor]
-Request the executor to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void dispatch(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the executor to execute the given function object. The function object is executed according to the rules of the target executor object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:executor executor::executor]
-
-[indexterm2 asio.indexterm.executor.executor..executor..executor]
-Default constructor.
-
-
- ``[link asio.reference.executor.executor.overload1 executor]``();
- `` [''''&raquo;''' [link asio.reference.executor.executor.overload1 more...]]``
-
-
-Construct from nullptr.
-
-
- ``[link asio.reference.executor.executor.overload2 executor]``(
- nullptr_t );
- `` [''''&raquo;''' [link asio.reference.executor.executor.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.executor.executor.overload3 executor]``(
- const executor & other);
- `` [''''&raquo;''' [link asio.reference.executor.executor.overload3 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.executor.executor.overload4 executor]``(
- executor && other);
- `` [''''&raquo;''' [link asio.reference.executor.executor.overload4 more...]]``
-
-
-Construct a polymorphic wrapper for the specified executor.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- ``[link asio.reference.executor.executor.overload5 executor]``(
- Executor e);
- `` [''''&raquo;''' [link asio.reference.executor.executor.overload5 more...]]``
-
-
-Allocator-aware constructor to create a polymorphic wrapper for the specified executor.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename Allocator>
- ``[link asio.reference.executor.executor.overload6 executor]``(
- allocator_arg_t ,
- const Allocator & a,
- Executor e);
- `` [''''&raquo;''' [link asio.reference.executor.executor.overload6 more...]]``
-
-
-[section:overload1 executor::executor (1 of 6 overloads)]
-
-
-Default constructor.
-
-
- executor();
-
-
-
-[endsect]
-
-
-
-[section:overload2 executor::executor (2 of 6 overloads)]
-
-
-Construct from nullptr.
-
-
- executor(
- nullptr_t );
-
-
-
-[endsect]
-
-
-
-[section:overload3 executor::executor (3 of 6 overloads)]
-
-
-Copy constructor.
-
-
- executor(
- const executor & other);
-
-
-
-[endsect]
-
-
-
-[section:overload4 executor::executor (4 of 6 overloads)]
-
-
-Move constructor.
-
-
- executor(
- executor && other);
-
-
-
-[endsect]
-
-
-
-[section:overload5 executor::executor (5 of 6 overloads)]
-
-
-Construct a polymorphic wrapper for the specified executor.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- executor(
- Executor e);
-
-
-
-[endsect]
-
-
-
-[section:overload6 executor::executor (6 of 6 overloads)]
-
-
-Allocator-aware constructor to create a polymorphic wrapper for the specified executor.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename Allocator>
- executor(
- allocator_arg_t ,
- const Allocator & a,
- Executor e);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:on_work_finished executor::on_work_finished]
-
-[indexterm2 asio.indexterm.executor.on_work_finished..on_work_finished..executor]
-Inform the executor that some work is no longer outstanding.
-
-
- void on_work_finished() const;
-
-
-
-[endsect]
-
-
-
-[section:on_work_started executor::on_work_started]
-
-[indexterm2 asio.indexterm.executor.on_work_started..on_work_started..executor]
-Inform the executor that it has some outstanding work to do.
-
-
- void on_work_started() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_unspecified_bool_type executor::operator unspecified_bool_type]
-
-[indexterm2 asio.indexterm.executor.operator_unspecified_bool_type..operator unspecified_bool_type..executor]
-Operator to test if the executor contains a valid target.
-
-
- operator unspecified_bool_type() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ executor::operator!=]
-
-[indexterm2 asio.indexterm.executor.operator_not__eq_..operator!=..executor]
-Compare two executors for inequality.
-
-
- friend bool operator!=(
- const executor & a,
- const executor & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_eq_ executor::operator=]
-
-[indexterm2 asio.indexterm.executor.operator_eq_..operator=..executor]
-Assignment operator.
-
-
- executor & ``[link asio.reference.executor.operator_eq_.overload1 operator=]``(
- const executor & other);
- `` [''''&raquo;''' [link asio.reference.executor.operator_eq_.overload1 more...]]``
-
-
-
- executor & ``[link asio.reference.executor.operator_eq_.overload2 operator=]``(
- executor && other);
- `` [''''&raquo;''' [link asio.reference.executor.operator_eq_.overload2 more...]]``
-
-
-Assignment operator for nullptr\_t.
-
-
- executor & ``[link asio.reference.executor.operator_eq_.overload3 operator=]``(
- nullptr_t );
- `` [''''&raquo;''' [link asio.reference.executor.operator_eq_.overload3 more...]]``
-
-
-Assignment operator to create a polymorphic wrapper for the specified executor.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- executor & ``[link asio.reference.executor.operator_eq_.overload4 operator=]``(
- Executor && e);
- `` [''''&raquo;''' [link asio.reference.executor.operator_eq_.overload4 more...]]``
-
-
-[section:overload1 executor::operator= (1 of 4 overloads)]
-
-
-Assignment operator.
-
-
- executor & operator=(
- const executor & other);
-
-
-
-[endsect]
-
-
-
-[section:overload2 executor::operator= (2 of 4 overloads)]
-
-
-
- executor & operator=(
- executor && other);
-
-
-
-[endsect]
-
-
-
-[section:overload3 executor::operator= (3 of 4 overloads)]
-
-
-Assignment operator for nullptr\_t.
-
-
- executor & operator=(
- nullptr_t );
-
-
-
-[endsect]
-
-
-
-[section:overload4 executor::operator= (4 of 4 overloads)]
-
-
-Assignment operator to create a polymorphic wrapper for the specified executor.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- executor & operator=(
- Executor && e);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq__eq_ executor::operator==]
-
-[indexterm2 asio.indexterm.executor.operator_eq__eq_..operator==..executor]
-Compare two executors for equality.
-
-
- friend bool operator==(
- const executor & a,
- const executor & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:post executor::post]
-
-[indexterm2 asio.indexterm.executor.post..post..executor]
-Request the executor to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void post(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the executor to execute the given function object. The function object is executed according to the rules of the target executor object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:target executor::target]
-
-[indexterm2 asio.indexterm.executor.target..target..executor]
-Obtain a pointer to the target executor object.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- Executor * ``[link asio.reference.executor.target.overload1 target]``();
- `` [''''&raquo;''' [link asio.reference.executor.target.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- const Executor * ``[link asio.reference.executor.target.overload2 target]``() const;
- `` [''''&raquo;''' [link asio.reference.executor.target.overload2 more...]]``
-
-
-[section:overload1 executor::target (1 of 2 overloads)]
-
-
-Obtain a pointer to the target executor object.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- Executor * target();
-
-
-
-[heading Return Value]
-
-If `target_type() == typeid(T)`, a pointer to the stored executor target; otherwise, a null pointer.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 executor::target (2 of 2 overloads)]
-
-
-Obtain a pointer to the target executor object.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- const Executor * target() const;
-
-
-
-[heading Return Value]
-
-If `target_type() == typeid(T)`, a pointer to the stored executor target; otherwise, a null pointer.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:target_type executor::target_type]
-
-[indexterm2 asio.indexterm.executor.target_type..target_type..executor]
-Obtain type information for the target executor object.
-
-
- const std::type_info & target_type() const;
-
-
-
-[heading Return Value]
-
-If `*this` has a target type of type `T`, `typeid(T)`; otherwise, `typeid(void)`.
-
-
-
-
-[endsect]
-
-
-
-[section:unspecified_bool_true executor::unspecified_bool_true]
-
-[indexterm2 asio.indexterm.executor.unspecified_bool_true..unspecified_bool_true..executor]
-
- static void unspecified_bool_true(
- unspecified_bool_type_t );
-
-
-
-[endsect]
-
-
-
-[section:unspecified_bool_type executor::unspecified_bool_type]
-
-[indexterm2 asio.indexterm.executor.unspecified_bool_type..unspecified_bool_type..executor]
-
- typedef void(*) unspecified_bool_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:_executor executor::~executor]
-
-[indexterm2 asio.indexterm.executor._executor..~executor..executor]
-Destructor.
-
-
- ~executor();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:executor__unspecified_bool_type_t executor::unspecified_bool_type_t]
-
-
-
- struct unspecified_bool_type_t
-
-
-[heading Requirements]
-
-['Header: ][^asio/executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:executor_arg executor_arg]
-
-[indexterm1 asio.indexterm.executor_arg..executor_arg]
-A special value, similar to std::nothrow, used to disambiguate constructors that accept executor arguments.
-
-
- constexpr executor_arg_t executor_arg;
-
-
-See [link asio.reference.executor_arg_t `executor_arg_t`] and [link asio.reference.uses_executor `uses_executor`] for more information.
-
-[heading Requirements]
-
-['Header: ][^asio/uses_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:executor_arg_t executor_arg_t]
-
-
-A special type, similar to std::nothrow\_t, used to disambiguate constructors that accept executor arguments.
-
-
- struct executor_arg_t
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.executor_arg_t.executor_arg_t [*executor_arg_t]]]
- [Constructor. ]
- ]
-
-]
-
-The [link asio.reference.executor_arg_t `executor_arg_t`] struct is an empty structure type used as a unique type to disambiguate constructor and function overloading. Specifically, some types have constructors with [link asio.reference.executor_arg_t `executor_arg_t`] as the first argument, immediately followed by an argument of a type that satisfies the Executor type requirements.
-
-[heading Requirements]
-
-['Header: ][^asio/uses_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:executor_arg_t executor_arg_t::executor_arg_t]
-
-[indexterm2 asio.indexterm.executor_arg_t.executor_arg_t..executor_arg_t..executor_arg_t]
-Constructor.
-
-
- constexpr executor_arg_t();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:executor_binder executor_binder]
-
-
-A call wrapper type to bind an executor of type `Executor` to an object of type `T`.
-
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]``>
- class executor_binder
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.executor_binder.argument_type [*argument_type]]]
- [The type of the function's argument. ]
-
- ]
-
- [
-
- [[link asio.reference.executor_binder.executor_type [*executor_type]]]
- [The type of the associated executor. ]
-
- ]
-
- [
-
- [[link asio.reference.executor_binder.first_argument_type [*first_argument_type]]]
- [The type of the function's first argument. ]
-
- ]
-
- [
-
- [[link asio.reference.executor_binder.result_type [*result_type]]]
- [The return type if a function. ]
-
- ]
-
- [
-
- [[link asio.reference.executor_binder.second_argument_type [*second_argument_type]]]
- [The type of the function's second argument. ]
-
- ]
-
- [
-
- [[link asio.reference.executor_binder.target_type [*target_type]]]
- [The type of the target object. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.executor_binder.executor_binder [*executor_binder]]]
- [Construct an executor wrapper for the specified object.
-
- Copy constructor.
-
- Construct a copy, but specify a different executor.
-
- Construct a copy of a different executor wrapper type.
-
- Construct a copy of a different executor wrapper type, but specify a different executor.
-
- Move constructor.
-
- Move construct the target object, but specify a different executor.
-
- Move construct from a different executor wrapper type.
-
- Move construct from a different executor wrapper type, but specify a different executor. ]
- ]
-
- [
- [[link asio.reference.executor_binder.get [*get]]]
- [Obtain a reference to the target object. ]
- ]
-
- [
- [[link asio.reference.executor_binder.get_executor [*get_executor]]]
- [Obtain the associated executor. ]
- ]
-
- [
- [[link asio.reference.executor_binder.operator_lp__rp_ [*operator()]]]
- []
- ]
-
- [
- [[link asio.reference.executor_binder._executor_binder [*~executor_binder]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:argument_type executor_binder::argument_type]
-
-[indexterm2 asio.indexterm.executor_binder.argument_type..argument_type..executor_binder]
-The type of the function's argument.
-
-
- typedef see_below argument_type;
-
-
-
-The type of `argument_type` is based on the type `T` of the wrapper's target object:
-
-
-* if `T` is a pointer to a function type accepting a single argument, `argument_type` is a synonym for the return type of `T`;
-
-
-* if `T` is a class type with a member type `argument_type`, then `argument_type` is a synonym for `T::argument_type`;
-
-
-* otherwise `argument_type` is not defined.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:executor_binder executor_binder::executor_binder]
-
-[indexterm2 asio.indexterm.executor_binder.executor_binder..executor_binder..executor_binder]
-Construct an executor wrapper for the specified object.
-
-
- template<
- typename U>
- ``[link asio.reference.executor_binder.executor_binder.overload1 executor_binder]``(
- executor_arg_t ,
- const executor_type & e,
- U && u);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload1 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.executor_binder.executor_binder.overload2 executor_binder]``(
- const executor_binder & other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload2 more...]]``
-
-
-Construct a copy, but specify a different executor.
-
-
- ``[link asio.reference.executor_binder.executor_binder.overload3 executor_binder]``(
- executor_arg_t ,
- const executor_type & e,
- const executor_binder & other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload3 more...]]``
-
-
-Construct a copy of a different executor wrapper type.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- ``[link asio.reference.executor_binder.executor_binder.overload4 executor_binder]``(
- const executor_binder< U, OtherExecutor > & other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload4 more...]]``
-
-
-Construct a copy of a different executor wrapper type, but specify a different executor.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- ``[link asio.reference.executor_binder.executor_binder.overload5 executor_binder]``(
- executor_arg_t ,
- const executor_type & e,
- const executor_binder< U, OtherExecutor > & other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload5 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.executor_binder.executor_binder.overload6 executor_binder]``(
- executor_binder && other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload6 more...]]``
-
-
-Move construct the target object, but specify a different executor.
-
-
- ``[link asio.reference.executor_binder.executor_binder.overload7 executor_binder]``(
- executor_arg_t ,
- const executor_type & e,
- executor_binder && other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload7 more...]]``
-
-
-Move construct from a different executor wrapper type.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- ``[link asio.reference.executor_binder.executor_binder.overload8 executor_binder]``(
- executor_binder< U, OtherExecutor > && other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload8 more...]]``
-
-
-Move construct from a different executor wrapper type, but specify a different executor.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- ``[link asio.reference.executor_binder.executor_binder.overload9 executor_binder]``(
- executor_arg_t ,
- const executor_type & e,
- executor_binder< U, OtherExecutor > && other);
- `` [''''&raquo;''' [link asio.reference.executor_binder.executor_binder.overload9 more...]]``
-
-
-[section:overload1 executor_binder::executor_binder (1 of 9 overloads)]
-
-
-Construct an executor wrapper for the specified object.
-
-
- template<
- typename U>
- executor_binder(
- executor_arg_t ,
- const executor_type & e,
- U && u);
-
-
-This constructor is only valid if the type `T` is constructible from type `U`.
-
-
-[endsect]
-
-
-
-[section:overload2 executor_binder::executor_binder (2 of 9 overloads)]
-
-
-Copy constructor.
-
-
- executor_binder(
- const executor_binder & other);
-
-
-
-[endsect]
-
-
-
-[section:overload3 executor_binder::executor_binder (3 of 9 overloads)]
-
-
-Construct a copy, but specify a different executor.
-
-
- executor_binder(
- executor_arg_t ,
- const executor_type & e,
- const executor_binder & other);
-
-
-
-[endsect]
-
-
-
-[section:overload4 executor_binder::executor_binder (4 of 9 overloads)]
-
-
-Construct a copy of a different executor wrapper type.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- executor_binder(
- const executor_binder< U, OtherExecutor > & other);
-
-
-This constructor is only valid if the `Executor` type is constructible from type `OtherExecutor`, and the type `T` is constructible from type `U`.
-
-
-[endsect]
-
-
-
-[section:overload5 executor_binder::executor_binder (5 of 9 overloads)]
-
-
-Construct a copy of a different executor wrapper type, but specify a different executor.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- executor_binder(
- executor_arg_t ,
- const executor_type & e,
- const executor_binder< U, OtherExecutor > & other);
-
-
-This constructor is only valid if the type `T` is constructible from type `U`.
-
-
-[endsect]
-
-
-
-[section:overload6 executor_binder::executor_binder (6 of 9 overloads)]
-
-
-Move constructor.
-
-
- executor_binder(
- executor_binder && other);
-
-
-
-[endsect]
-
-
-
-[section:overload7 executor_binder::executor_binder (7 of 9 overloads)]
-
-
-Move construct the target object, but specify a different executor.
-
-
- executor_binder(
- executor_arg_t ,
- const executor_type & e,
- executor_binder && other);
-
-
-
-[endsect]
-
-
-
-[section:overload8 executor_binder::executor_binder (8 of 9 overloads)]
-
-
-Move construct from a different executor wrapper type.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- executor_binder(
- executor_binder< U, OtherExecutor > && other);
-
-
-
-[endsect]
-
-
-
-[section:overload9 executor_binder::executor_binder (9 of 9 overloads)]
-
-
-Move construct from a different executor wrapper type, but specify a different executor.
-
-
- template<
- typename U,
- typename ``[link asio.reference.Executor1 OtherExecutor]``>
- executor_binder(
- executor_arg_t ,
- const executor_type & e,
- executor_binder< U, OtherExecutor > && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type executor_binder::executor_type]
-
-[indexterm2 asio.indexterm.executor_binder.executor_type..executor_type..executor_binder]
-The type of the associated executor.
-
-
- typedef Executor executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:first_argument_type executor_binder::first_argument_type]
-
-[indexterm2 asio.indexterm.executor_binder.first_argument_type..first_argument_type..executor_binder]
-The type of the function's first argument.
-
-
- typedef see_below first_argument_type;
-
-
-
-The type of `first_argument_type` is based on the type `T` of the wrapper's target object:
-
-
-* if `T` is a pointer to a function type accepting two arguments, `first_argument_type` is a synonym for the return type of `T`;
-
-
-* if `T` is a class type with a member type `first_argument_type`, then `first_argument_type` is a synonym for `T::first_argument_type`;
-
-
-* otherwise `first_argument_type` is not defined.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:get executor_binder::get]
-
-[indexterm2 asio.indexterm.executor_binder.get..get..executor_binder]
-Obtain a reference to the target object.
-
-
- target_type & ``[link asio.reference.executor_binder.get.overload1 get]``();
- `` [''''&raquo;''' [link asio.reference.executor_binder.get.overload1 more...]]``
-
- const target_type & ``[link asio.reference.executor_binder.get.overload2 get]``() const;
- `` [''''&raquo;''' [link asio.reference.executor_binder.get.overload2 more...]]``
-
-
-[section:overload1 executor_binder::get (1 of 2 overloads)]
-
-
-Obtain a reference to the target object.
-
-
- target_type & get();
-
-
-
-[endsect]
-
-
-
-[section:overload2 executor_binder::get (2 of 2 overloads)]
-
-
-Obtain a reference to the target object.
-
-
- const target_type & get() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_executor executor_binder::get_executor]
-
-[indexterm2 asio.indexterm.executor_binder.get_executor..get_executor..executor_binder]
-Obtain the associated executor.
-
-
- executor_type get_executor() const;
-
-
-
-[endsect]
-
-
-[section:operator_lp__rp_ executor_binder::operator()]
-
-[indexterm2 asio.indexterm.executor_binder.operator_lp__rp_..operator()..executor_binder]
-
- template<
- typename... Args>
- auto ``[link asio.reference.executor_binder.operator_lp__rp_.overload1 operator()]``(
- Args && ...);
- `` [''''&raquo;''' [link asio.reference.executor_binder.operator_lp__rp_.overload1 more...]]``
-
- template<
- typename... Args>
- auto ``[link asio.reference.executor_binder.operator_lp__rp_.overload2 operator()]``(
- Args && ...) const;
- `` [''''&raquo;''' [link asio.reference.executor_binder.operator_lp__rp_.overload2 more...]]``
-
-
-[section:overload1 executor_binder::operator() (1 of 2 overloads)]
-
-
-
- template<
- typename... Args>
- auto operator()(
- Args && ...);
-
-
-
-[endsect]
-
-
-
-[section:overload2 executor_binder::operator() (2 of 2 overloads)]
-
-
-
- template<
- typename... Args>
- auto operator()(
- Args && ...) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:result_type executor_binder::result_type]
-
-[indexterm2 asio.indexterm.executor_binder.result_type..result_type..executor_binder]
-The return type if a function.
-
-
- typedef see_below result_type;
-
-
-
-The type of `result_type` is based on the type `T` of the wrapper's target object:
-
-
-* if `T` is a pointer to function type, `result_type` is a synonym for the return type of `T`;
-
-
-* if `T` is a class type with a member type `result_type`, then `result_type` is a synonym for `T::result_type`;
-
-
-* otherwise `result_type` is not defined.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:second_argument_type executor_binder::second_argument_type]
-
-[indexterm2 asio.indexterm.executor_binder.second_argument_type..second_argument_type..executor_binder]
-The type of the function's second argument.
-
-
- typedef see_below second_argument_type;
-
-
-
-The type of `second_argument_type` is based on the type `T` of the wrapper's target object:
-
-
-* if `T` is a pointer to a function type accepting two arguments, `second_argument_type` is a synonym for the return type of `T`;
-
-
-* if `T` is a class type with a member type `first_argument_type`, then `second_argument_type` is a synonym for `T::second_argument_type`;
-
-
-* otherwise `second_argument_type` is not defined.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:target_type executor_binder::target_type]
-
-[indexterm2 asio.indexterm.executor_binder.target_type..target_type..executor_binder]
-The type of the target object.
-
-
- typedef T target_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/bind_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:_executor_binder executor_binder::~executor_binder]
-
-[indexterm2 asio.indexterm.executor_binder._executor_binder..~executor_binder..executor_binder]
-Destructor.
-
-
- ~executor_binder();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:executor_work_guard executor_work_guard]
-
-
-An object of type `executor_work_guard` controls ownership of executor work within a scope.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- class executor_work_guard
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.executor_work_guard.executor_type [*executor_type]]]
- [The underlying executor type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.executor_work_guard.executor_work_guard [*executor_work_guard]]]
- [Constructs a executor_work_guard object for the specified executor.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.executor_work_guard.get_executor [*get_executor]]]
- [Obtain the associated executor. ]
- ]
-
- [
- [[link asio.reference.executor_work_guard.owns_work [*owns_work]]]
- [Whether the executor_work_guard object owns some outstanding work. ]
- ]
-
- [
- [[link asio.reference.executor_work_guard.reset [*reset]]]
- [Indicate that the work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.executor_work_guard._executor_work_guard [*~executor_work_guard]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/executor_work_guard.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:executor_type executor_work_guard::executor_type]
-
-[indexterm2 asio.indexterm.executor_work_guard.executor_type..executor_type..executor_work_guard]
-The underlying executor type.
-
-
- typedef Executor executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/executor_work_guard.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:executor_work_guard executor_work_guard::executor_work_guard]
-
-[indexterm2 asio.indexterm.executor_work_guard.executor_work_guard..executor_work_guard..executor_work_guard]
-Constructs a `executor_work_guard` object for the specified executor.
-
-
- explicit ``[link asio.reference.executor_work_guard.executor_work_guard.overload1 executor_work_guard]``(
- const executor_type & e);
- `` [''''&raquo;''' [link asio.reference.executor_work_guard.executor_work_guard.overload1 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.executor_work_guard.executor_work_guard.overload2 executor_work_guard]``(
- const executor_work_guard & other);
- `` [''''&raquo;''' [link asio.reference.executor_work_guard.executor_work_guard.overload2 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.executor_work_guard.executor_work_guard.overload3 executor_work_guard]``(
- executor_work_guard && other);
- `` [''''&raquo;''' [link asio.reference.executor_work_guard.executor_work_guard.overload3 more...]]``
-
-
-[section:overload1 executor_work_guard::executor_work_guard (1 of 3 overloads)]
-
-
-Constructs a `executor_work_guard` object for the specified executor.
-
-
- executor_work_guard(
- const executor_type & e);
-
-
-Stores a copy of `e` and calls `on_work_started()` on it.
-
-
-[endsect]
-
-
-
-[section:overload2 executor_work_guard::executor_work_guard (2 of 3 overloads)]
-
-
-Copy constructor.
-
-
- executor_work_guard(
- const executor_work_guard & other);
-
-
-
-[endsect]
-
-
-
-[section:overload3 executor_work_guard::executor_work_guard (3 of 3 overloads)]
-
-
-Move constructor.
-
-
- executor_work_guard(
- executor_work_guard && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_executor executor_work_guard::get_executor]
-
-[indexterm2 asio.indexterm.executor_work_guard.get_executor..get_executor..executor_work_guard]
-Obtain the associated executor.
-
-
- executor_type get_executor() const;
-
-
-
-[endsect]
-
-
-
-[section:owns_work executor_work_guard::owns_work]
-
-[indexterm2 asio.indexterm.executor_work_guard.owns_work..owns_work..executor_work_guard]
-Whether the [link asio.reference.executor_work_guard `executor_work_guard`] object owns some outstanding work.
-
-
- bool owns_work() const;
-
-
-
-[endsect]
-
-
-
-[section:reset executor_work_guard::reset]
-
-[indexterm2 asio.indexterm.executor_work_guard.reset..reset..executor_work_guard]
-Indicate that the work is no longer outstanding.
-
-
- void reset();
-
-
-
-[endsect]
-
-
-
-[section:_executor_work_guard executor_work_guard::~executor_work_guard]
-
-[indexterm2 asio.indexterm.executor_work_guard._executor_work_guard..~executor_work_guard..executor_work_guard]
-Destructor.
-
-
- ~executor_work_guard();
-
-
-Unless the object has already been reset, or is in a moved-from state, calls `on_work_finished()` on the stored executor.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:generic__basic_endpoint generic::basic_endpoint]
-
-
-Describes an endpoint for any socket type.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_endpoint
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint from the specified socket address.
-
- Construct an endpoint from the specific endpoint type.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-The [link asio.reference.generic__basic_endpoint `generic::basic_endpoint`] class template describes an endpoint that may be associated with any socket type.
-
-
-[heading Remarks]
-
-The socket types sockaddr type must be able to fit into a `sockaddr_storage` structure.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_endpoint generic::basic_endpoint::basic_endpoint]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.basic_endpoint..basic_endpoint..generic::basic_endpoint]
-Default constructor.
-
-
- ``[link asio.reference.generic__basic_endpoint.basic_endpoint.overload1 basic_endpoint]``();
- `` [''''&raquo;''' [link asio.reference.generic__basic_endpoint.basic_endpoint.overload1 more...]]``
-
-
-Construct an endpoint from the specified socket address.
-
-
- ``[link asio.reference.generic__basic_endpoint.basic_endpoint.overload2 basic_endpoint]``(
- const void * socket_address,
- std::size_t socket_address_size,
- int socket_protocol = 0);
- `` [''''&raquo;''' [link asio.reference.generic__basic_endpoint.basic_endpoint.overload2 more...]]``
-
-
-Construct an endpoint from the specific endpoint type.
-
-
- template<
- typename ``[link asio.reference.Endpoint Endpoint]``>
- ``[link asio.reference.generic__basic_endpoint.basic_endpoint.overload3 basic_endpoint]``(
- const Endpoint & endpoint);
- `` [''''&raquo;''' [link asio.reference.generic__basic_endpoint.basic_endpoint.overload3 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.generic__basic_endpoint.basic_endpoint.overload4 basic_endpoint]``(
- const basic_endpoint & other);
- `` [''''&raquo;''' [link asio.reference.generic__basic_endpoint.basic_endpoint.overload4 more...]]``
-
-
-[section:overload1 generic::basic_endpoint::basic_endpoint (1 of 4 overloads)]
-
-
-Default constructor.
-
-
- basic_endpoint();
-
-
-
-[endsect]
-
-
-
-[section:overload2 generic::basic_endpoint::basic_endpoint (2 of 4 overloads)]
-
-
-Construct an endpoint from the specified socket address.
-
-
- basic_endpoint(
- const void * socket_address,
- std::size_t socket_address_size,
- int socket_protocol = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload3 generic::basic_endpoint::basic_endpoint (3 of 4 overloads)]
-
-
-Construct an endpoint from the specific endpoint type.
-
-
- template<
- typename ``[link asio.reference.Endpoint Endpoint]``>
- basic_endpoint(
- const Endpoint & endpoint);
-
-
-
-[endsect]
-
-
-
-[section:overload4 generic::basic_endpoint::basic_endpoint (4 of 4 overloads)]
-
-
-Copy constructor.
-
-
- basic_endpoint(
- const basic_endpoint & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:capacity generic::basic_endpoint::capacity]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.capacity..capacity..generic::basic_endpoint]
-Get the capacity of the endpoint in the native type.
-
-
- std::size_t capacity() const;
-
-
-
-[endsect]
-
-
-[section:data generic::basic_endpoint::data]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.data..data..generic::basic_endpoint]
-Get the underlying endpoint in the native type.
-
-
- data_type * ``[link asio.reference.generic__basic_endpoint.data.overload1 data]``();
- `` [''''&raquo;''' [link asio.reference.generic__basic_endpoint.data.overload1 more...]]``
-
- const data_type * ``[link asio.reference.generic__basic_endpoint.data.overload2 data]``() const;
- `` [''''&raquo;''' [link asio.reference.generic__basic_endpoint.data.overload2 more...]]``
-
-
-[section:overload1 generic::basic_endpoint::data (1 of 2 overloads)]
-
-
-Get the underlying endpoint in the native type.
-
-
- data_type * data();
-
-
-
-[endsect]
-
-
-
-[section:overload2 generic::basic_endpoint::data (2 of 2 overloads)]
-
-
-Get the underlying endpoint in the native type.
-
-
- const data_type * data() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:data_type generic::basic_endpoint::data_type]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.data_type..data_type..generic::basic_endpoint]
-The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
-
-
- typedef implementation_defined data_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ generic::basic_endpoint::operator!=]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_not__eq_..operator!=..generic::basic_endpoint]
-Compare two endpoints for inequality.
-
-
- friend bool operator!=(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt_ generic::basic_endpoint::operator<]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_lt_..operator<..generic::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator<(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt__eq_ generic::basic_endpoint::operator<=]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_lt__eq_..operator<=..generic::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator<=(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ generic::basic_endpoint::operator=]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_eq_..operator=..generic::basic_endpoint]
-Assign from another endpoint.
-
-
- basic_endpoint & operator=(
- const basic_endpoint & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ generic::basic_endpoint::operator==]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_eq__eq_..operator==..generic::basic_endpoint]
-Compare two endpoints for equality.
-
-
- friend bool operator==(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ generic::basic_endpoint::operator>]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_gt_..operator>..generic::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator>(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ generic::basic_endpoint::operator>=]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.operator_gt__eq_..operator>=..generic::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator>=(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol generic::basic_endpoint::protocol]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.protocol..protocol..generic::basic_endpoint]
-The protocol associated with the endpoint.
-
-
- protocol_type protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:protocol_type generic::basic_endpoint::protocol_type]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.protocol_type..protocol_type..generic::basic_endpoint]
-The protocol type associated with the endpoint.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:resize generic::basic_endpoint::resize]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.resize..resize..generic::basic_endpoint]
-Set the underlying size of the endpoint in the native type.
-
-
- void resize(
- std::size_t new_size);
-
-
-
-[endsect]
-
-
-
-[section:size generic::basic_endpoint::size]
-
-[indexterm2 asio.indexterm.generic__basic_endpoint.size..size..generic::basic_endpoint]
-Get the underlying size of the endpoint in the native type.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:generic__datagram_protocol generic::datagram_protocol]
-
-
-Encapsulates the flags needed for a generic datagram-oriented socket.
-
-
- class datagram_protocol
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__datagram_protocol.endpoint [*endpoint]]]
- [The type of an endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__datagram_protocol.socket [*socket]]]
- [The generic socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__datagram_protocol.datagram_protocol [*datagram_protocol]]]
- [Construct a protocol object for a specific address family and protocol.
-
- Construct a generic protocol object from a specific protocol. ]
- ]
-
- [
- [[link asio.reference.generic__datagram_protocol.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.generic__datagram_protocol.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.generic__datagram_protocol.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__datagram_protocol.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__datagram_protocol.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.generic__datagram_protocol `generic::datagram_protocol`] class contains flags necessary for datagram-oriented sockets of any address family and protocol.
-
-
-[heading Examples]
-
-Constructing using a native address family and socket protocol:
-
- datagram_protocol p(AF_INET, IPPROTO_UDP);
-
-
-Constructing from a specific protocol type:
-
- datagram_protocol p(asio::ip::udp::v4());
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:datagram_protocol generic::datagram_protocol::datagram_protocol]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.datagram_protocol..datagram_protocol..generic::datagram_protocol]
-Construct a protocol object for a specific address family and protocol.
-
-
- ``[link asio.reference.generic__datagram_protocol.datagram_protocol.overload1 datagram_protocol]``(
- int address_family,
- int socket_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__datagram_protocol.datagram_protocol.overload1 more...]]``
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- ``[link asio.reference.generic__datagram_protocol.datagram_protocol.overload2 datagram_protocol]``(
- const Protocol & source_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__datagram_protocol.datagram_protocol.overload2 more...]]``
-
-
-[section:overload1 generic::datagram_protocol::datagram_protocol (1 of 2 overloads)]
-
-
-Construct a protocol object for a specific address family and protocol.
-
-
- datagram_protocol(
- int address_family,
- int socket_protocol);
-
-
-
-[endsect]
-
-
-
-[section:overload2 generic::datagram_protocol::datagram_protocol (2 of 2 overloads)]
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- datagram_protocol(
- const Protocol & source_protocol);
-
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[@c][bad\_cast Thrown if the source protocol is not datagram-oriented. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:endpoint generic::datagram_protocol::endpoint]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.endpoint..endpoint..generic::datagram_protocol]
-The type of an endpoint.
-
-
- typedef basic_endpoint< datagram_protocol > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint from the specified socket address.
-
- Construct an endpoint from the specific endpoint type.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-The [link asio.reference.generic__basic_endpoint `generic::basic_endpoint`] class template describes an endpoint that may be associated with any socket type.
-
-
-[heading Remarks]
-
-The socket types sockaddr type must be able to fit into a `sockaddr_storage` structure.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family generic::datagram_protocol::family]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.family..family..generic::datagram_protocol]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ generic::datagram_protocol::operator!=]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.operator_not__eq_..operator!=..generic::datagram_protocol]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const datagram_protocol & p1,
- const datagram_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ generic::datagram_protocol::operator==]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.operator_eq__eq_..operator==..generic::datagram_protocol]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const datagram_protocol & p1,
- const datagram_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol generic::datagram_protocol::protocol]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.protocol..protocol..generic::datagram_protocol]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:socket generic::datagram_protocol::socket]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.socket..socket..generic::datagram_protocol]
-The generic socket type.
-
-
- typedef basic_datagram_socket< datagram_protocol > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
- [Construct a basic_datagram_socket without opening it.
-
- Construct and open a basic_datagram_socket.
-
- Construct a basic_datagram_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_datagram_socket on an existing native socket.
-
- Move-construct a basic_datagram_socket from another.
-
- Move-construct a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_datagram_socket from another.
-
- Move-assign a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
- [Receive a datagram with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send_to [*send_to]]]
- [Send a datagram to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_datagram_socket `basic_datagram_socket`] class template provides asynchronous and blocking datagram-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type generic::datagram_protocol::type]
-
-[indexterm2 asio.indexterm.generic__datagram_protocol.type..type..generic::datagram_protocol]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:generic__raw_protocol generic::raw_protocol]
-
-
-Encapsulates the flags needed for a generic raw socket.
-
-
- class raw_protocol
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__raw_protocol.endpoint [*endpoint]]]
- [The type of an endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__raw_protocol.socket [*socket]]]
- [The generic socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__raw_protocol.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.generic__raw_protocol.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.generic__raw_protocol.raw_protocol [*raw_protocol]]]
- [Construct a protocol object for a specific address family and protocol.
-
- Construct a generic protocol object from a specific protocol. ]
- ]
-
- [
- [[link asio.reference.generic__raw_protocol.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__raw_protocol.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__raw_protocol.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.generic__raw_protocol `generic::raw_protocol`] class contains flags necessary for raw sockets of any address family and protocol.
-
-
-[heading Examples]
-
-Constructing using a native address family and socket protocol:
-
- raw_protocol p(AF_INET, IPPROTO_ICMP);
-
-
-Constructing from a specific protocol type:
-
- raw_protocol p(asio::ip::icmp::v4());
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/raw_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:endpoint generic::raw_protocol::endpoint]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.endpoint..endpoint..generic::raw_protocol]
-The type of an endpoint.
-
-
- typedef basic_endpoint< raw_protocol > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint from the specified socket address.
-
- Construct an endpoint from the specific endpoint type.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-The [link asio.reference.generic__basic_endpoint `generic::basic_endpoint`] class template describes an endpoint that may be associated with any socket type.
-
-
-[heading Remarks]
-
-The socket types sockaddr type must be able to fit into a `sockaddr_storage` structure.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/raw_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family generic::raw_protocol::family]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.family..family..generic::raw_protocol]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ generic::raw_protocol::operator!=]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.operator_not__eq_..operator!=..generic::raw_protocol]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const raw_protocol & p1,
- const raw_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/raw_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ generic::raw_protocol::operator==]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.operator_eq__eq_..operator==..generic::raw_protocol]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const raw_protocol & p1,
- const raw_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/raw_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol generic::raw_protocol::protocol]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.protocol..protocol..generic::raw_protocol]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-[section:raw_protocol generic::raw_protocol::raw_protocol]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.raw_protocol..raw_protocol..generic::raw_protocol]
-Construct a protocol object for a specific address family and protocol.
-
-
- ``[link asio.reference.generic__raw_protocol.raw_protocol.overload1 raw_protocol]``(
- int address_family,
- int socket_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__raw_protocol.raw_protocol.overload1 more...]]``
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- ``[link asio.reference.generic__raw_protocol.raw_protocol.overload2 raw_protocol]``(
- const Protocol & source_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__raw_protocol.raw_protocol.overload2 more...]]``
-
-
-[section:overload1 generic::raw_protocol::raw_protocol (1 of 2 overloads)]
-
-
-Construct a protocol object for a specific address family and protocol.
-
-
- raw_protocol(
- int address_family,
- int socket_protocol);
-
-
-
-[endsect]
-
-
-
-[section:overload2 generic::raw_protocol::raw_protocol (2 of 2 overloads)]
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- raw_protocol(
- const Protocol & source_protocol);
-
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[@c][bad\_cast Thrown if the source protocol is not raw-oriented. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:socket generic::raw_protocol::socket]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.socket..socket..generic::raw_protocol]
-The generic socket type.
-
-
- typedef basic_raw_socket< raw_protocol > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_raw_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_raw_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.basic_raw_socket [*basic_raw_socket]]]
- [Construct a basic_raw_socket without opening it.
-
- Construct and open a basic_raw_socket.
-
- Construct a basic_raw_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_raw_socket on an existing native socket.
-
- Move-construct a basic_raw_socket from another.
-
- Move-construct a basic_raw_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_raw_socket from another.
-
- Move-assign a basic_raw_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.receive_from [*receive_from]]]
- [Receive raw data with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.send_to [*send_to]]]
- [Send raw data to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket._basic_raw_socket [*~basic_raw_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_raw_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_raw_socket `basic_raw_socket`] class template provides asynchronous and blocking raw-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/raw_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type generic::raw_protocol::type]
-
-[indexterm2 asio.indexterm.generic__raw_protocol.type..type..generic::raw_protocol]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:generic__seq_packet_protocol generic::seq_packet_protocol]
-
-
-Encapsulates the flags needed for a generic sequenced packet socket.
-
-
- class seq_packet_protocol
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__seq_packet_protocol.endpoint [*endpoint]]]
- [The type of an endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__seq_packet_protocol.socket [*socket]]]
- [The generic socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__seq_packet_protocol.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.generic__seq_packet_protocol.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.generic__seq_packet_protocol.seq_packet_protocol [*seq_packet_protocol]]]
- [Construct a protocol object for a specific address family and protocol.
-
- Construct a generic protocol object from a specific protocol. ]
- ]
-
- [
- [[link asio.reference.generic__seq_packet_protocol.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__seq_packet_protocol.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__seq_packet_protocol.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.generic__seq_packet_protocol `generic::seq_packet_protocol`] class contains flags necessary for seq\_packet-oriented sockets of any address family and protocol.
-
-
-[heading Examples]
-
-Constructing using a native address family and socket protocol:
-
- seq_packet_protocol p(AF_INET, IPPROTO_SCTP);
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/seq_packet_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:endpoint generic::seq_packet_protocol::endpoint]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.endpoint..endpoint..generic::seq_packet_protocol]
-The type of an endpoint.
-
-
- typedef basic_endpoint< seq_packet_protocol > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint from the specified socket address.
-
- Construct an endpoint from the specific endpoint type.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-The [link asio.reference.generic__basic_endpoint `generic::basic_endpoint`] class template describes an endpoint that may be associated with any socket type.
-
-
-[heading Remarks]
-
-The socket types sockaddr type must be able to fit into a `sockaddr_storage` structure.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/seq_packet_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family generic::seq_packet_protocol::family]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.family..family..generic::seq_packet_protocol]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ generic::seq_packet_protocol::operator!=]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.operator_not__eq_..operator!=..generic::seq_packet_protocol]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const seq_packet_protocol & p1,
- const seq_packet_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/seq_packet_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ generic::seq_packet_protocol::operator==]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.operator_eq__eq_..operator==..generic::seq_packet_protocol]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const seq_packet_protocol & p1,
- const seq_packet_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/seq_packet_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol generic::seq_packet_protocol::protocol]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.protocol..protocol..generic::seq_packet_protocol]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-[section:seq_packet_protocol generic::seq_packet_protocol::seq_packet_protocol]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.seq_packet_protocol..seq_packet_protocol..generic::seq_packet_protocol]
-Construct a protocol object for a specific address family and protocol.
-
-
- ``[link asio.reference.generic__seq_packet_protocol.seq_packet_protocol.overload1 seq_packet_protocol]``(
- int address_family,
- int socket_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__seq_packet_protocol.seq_packet_protocol.overload1 more...]]``
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- ``[link asio.reference.generic__seq_packet_protocol.seq_packet_protocol.overload2 seq_packet_protocol]``(
- const Protocol & source_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__seq_packet_protocol.seq_packet_protocol.overload2 more...]]``
-
-
-[section:overload1 generic::seq_packet_protocol::seq_packet_protocol (1 of 2 overloads)]
-
-
-Construct a protocol object for a specific address family and protocol.
-
-
- seq_packet_protocol(
- int address_family,
- int socket_protocol);
-
-
-
-[endsect]
-
-
-
-[section:overload2 generic::seq_packet_protocol::seq_packet_protocol (2 of 2 overloads)]
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- seq_packet_protocol(
- const Protocol & source_protocol);
-
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[@c][bad\_cast Thrown if the source protocol is not based around sequenced packets. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:socket generic::seq_packet_protocol::socket]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.socket..socket..generic::seq_packet_protocol]
-The generic socket type.
-
-
- typedef basic_seq_packet_socket< seq_packet_protocol > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_seq_packet_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_seq_packet_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.basic_seq_packet_socket [*basic_seq_packet_socket]]]
- [Construct a basic_seq_packet_socket without opening it.
-
- Construct and open a basic_seq_packet_socket.
-
- Construct a basic_seq_packet_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_seq_packet_socket on an existing native socket.
-
- Move-construct a basic_seq_packet_socket from another.
-
- Move-construct a basic_seq_packet_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_seq_packet_socket from another.
-
- Move-assign a basic_seq_packet_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.receive [*receive]]]
- [Receive some data on the socket.
-
- Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.send [*send]]]
- [Send some data on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket._basic_seq_packet_socket [*~basic_seq_packet_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_seq_packet_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_seq_packet_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_seq_packet_socket `basic_seq_packet_socket`] class template provides asynchronous and blocking sequenced packet socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/seq_packet_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type generic::seq_packet_protocol::type]
-
-[indexterm2 asio.indexterm.generic__seq_packet_protocol.type..type..generic::seq_packet_protocol]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:generic__stream_protocol generic::stream_protocol]
-
-
-Encapsulates the flags needed for a generic stream-oriented socket.
-
-
- class stream_protocol
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__stream_protocol.endpoint [*endpoint]]]
- [The type of an endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__stream_protocol.iostream [*iostream]]]
- [The generic socket iostream type. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__stream_protocol.socket [*socket]]]
- [The generic socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__stream_protocol.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.generic__stream_protocol.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.generic__stream_protocol.stream_protocol [*stream_protocol]]]
- [Construct a protocol object for a specific address family and protocol.
-
- Construct a generic protocol object from a specific protocol. ]
- ]
-
- [
- [[link asio.reference.generic__stream_protocol.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__stream_protocol.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__stream_protocol.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.generic__stream_protocol `generic::stream_protocol`] class contains flags necessary for stream-oriented sockets of any address family and protocol.
-
-
-[heading Examples]
-
-Constructing using a native address family and socket protocol:
-
- stream_protocol p(AF_INET, IPPROTO_TCP);
-
-
-Constructing from a specific protocol type:
-
- stream_protocol p(asio::ip::tcp::v4());
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:endpoint generic::stream_protocol::endpoint]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.endpoint..endpoint..generic::stream_protocol]
-The type of an endpoint.
-
-
- typedef basic_endpoint< stream_protocol > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.generic__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint from the specified socket address.
-
- Construct an endpoint from the specific endpoint type.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.generic__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-The [link asio.reference.generic__basic_endpoint `generic::basic_endpoint`] class template describes an endpoint that may be associated with any socket type.
-
-
-[heading Remarks]
-
-The socket types sockaddr type must be able to fit into a `sockaddr_storage` structure.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family generic::stream_protocol::family]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.family..family..generic::stream_protocol]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:iostream generic::stream_protocol::iostream]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.iostream..iostream..generic::stream_protocol]
-The generic socket iostream type.
-
-
- typedef basic_socket_iostream< stream_protocol > iostream;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration [*duration]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration_type [*duration_type]]]
- [(Deprecated: Use duration.) The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_type [*time_type]]]
- [(Deprecated: Use time_point.) The time type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
- [Construct a basic_socket_iostream without establishing a connection.
-
- Construct a basic_socket_iostream from the supplied socket.
-
- Move-construct a basic_socket_iostream from another.
-
- Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.connect [*connect]]]
- [Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.error [*error]]]
- [Get the last error associated with the stream. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_after [*expires_after]]]
- [Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time as an absolute time.
-
- Set the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expiry [*expiry]]]
- [Get the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_iostream from another. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
- [Return a pointer to the underlying streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.socket [*socket]]]
- [Get a reference to the underlying socket. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ generic::stream_protocol::operator!=]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.operator_not__eq_..operator!=..generic::stream_protocol]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const stream_protocol & p1,
- const stream_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ generic::stream_protocol::operator==]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.operator_eq__eq_..operator==..generic::stream_protocol]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const stream_protocol & p1,
- const stream_protocol & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol generic::stream_protocol::protocol]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.protocol..protocol..generic::stream_protocol]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:socket generic::stream_protocol::socket]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.socket..socket..generic::stream_protocol]
-The generic socket type.
-
-
- typedef basic_stream_socket< stream_protocol > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_stream_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
- [Construct a basic_stream_socket without opening it.
-
- Construct and open a basic_stream_socket.
-
- Construct a basic_stream_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_stream_socket on an existing native socket.
-
- Move-construct a basic_stream_socket from another.
-
- Move-construct a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_stream_socket from another.
-
- Move-assign a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.read_some [*read_some]]]
- [Read some data from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.receive [*receive]]]
- [Receive some data on the socket.
-
- Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.send [*send]]]
- [Send some data on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.write_some [*write_some]]]
- [Write some data to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_stream_socket `basic_stream_socket`] class template provides asynchronous and blocking stream-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/generic/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:stream_protocol generic::stream_protocol::stream_protocol]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.stream_protocol..stream_protocol..generic::stream_protocol]
-Construct a protocol object for a specific address family and protocol.
-
-
- ``[link asio.reference.generic__stream_protocol.stream_protocol.overload1 stream_protocol]``(
- int address_family,
- int socket_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__stream_protocol.stream_protocol.overload1 more...]]``
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- ``[link asio.reference.generic__stream_protocol.stream_protocol.overload2 stream_protocol]``(
- const Protocol & source_protocol);
- `` [''''&raquo;''' [link asio.reference.generic__stream_protocol.stream_protocol.overload2 more...]]``
-
-
-[section:overload1 generic::stream_protocol::stream_protocol (1 of 2 overloads)]
-
-
-Construct a protocol object for a specific address family and protocol.
-
-
- stream_protocol(
- int address_family,
- int socket_protocol);
-
-
-
-[endsect]
-
-
-
-[section:overload2 generic::stream_protocol::stream_protocol (2 of 2 overloads)]
-
-
-Construct a generic protocol object from a specific protocol.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- stream_protocol(
- const Protocol & source_protocol);
-
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[@c][bad\_cast Thrown if the source protocol is not stream-oriented. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:type generic::stream_protocol::type]
-
-[indexterm2 asio.indexterm.generic__stream_protocol.type..type..generic::stream_protocol]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:get_associated_allocator get_associated_allocator]
-
-[indexterm1 asio.indexterm.get_associated_allocator..get_associated_allocator]
-Helper function to obtain an object's associated allocator.
-
-
- template<
- typename T>
- associated_allocator< T >::type ``[link asio.reference.get_associated_allocator.overload1 get_associated_allocator]``(
- const T & t);
- `` [''''&raquo;''' [link asio.reference.get_associated_allocator.overload1 more...]]``
-
- template<
- typename T,
- typename Allocator>
- associated_allocator< T, Allocator >::type ``[link asio.reference.get_associated_allocator.overload2 get_associated_allocator]``(
- const T & t,
- const Allocator & a);
- `` [''''&raquo;''' [link asio.reference.get_associated_allocator.overload2 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/associated_allocator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 get_associated_allocator (1 of 2 overloads)]
-
-
-Helper function to obtain an object's associated allocator.
-
-
- template<
- typename T>
- associated_allocator< T >::type get_associated_allocator(
- const T & t);
-
-
-
-[heading Return Value]
-
-`associated_allocator<T>::get(t)`
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 get_associated_allocator (2 of 2 overloads)]
-
-
-Helper function to obtain an object's associated allocator.
-
-
- template<
- typename T,
- typename Allocator>
- associated_allocator< T, Allocator >::type get_associated_allocator(
- const T & t,
- const Allocator & a);
-
-
-
-[heading Return Value]
-
-`associated_allocator<T, Allocator>::get(t, a)`
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:get_associated_executor get_associated_executor]
-
-[indexterm1 asio.indexterm.get_associated_executor..get_associated_executor]
-Helper function to obtain an object's associated executor.
-
-
- template<
- typename T>
- associated_executor< T >::type ``[link asio.reference.get_associated_executor.overload1 get_associated_executor]``(
- const T & t);
- `` [''''&raquo;''' [link asio.reference.get_associated_executor.overload1 more...]]``
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]``>
- associated_executor< T, Executor >::type ``[link asio.reference.get_associated_executor.overload2 get_associated_executor]``(
- const T & t,
- const Executor & ex,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.get_associated_executor.overload2 more...]]``
-
- template<
- typename T,
- typename ExecutionContext>
- associated_executor< T, typename ExecutionContext::executor_type >::type ``[link asio.reference.get_associated_executor.overload3 get_associated_executor]``(
- const T & t,
- ExecutionContext & ctx,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.get_associated_executor.overload3 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/associated_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 get_associated_executor (1 of 3 overloads)]
-
-
-Helper function to obtain an object's associated executor.
-
-
- template<
- typename T>
- associated_executor< T >::type get_associated_executor(
- const T & t);
-
-
-
-[heading Return Value]
-
-`associated_executor<T>::get(t)`
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 get_associated_executor (2 of 3 overloads)]
-
-
-Helper function to obtain an object's associated executor.
-
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]``>
- associated_executor< T, Executor >::type get_associated_executor(
- const T & t,
- const Executor & ex,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-
-[heading Return Value]
-
-`associated_executor<T, Executor>::get(t, ex)`
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 get_associated_executor (3 of 3 overloads)]
-
-
-Helper function to obtain an object's associated executor.
-
-
- template<
- typename T,
- typename ExecutionContext>
- associated_executor< T, typename ExecutionContext::executor_type >::type get_associated_executor(
- const T & t,
- ExecutionContext & ctx,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-
-[heading Return Value]
-
-`associated_executor<T, typename ExecutionContext::executor_type>get(t, ctx.get_executor())`
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:handler_type handler_type]
-
-
-(Deprecated: Use two-parameter version of [link asio.reference.async_result `async_result`].) Default handler type traits provided for all completion token types.
-
-
- template<
- typename CompletionToken,
- typename Signature,
- typename = void>
- struct handler_type
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.handler_type.type [*type]]]
- [The handler type for the specific signature. ]
-
- ]
-
-]
-
-The [link asio.reference.handler_type `handler_type`] traits class is used for determining the concrete handler type to be used for an asynchronous operation. It allows the handler type to be determined at the point where the specific completion handler signature is known.
-
-This template may be specialised for user-defined completion token types.
-
-[heading Requirements]
-
-['Header: ][^asio/handler_type.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:type handler_type::type]
-
-[indexterm2 asio.indexterm.handler_type.type..type..handler_type]
-The handler type for the specific signature.
-
-
- typedef conditional< is_same< CompletionToken, typename decay< CompletionToken >::type >::value, decay< CompletionToken >, handler_type< typename decay< CompletionToken >::type, Signature > >::type::type type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/handler_type.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:has_service has_service]
-
-[indexterm1 asio.indexterm.has_service..has_service]
-
- template<
- typename ``[link asio.reference.Service Service]``>
- bool has_service(
- execution_context & e);
-
-
-This function is used to determine whether the [link asio.reference.execution_context `execution_context`] contains a service object corresponding to the given service type.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-A boolean indicating whether the [link asio.reference.execution_context `execution_context`] contains the service.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/impl/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:high_resolution_timer high_resolution_timer]
-
-[indexterm1 asio.indexterm.high_resolution_timer..high_resolution_timer]
-Typedef for a timer based on the high resolution clock.
-
-
- typedef basic_waitable_timer< chrono::high_resolution_clock > high_resolution_timer;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_waitable_timer.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.duration [*duration]]]
- [The duration type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
- [The time point type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.traits_type [*traits_type]]]
- [The wait traits type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_waitable_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.basic_waitable_timer [*basic_waitable_timer]]]
- [Constructor.
-
- Constructor to set a particular expiry time as an absolute time.
-
- Constructor to set a particular expiry time relative to now.
-
- Move-construct a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
- [Cancels one asynchronous operation that is waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_after [*expires_after]]]
- [Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time.
-
- Set the timer's expiry time as an absolute time.
-
- (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expiry [*expiry]]]
- [Get the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.operator_eq_ [*operator=]]]
- [Move-assign a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
- [Destroys the timer. ]
- ]
-
-]
-
-The [link asio.reference.basic_waitable_timer `basic_waitable_timer`] class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
-
-A waitable 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 one of the [link asio.reference.steady_timer `steady_timer`], [link asio.reference.system_timer `system_timer`] or [link asio.reference.high_resolution_timer `high_resolution_timer`] typedefs.
-
-
-[heading Remarks]
-
-This waitable timer functionality is for use with the C++11 standard library's `<chrono>` facility, or with the Boost.Chrono library.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Examples]
-
-Performing a blocking wait (C++11):
-
- // Construct a timer without setting an expiry time.
- asio::steady_timer timer(io_context);
-
- // Set an expiry time relative to now.
- timer.expires_after(std::chrono::seconds(5));
-
- // Wait for the timer to expire.
- timer.wait();
-
-
-
-
-
-Performing an asynchronous wait (C++11):
-
- void handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
-
- ...
-
- // Construct a timer with an absolute expiry time.
- asio::steady_timer timer(io_context,
- std::chrono::steady_clock::now() + std::chrono::seconds(60));
-
- // Start an asynchronous wait.
- timer.async_wait(handler);
-
-
-
-
-
-[heading Changing an active waitable 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:
-
-
-
- void on_some_event()
- {
- if (my_timer.expires_after(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 asio::error_code& e)
- {
- if (e != asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
-
-
-
-
-
-* The `asio::basic_waitable_timer::expires_after()` 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.
-
-
-* If a wait handler is cancelled, the [link asio.reference.error_code `error_code`] passed to it contains the value `asio::error::operation_aborted`.
-
-
-
-
-This typedef uses the C++11 `<chrono>` standard library facility, if available. Otherwise, it may use the Boost.Chrono library. To explicitly utilise Boost.Chrono, use the [link asio.reference.basic_waitable_timer `basic_waitable_timer`] template directly:
-
- typedef basic_waitable_timer<boost::chrono::high_resolution_clock> timer;
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/high_resolution_timer.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-[section:invalid_service_owner invalid_service_owner]
-
-
-Exception thrown when trying to add a service object to an [link asio.reference.execution_context `execution_context`] where the service has a different owner.
-
-
- class invalid_service_owner
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.invalid_service_owner.invalid_service_owner [*invalid_service_owner]]]
- []
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:invalid_service_owner invalid_service_owner::invalid_service_owner]
-
-[indexterm2 asio.indexterm.invalid_service_owner.invalid_service_owner..invalid_service_owner..invalid_service_owner]
-
- invalid_service_owner();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:io_context io_context]
-
-
-Provides core I/O functionality.
-
-
- class io_context :
- public execution_context
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.io_context__executor_type [*executor_type]]]
- [Executor used to submit functions to an io_context. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context__service [*service]]]
- [Base class for all io_context services. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context__strand [*strand]]]
- [Provides serialised handler execution. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context__work [*work]]]
- [(Deprecated: Use executor_work_guard.) Class to inform the io_context when it has work to do. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context.count_type [*count_type]]]
- [The type used to count the number of handlers executed by the context. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context.fork_event [*fork_event]]]
- [Fork-related event notifications. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context.dispatch [*dispatch]]]
- [(Deprecated: Use asio::dispatch().) Request the io_context to invoke the given handler. ]
- ]
-
- [
- [[link asio.reference.io_context.get_executor [*get_executor]]]
- [Obtains the executor associated with the io_context. ]
- ]
-
- [
- [[link asio.reference.io_context.io_context [*io_context]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.io_context.notify_fork [*notify_fork]]]
- [Notify the execution_context of a fork-related event. ]
- ]
-
- [
- [[link asio.reference.io_context.poll [*poll]]]
- [Run the io_context object's event processing loop to execute ready handlers.
-
- (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute ready handlers. ]
- ]
-
- [
- [[link asio.reference.io_context.poll_one [*poll_one]]]
- [Run the io_context object's event processing loop to execute one ready handler.
-
- (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute one ready handler. ]
- ]
-
- [
- [[link asio.reference.io_context.post [*post]]]
- [(Deprecated: Use asio::post().) Request the io_context to invoke the given handler and return immediately. ]
- ]
-
- [
- [[link asio.reference.io_context.reset [*reset]]]
- [(Deprecated: Use restart().) Reset the io_context in preparation for a subsequent run() invocation. ]
- ]
-
- [
- [[link asio.reference.io_context.restart [*restart]]]
- [Restart the io_context in preparation for a subsequent run() invocation. ]
- ]
-
- [
- [[link asio.reference.io_context.run [*run]]]
- [Run the io_context object's event processing loop.
-
- (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop. ]
- ]
-
- [
- [[link asio.reference.io_context.run_for [*run_for]]]
- [Run the io_context object's event processing loop for a specified duration. ]
- ]
-
- [
- [[link asio.reference.io_context.run_one [*run_one]]]
- [Run the io_context object's event processing loop to execute at most one handler.
-
- (Deprecated: Use non-error_code overlaod.) Run the io_context object's event processing loop to execute at most one handler. ]
- ]
-
- [
- [[link asio.reference.io_context.run_one_for [*run_one_for]]]
- [Run the io_context object's event processing loop for a specified duration to execute at most one handler. ]
- ]
-
- [
- [[link asio.reference.io_context.run_one_until [*run_one_until]]]
- [Run the io_context object's event processing loop until a specified time to execute at most one handler. ]
- ]
-
- [
- [[link asio.reference.io_context.run_until [*run_until]]]
- [Run the io_context object's event processing loop until a specified time. ]
- ]
-
- [
- [[link asio.reference.io_context.stop [*stop]]]
- [Stop the io_context object's event processing loop. ]
- ]
-
- [
- [[link asio.reference.io_context.stopped [*stopped]]]
- [Determine whether the io_context object has been stopped. ]
- ]
-
- [
- [[link asio.reference.io_context.wrap [*wrap]]]
- [(Deprecated: Use asio::bind_executor().) Create a new handler that automatically dispatches the wrapped handler on the io_context. ]
- ]
-
- [
- [[link asio.reference.io_context._io_context [*~io_context]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context.destroy [*destroy]]]
- [Destroys all services in the context. ]
- ]
-
- [
- [[link asio.reference.io_context.shutdown [*shutdown]]]
- [Shuts down all services in the context. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context.add_service [*add_service]]]
- [(Deprecated: Use make_service().) Add a service object to the execution_context. ]
- ]
-
- [
- [[link asio.reference.io_context.has_service [*has_service]]]
- [Determine if an execution_context contains a specified service type. ]
- ]
-
- [
- [[link asio.reference.io_context.make_service [*make_service]]]
- [Creates a service object and adds it to the execution_context. ]
- ]
-
- [
- [[link asio.reference.io_context.use_service [*use_service]]]
- [
-
- Obtain the service object corresponding to the given type. ]
- ]
-
-]
-
-The [link asio.reference.io_context `io_context`] class provides the core I/O functionality for users of the asynchronous I/O objects, including:
-
-
-* `asio::ip::tcp::socket`
-
-* `asio::ip::tcp::acceptor`
-
-* `asio::ip::udp::socket`
-
-* [link asio.reference.deadline_timer `deadline_timer`].
-
-The [link asio.reference.io_context `io_context`] class also includes facilities intended for developers of custom asynchronous services.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe, with the specific exceptions of the `restart()` and `notify_fork()` functions. Calling `restart()` while there are unfinished `run()`, `run_one()`, `poll()` or `poll_one()` calls results in undefined behaviour. The `notify_fork()` function should not be called while any [link asio.reference.io_context `io_context`] function, or any function on an I/O object that is associated with the [link asio.reference.io_context `io_context`], is being called in another thread.
-
-
-
-[heading Synchronous and asynchronous operations]
-
-
-
-Synchronous operations on I/O objects implicitly run the [link asio.reference.io_context `io_context`] object for an individual operation. The [link asio.reference.io_context `io_context`] functions `run()`, `run_one()`, `poll()` or `poll_one()` must be called for the [link asio.reference.io_context `io_context`] to perform asynchronous operations on behalf of a C++ program. Notification that an asynchronous operation has completed is delivered by invocation of the associated handler. Handlers are invoked only by a thread that is currently calling any overload of `run()`, `run_one()`, `poll()` or `poll_one()` for the [link asio.reference.io_context `io_context`].
-
-
-[heading Effect of exceptions thrown from handlers]
-
-
-
-If an exception is thrown from a handler, the exception is allowed to propagate through the throwing thread's invocation of `run()`, `run_one()`, `poll()` or `poll_one()`. No other threads that are calling any of these functions are affected. It is then the responsibility of the application to catch the exception.
-
-After the exception has been caught, the `run()`, `run_one()`, `poll()` or `poll_one()` call may be restarted ['without] the need for an intervening call to `restart()`. This allows the thread to rejoin the [link asio.reference.io_context `io_context`] object's thread pool without impacting any other threads in the pool.
-
-For example:
-
-
-
- asio::io_context io_context;
- ...
- for (;;)
- {
- try
- {
- io_context.run();
- break; // run() exited normally
- }
- catch (my_exception& e)
- {
- // Deal with exception as appropriate.
- }
- }
-
-
-
-
-
-[heading Stopping the io_context from running out of work]
-
-
-
-Some applications may need to prevent an [link asio.reference.io_context `io_context`] object's `run()` call from returning when there is no more work to do. For example, the [link asio.reference.io_context `io_context`] may be being run in a background thread that is launched prior to the application's asynchronous operations. The `run()` call may be kept running by creating an object of type asio::executor\_work\_guard<io\_context::executor\_type>:
-
-
-
- asio::io_context io_context;
- asio::executor_work_guard<asio::io_context::executor_type>
- = asio::make_work_guard(io_context);
- ...
-
-
-
-
-To effect a shutdown, the application will then need to call the [link asio.reference.io_context `io_context`] object's `stop()` member function. This will cause the [link asio.reference.io_context `io_context`] `run()` call to return as soon as possible, abandoning unfinished operations and without permitting ready handlers to be dispatched.
-
-Alternatively, if the application requires that all operations and handlers be allowed to finish normally, the work object may be explicitly reset.
-
-
-
- asio::io_context io_context;
- asio::executor_work_guard<asio::io_context::executor_type>
- = asio::make_work_guard(io_context);
- ...
- work.reset(); // Allow run() to exit.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:add_service io_context::add_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.add_service..add_service..io_context]
-(Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`].
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend void add_service(
- execution_context & e,
- Service * svc);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[svc][The service object. On success, ownership of the service object is transferred to the [link asio.reference.execution_context `execution_context`]. When the [link asio.reference.execution_context `execution_context`] object is destroyed, it will destroy the service object by performing:
-``
- delete static_cast<execution_context::service*>(svc)
-``
-]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`].]]
-
-[[asio::invalid_service_owner][Thrown if the service's owning [link asio.reference.execution_context `execution_context`] is not the [link asio.reference.execution_context `execution_context`] object specified by the `e` parameter. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:count_type io_context::count_type]
-
-[indexterm2 asio.indexterm.io_context.count_type..count_type..io_context]
-The type used to count the number of handlers executed by the context.
-
-
- typedef std::size_t count_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:destroy io_context::destroy]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.destroy..destroy..io_context]
-Destroys all services in the context.
-
-
- void destroy();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order * of the beginning of service object lifetime, performs `delete static_cast<execution_context::service*>(svc)`.
-
-
-
-
-[endsect]
-
-
-
-[section:dispatch io_context::dispatch]
-
-[indexterm2 asio.indexterm.io_context.dispatch..dispatch..io_context]
-(Deprecated: Use [link asio.reference.dispatch `dispatch`].) Request the [link asio.reference.io_context `io_context`] to invoke the given handler.
-
-
- template<
- typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
- CompletionHandler && handler);
-
-
-This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given handler.
-
-The [link asio.reference.io_context `io_context`] guarantees that the handler will only be called in a thread in which the `run()`, `run_one()`, `poll()` or `poll_one()` member functions is currently being invoked. The handler may be executed inside this function if the guarantee can be met.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called. The [link asio.reference.io_context `io_context`] will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
-``
-]]
-
-]
-
-
-[heading Remarks]
-
-This function throws an exception only if:
-
-
-* the handler's `asio_handler_allocate` function; or
-
-
-* the handler's copy constructor
-
-throws an exception.
-
-
-[endsect]
-
-
-
-[section:fork_event io_context::fork_event]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.fork_event..fork_event..io_context]
-Fork-related event notifications.
-
-
- enum fork_event
-
-[indexterm2 asio.indexterm.io_context.fork_event.fork_prepare..fork_prepare..io_context]
-[indexterm2 asio.indexterm.io_context.fork_event.fork_parent..fork_parent..io_context]
-[indexterm2 asio.indexterm.io_context.fork_event.fork_child..fork_child..io_context]
-
-[heading Values]
-[variablelist
-
- [
- [fork_prepare]
- [Notify the context that the process is about to fork. ]
- ]
-
- [
- [fork_parent]
- [Notify the context that the process has forked and is the parent. ]
- ]
-
- [
- [fork_child]
- [Notify the context that the process has forked and is the child. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:get_executor io_context::get_executor]
-
-[indexterm2 asio.indexterm.io_context.get_executor..get_executor..io_context]
-Obtains the executor associated with the [link asio.reference.io_context `io_context`].
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:has_service io_context::has_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.has_service..has_service..io_context]
-Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend bool has_service(
- execution_context & e);
-
-
-This function is used to determine whether the [link asio.reference.execution_context `execution_context`] contains a service object corresponding to the given service type.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-A boolean indicating whether the [link asio.reference.execution_context `execution_context`] contains the service.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:io_context io_context::io_context]
-
-[indexterm2 asio.indexterm.io_context.io_context..io_context..io_context]
-Constructor.
-
-
- ``[link asio.reference.io_context.io_context.overload1 io_context]``();
- `` [''''&raquo;''' [link asio.reference.io_context.io_context.overload1 more...]]``
-
- explicit ``[link asio.reference.io_context.io_context.overload2 io_context]``(
- int concurrency_hint);
- `` [''''&raquo;''' [link asio.reference.io_context.io_context.overload2 more...]]``
-
-
-[section:overload1 io_context::io_context (1 of 2 overloads)]
-
-
-Constructor.
-
-
- io_context();
-
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::io_context (2 of 2 overloads)]
-
-
-Constructor.
-
-
- io_context(
- int concurrency_hint);
-
-
-Construct with a hint about the required level of concurrency.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[concurrency_hint][A suggestion to the implementation on how many threads it should allow to run simultaneously. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:make_service io_context::make_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.make_service..make_service..io_context]
-Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`].
-
-
- template<
- typename ``[link asio.reference.Service Service]``,
- typename... Args>
- friend Service & make_service(
- execution_context & e,
- Args &&... args);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[args][Zero or more arguments to be passed to the service constructor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`]. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:notify_fork io_context::notify_fork]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.notify_fork..notify_fork..io_context]
-Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event.
-
-
- void notify_fork(
- fork_event event);
-
-
-This function is used to inform the [link asio.reference.execution_context `execution_context`] that the process is about to fork, or has just forked. This allows the [link asio.reference.execution_context `execution_context`], and the services it contains, to perform any necessary housekeeping to ensure correct operation following a fork.
-
-This function must not be called while any other [link asio.reference.execution_context `execution_context`] function, or any function associated with the execution\_context's derived class, is being called in another thread. It is, however, safe to call this function from within a completion handler, provided no other thread is accessing the [link asio.reference.execution_context `execution_context`] or its derived class.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[event][A fork-related event.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the notification fails the [link asio.reference.execution_context `execution_context`] object should no longer be used and should be destroyed.]]
-
-]
-
-
-[heading Example]
-
-The following code illustrates how to incorporate the `notify_fork()` function:
-
- my_execution_context.notify_fork(execution_context::fork_prepare);
- if (fork() == 0)
- {
- // This is the child process.
- my_execution_context.notify_fork(execution_context::fork_child);
- }
- else
- {
- // This is the parent process.
- my_execution_context.notify_fork(execution_context::fork_parent);
- }
-
-
-
-
-
-[heading Remarks]
-
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->notify_fork();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime.
-
-
-
-
-[endsect]
-
-
-[section:poll io_context::poll]
-
-[indexterm2 asio.indexterm.io_context.poll..poll..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers.
-
-
- count_type ``[link asio.reference.io_context.poll.overload1 poll]``();
- `` [''''&raquo;''' [link asio.reference.io_context.poll.overload1 more...]]``
-
-
-(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers.
-
-
- count_type ``[link asio.reference.io_context.poll.overload2 poll]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.io_context.poll.overload2 more...]]``
-
-
-[section:overload1 io_context::poll (1 of 2 overloads)]
-
-
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers.
-
-
- count_type poll();
-
-
-The `poll()` function runs handlers that are ready to run, without blocking, until the [link asio.reference.io_context `io_context`] has been stopped or there are no more ready handlers.
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::poll (2 of 2 overloads)]
-
-
-(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute ready handlers.
-
-
- count_type poll(
- asio::error_code & ec);
-
-
-The `poll()` function runs handlers that are ready to run, without blocking, until the [link asio.reference.io_context `io_context`] has been stopped or there are no more ready handlers.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:poll_one io_context::poll_one]
-
-[indexterm2 asio.indexterm.io_context.poll_one..poll_one..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler.
-
-
- count_type ``[link asio.reference.io_context.poll_one.overload1 poll_one]``();
- `` [''''&raquo;''' [link asio.reference.io_context.poll_one.overload1 more...]]``
-
-
-(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler.
-
-
- count_type ``[link asio.reference.io_context.poll_one.overload2 poll_one]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.io_context.poll_one.overload2 more...]]``
-
-
-[section:overload1 io_context::poll_one (1 of 2 overloads)]
-
-
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler.
-
-
- count_type poll_one();
-
-
-The `poll_one()` function runs at most one handler that is ready to run, without blocking.
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::poll_one (2 of 2 overloads)]
-
-
-(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute one ready handler.
-
-
- count_type poll_one(
- asio::error_code & ec);
-
-
-The `poll_one()` function runs at most one handler that is ready to run, without blocking.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:post io_context::post]
-
-[indexterm2 asio.indexterm.io_context.post..post..io_context]
-(Deprecated: Use [link asio.reference.post `post`].) Request the [link asio.reference.io_context `io_context`] to invoke the given handler and return immediately.
-
-
- template<
- typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
- CompletionHandler && handler);
-
-
-This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given handler, but without allowing the [link asio.reference.io_context `io_context`] to call the handler from inside this function.
-
-The [link asio.reference.io_context `io_context`] guarantees that the handler will only be called in a thread in which the `run()`, `run_one()`, `poll()` or `poll_one()` member functions is currently being invoked.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called. The [link asio.reference.io_context `io_context`] will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
-``
-]]
-
-]
-
-
-[heading Remarks]
-
-This function throws an exception only if:
-
-
-* the handler's `asio_handler_allocate` function; or
-
-
-* the handler's copy constructor
-
-throws an exception.
-
-
-[endsect]
-
-
-
-[section:reset io_context::reset]
-
-[indexterm2 asio.indexterm.io_context.reset..reset..io_context]
-(Deprecated: Use `restart()`.) Reset the [link asio.reference.io_context `io_context`] in preparation for a subsequent `run()` invocation.
-
-
- void reset();
-
-
-This function must be called prior to any second or later set of invocations of the `run()`, `run_one()`, `poll()` or `poll_one()` functions when a previous invocation of these functions returned due to the [link asio.reference.io_context `io_context`] being stopped or running out of work. After a call to `restart()`, the [link asio.reference.io_context `io_context`] object's `stopped()` function will return `false`.
-
-This function must not be called while there are any unfinished calls to the `run()`, `run_one()`, `poll()` or `poll_one()` functions.
-
-
-[endsect]
-
-
-
-[section:restart io_context::restart]
-
-[indexterm2 asio.indexterm.io_context.restart..restart..io_context]
-Restart the [link asio.reference.io_context `io_context`] in preparation for a subsequent `run()` invocation.
-
-
- void restart();
-
-
-This function must be called prior to any second or later set of invocations of the `run()`, `run_one()`, `poll()` or `poll_one()` functions when a previous invocation of these functions returned due to the [link asio.reference.io_context `io_context`] being stopped or running out of work. After a call to `restart()`, the [link asio.reference.io_context `io_context`] object's `stopped()` function will return `false`.
-
-This function must not be called while there are any unfinished calls to the `run()`, `run_one()`, `poll()` or `poll_one()` functions.
-
-
-[endsect]
-
-
-[section:run io_context::run]
-
-[indexterm2 asio.indexterm.io_context.run..run..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop.
-
-
- count_type ``[link asio.reference.io_context.run.overload1 run]``();
- `` [''''&raquo;''' [link asio.reference.io_context.run.overload1 more...]]``
-
-
-(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop.
-
-
- count_type ``[link asio.reference.io_context.run.overload2 run]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.io_context.run.overload2 more...]]``
-
-
-[section:overload1 io_context::run (1 of 2 overloads)]
-
-
-Run the [link asio.reference.io_context `io_context`] object's event processing loop.
-
-
- count_type run();
-
-
-The `run()` function blocks until all work has finished and there are no more handlers to be dispatched, or until the [link asio.reference.io_context `io_context`] has been stopped.
-
-Multiple threads may call the `run()` function to set up a pool of threads from which the [link asio.reference.io_context `io_context`] may execute handlers. All threads that are waiting in the pool are equivalent and the [link asio.reference.io_context `io_context`] may choose any one of them to invoke a handler.
-
-A normal exit from the `run()` function implies that the [link asio.reference.io_context `io_context`] object is stopped (the `stopped()` function returns `true`). Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately unless there is a prior call to `restart()`.
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-[heading Remarks]
-
-The `run()` function must not be called from a thread that is currently calling one of `run()`, `run_one()`, `poll()` or `poll_one()` on the same [link asio.reference.io_context `io_context`] object.
-
-The `poll()` function may also be used to dispatch ready handlers, but without blocking.
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::run (2 of 2 overloads)]
-
-
-(Deprecated: Use non-error\_code overload.) Run the [link asio.reference.io_context `io_context`] object's event processing loop.
-
-
- count_type run(
- asio::error_code & ec);
-
-
-The `run()` function blocks until all work has finished and there are no more handlers to be dispatched, or until the [link asio.reference.io_context `io_context`] has been stopped.
-
-Multiple threads may call the `run()` function to set up a pool of threads from which the [link asio.reference.io_context `io_context`] may execute handlers. All threads that are waiting in the pool are equivalent and the [link asio.reference.io_context `io_context`] may choose any one of them to invoke a handler.
-
-A normal exit from the `run()` function implies that the [link asio.reference.io_context `io_context`] object is stopped (the `stopped()` function returns `true`). Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately unless there is a prior call to `restart()`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-[heading Remarks]
-
-The `run()` function must not be called from a thread that is currently calling one of `run()`, `run_one()`, `poll()` or `poll_one()` on the same [link asio.reference.io_context `io_context`] object.
-
-The `poll()` function may also be used to dispatch ready handlers, but without blocking.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:run_for io_context::run_for]
-
-[indexterm2 asio.indexterm.io_context.run_for..run_for..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop for a specified duration.
-
-
- template<
- typename Rep,
- typename Period>
- std::size_t run_for(
- const chrono::duration< Rep, Period > & rel_time);
-
-
-The `run_for()` function blocks until all work has finished and there are no more handlers to be dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified duration has elapsed.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[rel_time][The duration for which the call may block.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-[section:run_one io_context::run_one]
-
-[indexterm2 asio.indexterm.io_context.run_one..run_one..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler.
-
-
- count_type ``[link asio.reference.io_context.run_one.overload1 run_one]``();
- `` [''''&raquo;''' [link asio.reference.io_context.run_one.overload1 more...]]``
-
-
-(Deprecated: Use non-error\_code overlaod.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler.
-
-
- count_type ``[link asio.reference.io_context.run_one.overload2 run_one]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.io_context.run_one.overload2 more...]]``
-
-
-[section:overload1 io_context::run_one (1 of 2 overloads)]
-
-
-Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler.
-
-
- count_type run_one();
-
-
-The `run_one()` function blocks until one handler has been dispatched, or until the [link asio.reference.io_context `io_context`] has been stopped.
-
-
-[heading Return Value]
-
-The number of handlers that were executed. A zero return value implies that the [link asio.reference.io_context `io_context`] object is stopped (the `stopped()` function returns `true`). Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately unless there is a prior call to `restart()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::run_one (2 of 2 overloads)]
-
-
-(Deprecated: Use non-error\_code overlaod.) Run the [link asio.reference.io_context `io_context`] object's event processing loop to execute at most one handler.
-
-
- count_type run_one(
- asio::error_code & ec);
-
-
-The `run_one()` function blocks until one handler has been dispatched, or until the [link asio.reference.io_context `io_context`] has been stopped.
-
-
-[heading Return Value]
-
-The number of handlers that were executed. A zero return value implies that the [link asio.reference.io_context `io_context`] object is stopped (the `stopped()` function returns `true`). Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately unless there is a prior call to `restart()`.
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:run_one_for io_context::run_one_for]
-
-[indexterm2 asio.indexterm.io_context.run_one_for..run_one_for..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop for a specified duration to execute at most one handler.
-
-
- template<
- typename Rep,
- typename Period>
- std::size_t run_one_for(
- const chrono::duration< Rep, Period > & rel_time);
-
-
-The `run_one_for()` function blocks until one handler has been dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified duration has elapsed.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[rel_time][The duration for which the call may block.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-
-[section:run_one_until io_context::run_one_until]
-
-[indexterm2 asio.indexterm.io_context.run_one_until..run_one_until..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop until a specified time to execute at most one handler.
-
-
- template<
- typename Clock,
- typename Duration>
- std::size_t run_one_until(
- const chrono::time_point< Clock, Duration > & abs_time);
-
-
-The `run_one_until()` function blocks until one handler has been dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified time has been reached.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[abs_time][The time point until which the call may block.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-
-[section:run_until io_context::run_until]
-
-[indexterm2 asio.indexterm.io_context.run_until..run_until..io_context]
-Run the [link asio.reference.io_context `io_context`] object's event processing loop until a specified time.
-
-
- template<
- typename Clock,
- typename Duration>
- std::size_t run_until(
- const chrono::time_point< Clock, Duration > & abs_time);
-
-
-The `run_until()` function blocks until all work has finished and there are no more handlers to be dispatched, until the [link asio.reference.io_context `io_context`] has been stopped, or until the specified time has been reached.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[abs_time][The time point until which the call may block.]]
-
-]
-
-
-[heading Return Value]
-
-The number of handlers that were executed.
-
-
-
-
-[endsect]
-
-
-
-[section:shutdown io_context::shutdown]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.io_context.shutdown..shutdown..io_context]
-Shuts down all services in the context.
-
-
- void shutdown();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`.
-
-
-
-
-[endsect]
-
-
-
-[section:stop io_context::stop]
-
-[indexterm2 asio.indexterm.io_context.stop..stop..io_context]
-Stop the [link asio.reference.io_context `io_context`] object's event processing loop.
-
-
- void stop();
-
-
-This function does not block, but instead simply signals the [link asio.reference.io_context `io_context`] to stop. All invocations of its `run()` or `run_one()` member functions should return as soon as possible. Subsequent calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately until `restart()` is called.
-
-
-[endsect]
-
-
-
-[section:stopped io_context::stopped]
-
-[indexterm2 asio.indexterm.io_context.stopped..stopped..io_context]
-Determine whether the [link asio.reference.io_context `io_context`] object has been stopped.
-
-
- bool stopped() const;
-
-
-This function is used to determine whether an [link asio.reference.io_context `io_context`] object has been stopped, either through an explicit call to `stop()`, or due to running out of work. When an [link asio.reference.io_context `io_context`] object is stopped, calls to `run()`, `run_one()`, `poll()` or `poll_one()` will return immediately without invoking any handlers.
-
-
-[heading Return Value]
-
-`true` if the [link asio.reference.io_context `io_context`] object is stopped, otherwise `false`.
-
-
-
-
-[endsect]
-
-
-[section:use_service io_context::use_service]
-
-[indexterm2 asio.indexterm.io_context.use_service..use_service..io_context]
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & ``[link asio.reference.io_context.use_service.overload1 use_service]``(
- io_context & ioc);
- `` [''''&raquo;''' [link asio.reference.io_context.use_service.overload1 more...]]``
-
-
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & ``[link asio.reference.io_context.use_service.overload2 use_service]``(
- execution_context & e);
- `` [''''&raquo;''' [link asio.reference.io_context.use_service.overload2 more...]]``
-
-
-[section:overload1 io_context::use_service (1 of 2 overloads)]
-
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & use_service(
- io_context & ioc);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.io_context `io_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ioc][The [link asio.reference.io_context `io_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-[heading Remarks]
-
-This overload is preserved for backwards compatibility with services that inherit from [link asio.reference.io_context__service `io_context::service`].
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::use_service (2 of 2 overloads)]
-
-
-['Inherited from execution_context.]
-
-
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & use_service(
- execution_context & e);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.execution_context `execution_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wrap io_context::wrap]
-
-[indexterm2 asio.indexterm.io_context.wrap..wrap..io_context]
-(Deprecated: Use [link asio.reference.bind_executor `bind_executor`].) Create a new handler that automatically dispatches the wrapped handler on the [link asio.reference.io_context `io_context`].
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- unspecified wrap(
- Handler handler);
-
-
-This function is used to create a new handler function object that, when invoked, will automatically pass the wrapped handler to the [link asio.reference.io_context `io_context`] object's dispatch function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be wrapped. The [link asio.reference.io_context `io_context`] will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler(A1 a1, ... An an);
-``
-]]
-
-]
-
-
-[heading Return Value]
-
-A function object that, when invoked, passes the wrapped handler to the [link asio.reference.io_context `io_context`] object's dispatch function. Given a function object with the signature:
-
- R f(A1 a1, ... An an);
-
-
-If this function object is passed to the wrap function like so:
-
- io_context.wrap(f);
-
-
-then the return value is a function object with the signature
-
- void g(A1 a1, ... An an);
-
-
-that, when invoked, executes code equivalent to:
-
- io_context.dispatch(boost::bind(f, a1, ... an));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:_io_context io_context::~io_context]
-
-[indexterm2 asio.indexterm.io_context._io_context..~io_context..io_context]
-Destructor.
-
-
- ~io_context();
-
-
-On destruction, the [link asio.reference.io_context `io_context`] performs the following sequence of operations:
-
-
-* For each service object `svc` in the [link asio.reference.io_context `io_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`.
-
-
-* Uninvoked handler objects that were scheduled for deferred invocation on the [link asio.reference.io_context `io_context`], or any associated strand, are destroyed.
-
-
-* For each service object `svc` in the [link asio.reference.io_context `io_context`] set, in reverse order of the beginning of service object lifetime, performs `delete static_cast<io_context::service*>(svc)`.
-
-
-[heading Remarks]
-
-The destruction sequence described above permits programs to simplify their resource management by using `shared_ptr<>`. Where an object's lifetime is tied to the lifetime of a connection (or some other sequence of asynchronous operations), a `shared_ptr` to the object would be bound into the handlers for all asynchronous operations associated with it. This works as follows:
-
-
-* When a single connection ends, all associated asynchronous operations complete. The corresponding handler objects are destroyed, and all `shared_ptr` references to the objects are destroyed.
-
-
-* To shut down the whole program, the [link asio.reference.io_context `io_context`] function `stop()` is called to terminate any `run()` calls as soon as possible. The [link asio.reference.io_context `io_context`] destructor defined above destroys all handlers, causing all `shared_ptr` references to all connection objects to be destroyed.
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:io_context__executor_type io_context::executor_type]
-
-
-Executor used to submit functions to an [link asio.reference.io_context `io_context`].
-
-
- class executor_type
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context io_context::executor_type::context]
-
-[indexterm2 asio.indexterm.io_context__executor_type.context..context..io_context::executor_type]
-Obtain the underlying execution context.
-
-
- io_context & context() const;
-
-
-
-[endsect]
-
-
-
-[section:defer io_context::executor_type::defer]
-
-[indexterm2 asio.indexterm.io_context__executor_type.defer..defer..io_context::executor_type]
-Request the [link asio.reference.io_context `io_context`] to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void defer(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given function object. The function object will never be executed inside `defer()`. Instead, it will be scheduled to run on the [link asio.reference.io_context `io_context`].
-
-If the current thread belongs to the [link asio.reference.io_context `io_context`], `defer()` will delay scheduling the function object until the current thread returns control to the pool.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:dispatch io_context::executor_type::dispatch]
-
-[indexterm2 asio.indexterm.io_context__executor_type.dispatch..dispatch..io_context::executor_type]
-Request the [link asio.reference.io_context `io_context`] to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void dispatch(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given function object. If the current thread is running the [link asio.reference.io_context `io_context`], `dispatch()` executes the function before returning. Otherwise, the function will be scheduled to run on the [link asio.reference.io_context `io_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:on_work_finished io_context::executor_type::on_work_finished]
-
-[indexterm2 asio.indexterm.io_context__executor_type.on_work_finished..on_work_finished..io_context::executor_type]
-Inform the [link asio.reference.io_context `io_context`] that some work is no longer outstanding.
-
-
- void on_work_finished() const;
-
-
-This function is used to inform the [link asio.reference.io_context `io_context`] that some work has finished. Once the count of unfinished work reaches zero, the [link asio.reference.io_context `io_context`] is stopped and the `run()` and `run_one()` functions may exit.
-
-
-[endsect]
-
-
-
-[section:on_work_started io_context::executor_type::on_work_started]
-
-[indexterm2 asio.indexterm.io_context__executor_type.on_work_started..on_work_started..io_context::executor_type]
-Inform the [link asio.reference.io_context `io_context`] that it has some outstanding work to do.
-
-
- void on_work_started() const;
-
-
-This function is used to inform the [link asio.reference.io_context `io_context`] that some work has begun. This ensures that the io\_context's `run()` and `run_one()` functions do not exit while the work is underway.
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ io_context::executor_type::operator!=]
-
-[indexterm2 asio.indexterm.io_context__executor_type.operator_not__eq_..operator!=..io_context::executor_type]
-Compare two executors for inequality.
-
-
- friend bool operator!=(
- const executor_type & a,
- const executor_type & b);
-
-
-Two executors are equal if they refer to the same underlying [link asio.reference.io_context `io_context`].
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ io_context::executor_type::operator==]
-
-[indexterm2 asio.indexterm.io_context__executor_type.operator_eq__eq_..operator==..io_context::executor_type]
-Compare two executors for equality.
-
-
- friend bool operator==(
- const executor_type & a,
- const executor_type & b);
-
-
-Two executors are equal if they refer to the same underlying [link asio.reference.io_context `io_context`].
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:post io_context::executor_type::post]
-
-[indexterm2 asio.indexterm.io_context__executor_type.post..post..io_context::executor_type]
-Request the [link asio.reference.io_context `io_context`] to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void post(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the [link asio.reference.io_context `io_context`] to execute the given function object. The function object will never be executed inside `post()`. Instead, it will be scheduled to run on the [link asio.reference.io_context `io_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:running_in_this_thread io_context::executor_type::running_in_this_thread]
-
-[indexterm2 asio.indexterm.io_context__executor_type.running_in_this_thread..running_in_this_thread..io_context::executor_type]
-Determine whether the [link asio.reference.io_context `io_context`] is running in the current thread.
-
-
- bool running_in_this_thread() const;
-
-
-
-[heading Return Value]
-
-`true` if the current thread is running the [link asio.reference.io_context `io_context`]. Otherwise returns `false`.
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:io_context__service io_context::service]
-
-
-Base class for all [link asio.reference.io_context `io_context`] services.
-
-
- class service
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__service.get_io_context [*get_io_context]]]
- [Get the io_context object that owns the service. ]
- ]
-
- [
- [[link asio.reference.io_context__service.get_io_service [*get_io_service]]]
- [Get the io_context object that owns the service. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__service.service [*service]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.io_context__service._service [*~service]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:get_io_context io_context::service::get_io_context]
-
-[indexterm2 asio.indexterm.io_context__service.get_io_context..get_io_context..io_context::service]
-Get the [link asio.reference.io_context `io_context`] object that owns the service.
-
-
- asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service io_context::service::get_io_service]
-
-[indexterm2 asio.indexterm.io_context__service.get_io_service..get_io_service..io_context::service]
-Get the [link asio.reference.io_context `io_context`] object that owns the service.
-
-
- asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-
-[section:service io_context::service::service]
-
-[indexterm2 asio.indexterm.io_context__service.service..service..io_context::service]
-Constructor.
-
-
- service(
- asio::io_context & owner);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[owner][The [link asio.reference.io_context `io_context`] object that owns the service. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:_service io_context::service::~service]
-
-[indexterm2 asio.indexterm.io_context__service._service..~service..io_context::service]
-Destructor.
-
-
- virtual ~service();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:io_context__strand io_context::strand]
-
-
-Provides serialised handler execution.
-
-
- class strand
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__strand.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.defer [*defer]]]
- [Request the strand to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.dispatch [*dispatch]]]
- [Request the strand to invoke the given function object.
-
- (Deprecated: Use asio::dispatch().) Request the strand to invoke the given handler. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.get_io_context [*get_io_context]]]
- [(Deprecated: Use context().) Get the io_context associated with the strand. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.get_io_service [*get_io_service]]]
- [(Deprecated: Use context().) Get the io_context associated with the strand. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.on_work_finished [*on_work_finished]]]
- [Inform the strand that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.on_work_started [*on_work_started]]]
- [Inform the strand that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.post [*post]]]
- [Request the strand to invoke the given function object.
-
- (Deprecated: Use asio::post().) Request the strand to invoke the given handler and return immediately. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the strand is running in the current thread. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.strand [*strand]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.wrap [*wrap]]]
- [(Deprecated: Use asio::bind_executor().) Create a new handler that automatically dispatches the wrapped handler on the strand. ]
- ]
-
- [
- [[link asio.reference.io_context__strand._strand [*~strand]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__strand.operator_not__eq_ [*operator!=]]]
- [Compare two strands for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__strand.operator_eq__eq_ [*operator==]]]
- [Compare two strands for equality. ]
- ]
-
-]
-
-The [link asio.reference.io_context__strand `io_context::strand`] class provides the ability to post and dispatch handlers with the guarantee that none of those handlers will execute concurrently.
-
-
-[heading Order of handler invocation]
-
-Given:
-
-
-* a strand object `s`
-
-
-* an object `a` meeting completion handler requirements
-
-
-* an object `a1` which is an arbitrary copy of `a` made by the implementation
-
-
-* an object `b` meeting completion handler requirements
-
-
-* an object `b1` which is an arbitrary copy of `b` made by the implementation
-
-if any of the following conditions are true:
-
-
-* `s.post(a)` happens-before `s.post(b)`
-
-
-* `s.post(a)` happens-before `s.dispatch(b)`, where the latter is performed outside the strand
-
-
-* `s.dispatch(a)` happens-before `s.post(b)`, where the former is performed outside the strand
-
-
-* `s.dispatch(a)` happens-before `s.dispatch(b)`, where both are performed outside the strand
-
-then `asio_handler_invoke(a1, &a1)` happens-before `asio_handler_invoke(b1, &b1)`.
-
-Note that in the following case:
-
- async_op_1(..., s.wrap(a));
- async_op_2(..., s.wrap(b));
-
-
-the completion of the first async operation will perform `s.dispatch(a)`, and the second will perform `s.dispatch(b)`, but the order in which those are performed is unspecified. That is, you cannot state whether one happens-before the other. Therefore none of the above conditions are met and no ordering guarantee is made.
-
-
-[heading Remarks]
-
-The implementation makes no guarantee that handlers posted or dispatched through different `strand` objects will be invoked concurrently.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_context_strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context io_context::strand::context]
-
-[indexterm2 asio.indexterm.io_context__strand.context..context..io_context::strand]
-Obtain the underlying execution context.
-
-
- asio::io_context & context();
-
-
-
-[endsect]
-
-
-
-[section:defer io_context::strand::defer]
-
-[indexterm2 asio.indexterm.io_context__strand.defer..defer..io_context::strand]
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void defer(
- Function && f,
- const Allocator & a);
-
-
-This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled to run by the underlying [link asio.reference.io_context `io_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:dispatch io_context::strand::dispatch]
-
-[indexterm2 asio.indexterm.io_context__strand.dispatch..dispatch..io_context::strand]
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void ``[link asio.reference.io_context__strand.dispatch.overload1 dispatch]``(
- Function && f,
- const Allocator & a);
- `` [''''&raquo;''' [link asio.reference.io_context__strand.dispatch.overload1 more...]]``
-
-
-(Deprecated: Use [link asio.reference.dispatch `dispatch`].) Request the strand to invoke the given handler.
-
-
- template<
- typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.io_context__strand.dispatch.overload2 dispatch]``(
- CompletionHandler && handler);
- `` [''''&raquo;''' [link asio.reference.io_context__strand.dispatch.overload2 more...]]``
-
-
-[section:overload1 io_context::strand::dispatch (1 of 2 overloads)]
-
-
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void dispatch(
- Function && f,
- const Allocator & a);
-
-
-This function is used to ask the strand to execute the given function object on its underlying [link asio.reference.io_context `io_context`]. The function object will be executed inside this function if the strand is not otherwise busy and if the underlying io\_context's executor's `dispatch()` function is also able to execute the function before returning.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::strand::dispatch (2 of 2 overloads)]
-
-
-(Deprecated: Use [link asio.reference.dispatch `dispatch`].) Request the strand to invoke the given handler.
-
-
- template<
- typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` dispatch(
- CompletionHandler && handler);
-
-
-This function is used to ask the strand to execute the given handler.
-
-The strand object guarantees that handlers posted or dispatched through the strand will not be executed concurrently. The handler may be executed inside this function if the guarantee can be met. If this function is called from within a handler that was posted or dispatched through the same strand, then the new handler will be executed immediately.
-
-The strand's guarantee is in addition to the guarantee provided by the underlying [link asio.reference.io_context `io_context`]. The [link asio.reference.io_context `io_context`] guarantees that the handler will only be called in a thread in which the io\_context's run member function is currently being invoked.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called. The strand will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
-``
-]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:get_io_context io_context::strand::get_io_context]
-
-[indexterm2 asio.indexterm.io_context__strand.get_io_context..get_io_context..io_context::strand]
-(Deprecated: Use `context()`.) Get the [link asio.reference.io_context `io_context`] associated with the strand.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the strand uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the strand will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service io_context::strand::get_io_service]
-
-[indexterm2 asio.indexterm.io_context__strand.get_io_service..get_io_service..io_context::strand]
-(Deprecated: Use `context()`.) Get the [link asio.reference.io_context `io_context`] associated with the strand.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the strand uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the strand will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:on_work_finished io_context::strand::on_work_finished]
-
-[indexterm2 asio.indexterm.io_context__strand.on_work_finished..on_work_finished..io_context::strand]
-Inform the strand that some work is no longer outstanding.
-
-
- void on_work_finished();
-
-
-The strand delegates this call to its underlying [link asio.reference.io_context `io_context`].
-
-
-[endsect]
-
-
-
-[section:on_work_started io_context::strand::on_work_started]
-
-[indexterm2 asio.indexterm.io_context__strand.on_work_started..on_work_started..io_context::strand]
-Inform the strand that it has some outstanding work to do.
-
-
- void on_work_started();
-
-
-The strand delegates this call to its underlying [link asio.reference.io_context `io_context`].
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ io_context::strand::operator!=]
-
-[indexterm2 asio.indexterm.io_context__strand.operator_not__eq_..operator!=..io_context::strand]
-Compare two strands for inequality.
-
-
- friend bool operator!=(
- const strand & a,
- const strand & b);
-
-
-Two strands are equal if they refer to the same ordered, non-concurrent state.
-
-[heading Requirements]
-
-['Header: ][^asio/io_context_strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ io_context::strand::operator==]
-
-[indexterm2 asio.indexterm.io_context__strand.operator_eq__eq_..operator==..io_context::strand]
-Compare two strands for equality.
-
-
- friend bool operator==(
- const strand & a,
- const strand & b);
-
-
-Two strands are equal if they refer to the same ordered, non-concurrent state.
-
-[heading Requirements]
-
-['Header: ][^asio/io_context_strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:post io_context::strand::post]
-
-[indexterm2 asio.indexterm.io_context__strand.post..post..io_context::strand]
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void ``[link asio.reference.io_context__strand.post.overload1 post]``(
- Function && f,
- const Allocator & a);
- `` [''''&raquo;''' [link asio.reference.io_context__strand.post.overload1 more...]]``
-
-
-(Deprecated: Use [link asio.reference.post `post`].) Request the strand to invoke the given handler and return immediately.
-
-
- template<
- typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.io_context__strand.post.overload2 post]``(
- CompletionHandler && handler);
- `` [''''&raquo;''' [link asio.reference.io_context__strand.post.overload2 more...]]``
-
-
-[section:overload1 io_context::strand::post (1 of 2 overloads)]
-
-
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void post(
- Function && f,
- const Allocator & a);
-
-
-This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled to run by the underlying [link asio.reference.io_context `io_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::strand::post (2 of 2 overloads)]
-
-
-(Deprecated: Use [link asio.reference.post `post`].) Request the strand to invoke the given handler and return immediately.
-
-
- template<
- typename ``[link asio.reference.CompletionHandler CompletionHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
- CompletionHandler && handler);
-
-
-This function is used to ask the strand to execute the given handler, but without allowing the strand to call the handler from inside this function.
-
-The strand object guarantees that handlers posted or dispatched through the strand will not be executed concurrently. The strand's guarantee is in addition to the guarantee provided by the underlying [link asio.reference.io_context `io_context`]. The [link asio.reference.io_context `io_context`] guarantees that the handler will only be called in a thread in which the io\_context's run member function is currently being invoked.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called. The strand will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler();
-``
-]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:running_in_this_thread io_context::strand::running_in_this_thread]
-
-[indexterm2 asio.indexterm.io_context__strand.running_in_this_thread..running_in_this_thread..io_context::strand]
-Determine whether the strand is running in the current thread.
-
-
- bool running_in_this_thread() const;
-
-
-
-[heading Return Value]
-
-`true` if the current thread is executing a handler that was submitted to the strand using `post()`, `dispatch()` or `wrap()`. Otherwise returns `false`.
-
-
-
-
-[endsect]
-
-
-
-[section:strand io_context::strand::strand]
-
-[indexterm2 asio.indexterm.io_context__strand.strand..strand..io_context::strand]
-Constructor.
-
-
- strand(
- asio::io_context & io_context);
-
-
-Constructs the strand.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the strand will use to dispatch handlers that are ready to be run. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:wrap io_context::strand::wrap]
-
-[indexterm2 asio.indexterm.io_context__strand.wrap..wrap..io_context::strand]
-(Deprecated: Use [link asio.reference.bind_executor `bind_executor`].) Create a new handler that automatically dispatches the wrapped handler on the strand.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- unspecified wrap(
- Handler handler);
-
-
-This function is used to create a new handler function object that, when invoked, will automatically pass the wrapped handler to the strand's dispatch function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be wrapped. The strand will make a copy of the handler object as required. The function signature of the handler must be:
-``
- void handler(A1 a1, ... An an);
-``
-]]
-
-]
-
-
-[heading Return Value]
-
-A function object that, when invoked, passes the wrapped handler to the strand's dispatch function. Given a function object with the signature:
-
- R f(A1 a1, ... An an);
-
-
-If this function object is passed to the wrap function like so:
-
- strand.wrap(f);
-
-
-then the return value is a function object with the signature
-
- void g(A1 a1, ... An an);
-
-
-that, when invoked, executes code equivalent to:
-
- strand.dispatch(boost::bind(f, a1, ... an));
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:_strand io_context::strand::~strand]
-
-[indexterm2 asio.indexterm.io_context__strand._strand..~strand..io_context::strand]
-Destructor.
-
-
- ~strand();
-
-
-Destroys a strand.
-
-Handlers posted through the strand that have not yet been invoked will still be dispatched in a way that meets the guarantee of non-concurrency.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:io_context__work io_context::work]
-
-
-(Deprecated: Use [link asio.reference.executor_work_guard `executor_work_guard`].) Class to inform the [link asio.reference.io_context `io_context`] when it has work to do.
-
-
- class work
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__work.get_io_context [*get_io_context]]]
- [Get the io_context associated with the work. ]
- ]
-
- [
- [[link asio.reference.io_context__work.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_io_context().) Get the io_context associated with the work. ]
- ]
-
- [
- [[link asio.reference.io_context__work.work [*work]]]
- [Constructor notifies the io_context that work is starting.
-
- Copy constructor notifies the io_context that work is starting. ]
- ]
-
- [
- [[link asio.reference.io_context__work._work [*~work]]]
- [Destructor notifies the io_context that the work is complete. ]
- ]
-
-]
-
-The work class is used to inform the [link asio.reference.io_context `io_context`] when work starts and finishes. This ensures that the [link asio.reference.io_context `io_context`] object's `run()` function will not exit while work is underway, and that it does exit when there is no unfinished work remaining.
-
-The work class is copy-constructible so that it may be used as a data member in a handler class. It is not assignable.
-
-[heading Requirements]
-
-['Header: ][^asio/io_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:get_io_context io_context::work::get_io_context]
-
-[indexterm2 asio.indexterm.io_context__work.get_io_context..get_io_context..io_context::work]
-Get the [link asio.reference.io_context `io_context`] associated with the work.
-
-
- asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service io_context::work::get_io_service]
-
-[indexterm2 asio.indexterm.io_context__work.get_io_service..get_io_service..io_context::work]
-(Deprecated: Use `get_io_context()`.) Get the [link asio.reference.io_context `io_context`] associated with the work.
-
-
- asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-[section:work io_context::work::work]
-
-[indexterm2 asio.indexterm.io_context__work.work..work..io_context::work]
-Constructor notifies the [link asio.reference.io_context `io_context`] that work is starting.
-
-
- explicit ``[link asio.reference.io_context__work.work.overload1 work]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.io_context__work.work.overload1 more...]]``
-
-
-Copy constructor notifies the [link asio.reference.io_context `io_context`] that work is starting.
-
-
- ``[link asio.reference.io_context__work.work.overload2 work]``(
- const work & other);
- `` [''''&raquo;''' [link asio.reference.io_context__work.work.overload2 more...]]``
-
-
-[section:overload1 io_context::work::work (1 of 2 overloads)]
-
-
-Constructor notifies the [link asio.reference.io_context `io_context`] that work is starting.
-
-
- work(
- asio::io_context & io_context);
-
-
-The constructor is used to inform the [link asio.reference.io_context `io_context`] that some work has begun. This ensures that the [link asio.reference.io_context `io_context`] object's `run()` function will not exit while the work is underway.
-
-
-[endsect]
-
-
-
-[section:overload2 io_context::work::work (2 of 2 overloads)]
-
-
-Copy constructor notifies the [link asio.reference.io_context `io_context`] that work is starting.
-
-
- work(
- const work & other);
-
-
-The constructor is used to inform the [link asio.reference.io_context `io_context`] that some work has begun. This ensures that the [link asio.reference.io_context `io_context`] object's `run()` function will not exit while the work is underway.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_work io_context::work::~work]
-
-[indexterm2 asio.indexterm.io_context__work._work..~work..io_context::work]
-Destructor notifies the [link asio.reference.io_context `io_context`] that the work is complete.
-
-
- ~work();
-
-
-The destructor is used to inform the [link asio.reference.io_context `io_context`] that some work has finished. Once the count of unfinished work reaches zero, the [link asio.reference.io_context `io_context`] object's `run()` function is permitted to exit.
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:io_service io_service]
-
-[indexterm1 asio.indexterm.io_service..io_service]
-Typedef for backwards compatibility.
-
-
- typedef io_context io_service;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.io_context__executor_type [*executor_type]]]
- [Executor used to submit functions to an io_context. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context__service [*service]]]
- [Base class for all io_context services. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context__strand [*strand]]]
- [Provides serialised handler execution. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context__work [*work]]]
- [(Deprecated: Use executor_work_guard.) Class to inform the io_context when it has work to do. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context.count_type [*count_type]]]
- [The type used to count the number of handlers executed by the context. ]
-
- ]
-
- [
-
- [[link asio.reference.io_context.fork_event [*fork_event]]]
- [Fork-related event notifications. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context.dispatch [*dispatch]]]
- [(Deprecated: Use asio::dispatch().) Request the io_context to invoke the given handler. ]
- ]
-
- [
- [[link asio.reference.io_context.get_executor [*get_executor]]]
- [Obtains the executor associated with the io_context. ]
- ]
-
- [
- [[link asio.reference.io_context.io_context [*io_context]]]
- [Constructor. ]
- ]
-
- [
- [[link asio.reference.io_context.notify_fork [*notify_fork]]]
- [Notify the execution_context of a fork-related event. ]
- ]
-
- [
- [[link asio.reference.io_context.poll [*poll]]]
- [Run the io_context object's event processing loop to execute ready handlers.
-
- (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute ready handlers. ]
- ]
-
- [
- [[link asio.reference.io_context.poll_one [*poll_one]]]
- [Run the io_context object's event processing loop to execute one ready handler.
-
- (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop to execute one ready handler. ]
- ]
-
- [
- [[link asio.reference.io_context.post [*post]]]
- [(Deprecated: Use asio::post().) Request the io_context to invoke the given handler and return immediately. ]
- ]
-
- [
- [[link asio.reference.io_context.reset [*reset]]]
- [(Deprecated: Use restart().) Reset the io_context in preparation for a subsequent run() invocation. ]
- ]
-
- [
- [[link asio.reference.io_context.restart [*restart]]]
- [Restart the io_context in preparation for a subsequent run() invocation. ]
- ]
-
- [
- [[link asio.reference.io_context.run [*run]]]
- [Run the io_context object's event processing loop.
-
- (Deprecated: Use non-error_code overload.) Run the io_context object's event processing loop. ]
- ]
-
- [
- [[link asio.reference.io_context.run_for [*run_for]]]
- [Run the io_context object's event processing loop for a specified duration. ]
- ]
-
- [
- [[link asio.reference.io_context.run_one [*run_one]]]
- [Run the io_context object's event processing loop to execute at most one handler.
-
- (Deprecated: Use non-error_code overlaod.) Run the io_context object's event processing loop to execute at most one handler. ]
- ]
-
- [
- [[link asio.reference.io_context.run_one_for [*run_one_for]]]
- [Run the io_context object's event processing loop for a specified duration to execute at most one handler. ]
- ]
-
- [
- [[link asio.reference.io_context.run_one_until [*run_one_until]]]
- [Run the io_context object's event processing loop until a specified time to execute at most one handler. ]
- ]
-
- [
- [[link asio.reference.io_context.run_until [*run_until]]]
- [Run the io_context object's event processing loop until a specified time. ]
- ]
-
- [
- [[link asio.reference.io_context.stop [*stop]]]
- [Stop the io_context object's event processing loop. ]
- ]
-
- [
- [[link asio.reference.io_context.stopped [*stopped]]]
- [Determine whether the io_context object has been stopped. ]
- ]
-
- [
- [[link asio.reference.io_context.wrap [*wrap]]]
- [(Deprecated: Use asio::bind_executor().) Create a new handler that automatically dispatches the wrapped handler on the io_context. ]
- ]
-
- [
- [[link asio.reference.io_context._io_context [*~io_context]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context.destroy [*destroy]]]
- [Destroys all services in the context. ]
- ]
-
- [
- [[link asio.reference.io_context.shutdown [*shutdown]]]
- [Shuts down all services in the context. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context.add_service [*add_service]]]
- [(Deprecated: Use make_service().) Add a service object to the execution_context. ]
- ]
-
- [
- [[link asio.reference.io_context.has_service [*has_service]]]
- [Determine if an execution_context contains a specified service type. ]
- ]
-
- [
- [[link asio.reference.io_context.make_service [*make_service]]]
- [Creates a service object and adds it to the execution_context. ]
- ]
-
- [
- [[link asio.reference.io_context.use_service [*use_service]]]
- [
-
- Obtain the service object corresponding to the given type. ]
- ]
-
-]
-
-The [link asio.reference.io_context `io_context`] class provides the core I/O functionality for users of the asynchronous I/O objects, including:
-
-
-* `asio::ip::tcp::socket`
-
-* `asio::ip::tcp::acceptor`
-
-* `asio::ip::udp::socket`
-
-* [link asio.reference.deadline_timer `deadline_timer`].
-
-The [link asio.reference.io_context `io_context`] class also includes facilities intended for developers of custom asynchronous services.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe, with the specific exceptions of the `restart()` and `notify_fork()` functions. Calling `restart()` while there are unfinished `run()`, `run_one()`, `poll()` or `poll_one()` calls results in undefined behaviour. The `notify_fork()` function should not be called while any [link asio.reference.io_context `io_context`] function, or any function on an I/O object that is associated with the [link asio.reference.io_context `io_context`], is being called in another thread.
-
-
-
-[heading Synchronous and asynchronous operations]
-
-
-
-Synchronous operations on I/O objects implicitly run the [link asio.reference.io_context `io_context`] object for an individual operation. The [link asio.reference.io_context `io_context`] functions `run()`, `run_one()`, `poll()` or `poll_one()` must be called for the [link asio.reference.io_context `io_context`] to perform asynchronous operations on behalf of a C++ program. Notification that an asynchronous operation has completed is delivered by invocation of the associated handler. Handlers are invoked only by a thread that is currently calling any overload of `run()`, `run_one()`, `poll()` or `poll_one()` for the [link asio.reference.io_context `io_context`].
-
-
-[heading Effect of exceptions thrown from handlers]
-
-
-
-If an exception is thrown from a handler, the exception is allowed to propagate through the throwing thread's invocation of `run()`, `run_one()`, `poll()` or `poll_one()`. No other threads that are calling any of these functions are affected. It is then the responsibility of the application to catch the exception.
-
-After the exception has been caught, the `run()`, `run_one()`, `poll()` or `poll_one()` call may be restarted ['without] the need for an intervening call to `restart()`. This allows the thread to rejoin the [link asio.reference.io_context `io_context`] object's thread pool without impacting any other threads in the pool.
-
-For example:
-
-
-
- asio::io_context io_context;
- ...
- for (;;)
- {
- try
- {
- io_context.run();
- break; // run() exited normally
- }
- catch (my_exception& e)
- {
- // Deal with exception as appropriate.
- }
- }
-
-
-
-
-
-[heading Stopping the io_context from running out of work]
-
-
-
-Some applications may need to prevent an [link asio.reference.io_context `io_context`] object's `run()` call from returning when there is no more work to do. For example, the [link asio.reference.io_context `io_context`] may be being run in a background thread that is launched prior to the application's asynchronous operations. The `run()` call may be kept running by creating an object of type asio::executor\_work\_guard<io\_context::executor\_type>:
-
-
-
- asio::io_context io_context;
- asio::executor_work_guard<asio::io_context::executor_type>
- = asio::make_work_guard(io_context);
- ...
-
-
-
-
-To effect a shutdown, the application will then need to call the [link asio.reference.io_context `io_context`] object's `stop()` member function. This will cause the [link asio.reference.io_context `io_context`] `run()` call to return as soon as possible, abandoning unfinished operations and without permitting ready handlers to be dispatched.
-
-Alternatively, if the application requires that all operations and handlers be allowed to finish normally, the work object may be explicitly reset.
-
-
-
- asio::io_context io_context;
- asio::executor_work_guard<asio::io_context::executor_type>
- = asio::make_work_guard(io_context);
- ...
- work.reset(); // Allow run() to exit.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/io_service.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:ip__address ip::address]
-
-
-Implements version-independent IP addresses.
-
-
- class address
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address.address [*address]]]
- [Default constructor.
-
- Construct an address from an IPv4 address.
-
- Construct an address from an IPv6 address.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address.from_string [*from_string]]]
- [(Deprecated: Use make_address().) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. ]
- ]
-
- [
- [[link asio.reference.ip__address.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address.is_v4 [*is_v4]]]
- [Get whether the address is an IP version 4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address.is_v6 [*is_v6]]]
- [Get whether the address is an IP version 6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_eq_ [*operator=]]]
- [Assign from another address.
-
- Assign from an IPv4 address.
-
- Assign from an IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address.to_v4 [*to_v4]]]
- [Get the address as an IP version 4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address.to_v6 [*to_v6]]]
- [Get the address as an IP version 6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address.make_address [*make_address]]]
- [Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation. ]
- ]
-
- [
- [[link asio.reference.ip__address.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address `ip::address`] class provides the ability to use either IP version 4 or version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:address ip::address::address]
-
-[indexterm2 asio.indexterm.ip__address.address..address..ip::address]
-Default constructor.
-
-
- ``[link asio.reference.ip__address.address.overload1 address]``();
- `` [''''&raquo;''' [link asio.reference.ip__address.address.overload1 more...]]``
-
-
-Construct an address from an IPv4 address.
-
-
- ``[link asio.reference.ip__address.address.overload2 address]``(
- const asio::ip::address_v4 & ipv4_address);
- `` [''''&raquo;''' [link asio.reference.ip__address.address.overload2 more...]]``
-
-
-Construct an address from an IPv6 address.
-
-
- ``[link asio.reference.ip__address.address.overload3 address]``(
- const asio::ip::address_v6 & ipv6_address);
- `` [''''&raquo;''' [link asio.reference.ip__address.address.overload3 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__address.address.overload4 address]``(
- const address & other);
- `` [''''&raquo;''' [link asio.reference.ip__address.address.overload4 more...]]``
-
-
-[section:overload1 ip::address::address (1 of 4 overloads)]
-
-
-Default constructor.
-
-
- address();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address::address (2 of 4 overloads)]
-
-
-Construct an address from an IPv4 address.
-
-
- address(
- const asio::ip::address_v4 & ipv4_address);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address::address (3 of 4 overloads)]
-
-
-Construct an address from an IPv6 address.
-
-
- address(
- const asio::ip::address_v6 & ipv6_address);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address::address (4 of 4 overloads)]
-
-
-Copy constructor.
-
-
- address(
- const address & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:from_string ip::address::from_string]
-
-[indexterm2 asio.indexterm.ip__address.from_string..from_string..ip::address]
-(Deprecated: Use `make_address()`.) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- static address ``[link asio.reference.ip__address.from_string.overload1 from_string]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__address.from_string.overload1 more...]]``
-
- static address ``[link asio.reference.ip__address.from_string.overload2 from_string]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address.from_string.overload2 more...]]``
-
- static address ``[link asio.reference.ip__address.from_string.overload3 from_string]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__address.from_string.overload3 more...]]``
-
- static address ``[link asio.reference.ip__address.from_string.overload4 from_string]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address.from_string.overload4 more...]]``
-
-
-[section:overload1 ip::address::from_string (1 of 4 overloads)]
-
-
-(Deprecated: Use `make_address()`.) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- static address from_string(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address::from_string (2 of 4 overloads)]
-
-
-(Deprecated: Use `make_address()`.) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- static address from_string(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address::from_string (3 of 4 overloads)]
-
-
-(Deprecated: Use `make_address()`.) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- static address from_string(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address::from_string (4 of 4 overloads)]
-
-
-(Deprecated: Use `make_address()`.) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- static address from_string(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_loopback ip::address::is_loopback]
-
-[indexterm2 asio.indexterm.ip__address.is_loopback..is_loopback..ip::address]
-Determine whether the address is a loopback address.
-
-
- bool is_loopback() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast ip::address::is_multicast]
-
-[indexterm2 asio.indexterm.ip__address.is_multicast..is_multicast..ip::address]
-Determine whether the address is a multicast address.
-
-
- bool is_multicast() const;
-
-
-
-[endsect]
-
-
-
-[section:is_unspecified ip::address::is_unspecified]
-
-[indexterm2 asio.indexterm.ip__address.is_unspecified..is_unspecified..ip::address]
-Determine whether the address is unspecified.
-
-
- bool is_unspecified() const;
-
-
-
-[endsect]
-
-
-
-[section:is_v4 ip::address::is_v4]
-
-[indexterm2 asio.indexterm.ip__address.is_v4..is_v4..ip::address]
-Get whether the address is an IP version 4 address.
-
-
- bool is_v4() const;
-
-
-
-[endsect]
-
-
-
-[section:is_v6 ip::address::is_v6]
-
-[indexterm2 asio.indexterm.ip__address.is_v6..is_v6..ip::address]
-Get whether the address is an IP version 6 address.
-
-
- bool is_v6() const;
-
-
-
-[endsect]
-
-
-[section:make_address ip::address::make_address]
-
-[indexterm2 asio.indexterm.ip__address.make_address..make_address..ip::address]
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address ``[link asio.reference.ip__address.make_address.overload1 make_address]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__address.make_address.overload1 more...]]``
-
- address ``[link asio.reference.ip__address.make_address.overload2 make_address]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address.make_address.overload2 more...]]``
-
- address ``[link asio.reference.ip__address.make_address.overload3 make_address]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__address.make_address.overload3 more...]]``
-
- address ``[link asio.reference.ip__address.make_address.overload4 make_address]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address.make_address.overload4 more...]]``
-
- address ``[link asio.reference.ip__address.make_address.overload5 make_address]``(
- string_view str);
- `` [''''&raquo;''' [link asio.reference.ip__address.make_address.overload5 more...]]``
-
- address ``[link asio.reference.ip__address.make_address.overload6 make_address]``(
- string_view str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address.make_address.overload6 more...]]``
-
-
-[section:overload1 ip::address::make_address (1 of 6 overloads)]
-
-
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address make_address(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address::make_address (2 of 6 overloads)]
-
-
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address make_address(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address::make_address (3 of 6 overloads)]
-
-
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address make_address(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address::make_address (4 of 6 overloads)]
-
-
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address make_address(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload5 ip::address::make_address (5 of 6 overloads)]
-
-
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address make_address(
- string_view str);
-
-
-
-[endsect]
-
-
-
-[section:overload6 ip::address::make_address (6 of 6 overloads)]
-
-
-Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
-
-
- address make_address(
- string_view str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_not__eq_ ip::address::operator!=]
-
-[indexterm2 asio.indexterm.ip__address.operator_not__eq_..operator!=..ip::address]
-Compare two addresses for inequality.
-
-
- friend bool operator!=(
- const address & a1,
- const address & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt_ ip::address::operator<]
-
-[indexterm2 asio.indexterm.ip__address.operator_lt_..operator<..ip::address]
-Compare addresses for ordering.
-
-
- friend bool operator<(
- const address & a1,
- const address & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt__lt_ ip::address::operator<<]
-
-[indexterm2 asio.indexterm.ip__address.operator_lt__lt_..operator<<..ip::address]
-Output an address as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const address & addr);
-
-
-Used to output a human-readable string for a specified address.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[addr][The address to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_lt__eq_ ip::address::operator<=]
-
-[indexterm2 asio.indexterm.ip__address.operator_lt__eq_..operator<=..ip::address]
-Compare addresses for ordering.
-
-
- friend bool operator<=(
- const address & a1,
- const address & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_eq_ ip::address::operator=]
-
-[indexterm2 asio.indexterm.ip__address.operator_eq_..operator=..ip::address]
-Assign from another address.
-
-
- address & ``[link asio.reference.ip__address.operator_eq_.overload1 operator=]``(
- const address & other);
- `` [''''&raquo;''' [link asio.reference.ip__address.operator_eq_.overload1 more...]]``
-
-
-Assign from an IPv4 address.
-
-
- address & ``[link asio.reference.ip__address.operator_eq_.overload2 operator=]``(
- const asio::ip::address_v4 & ipv4_address);
- `` [''''&raquo;''' [link asio.reference.ip__address.operator_eq_.overload2 more...]]``
-
-
-Assign from an IPv6 address.
-
-
- address & ``[link asio.reference.ip__address.operator_eq_.overload3 operator=]``(
- const asio::ip::address_v6 & ipv6_address);
- `` [''''&raquo;''' [link asio.reference.ip__address.operator_eq_.overload3 more...]]``
-
-
-[section:overload1 ip::address::operator= (1 of 3 overloads)]
-
-
-Assign from another address.
-
-
- address & operator=(
- const address & other);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address::operator= (2 of 3 overloads)]
-
-
-Assign from an IPv4 address.
-
-
- address & operator=(
- const asio::ip::address_v4 & ipv4_address);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address::operator= (3 of 3 overloads)]
-
-
-Assign from an IPv6 address.
-
-
- address & operator=(
- const asio::ip::address_v6 & ipv6_address);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq__eq_ ip::address::operator==]
-
-[indexterm2 asio.indexterm.ip__address.operator_eq__eq_..operator==..ip::address]
-Compare two addresses for equality.
-
-
- friend bool operator==(
- const address & a1,
- const address & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ ip::address::operator>]
-
-[indexterm2 asio.indexterm.ip__address.operator_gt_..operator>..ip::address]
-Compare addresses for ordering.
-
-
- friend bool operator>(
- const address & a1,
- const address & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ ip::address::operator>=]
-
-[indexterm2 asio.indexterm.ip__address.operator_gt__eq_..operator>=..ip::address]
-Compare addresses for ordering.
-
-
- friend bool operator>=(
- const address & a1,
- const address & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:to_string ip::address::to_string]
-
-[indexterm2 asio.indexterm.ip__address.to_string..to_string..ip::address]
-Get the address as a string.
-
-
- std::string ``[link asio.reference.ip__address.to_string.overload1 to_string]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__address.to_string.overload1 more...]]``
-
-
-(Deprecated: Use other overload.) Get the address as a string.
-
-
- std::string ``[link asio.reference.ip__address.to_string.overload2 to_string]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.ip__address.to_string.overload2 more...]]``
-
-
-[section:overload1 ip::address::to_string (1 of 2 overloads)]
-
-
-Get the address as a string.
-
-
- std::string to_string() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address::to_string (2 of 2 overloads)]
-
-
-(Deprecated: Use other overload.) Get the address as a string.
-
-
- std::string to_string(
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:to_v4 ip::address::to_v4]
-
-[indexterm2 asio.indexterm.ip__address.to_v4..to_v4..ip::address]
-Get the address as an IP version 4 address.
-
-
- asio::ip::address_v4 to_v4() const;
-
-
-
-[endsect]
-
-
-
-[section:to_v6 ip::address::to_v6]
-
-[indexterm2 asio.indexterm.ip__address.to_v6..to_v6..ip::address]
-Get the address as an IP version 6 address.
-
-
- asio::ip::address_v6 to_v6() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__address_v4 ip::address_v4]
-
-
-Implements IP version 4 style addresses.
-
-
- class address_v4
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__address_v4.uint_type [*uint_type]]]
- [The type used to represent an address as an unsigned integer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor.
-
- Construct an address from raw bytes.
-
- Construct an address from an unsigned integer in host byte order.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address.
-
- (Deprecated: Use network_v4 class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.from_string [*from_string]]]
- [(Deprecated: Use make_address_v4().) Create an address from an IP address string in dotted decimal form. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class A address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class B address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class C address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.netmask [*netmask]]]
- [(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds to the address, based on its address class. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format.
-
- (Deprecated: Use other overload.) Get the address as a string in dotted decimal format. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_uint [*to_uint]]]
- [Get the address as an unsigned integer in host byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.make_address_v4 [*make_address_v4]]]
- [Create an IPv4 address from raw bytes in network order.
-
- Create an IPv4 address from an unsigned integer in host byte order.
-
- Create an IPv4 address from an IP address string in dotted decimal form.
-
- Create an IPv4 address from a IPv4-mapped IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from an address and prefix length.
-
- Create an IPv4 network from an address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v4 `ip::address_v4`] class provides the ability to use and manipulate IP version 4 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:address_v4 ip::address_v4::address_v4]
-
-[indexterm2 asio.indexterm.ip__address_v4.address_v4..address_v4..ip::address_v4]
-Default constructor.
-
-
- ``[link asio.reference.ip__address_v4.address_v4.overload1 address_v4]``();
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.address_v4.overload1 more...]]``
-
-
-Construct an address from raw bytes.
-
-
- explicit ``[link asio.reference.ip__address_v4.address_v4.overload2 address_v4]``(
- const bytes_type & bytes);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.address_v4.overload2 more...]]``
-
-
-Construct an address from an unsigned integer in host byte order.
-
-
- explicit ``[link asio.reference.ip__address_v4.address_v4.overload3 address_v4]``(
- uint_type addr);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.address_v4.overload3 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__address_v4.address_v4.overload4 address_v4]``(
- const address_v4 & other);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.address_v4.overload4 more...]]``
-
-
-[section:overload1 ip::address_v4::address_v4 (1 of 4 overloads)]
-
-
-Default constructor.
-
-
- address_v4();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::address_v4 (2 of 4 overloads)]
-
-
-Construct an address from raw bytes.
-
-
- address_v4(
- const bytes_type & bytes);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v4::address_v4 (3 of 4 overloads)]
-
-
-Construct an address from an unsigned integer in host byte order.
-
-
- address_v4(
- uint_type addr);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address_v4::address_v4 (4 of 4 overloads)]
-
-
-Copy constructor.
-
-
- address_v4(
- const address_v4 & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:any ip::address_v4::any]
-
-[indexterm2 asio.indexterm.ip__address_v4.any..any..ip::address_v4]
-Obtain an address object that represents any address.
-
-
- static address_v4 any();
-
-
-
-[endsect]
-
-
-[section:broadcast ip::address_v4::broadcast]
-
-[indexterm2 asio.indexterm.ip__address_v4.broadcast..broadcast..ip::address_v4]
-Obtain an address object that represents the broadcast address.
-
-
- static address_v4 ``[link asio.reference.ip__address_v4.broadcast.overload1 broadcast]``();
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.broadcast.overload1 more...]]``
-
-
-(Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask.
-
-
- static address_v4 ``[link asio.reference.ip__address_v4.broadcast.overload2 broadcast]``(
- const address_v4 & addr,
- const address_v4 & mask);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.broadcast.overload2 more...]]``
-
-
-[section:overload1 ip::address_v4::broadcast (1 of 2 overloads)]
-
-
-Obtain an address object that represents the broadcast address.
-
-
- static address_v4 broadcast();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::broadcast (2 of 2 overloads)]
-
-
-(Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask.
-
-
- static address_v4 broadcast(
- const address_v4 & addr,
- const address_v4 & mask);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:bytes_type ip::address_v4::bytes_type]
-
-[indexterm2 asio.indexterm.ip__address_v4.bytes_type..bytes_type..ip::address_v4]
-The type used to represent an address as an array of bytes.
-
-
- typedef array< unsigned char, 4 > bytes_type;
-
-
-
-
-[heading Remarks]
-
-This type is defined in terms of the C++0x template `std::array` when it is available. Otherwise, it uses `boost:array`.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:from_string ip::address_v4::from_string]
-
-[indexterm2 asio.indexterm.ip__address_v4.from_string..from_string..ip::address_v4]
-(Deprecated: Use `make_address_v4()`.) Create an address from an IP address string in dotted decimal form.
-
-
- static address_v4 ``[link asio.reference.ip__address_v4.from_string.overload1 from_string]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.from_string.overload1 more...]]``
-
- static address_v4 ``[link asio.reference.ip__address_v4.from_string.overload2 from_string]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.from_string.overload2 more...]]``
-
- static address_v4 ``[link asio.reference.ip__address_v4.from_string.overload3 from_string]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.from_string.overload3 more...]]``
-
- static address_v4 ``[link asio.reference.ip__address_v4.from_string.overload4 from_string]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.from_string.overload4 more...]]``
-
-
-[section:overload1 ip::address_v4::from_string (1 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v4()`.) Create an address from an IP address string in dotted decimal form.
-
-
- static address_v4 from_string(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::from_string (2 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v4()`.) Create an address from an IP address string in dotted decimal form.
-
-
- static address_v4 from_string(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v4::from_string (3 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v4()`.) Create an address from an IP address string in dotted decimal form.
-
-
- static address_v4 from_string(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address_v4::from_string (4 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v4()`.) Create an address from an IP address string in dotted decimal form.
-
-
- static address_v4 from_string(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_class_a ip::address_v4::is_class_a]
-
-[indexterm2 asio.indexterm.ip__address_v4.is_class_a..is_class_a..ip::address_v4]
-(Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Determine whether the address is a class A address.
-
-
- bool is_class_a() const;
-
-
-
-[endsect]
-
-
-
-[section:is_class_b ip::address_v4::is_class_b]
-
-[indexterm2 asio.indexterm.ip__address_v4.is_class_b..is_class_b..ip::address_v4]
-(Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Determine whether the address is a class B address.
-
-
- bool is_class_b() const;
-
-
-
-[endsect]
-
-
-
-[section:is_class_c ip::address_v4::is_class_c]
-
-[indexterm2 asio.indexterm.ip__address_v4.is_class_c..is_class_c..ip::address_v4]
-(Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Determine whether the address is a class C address.
-
-
- bool is_class_c() const;
-
-
-
-[endsect]
-
-
-
-[section:is_loopback ip::address_v4::is_loopback]
-
-[indexterm2 asio.indexterm.ip__address_v4.is_loopback..is_loopback..ip::address_v4]
-Determine whether the address is a loopback address.
-
-
- bool is_loopback() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast ip::address_v4::is_multicast]
-
-[indexterm2 asio.indexterm.ip__address_v4.is_multicast..is_multicast..ip::address_v4]
-Determine whether the address is a multicast address.
-
-
- bool is_multicast() const;
-
-
-
-[endsect]
-
-
-
-[section:is_unspecified ip::address_v4::is_unspecified]
-
-[indexterm2 asio.indexterm.ip__address_v4.is_unspecified..is_unspecified..ip::address_v4]
-Determine whether the address is unspecified.
-
-
- bool is_unspecified() const;
-
-
-
-[endsect]
-
-
-
-[section:loopback ip::address_v4::loopback]
-
-[indexterm2 asio.indexterm.ip__address_v4.loopback..loopback..ip::address_v4]
-Obtain an address object that represents the loopback address.
-
-
- static address_v4 loopback();
-
-
-
-[endsect]
-
-
-[section:make_address_v4 ip::address_v4::make_address_v4]
-
-[indexterm2 asio.indexterm.ip__address_v4.make_address_v4..make_address_v4..ip::address_v4]
-Create an IPv4 address from raw bytes in network order.
-
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload1 make_address_v4]``(
- const address_v4::bytes_type & bytes);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload1 more...]]``
-
-
-Create an IPv4 address from an unsigned integer in host byte order.
-
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload2 make_address_v4]``(
- address_v4::uint_type addr);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload2 more...]]``
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload3 make_address_v4]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload3 more...]]``
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload4 make_address_v4]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload4 more...]]``
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload5 make_address_v4]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload5 more...]]``
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload6 make_address_v4]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload6 more...]]``
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload7 make_address_v4]``(
- string_view str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload7 more...]]``
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload8 make_address_v4]``(
- string_view str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload8 more...]]``
-
-
-Create an IPv4 address from a IPv4-mapped IPv6 address.
-
-
- address_v4 ``[link asio.reference.ip__address_v4.make_address_v4.overload9 make_address_v4]``(
- v4_mapped_t ,
- const address_v6 & v6_addr);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_address_v4.overload9 more...]]``
-
-
-[section:overload1 ip::address_v4::make_address_v4 (1 of 9 overloads)]
-
-
-Create an IPv4 address from raw bytes in network order.
-
-
- address_v4 make_address_v4(
- const address_v4::bytes_type & bytes);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::make_address_v4 (2 of 9 overloads)]
-
-
-Create an IPv4 address from an unsigned integer in host byte order.
-
-
- address_v4 make_address_v4(
- address_v4::uint_type addr);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v4::make_address_v4 (3 of 9 overloads)]
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 make_address_v4(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address_v4::make_address_v4 (4 of 9 overloads)]
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 make_address_v4(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload5 ip::address_v4::make_address_v4 (5 of 9 overloads)]
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 make_address_v4(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload6 ip::address_v4::make_address_v4 (6 of 9 overloads)]
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 make_address_v4(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload7 ip::address_v4::make_address_v4 (7 of 9 overloads)]
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 make_address_v4(
- string_view str);
-
-
-
-[endsect]
-
-
-
-[section:overload8 ip::address_v4::make_address_v4 (8 of 9 overloads)]
-
-
-Create an IPv4 address from an IP address string in dotted decimal form.
-
-
- address_v4 make_address_v4(
- string_view str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload9 ip::address_v4::make_address_v4 (9 of 9 overloads)]
-
-
-Create an IPv4 address from a IPv4-mapped IPv6 address.
-
-
- address_v4 make_address_v4(
- v4_mapped_t ,
- const address_v6 & v6_addr);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:make_network_v4 ip::address_v4::make_network_v4]
-
-[indexterm2 asio.indexterm.ip__address_v4.make_network_v4..make_network_v4..ip::address_v4]
-Create an IPv4 network from an address and prefix length.
-
-
- network_v4 ``[link asio.reference.ip__address_v4.make_network_v4.overload1 make_network_v4]``(
- const address_v4 & addr,
- unsigned short prefix_len);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_network_v4.overload1 more...]]``
-
-
-Create an IPv4 network from an address and netmask.
-
-
- network_v4 ``[link asio.reference.ip__address_v4.make_network_v4.overload2 make_network_v4]``(
- const address_v4 & addr,
- const address_v4 & mask);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.make_network_v4.overload2 more...]]``
-
-
-[section:overload1 ip::address_v4::make_network_v4 (1 of 2 overloads)]
-
-
-Create an IPv4 network from an address and prefix length.
-
-
- network_v4 make_network_v4(
- const address_v4 & addr,
- unsigned short prefix_len);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::make_network_v4 (2 of 2 overloads)]
-
-
-Create an IPv4 network from an address and netmask.
-
-
- network_v4 make_network_v4(
- const address_v4 & addr,
- const address_v4 & mask);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:netmask ip::address_v4::netmask]
-
-[indexterm2 asio.indexterm.ip__address_v4.netmask..netmask..ip::address_v4]
-(Deprecated: Use [link asio.reference.ip__network_v4 `ip::network_v4`] class.) Obtain the netmask that corresponds to the address, based on its address class.
-
-
- static address_v4 netmask(
- const address_v4 & addr);
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::address_v4::operator!=]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_not__eq_..operator!=..ip::address_v4]
-Compare two addresses for inequality.
-
-
- friend bool operator!=(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt_ ip::address_v4::operator<]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_lt_..operator<..ip::address_v4]
-Compare addresses for ordering.
-
-
- friend bool operator<(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_lt__lt_ ip::address_v4::operator<<]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_lt__lt_..operator<<..ip::address_v4]
-Output an address as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & ``[link asio.reference.ip__address_v4.operator_lt__lt_.overload1 operator<<]``(
- std::basic_ostream< Elem, Traits > & os,
- const address_v4 & addr);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.operator_lt__lt_.overload1 more...]]``
-
-
-Output a network as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & ``[link asio.reference.ip__address_v4.operator_lt__lt_.overload2 operator<<]``(
- std::basic_ostream< Elem, Traits > & os,
- const network_v4 & net);
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.operator_lt__lt_.overload2 more...]]``
-
-
-[section:overload1 ip::address_v4::operator<< (1 of 2 overloads)]
-
-
-Output an address as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const address_v4 & addr);
-
-
-Used to output a human-readable string for a specified address.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[addr][The address to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::operator<< (2 of 2 overloads)]
-
-
-Output a network as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const network_v4 & net);
-
-
-Used to output a human-readable string for a specified network.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[net][The network to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_lt__eq_ ip::address_v4::operator<=]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_lt__eq_..operator<=..ip::address_v4]
-Compare addresses for ordering.
-
-
- friend bool operator<=(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::address_v4::operator=]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_eq_..operator=..ip::address_v4]
-Assign from another address.
-
-
- address_v4 & operator=(
- const address_v4 & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::address_v4::operator==]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_eq__eq_..operator==..ip::address_v4]
-Compare two addresses for equality.
-
-
- friend bool operator==(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ ip::address_v4::operator>]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_gt_..operator>..ip::address_v4]
-Compare addresses for ordering.
-
-
- friend bool operator>(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ ip::address_v4::operator>=]
-
-[indexterm2 asio.indexterm.ip__address_v4.operator_gt__eq_..operator>=..ip::address_v4]
-Compare addresses for ordering.
-
-
- friend bool operator>=(
- const address_v4 & a1,
- const address_v4 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:to_bytes ip::address_v4::to_bytes]
-
-[indexterm2 asio.indexterm.ip__address_v4.to_bytes..to_bytes..ip::address_v4]
-Get the address in bytes, in network byte order.
-
-
- bytes_type to_bytes() const;
-
-
-
-[endsect]
-
-
-[section:to_string ip::address_v4::to_string]
-
-[indexterm2 asio.indexterm.ip__address_v4.to_string..to_string..ip::address_v4]
-Get the address as a string in dotted decimal format.
-
-
- std::string ``[link asio.reference.ip__address_v4.to_string.overload1 to_string]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.to_string.overload1 more...]]``
-
-
-(Deprecated: Use other overload.) Get the address as a string in dotted decimal format.
-
-
- std::string ``[link asio.reference.ip__address_v4.to_string.overload2 to_string]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.ip__address_v4.to_string.overload2 more...]]``
-
-
-[section:overload1 ip::address_v4::to_string (1 of 2 overloads)]
-
-
-Get the address as a string in dotted decimal format.
-
-
- std::string to_string() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v4::to_string (2 of 2 overloads)]
-
-
-(Deprecated: Use other overload.) Get the address as a string in dotted decimal format.
-
-
- std::string to_string(
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:to_uint ip::address_v4::to_uint]
-
-[indexterm2 asio.indexterm.ip__address_v4.to_uint..to_uint..ip::address_v4]
-Get the address as an unsigned integer in host byte order.
-
-
- uint_type to_uint() const;
-
-
-
-[endsect]
-
-
-
-[section:to_ulong ip::address_v4::to_ulong]
-
-[indexterm2 asio.indexterm.ip__address_v4.to_ulong..to_ulong..ip::address_v4]
-Get the address as an unsigned long in host byte order.
-
-
- unsigned long to_ulong() const;
-
-
-
-[endsect]
-
-
-
-[section:uint_type ip::address_v4::uint_type]
-
-[indexterm2 asio.indexterm.ip__address_v4.uint_type..uint_type..ip::address_v4]
-The type used to represent an address as an unsigned integer.
-
-
- typedef uint_least32_t uint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ip__address_v4_iterator ip::address_v4_iterator]
-
-[indexterm1 asio.indexterm.ip__address_v4_iterator..ip::address_v4_iterator]
-An input iterator that can be used for traversing IPv4 addresses.
-
-
- typedef basic_address_iterator< address_v4 > address_v4_iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__address_v4.uint_type [*uint_type]]]
- [The type used to represent an address as an unsigned integer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor.
-
- Construct an address from raw bytes.
-
- Construct an address from an unsigned integer in host byte order.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address.
-
- (Deprecated: Use network_v4 class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.from_string [*from_string]]]
- [(Deprecated: Use make_address_v4().) Create an address from an IP address string in dotted decimal form. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class A address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class B address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class C address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.netmask [*netmask]]]
- [(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds to the address, based on its address class. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format.
-
- (Deprecated: Use other overload.) Get the address as a string in dotted decimal format. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_uint [*to_uint]]]
- [Get the address as an unsigned integer in host byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.make_address_v4 [*make_address_v4]]]
- [Create an IPv4 address from raw bytes in network order.
-
- Create an IPv4 address from an unsigned integer in host byte order.
-
- Create an IPv4 address from an IP address string in dotted decimal form.
-
- Create an IPv4 address from a IPv4-mapped IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from an address and prefix length.
-
- Create an IPv4 network from an address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v4 `ip::address_v4`] class provides the ability to use and manipulate IP version 4 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__address_v4_range ip::address_v4_range]
-
-[indexterm1 asio.indexterm.ip__address_v4_range..ip::address_v4_range]
-Represents a range of IPv4 addresses.
-
-
- typedef basic_address_range< address_v4 > address_v4_range;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__address_v4.uint_type [*uint_type]]]
- [The type used to represent an address as an unsigned integer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor.
-
- Construct an address from raw bytes.
-
- Construct an address from an unsigned integer in host byte order.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address.
-
- (Deprecated: Use network_v4 class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.from_string [*from_string]]]
- [(Deprecated: Use make_address_v4().) Create an address from an IP address string in dotted decimal form. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class A address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class B address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class C address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.netmask [*netmask]]]
- [(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds to the address, based on its address class. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format.
-
- (Deprecated: Use other overload.) Get the address as a string in dotted decimal format. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_uint [*to_uint]]]
- [Get the address as an unsigned integer in host byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.make_address_v4 [*make_address_v4]]]
- [Create an IPv4 address from raw bytes in network order.
-
- Create an IPv4 address from an unsigned integer in host byte order.
-
- Create an IPv4 address from an IP address string in dotted decimal form.
-
- Create an IPv4 address from a IPv4-mapped IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from an address and prefix length.
-
- Create an IPv4 network from an address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v4 `ip::address_v4`] class provides the ability to use and manipulate IP version 4 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_range.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:ip__address_v6 ip::address_v6]
-
-
-Implements IP version 6 style addresses.
-
-
- class address_v6
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor.
-
- Construct an address from raw bytes and scope ID.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.from_string [*from_string]]]
- [(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.make_address_v6 [*make_address_v6]]]
- [Create an IPv6 address from raw bytes and scope ID.
-
- Create an IPv6 address from an IP address string.
-
- Createan IPv6 address from an IP address string.
-
- Create an IPv4-mapped IPv6 address from an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from an address and prefix length. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v6 `ip::address_v6`] class provides the ability to use and manipulate IP version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:address_v6 ip::address_v6::address_v6]
-
-[indexterm2 asio.indexterm.ip__address_v6.address_v6..address_v6..ip::address_v6]
-Default constructor.
-
-
- ``[link asio.reference.ip__address_v6.address_v6.overload1 address_v6]``();
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.address_v6.overload1 more...]]``
-
-
-Construct an address from raw bytes and scope ID.
-
-
- explicit ``[link asio.reference.ip__address_v6.address_v6.overload2 address_v6]``(
- const bytes_type & bytes,
- unsigned long scope_id = 0);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.address_v6.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__address_v6.address_v6.overload3 address_v6]``(
- const address_v6 & other);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.address_v6.overload3 more...]]``
-
-
-[section:overload1 ip::address_v6::address_v6 (1 of 3 overloads)]
-
-
-Default constructor.
-
-
- address_v6();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v6::address_v6 (2 of 3 overloads)]
-
-
-Construct an address from raw bytes and scope ID.
-
-
- address_v6(
- const bytes_type & bytes,
- unsigned long scope_id = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v6::address_v6 (3 of 3 overloads)]
-
-
-Copy constructor.
-
-
- address_v6(
- const address_v6 & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:any ip::address_v6::any]
-
-[indexterm2 asio.indexterm.ip__address_v6.any..any..ip::address_v6]
-Obtain an address object that represents any address.
-
-
- static address_v6 any();
-
-
-
-[endsect]
-
-
-
-[section:bytes_type ip::address_v6::bytes_type]
-
-[indexterm2 asio.indexterm.ip__address_v6.bytes_type..bytes_type..ip::address_v6]
-The type used to represent an address as an array of bytes.
-
-
- typedef array< unsigned char, 16 > bytes_type;
-
-
-
-
-[heading Remarks]
-
-This type is defined in terms of the C++0x template `std::array` when it is available. Otherwise, it uses `boost:array`.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:from_string ip::address_v6::from_string]
-
-[indexterm2 asio.indexterm.ip__address_v6.from_string..from_string..ip::address_v6]
-(Deprecated: Use `make_address_v6()`.) Create an IPv6 address from an IP address string.
-
-
- static address_v6 ``[link asio.reference.ip__address_v6.from_string.overload1 from_string]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.from_string.overload1 more...]]``
-
- static address_v6 ``[link asio.reference.ip__address_v6.from_string.overload2 from_string]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.from_string.overload2 more...]]``
-
- static address_v6 ``[link asio.reference.ip__address_v6.from_string.overload3 from_string]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.from_string.overload3 more...]]``
-
- static address_v6 ``[link asio.reference.ip__address_v6.from_string.overload4 from_string]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.from_string.overload4 more...]]``
-
-
-[section:overload1 ip::address_v6::from_string (1 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v6()`.) Create an IPv6 address from an IP address string.
-
-
- static address_v6 from_string(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v6::from_string (2 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v6()`.) Create an IPv6 address from an IP address string.
-
-
- static address_v6 from_string(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v6::from_string (3 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v6()`.) Create an IPv6 address from an IP address string.
-
-
- static address_v6 from_string(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address_v6::from_string (4 of 4 overloads)]
-
-
-(Deprecated: Use `make_address_v6()`.) Create an IPv6 address from an IP address string.
-
-
- static address_v6 from_string(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_link_local ip::address_v6::is_link_local]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_link_local..is_link_local..ip::address_v6]
-Determine whether the address is link local.
-
-
- bool is_link_local() const;
-
-
-
-[endsect]
-
-
-
-[section:is_loopback ip::address_v6::is_loopback]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_loopback..is_loopback..ip::address_v6]
-Determine whether the address is a loopback address.
-
-
- bool is_loopback() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast ip::address_v6::is_multicast]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_multicast..is_multicast..ip::address_v6]
-Determine whether the address is a multicast address.
-
-
- bool is_multicast() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast_global ip::address_v6::is_multicast_global]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_multicast_global..is_multicast_global..ip::address_v6]
-Determine whether the address is a global multicast address.
-
-
- bool is_multicast_global() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast_link_local ip::address_v6::is_multicast_link_local]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_multicast_link_local..is_multicast_link_local..ip::address_v6]
-Determine whether the address is a link-local multicast address.
-
-
- bool is_multicast_link_local() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast_node_local ip::address_v6::is_multicast_node_local]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_multicast_node_local..is_multicast_node_local..ip::address_v6]
-Determine whether the address is a node-local multicast address.
-
-
- bool is_multicast_node_local() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast_org_local ip::address_v6::is_multicast_org_local]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_multicast_org_local..is_multicast_org_local..ip::address_v6]
-Determine whether the address is a org-local multicast address.
-
-
- bool is_multicast_org_local() const;
-
-
-
-[endsect]
-
-
-
-[section:is_multicast_site_local ip::address_v6::is_multicast_site_local]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_multicast_site_local..is_multicast_site_local..ip::address_v6]
-Determine whether the address is a site-local multicast address.
-
-
- bool is_multicast_site_local() const;
-
-
-
-[endsect]
-
-
-
-[section:is_site_local ip::address_v6::is_site_local]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_site_local..is_site_local..ip::address_v6]
-Determine whether the address is site local.
-
-
- bool is_site_local() const;
-
-
-
-[endsect]
-
-
-
-[section:is_unspecified ip::address_v6::is_unspecified]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_unspecified..is_unspecified..ip::address_v6]
-Determine whether the address is unspecified.
-
-
- bool is_unspecified() const;
-
-
-
-[endsect]
-
-
-
-[section:is_v4_compatible ip::address_v6::is_v4_compatible]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_v4_compatible..is_v4_compatible..ip::address_v6]
-(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address.
-
-
- bool is_v4_compatible() const;
-
-
-
-[endsect]
-
-
-
-[section:is_v4_mapped ip::address_v6::is_v4_mapped]
-
-[indexterm2 asio.indexterm.ip__address_v6.is_v4_mapped..is_v4_mapped..ip::address_v6]
-Determine whether the address is a mapped IPv4 address.
-
-
- bool is_v4_mapped() const;
-
-
-
-[endsect]
-
-
-
-[section:loopback ip::address_v6::loopback]
-
-[indexterm2 asio.indexterm.ip__address_v6.loopback..loopback..ip::address_v6]
-Obtain an address object that represents the loopback address.
-
-
- static address_v6 loopback();
-
-
-
-[endsect]
-
-
-[section:make_address_v6 ip::address_v6::make_address_v6]
-
-[indexterm2 asio.indexterm.ip__address_v6.make_address_v6..make_address_v6..ip::address_v6]
-Create an IPv6 address from raw bytes and scope ID.
-
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload1 make_address_v6]``(
- const address_v6::bytes_type & bytes,
- unsigned long scope_id = 0);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload1 more...]]``
-
-
-Create an IPv6 address from an IP address string.
-
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload2 make_address_v6]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload2 more...]]``
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload3 make_address_v6]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload3 more...]]``
-
-
-Createan IPv6 address from an IP address string.
-
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload4 make_address_v6]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload4 more...]]``
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload5 make_address_v6]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload5 more...]]``
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload6 make_address_v6]``(
- string_view str);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload6 more...]]``
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload7 make_address_v6]``(
- string_view str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload7 more...]]``
-
-
-Create an IPv4-mapped IPv6 address from an IPv4 address.
-
-
- address_v6 ``[link asio.reference.ip__address_v6.make_address_v6.overload8 make_address_v6]``(
- v4_mapped_t ,
- const address_v4 & v4_addr);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.make_address_v6.overload8 more...]]``
-
-
-[section:overload1 ip::address_v6::make_address_v6 (1 of 8 overloads)]
-
-
-Create an IPv6 address from raw bytes and scope ID.
-
-
- address_v6 make_address_v6(
- const address_v6::bytes_type & bytes,
- unsigned long scope_id = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v6::make_address_v6 (2 of 8 overloads)]
-
-
-Create an IPv6 address from an IP address string.
-
-
- address_v6 make_address_v6(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::address_v6::make_address_v6 (3 of 8 overloads)]
-
-
-Create an IPv6 address from an IP address string.
-
-
- address_v6 make_address_v6(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::address_v6::make_address_v6 (4 of 8 overloads)]
-
-
-Createan IPv6 address from an IP address string.
-
-
- address_v6 make_address_v6(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload5 ip::address_v6::make_address_v6 (5 of 8 overloads)]
-
-
-Create an IPv6 address from an IP address string.
-
-
- address_v6 make_address_v6(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload6 ip::address_v6::make_address_v6 (6 of 8 overloads)]
-
-
-Create an IPv6 address from an IP address string.
-
-
- address_v6 make_address_v6(
- string_view str);
-
-
-
-[endsect]
-
-
-
-[section:overload7 ip::address_v6::make_address_v6 (7 of 8 overloads)]
-
-
-Create an IPv6 address from an IP address string.
-
-
- address_v6 make_address_v6(
- string_view str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload8 ip::address_v6::make_address_v6 (8 of 8 overloads)]
-
-
-Create an IPv4-mapped IPv6 address from an IPv4 address.
-
-
- address_v6 make_address_v6(
- v4_mapped_t ,
- const address_v4 & v4_addr);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:make_network_v6 ip::address_v6::make_network_v6]
-
-[indexterm2 asio.indexterm.ip__address_v6.make_network_v6..make_network_v6..ip::address_v6]
-Create an IPv6 network from an address and prefix length.
-
-
- network_v6 make_network_v6(
- const address_v6 & addr,
- unsigned short prefix_len);
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::address_v6::operator!=]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_not__eq_..operator!=..ip::address_v6]
-Compare two addresses for inequality.
-
-
- friend bool operator!=(
- const address_v6 & a1,
- const address_v6 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt_ ip::address_v6::operator<]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_lt_..operator<..ip::address_v6]
-Compare addresses for ordering.
-
-
- friend bool operator<(
- const address_v6 & a1,
- const address_v6 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_lt__lt_ ip::address_v6::operator<<]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_lt__lt_..operator<<..ip::address_v6]
-Output an address as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & ``[link asio.reference.ip__address_v6.operator_lt__lt_.overload1 operator<<]``(
- std::basic_ostream< Elem, Traits > & os,
- const address_v6 & addr);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.operator_lt__lt_.overload1 more...]]``
-
-
-Output a network as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & ``[link asio.reference.ip__address_v6.operator_lt__lt_.overload2 operator<<]``(
- std::basic_ostream< Elem, Traits > & os,
- const network_v6 & net);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.operator_lt__lt_.overload2 more...]]``
-
-
-[section:overload1 ip::address_v6::operator<< (1 of 2 overloads)]
-
-
-Output an address as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const address_v6 & addr);
-
-
-Used to output a human-readable string for a specified address.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[addr][The address to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v6::operator<< (2 of 2 overloads)]
-
-
-Output a network as a string.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const network_v6 & net);
-
-
-Used to output a human-readable string for a specified network.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[net][The network to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_lt__eq_ ip::address_v6::operator<=]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_lt__eq_..operator<=..ip::address_v6]
-Compare addresses for ordering.
-
-
- friend bool operator<=(
- const address_v6 & a1,
- const address_v6 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::address_v6::operator=]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_eq_..operator=..ip::address_v6]
-Assign from another address.
-
-
- address_v6 & operator=(
- const address_v6 & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::address_v6::operator==]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_eq__eq_..operator==..ip::address_v6]
-Compare two addresses for equality.
-
-
- friend bool operator==(
- const address_v6 & a1,
- const address_v6 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ ip::address_v6::operator>]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_gt_..operator>..ip::address_v6]
-Compare addresses for ordering.
-
-
- friend bool operator>(
- const address_v6 & a1,
- const address_v6 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ ip::address_v6::operator>=]
-
-[indexterm2 asio.indexterm.ip__address_v6.operator_gt__eq_..operator>=..ip::address_v6]
-Compare addresses for ordering.
-
-
- friend bool operator>=(
- const address_v6 & a1,
- const address_v6 & a2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:scope_id ip::address_v6::scope_id]
-
-[indexterm2 asio.indexterm.ip__address_v6.scope_id..scope_id..ip::address_v6]
-The scope ID of the address.
-
-
- unsigned long ``[link asio.reference.ip__address_v6.scope_id.overload1 scope_id]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.scope_id.overload1 more...]]``
-
- void ``[link asio.reference.ip__address_v6.scope_id.overload2 scope_id]``(
- unsigned long id);
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.scope_id.overload2 more...]]``
-
-
-[section:overload1 ip::address_v6::scope_id (1 of 2 overloads)]
-
-
-The scope ID of the address.
-
-
- unsigned long scope_id() const;
-
-
-Returns the scope ID associated with the IPv6 address.
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v6::scope_id (2 of 2 overloads)]
-
-
-The scope ID of the address.
-
-
- void scope_id(
- unsigned long id);
-
-
-Modifies the scope ID associated with the IPv6 address.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:to_bytes ip::address_v6::to_bytes]
-
-[indexterm2 asio.indexterm.ip__address_v6.to_bytes..to_bytes..ip::address_v6]
-Get the address in bytes, in network byte order.
-
-
- bytes_type to_bytes() const;
-
-
-
-[endsect]
-
-
-[section:to_string ip::address_v6::to_string]
-
-[indexterm2 asio.indexterm.ip__address_v6.to_string..to_string..ip::address_v6]
-Get the address as a string.
-
-
- std::string ``[link asio.reference.ip__address_v6.to_string.overload1 to_string]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.to_string.overload1 more...]]``
-
-
-(Deprecated: Use other overload.) Get the address as a string.
-
-
- std::string ``[link asio.reference.ip__address_v6.to_string.overload2 to_string]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.ip__address_v6.to_string.overload2 more...]]``
-
-
-[section:overload1 ip::address_v6::to_string (1 of 2 overloads)]
-
-
-Get the address as a string.
-
-
- std::string to_string() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::address_v6::to_string (2 of 2 overloads)]
-
-
-(Deprecated: Use other overload.) Get the address as a string.
-
-
- std::string to_string(
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:to_v4 ip::address_v6::to_v4]
-
-[indexterm2 asio.indexterm.ip__address_v6.to_v4..to_v4..ip::address_v6]
-(Deprecated: Use `make_address_v4()`.) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address.
-
-
- address_v4 to_v4() const;
-
-
-
-[endsect]
-
-
-
-[section:v4_compatible ip::address_v6::v4_compatible]
-
-[indexterm2 asio.indexterm.ip__address_v6.v4_compatible..v4_compatible..ip::address_v6]
-(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address.
-
-
- static address_v6 v4_compatible(
- const address_v4 & addr);
-
-
-
-[endsect]
-
-
-
-[section:v4_mapped ip::address_v6::v4_mapped]
-
-[indexterm2 asio.indexterm.ip__address_v6.v4_mapped..v4_mapped..ip::address_v6]
-(Deprecated: Use `make_address_v6()`.) Create an IPv4-mapped IPv6 address.
-
-
- static address_v6 v4_mapped(
- const address_v4 & addr);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ip__address_v6_iterator ip::address_v6_iterator]
-
-[indexterm1 asio.indexterm.ip__address_v6_iterator..ip::address_v6_iterator]
-An input iterator that can be used for traversing IPv6 addresses.
-
-
- typedef basic_address_iterator< address_v6 > address_v6_iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor.
-
- Construct an address from raw bytes and scope ID.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.from_string [*from_string]]]
- [(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.make_address_v6 [*make_address_v6]]]
- [Create an IPv6 address from raw bytes and scope ID.
-
- Create an IPv6 address from an IP address string.
-
- Createan IPv6 address from an IP address string.
-
- Create an IPv4-mapped IPv6 address from an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from an address and prefix length. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v6 `ip::address_v6`] class provides the ability to use and manipulate IP version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__address_v6_range ip::address_v6_range]
-
-[indexterm1 asio.indexterm.ip__address_v6_range..ip::address_v6_range]
-Represents a range of IPv6 addresses.
-
-
- typedef basic_address_range< address_v6 > address_v6_range;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor.
-
- Construct an address from raw bytes and scope ID.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.from_string [*from_string]]]
- [(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.make_address_v6 [*make_address_v6]]]
- [Create an IPv6 address from raw bytes and scope ID.
-
- Create an IPv6 address from an IP address string.
-
- Createan IPv6 address from an IP address string.
-
- Create an IPv4-mapped IPv6 address from an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from an address and prefix length. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v6 `ip::address_v6`] class provides the ability to use and manipulate IP version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_range.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:ip__bad_address_cast ip::bad_address_cast]
-
-
-Thrown to indicate a failed address conversion.
-
-
- class bad_address_cast
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__bad_address_cast.bad_address_cast [*bad_address_cast]]]
- [Default constructor. ]
- ]
-
- [
- [[link asio.reference.ip__bad_address_cast.what [*what]]]
- [Get the message associated with the exception. ]
- ]
-
- [
- [[link asio.reference.ip__bad_address_cast._bad_address_cast [*~bad_address_cast]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ip/bad_address_cast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:bad_address_cast ip::bad_address_cast::bad_address_cast]
-
-[indexterm2 asio.indexterm.ip__bad_address_cast.bad_address_cast..bad_address_cast..ip::bad_address_cast]
-Default constructor.
-
-
- bad_address_cast();
-
-
-
-[endsect]
-
-
-
-[section:what ip::bad_address_cast::what]
-
-[indexterm2 asio.indexterm.ip__bad_address_cast.what..what..ip::bad_address_cast]
-Get the message associated with the exception.
-
-
- virtual const char * what() const;
-
-
-
-[endsect]
-
-
-
-[section:_bad_address_cast ip::bad_address_cast::~bad_address_cast]
-
-[indexterm2 asio.indexterm.ip__bad_address_cast._bad_address_cast..~bad_address_cast..ip::bad_address_cast]
-Destructor.
-
-
- virtual ~bad_address_cast();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_address_iterator_lt__address_v4__gt_ ip::basic_address_iterator< address_v4 >]
-
-
-An input iterator that can be used for traversing IPv4 addresses.
-
-
- template<>
- class basic_address_iterator< address_v4 >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.difference_type [*difference_type]]]
- [Distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.iterator_category [*iterator_category]]]
- [Denotes that the iterator satisfies the input iterator requirements. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.pointer [*pointer]]]
- [The type of a pointer to an element pointed to by the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.reference [*reference]]]
- [The type of a reference to an element pointed to by the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.value_type [*value_type]]]
- [The type of the elements pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator [*basic_address_iterator]]]
- [Construct an iterator that points to the specified address.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator__star_ [*operator *]]]
- [Dereference the iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_ [*operator++]]]
- [Pre-increment operator.
-
- Post-increment operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_ [*operator--]]]
- [Pre-decrement operator.
-
- Post-decrement operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_arrow_ [*operator->]]]
- [Dereference the iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_eq_ [*operator=]]]
- [Assignment operator. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
-]
-
-In addition to satisfying the input iterator requirements, this iterator also supports decrement.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_address_iterator ip::basic_address_iterator< address_v4 >::basic_address_iterator]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator..basic_address_iterator..ip::basic_address_iterator< address_v4 >]
-Construct an iterator that points to the specified address.
-
-
- ``[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator.overload1 basic_address_iterator]``(
- const address_v4 & addr);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator.overload1 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator.overload2 basic_address_iterator]``(
- const basic_address_iterator & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.basic_address_iterator.overload2 more...]]``
-
-
-[section:overload1 ip::basic_address_iterator< address_v4 >::basic_address_iterator (1 of 2 overloads)]
-
-
-Construct an iterator that points to the specified address.
-
-
- basic_address_iterator(
- const address_v4 & addr);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_iterator< address_v4 >::basic_address_iterator (2 of 2 overloads)]
-
-
-Copy constructor.
-
-
- basic_address_iterator(
- const basic_address_iterator & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:difference_type ip::basic_address_iterator< address_v4 >::difference_type]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.difference_type..difference_type..ip::basic_address_iterator< address_v4 >]
-Distance between two iterators.
-
-
- typedef std::ptrdiff_t difference_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:iterator_category ip::basic_address_iterator< address_v4 >::iterator_category]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.iterator_category..iterator_category..ip::basic_address_iterator< address_v4 >]
-Denotes that the iterator satisfies the input iterator requirements.
-
-
- typedef std::input_iterator_tag iterator_category;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator__star_ ip::basic_address_iterator< address_v4 >::operator *]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator__star_..operator *..ip::basic_address_iterator< address_v4 >]
-Dereference the iterator.
-
-
- const address_v4 & operator *() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::basic_address_iterator< address_v4 >::operator!=]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_not__eq_..operator!=..ip::basic_address_iterator< address_v4 >]
-Compare two addresses for inequality.
-
-
- friend bool operator!=(
- const basic_address_iterator & a,
- const basic_address_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_plus__plus_ ip::basic_address_iterator< address_v4 >::operator++]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_..operator++..ip::basic_address_iterator< address_v4 >]
-Pre-increment operator.
-
-
- basic_address_iterator & ``[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_.overload1 operator++]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_.overload1 more...]]``
-
-
-Post-increment operator.
-
-
- basic_address_iterator ``[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_.overload2 operator++]``(
- int );
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_plus__plus_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_address_iterator< address_v4 >::operator++ (1 of 2 overloads)]
-
-
-Pre-increment operator.
-
-
- basic_address_iterator & operator++();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_iterator< address_v4 >::operator++ (2 of 2 overloads)]
-
-
-Post-increment operator.
-
-
- basic_address_iterator operator++(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_minus__minus_ ip::basic_address_iterator< address_v4 >::operator--]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_..operator--..ip::basic_address_iterator< address_v4 >]
-Pre-decrement operator.
-
-
- basic_address_iterator & ``[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_.overload1 operator--]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_.overload1 more...]]``
-
-
-Post-decrement operator.
-
-
- basic_address_iterator ``[link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_.overload2 operator--]``(
- int );
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v4__gt_.operator_minus__minus_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_address_iterator< address_v4 >::operator-- (1 of 2 overloads)]
-
-
-Pre-decrement operator.
-
-
- basic_address_iterator & operator--();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_iterator< address_v4 >::operator-- (2 of 2 overloads)]
-
-
-Post-decrement operator.
-
-
- basic_address_iterator operator--(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_arrow_ ip::basic_address_iterator< address_v4 >::operator->]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_arrow_..operator->..ip::basic_address_iterator< address_v4 >]
-Dereference the iterator.
-
-
- const address_v4 * operator->() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::basic_address_iterator< address_v4 >::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_eq_..operator=..ip::basic_address_iterator< address_v4 >]
-Assignment operator.
-
-
- basic_address_iterator & operator=(
- const basic_address_iterator & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::basic_address_iterator< address_v4 >::operator==]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.operator_eq__eq_..operator==..ip::basic_address_iterator< address_v4 >]
-Compare two addresses for equality.
-
-
- friend bool operator==(
- const basic_address_iterator & a,
- const basic_address_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:pointer ip::basic_address_iterator< address_v4 >::pointer]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.pointer..pointer..ip::basic_address_iterator< address_v4 >]
-The type of a pointer to an element pointed to by the iterator.
-
-
- typedef const address_v4 * pointer;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reference ip::basic_address_iterator< address_v4 >::reference]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.reference..reference..ip::basic_address_iterator< address_v4 >]
-The type of a reference to an element pointed to by the iterator.
-
-
- typedef const address_v4 & reference;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__address_v4.uint_type [*uint_type]]]
- [The type used to represent an address as an unsigned integer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor.
-
- Construct an address from raw bytes.
-
- Construct an address from an unsigned integer in host byte order.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address.
-
- (Deprecated: Use network_v4 class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.from_string [*from_string]]]
- [(Deprecated: Use make_address_v4().) Create an address from an IP address string in dotted decimal form. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class A address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class B address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class C address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.netmask [*netmask]]]
- [(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds to the address, based on its address class. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format.
-
- (Deprecated: Use other overload.) Get the address as a string in dotted decimal format. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_uint [*to_uint]]]
- [Get the address as an unsigned integer in host byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.make_address_v4 [*make_address_v4]]]
- [Create an IPv4 address from raw bytes in network order.
-
- Create an IPv4 address from an unsigned integer in host byte order.
-
- Create an IPv4 address from an IP address string in dotted decimal form.
-
- Create an IPv4 address from a IPv4-mapped IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from an address and prefix length.
-
- Create an IPv4 network from an address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v4 `ip::address_v4`] class provides the ability to use and manipulate IP version 4 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:value_type ip::basic_address_iterator< address_v4 >::value_type]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v4__gt_.value_type..value_type..ip::basic_address_iterator< address_v4 >]
-The type of the elements pointed to by the iterator.
-
-
- typedef address_v4 value_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__address_v4.uint_type [*uint_type]]]
- [The type used to represent an address as an unsigned integer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor.
-
- Construct an address from raw bytes.
-
- Construct an address from an unsigned integer in host byte order.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address.
-
- (Deprecated: Use network_v4 class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.from_string [*from_string]]]
- [(Deprecated: Use make_address_v4().) Create an address from an IP address string in dotted decimal form. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class A address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class B address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class C address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.netmask [*netmask]]]
- [(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds to the address, based on its address class. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format.
-
- (Deprecated: Use other overload.) Get the address as a string in dotted decimal format. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_uint [*to_uint]]]
- [Get the address as an unsigned integer in host byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.make_address_v4 [*make_address_v4]]]
- [Create an IPv4 address from raw bytes in network order.
-
- Create an IPv4 address from an unsigned integer in host byte order.
-
- Create an IPv4 address from an IP address string in dotted decimal form.
-
- Create an IPv4 address from a IPv4-mapped IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from an address and prefix length.
-
- Create an IPv4 network from an address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v4 `ip::address_v4`] class provides the ability to use and manipulate IP version 4 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_address_iterator_lt__address_v6__gt_ ip::basic_address_iterator< address_v6 >]
-
-
-An input iterator that can be used for traversing IPv6 addresses.
-
-
- template<>
- class basic_address_iterator< address_v6 >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.difference_type [*difference_type]]]
- [Distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.iterator_category [*iterator_category]]]
- [Denotes that the iterator satisfies the input iterator requirements. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.pointer [*pointer]]]
- [The type of a pointer to an element pointed to by the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.reference [*reference]]]
- [The type of a reference to an element pointed to by the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.value_type [*value_type]]]
- [The type of the elements pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator [*basic_address_iterator]]]
- [Construct an iterator that points to the specified address.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator__star_ [*operator *]]]
- [Dereference the iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_ [*operator++]]]
- [Pre-increment operator.
-
- Post-increment operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_ [*operator--]]]
- [Pre-decrement operator.
-
- Post-decrement operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_arrow_ [*operator->]]]
- [Dereference the iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_eq_ [*operator=]]]
- [Assignment operator. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
-]
-
-In addition to satisfying the input iterator requirements, this iterator also supports decrement.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_address_iterator ip::basic_address_iterator< address_v6 >::basic_address_iterator]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator..basic_address_iterator..ip::basic_address_iterator< address_v6 >]
-Construct an iterator that points to the specified address.
-
-
- ``[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator.overload1 basic_address_iterator]``(
- const address_v6 & addr);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator.overload1 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator.overload2 basic_address_iterator]``(
- const basic_address_iterator & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.basic_address_iterator.overload2 more...]]``
-
-
-[section:overload1 ip::basic_address_iterator< address_v6 >::basic_address_iterator (1 of 2 overloads)]
-
-
-Construct an iterator that points to the specified address.
-
-
- basic_address_iterator(
- const address_v6 & addr);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_iterator< address_v6 >::basic_address_iterator (2 of 2 overloads)]
-
-
-Copy constructor.
-
-
- basic_address_iterator(
- const basic_address_iterator & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:difference_type ip::basic_address_iterator< address_v6 >::difference_type]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.difference_type..difference_type..ip::basic_address_iterator< address_v6 >]
-Distance between two iterators.
-
-
- typedef std::ptrdiff_t difference_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:iterator_category ip::basic_address_iterator< address_v6 >::iterator_category]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.iterator_category..iterator_category..ip::basic_address_iterator< address_v6 >]
-Denotes that the iterator satisfies the input iterator requirements.
-
-
- typedef std::input_iterator_tag iterator_category;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator__star_ ip::basic_address_iterator< address_v6 >::operator *]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator__star_..operator *..ip::basic_address_iterator< address_v6 >]
-Dereference the iterator.
-
-
- const address_v6 & operator *() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::basic_address_iterator< address_v6 >::operator!=]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_not__eq_..operator!=..ip::basic_address_iterator< address_v6 >]
-Compare two addresses for inequality.
-
-
- friend bool operator!=(
- const basic_address_iterator & a,
- const basic_address_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_plus__plus_ ip::basic_address_iterator< address_v6 >::operator++]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_..operator++..ip::basic_address_iterator< address_v6 >]
-Pre-increment operator.
-
-
- basic_address_iterator & ``[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_.overload1 operator++]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_.overload1 more...]]``
-
-
-Post-increment operator.
-
-
- basic_address_iterator ``[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_.overload2 operator++]``(
- int );
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_plus__plus_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_address_iterator< address_v6 >::operator++ (1 of 2 overloads)]
-
-
-Pre-increment operator.
-
-
- basic_address_iterator & operator++();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_iterator< address_v6 >::operator++ (2 of 2 overloads)]
-
-
-Post-increment operator.
-
-
- basic_address_iterator operator++(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_minus__minus_ ip::basic_address_iterator< address_v6 >::operator--]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_..operator--..ip::basic_address_iterator< address_v6 >]
-Pre-decrement operator.
-
-
- basic_address_iterator & ``[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_.overload1 operator--]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_.overload1 more...]]``
-
-
-Post-decrement operator.
-
-
- basic_address_iterator ``[link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_.overload2 operator--]``(
- int );
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_iterator_lt__address_v6__gt_.operator_minus__minus_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_address_iterator< address_v6 >::operator-- (1 of 2 overloads)]
-
-
-Pre-decrement operator.
-
-
- basic_address_iterator & operator--();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_iterator< address_v6 >::operator-- (2 of 2 overloads)]
-
-
-Post-decrement operator.
-
-
- basic_address_iterator operator--(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_arrow_ ip::basic_address_iterator< address_v6 >::operator->]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_arrow_..operator->..ip::basic_address_iterator< address_v6 >]
-Dereference the iterator.
-
-
- const address_v6 * operator->() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::basic_address_iterator< address_v6 >::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_eq_..operator=..ip::basic_address_iterator< address_v6 >]
-Assignment operator.
-
-
- basic_address_iterator & operator=(
- const basic_address_iterator & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::basic_address_iterator< address_v6 >::operator==]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.operator_eq__eq_..operator==..ip::basic_address_iterator< address_v6 >]
-Compare two addresses for equality.
-
-
- friend bool operator==(
- const basic_address_iterator & a,
- const basic_address_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:pointer ip::basic_address_iterator< address_v6 >::pointer]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.pointer..pointer..ip::basic_address_iterator< address_v6 >]
-The type of a pointer to an element pointed to by the iterator.
-
-
- typedef const address_v6 * pointer;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reference ip::basic_address_iterator< address_v6 >::reference]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.reference..reference..ip::basic_address_iterator< address_v6 >]
-The type of a reference to an element pointed to by the iterator.
-
-
- typedef const address_v6 & reference;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor.
-
- Construct an address from raw bytes and scope ID.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.from_string [*from_string]]]
- [(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.make_address_v6 [*make_address_v6]]]
- [Create an IPv6 address from raw bytes and scope ID.
-
- Create an IPv6 address from an IP address string.
-
- Createan IPv6 address from an IP address string.
-
- Create an IPv4-mapped IPv6 address from an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from an address and prefix length. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v6 `ip::address_v6`] class provides the ability to use and manipulate IP version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:value_type ip::basic_address_iterator< address_v6 >::value_type]
-
-[indexterm2 asio.indexterm.ip__basic_address_iterator_lt__address_v6__gt_.value_type..value_type..ip::basic_address_iterator< address_v6 >]
-The type of the elements pointed to by the iterator.
-
-
- typedef address_v6 value_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor.
-
- Construct an address from raw bytes and scope ID.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.from_string [*from_string]]]
- [(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.make_address_v6 [*make_address_v6]]]
- [Create an IPv6 address from raw bytes and scope ID.
-
- Create an IPv6 address from an IP address string.
-
- Createan IPv6 address from an IP address string.
-
- Create an IPv4-mapped IPv6 address from an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from an address and prefix length. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v6 `ip::address_v6`] class provides the ability to use and manipulate IP version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_address_range_lt__address_v4__gt_ ip::basic_address_range< address_v4 >]
-
-
-Represents a range of IPv4 addresses.
-
-
- template<>
- class basic_address_range< address_v4 >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.iterator [*iterator]]]
- [The type of an iterator that points into the range. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range [*basic_address_range]]]
- [Construct an empty range.
-
- Construct an range that represents the given range of addresses.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.begin [*begin]]]
- [Obtain an iterator that points to the start of the range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.empty [*empty]]]
- [Determine whether the range is empty. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.end [*end]]]
- [Obtain an iterator that points to the end of the range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.find [*find]]]
- [Find an address in the range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.operator_eq_ [*operator=]]]
- [Assignment operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.size [*size]]]
- [Return the size of the range. ]
- ]
-
-]
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_range.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_address_range ip::basic_address_range< address_v4 >::basic_address_range]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.basic_address_range..basic_address_range..ip::basic_address_range< address_v4 >]
-Construct an empty range.
-
-
- ``[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range.overload1 basic_address_range]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range.overload1 more...]]``
-
-
-Construct an range that represents the given range of addresses.
-
-
- explicit ``[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range.overload2 basic_address_range]``(
- const iterator & first,
- const iterator & last);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range.overload3 basic_address_range]``(
- const basic_address_range & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_range_lt__address_v4__gt_.basic_address_range.overload3 more...]]``
-
-
-[section:overload1 ip::basic_address_range< address_v4 >::basic_address_range (1 of 3 overloads)]
-
-
-Construct an empty range.
-
-
- basic_address_range();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_range< address_v4 >::basic_address_range (2 of 3 overloads)]
-
-
-Construct an range that represents the given range of addresses.
-
-
- basic_address_range(
- const iterator & first,
- const iterator & last);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_address_range< address_v4 >::basic_address_range (3 of 3 overloads)]
-
-
-Copy constructor.
-
-
- basic_address_range(
- const basic_address_range & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:begin ip::basic_address_range< address_v4 >::begin]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.begin..begin..ip::basic_address_range< address_v4 >]
-Obtain an iterator that points to the start of the range.
-
-
- iterator begin() const;
-
-
-
-[endsect]
-
-
-
-[section:empty ip::basic_address_range< address_v4 >::empty]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.empty..empty..ip::basic_address_range< address_v4 >]
-Determine whether the range is empty.
-
-
- bool empty() const;
-
-
-
-[endsect]
-
-
-
-[section:end ip::basic_address_range< address_v4 >::end]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.end..end..ip::basic_address_range< address_v4 >]
-Obtain an iterator that points to the end of the range.
-
-
- iterator end() const;
-
-
-
-[endsect]
-
-
-
-[section:find ip::basic_address_range< address_v4 >::find]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.find..find..ip::basic_address_range< address_v4 >]
-Find an address in the range.
-
-
- iterator find(
- const address_v4 & addr) const;
-
-
-
-[endsect]
-
-
-
-[section:iterator ip::basic_address_range< address_v4 >::iterator]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.iterator..iterator..ip::basic_address_range< address_v4 >]
-The type of an iterator that points into the range.
-
-
- typedef basic_address_iterator< address_v4 > iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v4.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__address_v4.uint_type [*uint_type]]]
- [The type used to represent an address as an unsigned integer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.address_v4 [*address_v4]]]
- [Default constructor.
-
- Construct an address from raw bytes.
-
- Construct an address from an unsigned integer in host byte order.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the broadcast address.
-
- (Deprecated: Use network_v4 class.) Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.from_string [*from_string]]]
- [(Deprecated: Use make_address_v4().) Create an address from an IP address string in dotted decimal form. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_a [*is_class_a]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class A address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_b [*is_class_b]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class B address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_class_c [*is_class_c]]]
- [(Deprecated: Use network_v4 class.) Determine whether the address is a class C address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.netmask [*netmask]]]
- [(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds to the address, based on its address class. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_string [*to_string]]]
- [Get the address as a string in dotted decimal format.
-
- (Deprecated: Use other overload.) Get the address as a string in dotted decimal format. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_uint [*to_uint]]]
- [Get the address as an unsigned integer in host byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.to_ulong [*to_ulong]]]
- [Get the address as an unsigned long in host byte order. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v4.make_address_v4 [*make_address_v4]]]
- [Create an IPv4 address from raw bytes in network order.
-
- Create an IPv4 address from an unsigned integer in host byte order.
-
- Create an IPv4 address from an IP address string in dotted decimal form.
-
- Create an IPv4 address from a IPv4-mapped IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from an address and prefix length.
-
- Create an IPv4 network from an address and netmask. ]
- ]
-
- [
- [[link asio.reference.ip__address_v4.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v4 `ip::address_v4`] class provides the ability to use and manipulate IP version 4 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v4_range.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::basic_address_range< address_v4 >::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.operator_eq_..operator=..ip::basic_address_range< address_v4 >]
-Assignment operator.
-
-
- basic_address_range & operator=(
- const basic_address_range & other);
-
-
-
-[endsect]
-
-
-
-[section:size ip::basic_address_range< address_v4 >::size]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v4__gt_.size..size..ip::basic_address_range< address_v4 >]
-Return the size of the range.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_address_range_lt__address_v6__gt_ ip::basic_address_range< address_v6 >]
-
-
-Represents a range of IPv6 addresses.
-
-
- template<>
- class basic_address_range< address_v6 >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.iterator [*iterator]]]
- [The type of an iterator that points into the range. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range [*basic_address_range]]]
- [Construct an empty range.
-
- Construct an range that represents the given range of addresses.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.begin [*begin]]]
- [Obtain an iterator that points to the start of the range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.empty [*empty]]]
- [Determine whether the range is empty. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.end [*end]]]
- [Obtain an iterator that points to the end of the range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.find [*find]]]
- [Find an address in the range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.operator_eq_ [*operator=]]]
- [Assignment operator. ]
- ]
-
-]
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_range.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_address_range ip::basic_address_range< address_v6 >::basic_address_range]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.basic_address_range..basic_address_range..ip::basic_address_range< address_v6 >]
-Construct an empty range.
-
-
- ``[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range.overload1 basic_address_range]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range.overload1 more...]]``
-
-
-Construct an range that represents the given range of addresses.
-
-
- explicit ``[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range.overload2 basic_address_range]``(
- const iterator & first,
- const iterator & last);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range.overload3 basic_address_range]``(
- const basic_address_range & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_address_range_lt__address_v6__gt_.basic_address_range.overload3 more...]]``
-
-
-[section:overload1 ip::basic_address_range< address_v6 >::basic_address_range (1 of 3 overloads)]
-
-
-Construct an empty range.
-
-
- basic_address_range();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_address_range< address_v6 >::basic_address_range (2 of 3 overloads)]
-
-
-Construct an range that represents the given range of addresses.
-
-
- basic_address_range(
- const iterator & first,
- const iterator & last);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_address_range< address_v6 >::basic_address_range (3 of 3 overloads)]
-
-
-Copy constructor.
-
-
- basic_address_range(
- const basic_address_range & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:begin ip::basic_address_range< address_v6 >::begin]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.begin..begin..ip::basic_address_range< address_v6 >]
-Obtain an iterator that points to the start of the range.
-
-
- iterator begin() const;
-
-
-
-[endsect]
-
-
-
-[section:empty ip::basic_address_range< address_v6 >::empty]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.empty..empty..ip::basic_address_range< address_v6 >]
-Determine whether the range is empty.
-
-
- bool empty() const;
-
-
-
-[endsect]
-
-
-
-[section:end ip::basic_address_range< address_v6 >::end]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.end..end..ip::basic_address_range< address_v6 >]
-Obtain an iterator that points to the end of the range.
-
-
- iterator end() const;
-
-
-
-[endsect]
-
-
-
-[section:find ip::basic_address_range< address_v6 >::find]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.find..find..ip::basic_address_range< address_v6 >]
-Find an address in the range.
-
-
- iterator find(
- const address_v6 & addr) const;
-
-
-
-[endsect]
-
-
-
-[section:iterator ip::basic_address_range< address_v6 >::iterator]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.iterator..iterator..ip::basic_address_range< address_v6 >]
-The type of an iterator that points into the range.
-
-
- typedef basic_address_iterator< address_v6 > iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__address_v6.bytes_type [*bytes_type]]]
- [The type used to represent an address as an array of bytes. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.address_v6 [*address_v6]]]
- [Default constructor.
-
- Construct an address from raw bytes and scope ID.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.any [*any]]]
- [Obtain an address object that represents any address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.from_string [*from_string]]]
- [(Deprecated: Use make_address_v6().) Create an IPv6 address from an IP address string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_link_local [*is_link_local]]]
- [Determine whether the address is link local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_loopback [*is_loopback]]]
- [Determine whether the address is a loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast [*is_multicast]]]
- [Determine whether the address is a multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_global [*is_multicast_global]]]
- [Determine whether the address is a global multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_link_local [*is_multicast_link_local]]]
- [Determine whether the address is a link-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_node_local [*is_multicast_node_local]]]
- [Determine whether the address is a node-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_org_local [*is_multicast_org_local]]]
- [Determine whether the address is a org-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_multicast_site_local [*is_multicast_site_local]]]
- [Determine whether the address is a site-local multicast address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_site_local [*is_site_local]]]
- [Determine whether the address is site local. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_unspecified [*is_unspecified]]]
- [Determine whether the address is unspecified. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_compatible [*is_v4_compatible]]]
- [(Deprecated: No replacement.) Determine whether the address is an IPv4-compatible address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.is_v4_mapped [*is_v4_mapped]]]
- [Determine whether the address is a mapped IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.loopback [*loopback]]]
- [Obtain an address object that represents the loopback address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq_ [*operator=]]]
- [Assign from another address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.scope_id [*scope_id]]]
- [The scope ID of the address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_bytes [*to_bytes]]]
- [Get the address in bytes, in network byte order. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_string [*to_string]]]
- [Get the address as a string.
-
- (Deprecated: Use other overload.) Get the address as a string. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.to_v4 [*to_v4]]]
- [(Deprecated: Use make_address_v4().) Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_compatible [*v4_compatible]]]
- [(Deprecated: No replacement.) Create an IPv4-compatible IPv6 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.v4_mapped [*v4_mapped]]]
- [(Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.operator_not__eq_ [*operator!=]]]
- [Compare two addresses for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt_ [*operator<]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__eq_ [*operator<=]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_eq__eq_ [*operator==]]]
- [Compare two addresses for equality. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt_ [*operator>]]]
- [Compare addresses for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_gt__eq_ [*operator>=]]]
- [Compare addresses for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__address_v6.make_address_v6 [*make_address_v6]]]
- [Create an IPv6 address from raw bytes and scope ID.
-
- Create an IPv6 address from an IP address string.
-
- Createan IPv6 address from an IP address string.
-
- Create an IPv4-mapped IPv6 address from an IPv4 address. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from an address and prefix length. ]
- ]
-
- [
- [[link asio.reference.ip__address_v6.operator_lt__lt_ [*operator<<]]]
- [Output an address as a string.
-
- Output a network as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__address_v6 `ip::address_v6`] class provides the ability to use and manipulate IP version 6 addresses.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6_range.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::basic_address_range< address_v6 >::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_address_range_lt__address_v6__gt_.operator_eq_..operator=..ip::basic_address_range< address_v6 >]
-Assignment operator.
-
-
- basic_address_range & operator=(
- const basic_address_range & other);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_endpoint ip::basic_endpoint]
-
-
-Describes an endpoint for a version-independent IP socket.
-
-
- template<
- typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
- class basic_endpoint
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint.
-
- Set the IP address associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
-
- Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint.
-
- Move-assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order.
-
- Set the port associated with the endpoint. The port number is always in the host's byte order. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_endpoint `ip::basic_endpoint`] class template describes an endpoint that may be associated with a particular socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:address ip::basic_endpoint::address]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.address..address..ip::basic_endpoint]
-Get the IP address associated with the endpoint.
-
-
- asio::ip::address ``[link asio.reference.ip__basic_endpoint.address.overload1 address]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.address.overload1 more...]]``
-
-
-Set the IP address associated with the endpoint.
-
-
- void ``[link asio.reference.ip__basic_endpoint.address.overload2 address]``(
- const asio::ip::address & addr);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.address.overload2 more...]]``
-
-
-[section:overload1 ip::basic_endpoint::address (1 of 2 overloads)]
-
-
-Get the IP address associated with the endpoint.
-
-
- asio::ip::address address() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_endpoint::address (2 of 2 overloads)]
-
-
-Set the IP address associated with the endpoint.
-
-
- void address(
- const asio::ip::address & addr);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_endpoint ip::basic_endpoint::basic_endpoint]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.basic_endpoint..basic_endpoint..ip::basic_endpoint]
-Default constructor.
-
-
- ``[link asio.reference.ip__basic_endpoint.basic_endpoint.overload1 basic_endpoint]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.basic_endpoint.overload1 more...]]``
-
-
-Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR\_ANY or in6addr\_any). This constructor would typically be used for accepting new connections.
-
-
- ``[link asio.reference.ip__basic_endpoint.basic_endpoint.overload2 basic_endpoint]``(
- const InternetProtocol & internet_protocol,
- unsigned short port_num);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.basic_endpoint.overload2 more...]]``
-
-
-Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
-
-
- ``[link asio.reference.ip__basic_endpoint.basic_endpoint.overload3 basic_endpoint]``(
- const asio::ip::address & addr,
- unsigned short port_num);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.basic_endpoint.overload3 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_endpoint.basic_endpoint.overload4 basic_endpoint]``(
- const basic_endpoint & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.basic_endpoint.overload4 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.ip__basic_endpoint.basic_endpoint.overload5 basic_endpoint]``(
- basic_endpoint && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.basic_endpoint.overload5 more...]]``
-
-
-[section:overload1 ip::basic_endpoint::basic_endpoint (1 of 5 overloads)]
-
-
-Default constructor.
-
-
- basic_endpoint();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_endpoint::basic_endpoint (2 of 5 overloads)]
-
-
-Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR\_ANY or in6addr\_any). This constructor would typically be used for accepting new connections.
-
-
- basic_endpoint(
- const InternetProtocol & internet_protocol,
- unsigned short port_num);
-
-
-
-[heading Examples]
-
-To initialise an IPv4 TCP endpoint for port 1234, use:
-
- asio::ip::tcp::endpoint ep(asio::ip::tcp::v4(), 1234);
-
-
-
-
-To specify an IPv6 UDP endpoint for port 9876, use:
-
- asio::ip::udp::endpoint ep(asio::ip::udp::v6(), 9876);
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_endpoint::basic_endpoint (3 of 5 overloads)]
-
-
-Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
-
-
- basic_endpoint(
- const asio::ip::address & addr,
- unsigned short port_num);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::basic_endpoint::basic_endpoint (4 of 5 overloads)]
-
-
-Copy constructor.
-
-
- basic_endpoint(
- const basic_endpoint & other);
-
-
-
-[endsect]
-
-
-
-[section:overload5 ip::basic_endpoint::basic_endpoint (5 of 5 overloads)]
-
-
-Move constructor.
-
-
- basic_endpoint(
- basic_endpoint && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:capacity ip::basic_endpoint::capacity]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.capacity..capacity..ip::basic_endpoint]
-Get the capacity of the endpoint in the native type.
-
-
- std::size_t capacity() const;
-
-
-
-[endsect]
-
-
-[section:data ip::basic_endpoint::data]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.data..data..ip::basic_endpoint]
-Get the underlying endpoint in the native type.
-
-
- data_type * ``[link asio.reference.ip__basic_endpoint.data.overload1 data]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.data.overload1 more...]]``
-
- const data_type * ``[link asio.reference.ip__basic_endpoint.data.overload2 data]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.data.overload2 more...]]``
-
-
-[section:overload1 ip::basic_endpoint::data (1 of 2 overloads)]
-
-
-Get the underlying endpoint in the native type.
-
-
- data_type * data();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_endpoint::data (2 of 2 overloads)]
-
-
-Get the underlying endpoint in the native type.
-
-
- const data_type * data() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:data_type ip::basic_endpoint::data_type]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.data_type..data_type..ip::basic_endpoint]
-The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
-
-
- typedef implementation_defined data_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::basic_endpoint::operator!=]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_not__eq_..operator!=..ip::basic_endpoint]
-Compare two endpoints for inequality.
-
-
- friend bool operator!=(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt_ ip::basic_endpoint::operator<]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_lt_..operator<..ip::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator<(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt__lt_ ip::basic_endpoint::operator<<]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_lt__lt_..operator<<..ip::basic_endpoint]
-Output an endpoint as a string.
-
-
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const basic_endpoint< InternetProtocol > & endpoint);
-
-
-Used to output a human-readable string for a specified endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[endpoint][The endpoint to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_lt__eq_ ip::basic_endpoint::operator<=]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_lt__eq_..operator<=..ip::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator<=(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_eq_ ip::basic_endpoint::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_eq_..operator=..ip::basic_endpoint]
-Assign from another endpoint.
-
-
- basic_endpoint & ``[link asio.reference.ip__basic_endpoint.operator_eq_.overload1 operator=]``(
- const basic_endpoint & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.operator_eq_.overload1 more...]]``
-
-
-Move-assign from another endpoint.
-
-
- basic_endpoint & ``[link asio.reference.ip__basic_endpoint.operator_eq_.overload2 operator=]``(
- basic_endpoint && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_endpoint::operator= (1 of 2 overloads)]
-
-
-Assign from another endpoint.
-
-
- basic_endpoint & operator=(
- const basic_endpoint & other);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_endpoint::operator= (2 of 2 overloads)]
-
-
-Move-assign from another endpoint.
-
-
- basic_endpoint & operator=(
- basic_endpoint && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq__eq_ ip::basic_endpoint::operator==]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_eq__eq_..operator==..ip::basic_endpoint]
-Compare two endpoints for equality.
-
-
- friend bool operator==(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ ip::basic_endpoint::operator>]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_gt_..operator>..ip::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator>(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ ip::basic_endpoint::operator>=]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.operator_gt__eq_..operator>=..ip::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator>=(
- const basic_endpoint< InternetProtocol > & e1,
- const basic_endpoint< InternetProtocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:port ip::basic_endpoint::port]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.port..port..ip::basic_endpoint]
-Get the port associated with the endpoint. The port number is always in the host's byte order.
-
-
- unsigned short ``[link asio.reference.ip__basic_endpoint.port.overload1 port]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.port.overload1 more...]]``
-
-
-Set the port associated with the endpoint. The port number is always in the host's byte order.
-
-
- void ``[link asio.reference.ip__basic_endpoint.port.overload2 port]``(
- unsigned short port_num);
- `` [''''&raquo;''' [link asio.reference.ip__basic_endpoint.port.overload2 more...]]``
-
-
-[section:overload1 ip::basic_endpoint::port (1 of 2 overloads)]
-
-
-Get the port associated with the endpoint. The port number is always in the host's byte order.
-
-
- unsigned short port() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_endpoint::port (2 of 2 overloads)]
-
-
-Set the port associated with the endpoint. The port number is always in the host's byte order.
-
-
- void port(
- unsigned short port_num);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol ip::basic_endpoint::protocol]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.protocol..protocol..ip::basic_endpoint]
-The protocol associated with the endpoint.
-
-
- protocol_type protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:protocol_type ip::basic_endpoint::protocol_type]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.protocol_type..protocol_type..ip::basic_endpoint]
-The protocol type associated with the endpoint.
-
-
- typedef InternetProtocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:resize ip::basic_endpoint::resize]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.resize..resize..ip::basic_endpoint]
-Set the underlying size of the endpoint in the native type.
-
-
- void resize(
- std::size_t new_size);
-
-
-
-[endsect]
-
-
-
-[section:size ip::basic_endpoint::size]
-
-[indexterm2 asio.indexterm.ip__basic_endpoint.size..size..ip::basic_endpoint]
-Get the underlying size of the endpoint in the native type.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_resolver ip::basic_resolver]
-
-
-Provides endpoint resolution functionality.
-
-
- template<
- typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver :
- public ip::resolver_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [(Deprecated.) The iterator type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.query [*query]]]
- [(Deprecated.) The query type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.results_type [*results_type]]]
- [The results type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [(Deprecated.) Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor.
-
- Move-construct a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
- [Move-assign a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [(Deprecated.) Perform forward resolution of a query to a list of entries.
-
- Perform forward resolution of a query to a list of entries.
-
- Perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
- [Destroys the resolver. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver `ip::basic_resolver`] class template provides the ability to resolve a query to a list of endpoints.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:address_configured ip::basic_resolver::address_configured]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.address_configured..address_configured..ip::basic_resolver]
-Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
-
-
- static const flags address_configured = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:all_matching ip::basic_resolver::all_matching]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.all_matching..all_matching..ip::basic_resolver]
-If used with v4\_mapped, return all matching IPv6 and IPv4 addresses.
-
-
- static const flags all_matching = implementation_defined;
-
-
-
-[endsect]
-
-
-[section:async_resolve ip::basic_resolver::async_resolve]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.async_resolve..async_resolve..ip::basic_resolver]
-(Deprecated.) Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload1 async_resolve]``(
- const query & q,
- ResolveHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload1 more...]]``
-
-
-Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload2 async_resolve]``(
- string_view host,
- string_view service,
- ResolveHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload3 async_resolve]``(
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- ResolveHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload4 async_resolve]``(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- ResolveHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload5 async_resolve]``(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- ResolveHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload5 more...]]``
-
-
-Asynchronously perform reverse resolution of an endpoint to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ip__basic_resolver.async_resolve.overload6 async_resolve]``(
- const endpoint_type & e,
- ResolveHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.async_resolve.overload6 more...]]``
-
-
-[section:overload1 ip::basic_resolver::async_resolve (1 of 6 overloads)]
-
-
-(Deprecated.) Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
- const query & q,
- ResolveHandler && handler);
-
-
-This function is used to asynchronously resolve a query into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[q][A query object that determines what endpoints will be returned.]]
-
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- resolver::results_type results // Resolved endpoints as a range.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-A successful resolve operation is guaranteed to pass a non-empty range to the handler.
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver::async_resolve (2 of 6 overloads)]
-
-
-Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
- string_view host,
- string_view service,
- ResolveHandler && handler);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- resolver::results_type results // Resolved endpoints as a range.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-A successful resolve operation is guaranteed to pass a non-empty range to the handler.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_resolver::async_resolve (3 of 6 overloads)]
-
-
-Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- ResolveHandler && handler);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- resolver::results_type results // Resolved endpoints as a range.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-A successful resolve operation is guaranteed to pass a non-empty range to the handler.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload4 ip::basic_resolver::async_resolve (4 of 6 overloads)]
-
-
-Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- ResolveHandler && handler);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- resolver::results_type results // Resolved endpoints as a range.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-A successful resolve operation is guaranteed to pass a non-empty range to the handler.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload5 ip::basic_resolver::async_resolve (5 of 6 overloads)]
-
-
-Asynchronously perform forward resolution of a query to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- ResolveHandler && handler);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- resolver::results_type results // Resolved endpoints as a range.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-A successful resolve operation is guaranteed to pass a non-empty range to the handler.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload6 ip::basic_resolver::async_resolve (6 of 6 overloads)]
-
-
-Asynchronously perform reverse resolution of an endpoint to a list of entries.
-
-
- template<
- typename ``[link asio.reference.ResolveHandler ResolveHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_resolve(
- const endpoint_type & e,
- ResolveHandler && handler);
-
-
-This function is used to asynchronously resolve an endpoint into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][An endpoint object that determines what endpoints will be returned.]]
-
-[[handler][The handler to be called when the resolve operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- resolver::results_type results // Resolved endpoints as a range.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-A successful resolve operation is guaranteed to pass a non-empty range to the handler.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:basic_resolver ip::basic_resolver::basic_resolver]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.basic_resolver..basic_resolver..ip::basic_resolver]
-Constructor.
-
-
- explicit ``[link asio.reference.ip__basic_resolver.basic_resolver.overload1 basic_resolver]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.basic_resolver.overload1 more...]]``
-
-
-Move-construct a [link asio.reference.ip__basic_resolver `ip::basic_resolver`] from another.
-
-
- ``[link asio.reference.ip__basic_resolver.basic_resolver.overload2 basic_resolver]``(
- basic_resolver && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.basic_resolver.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver::basic_resolver (1 of 2 overloads)]
-
-
-Constructor.
-
-
- basic_resolver(
- asio::io_context & io_context);
-
-
-This constructor creates a [link asio.reference.ip__basic_resolver `ip::basic_resolver`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the resolver will use to dispatch handlers for any asynchronous operations performed on the resolver. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver::basic_resolver (2 of 2 overloads)]
-
-
-Move-construct a [link asio.reference.ip__basic_resolver `ip::basic_resolver`] from another.
-
-
- basic_resolver(
- basic_resolver && other);
-
-
-This constructor moves a resolver from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.ip__basic_resolver `ip::basic_resolver`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_resolver(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:cancel ip::basic_resolver::cancel]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.cancel..cancel..ip::basic_resolver]
-Cancel any asynchronous operations that are waiting on the resolver.
-
-
- void cancel();
-
-
-This function forces the completion of any pending asynchronous operations on the host resolver. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
-
-
-[endsect]
-
-
-
-[section:canonical_name ip::basic_resolver::canonical_name]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.canonical_name..canonical_name..ip::basic_resolver]
-Determine the canonical name of the host specified in the query.
-
-
- static const flags canonical_name = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type ip::basic_resolver::endpoint_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.endpoint_type..endpoint_type..ip::basic_resolver]
-The endpoint type.
-
-
- typedef InternetProtocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:executor_type ip::basic_resolver::executor_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.executor_type..executor_type..ip::basic_resolver]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:flags ip::basic_resolver::flags]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.flags..flags..ip::basic_resolver]
-A bitmask type (C++ Std [lib.bitmask.types]).
-
-
- typedef unspecified flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor ip::basic_resolver::get_executor]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.get_executor..get_executor..ip::basic_resolver]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context ip::basic_resolver::get_io_context]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.get_io_context..get_io_context..ip::basic_resolver]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service ip::basic_resolver::get_io_service]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.get_io_service..get_io_service..ip::basic_resolver]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:iterator ip::basic_resolver::iterator]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.iterator..iterator..ip::basic_resolver]
-(Deprecated.) The iterator type.
-
-
- typedef basic_resolver_iterator< InternetProtocol > iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.difference_type [*difference_type]]]
- [The type used for the distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.reference [*reference]]]
- [The type of the result of applying operator*() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.value_type [*value_type]]]
- [The type of the value pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Move-assignment operator. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.dereference [*dereference]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.equal [*equal]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.increment [*increment]]]
- []
- ]
-
-]
-
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.index_ [*index_]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.values_ [*values_]]]
- []
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`] class template is used to define iterators over the results returned by a resolver.
-
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
-
- const basic_resolver_entry<InternetProtocol>
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:numeric_host ip::basic_resolver::numeric_host]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.numeric_host..numeric_host..ip::basic_resolver]
-Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
-
-
- static const flags numeric_host = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:numeric_service ip::basic_resolver::numeric_service]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.numeric_service..numeric_service..ip::basic_resolver]
-Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
-
-
- static const flags numeric_service = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::basic_resolver::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.operator_eq_..operator=..ip::basic_resolver]
-Move-assign a [link asio.reference.ip__basic_resolver `ip::basic_resolver`] from another.
-
-
- basic_resolver & operator=(
- basic_resolver && other);
-
-
-This assignment operator moves a resolver from one object to another. Cancels any outstanding asynchronous operations associated with the target object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.ip__basic_resolver `ip::basic_resolver`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `basic_resolver(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:passive ip::basic_resolver::passive]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.passive..passive..ip::basic_resolver]
-Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
-
-
- static const flags passive = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:protocol_type ip::basic_resolver::protocol_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.protocol_type..protocol_type..ip::basic_resolver]
-The protocol type.
-
-
- typedef InternetProtocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:query ip::basic_resolver::query]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.query..query..ip::basic_resolver]
-(Deprecated.) The query type.
-
-
- typedef basic_resolver_query< InternetProtocol > query;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_query.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint query. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
- [Construct with specified service name for any protocol.
-
- Construct with specified service name for a given protocol.
-
- Construct with specified host name and service name for any protocol.
-
- Construct with specified host name and service name for a given protocol. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.hints [*hints]]]
- [Get the hints associated with the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
- [Get the host name associated with the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
- [Get the service name associated with the query. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_query `ip::basic_resolver_query`] class template describes a query that can be passed to a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:resolve ip::basic_resolver::resolve]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.resolve..resolve..ip::basic_resolver]
-(Deprecated.) Perform forward resolution of a query to a list of entries.
-
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload1 resolve]``(
- const query & q);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload1 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload2 resolve]``(
- const query & q,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload2 more...]]``
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload3 resolve]``(
- string_view host,
- string_view service);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload3 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload4 resolve]``(
- string_view host,
- string_view service,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload4 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload5 resolve]``(
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload5 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload6 resolve]``(
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload6 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload7 resolve]``(
- const protocol_type & protocol,
- string_view host,
- string_view service);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload7 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload8 resolve]``(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload8 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload9 resolve]``(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload9 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload10 resolve]``(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload10 more...]]``
-
-
-Perform reverse resolution of an endpoint to a list of entries.
-
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload11 resolve]``(
- const endpoint_type & e);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload11 more...]]``
-
- results_type ``[link asio.reference.ip__basic_resolver.resolve.overload12 resolve]``(
- const endpoint_type & e,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver.resolve.overload12 more...]]``
-
-
-[section:overload1 ip::basic_resolver::resolve (1 of 12 overloads)]
-
-
-(Deprecated.) Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- const query & q);
-
-
-This function is used to resolve a query into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[q][A query object that determines what endpoints will be returned.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver::resolve (2 of 12 overloads)]
-
-
-(Deprecated.) Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- const query & q,
- asio::error_code & ec);
-
-
-This function is used to resolve a query into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[q][A query object that determines what endpoints will be returned.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_resolver::resolve (3 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- string_view host,
- string_view service);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload4 ip::basic_resolver::resolve (4 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- string_view host,
- string_view service,
- asio::error_code & ec);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload5 ip::basic_resolver::resolve (5 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload6 ip::basic_resolver::resolve (6 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- asio::error_code & ec);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload7 ip::basic_resolver::resolve (7 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- const protocol_type & protocol,
- string_view host,
- string_view service);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload8 ip::basic_resolver::resolve (8 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- asio::error_code & ec);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload9 ip::basic_resolver::resolve (9 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload10 ip::basic_resolver::resolve (10 of 12 overloads)]
-
-
-Perform forward resolution of a query to a list of entries.
-
-
- results_type resolve(
- const protocol_type & protocol,
- string_view host,
- string_view service,
- resolver_base::flags resolve_flags,
- asio::error_code & ec);
-
-
-This function is used to resolve host and service names into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload11 ip::basic_resolver::resolve (11 of 12 overloads)]
-
-
-Perform reverse resolution of an endpoint to a list of entries.
-
-
- results_type resolve(
- const endpoint_type & e);
-
-
-This function is used to resolve an endpoint into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][An endpoint object that determines what endpoints will be returned.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. A successful call to this function is guaranteed to return a non-empty range.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 ip::basic_resolver::resolve (12 of 12 overloads)]
-
-
-Perform reverse resolution of an endpoint to a list of entries.
-
-
- results_type resolve(
- const endpoint_type & e,
- asio::error_code & ec);
-
-
-This function is used to resolve an endpoint into a list of endpoint entries.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][An endpoint object that determines what endpoints will be returned.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-A range object representing the list of endpoint entries. An empty range is returned if an error occurs. A successful call to this function is guaranteed to return a non-empty range.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:results_type ip::basic_resolver::results_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.results_type..results_type..ip::basic_resolver]
-The results type.
-
-
- typedef basic_resolver_results< InternetProtocol > results_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.const_iterator [*const_iterator]]]
- [The type of an iterator into the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.const_reference [*const_reference]]]
- [The type of a const reference to a value in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.difference_type [*difference_type]]]
- [Type used to represent the distance between two iterators in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the results. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.iterator [*iterator]]]
- [The type of an iterator into the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.protocol_type [*protocol_type]]]
- [The protocol type associated with the results. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.reference [*reference]]]
- [The type of a non-const reference to a value in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.size_type [*size_type]]]
- [Type used to represent a count of the elements in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.value_type [*value_type]]]
- [The type of a value in the results range. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.basic_resolver_results [*basic_resolver_results]]]
- [Default constructor creates an empty range.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.begin [*begin]]]
- [Obtain a begin iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.cbegin [*cbegin]]]
- [Obtain a begin iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.cend [*cend]]]
- [Obtain an end iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.empty [*empty]]]
- [Determine whether the results range is empty. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.end [*end]]]
- [Obtain an end iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.max_size [*max_size]]]
- [Get the maximum number of entries permitted in a results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Move-assignment operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.size [*size]]]
- [Get the number of entries in the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.swap [*swap]]]
- [Swap the results range with another. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.dereference [*dereference]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.equal [*equal]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.increment [*increment]]]
- []
- ]
-
-]
-
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.index_ [*index_]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.values_ [*values_]]]
- []
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_results `ip::basic_resolver_results`] class template is used to define a range over the results returned by a resolver.
-
-The iterator's value\_type, obtained when a results iterator is dereferenced, is:
-
- const basic_resolver_entry<InternetProtocol>
-
-
-
-
-
-[heading Remarks]
-
-For backward compatibility, [link asio.reference.ip__basic_resolver_results `ip::basic_resolver_results`] is derived from [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`]. This derivation is deprecated.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:v4_mapped ip::basic_resolver::v4_mapped]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver.v4_mapped..v4_mapped..ip::basic_resolver]
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
-
-
- static const flags v4_mapped = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:_basic_resolver ip::basic_resolver::~basic_resolver]
-
-[indexterm2 asio.indexterm.ip__basic_resolver._basic_resolver..~basic_resolver..ip::basic_resolver]
-Destroys the resolver.
-
-
- ~basic_resolver();
-
-
-This function destroys the resolver, cancelling any outstanding asynchronous wait operations associated with the resolver as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_resolver_entry ip::basic_resolver_entry]
-
-
-An entry produced by a resolver.
-
-
- template<
- typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_entry
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor.
-
- Construct with specified endpoint, host name and service name. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_entry `ip::basic_resolver_entry`] class template describes an entry as returned by a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_entry.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_resolver_entry ip::basic_resolver_entry::basic_resolver_entry]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.basic_resolver_entry..basic_resolver_entry..ip::basic_resolver_entry]
-Default constructor.
-
-
- ``[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload1 basic_resolver_entry]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload1 more...]]``
-
-
-Construct with specified endpoint, host name and service name.
-
-
- ``[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload2 basic_resolver_entry]``(
- const endpoint_type & ep,
- string_view host,
- string_view service);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.basic_resolver_entry.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_entry::basic_resolver_entry (1 of 2 overloads)]
-
-
-Default constructor.
-
-
- basic_resolver_entry();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_entry::basic_resolver_entry (2 of 2 overloads)]
-
-
-Construct with specified endpoint, host name and service name.
-
-
- basic_resolver_entry(
- const endpoint_type & ep,
- string_view host,
- string_view service);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:endpoint ip::basic_resolver_entry::endpoint]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.endpoint..endpoint..ip::basic_resolver_entry]
-Get the endpoint associated with the entry.
-
-
- endpoint_type endpoint() const;
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type ip::basic_resolver_entry::endpoint_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.endpoint_type..endpoint_type..ip::basic_resolver_entry]
-The endpoint type associated with the endpoint entry.
-
-
- typedef InternetProtocol::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_entry.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:host_name ip::basic_resolver_entry::host_name]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.host_name..host_name..ip::basic_resolver_entry]
-Get the host name associated with the entry.
-
-
- std::string ``[link asio.reference.ip__basic_resolver_entry.host_name.overload1 host_name]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.host_name.overload1 more...]]``
-
- template<
- class Allocator>
- std::basic_string< char, std::char_traits< char >, Allocator > ``[link asio.reference.ip__basic_resolver_entry.host_name.overload2 host_name]``(
- const Allocator & alloc = Allocator()) const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.host_name.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_entry::host_name (1 of 2 overloads)]
-
-
-Get the host name associated with the entry.
-
-
- std::string host_name() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_entry::host_name (2 of 2 overloads)]
-
-
-Get the host name associated with the entry.
-
-
- template<
- class Allocator>
- std::basic_string< char, std::char_traits< char >, Allocator > host_name(
- const Allocator & alloc = Allocator()) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_endpoint_type ip::basic_resolver_entry::operator endpoint_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.operator_endpoint_type..operator endpoint_type..ip::basic_resolver_entry]
-Convert to the endpoint associated with the entry.
-
-
- operator endpoint_type() const;
-
-
-
-[endsect]
-
-
-
-[section:protocol_type ip::basic_resolver_entry::protocol_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.protocol_type..protocol_type..ip::basic_resolver_entry]
-The protocol type associated with the endpoint entry.
-
-
- typedef InternetProtocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_entry.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:service_name ip::basic_resolver_entry::service_name]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_entry.service_name..service_name..ip::basic_resolver_entry]
-Get the service name associated with the entry.
-
-
- std::string ``[link asio.reference.ip__basic_resolver_entry.service_name.overload1 service_name]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.service_name.overload1 more...]]``
-
- template<
- class Allocator>
- std::basic_string< char, std::char_traits< char >, Allocator > ``[link asio.reference.ip__basic_resolver_entry.service_name.overload2 service_name]``(
- const Allocator & alloc = Allocator()) const;
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_entry.service_name.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_entry::service_name (1 of 2 overloads)]
-
-
-Get the service name associated with the entry.
-
-
- std::string service_name() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_entry::service_name (2 of 2 overloads)]
-
-
-Get the service name associated with the entry.
-
-
- template<
- class Allocator>
- std::basic_string< char, std::char_traits< char >, Allocator > service_name(
- const Allocator & alloc = Allocator()) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:ip__basic_resolver_iterator ip::basic_resolver_iterator]
-
-
-An iterator over the entries produced by a resolver.
-
-
- template<
- typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_iterator
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.difference_type [*difference_type]]]
- [The type used for the distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.reference [*reference]]]
- [The type of the result of applying operator*() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.value_type [*value_type]]]
- [The type of the value pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Move-assignment operator. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.dereference [*dereference]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.equal [*equal]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.increment [*increment]]]
- []
- ]
-
-]
-
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.index_ [*index_]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.values_ [*values_]]]
- []
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`] class template is used to define iterators over the results returned by a resolver.
-
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
-
- const basic_resolver_entry<InternetProtocol>
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_resolver_iterator ip::basic_resolver_iterator::basic_resolver_iterator]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.basic_resolver_iterator..basic_resolver_iterator..ip::basic_resolver_iterator]
-Default constructor creates an end iterator.
-
-
- ``[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator.overload1 basic_resolver_iterator]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator.overload1 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator.overload2 basic_resolver_iterator]``(
- const basic_resolver_iterator & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator.overload2 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator.overload3 basic_resolver_iterator]``(
- basic_resolver_iterator && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator.overload3 more...]]``
-
-
-[section:overload1 ip::basic_resolver_iterator::basic_resolver_iterator (1 of 3 overloads)]
-
-
-Default constructor creates an end iterator.
-
-
- basic_resolver_iterator();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_iterator::basic_resolver_iterator (2 of 3 overloads)]
-
-
-Copy constructor.
-
-
- basic_resolver_iterator(
- const basic_resolver_iterator & other);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_resolver_iterator::basic_resolver_iterator (3 of 3 overloads)]
-
-
-Move constructor.
-
-
- basic_resolver_iterator(
- basic_resolver_iterator && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:dereference ip::basic_resolver_iterator::dereference]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.dereference..dereference..ip::basic_resolver_iterator]
-
- const basic_resolver_entry< InternetProtocol > & dereference() const;
-
-
-
-[endsect]
-
-
-
-[section:difference_type ip::basic_resolver_iterator::difference_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.difference_type..difference_type..ip::basic_resolver_iterator]
-The type used for the distance between two iterators.
-
-
- typedef std::ptrdiff_t difference_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:equal ip::basic_resolver_iterator::equal]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.equal..equal..ip::basic_resolver_iterator]
-
- bool equal(
- const basic_resolver_iterator & other) const;
-
-
-
-[endsect]
-
-
-
-[section:increment ip::basic_resolver_iterator::increment]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.increment..increment..ip::basic_resolver_iterator]
-
- void increment();
-
-
-
-[endsect]
-
-
-
-[section:index_ ip::basic_resolver_iterator::index_]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.index_..index_..ip::basic_resolver_iterator]
-
- std::size_t index_;
-
-
-
-[endsect]
-
-
-
-[section:iterator_category ip::basic_resolver_iterator::iterator_category]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.iterator_category..iterator_category..ip::basic_resolver_iterator]
-The iterator category.
-
-
- typedef std::forward_iterator_tag iterator_category;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator__star_ ip::basic_resolver_iterator::operator *]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator__star_..operator *..ip::basic_resolver_iterator]
-Dereference an iterator.
-
-
- const basic_resolver_entry< InternetProtocol > & operator *() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::basic_resolver_iterator::operator!=]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_not__eq_..operator!=..ip::basic_resolver_iterator]
-Test two iterators for inequality.
-
-
- friend bool operator!=(
- const basic_resolver_iterator & a,
- const basic_resolver_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_plus__plus_ ip::basic_resolver_iterator::operator++]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_plus__plus_..operator++..ip::basic_resolver_iterator]
-Increment operator (prefix).
-
-
- basic_resolver_iterator & ``[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_.overload1 operator++]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_.overload1 more...]]``
-
-
-Increment operator (postfix).
-
-
- basic_resolver_iterator ``[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_.overload2 operator++]``(
- int );
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_iterator::operator++ (1 of 2 overloads)]
-
-
-Increment operator (prefix).
-
-
- basic_resolver_iterator & operator++();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_iterator::operator++ (2 of 2 overloads)]
-
-
-Increment operator (postfix).
-
-
- basic_resolver_iterator operator++(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_arrow_ ip::basic_resolver_iterator::operator->]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_arrow_..operator->..ip::basic_resolver_iterator]
-Dereference an iterator.
-
-
- const basic_resolver_entry< InternetProtocol > * operator->() const;
-
-
-
-[endsect]
-
-
-[section:operator_eq_ ip::basic_resolver_iterator::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_eq_..operator=..ip::basic_resolver_iterator]
-Assignment operator.
-
-
- basic_resolver_iterator & ``[link asio.reference.ip__basic_resolver_iterator.operator_eq_.overload1 operator=]``(
- const basic_resolver_iterator & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.operator_eq_.overload1 more...]]``
-
-
-Move-assignment operator.
-
-
- basic_resolver_iterator & ``[link asio.reference.ip__basic_resolver_iterator.operator_eq_.overload2 operator=]``(
- basic_resolver_iterator && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_iterator.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_iterator::operator= (1 of 2 overloads)]
-
-
-Assignment operator.
-
-
- basic_resolver_iterator & operator=(
- const basic_resolver_iterator & other);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_iterator::operator= (2 of 2 overloads)]
-
-
-Move-assignment operator.
-
-
- basic_resolver_iterator & operator=(
- basic_resolver_iterator && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq__eq_ ip::basic_resolver_iterator::operator==]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.operator_eq__eq_..operator==..ip::basic_resolver_iterator]
-Test two iterators for equality.
-
-
- friend bool operator==(
- const basic_resolver_iterator & a,
- const basic_resolver_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:pointer ip::basic_resolver_iterator::pointer]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.pointer..pointer..ip::basic_resolver_iterator]
-The type of the result of applying `operator->()` to the iterator.
-
-
- typedef const basic_resolver_entry< InternetProtocol > * pointer;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reference ip::basic_resolver_iterator::reference]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.reference..reference..ip::basic_resolver_iterator]
-The type of the result of applying `operator*()` to the iterator.
-
-
- typedef const basic_resolver_entry< InternetProtocol > & reference;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor.
-
- Construct with specified endpoint, host name and service name. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_entry `ip::basic_resolver_entry`] class template describes an entry as returned by a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:value_type ip::basic_resolver_iterator::value_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.value_type..value_type..ip::basic_resolver_iterator]
-The type of the value pointed to by the iterator.
-
-
- typedef basic_resolver_entry< InternetProtocol > value_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor.
-
- Construct with specified endpoint, host name and service name. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_entry `ip::basic_resolver_entry`] class template describes an entry as returned by a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_iterator.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:values_ ip::basic_resolver_iterator::values_]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_iterator.values_..values_..ip::basic_resolver_iterator]
-
- values_ptr_type values_;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_resolver_query ip::basic_resolver_query]
-
-
-An query to be passed to a resolver.
-
-
- template<
- typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_query :
- public ip::resolver_query_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_query.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_query.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint query. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_query.basic_resolver_query [*basic_resolver_query]]]
- [Construct with specified service name for any protocol.
-
- Construct with specified service name for a given protocol.
-
- Construct with specified host name and service name for any protocol.
-
- Construct with specified host name and service name for a given protocol. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.hints [*hints]]]
- [Get the hints associated with the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.host_name [*host_name]]]
- [Get the host name associated with the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.service_name [*service_name]]]
- [Get the service name associated with the query. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_query.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_query.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_query `ip::basic_resolver_query`] class template describes a query that can be passed to a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_query.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:address_configured ip::basic_resolver_query::address_configured]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.address_configured..address_configured..ip::basic_resolver_query]
-Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
-
-
- static const flags address_configured = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:all_matching ip::basic_resolver_query::all_matching]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.all_matching..all_matching..ip::basic_resolver_query]
-If used with v4\_mapped, return all matching IPv6 and IPv4 addresses.
-
-
- static const flags all_matching = implementation_defined;
-
-
-
-[endsect]
-
-
-[section:basic_resolver_query ip::basic_resolver_query::basic_resolver_query]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.basic_resolver_query..basic_resolver_query..ip::basic_resolver_query]
-Construct with specified service name for any protocol.
-
-
- ``[link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload1 basic_resolver_query]``(
- const std::string & service,
- resolver_query_base::flags resolve_flags = passive|address_configured);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload1 more...]]``
-
-
-Construct with specified service name for a given protocol.
-
-
- ``[link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload2 basic_resolver_query]``(
- const protocol_type & protocol,
- const std::string & service,
- resolver_query_base::flags resolve_flags = passive|address_configured);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload2 more...]]``
-
-
-Construct with specified host name and service name for any protocol.
-
-
- ``[link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload3 basic_resolver_query]``(
- const std::string & host,
- const std::string & service,
- resolver_query_base::flags resolve_flags = address_configured);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload3 more...]]``
-
-
-Construct with specified host name and service name for a given protocol.
-
-
- ``[link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4 basic_resolver_query]``(
- const protocol_type & protocol,
- const std::string & host,
- const std::string & service,
- resolver_query_base::flags resolve_flags = address_configured);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_query.basic_resolver_query.overload4 more...]]``
-
-
-[section:overload1 ip::basic_resolver_query::basic_resolver_query (1 of 4 overloads)]
-
-
-Construct with specified service name for any protocol.
-
-
- basic_resolver_query(
- const std::string & service,
- resolver_query_base::flags resolve_flags = passive|address_configured);
-
-
-This constructor is typically used to perform name resolution for local service binding.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for local service binding.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_query::basic_resolver_query (2 of 4 overloads)]
-
-
-Construct with specified service name for a given protocol.
-
-
- basic_resolver_query(
- const protocol_type & protocol,
- const std::string & service,
- resolver_query_base::flags resolve_flags = passive|address_configured);
-
-
-This constructor is typically used to perform name resolution for local service binding with a specific protocol version.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for local service binding.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_resolver_query::basic_resolver_query (3 of 4 overloads)]
-
-
-Construct with specified host name and service name for any protocol.
-
-
- basic_resolver_query(
- const std::string & host,
- const std::string & service,
- resolver_query_base::flags resolve_flags = address_configured);
-
-
-This constructor is typically used to perform name resolution for communication with remote hosts.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-
-[section:overload4 ip::basic_resolver_query::basic_resolver_query (4 of 4 overloads)]
-
-
-Construct with specified host name and service name for a given protocol.
-
-
- basic_resolver_query(
- const protocol_type & protocol,
- const std::string & host,
- const std::string & service,
- resolver_query_base::flags resolve_flags = address_configured);
-
-
-This constructor is typically used to perform name resolution for communication with remote hosts.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[protocol][A protocol object, normally representing either the IPv4 or IPv6 version of an internet protocol.]]
-
-[[host][A string identifying a location. May be a descriptive name or a numeric address string. If an empty string and the passive flag has been specified, the resolved endpoints are suitable for local service binding. If an empty string and passive is not specified, the resolved endpoints will use the loopback address.]]
-
-[[service][A string identifying the requested service. This may be a descriptive name or a numeric string corresponding to a port number. May be an empty string, in which case all resolved endpoints will have a port number of 0.]]
-
-[[resolve_flags][A set of flags that determine how name resolution should be performed. The default flags are suitable for communication with remote hosts.]]
-
-]
-
-
-[heading Remarks]
-
-On POSIX systems, host names may be locally defined in the file `/etc/hosts`. On Windows, host names may be defined in the file `c:\windows\system32\drivers\etc\hosts`. Remote host name resolution is performed using DNS. Operating systems may use additional locations when resolving host names (such as NETBIOS names on Windows).
-
-On POSIX systems, service names are typically defined in the file `/etc/services`. On Windows, service names may be found in the file `c:\windows\system32\drivers\etc\services`. Operating systems may use additional locations when resolving service names.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:canonical_name ip::basic_resolver_query::canonical_name]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.canonical_name..canonical_name..ip::basic_resolver_query]
-Determine the canonical name of the host specified in the query.
-
-
- static const flags canonical_name = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:flags ip::basic_resolver_query::flags]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.flags..flags..ip::basic_resolver_query]
-A bitmask type (C++ Std [lib.bitmask.types]).
-
-
- typedef unspecified flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_query.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:hints ip::basic_resolver_query::hints]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.hints..hints..ip::basic_resolver_query]
-Get the hints associated with the query.
-
-
- const asio::detail::addrinfo_type & hints() const;
-
-
-
-[endsect]
-
-
-
-[section:host_name ip::basic_resolver_query::host_name]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.host_name..host_name..ip::basic_resolver_query]
-Get the host name associated with the query.
-
-
- std::string host_name() const;
-
-
-
-[endsect]
-
-
-
-[section:numeric_host ip::basic_resolver_query::numeric_host]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.numeric_host..numeric_host..ip::basic_resolver_query]
-Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
-
-
- static const flags numeric_host = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:numeric_service ip::basic_resolver_query::numeric_service]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.numeric_service..numeric_service..ip::basic_resolver_query]
-Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
-
-
- static const flags numeric_service = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:passive ip::basic_resolver_query::passive]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.passive..passive..ip::basic_resolver_query]
-Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
-
-
- static const flags passive = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:protocol_type ip::basic_resolver_query::protocol_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.protocol_type..protocol_type..ip::basic_resolver_query]
-The protocol type associated with the endpoint query.
-
-
- typedef InternetProtocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_query.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:service_name ip::basic_resolver_query::service_name]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.service_name..service_name..ip::basic_resolver_query]
-Get the service name associated with the query.
-
-
- std::string service_name() const;
-
-
-
-[endsect]
-
-
-
-[section:v4_mapped ip::basic_resolver_query::v4_mapped]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_query.v4_mapped..v4_mapped..ip::basic_resolver_query]
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
-
-
- static const flags v4_mapped = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__basic_resolver_results ip::basic_resolver_results]
-
-
-A range of entries produced by a resolver.
-
-
- template<
- typename ``[link asio.reference.InternetProtocol InternetProtocol]``>
- class basic_resolver_results :
- public ip::basic_resolver_iterator< InternetProtocol >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.const_iterator [*const_iterator]]]
- [The type of an iterator into the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.const_reference [*const_reference]]]
- [The type of a const reference to a value in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.difference_type [*difference_type]]]
- [Type used to represent the distance between two iterators in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the results. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.iterator [*iterator]]]
- [The type of an iterator into the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.protocol_type [*protocol_type]]]
- [The protocol type associated with the results. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.reference [*reference]]]
- [The type of a non-const reference to a value in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.size_type [*size_type]]]
- [Type used to represent a count of the elements in the range. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_results.value_type [*value_type]]]
- [The type of a value in the results range. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.basic_resolver_results [*basic_resolver_results]]]
- [Default constructor creates an empty range.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.begin [*begin]]]
- [Obtain a begin iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.cbegin [*cbegin]]]
- [Obtain a begin iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.cend [*cend]]]
- [Obtain an end iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.empty [*empty]]]
- [Determine whether the results range is empty. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.end [*end]]]
- [Obtain an end iterator for the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.max_size [*max_size]]]
- [Get the maximum number of entries permitted in a results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Move-assignment operator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.size [*size]]]
- [Get the number of entries in the results range. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.swap [*swap]]]
- [Swap the results range with another. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.dereference [*dereference]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.equal [*equal]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.increment [*increment]]]
- []
- ]
-
-]
-
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.index_ [*index_]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.values_ [*values_]]]
- []
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_results.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_results `ip::basic_resolver_results`] class template is used to define a range over the results returned by a resolver.
-
-The iterator's value\_type, obtained when a results iterator is dereferenced, is:
-
- const basic_resolver_entry<InternetProtocol>
-
-
-
-
-
-[heading Remarks]
-
-For backward compatibility, [link asio.reference.ip__basic_resolver_results `ip::basic_resolver_results`] is derived from [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`]. This derivation is deprecated.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_resolver_results ip::basic_resolver_results::basic_resolver_results]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.basic_resolver_results..basic_resolver_results..ip::basic_resolver_results]
-Default constructor creates an empty range.
-
-
- ``[link asio.reference.ip__basic_resolver_results.basic_resolver_results.overload1 basic_resolver_results]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.basic_resolver_results.overload1 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__basic_resolver_results.basic_resolver_results.overload2 basic_resolver_results]``(
- const basic_resolver_results & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.basic_resolver_results.overload2 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.ip__basic_resolver_results.basic_resolver_results.overload3 basic_resolver_results]``(
- basic_resolver_results && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.basic_resolver_results.overload3 more...]]``
-
-
-[section:overload1 ip::basic_resolver_results::basic_resolver_results (1 of 3 overloads)]
-
-
-Default constructor creates an empty range.
-
-
- basic_resolver_results();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_results::basic_resolver_results (2 of 3 overloads)]
-
-
-Copy constructor.
-
-
- basic_resolver_results(
- const basic_resolver_results & other);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::basic_resolver_results::basic_resolver_results (3 of 3 overloads)]
-
-
-Move constructor.
-
-
- basic_resolver_results(
- basic_resolver_results && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:begin ip::basic_resolver_results::begin]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.begin..begin..ip::basic_resolver_results]
-Obtain a begin iterator for the results range.
-
-
- const_iterator begin() const;
-
-
-
-[endsect]
-
-
-
-[section:cbegin ip::basic_resolver_results::cbegin]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.cbegin..cbegin..ip::basic_resolver_results]
-Obtain a begin iterator for the results range.
-
-
- const_iterator cbegin() const;
-
-
-
-[endsect]
-
-
-
-[section:cend ip::basic_resolver_results::cend]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.cend..cend..ip::basic_resolver_results]
-Obtain an end iterator for the results range.
-
-
- const_iterator cend() const;
-
-
-
-[endsect]
-
-
-
-[section:const_iterator ip::basic_resolver_results::const_iterator]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.const_iterator..const_iterator..ip::basic_resolver_results]
-The type of an iterator into the range.
-
-
- typedef basic_resolver_iterator< protocol_type > const_iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.difference_type [*difference_type]]]
- [The type used for the distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.reference [*reference]]]
- [The type of the result of applying operator*() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.value_type [*value_type]]]
- [The type of the value pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Move-assignment operator. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.dereference [*dereference]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.equal [*equal]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.increment [*increment]]]
- []
- ]
-
-]
-
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.index_ [*index_]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.values_ [*values_]]]
- []
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`] class template is used to define iterators over the results returned by a resolver.
-
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
-
- const basic_resolver_entry<InternetProtocol>
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:const_reference ip::basic_resolver_results::const_reference]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.const_reference..const_reference..ip::basic_resolver_results]
-The type of a const reference to a value in the range.
-
-
- typedef const value_type & const_reference;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor.
-
- Construct with specified endpoint, host name and service name. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_entry `ip::basic_resolver_entry`] class template describes an entry as returned by a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:dereference ip::basic_resolver_results::dereference]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.dereference..dereference..ip::basic_resolver_results]
-
- const basic_resolver_entry< InternetProtocol > & dereference() const;
-
-
-
-[endsect]
-
-
-
-[section:difference_type ip::basic_resolver_results::difference_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.difference_type..difference_type..ip::basic_resolver_results]
-Type used to represent the distance between two iterators in the range.
-
-
- typedef std::ptrdiff_t difference_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:empty ip::basic_resolver_results::empty]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.empty..empty..ip::basic_resolver_results]
-Determine whether the results range is empty.
-
-
- bool empty() const;
-
-
-
-[endsect]
-
-
-
-[section:end ip::basic_resolver_results::end]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.end..end..ip::basic_resolver_results]
-Obtain an end iterator for the results range.
-
-
- const_iterator end() const;
-
-
-
-[endsect]
-
-
-
-[section:endpoint_type ip::basic_resolver_results::endpoint_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.endpoint_type..endpoint_type..ip::basic_resolver_results]
-The endpoint type associated with the results.
-
-
- typedef protocol_type::endpoint endpoint_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:equal ip::basic_resolver_results::equal]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.equal..equal..ip::basic_resolver_results]
-
- bool equal(
- const basic_resolver_iterator & other) const;
-
-
-
-[endsect]
-
-
-
-[section:increment ip::basic_resolver_results::increment]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.increment..increment..ip::basic_resolver_results]
-
- void increment();
-
-
-
-[endsect]
-
-
-
-[section:index_ ip::basic_resolver_results::index_]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.index_..index_..ip::basic_resolver_results]
-
- std::size_t index_;
-
-
-
-[endsect]
-
-
-
-[section:iterator ip::basic_resolver_results::iterator]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.iterator..iterator..ip::basic_resolver_results]
-The type of an iterator into the range.
-
-
- typedef const_iterator iterator;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.difference_type [*difference_type]]]
- [The type used for the distance between two iterators. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.iterator_category [*iterator_category]]]
- [The iterator category. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.pointer [*pointer]]]
- [The type of the result of applying operator->() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.reference [*reference]]]
- [The type of the result of applying operator*() to the iterator. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_iterator.value_type [*value_type]]]
- [The type of the value pointed to by the iterator. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.basic_resolver_iterator [*basic_resolver_iterator]]]
- [Default constructor creates an end iterator.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator__star_ [*operator *]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_plus__plus_ [*operator++]]]
- [Increment operator (prefix).
-
- Increment operator (postfix). ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_arrow_ [*operator->]]]
- [Dereference an iterator. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Move-assignment operator. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.dereference [*dereference]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.equal [*equal]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.increment [*increment]]]
- []
- ]
-
-]
-
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.index_ [*index_]]]
- []
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.values_ [*values_]]]
- []
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_not__eq_ [*operator!=]]]
- [Test two iterators for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_iterator.operator_eq__eq_ [*operator==]]]
- [Test two iterators for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_iterator `ip::basic_resolver_iterator`] class template is used to define iterators over the results returned by a resolver.
-
-The iterator's value\_type, obtained when the iterator is dereferenced, is:
-
- const basic_resolver_entry<InternetProtocol>
-
-
-
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:iterator_category ip::basic_resolver_results::iterator_category]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.iterator_category..iterator_category..ip::basic_resolver_results]
-The iterator category.
-
-
- typedef std::forward_iterator_tag iterator_category;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_size ip::basic_resolver_results::max_size]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.max_size..max_size..ip::basic_resolver_results]
-Get the maximum number of entries permitted in a results range.
-
-
- size_type max_size() const;
-
-
-
-[endsect]
-
-
-
-[section:operator__star_ ip::basic_resolver_results::operator *]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.operator__star_..operator *..ip::basic_resolver_results]
-Dereference an iterator.
-
-
- const basic_resolver_entry< InternetProtocol > & operator *() const;
-
-
-
-[endsect]
-
-
-[section:operator_not__eq_ ip::basic_resolver_results::operator!=]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_not__eq_..operator!=..ip::basic_resolver_results]
-Test two iterators for inequality.
-
-
- friend bool ``[link asio.reference.ip__basic_resolver_results.operator_not__eq_.overload1 operator!=]``(
- const basic_resolver_results & a,
- const basic_resolver_results & b);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_not__eq_.overload1 more...]]``
-
- friend bool ``[link asio.reference.ip__basic_resolver_results.operator_not__eq_.overload2 operator!=]``(
- const basic_resolver_iterator & a,
- const basic_resolver_iterator & b);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_not__eq_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_results::operator!= (1 of 2 overloads)]
-
-
-Test two iterators for inequality.
-
-
- friend bool operator!=(
- const basic_resolver_results & a,
- const basic_resolver_results & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_results::operator!= (2 of 2 overloads)]
-
-
-['Inherited from ip::basic_resolver.]
-
-
-Test two iterators for inequality.
-
-
- friend bool operator!=(
- const basic_resolver_iterator & a,
- const basic_resolver_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_plus__plus_ ip::basic_resolver_results::operator++]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_plus__plus_..operator++..ip::basic_resolver_results]
-Increment operator (prefix).
-
-
- basic_resolver_iterator & ``[link asio.reference.ip__basic_resolver_results.operator_plus__plus_.overload1 operator++]``();
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_plus__plus_.overload1 more...]]``
-
-
-Increment operator (postfix).
-
-
- basic_resolver_iterator ``[link asio.reference.ip__basic_resolver_results.operator_plus__plus_.overload2 operator++]``(
- int );
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_plus__plus_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_results::operator++ (1 of 2 overloads)]
-
-
-['Inherited from ip::basic_resolver.]
-
-
-Increment operator (prefix).
-
-
- basic_resolver_iterator & operator++();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_results::operator++ (2 of 2 overloads)]
-
-
-['Inherited from ip::basic_resolver.]
-
-
-Increment operator (postfix).
-
-
- basic_resolver_iterator operator++(
- int );
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_arrow_ ip::basic_resolver_results::operator->]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_arrow_..operator->..ip::basic_resolver_results]
-Dereference an iterator.
-
-
- const basic_resolver_entry< InternetProtocol > * operator->() const;
-
-
-
-[endsect]
-
-
-[section:operator_eq_ ip::basic_resolver_results::operator=]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_eq_..operator=..ip::basic_resolver_results]
-Assignment operator.
-
-
- basic_resolver_results & ``[link asio.reference.ip__basic_resolver_results.operator_eq_.overload1 operator=]``(
- const basic_resolver_results & other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_eq_.overload1 more...]]``
-
-
-Move-assignment operator.
-
-
- basic_resolver_results & ``[link asio.reference.ip__basic_resolver_results.operator_eq_.overload2 operator=]``(
- basic_resolver_results && other);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_eq_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_results::operator= (1 of 2 overloads)]
-
-
-Assignment operator.
-
-
- basic_resolver_results & operator=(
- const basic_resolver_results & other);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_results::operator= (2 of 2 overloads)]
-
-
-Move-assignment operator.
-
-
- basic_resolver_results & operator=(
- basic_resolver_results && other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_eq__eq_ ip::basic_resolver_results::operator==]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.operator_eq__eq_..operator==..ip::basic_resolver_results]
-Test two iterators for equality.
-
-
- friend bool ``[link asio.reference.ip__basic_resolver_results.operator_eq__eq_.overload1 operator==]``(
- const basic_resolver_results & a,
- const basic_resolver_results & b);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_eq__eq_.overload1 more...]]``
-
- friend bool ``[link asio.reference.ip__basic_resolver_results.operator_eq__eq_.overload2 operator==]``(
- const basic_resolver_iterator & a,
- const basic_resolver_iterator & b);
- `` [''''&raquo;''' [link asio.reference.ip__basic_resolver_results.operator_eq__eq_.overload2 more...]]``
-
-
-[section:overload1 ip::basic_resolver_results::operator== (1 of 2 overloads)]
-
-
-Test two iterators for equality.
-
-
- friend bool operator==(
- const basic_resolver_results & a,
- const basic_resolver_results & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 ip::basic_resolver_results::operator== (2 of 2 overloads)]
-
-
-['Inherited from ip::basic_resolver.]
-
-
-Test two iterators for equality.
-
-
- friend bool operator==(
- const basic_resolver_iterator & a,
- const basic_resolver_iterator & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:pointer ip::basic_resolver_results::pointer]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.pointer..pointer..ip::basic_resolver_results]
-The type of the result of applying `operator->()` to the iterator.
-
-
- typedef const basic_resolver_entry< InternetProtocol > * pointer;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol_type ip::basic_resolver_results::protocol_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.protocol_type..protocol_type..ip::basic_resolver_results]
-The protocol type associated with the results.
-
-
- typedef InternetProtocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reference ip::basic_resolver_results::reference]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.reference..reference..ip::basic_resolver_results]
-The type of a non-const reference to a value in the range.
-
-
- typedef value_type & reference;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor.
-
- Construct with specified endpoint, host name and service name. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_entry `ip::basic_resolver_entry`] class template describes an entry as returned by a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:size ip::basic_resolver_results::size]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.size..size..ip::basic_resolver_results]
-Get the number of entries in the results range.
-
-
- size_type size() const;
-
-
-
-[endsect]
-
-
-
-[section:size_type ip::basic_resolver_results::size_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.size_type..size_type..ip::basic_resolver_results]
-Type used to represent a count of the elements in the range.
-
-
- typedef std::size_t size_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:swap ip::basic_resolver_results::swap]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.swap..swap..ip::basic_resolver_results]
-Swap the results range with another.
-
-
- void swap(
- basic_resolver_results & that);
-
-
-
-[endsect]
-
-
-
-[section:value_type ip::basic_resolver_results::value_type]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.value_type..value_type..ip::basic_resolver_results]
-The type of a value in the results range.
-
-
- typedef basic_resolver_entry< endpoint_type > value_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.endpoint_type [*endpoint_type]]]
- [The endpoint type associated with the endpoint entry. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver_entry.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint entry. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.basic_resolver_entry [*basic_resolver_entry]]]
- [Default constructor.
-
- Construct with specified endpoint, host name and service name. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.endpoint [*endpoint]]]
- [Get the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.host_name [*host_name]]]
- [Get the host name associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.operator_endpoint_type [*operator endpoint_type]]]
- [Convert to the endpoint associated with the entry. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver_entry.service_name [*service_name]]]
- [Get the service name associated with the entry. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver_entry `ip::basic_resolver_entry`] class template describes an entry as returned by a resolver.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/basic_resolver_results.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:values_ ip::basic_resolver_results::values_]
-
-
-['Inherited from ip::basic_resolver.]
-
-[indexterm2 asio.indexterm.ip__basic_resolver_results.values_..values_..ip::basic_resolver_results]
-
- values_ptr_type values_;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__host_name ip::host_name]
-
-[indexterm1 asio.indexterm.ip__host_name..ip::host_name]
-Get the current host name.
-
-
- std::string ``[link asio.reference.ip__host_name.overload1 host_name]``();
- `` [''''&raquo;''' [link asio.reference.ip__host_name.overload1 more...]]``
-
- std::string ``[link asio.reference.ip__host_name.overload2 host_name]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__host_name.overload2 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/ip/host_name.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 ip::host_name (1 of 2 overloads)]
-
-
-Get the current host name.
-
-
- std::string host_name();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::host_name (2 of 2 overloads)]
-
-
-Get the current host name.
-
-
- std::string host_name(
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:ip__icmp ip::icmp]
-
-
-Encapsulates the flags needed for ICMP.
-
-
- class icmp
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__icmp.endpoint [*endpoint]]]
- [The type of a ICMP endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__icmp.resolver [*resolver]]]
- [The ICMP resolver type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__icmp.socket [*socket]]]
- [The ICMP socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__icmp.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.ip__icmp.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.ip__icmp.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
- [
- [[link asio.reference.ip__icmp.v4 [*v4]]]
- [Construct to represent the IPv4 ICMP protocol. ]
- ]
-
- [
- [[link asio.reference.ip__icmp.v6 [*v6]]]
- [Construct to represent the IPv6 ICMP protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__icmp.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__icmp.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__icmp `ip::icmp`] class contains flags necessary for ICMP sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/icmp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:endpoint ip::icmp::endpoint]
-
-[indexterm2 asio.indexterm.ip__icmp.endpoint..endpoint..ip::icmp]
-The type of a ICMP endpoint.
-
-
- typedef basic_endpoint< icmp > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint.
-
- Set the IP address associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
-
- Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint.
-
- Move-assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order.
-
- Set the port associated with the endpoint. The port number is always in the host's byte order. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_endpoint `ip::basic_endpoint`] class template describes an endpoint that may be associated with a particular socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/icmp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family ip::icmp::family]
-
-[indexterm2 asio.indexterm.ip__icmp.family..family..ip::icmp]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::icmp::operator!=]
-
-[indexterm2 asio.indexterm.ip__icmp.operator_not__eq_..operator!=..ip::icmp]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const icmp & p1,
- const icmp & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/icmp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::icmp::operator==]
-
-[indexterm2 asio.indexterm.ip__icmp.operator_eq__eq_..operator==..ip::icmp]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const icmp & p1,
- const icmp & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/icmp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol ip::icmp::protocol]
-
-[indexterm2 asio.indexterm.ip__icmp.protocol..protocol..ip::icmp]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:resolver ip::icmp::resolver]
-
-[indexterm2 asio.indexterm.ip__icmp.resolver..resolver..ip::icmp]
-The ICMP resolver type.
-
-
- typedef basic_resolver< icmp > resolver;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [(Deprecated.) The iterator type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.query [*query]]]
- [(Deprecated.) The query type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.results_type [*results_type]]]
- [The results type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [(Deprecated.) Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor.
-
- Move-construct a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
- [Move-assign a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [(Deprecated.) Perform forward resolution of a query to a list of entries.
-
- Perform forward resolution of a query to a list of entries.
-
- Perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
- [Destroys the resolver. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver `ip::basic_resolver`] class template provides the ability to resolve a query to a list of endpoints.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/icmp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:socket ip::icmp::socket]
-
-[indexterm2 asio.indexterm.ip__icmp.socket..socket..ip::icmp]
-The ICMP socket type.
-
-
- typedef basic_raw_socket< icmp > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_raw_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_raw_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_raw_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.basic_raw_socket [*basic_raw_socket]]]
- [Construct a basic_raw_socket without opening it.
-
- Construct and open a basic_raw_socket.
-
- Construct a basic_raw_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_raw_socket on an existing native socket.
-
- Move-construct a basic_raw_socket from another.
-
- Move-construct a basic_raw_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_raw_socket from another.
-
- Move-assign a basic_raw_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.receive_from [*receive_from]]]
- [Receive raw data with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.send_to [*send_to]]]
- [Send raw data to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket._basic_raw_socket [*~basic_raw_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_raw_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_raw_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_raw_socket `basic_raw_socket`] class template provides asynchronous and blocking raw-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/icmp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type ip::icmp::type]
-
-[indexterm2 asio.indexterm.ip__icmp.type..type..ip::icmp]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[section:v4 ip::icmp::v4]
-
-[indexterm2 asio.indexterm.ip__icmp.v4..v4..ip::icmp]
-Construct to represent the IPv4 ICMP protocol.
-
-
- static icmp v4();
-
-
-
-[endsect]
-
-
-
-[section:v6 ip::icmp::v6]
-
-[indexterm2 asio.indexterm.ip__icmp.v6..v6..ip::icmp]
-Construct to represent the IPv6 ICMP protocol.
-
-
- static icmp v6();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ip__multicast__enable_loopback ip::multicast::enable_loopback]
-
-[indexterm1 asio.indexterm.ip__multicast__enable_loopback..ip::multicast::enable_loopback]
-Socket option determining whether outgoing multicast packets will be received on the same socket if it is a member of the multicast group.
-
-
- typedef implementation_defined enable_loopback;
-
-
-
-Implements the IPPROTO\_IP/IP\_MULTICAST\_LOOP socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::multicast::enable_loopback option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::multicast::enable_loopback option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/multicast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__multicast__hops ip::multicast::hops]
-
-[indexterm1 asio.indexterm.ip__multicast__hops..ip::multicast::hops]
-Socket option for time-to-live associated with outgoing multicast packets.
-
-
- typedef implementation_defined hops;
-
-
-
-Implements the IPPROTO\_IP/IP\_MULTICAST\_TTL socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::multicast::hops option(4);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::multicast::hops option;
- socket.get_option(option);
- int ttl = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/multicast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__multicast__join_group ip::multicast::join_group]
-
-[indexterm1 asio.indexterm.ip__multicast__join_group..ip::multicast::join_group]
-Socket option to join a multicast group on a specified interface.
-
-
- typedef implementation_defined join_group;
-
-
-
-Implements the IPPROTO\_IP/IP\_ADD\_MEMBERSHIP socket option.
-
-
-[heading Examples]
-
-Setting the option to join a multicast group:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::address multicast_address =
- asio::ip::address::from_string("225.0.0.1");
- asio::ip::multicast::join_group option(multicast_address);
- socket.set_option(option);
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/multicast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__multicast__leave_group ip::multicast::leave_group]
-
-[indexterm1 asio.indexterm.ip__multicast__leave_group..ip::multicast::leave_group]
-Socket option to leave a multicast group on a specified interface.
-
-
- typedef implementation_defined leave_group;
-
-
-
-Implements the IPPROTO\_IP/IP\_DROP\_MEMBERSHIP socket option.
-
-
-[heading Examples]
-
-Setting the option to leave a multicast group:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::address multicast_address =
- asio::ip::address::from_string("225.0.0.1");
- asio::ip::multicast::leave_group option(multicast_address);
- socket.set_option(option);
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/multicast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__multicast__outbound_interface ip::multicast::outbound_interface]
-
-[indexterm1 asio.indexterm.ip__multicast__outbound_interface..ip::multicast::outbound_interface]
-Socket option for local interface to use for outgoing multicast packets.
-
-
- typedef implementation_defined outbound_interface;
-
-
-
-Implements the IPPROTO\_IP/IP\_MULTICAST\_IF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::address_v4 local_interface =
- asio::ip::address_v4::from_string("1.2.3.4");
- asio::ip::multicast::outbound_interface option(local_interface);
- socket.set_option(option);
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/multicast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:ip__network_v4 ip::network_v4]
-
-
-Represents an IPv4 network.
-
-
- class network_v4
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__network_v4.address [*address]]]
- [Obtain the address object specified when the network object was created. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.broadcast [*broadcast]]]
- [Obtain an address object that represents the network's broadcast address. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.canonical [*canonical]]]
- [Obtain the true network address, omitting any host bits. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.hosts [*hosts]]]
- [Obtain an address range corresponding to the hosts in the network. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.is_host [*is_host]]]
- [Test if network is a valid host address. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.is_subnet_of [*is_subnet_of]]]
- [Test if a network is a real subnet of another network. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.netmask [*netmask]]]
- [Obtain the netmask that was specified when the network object was created. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.network [*network]]]
- [Obtain an address object that represents the network address. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.network_v4 [*network_v4]]]
- [Default constructor.
-
- Construct a network based on the specified address and prefix length.
-
- Construct network based on the specified address and netmask.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.operator_eq_ [*operator=]]]
- [Assign from another network. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.prefix_length [*prefix_length]]]
- [Obtain the prefix length that was specified when the network object was created. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.to_string [*to_string]]]
- [Get the network as an address in dotted decimal format. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__network_v4.operator_not__eq_ [*operator!=]]]
- [Compare two networks for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__network_v4.operator_eq__eq_ [*operator==]]]
- [Compare two networks for equality. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__network_v4.make_network_v4 [*make_network_v4]]]
- [Create an IPv4 network from a string containing IP address and prefix length. ]
- ]
-
-]
-
-The [link asio.reference.ip__network_v4 `ip::network_v4`] class provides the ability to use and manipulate IP version 4 networks.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/network_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:address ip::network_v4::address]
-
-[indexterm2 asio.indexterm.ip__network_v4.address..address..ip::network_v4]
-Obtain the address object specified when the network object was created.
-
-
- address_v4 address() const;
-
-
-
-[endsect]
-
-
-
-[section:broadcast ip::network_v4::broadcast]
-
-[indexterm2 asio.indexterm.ip__network_v4.broadcast..broadcast..ip::network_v4]
-Obtain an address object that represents the network's broadcast address.
-
-
- address_v4 broadcast() const;
-
-
-
-[endsect]
-
-
-
-[section:canonical ip::network_v4::canonical]
-
-[indexterm2 asio.indexterm.ip__network_v4.canonical..canonical..ip::network_v4]
-Obtain the true network address, omitting any host bits.
-
-
- network_v4 canonical() const;
-
-
-
-[endsect]
-
-
-
-[section:hosts ip::network_v4::hosts]
-
-[indexterm2 asio.indexterm.ip__network_v4.hosts..hosts..ip::network_v4]
-Obtain an address range corresponding to the hosts in the network.
-
-
- address_v4_range hosts() const;
-
-
-
-[endsect]
-
-
-
-[section:is_host ip::network_v4::is_host]
-
-[indexterm2 asio.indexterm.ip__network_v4.is_host..is_host..ip::network_v4]
-Test if network is a valid host address.
-
-
- bool is_host() const;
-
-
-
-[endsect]
-
-
-
-[section:is_subnet_of ip::network_v4::is_subnet_of]
-
-[indexterm2 asio.indexterm.ip__network_v4.is_subnet_of..is_subnet_of..ip::network_v4]
-Test if a network is a real subnet of another network.
-
-
- bool is_subnet_of(
- const network_v4 & other) const;
-
-
-
-[endsect]
-
-
-[section:make_network_v4 ip::network_v4::make_network_v4]
-
-[indexterm2 asio.indexterm.ip__network_v4.make_network_v4..make_network_v4..ip::network_v4]
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload1 make_network_v4]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload1 more...]]``
-
- network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload2 make_network_v4]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload2 more...]]``
-
- network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload3 make_network_v4]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload3 more...]]``
-
- network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload4 make_network_v4]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload4 more...]]``
-
- network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload5 make_network_v4]``(
- string_view str);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload5 more...]]``
-
- network_v4 ``[link asio.reference.ip__network_v4.make_network_v4.overload6 make_network_v4]``(
- string_view str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.make_network_v4.overload6 more...]]``
-
-
-[section:overload1 ip::network_v4::make_network_v4 (1 of 6 overloads)]
-
-
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 make_network_v4(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::network_v4::make_network_v4 (2 of 6 overloads)]
-
-
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 make_network_v4(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::network_v4::make_network_v4 (3 of 6 overloads)]
-
-
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 make_network_v4(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::network_v4::make_network_v4 (4 of 6 overloads)]
-
-
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 make_network_v4(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload5 ip::network_v4::make_network_v4 (5 of 6 overloads)]
-
-
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 make_network_v4(
- string_view str);
-
-
-
-[endsect]
-
-
-
-[section:overload6 ip::network_v4::make_network_v4 (6 of 6 overloads)]
-
-
-Create an IPv4 network from a string containing IP address and prefix length.
-
-
- network_v4 make_network_v4(
- string_view str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:netmask ip::network_v4::netmask]
-
-[indexterm2 asio.indexterm.ip__network_v4.netmask..netmask..ip::network_v4]
-Obtain the netmask that was specified when the network object was created.
-
-
- address_v4 netmask() const;
-
-
-
-[endsect]
-
-
-
-[section:network ip::network_v4::network]
-
-[indexterm2 asio.indexterm.ip__network_v4.network..network..ip::network_v4]
-Obtain an address object that represents the network address.
-
-
- address_v4 network() const;
-
-
-
-[endsect]
-
-
-[section:network_v4 ip::network_v4::network_v4]
-
-[indexterm2 asio.indexterm.ip__network_v4.network_v4..network_v4..ip::network_v4]
-Default constructor.
-
-
- ``[link asio.reference.ip__network_v4.network_v4.overload1 network_v4]``();
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.network_v4.overload1 more...]]``
-
-
-Construct a network based on the specified address and prefix length.
-
-
- ``[link asio.reference.ip__network_v4.network_v4.overload2 network_v4]``(
- const address_v4 & addr,
- unsigned short prefix_len);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.network_v4.overload2 more...]]``
-
-
-Construct network based on the specified address and netmask.
-
-
- ``[link asio.reference.ip__network_v4.network_v4.overload3 network_v4]``(
- const address_v4 & addr,
- const address_v4 & mask);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.network_v4.overload3 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__network_v4.network_v4.overload4 network_v4]``(
- const network_v4 & other);
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.network_v4.overload4 more...]]``
-
-
-[section:overload1 ip::network_v4::network_v4 (1 of 4 overloads)]
-
-
-Default constructor.
-
-
- network_v4();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::network_v4::network_v4 (2 of 4 overloads)]
-
-
-Construct a network based on the specified address and prefix length.
-
-
- network_v4(
- const address_v4 & addr,
- unsigned short prefix_len);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::network_v4::network_v4 (3 of 4 overloads)]
-
-
-Construct network based on the specified address and netmask.
-
-
- network_v4(
- const address_v4 & addr,
- const address_v4 & mask);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::network_v4::network_v4 (4 of 4 overloads)]
-
-
-Copy constructor.
-
-
- network_v4(
- const network_v4 & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_not__eq_ ip::network_v4::operator!=]
-
-[indexterm2 asio.indexterm.ip__network_v4.operator_not__eq_..operator!=..ip::network_v4]
-Compare two networks for inequality.
-
-
- friend bool operator!=(
- const network_v4 & a,
- const network_v4 & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/network_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::network_v4::operator=]
-
-[indexterm2 asio.indexterm.ip__network_v4.operator_eq_..operator=..ip::network_v4]
-Assign from another network.
-
-
- network_v4 & operator=(
- const network_v4 & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::network_v4::operator==]
-
-[indexterm2 asio.indexterm.ip__network_v4.operator_eq__eq_..operator==..ip::network_v4]
-Compare two networks for equality.
-
-
- friend bool operator==(
- const network_v4 & a,
- const network_v4 & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/network_v4.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:prefix_length ip::network_v4::prefix_length]
-
-[indexterm2 asio.indexterm.ip__network_v4.prefix_length..prefix_length..ip::network_v4]
-Obtain the prefix length that was specified when the network object was created.
-
-
- unsigned short prefix_length() const;
-
-
-
-[endsect]
-
-
-[section:to_string ip::network_v4::to_string]
-
-[indexterm2 asio.indexterm.ip__network_v4.to_string..to_string..ip::network_v4]
-Get the network as an address in dotted decimal format.
-
-
- std::string ``[link asio.reference.ip__network_v4.to_string.overload1 to_string]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.to_string.overload1 more...]]``
-
- std::string ``[link asio.reference.ip__network_v4.to_string.overload2 to_string]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.ip__network_v4.to_string.overload2 more...]]``
-
-
-[section:overload1 ip::network_v4::to_string (1 of 2 overloads)]
-
-
-Get the network as an address in dotted decimal format.
-
-
- std::string to_string() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::network_v4::to_string (2 of 2 overloads)]
-
-
-Get the network as an address in dotted decimal format.
-
-
- std::string to_string(
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:ip__network_v6 ip::network_v6]
-
-
-Represents an IPv6 network.
-
-
- class network_v6
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__network_v6.address [*address]]]
- [Obtain the address object specified when the network object was created. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.canonical [*canonical]]]
- [Obtain the true network address, omitting any host bits. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.hosts [*hosts]]]
- [Obtain an address range corresponding to the hosts in the network. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.is_host [*is_host]]]
- [Test if network is a valid host address. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.is_subnet_of [*is_subnet_of]]]
- [Test if a network is a real subnet of another network. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.network [*network]]]
- [Obtain an address object that represents the network address. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.network_v6 [*network_v6]]]
- [Default constructor.
-
- Construct a network based on the specified address and prefix length.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.operator_eq_ [*operator=]]]
- [Assign from another network. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.prefix_length [*prefix_length]]]
- [Obtain the prefix length that was specified when the network object was created. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.to_string [*to_string]]]
- [Get the network as an address in dotted decimal format. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__network_v6.operator_not__eq_ [*operator!=]]]
- [Compare two networks for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__network_v6.operator_eq__eq_ [*operator==]]]
- [Compare two networks for equality. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__network_v6.make_network_v6 [*make_network_v6]]]
- [Create an IPv6 network from a string containing IP address and prefix length. ]
- ]
-
-]
-
-The [link asio.reference.ip__network_v6 `ip::network_v6`] class provides the ability to use and manipulate IP version 6 networks.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/network_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:address ip::network_v6::address]
-
-[indexterm2 asio.indexterm.ip__network_v6.address..address..ip::network_v6]
-Obtain the address object specified when the network object was created.
-
-
- address_v6 address() const;
-
-
-
-[endsect]
-
-
-
-[section:canonical ip::network_v6::canonical]
-
-[indexterm2 asio.indexterm.ip__network_v6.canonical..canonical..ip::network_v6]
-Obtain the true network address, omitting any host bits.
-
-
- network_v6 canonical() const;
-
-
-
-[endsect]
-
-
-
-[section:hosts ip::network_v6::hosts]
-
-[indexterm2 asio.indexterm.ip__network_v6.hosts..hosts..ip::network_v6]
-Obtain an address range corresponding to the hosts in the network.
-
-
- address_v6_range hosts() const;
-
-
-
-[endsect]
-
-
-
-[section:is_host ip::network_v6::is_host]
-
-[indexterm2 asio.indexterm.ip__network_v6.is_host..is_host..ip::network_v6]
-Test if network is a valid host address.
-
-
- bool is_host() const;
-
-
-
-[endsect]
-
-
-
-[section:is_subnet_of ip::network_v6::is_subnet_of]
-
-[indexterm2 asio.indexterm.ip__network_v6.is_subnet_of..is_subnet_of..ip::network_v6]
-Test if a network is a real subnet of another network.
-
-
- bool is_subnet_of(
- const network_v6 & other) const;
-
-
-
-[endsect]
-
-
-[section:make_network_v6 ip::network_v6::make_network_v6]
-
-[indexterm2 asio.indexterm.ip__network_v6.make_network_v6..make_network_v6..ip::network_v6]
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload1 make_network_v6]``(
- const char * str);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload1 more...]]``
-
- network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload2 make_network_v6]``(
- const char * str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload2 more...]]``
-
- network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload3 make_network_v6]``(
- const std::string & str);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload3 more...]]``
-
- network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload4 make_network_v6]``(
- const std::string & str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload4 more...]]``
-
- network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload5 make_network_v6]``(
- string_view str);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload5 more...]]``
-
- network_v6 ``[link asio.reference.ip__network_v6.make_network_v6.overload6 make_network_v6]``(
- string_view str,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.make_network_v6.overload6 more...]]``
-
-
-[section:overload1 ip::network_v6::make_network_v6 (1 of 6 overloads)]
-
-
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 make_network_v6(
- const char * str);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::network_v6::make_network_v6 (2 of 6 overloads)]
-
-
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 make_network_v6(
- const char * str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::network_v6::make_network_v6 (3 of 6 overloads)]
-
-
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 make_network_v6(
- const std::string & str);
-
-
-
-[endsect]
-
-
-
-[section:overload4 ip::network_v6::make_network_v6 (4 of 6 overloads)]
-
-
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 make_network_v6(
- const std::string & str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload5 ip::network_v6::make_network_v6 (5 of 6 overloads)]
-
-
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 make_network_v6(
- string_view str);
-
-
-
-[endsect]
-
-
-
-[section:overload6 ip::network_v6::make_network_v6 (6 of 6 overloads)]
-
-
-Create an IPv6 network from a string containing IP address and prefix length.
-
-
- network_v6 make_network_v6(
- string_view str,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:network ip::network_v6::network]
-
-[indexterm2 asio.indexterm.ip__network_v6.network..network..ip::network_v6]
-Obtain an address object that represents the network address.
-
-
- address_v6 network() const;
-
-
-
-[endsect]
-
-
-[section:network_v6 ip::network_v6::network_v6]
-
-[indexterm2 asio.indexterm.ip__network_v6.network_v6..network_v6..ip::network_v6]
-Default constructor.
-
-
- ``[link asio.reference.ip__network_v6.network_v6.overload1 network_v6]``();
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.network_v6.overload1 more...]]``
-
-
-Construct a network based on the specified address and prefix length.
-
-
- ``[link asio.reference.ip__network_v6.network_v6.overload2 network_v6]``(
- const address_v6 & addr,
- unsigned short prefix_len);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.network_v6.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.ip__network_v6.network_v6.overload3 network_v6]``(
- const network_v6 & other);
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.network_v6.overload3 more...]]``
-
-
-[section:overload1 ip::network_v6::network_v6 (1 of 3 overloads)]
-
-
-Default constructor.
-
-
- network_v6();
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::network_v6::network_v6 (2 of 3 overloads)]
-
-
-Construct a network based on the specified address and prefix length.
-
-
- network_v6(
- const address_v6 & addr,
- unsigned short prefix_len);
-
-
-
-[endsect]
-
-
-
-[section:overload3 ip::network_v6::network_v6 (3 of 3 overloads)]
-
-
-Copy constructor.
-
-
- network_v6(
- const network_v6 & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_not__eq_ ip::network_v6::operator!=]
-
-[indexterm2 asio.indexterm.ip__network_v6.operator_not__eq_..operator!=..ip::network_v6]
-Compare two networks for inequality.
-
-
- friend bool operator!=(
- const network_v6 & a,
- const network_v6 & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/network_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ip::network_v6::operator=]
-
-[indexterm2 asio.indexterm.ip__network_v6.operator_eq_..operator=..ip::network_v6]
-Assign from another network.
-
-
- network_v6 & operator=(
- const network_v6 & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::network_v6::operator==]
-
-[indexterm2 asio.indexterm.ip__network_v6.operator_eq__eq_..operator==..ip::network_v6]
-Compare two networks for equality.
-
-
- friend bool operator==(
- const network_v6 & a,
- const network_v6 & b);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/network_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:prefix_length ip::network_v6::prefix_length]
-
-[indexterm2 asio.indexterm.ip__network_v6.prefix_length..prefix_length..ip::network_v6]
-Obtain the prefix length that was specified when the network object was created.
-
-
- unsigned short prefix_length() const;
-
-
-
-[endsect]
-
-
-[section:to_string ip::network_v6::to_string]
-
-[indexterm2 asio.indexterm.ip__network_v6.to_string..to_string..ip::network_v6]
-Get the network as an address in dotted decimal format.
-
-
- std::string ``[link asio.reference.ip__network_v6.to_string.overload1 to_string]``() const;
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.to_string.overload1 more...]]``
-
- std::string ``[link asio.reference.ip__network_v6.to_string.overload2 to_string]``(
- asio::error_code & ec) const;
- `` [''''&raquo;''' [link asio.reference.ip__network_v6.to_string.overload2 more...]]``
-
-
-[section:overload1 ip::network_v6::to_string (1 of 2 overloads)]
-
-
-Get the network as an address in dotted decimal format.
-
-
- std::string to_string() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 ip::network_v6::to_string (2 of 2 overloads)]
-
-
-Get the network as an address in dotted decimal format.
-
-
- std::string to_string(
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:ip__resolver_base ip::resolver_base]
-
-
-The [link asio.reference.ip__resolver_base `ip::resolver_base`] class is used as a base for the [link asio.reference.ip__basic_resolver `ip::basic_resolver`] class templates to provide a common place to define the flag constants.
-
-
- class resolver_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__resolver_base.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__resolver_base._resolver_base [*~resolver_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__resolver_base.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_base.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_base.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_base.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_base.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_base.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_base.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:address_configured ip::resolver_base::address_configured]
-
-[indexterm2 asio.indexterm.ip__resolver_base.address_configured..address_configured..ip::resolver_base]
-Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
-
-
- static const flags address_configured = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:all_matching ip::resolver_base::all_matching]
-
-[indexterm2 asio.indexterm.ip__resolver_base.all_matching..all_matching..ip::resolver_base]
-If used with v4\_mapped, return all matching IPv6 and IPv4 addresses.
-
-
- static const flags all_matching = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:canonical_name ip::resolver_base::canonical_name]
-
-[indexterm2 asio.indexterm.ip__resolver_base.canonical_name..canonical_name..ip::resolver_base]
-Determine the canonical name of the host specified in the query.
-
-
- static const flags canonical_name = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:flags ip::resolver_base::flags]
-
-[indexterm2 asio.indexterm.ip__resolver_base.flags..flags..ip::resolver_base]
-A bitmask type (C++ Std [lib.bitmask.types]).
-
-
- typedef unspecified flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:numeric_host ip::resolver_base::numeric_host]
-
-[indexterm2 asio.indexterm.ip__resolver_base.numeric_host..numeric_host..ip::resolver_base]
-Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
-
-
- static const flags numeric_host = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:numeric_service ip::resolver_base::numeric_service]
-
-[indexterm2 asio.indexterm.ip__resolver_base.numeric_service..numeric_service..ip::resolver_base]
-Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
-
-
- static const flags numeric_service = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:passive ip::resolver_base::passive]
-
-[indexterm2 asio.indexterm.ip__resolver_base.passive..passive..ip::resolver_base]
-Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
-
-
- static const flags passive = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:v4_mapped ip::resolver_base::v4_mapped]
-
-[indexterm2 asio.indexterm.ip__resolver_base.v4_mapped..v4_mapped..ip::resolver_base]
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
-
-
- static const flags v4_mapped = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:_resolver_base ip::resolver_base::~resolver_base]
-
-[indexterm2 asio.indexterm.ip__resolver_base._resolver_base..~resolver_base..ip::resolver_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~resolver_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__resolver_query_base ip::resolver_query_base]
-
-
-The [link asio.reference.ip__resolver_query_base `ip::resolver_query_base`] class is used as a base for the [link asio.reference.ip__basic_resolver_query `ip::basic_resolver_query`] class templates to provide a common place to define the flag constants.
-
-
- class resolver_query_base :
- public ip::resolver_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__resolver_query_base.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__resolver_query_base._resolver_query_base [*~resolver_query_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__resolver_query_base.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_query_base.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_query_base.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_query_base.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_query_base.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_query_base.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__resolver_query_base.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_query_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:address_configured ip::resolver_query_base::address_configured]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.address_configured..address_configured..ip::resolver_query_base]
-Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system.
-
-
- static const flags address_configured = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:all_matching ip::resolver_query_base::all_matching]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.all_matching..all_matching..ip::resolver_query_base]
-If used with v4\_mapped, return all matching IPv6 and IPv4 addresses.
-
-
- static const flags all_matching = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:canonical_name ip::resolver_query_base::canonical_name]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.canonical_name..canonical_name..ip::resolver_query_base]
-Determine the canonical name of the host specified in the query.
-
-
- static const flags canonical_name = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:flags ip::resolver_query_base::flags]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.flags..flags..ip::resolver_query_base]
-A bitmask type (C++ Std [lib.bitmask.types]).
-
-
- typedef unspecified flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/resolver_query_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:numeric_host ip::resolver_query_base::numeric_host]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.numeric_host..numeric_host..ip::resolver_query_base]
-Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted.
-
-
- static const flags numeric_host = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:numeric_service ip::resolver_query_base::numeric_service]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.numeric_service..numeric_service..ip::resolver_query_base]
-Service name should be treated as a numeric string defining a port number and no name resolution should be attempted.
-
-
- static const flags numeric_service = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:passive ip::resolver_query_base::passive]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.passive..passive..ip::resolver_query_base]
-Indicate that returned endpoint is intended for use as a locally bound socket endpoint.
-
-
- static const flags passive = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:v4_mapped ip::resolver_query_base::v4_mapped]
-
-
-['Inherited from ip::resolver_base.]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base.v4_mapped..v4_mapped..ip::resolver_query_base]
-If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses.
-
-
- static const flags v4_mapped = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:_resolver_query_base ip::resolver_query_base::~resolver_query_base]
-
-[indexterm2 asio.indexterm.ip__resolver_query_base._resolver_query_base..~resolver_query_base..ip::resolver_query_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~resolver_query_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__tcp ip::tcp]
-
-
-Encapsulates the flags needed for TCP.
-
-
- class tcp
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__tcp.acceptor [*acceptor]]]
- [The TCP acceptor type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__tcp.endpoint [*endpoint]]]
- [The type of a TCP endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__tcp.iostream [*iostream]]]
- [The TCP iostream type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__tcp.no_delay [*no_delay]]]
- [Socket option for disabling the Nagle algorithm. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__tcp.resolver [*resolver]]]
- [The TCP resolver type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__tcp.socket [*socket]]]
- [The TCP socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__tcp.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.ip__tcp.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.ip__tcp.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
- [
- [[link asio.reference.ip__tcp.v4 [*v4]]]
- [Construct to represent the IPv4 TCP protocol. ]
- ]
-
- [
- [[link asio.reference.ip__tcp.v6 [*v6]]]
- [Construct to represent the IPv6 TCP protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__tcp.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__tcp.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__tcp `ip::tcp`] class contains flags necessary for TCP sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:acceptor ip::tcp::acceptor]
-
-[indexterm2 asio.indexterm.ip__tcp.acceptor..acceptor..ip::tcp]
-The TCP acceptor type.
-
-
- typedef basic_socket_acceptor< tcp > acceptor;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.native_handle_type [*native_handle_type]]]
- [The native representation of an acceptor. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_acceptor.accept [*accept]]]
- [Accept a new connection.
-
- Accept a new connection and obtain the endpoint of the peer. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.assign [*assign]]]
- [Assigns an existing native acceptor to the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
- [Start an asynchronous accept. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.async_wait [*async_wait]]]
- [Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
- [Construct an acceptor without opening it.
-
- Construct an open acceptor.
-
- Construct an acceptor opened on the given endpoint.
-
- Construct a basic_socket_acceptor on an existing native acceptor.
-
- Move-construct a basic_socket_acceptor from another.
-
- Move-construct a basic_socket_acceptor from an acceptor of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.bind [*bind]]]
- [Bind the acceptor to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.close [*close]]]
- [Close the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_option [*get_option]]]
- [Get an option from the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.io_control [*io_control]]]
- [Perform an IO control command on the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.is_open [*is_open]]]
- [Determine whether the acceptor is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.listen [*listen]]]
- [Place the acceptor into the state where it will listen for new connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.native_handle [*native_handle]]]
- [Get the native acceptor representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native acceptor implementation.
-
- Sets the non-blocking mode of the native acceptor implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the acceptor.
-
- Sets the non-blocking mode of the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.open [*open]]]
- [Open the acceptor using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_acceptor from another.
-
- Move-assign a basic_socket_acceptor from an acceptor of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.set_option [*set_option]]]
- [Set an option on the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.wait [*wait]]]
- [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor._basic_socket_acceptor [*~basic_socket_acceptor]]]
- [Destroys the acceptor. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] class template is used for accepting new socket connections.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Example]
-
-Opening a socket acceptor with the SO\_REUSEADDR option enabled:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), port);
- acceptor.open(endpoint.protocol());
- acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint ip::tcp::endpoint]
-
-[indexterm2 asio.indexterm.ip__tcp.endpoint..endpoint..ip::tcp]
-The type of a TCP endpoint.
-
-
- typedef basic_endpoint< tcp > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint.
-
- Set the IP address associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
-
- Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint.
-
- Move-assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order.
-
- Set the port associated with the endpoint. The port number is always in the host's byte order. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_endpoint `ip::basic_endpoint`] class template describes an endpoint that may be associated with a particular socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family ip::tcp::family]
-
-[indexterm2 asio.indexterm.ip__tcp.family..family..ip::tcp]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:iostream ip::tcp::iostream]
-
-[indexterm2 asio.indexterm.ip__tcp.iostream..iostream..ip::tcp]
-The TCP iostream type.
-
-
- typedef basic_socket_iostream< tcp > iostream;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration [*duration]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration_type [*duration_type]]]
- [(Deprecated: Use duration.) The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_type [*time_type]]]
- [(Deprecated: Use time_point.) The time type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
- [Construct a basic_socket_iostream without establishing a connection.
-
- Construct a basic_socket_iostream from the supplied socket.
-
- Move-construct a basic_socket_iostream from another.
-
- Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.connect [*connect]]]
- [Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.error [*error]]]
- [Get the last error associated with the stream. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_after [*expires_after]]]
- [Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time as an absolute time.
-
- Set the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expiry [*expiry]]]
- [Get the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_iostream from another. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
- [Return a pointer to the underlying streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.socket [*socket]]]
- [Get a reference to the underlying socket. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:no_delay ip::tcp::no_delay]
-
-[indexterm2 asio.indexterm.ip__tcp.no_delay..no_delay..ip::tcp]
-Socket option for disabling the Nagle algorithm.
-
-
- typedef implementation_defined no_delay;
-
-
-
-Implements the IPPROTO\_TCP/TCP\_NODELAY socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::tcp::no_delay option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::tcp::operator!=]
-
-[indexterm2 asio.indexterm.ip__tcp.operator_not__eq_..operator!=..ip::tcp]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const tcp & p1,
- const tcp & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::tcp::operator==]
-
-[indexterm2 asio.indexterm.ip__tcp.operator_eq__eq_..operator==..ip::tcp]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const tcp & p1,
- const tcp & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol ip::tcp::protocol]
-
-[indexterm2 asio.indexterm.ip__tcp.protocol..protocol..ip::tcp]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:resolver ip::tcp::resolver]
-
-[indexterm2 asio.indexterm.ip__tcp.resolver..resolver..ip::tcp]
-The TCP resolver type.
-
-
- typedef basic_resolver< tcp > resolver;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [(Deprecated.) The iterator type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.query [*query]]]
- [(Deprecated.) The query type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.results_type [*results_type]]]
- [The results type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [(Deprecated.) Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor.
-
- Move-construct a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
- [Move-assign a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [(Deprecated.) Perform forward resolution of a query to a list of entries.
-
- Perform forward resolution of a query to a list of entries.
-
- Perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
- [Destroys the resolver. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver `ip::basic_resolver`] class template provides the ability to resolve a query to a list of endpoints.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:socket ip::tcp::socket]
-
-[indexterm2 asio.indexterm.ip__tcp.socket..socket..ip::tcp]
-The TCP socket type.
-
-
- typedef basic_stream_socket< tcp > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_stream_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
- [Construct a basic_stream_socket without opening it.
-
- Construct and open a basic_stream_socket.
-
- Construct a basic_stream_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_stream_socket on an existing native socket.
-
- Move-construct a basic_stream_socket from another.
-
- Move-construct a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_stream_socket from another.
-
- Move-assign a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.read_some [*read_some]]]
- [Read some data from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.receive [*receive]]]
- [Receive some data on the socket.
-
- Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.send [*send]]]
- [Send some data on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.write_some [*write_some]]]
- [Write some data to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_stream_socket `basic_stream_socket`] class template provides asynchronous and blocking stream-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/tcp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type ip::tcp::type]
-
-[indexterm2 asio.indexterm.ip__tcp.type..type..ip::tcp]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[section:v4 ip::tcp::v4]
-
-[indexterm2 asio.indexterm.ip__tcp.v4..v4..ip::tcp]
-Construct to represent the IPv4 TCP protocol.
-
-
- static tcp v4();
-
-
-
-[endsect]
-
-
-
-[section:v6 ip::tcp::v6]
-
-[indexterm2 asio.indexterm.ip__tcp.v6..v6..ip::tcp]
-Construct to represent the IPv6 TCP protocol.
-
-
- static tcp v6();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ip__udp ip::udp]
-
-
-Encapsulates the flags needed for UDP.
-
-
- class udp
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__udp.endpoint [*endpoint]]]
- [The type of a UDP endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__udp.resolver [*resolver]]]
- [The UDP resolver type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__udp.socket [*socket]]]
- [The UDP socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__udp.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.ip__udp.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.ip__udp.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
- [
- [[link asio.reference.ip__udp.v4 [*v4]]]
- [Construct to represent the IPv4 UDP protocol. ]
- ]
-
- [
- [[link asio.reference.ip__udp.v6 [*v6]]]
- [Construct to represent the IPv6 UDP protocol. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__udp.operator_not__eq_ [*operator!=]]]
- [Compare two protocols for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__udp.operator_eq__eq_ [*operator==]]]
- [Compare two protocols for equality. ]
- ]
-
-]
-
-The [link asio.reference.ip__udp `ip::udp`] class contains flags necessary for UDP sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/udp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:endpoint ip::udp::endpoint]
-
-[indexterm2 asio.indexterm.ip__udp.endpoint..endpoint..ip::udp]
-The type of a UDP endpoint.
-
-
- typedef basic_endpoint< udp > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.address [*address]]]
- [Get the IP address associated with the endpoint.
-
- Set the IP address associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
-
- Construct an endpoint using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote endpoint.
-
- Copy constructor.
-
- Move constructor. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint.
-
- Move-assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.port [*port]]]
- [Get the port associated with the endpoint. The port number is always in the host's byte order.
-
- Set the port associated with the endpoint. The port number is always in the host's byte order. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_endpoint `ip::basic_endpoint`] class template describes an endpoint that may be associated with a particular socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/udp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family ip::udp::family]
-
-[indexterm2 asio.indexterm.ip__udp.family..family..ip::udp]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ ip::udp::operator!=]
-
-[indexterm2 asio.indexterm.ip__udp.operator_not__eq_..operator!=..ip::udp]
-Compare two protocols for inequality.
-
-
- friend bool operator!=(
- const udp & p1,
- const udp & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/udp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ ip::udp::operator==]
-
-[indexterm2 asio.indexterm.ip__udp.operator_eq__eq_..operator==..ip::udp]
-Compare two protocols for equality.
-
-
- friend bool operator==(
- const udp & p1,
- const udp & p2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/udp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol ip::udp::protocol]
-
-[indexterm2 asio.indexterm.ip__udp.protocol..protocol..ip::udp]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:resolver ip::udp::resolver]
-
-[indexterm2 asio.indexterm.ip__udp.resolver..resolver..ip::udp]
-The UDP resolver type.
-
-
- typedef basic_resolver< udp > resolver;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ip__basic_resolver.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.flags [*flags]]]
- [A bitmask type (C++ Std \[lib.bitmask.types\]). ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.iterator [*iterator]]]
- [(Deprecated.) The iterator type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.query [*query]]]
- [(Deprecated.) The query type. ]
-
- ]
-
- [
-
- [[link asio.reference.ip__basic_resolver.results_type [*results_type]]]
- [The results type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.async_resolve [*async_resolve]]]
- [(Deprecated.) Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform forward resolution of a query to a list of entries.
-
- Asynchronously perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.basic_resolver [*basic_resolver]]]
- [Constructor.
-
- Move-construct a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the resolver. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.operator_eq_ [*operator=]]]
- [Move-assign a basic_resolver from another. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.resolve [*resolve]]]
- [(Deprecated.) Perform forward resolution of a query to a list of entries.
-
- Perform forward resolution of a query to a list of entries.
-
- Perform reverse resolution of an endpoint to a list of entries. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver._basic_resolver [*~basic_resolver]]]
- [Destroys the resolver. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ip__basic_resolver.address_configured [*address_configured]]]
- [Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.all_matching [*all_matching]]]
- [If used with v4_mapped, return all matching IPv6 and IPv4 addresses. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.canonical_name [*canonical_name]]]
- [Determine the canonical name of the host specified in the query. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_host [*numeric_host]]]
- [Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.numeric_service [*numeric_service]]]
- [Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.passive [*passive]]]
- [Indicate that returned endpoint is intended for use as a locally bound socket endpoint. ]
- ]
-
- [
- [[link asio.reference.ip__basic_resolver.v4_mapped [*v4_mapped]]]
- [If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. ]
- ]
-
-]
-
-The [link asio.reference.ip__basic_resolver `ip::basic_resolver`] class template provides the ability to resolve a query to a list of endpoints.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/udp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:socket ip::udp::socket]
-
-[indexterm2 asio.indexterm.ip__udp.socket..socket..ip::udp]
-The UDP socket type.
-
-
- typedef basic_datagram_socket< udp > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
- [Construct a basic_datagram_socket without opening it.
-
- Construct and open a basic_datagram_socket.
-
- Construct a basic_datagram_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_datagram_socket on an existing native socket.
-
- Move-construct a basic_datagram_socket from another.
-
- Move-construct a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_datagram_socket from another.
-
- Move-assign a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
- [Receive a datagram with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send_to [*send_to]]]
- [Send a datagram to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_datagram_socket `basic_datagram_socket`] class template provides asynchronous and blocking datagram-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/udp.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type ip::udp::type]
-
-[indexterm2 asio.indexterm.ip__udp.type..type..ip::udp]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[section:v4 ip::udp::v4]
-
-[indexterm2 asio.indexterm.ip__udp.v4..v4..ip::udp]
-Construct to represent the IPv4 UDP protocol.
-
-
- static udp v4();
-
-
-
-[endsect]
-
-
-
-[section:v6 ip::udp::v6]
-
-[indexterm2 asio.indexterm.ip__udp.v6..v6..ip::udp]
-Construct to represent the IPv6 UDP protocol.
-
-
- static udp v6();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ip__unicast__hops ip::unicast::hops]
-
-[indexterm1 asio.indexterm.ip__unicast__hops..ip::unicast::hops]
-Socket option for time-to-live associated with outgoing unicast packets.
-
-
- typedef implementation_defined hops;
-
-
-
-Implements the IPPROTO\_IP/IP\_UNICAST\_TTL socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::unicast::hops option(4);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::ip::unicast::hops option;
- socket.get_option(option);
- int ttl = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/unicast.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__v4_mapped_t ip::v4_mapped_t]
-
-[indexterm1 asio.indexterm.ip__v4_mapped_t..ip::v4_mapped_t]
-Tag type used for distinguishing overloads that deal in IPv4-mapped IPv6 addresses.
-
-
- enum v4_mapped_t
-
-[indexterm2 asio.indexterm.ip__v4_mapped_t.v4_mapped..v4_mapped..ip::v4_mapped_t]
-
-[heading Values]
-[variablelist
-
- [
- [v4_mapped]
- []
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/address_v6.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:ip__v6_only ip::v6_only]
-
-[indexterm1 asio.indexterm.ip__v6_only..ip::v6_only]
-Socket option for determining whether an IPv6 socket supports IPv6 communication only.
-
-
- typedef implementation_defined v6_only;
-
-
-
-Implements the IPPROTO\_IPV6/IP\_V6ONLY socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::v6_only option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::ip::v6_only option;
- socket.get_option(option);
- bool v6_only = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ip/v6_only.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:is_const_buffer_sequence is_const_buffer_sequence]
-
-
-Trait to determine whether a type satisfies the ConstBufferSequence requirements.
-
-
- template<
- typename T>
- struct is_const_buffer_sequence
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-[section:is_dynamic_buffer is_dynamic_buffer]
-
-
-Trait to determine whether a type satisfies the DynamicBuffer requirements.
-
-
- template<
- typename T>
- struct is_dynamic_buffer
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-[section:is_endpoint_sequence is_endpoint_sequence]
-
-
-Type trait used to determine whether a type is an endpoint sequence that can be used with with `connect` and `async_connect`.
-
-
- template<
- typename T>
- struct is_endpoint_sequence
-
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.is_endpoint_sequence.value [*value]]]
- [The value member is true if the type may be used as an endpoint sequence. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/connect.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:value is_endpoint_sequence::value]
-
-[indexterm2 asio.indexterm.is_endpoint_sequence.value..value..is_endpoint_sequence]
-The value member is true if the type may be used as an endpoint sequence.
-
-
- static const bool value;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:is_executor is_executor]
-
-
-The [link asio.reference.is_executor `is_executor`] trait detects whether a type T meets the Executor type requirements.
-
-
- template<
- typename T>
- struct is_executor
-
-
-Class template `is_executor` is a UnaryTypeTrait that is derived from `true_type` if the type `T` meets the syntactic requirements for Executor, otherwise `false_type`.
-
-[heading Requirements]
-
-['Header: ][^asio/is_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-[section:is_match_condition is_match_condition]
-
-
-Type trait used to determine whether a type can be used as a match condition function with read\_until and async\_read\_until.
-
-
- template<
- typename T>
- struct is_match_condition
-
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.is_match_condition.value [*value]]]
- [The value member is true if the type may be used as a match condition. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/read_until.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:value is_match_condition::value]
-
-[indexterm2 asio.indexterm.is_match_condition.value..value..is_match_condition]
-The value member is true if the type may be used as a match condition.
-
-
- static const bool value;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:is_mutable_buffer_sequence is_mutable_buffer_sequence]
-
-
-Trait to determine whether a type satisfies the MutableBufferSequence requirements.
-
-
- template<
- typename T>
- struct is_mutable_buffer_sequence
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-[section:is_read_buffered is_read_buffered]
-
-
-The [link asio.reference.is_read_buffered `is_read_buffered`] class is a traits class that may be used to determine whether a stream type supports buffering of read data.
-
-
- template<
- typename Stream>
- class is_read_buffered
-
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.is_read_buffered.value [*value]]]
- [The value member is true only if the Stream type supports buffering of read data. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/is_read_buffered.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:value is_read_buffered::value]
-
-[indexterm2 asio.indexterm.is_read_buffered.value..value..is_read_buffered]
-The value member is true only if the Stream type supports buffering of read data.
-
-
- static const bool value;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:is_write_buffered is_write_buffered]
-
-
-The [link asio.reference.is_write_buffered `is_write_buffered`] class is a traits class that may be used to determine whether a stream type supports buffering of written data.
-
-
- template<
- typename Stream>
- class is_write_buffered
-
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.is_write_buffered.value [*value]]]
- [The value member is true only if the Stream type supports buffering of written data. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/is_write_buffered.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:value is_write_buffered::value]
-
-[indexterm2 asio.indexterm.is_write_buffered.value..value..is_write_buffered]
-The value member is true only if the Stream type supports buffering of written data.
-
-
- static const bool value;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:local__basic_endpoint local::basic_endpoint]
-
-
-Describes an endpoint for a UNIX socket.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- class basic_endpoint
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.local__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.local__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using the specified path name.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.path [*path]]]
- [Get the path associated with the endpoint.
-
- Set the path associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.local__basic_endpoint `local::basic_endpoint`] class template describes an endpoint that may be associated with a particular UNIX socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:basic_endpoint local::basic_endpoint::basic_endpoint]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.basic_endpoint..basic_endpoint..local::basic_endpoint]
-Default constructor.
-
-
- ``[link asio.reference.local__basic_endpoint.basic_endpoint.overload1 basic_endpoint]``();
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.basic_endpoint.overload1 more...]]``
-
-
-Construct an endpoint using the specified path name.
-
-
- ``[link asio.reference.local__basic_endpoint.basic_endpoint.overload2 basic_endpoint]``(
- const char * path_name);
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.basic_endpoint.overload2 more...]]``
-
- ``[link asio.reference.local__basic_endpoint.basic_endpoint.overload3 basic_endpoint]``(
- const std::string & path_name);
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.basic_endpoint.overload3 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.local__basic_endpoint.basic_endpoint.overload4 basic_endpoint]``(
- const basic_endpoint & other);
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.basic_endpoint.overload4 more...]]``
-
-
-[section:overload1 local::basic_endpoint::basic_endpoint (1 of 4 overloads)]
-
-
-Default constructor.
-
-
- basic_endpoint();
-
-
-
-[endsect]
-
-
-
-[section:overload2 local::basic_endpoint::basic_endpoint (2 of 4 overloads)]
-
-
-Construct an endpoint using the specified path name.
-
-
- basic_endpoint(
- const char * path_name);
-
-
-
-[endsect]
-
-
-
-[section:overload3 local::basic_endpoint::basic_endpoint (3 of 4 overloads)]
-
-
-Construct an endpoint using the specified path name.
-
-
- basic_endpoint(
- const std::string & path_name);
-
-
-
-[endsect]
-
-
-
-[section:overload4 local::basic_endpoint::basic_endpoint (4 of 4 overloads)]
-
-
-Copy constructor.
-
-
- basic_endpoint(
- const basic_endpoint & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:capacity local::basic_endpoint::capacity]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.capacity..capacity..local::basic_endpoint]
-Get the capacity of the endpoint in the native type.
-
-
- std::size_t capacity() const;
-
-
-
-[endsect]
-
-
-[section:data local::basic_endpoint::data]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.data..data..local::basic_endpoint]
-Get the underlying endpoint in the native type.
-
-
- data_type * ``[link asio.reference.local__basic_endpoint.data.overload1 data]``();
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.data.overload1 more...]]``
-
- const data_type * ``[link asio.reference.local__basic_endpoint.data.overload2 data]``() const;
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.data.overload2 more...]]``
-
-
-[section:overload1 local::basic_endpoint::data (1 of 2 overloads)]
-
-
-Get the underlying endpoint in the native type.
-
-
- data_type * data();
-
-
-
-[endsect]
-
-
-
-[section:overload2 local::basic_endpoint::data (2 of 2 overloads)]
-
-
-Get the underlying endpoint in the native type.
-
-
- const data_type * data() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:data_type local::basic_endpoint::data_type]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.data_type..data_type..local::basic_endpoint]
-The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
-
-
- typedef implementation_defined data_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ local::basic_endpoint::operator!=]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_not__eq_..operator!=..local::basic_endpoint]
-Compare two endpoints for inequality.
-
-
- friend bool operator!=(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt_ local::basic_endpoint::operator<]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_lt_..operator<..local::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator<(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_lt__lt_ local::basic_endpoint::operator<<]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_lt__lt_..operator<<..local::basic_endpoint]
-Output an endpoint as a string.
-
-
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const basic_endpoint< Protocol > & endpoint);
-
-
-Used to output a human-readable string for a specified endpoint.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[os][The output stream to which the string will be written.]]
-
-[[endpoint][The endpoint to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The output stream.
-
-
-
-
-[endsect]
-
-
-
-[section:operator_lt__eq_ local::basic_endpoint::operator<=]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_lt__eq_..operator<=..local::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator<=(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ local::basic_endpoint::operator=]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_eq_..operator=..local::basic_endpoint]
-Assign from another endpoint.
-
-
- basic_endpoint & operator=(
- const basic_endpoint & other);
-
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ local::basic_endpoint::operator==]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_eq__eq_..operator==..local::basic_endpoint]
-Compare two endpoints for equality.
-
-
- friend bool operator==(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt_ local::basic_endpoint::operator>]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_gt_..operator>..local::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator>(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_gt__eq_ local::basic_endpoint::operator>=]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.operator_gt__eq_..operator>=..local::basic_endpoint]
-Compare endpoints for ordering.
-
-
- friend bool operator>=(
- const basic_endpoint< Protocol > & e1,
- const basic_endpoint< Protocol > & e2);
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:path local::basic_endpoint::path]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.path..path..local::basic_endpoint]
-Get the path associated with the endpoint.
-
-
- std::string ``[link asio.reference.local__basic_endpoint.path.overload1 path]``() const;
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.path.overload1 more...]]``
-
-
-Set the path associated with the endpoint.
-
-
- void ``[link asio.reference.local__basic_endpoint.path.overload2 path]``(
- const char * p);
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.path.overload2 more...]]``
-
- void ``[link asio.reference.local__basic_endpoint.path.overload3 path]``(
- const std::string & p);
- `` [''''&raquo;''' [link asio.reference.local__basic_endpoint.path.overload3 more...]]``
-
-
-[section:overload1 local::basic_endpoint::path (1 of 3 overloads)]
-
-
-Get the path associated with the endpoint.
-
-
- std::string path() const;
-
-
-
-[endsect]
-
-
-
-[section:overload2 local::basic_endpoint::path (2 of 3 overloads)]
-
-
-Set the path associated with the endpoint.
-
-
- void path(
- const char * p);
-
-
-
-[endsect]
-
-
-
-[section:overload3 local::basic_endpoint::path (3 of 3 overloads)]
-
-
-Set the path associated with the endpoint.
-
-
- void path(
- const std::string & p);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:protocol local::basic_endpoint::protocol]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.protocol..protocol..local::basic_endpoint]
-The protocol associated with the endpoint.
-
-
- protocol_type protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:protocol_type local::basic_endpoint::protocol_type]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.protocol_type..protocol_type..local::basic_endpoint]
-The protocol type associated with the endpoint.
-
-
- typedef Protocol protocol_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/basic_endpoint.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:resize local::basic_endpoint::resize]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.resize..resize..local::basic_endpoint]
-Set the underlying size of the endpoint in the native type.
-
-
- void resize(
- std::size_t new_size);
-
-
-
-[endsect]
-
-
-
-[section:size local::basic_endpoint::size]
-
-[indexterm2 asio.indexterm.local__basic_endpoint.size..size..local::basic_endpoint]
-Get the underlying size of the endpoint in the native type.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:local__connect_pair local::connect_pair]
-
-[indexterm1 asio.indexterm.local__connect_pair..local::connect_pair]
-Create a pair of connected sockets.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- void ``[link asio.reference.local__connect_pair.overload1 connect_pair]``(
- basic_socket< Protocol > & socket1,
- basic_socket< Protocol > & socket2);
- `` [''''&raquo;''' [link asio.reference.local__connect_pair.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- void ``[link asio.reference.local__connect_pair.overload2 connect_pair]``(
- basic_socket< Protocol > & socket1,
- basic_socket< Protocol > & socket2,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.local__connect_pair.overload2 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/local/connect_pair.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 local::connect_pair (1 of 2 overloads)]
-
-
-Create a pair of connected sockets.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- void connect_pair(
- basic_socket< Protocol > & socket1,
- basic_socket< Protocol > & socket2);
-
-
-
-[endsect]
-
-
-
-[section:overload2 local::connect_pair (2 of 2 overloads)]
-
-
-Create a pair of connected sockets.
-
-
- template<
- typename ``[link asio.reference.Protocol Protocol]``>
- void connect_pair(
- basic_socket< Protocol > & socket1,
- basic_socket< Protocol > & socket2,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:local__datagram_protocol local::datagram_protocol]
-
-
-Encapsulates the flags needed for datagram-oriented UNIX sockets.
-
-
- class datagram_protocol
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.local__datagram_protocol.endpoint [*endpoint]]]
- [The type of a UNIX domain endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.local__datagram_protocol.socket [*socket]]]
- [The UNIX domain socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__datagram_protocol.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.local__datagram_protocol.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.local__datagram_protocol.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
-]
-
-The [link asio.reference.local__datagram_protocol `local::datagram_protocol`] class contains flags necessary for datagram-oriented UNIX domain sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:endpoint local::datagram_protocol::endpoint]
-
-[indexterm2 asio.indexterm.local__datagram_protocol.endpoint..endpoint..local::datagram_protocol]
-The type of a UNIX domain endpoint.
-
-
- typedef basic_endpoint< datagram_protocol > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.local__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.local__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using the specified path name.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.path [*path]]]
- [Get the path associated with the endpoint.
-
- Set the path associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.local__basic_endpoint `local::basic_endpoint`] class template describes an endpoint that may be associated with a particular UNIX socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family local::datagram_protocol::family]
-
-[indexterm2 asio.indexterm.local__datagram_protocol.family..family..local::datagram_protocol]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:protocol local::datagram_protocol::protocol]
-
-[indexterm2 asio.indexterm.local__datagram_protocol.protocol..protocol..local::datagram_protocol]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:socket local::datagram_protocol::socket]
-
-[indexterm2 asio.indexterm.local__datagram_protocol.socket..socket..local::datagram_protocol]
-The UNIX domain socket type.
-
-
- typedef basic_datagram_socket< datagram_protocol > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_datagram_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_datagram_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_receive_from [*async_receive_from]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send [*async_send]]]
- [Start an asynchronous send on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_send_to [*async_send_to]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.basic_datagram_socket [*basic_datagram_socket]]]
- [Construct a basic_datagram_socket without opening it.
-
- Construct and open a basic_datagram_socket.
-
- Construct a basic_datagram_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_datagram_socket on an existing native socket.
-
- Move-construct a basic_datagram_socket from another.
-
- Move-construct a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_datagram_socket from another.
-
- Move-assign a basic_datagram_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive [*receive]]]
- [Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.receive_from [*receive_from]]]
- [Receive a datagram with the endpoint of the sender. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send [*send]]]
- [Send some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.send_to [*send_to]]]
- [Send a datagram to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket._basic_datagram_socket [*~basic_datagram_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_datagram_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_datagram_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_datagram_socket `basic_datagram_socket`] class template provides asynchronous and blocking datagram-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/datagram_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type local::datagram_protocol::type]
-
-[indexterm2 asio.indexterm.local__datagram_protocol.type..type..local::datagram_protocol]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:local__stream_protocol local::stream_protocol]
-
-
-Encapsulates the flags needed for stream-oriented UNIX sockets.
-
-
- class stream_protocol
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.local__stream_protocol.acceptor [*acceptor]]]
- [The UNIX domain acceptor type. ]
-
- ]
-
- [
-
- [[link asio.reference.local__stream_protocol.endpoint [*endpoint]]]
- [The type of a UNIX domain endpoint. ]
-
- ]
-
- [
-
- [[link asio.reference.local__stream_protocol.iostream [*iostream]]]
- [The UNIX domain iostream type. ]
-
- ]
-
- [
-
- [[link asio.reference.local__stream_protocol.socket [*socket]]]
- [The UNIX domain socket type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__stream_protocol.family [*family]]]
- [Obtain an identifier for the protocol family. ]
- ]
-
- [
- [[link asio.reference.local__stream_protocol.protocol [*protocol]]]
- [Obtain an identifier for the protocol. ]
- ]
-
- [
- [[link asio.reference.local__stream_protocol.type [*type]]]
- [Obtain an identifier for the type of the protocol. ]
- ]
-
-]
-
-The [link asio.reference.local__stream_protocol `local::stream_protocol`] class contains flags necessary for stream-oriented UNIX domain sockets.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Safe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:acceptor local::stream_protocol::acceptor]
-
-[indexterm2 asio.indexterm.local__stream_protocol.acceptor..acceptor..local::stream_protocol]
-The UNIX domain acceptor type.
-
-
- typedef basic_socket_acceptor< stream_protocol > acceptor;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.native_handle_type [*native_handle_type]]]
- [The native representation of an acceptor. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_acceptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_acceptor.accept [*accept]]]
- [Accept a new connection.
-
- Accept a new connection and obtain the endpoint of the peer. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.assign [*assign]]]
- [Assigns an existing native acceptor to the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.async_accept [*async_accept]]]
- [Start an asynchronous accept. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.async_wait [*async_wait]]]
- [Asynchronously wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.basic_socket_acceptor [*basic_socket_acceptor]]]
- [Construct an acceptor without opening it.
-
- Construct an open acceptor.
-
- Construct an acceptor opened on the given endpoint.
-
- Construct a basic_socket_acceptor on an existing native acceptor.
-
- Move-construct a basic_socket_acceptor from another.
-
- Move-construct a basic_socket_acceptor from an acceptor of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.bind [*bind]]]
- [Bind the acceptor to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.close [*close]]]
- [Close the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.get_option [*get_option]]]
- [Get an option from the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.io_control [*io_control]]]
- [Perform an IO control command on the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.is_open [*is_open]]]
- [Determine whether the acceptor is open. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.listen [*listen]]]
- [Place the acceptor into the state where it will listen for new connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.native_handle [*native_handle]]]
- [Get the native acceptor representation. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native acceptor implementation.
-
- Sets the non-blocking mode of the native acceptor implementation. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the acceptor.
-
- Sets the non-blocking mode of the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.open [*open]]]
- [Open the acceptor using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_acceptor from another.
-
- Move-assign a basic_socket_acceptor from an acceptor of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.set_option [*set_option]]]
- [Set an option on the acceptor. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.wait [*wait]]]
- [Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor._basic_socket_acceptor [*~basic_socket_acceptor]]]
- [Destroys the acceptor. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_acceptor.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_socket_acceptor.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_socket_acceptor `basic_socket_acceptor`] class template is used for accepting new socket connections.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Example]
-
-Opening a socket acceptor with the SO\_REUSEADDR option enabled:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), port);
- acceptor.open(endpoint.protocol());
- acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true));
- acceptor.bind(endpoint);
- acceptor.listen();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:endpoint local::stream_protocol::endpoint]
-
-[indexterm2 asio.indexterm.local__stream_protocol.endpoint..endpoint..local::stream_protocol]
-The type of a UNIX domain endpoint.
-
-
- typedef basic_endpoint< stream_protocol > endpoint;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.local__basic_endpoint.data_type [*data_type]]]
- [The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer. ]
-
- ]
-
- [
-
- [[link asio.reference.local__basic_endpoint.protocol_type [*protocol_type]]]
- [The protocol type associated with the endpoint. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.basic_endpoint [*basic_endpoint]]]
- [Default constructor.
-
- Construct an endpoint using the specified path name.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.capacity [*capacity]]]
- [Get the capacity of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.data [*data]]]
- [Get the underlying endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_eq_ [*operator=]]]
- [Assign from another endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.path [*path]]]
- [Get the path associated with the endpoint.
-
- Set the path associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.protocol [*protocol]]]
- [The protocol associated with the endpoint. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.resize [*resize]]]
- [Set the underlying size of the endpoint in the native type. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.size [*size]]]
- [Get the underlying size of the endpoint in the native type. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_not__eq_ [*operator!=]]]
- [Compare two endpoints for inequality. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt_ [*operator<]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt__eq_ [*operator<=]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_eq__eq_ [*operator==]]]
- [Compare two endpoints for equality. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_gt_ [*operator>]]]
- [Compare endpoints for ordering. ]
- ]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_gt__eq_ [*operator>=]]]
- [Compare endpoints for ordering. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.local__basic_endpoint.operator_lt__lt_ [*operator<<]]]
- [Output an endpoint as a string. ]
- ]
-
-]
-
-The [link asio.reference.local__basic_endpoint `local::basic_endpoint`] class template describes an endpoint that may be associated with a particular UNIX socket.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:family local::stream_protocol::family]
-
-[indexterm2 asio.indexterm.local__stream_protocol.family..family..local::stream_protocol]
-Obtain an identifier for the protocol family.
-
-
- int family() const;
-
-
-
-[endsect]
-
-
-
-[section:iostream local::stream_protocol::iostream]
-
-[indexterm2 asio.indexterm.local__stream_protocol.iostream..iostream..local::stream_protocol]
-The UNIX domain iostream type.
-
-
- typedef basic_socket_iostream< stream_protocol > iostream;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_socket_iostream.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration [*duration]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.duration_type [*duration_type]]]
- [(Deprecated: Use duration.) The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_point [*time_point]]]
- [The time type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_socket_iostream.time_type [*time_type]]]
- [(Deprecated: Use time_point.) The time type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_socket_iostream.basic_socket_iostream [*basic_socket_iostream]]]
- [Construct a basic_socket_iostream without establishing a connection.
-
- Construct a basic_socket_iostream from the supplied socket.
-
- Move-construct a basic_socket_iostream from another.
-
- Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.close [*close]]]
- [Close the connection. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.connect [*connect]]]
- [Establish a connection to an endpoint corresponding to a resolver query. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.error [*error]]]
- [Get the last error associated with the stream. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_after [*expires_after]]]
- [Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time as an absolute time.
-
- Set the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the stream's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the stream's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.expiry [*expiry]]]
- [Get the stream's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.operator_eq_ [*operator=]]]
- [Move-assign a basic_socket_iostream from another. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.rdbuf [*rdbuf]]]
- [Return a pointer to the underlying streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_socket_iostream.socket [*socket]]]
- [Get a reference to the underlying socket. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:protocol local::stream_protocol::protocol]
-
-[indexterm2 asio.indexterm.local__stream_protocol.protocol..protocol..local::stream_protocol]
-Obtain an identifier for the protocol.
-
-
- int protocol() const;
-
-
-
-[endsect]
-
-
-
-[section:socket local::stream_protocol::socket]
-
-[indexterm2 asio.indexterm.local__stream_protocol.socket..socket..local::stream_protocol]
-The UNIX domain socket type.
-
-
- typedef basic_stream_socket< stream_protocol > socket;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_stream_socket.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.endpoint_type [*endpoint_type]]]
- [The endpoint type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.lowest_layer_type [*lowest_layer_type]]]
- [A basic_socket is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.native_handle_type [*native_handle_type]]]
- [The native representation of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.protocol_type [*protocol_type]]]
- [The protocol type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_stream_socket.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.assign [*assign]]]
- [Assign an existing native socket to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_connect [*async_connect]]]
- [Start an asynchronous connect. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_receive [*async_receive]]]
- [Start an asynchronous receive. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_send [*async_send]]]
- [Start an asynchronous send. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_wait [*async_wait]]]
- [Asynchronously wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.at_mark [*at_mark]]]
- [Determine whether the socket is at the out-of-band data mark. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.available [*available]]]
- [Determine the number of bytes available for reading. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.basic_stream_socket [*basic_stream_socket]]]
- [Construct a basic_stream_socket without opening it.
-
- Construct and open a basic_stream_socket.
-
- Construct a basic_stream_socket, opening it and binding it to the given local endpoint.
-
- Construct a basic_stream_socket on an existing native socket.
-
- Move-construct a basic_stream_socket from another.
-
- Move-construct a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.bind [*bind]]]
- [Bind the socket to the given local endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.close [*close]]]
- [Close the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.connect [*connect]]]
- [Connect the socket to the specified endpoint. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.get_option [*get_option]]]
- [Get an option from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.io_control [*io_control]]]
- [Perform an IO control command on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.is_open [*is_open]]]
- [Determine whether the socket is open. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.local_endpoint [*local_endpoint]]]
- [Get the local endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_handle [*native_handle]]]
- [Get the native socket representation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native socket implementation.
-
- Sets the non-blocking mode of the native socket implementation. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the socket.
-
- Sets the non-blocking mode of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.open [*open]]]
- [Open the socket using the specified protocol. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.operator_eq_ [*operator=]]]
- [Move-assign a basic_stream_socket from another.
-
- Move-assign a basic_stream_socket from a socket of another protocol type. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.read_some [*read_some]]]
- [Read some data from the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.receive [*receive]]]
- [Receive some data on the socket.
-
- Receive some data on a connected socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.remote_endpoint [*remote_endpoint]]]
- [Get the remote endpoint of the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.send [*send]]]
- [Send some data on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.set_option [*set_option]]]
- [Set an option on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.shutdown [*shutdown]]]
- [Disable sends or receives on the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.wait [*wait]]]
- [Wait for the socket to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.write_some [*write_some]]]
- [Write some data to the socket. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket._basic_stream_socket [*~basic_stream_socket]]]
- [Destroys the socket. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_stream_socket.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.basic_stream_socket.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-The [link asio.reference.basic_stream_socket `basic_stream_socket`] class template provides asynchronous and blocking stream-oriented socket functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/local/stream_protocol.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:type local::stream_protocol::type]
-
-[indexterm2 asio.indexterm.local__stream_protocol.type..type..local::stream_protocol]
-Obtain an identifier for the type of the protocol.
-
-
- int type() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:make_work_guard make_work_guard]
-
-[indexterm1 asio.indexterm.make_work_guard..make_work_guard]
-Create an [link asio.reference.executor_work_guard `executor_work_guard`] object.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- executor_work_guard< Executor > ``[link asio.reference.make_work_guard.overload1 make_work_guard]``(
- const Executor & ex,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.make_work_guard.overload1 more...]]``
-
- template<
- typename ExecutionContext>
- executor_work_guard< typename ExecutionContext::executor_type > ``[link asio.reference.make_work_guard.overload2 make_work_guard]``(
- ExecutionContext & ctx,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.make_work_guard.overload2 more...]]``
-
- template<
- typename T>
- executor_work_guard< typename associated_executor< T >::type > ``[link asio.reference.make_work_guard.overload3 make_work_guard]``(
- const T & t,
- typename enable_if<!is_executor< T >::value &&!is_convertible< T &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.make_work_guard.overload3 more...]]``
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]``>
- executor_work_guard< typename associated_executor< T, Executor >::type > ``[link asio.reference.make_work_guard.overload4 make_work_guard]``(
- const T & t,
- const Executor & ex,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.make_work_guard.overload4 more...]]``
-
- template<
- typename T,
- typename ExecutionContext>
- executor_work_guard< typename associated_executor< T, typename ExecutionContext::executor_type >::type > ``[link asio.reference.make_work_guard.overload5 make_work_guard]``(
- const T & t,
- ExecutionContext & ctx,
- typename enable_if<!is_executor< T >::value &&!is_convertible< T &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.make_work_guard.overload5 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/executor_work_guard.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 make_work_guard (1 of 5 overloads)]
-
-
-Create an [link asio.reference.executor_work_guard `executor_work_guard`] object.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- executor_work_guard< Executor > make_work_guard(
- const Executor & ex,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload2 make_work_guard (2 of 5 overloads)]
-
-
-Create an [link asio.reference.executor_work_guard `executor_work_guard`] object.
-
-
- template<
- typename ExecutionContext>
- executor_work_guard< typename ExecutionContext::executor_type > make_work_guard(
- ExecutionContext & ctx,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload3 make_work_guard (3 of 5 overloads)]
-
-
-Create an [link asio.reference.executor_work_guard `executor_work_guard`] object.
-
-
- template<
- typename T>
- executor_work_guard< typename associated_executor< T >::type > make_work_guard(
- const T & t,
- typename enable_if<!is_executor< T >::value &&!is_convertible< T &, execution_context & >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload4 make_work_guard (4 of 5 overloads)]
-
-
-Create an [link asio.reference.executor_work_guard `executor_work_guard`] object.
-
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]``>
- executor_work_guard< typename associated_executor< T, Executor >::type > make_work_guard(
- const T & t,
- const Executor & ex,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-
-[section:overload5 make_work_guard (5 of 5 overloads)]
-
-
-Create an [link asio.reference.executor_work_guard `executor_work_guard`] object.
-
-
- template<
- typename T,
- typename ExecutionContext>
- executor_work_guard< typename associated_executor< T, typename ExecutionContext::executor_type >::type > make_work_guard(
- const T & t,
- ExecutionContext & ctx,
- typename enable_if<!is_executor< T >::value &&!is_convertible< T &, execution_context & >::value >::type * = 0);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:mutable_buffer mutable_buffer]
-
-
-Holds a buffer that can be modified.
-
-
- class mutable_buffer
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
- [Create a new modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::mutable_buffer b1 = ...;
- std::size_t s1 = b1.size();
- unsigned char* p1 = static_cast<unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:data mutable_buffer::data]
-
-[indexterm2 asio.indexterm.mutable_buffer.data..data..mutable_buffer]
-Get a pointer to the beginning of the memory range.
-
-
- void * data() const;
-
-
-
-[endsect]
-
-
-[section:mutable_buffer mutable_buffer::mutable_buffer]
-
-[indexterm2 asio.indexterm.mutable_buffer.mutable_buffer..mutable_buffer..mutable_buffer]
-Construct an empty buffer.
-
-
- ``[link asio.reference.mutable_buffer.mutable_buffer.overload1 mutable_buffer]``();
- `` [''''&raquo;''' [link asio.reference.mutable_buffer.mutable_buffer.overload1 more...]]``
-
-
-Construct a buffer to represent a given memory range.
-
-
- ``[link asio.reference.mutable_buffer.mutable_buffer.overload2 mutable_buffer]``(
- void * data,
- std::size_t size);
- `` [''''&raquo;''' [link asio.reference.mutable_buffer.mutable_buffer.overload2 more...]]``
-
-
-[section:overload1 mutable_buffer::mutable_buffer (1 of 2 overloads)]
-
-
-Construct an empty buffer.
-
-
- mutable_buffer();
-
-
-
-[endsect]
-
-
-
-[section:overload2 mutable_buffer::mutable_buffer (2 of 2 overloads)]
-
-
-Construct a buffer to represent a given memory range.
-
-
- mutable_buffer(
- void * data,
- std::size_t size);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_plus_ mutable_buffer::operator+]
-
-[indexterm2 asio.indexterm.mutable_buffer.operator_plus_..operator+..mutable_buffer]
-Create a new modifiable buffer that is offset from the start of another.
-
-
- mutable_buffer ``[link asio.reference.mutable_buffer.operator_plus_.overload1 operator+]``(
- const mutable_buffer & b,
- std::size_t n);
- `` [''''&raquo;''' [link asio.reference.mutable_buffer.operator_plus_.overload1 more...]]``
-
- mutable_buffer ``[link asio.reference.mutable_buffer.operator_plus_.overload2 operator+]``(
- std::size_t n,
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.mutable_buffer.operator_plus_.overload2 more...]]``
-
-
-[section:overload1 mutable_buffer::operator+ (1 of 2 overloads)]
-
-
-Create a new modifiable buffer that is offset from the start of another.
-
-
- mutable_buffer operator+(
- const mutable_buffer & b,
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:overload2 mutable_buffer::operator+ (2 of 2 overloads)]
-
-
-Create a new modifiable buffer that is offset from the start of another.
-
-
- mutable_buffer operator+(
- std::size_t n,
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_plus__eq_ mutable_buffer::operator+=]
-
-[indexterm2 asio.indexterm.mutable_buffer.operator_plus__eq_..operator+=..mutable_buffer]
-Move the start of the buffer by the specified number of bytes.
-
-
- mutable_buffer & operator+=(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:size mutable_buffer::size]
-
-[indexterm2 asio.indexterm.mutable_buffer.size..size..mutable_buffer]
-Get the size of the memory range.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:mutable_buffers_1 mutable_buffers_1]
-
-
-(Deprecated: Use [link asio.reference.mutable_buffer `mutable_buffer`].) Adapts a single modifiable buffer so that it meets the requirements of the MutableBufferSequence concept.
-
-
- class mutable_buffers_1 :
- public mutable_buffer
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.mutable_buffers_1.const_iterator [*const_iterator]]]
- [A random-access iterator type that may be used to read elements. ]
-
- ]
-
- [
-
- [[link asio.reference.mutable_buffers_1.value_type [*value_type]]]
- [The type for each element in the list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffers_1.begin [*begin]]]
- [Get a random-access iterator to the first element. ]
- ]
-
- [
- [[link asio.reference.mutable_buffers_1.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffers_1.end [*end]]]
- [Get a random-access iterator for one past the last element. ]
- ]
-
- [
- [[link asio.reference.mutable_buffers_1.mutable_buffers_1 [*mutable_buffers_1]]]
- [Construct to represent a given memory range.
-
- Construct to represent a single modifiable buffer. ]
- ]
-
- [
- [[link asio.reference.mutable_buffers_1.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.mutable_buffers_1.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffers_1.operator_plus_ [*operator+]]]
- [Create a new modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:begin mutable_buffers_1::begin]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.begin..begin..mutable_buffers_1]
-Get a random-access iterator to the first element.
-
-
- const_iterator begin() const;
-
-
-
-[endsect]
-
-
-
-[section:const_iterator mutable_buffers_1::const_iterator]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.const_iterator..const_iterator..mutable_buffers_1]
-A random-access iterator type that may be used to read elements.
-
-
- typedef const mutable_buffer * const_iterator;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:data mutable_buffers_1::data]
-
-
-['Inherited from mutable_buffer.]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.data..data..mutable_buffers_1]
-Get a pointer to the beginning of the memory range.
-
-
- void * data() const;
-
-
-
-[endsect]
-
-
-
-[section:end mutable_buffers_1::end]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.end..end..mutable_buffers_1]
-Get a random-access iterator for one past the last element.
-
-
- const_iterator end() const;
-
-
-
-[endsect]
-
-
-[section:mutable_buffers_1 mutable_buffers_1::mutable_buffers_1]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.mutable_buffers_1..mutable_buffers_1..mutable_buffers_1]
-Construct to represent a given memory range.
-
-
- ``[link asio.reference.mutable_buffers_1.mutable_buffers_1.overload1 mutable_buffers_1]``(
- void * data,
- std::size_t size);
- `` [''''&raquo;''' [link asio.reference.mutable_buffers_1.mutable_buffers_1.overload1 more...]]``
-
-
-Construct to represent a single modifiable buffer.
-
-
- explicit ``[link asio.reference.mutable_buffers_1.mutable_buffers_1.overload2 mutable_buffers_1]``(
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.mutable_buffers_1.mutable_buffers_1.overload2 more...]]``
-
-
-[section:overload1 mutable_buffers_1::mutable_buffers_1 (1 of 2 overloads)]
-
-
-Construct to represent a given memory range.
-
-
- mutable_buffers_1(
- void * data,
- std::size_t size);
-
-
-
-[endsect]
-
-
-
-[section:overload2 mutable_buffers_1::mutable_buffers_1 (2 of 2 overloads)]
-
-
-Construct to represent a single modifiable buffer.
-
-
- mutable_buffers_1(
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:operator_plus_ mutable_buffers_1::operator+]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.operator_plus_..operator+..mutable_buffers_1]
-Create a new modifiable buffer that is offset from the start of another.
-
-
- mutable_buffer ``[link asio.reference.mutable_buffers_1.operator_plus_.overload1 operator+]``(
- const mutable_buffer & b,
- std::size_t n);
- `` [''''&raquo;''' [link asio.reference.mutable_buffers_1.operator_plus_.overload1 more...]]``
-
- mutable_buffer ``[link asio.reference.mutable_buffers_1.operator_plus_.overload2 operator+]``(
- std::size_t n,
- const mutable_buffer & b);
- `` [''''&raquo;''' [link asio.reference.mutable_buffers_1.operator_plus_.overload2 more...]]``
-
-
-[section:overload1 mutable_buffers_1::operator+ (1 of 2 overloads)]
-
-
-['Inherited from mutable_buffer.]
-
-
-Create a new modifiable buffer that is offset from the start of another.
-
-
- mutable_buffer operator+(
- const mutable_buffer & b,
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:overload2 mutable_buffers_1::operator+ (2 of 2 overloads)]
-
-
-['Inherited from mutable_buffer.]
-
-
-Create a new modifiable buffer that is offset from the start of another.
-
-
- mutable_buffer operator+(
- std::size_t n,
- const mutable_buffer & b);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_plus__eq_ mutable_buffers_1::operator+=]
-
-
-['Inherited from mutable_buffer.]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.operator_plus__eq_..operator+=..mutable_buffers_1]
-Move the start of the buffer by the specified number of bytes.
-
-
- mutable_buffer & operator+=(
- std::size_t n);
-
-
-
-[endsect]
-
-
-
-[section:size mutable_buffers_1::size]
-
-
-['Inherited from mutable_buffer.]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.size..size..mutable_buffers_1]
-Get the size of the memory range.
-
-
- std::size_t size() const;
-
-
-
-[endsect]
-
-
-
-[section:value_type mutable_buffers_1::value_type]
-
-[indexterm2 asio.indexterm.mutable_buffers_1.value_type..value_type..mutable_buffers_1]
-The type for each element in the list of buffers.
-
-
- typedef mutable_buffer value_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
- [Create a new modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::mutable_buffer b1 = ...;
- std::size_t s1 = b1.size();
- unsigned char* p1 = static_cast<unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:null_buffers null_buffers]
-
-
-(Deprecated: Use the socket/descriptor wait() and async\_wait() member functions.) An implementation of both the ConstBufferSequence and MutableBufferSequence concepts to represent a null buffer sequence.
-
-
- class null_buffers
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.null_buffers.const_iterator [*const_iterator]]]
- [A random-access iterator type that may be used to read elements. ]
-
- ]
-
- [
-
- [[link asio.reference.null_buffers.value_type [*value_type]]]
- [The type for each element in the list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.null_buffers.begin [*begin]]]
- [Get a random-access iterator to the first element. ]
- ]
-
- [
- [[link asio.reference.null_buffers.end [*end]]]
- [Get a random-access iterator for one past the last element. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:begin null_buffers::begin]
-
-[indexterm2 asio.indexterm.null_buffers.begin..begin..null_buffers]
-Get a random-access iterator to the first element.
-
-
- const_iterator begin() const;
-
-
-
-[endsect]
-
-
-
-[section:const_iterator null_buffers::const_iterator]
-
-[indexterm2 asio.indexterm.null_buffers.const_iterator..const_iterator..null_buffers]
-A random-access iterator type that may be used to read elements.
-
-
- typedef const mutable_buffer * const_iterator;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:end null_buffers::end]
-
-[indexterm2 asio.indexterm.null_buffers.end..end..null_buffers]
-Get a random-access iterator for one past the last element.
-
-
- const_iterator end() const;
-
-
-
-[endsect]
-
-
-
-[section:value_type null_buffers::value_type]
-
-[indexterm2 asio.indexterm.null_buffers.value_type..value_type..null_buffers]
-The type for each element in the list of buffers.
-
-
- typedef mutable_buffer value_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.data [*data]]]
- [Get a pointer to the beginning of the memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.mutable_buffer [*mutable_buffer]]]
- [Construct an empty buffer.
-
- Construct a buffer to represent a given memory range. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus__eq_ [*operator+=]]]
- [Move the start of the buffer by the specified number of bytes. ]
- ]
-
- [
- [[link asio.reference.mutable_buffer.size [*size]]]
- [Get the size of the memory range. ]
- ]
-
-]
-
-[heading Related Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.mutable_buffer.operator_plus_ [*operator+]]]
- [Create a new modifiable buffer that is offset from the start of another. ]
- ]
-
-]
-
-The [link asio.reference.mutable_buffer `mutable_buffer`] class provides a safe representation of a buffer that can be modified. It does not own the underlying data, and so is cheap to copy or assign.
-
-
-[heading Accessing Buffer Contents]
-
-
-
-The contents of a buffer may be accessed using the `data()` and `size()` member functions:
-
-
-
- asio::mutable_buffer b1 = ...;
- std::size_t s1 = b1.size();
- unsigned char* p1 = static_cast<unsigned char*>(b1.data());
-
-
-
-
-The `data()` member function permits violations of type safety, so uses of it in application code should be carefully considered.
-
-
-[heading Requirements]
-
-['Header: ][^asio/buffer.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:operator_lt__lt_ operator<<]
-
-[indexterm1 asio.indexterm.operator_lt__lt_..operator<<]
-Output an error code.
-
-
- template<
- typename Elem,
- typename Traits>
- std::basic_ostream< Elem, Traits > & operator<<(
- std::basic_ostream< Elem, Traits > & os,
- const error_code & ec);
-
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:placeholders__bytes_transferred placeholders::bytes_transferred]
-
-[indexterm1 asio.indexterm.placeholders__bytes_transferred..placeholders::bytes_transferred]
-An argument placeholder, for use with boost::bind(), that corresponds to the bytes\_transferred argument of a handler for asynchronous functions such as `asio::basic_stream_socket::async_write_some` or `asio::async_write`.
-
-
- unspecified bytes_transferred;
-
-
-[heading Requirements]
-
-['Header: ][^asio/placeholders.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:placeholders__endpoint placeholders::endpoint]
-
-[indexterm1 asio.indexterm.placeholders__endpoint..placeholders::endpoint]
-An argument placeholder, for use with boost::bind(), that corresponds to the results argument of a handler for asynchronous functions such as `asio::async_connect`.
-
-
- unspecified endpoint;
-
-
-[heading Requirements]
-
-['Header: ][^asio/placeholders.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:placeholders__error placeholders::error]
-
-[indexterm1 asio.indexterm.placeholders__error..placeholders::error]
-An argument placeholder, for use with boost::bind(), that corresponds to the error argument of a handler for any of the asynchronous functions.
-
-
- unspecified error;
-
-
-[heading Requirements]
-
-['Header: ][^asio/placeholders.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:placeholders__iterator placeholders::iterator]
-
-[indexterm1 asio.indexterm.placeholders__iterator..placeholders::iterator]
-An argument placeholder, for use with boost::bind(), that corresponds to the iterator argument of a handler for asynchronous functions such as `asio::async_connect`.
-
-
- unspecified iterator;
-
-
-[heading Requirements]
-
-['Header: ][^asio/placeholders.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:placeholders__results placeholders::results]
-
-[indexterm1 asio.indexterm.placeholders__results..placeholders::results]
-An argument placeholder, for use with boost::bind(), that corresponds to the results argument of a handler for asynchronous functions such as asio::basic\_resolver::async\_resolve.
-
-
- unspecified results;
-
-
-[heading Requirements]
-
-['Header: ][^asio/placeholders.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:placeholders__signal_number placeholders::signal_number]
-
-[indexterm1 asio.indexterm.placeholders__signal_number..placeholders::signal_number]
-An argument placeholder, for use with boost::bind(), that corresponds to the signal\_number argument of a handler for asynchronous functions such as `asio::signal_set::async_wait`.
-
-
- unspecified signal_number;
-
-
-[heading Requirements]
-
-['Header: ][^asio/placeholders.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:posix__descriptor posix::descriptor]
-
-
-Provides POSIX descriptor functionality.
-
-
- class descriptor :
- public posix::descriptor_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.posix__descriptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.lowest_layer_type [*lowest_layer_type]]]
- [A descriptor is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.native_handle_type [*native_handle_type]]]
- [The native representation of a descriptor. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor.assign [*assign]]]
- [Assign an existing native descriptor to the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.async_wait [*async_wait]]]
- [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.close [*close]]]
- [Close the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.descriptor [*descriptor]]]
- [Construct a descriptor without opening it.
-
- Construct a descriptor on an existing native descriptor.
-
- Move-construct a descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.io_control [*io_control]]]
- [Perform an IO control command on the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.is_open [*is_open]]]
- [Determine whether the descriptor is open. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.native_handle [*native_handle]]]
- [Get the native descriptor representation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native descriptor implementation.
-
- Sets the non-blocking mode of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the descriptor.
-
- Sets the non-blocking mode of the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.operator_eq_ [*operator=]]]
- [Move-assign a descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.release [*release]]]
- [Release ownership of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.wait [*wait]]]
- [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor._descriptor [*~descriptor]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.posix__descriptor `posix::descriptor`] class template provides the ability to wrap a POSIX descriptor.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign posix::descriptor::assign]
-
-[indexterm2 asio.indexterm.posix__descriptor.assign..assign..posix::descriptor]
-Assign an existing native descriptor to the descriptor.
-
-
- void ``[link asio.reference.posix__descriptor.assign.overload1 assign]``(
- const native_handle_type & native_descriptor);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.assign.overload1 more...]]``
-
- void ``[link asio.reference.posix__descriptor.assign.overload2 assign]``(
- const native_handle_type & native_descriptor,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.assign.overload2 more...]]``
-
-
-[section:overload1 posix::descriptor::assign (1 of 2 overloads)]
-
-
-Assign an existing native descriptor to the descriptor.
-
-
- void assign(
- const native_handle_type & native_descriptor);
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::assign (2 of 2 overloads)]
-
-
-Assign an existing native descriptor to the descriptor.
-
-
- void assign(
- const native_handle_type & native_descriptor,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait posix::descriptor::async_wait]
-
-[indexterm2 asio.indexterm.posix__descriptor.async_wait..async_wait..posix::descriptor]
-Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a descriptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired descriptor state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- descriptor.async_wait(
- asio::posix::stream_descriptor::wait_read,
- wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:bytes_readable posix::descriptor::bytes_readable]
-
-[indexterm2 asio.indexterm.posix__descriptor.bytes_readable..bytes_readable..posix::descriptor]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::descriptor_base::bytes_readable command(true);
- descriptor.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel posix::descriptor::cancel]
-
-[indexterm2 asio.indexterm.posix__descriptor.cancel..cancel..posix::descriptor]
-Cancel all asynchronous operations associated with the descriptor.
-
-
- void ``[link asio.reference.posix__descriptor.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.cancel.overload1 more...]]``
-
- void ``[link asio.reference.posix__descriptor.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.cancel.overload2 more...]]``
-
-
-[section:overload1 posix::descriptor::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the descriptor.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the descriptor.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close posix::descriptor::close]
-
-[indexterm2 asio.indexterm.posix__descriptor.close..close..posix::descriptor]
-Close the descriptor.
-
-
- void ``[link asio.reference.posix__descriptor.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.close.overload1 more...]]``
-
- void ``[link asio.reference.posix__descriptor.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.close.overload2 more...]]``
-
-
-[section:overload1 posix::descriptor::close (1 of 2 overloads)]
-
-
-Close the descriptor.
-
-
- void close();
-
-
-This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::close (2 of 2 overloads)]
-
-
-Close the descriptor.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:descriptor posix::descriptor::descriptor]
-
-[indexterm2 asio.indexterm.posix__descriptor.descriptor..descriptor..posix::descriptor]
-Construct a descriptor without opening it.
-
-
- explicit ``[link asio.reference.posix__descriptor.descriptor.overload1 descriptor]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.descriptor.overload1 more...]]``
-
-
-Construct a descriptor on an existing native descriptor.
-
-
- ``[link asio.reference.posix__descriptor.descriptor.overload2 descriptor]``(
- asio::io_context & io_context,
- const native_handle_type & native_descriptor);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.descriptor.overload2 more...]]``
-
-
-Move-construct a descriptor from another.
-
-
- ``[link asio.reference.posix__descriptor.descriptor.overload3 descriptor]``(
- descriptor && other);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.descriptor.overload3 more...]]``
-
-
-[section:overload1 posix::descriptor::descriptor (1 of 3 overloads)]
-
-
-Construct a descriptor without opening it.
-
-
- descriptor(
- asio::io_context & io_context);
-
-
-This constructor creates a descriptor without opening it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::descriptor (2 of 3 overloads)]
-
-
-Construct a descriptor on an existing native descriptor.
-
-
- descriptor(
- asio::io_context & io_context,
- const native_handle_type & native_descriptor);
-
-
-This constructor creates a descriptor object to hold an existing native descriptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor.]]
-
-[[native_descriptor][A native descriptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::descriptor::descriptor (3 of 3 overloads)]
-
-
-Move-construct a descriptor from another.
-
-
- descriptor(
- descriptor && other);
-
-
-This constructor moves a descriptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other descriptor object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `descriptor(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type posix::descriptor::executor_type]
-
-[indexterm2 asio.indexterm.posix__descriptor.executor_type..executor_type..posix::descriptor]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor posix::descriptor::get_executor]
-
-[indexterm2 asio.indexterm.posix__descriptor.get_executor..get_executor..posix::descriptor]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context posix::descriptor::get_io_context]
-
-[indexterm2 asio.indexterm.posix__descriptor.get_io_context..get_io_context..posix::descriptor]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service posix::descriptor::get_io_service]
-
-[indexterm2 asio.indexterm.posix__descriptor.get_io_service..get_io_service..posix::descriptor]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:io_control posix::descriptor::io_control]
-
-[indexterm2 asio.indexterm.posix__descriptor.io_control..io_control..posix::descriptor]
-Perform an IO control command on the descriptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.posix__descriptor.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.posix__descriptor.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.io_control.overload2 more...]]``
-
-
-[section:overload1 posix::descriptor::io_control (1 of 2 overloads)]
-
-
-Perform an IO control command on the descriptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the descriptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the descriptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::posix::stream_descriptor::bytes_readable command;
- descriptor.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::io_control (2 of 2 overloads)]
-
-
-Perform an IO control command on the descriptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the descriptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the descriptor.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::posix::stream_descriptor::bytes_readable command;
- asio::error_code ec;
- descriptor.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open posix::descriptor::is_open]
-
-[indexterm2 asio.indexterm.posix__descriptor.is_open..is_open..posix::descriptor]
-Determine whether the descriptor is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer posix::descriptor::lowest_layer]
-
-[indexterm2 asio.indexterm.posix__descriptor.lowest_layer..lowest_layer..posix::descriptor]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.posix__descriptor.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.posix__descriptor.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 posix::descriptor::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type posix::descriptor::lowest_layer_type]
-
-[indexterm2 asio.indexterm.posix__descriptor.lowest_layer_type..lowest_layer_type..posix::descriptor]
-A descriptor is always the lowest layer.
-
-
- typedef descriptor lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.posix__descriptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.lowest_layer_type [*lowest_layer_type]]]
- [A descriptor is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.native_handle_type [*native_handle_type]]]
- [The native representation of a descriptor. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor.assign [*assign]]]
- [Assign an existing native descriptor to the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.async_wait [*async_wait]]]
- [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.close [*close]]]
- [Close the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.descriptor [*descriptor]]]
- [Construct a descriptor without opening it.
-
- Construct a descriptor on an existing native descriptor.
-
- Move-construct a descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.io_control [*io_control]]]
- [Perform an IO control command on the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.is_open [*is_open]]]
- [Determine whether the descriptor is open. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.native_handle [*native_handle]]]
- [Get the native descriptor representation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native descriptor implementation.
-
- Sets the non-blocking mode of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the descriptor.
-
- Sets the non-blocking mode of the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.operator_eq_ [*operator=]]]
- [Move-assign a descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.release [*release]]]
- [Release ownership of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.wait [*wait]]]
- [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor._descriptor [*~descriptor]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.posix__descriptor `posix::descriptor`] class template provides the ability to wrap a POSIX descriptor.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle posix::descriptor::native_handle]
-
-[indexterm2 asio.indexterm.posix__descriptor.native_handle..native_handle..posix::descriptor]
-Get the native descriptor representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the descriptor. This is intended to allow access to native descriptor functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type posix::descriptor::native_handle_type]
-
-[indexterm2 asio.indexterm.posix__descriptor.native_handle_type..native_handle_type..posix::descriptor]
-The native representation of a descriptor.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking posix::descriptor::native_non_blocking]
-
-[indexterm2 asio.indexterm.posix__descriptor.native_non_blocking..native_non_blocking..posix::descriptor]
-Gets the non-blocking mode of the native descriptor implementation.
-
-
- bool ``[link asio.reference.posix__descriptor.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native descriptor implementation.
-
-
- void ``[link asio.reference.posix__descriptor.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.posix__descriptor.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 posix::descriptor::native_non_blocking (1 of 3 overloads)]
-
-
-Gets the non-blocking mode of the native descriptor implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native descriptor. This mode has no effect on the behaviour of the descriptor object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying descriptor is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the descriptor object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native descriptor.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::native_non_blocking (2 of 3 overloads)]
-
-
-Sets the non-blocking mode of the native descriptor implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native descriptor. It has no effect on the behaviour of the descriptor object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying descriptor is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::descriptor::native_non_blocking (3 of 3 overloads)]
-
-
-Sets the non-blocking mode of the native descriptor implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native descriptor. It has no effect on the behaviour of the descriptor object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying descriptor is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking posix::descriptor::non_blocking]
-
-[indexterm2 asio.indexterm.posix__descriptor.non_blocking..non_blocking..posix::descriptor]
-Gets the non-blocking mode of the descriptor.
-
-
- bool ``[link asio.reference.posix__descriptor.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the descriptor.
-
-
- void ``[link asio.reference.posix__descriptor.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.posix__descriptor.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.non_blocking.overload3 more...]]``
-
-
-[section:overload1 posix::descriptor::non_blocking (1 of 3 overloads)]
-
-
-Gets the non-blocking mode of the descriptor.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::non_blocking (2 of 3 overloads)]
-
-
-Sets the non-blocking mode of the descriptor.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::descriptor::non_blocking (3 of 3 overloads)]
-
-
-Sets the non-blocking mode of the descriptor.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq_ posix::descriptor::operator=]
-
-[indexterm2 asio.indexterm.posix__descriptor.operator_eq_..operator=..posix::descriptor]
-Move-assign a descriptor from another.
-
-
- descriptor & operator=(
- descriptor && other);
-
-
-This assignment operator moves a descriptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other descriptor object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `descriptor(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-
-[section:release posix::descriptor::release]
-
-[indexterm2 asio.indexterm.posix__descriptor.release..release..posix::descriptor]
-Release ownership of the native descriptor implementation.
-
-
- native_handle_type release();
-
-
-This function may be used to obtain the underlying representation of the descriptor. After calling this function, `is_open()` returns false. The caller is responsible for closing the descriptor.
-
-All outstanding asynchronous read or write operations will finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[endsect]
-
-
-[section:wait posix::descriptor::wait]
-
-[indexterm2 asio.indexterm.posix__descriptor.wait..wait..posix::descriptor]
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.posix__descriptor.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.wait.overload1 more...]]``
-
- void ``[link asio.reference.posix__descriptor.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__descriptor.wait.overload2 more...]]``
-
-
-[section:overload1 posix::descriptor::wait (1 of 2 overloads)]
-
-
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a descriptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired descriptor state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a descriptor to become readable.
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- descriptor.wait(asio::posix::stream_descriptor::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::descriptor::wait (2 of 2 overloads)]
-
-
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a descriptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired descriptor state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a descriptor to become readable.
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::error_code ec;
- descriptor.wait(asio::posix::stream_descriptor::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type posix::descriptor::wait_type]
-
-[indexterm2 asio.indexterm.posix__descriptor.wait_type..wait_type..posix::descriptor]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.posix__descriptor.wait_type.wait_read..wait_read..posix::descriptor]
-[indexterm2 asio.indexterm.posix__descriptor.wait_type.wait_write..wait_write..posix::descriptor]
-[indexterm2 asio.indexterm.posix__descriptor.wait_type.wait_error..wait_error..posix::descriptor]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a descriptor to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a descriptor to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a descriptor to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `descriptor::wait()` and `descriptor::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_descriptor posix::descriptor::~descriptor]
-
-[indexterm2 asio.indexterm.posix__descriptor._descriptor..~descriptor..posix::descriptor]
-Protected destructor to prevent deletion through this type.
-
-
- ~descriptor();
-
-
-This function destroys the descriptor, cancelling any outstanding asynchronous wait operations associated with the descriptor as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:posix__descriptor_base posix::descriptor_base]
-
-
-The [link asio.reference.posix__descriptor_base `posix::descriptor_base`] class is used as a base for the descriptor class as a place to define the associated IO control commands.
-
-
- class descriptor_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.posix__descriptor_base.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor_base.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor_base._descriptor_base [*~descriptor_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:bytes_readable posix::descriptor_base::bytes_readable]
-
-[indexterm2 asio.indexterm.posix__descriptor_base.bytes_readable..bytes_readable..posix::descriptor_base]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::descriptor_base::bytes_readable command(true);
- descriptor.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/descriptor_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:wait_type posix::descriptor_base::wait_type]
-
-[indexterm2 asio.indexterm.posix__descriptor_base.wait_type..wait_type..posix::descriptor_base]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.posix__descriptor_base.wait_type.wait_read..wait_read..posix::descriptor_base]
-[indexterm2 asio.indexterm.posix__descriptor_base.wait_type.wait_write..wait_write..posix::descriptor_base]
-[indexterm2 asio.indexterm.posix__descriptor_base.wait_type.wait_error..wait_error..posix::descriptor_base]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a descriptor to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a descriptor to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a descriptor to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `descriptor::wait()` and `descriptor::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_descriptor_base posix::descriptor_base::~descriptor_base]
-
-[indexterm2 asio.indexterm.posix__descriptor_base._descriptor_base..~descriptor_base..posix::descriptor_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~descriptor_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:posix__stream_descriptor posix::stream_descriptor]
-
-
-Provides stream-oriented descriptor functionality.
-
-
- class stream_descriptor :
- public posix::descriptor
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.posix__stream_descriptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__stream_descriptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__stream_descriptor.lowest_layer_type [*lowest_layer_type]]]
- [A descriptor is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__stream_descriptor.native_handle_type [*native_handle_type]]]
- [The native representation of a descriptor. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__stream_descriptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__stream_descriptor.assign [*assign]]]
- [Assign an existing native descriptor to the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.async_wait [*async_wait]]]
- [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.close [*close]]]
- [Close the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.io_control [*io_control]]]
- [Perform an IO control command on the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.is_open [*is_open]]]
- [Determine whether the descriptor is open. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.native_handle [*native_handle]]]
- [Get the native descriptor representation. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native descriptor implementation.
-
- Sets the non-blocking mode of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the descriptor.
-
- Sets the non-blocking mode of the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.operator_eq_ [*operator=]]]
- [Move-assign a stream_descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.read_some [*read_some]]]
- [Read some data from the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.release [*release]]]
- [Release ownership of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.stream_descriptor [*stream_descriptor]]]
- [Construct a stream_descriptor without opening it.
-
- Construct a stream_descriptor on an existing native descriptor.
-
- Move-construct a stream_descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.wait [*wait]]]
- [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.posix__stream_descriptor.write_some [*write_some]]]
- [Write some data to the descriptor. ]
- ]
-
-]
-
-The [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] class template provides asynchronous and blocking stream-oriented descriptor functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign posix::stream_descriptor::assign]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.assign..assign..posix::stream_descriptor]
-Assign an existing native descriptor to the descriptor.
-
-
- void ``[link asio.reference.posix__stream_descriptor.assign.overload1 assign]``(
- const native_handle_type & native_descriptor);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.assign.overload1 more...]]``
-
- void ``[link asio.reference.posix__stream_descriptor.assign.overload2 assign]``(
- const native_handle_type & native_descriptor,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.assign.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::assign (1 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Assign an existing native descriptor to the descriptor.
-
-
- void assign(
- const native_handle_type & native_descriptor);
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::assign (2 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Assign an existing native descriptor to the descriptor.
-
-
- void assign(
- const native_handle_type & native_descriptor,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some posix::stream_descriptor::async_read_some]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.async_read_some..async_read_some..posix::stream_descriptor]
-Start an asynchronous read.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the stream descriptor. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- descriptor.async_read_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:async_wait posix::stream_descriptor::async_wait]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.async_wait..async_wait..posix::stream_descriptor]
-Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- wait_type w,
- WaitHandler && handler);
-
-
-This function is used to perform an asynchronous wait for a descriptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired descriptor state.]]
-
-[[handler][The handler to be called when the wait operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Example]
-
-
-
- void wait_handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Wait succeeded.
- }
- }
-
- ...
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- descriptor.async_wait(
- asio::posix::stream_descriptor::wait_read,
- wait_handler);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some posix::stream_descriptor::async_write_some]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.async_write_some..async_write_some..posix::stream_descriptor]
-Start an asynchronous write.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the stream descriptor. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the descriptor. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- descriptor.async_write_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:bytes_readable posix::stream_descriptor::bytes_readable]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.bytes_readable..bytes_readable..posix::stream_descriptor]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::descriptor_base::bytes_readable command(true);
- descriptor.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:cancel posix::stream_descriptor::cancel]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.cancel..cancel..posix::stream_descriptor]
-Cancel all asynchronous operations associated with the descriptor.
-
-
- void ``[link asio.reference.posix__stream_descriptor.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.cancel.overload1 more...]]``
-
- void ``[link asio.reference.posix__stream_descriptor.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.cancel.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::cancel (1 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Cancel all asynchronous operations associated with the descriptor.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::cancel (2 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Cancel all asynchronous operations associated with the descriptor.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close posix::stream_descriptor::close]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.close..close..posix::stream_descriptor]
-Close the descriptor.
-
-
- void ``[link asio.reference.posix__stream_descriptor.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.close.overload1 more...]]``
-
- void ``[link asio.reference.posix__stream_descriptor.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.close.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::close (1 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Close the descriptor.
-
-
- void close();
-
-
-This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::close (2 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Close the descriptor.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the descriptor. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. Note that, even if the function indicates an error, the underlying descriptor is closed. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type posix::stream_descriptor::executor_type]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.executor_type..executor_type..posix::stream_descriptor]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor posix::stream_descriptor::get_executor]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.get_executor..get_executor..posix::stream_descriptor]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context posix::stream_descriptor::get_io_context]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.get_io_context..get_io_context..posix::stream_descriptor]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service posix::stream_descriptor::get_io_service]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.get_io_service..get_io_service..posix::stream_descriptor]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:io_control posix::stream_descriptor::io_control]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.io_control..io_control..posix::stream_descriptor]
-Perform an IO control command on the descriptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.posix__stream_descriptor.io_control.overload1 io_control]``(
- IoControlCommand & command);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.io_control.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void ``[link asio.reference.posix__stream_descriptor.io_control.overload2 io_control]``(
- IoControlCommand & command,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.io_control.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::io_control (1 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Perform an IO control command on the descriptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command);
-
-
-This function is used to execute an IO control command on the descriptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the descriptor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::posix::stream_descriptor::bytes_readable command;
- descriptor.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::io_control (2 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Perform an IO control command on the descriptor.
-
-
- template<
- typename ``[link asio.reference.IoControlCommand IoControlCommand]``>
- void io_control(
- IoControlCommand & command,
- asio::error_code & ec);
-
-
-This function is used to execute an IO control command on the descriptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[command][The IO control command to be performed on the descriptor.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-[heading Example]
-
-Getting the number of bytes ready to read:
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::posix::stream_descriptor::bytes_readable command;
- asio::error_code ec;
- descriptor.io_control(command, ec);
- if (ec)
- {
- // An error occurred.
- }
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open posix::stream_descriptor::is_open]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.is_open..is_open..posix::stream_descriptor]
-Determine whether the descriptor is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer posix::stream_descriptor::lowest_layer]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.lowest_layer..lowest_layer..posix::stream_descriptor]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.posix__stream_descriptor.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.posix__stream_descriptor.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a descriptor cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type posix::stream_descriptor::lowest_layer_type]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.lowest_layer_type..lowest_layer_type..posix::stream_descriptor]
-A descriptor is always the lowest layer.
-
-
- typedef descriptor lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.posix__descriptor.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.lowest_layer_type [*lowest_layer_type]]]
- [A descriptor is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.native_handle_type [*native_handle_type]]]
- [The native representation of a descriptor. ]
-
- ]
-
- [
-
- [[link asio.reference.posix__descriptor.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor.assign [*assign]]]
- [Assign an existing native descriptor to the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.async_wait [*async_wait]]]
- [Asynchronously wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.close [*close]]]
- [Close the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.descriptor [*descriptor]]]
- [Construct a descriptor without opening it.
-
- Construct a descriptor on an existing native descriptor.
-
- Move-construct a descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.io_control [*io_control]]]
- [Perform an IO control command on the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.is_open [*is_open]]]
- [Determine whether the descriptor is open. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.native_handle [*native_handle]]]
- [Get the native descriptor representation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.native_non_blocking [*native_non_blocking]]]
- [Gets the non-blocking mode of the native descriptor implementation.
-
- Sets the non-blocking mode of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.non_blocking [*non_blocking]]]
- [Gets the non-blocking mode of the descriptor.
-
- Sets the non-blocking mode of the descriptor. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.operator_eq_ [*operator=]]]
- [Move-assign a descriptor from another. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.release [*release]]]
- [Release ownership of the native descriptor implementation. ]
- ]
-
- [
- [[link asio.reference.posix__descriptor.wait [*wait]]]
- [Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.posix__descriptor._descriptor [*~descriptor]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.posix__descriptor `posix::descriptor`] class template provides the ability to wrap a POSIX descriptor.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle posix::stream_descriptor::native_handle]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.native_handle..native_handle..posix::stream_descriptor]
-Get the native descriptor representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the descriptor. This is intended to allow access to native descriptor functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type posix::stream_descriptor::native_handle_type]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.native_handle_type..native_handle_type..posix::stream_descriptor]
-The native representation of a descriptor.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/posix/stream_descriptor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:native_non_blocking posix::stream_descriptor::native_non_blocking]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.native_non_blocking..native_non_blocking..posix::stream_descriptor]
-Gets the non-blocking mode of the native descriptor implementation.
-
-
- bool ``[link asio.reference.posix__stream_descriptor.native_non_blocking.overload1 native_non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.native_non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the native descriptor implementation.
-
-
- void ``[link asio.reference.posix__stream_descriptor.native_non_blocking.overload2 native_non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.native_non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.posix__stream_descriptor.native_non_blocking.overload3 native_non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.native_non_blocking.overload3 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::native_non_blocking (1 of 3 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Gets the non-blocking mode of the native descriptor implementation.
-
-
- bool native_non_blocking() const;
-
-
-This function is used to retrieve the non-blocking mode of the underlying native descriptor. This mode has no effect on the behaviour of the descriptor object's synchronous operations.
-
-
-[heading Return Value]
-
-`true` if the underlying descriptor is in non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).
-
-
-[heading Remarks]
-
-The current non-blocking mode is cached by the descriptor object. Consequently, the return value may be incorrect if the non-blocking mode was set directly on the native descriptor.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::native_non_blocking (2 of 3 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Sets the non-blocking mode of the native descriptor implementation.
-
-
- void native_non_blocking(
- bool mode);
-
-
-This function is used to modify the non-blocking mode of the underlying native descriptor. It has no effect on the behaviour of the descriptor object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying descriptor is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::stream_descriptor::native_non_blocking (3 of 3 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Sets the non-blocking mode of the native descriptor implementation.
-
-
- void native_non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-This function is used to modify the non-blocking mode of the underlying native descriptor. It has no effect on the behaviour of the descriptor object's synchronous operations.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the underlying descriptor is put into non-blocking mode and direct system calls may fail with `asio::error::would_block` (or the equivalent system error).]]
-
-[[ec][Set to indicate what error occurred, if any. If the `mode` is `false`, but the current value of `non_blocking()` is `true`, this function fails with `asio::error::invalid_argument`, as the combination does not make sense. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:non_blocking posix::stream_descriptor::non_blocking]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.non_blocking..non_blocking..posix::stream_descriptor]
-Gets the non-blocking mode of the descriptor.
-
-
- bool ``[link asio.reference.posix__stream_descriptor.non_blocking.overload1 non_blocking]``() const;
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.non_blocking.overload1 more...]]``
-
-
-Sets the non-blocking mode of the descriptor.
-
-
- void ``[link asio.reference.posix__stream_descriptor.non_blocking.overload2 non_blocking]``(
- bool mode);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.non_blocking.overload2 more...]]``
-
- void ``[link asio.reference.posix__stream_descriptor.non_blocking.overload3 non_blocking]``(
- bool mode,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.non_blocking.overload3 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::non_blocking (1 of 3 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Gets the non-blocking mode of the descriptor.
-
-
- bool non_blocking() const;
-
-
-
-[heading Return Value]
-
-`true` if the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::non_blocking (2 of 3 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Sets the non-blocking mode of the descriptor.
-
-
- void non_blocking(
- bool mode);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::stream_descriptor::non_blocking (3 of 3 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Sets the non-blocking mode of the descriptor.
-
-
- void non_blocking(
- bool mode,
- asio::error_code & ec);
-
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[mode][If `true`, the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq_ posix::stream_descriptor::operator=]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.operator_eq_..operator=..posix::stream_descriptor]
-Move-assign a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] from another.
-
-
- stream_descriptor & operator=(
- stream_descriptor && other);
-
-
-This assignment operator moves a stream descriptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `stream_descriptor(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[section:read_some posix::stream_descriptor::read_some]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.read_some..read_some..posix::stream_descriptor]
-Read some data from the descriptor.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.posix__stream_descriptor.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.read_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.posix__stream_descriptor.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.read_some.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::read_some (1 of 2 overloads)]
-
-
-Read some data from the descriptor.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the stream descriptor. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- descriptor.read_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::read_some (2 of 2 overloads)]
-
-
-Read some data from the descriptor.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read data from the stream descriptor. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:release posix::stream_descriptor::release]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.release..release..posix::stream_descriptor]
-Release ownership of the native descriptor implementation.
-
-
- native_handle_type release();
-
-
-This function may be used to obtain the underlying representation of the descriptor. After calling this function, `is_open()` returns false. The caller is responsible for closing the descriptor.
-
-All outstanding asynchronous read or write operations will finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[endsect]
-
-
-[section:stream_descriptor posix::stream_descriptor::stream_descriptor]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.stream_descriptor..stream_descriptor..posix::stream_descriptor]
-Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] without opening it.
-
-
- explicit ``[link asio.reference.posix__stream_descriptor.stream_descriptor.overload1 stream_descriptor]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.stream_descriptor.overload1 more...]]``
-
-
-Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] on an existing native descriptor.
-
-
- ``[link asio.reference.posix__stream_descriptor.stream_descriptor.overload2 stream_descriptor]``(
- asio::io_context & io_context,
- const native_handle_type & native_descriptor);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.stream_descriptor.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] from another.
-
-
- ``[link asio.reference.posix__stream_descriptor.stream_descriptor.overload3 stream_descriptor]``(
- stream_descriptor && other);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.stream_descriptor.overload3 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::stream_descriptor (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] without opening it.
-
-
- stream_descriptor(
- asio::io_context & io_context);
-
-
-This constructor creates a stream descriptor without opening it. The descriptor needs to be opened and then connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::stream_descriptor (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] on an existing native descriptor.
-
-
- stream_descriptor(
- asio::io_context & io_context,
- const native_handle_type & native_descriptor);
-
-
-This constructor creates a stream descriptor object to hold an existing native descriptor.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream descriptor will use to dispatch handlers for any asynchronous operations performed on the descriptor.]]
-
-[[native_descriptor][The new underlying descriptor implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 posix::stream_descriptor::stream_descriptor (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] from another.
-
-
- stream_descriptor(
- stream_descriptor && other);
-
-
-This constructor moves a stream descriptor from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.posix__stream_descriptor `posix::stream_descriptor`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `stream_descriptor(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:wait posix::stream_descriptor::wait]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.wait..wait..posix::stream_descriptor]
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void ``[link asio.reference.posix__stream_descriptor.wait.overload1 wait]``(
- wait_type w);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.wait.overload1 more...]]``
-
- void ``[link asio.reference.posix__stream_descriptor.wait.overload2 wait]``(
- wait_type w,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.wait.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::wait (1 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w);
-
-
-This function is used to perform a blocking wait for a descriptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired descriptor state.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a descriptor to become readable.
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- descriptor.wait(asio::posix::stream_descriptor::wait_read);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::wait (2 of 2 overloads)]
-
-
-['Inherited from posix::descriptor.]
-
-
-Wait for the descriptor to become ready to read, ready to write, or to have pending error conditions.
-
-
- void wait(
- wait_type w,
- asio::error_code & ec);
-
-
-This function is used to perform a blocking wait for a descriptor to enter a ready to read, write or error condition state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[w][Specifies the desired descriptor state.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Example]
-
-Waiting for a descriptor to become readable.
-
- asio::posix::stream_descriptor descriptor(io_context);
- ...
- asio::error_code ec;
- descriptor.wait(asio::posix::stream_descriptor::wait_read, ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:wait_type posix::stream_descriptor::wait_type]
-
-
-['Inherited from posix::descriptor.]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type..wait_type..posix::stream_descriptor]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type.wait_read..wait_read..posix::stream_descriptor]
-[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type.wait_write..wait_write..posix::stream_descriptor]
-[indexterm2 asio.indexterm.posix__stream_descriptor.wait_type.wait_error..wait_error..posix::stream_descriptor]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a descriptor to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a descriptor to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a descriptor to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `descriptor::wait()` and `descriptor::async_wait()`.
-
-
-[endsect]
-
-
-[section:write_some posix::stream_descriptor::write_some]
-
-[indexterm2 asio.indexterm.posix__stream_descriptor.write_some..write_some..posix::stream_descriptor]
-Write some data to the descriptor.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.posix__stream_descriptor.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.write_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.posix__stream_descriptor.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.posix__stream_descriptor.write_some.overload2 more...]]``
-
-
-[section:overload1 posix::stream_descriptor::write_some (1 of 2 overloads)]
-
-
-Write some data to the descriptor.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the stream descriptor. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the descriptor.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- descriptor.write_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 posix::stream_descriptor::write_some (2 of 2 overloads)]
-
-
-Write some data to the descriptor.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write data to the stream descriptor. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the descriptor.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:post post]
-
-[indexterm1 asio.indexterm.post..post]
-Submits a completion token or function object for execution.
-
-
- template<
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.post.overload1 post]``(
- CompletionToken && token);
- `` [''''&raquo;''' [link asio.reference.post.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.post.overload2 post]``(
- const Executor & ex,
- CompletionToken && token,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.post.overload2 more...]]``
-
- template<
- typename ExecutionContext,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.post.overload3 post]``(
- ExecutionContext & ctx,
- CompletionToken && token,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.post.overload3 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/post.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 post (1 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
- CompletionToken && token);
-
-
-This function submits an object for execution using the object's associated executor. The function object is queued for execution, and is never called from the current thread prior to returning from `post()`.
-
-This function has the following effects:
-
-
-* Constructs a function object handler of type `Handler`, initialized with `handler(forward<CompletionToken>(token))`.
-
-
-* Constructs an object `result` of type `async_result<Handler>`, initializing the object as `result(handler)`.
-
-
-* Obtains the handler's associated executor object `ex` by performing `get_associated_executor(handler)`.
-
-
-* Obtains the handler's associated allocator object `alloc` by performing `get_associated_allocator(handler)`.
-
-
-* Performs `ex.post(std::move(handler), alloc)`.
-
-
-* Returns `result.get()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 post (2 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
- const Executor & ex,
- CompletionToken && token,
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-This function submits an object for execution using the specified executor. The function object is queued for execution, and is never called from the current thread prior to returning from `post()`.
-
-This function has the following effects:
-
-
-* Constructs a function object handler of type `Handler`, initialized with `handler(forward<CompletionToken>(token))`.
-
-
-* Constructs an object `result` of type `async_result<Handler>`, initializing the object as `result(handler)`.
-
-
-* Obtains the handler's associated executor object `ex1` by performing `get_associated_executor(handler)`.
-
-
-* Creates a work object `w` by performing `make_work(ex1)`.
-
-
-* Obtains the handler's associated allocator object `alloc` by performing `get_associated_allocator(handler)`.
-
-
-* Constructs a function object `f` with a function call operator that performs `ex1.dispatch(std::move(handler), alloc)` followed by `w.reset()`.
-
-
-* Performs `Executor(ex).post(std::move(f), alloc)`.
-
-
-* Returns `result.get()`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 post (3 of 3 overloads)]
-
-
-Submits a completion token or function object for execution.
-
-
- template<
- typename ExecutionContext,
- typename CompletionToken>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` post(
- ExecutionContext & ctx,
- CompletionToken && token,
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-
-[heading Return Value]
-
-`post(ctx.get_executor(), forward<CompletionToken>(token))`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read read]
-
-[indexterm1 asio.indexterm.read..read]
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.read.overload1 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.read.overload2 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- asio::error_code & ec,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read.overload3 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read.overload4 read]``(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read.overload5 read]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read.overload6 read]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read.overload7 read]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read.overload8 read]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read.overload8 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read.overload9 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b);
- `` [''''&raquo;''' [link asio.reference.read.overload9 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read.overload10 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read.overload10 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read.overload11 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
- `` [''''&raquo;''' [link asio.reference.read.overload11 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read.overload12 read]``(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read.overload12 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/read.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 read (1 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::read(s, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read(
- s, buffers,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 read (2 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- asio::error_code & ec,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::read(s, asio::buffer(data, size), ec);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read(
- s, buffers,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 read (3 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's read\_some function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::read(s, asio::buffer(data, size),
- asio::transfer_at_least(32));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 read (4 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read(
- SyncReadStream & s,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_mutable_buffer_sequence< MutableBufferSequence >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the stream.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's read\_some function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 read (5 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The specified dynamic buffer sequence is full (that is, it has reached maximum size).
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read(
- s, buffers,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 read (6 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read(
- s, buffers,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 read (7 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The specified dynamic buffer sequence is full (that is, it has reached maximum size).
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's read\_some function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 read (8 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The specified dynamic buffer sequence is full (that is, it has reached maximum size).
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's read\_some function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-
-[section:overload9 read (9 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read(
- s, b,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload10 read (10 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read(
- s, b,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload11 read (11 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's read\_some function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 read (12 of 12 overloads)]
-
-
-Attempt to read a certain amount of data from a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read(
- SyncReadStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
-
-
-This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
-
-
-* The supplied buffer is full (that is, it has reached maximum size).
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the stream's read\_some function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read_at read_at]
-
-[indexterm1 asio.indexterm.read_at..read_at]
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.read_at.overload1 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.read_at.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.read_at.overload2 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_at.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read_at.overload3 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition);
- `` [''''&raquo;''' [link asio.reference.read_at.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read_at.overload4 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_at.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_at.overload5 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b);
- `` [''''&raquo;''' [link asio.reference.read_at.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_at.overload6 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_at.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read_at.overload7 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
- `` [''''&raquo;''' [link asio.reference.read_at.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.read_at.overload8 read_at]``(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_at.overload8 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/read_at.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 read_at (1 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::read_at(d, 42, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read_at(
- d, 42, buffers,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 read_at (2 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::read_at(d, 42,
- asio::buffer(data, size), ec);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read_at(
- d, 42, buffers,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 read_at (3 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the device's read\_some\_at function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::read_at(d, 42, asio::buffer(data, size),
- asio::transfer_at_least(32));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 read_at (4 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- const MutableBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. The sum of the buffer sizes indicates the maximum number of bytes to read from the device.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the device's read\_some\_at function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 read_at (5 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read_at(
- d, 42, b,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 read_at (6 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::read_at(
- d, 42, b,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 read_at (7 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the device's read\_some\_at function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 read_at (8 of 8 overloads)]
-
-
-Attempt to read a certain amount of data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessReadDevice SyncRandomAccessReadDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t read_at(
- SyncRandomAccessReadDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
-
-
-This function is used to read a certain number of bytes of data from a random access device at the specified offset. The call will block until one of the following conditions is true:
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's read\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device from which the data is to be read. The type must support the SyncRandomAccessReadDevice concept.]]
-
-[[offset][The offset at which the data will be read.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object into which the data will be read.]]
-
-[[completion_condition][The function object to be called to determine whether the read operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest read_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the read operation is complete. A non-zero return value indicates the maximum number of bytes to be read on the next call to the device's read\_some\_at function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read_until read_until]
-
-[indexterm1 asio.indexterm.read_until..read_until]
-Read data into a dynamic buffer sequence, or into a streambuf, until it contains a delimiter, matches a regular expression, or a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read_until.overload1 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- char delim);
- `` [''''&raquo;''' [link asio.reference.read_until.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read_until.overload2 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- char delim,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_until.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read_until.overload3 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- string_view delim);
- `` [''''&raquo;''' [link asio.reference.read_until.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read_until.overload4 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- string_view delim,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_until.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read_until.overload5 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- const boost::regex & expr);
- `` [''''&raquo;''' [link asio.reference.read_until.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.read_until.overload6 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- const boost::regex & expr,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_until.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename MatchCondition>
- std::size_t ``[link asio.reference.read_until.overload7 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- MatchCondition match_condition,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read_until.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename MatchCondition>
- std::size_t ``[link asio.reference.read_until.overload8 read_until]``(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- MatchCondition match_condition,
- asio::error_code & ec,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read_until.overload8 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_until.overload9 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- char delim);
- `` [''''&raquo;''' [link asio.reference.read_until.overload9 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_until.overload10 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- char delim,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_until.overload10 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_until.overload11 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- string_view delim);
- `` [''''&raquo;''' [link asio.reference.read_until.overload11 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_until.overload12 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- string_view delim,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_until.overload12 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_until.overload13 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr);
- `` [''''&raquo;''' [link asio.reference.read_until.overload13 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.read_until.overload14 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.read_until.overload14 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename MatchCondition>
- std::size_t ``[link asio.reference.read_until.overload15 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- MatchCondition match_condition,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read_until.overload15 more...]]``
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename MatchCondition>
- std::size_t ``[link asio.reference.read_until.overload16 read_until]``(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- MatchCondition match_condition,
- asio::error_code & ec,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.read_until.overload16 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/read_until.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 read_until (1 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- char delim);
-
-
-This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the dynamic buffer sequence contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the dynamic buffer sequence's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[delim][The delimiter character.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area up to and including the delimiter.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond the delimiter. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-
-[heading Example]
-
-To read data into a `std::string` until a newline is encountered:
-
- std::string data;
- std::string n = asio::read_until(s,
- asio::dynamic_buffer(data), '\n');
- std::string line = data.substr(0, n);
- data.erase(0, n);
-
-
-After the `read_until` operation completes successfully, the string `data` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... }
-
-
-The call to `substr` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\n' }
-
-
-After the call to `erase`, the remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 read_until (2 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- char delim,
- asio::error_code & ec);
-
-
-This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the dynamic buffer sequence contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the dynamic buffer sequence's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[delim][The delimiter character.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area up to and including the delimiter. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond the delimiter. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 read_until (3 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- string_view delim);
-
-
-This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the dynamic buffer sequence contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the dynamic buffer sequence's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[delim][The delimiter string.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area up to and including the delimiter.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond the delimiter. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-
-[heading Example]
-
-To read data into a `std::string` until a CR-LF sequence is encountered:
-
- std::string data;
- std::string n = asio::read_until(s,
- asio::dynamic_buffer(data), "\r\n");
- std::string line = data.substr(0, n);
- data.erase(0, n);
-
-
-After the `read_until` operation completes successfully, the string `data` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `substr` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-After the call to `erase`, the remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 read_until (4 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- string_view delim,
- asio::error_code & ec);
-
-
-This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the dynamic buffer sequence contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the dynamic buffer sequence's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][The dynamic buffer sequence into which the data will be read.]]
-
-[[delim][The delimiter string.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area up to and including the delimiter. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond the delimiter. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 read_until (5 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until some part of the data it contains matches a regular expression.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- const boost::regex & expr);
-
-
-This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
-
-
-* A substring of the dynamic buffer sequence's get area matches the regular expression.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the dynamic buffer sequence's get area already contains data that matches the regular expression, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][A dynamic buffer sequence into which the data will be read.]]
-
-[[expr][The regular expression.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area up to and including the substring that matches the regular expression.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond that which matched the regular expression. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-
-[heading Example]
-
-To read data into a `std::string` until a CR-LF sequence is encountered:
-
- std::string data;
- std::string n = asio::read_until(s,
- asio::dynamic_buffer(data), boost::regex("\r\n"));
- std::string line = data.substr(0, n);
- data.erase(0, n);
-
-
-After the `read_until` operation completes successfully, the string `data` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `substr` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-After the call to `erase`, the remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 read_until (6 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until some part of the data it contains matches a regular expression.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- const boost::regex & expr,
- asio::error_code & ec);
-
-
-This function is used to read data into the specified dynamic buffer sequence until the dynamic buffer sequence's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
-
-
-* A substring of the dynamic buffer sequence's get area matches the regular expression.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the dynamic buffer sequence's get area already contains data that matches the regular expression, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][A dynamic buffer sequence into which the data will be read.]]
-
-[[expr][The regular expression.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area up to and including the substring that matches the regular expression. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond that which matched the regular expression. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 read_until (7 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename MatchCondition>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- MatchCondition match_condition,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
-
-
-This function is used to read data into the specified dynamic buffer sequence until a user-defined match condition function object, when applied to the data contained in the dynamic buffer sequence, indicates a successful match. The call will block until one of the following conditions is true:
-
-
-* The match condition function object returns a std::pair where the second element evaluates to true.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the match condition function object already indicates a match, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][A dynamic buffer sequence into which the data will be read.]]
-
-[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
-``
- pair<iterator, bool> match_condition(iterator begin, iterator end);
-``
-where `iterator` represents the type:
-``
- buffers_iterator<typename DynamicBuffer::const_buffers_type>
-``
-The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic\_buffer's get area that have been fully consumed by the match function.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond that which matched the function object. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-The default implementation of the `is_match_condition` type trait evaluates to true for function pointers and function objects with a `result_type` typedef. It must be specialised for other user-defined function objects.
-
-
-[heading Examples]
-
-To read data into a dynamic buffer sequence until whitespace is encountered:
-
- typedef asio::buffers_iterator<
- asio::const_buffers_1> iterator;
-
- std::pair<iterator, bool>
- match_whitespace(iterator begin, iterator end)
- {
- iterator i = begin;
- while (i != end)
- if (std::isspace(*i++))
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
- ...
- std::string data;
- asio::read_until(s, data, match_whitespace);
-
-
-
-
-To read data into a `std::string` until a matching character is found:
-
- class match_char
- {
- public:
- explicit match_char(char c) : c_(c) {}
-
- template <typename Iterator>
- std::pair<Iterator, bool> operator()(
- Iterator begin, Iterator end) const
- {
- Iterator i = begin;
- while (i != end)
- if (c_ == *i++)
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
-
- private:
- char c_;
- };
-
- namespace asio {
- template <> struct is_match_condition<match_char>
- : public boost::true_type {};
- } // namespace asio
- ...
- std::string data;
- asio::read_until(s, data, match_char('a'));
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 read_until (8 of 16 overloads)]
-
-
-Read data into a dynamic buffer sequence until a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename MatchCondition>
- std::size_t read_until(
- SyncReadStream & s,
- DynamicBuffer && buffers,
- MatchCondition match_condition,
- asio::error_code & ec,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
-
-
-This function is used to read data into the specified dynamic buffer sequence until a user-defined match condition function object, when applied to the data contained in the dynamic buffer sequence, indicates a successful match. The call will block until one of the following conditions is true:
-
-
-* The match condition function object returns a std::pair where the second element evaluates to true.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the match condition function object already indicates a match, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[buffers][A dynamic buffer sequence into which the data will be read.]]
-
-[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
-``
- pair<iterator, bool> match_condition(iterator begin, iterator end);
-``
-where `iterator` represents the type:
-``
- buffers_iterator<DynamicBuffer::const_buffers_type>
-``
-The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the dynamic buffer sequence's get area that have been fully consumed by the match function. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the dynamic buffer sequence may contain additional data beyond that which matched the function object. An application will typically leave that data in the dynamic buffer sequence for a subsequent read\_until operation to examine.
-
-The default implementation of the `is_match_condition` type trait evaluates to true for function pointers and function objects with a `result_type` typedef. It must be specialised for other user-defined function objects.
-
-
-
-
-[endsect]
-
-
-
-[section:overload9 read_until (9 of 16 overloads)]
-
-
-Read data into a streambuf until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- char delim);
-
-
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[delim][The delimiter character.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond the delimiter. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-
-[heading Example]
-
-To read data into a streambuf until a newline is encountered:
-
- asio::streambuf b;
- asio::read_until(s, b, '\n');
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
-
-
-After the `read_until` operation completes successfully, the buffer `b` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... }
-
-
-The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\n' }
-
-
-The remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload10 read_until (10 of 16 overloads)]
-
-
-Read data into a streambuf until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- char delim,
- asio::error_code & ec);
-
-
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[delim][The delimiter character.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond the delimiter. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-
-
-
-[endsect]
-
-
-
-[section:overload11 read_until (11 of 16 overloads)]
-
-
-Read data into a streambuf until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- string_view delim);
-
-
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[delim][The delimiter string.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond the delimiter. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-
-[heading Example]
-
-To read data into a streambuf until a newline is encountered:
-
- asio::streambuf b;
- asio::read_until(s, b, "\r\n");
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
-
-
-After the `read_until` operation completes successfully, the buffer `b` contains the delimiter:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-The remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 read_until (12 of 16 overloads)]
-
-
-Read data into a streambuf until it contains a specified delimiter.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- string_view delim,
- asio::error_code & ec);
-
-
-This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
-
-
-* The get area of the streambuf contains the specified delimiter.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains the delimiter, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[delim][The delimiter string.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the delimiter. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond the delimiter. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-
-
-
-[endsect]
-
-
-
-[section:overload13 read_until (13 of 16 overloads)]
-
-
-Read data into a streambuf until some part of the data it contains matches a regular expression.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr);
-
-
-This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
-
-
-* A substring of the streambuf's get area matches the regular expression.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[expr][The regular expression.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the substring that matches the regular expression.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond that which matched the regular expression. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-
-[heading Example]
-
-To read data into a streambuf until a CR-LF sequence is encountered:
-
- asio::streambuf b;
- asio::read_until(s, b, boost::regex("\r\n"));
- std::istream is(&b);
- std::string line;
- std::getline(is, line);
-
-
-After the `read_until` operation completes successfully, the buffer `b` contains the data which matched the regular expression:
-
- { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... }
-
-
-The call to `std::getline` then extracts the data up to and including the match, so that the string `line` contains:
-
- { 'a', 'b', ..., 'c', '\r', '\n' }
-
-
-The remaining data is left in the buffer `b` as follows:
-
- { 'd', 'e', ... }
-
-
-This data may be the start of a new line, to be extracted by a subsequent `read_until` operation.
-
-
-
-
-[endsect]
-
-
-
-[section:overload14 read_until (14 of 16 overloads)]
-
-
-Read data into a streambuf until some part of the data it contains matches a regular expression.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- const boost::regex & expr,
- asio::error_code & ec);
-
-
-This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
-
-
-* A substring of the streambuf's get area matches the regular expression.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[expr][The regular expression.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area up to and including the substring that matches the regular expression. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond that which matched the regular expression. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-
-
-
-[endsect]
-
-
-
-[section:overload15 read_until (15 of 16 overloads)]
-
-
-Read data into a streambuf until a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename MatchCondition>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- MatchCondition match_condition,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
-
-
-This function is used to read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The call will block until one of the following conditions is true:
-
-
-* The match condition function object returns a std::pair where the second element evaluates to true.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the match condition function object already indicates a match, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
-``
- pair<iterator, bool> match_condition(iterator begin, iterator end);
-``
-where `iterator` represents the type:
-``
- buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
-``
-The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area that have been fully consumed by the match function.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond that which matched the function object. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-The default implementation of the `is_match_condition` type trait evaluates to true for function pointers and function objects with a `result_type` typedef. It must be specialised for other user-defined function objects.
-
-
-[heading Examples]
-
-To read data into a streambuf until whitespace is encountered:
-
- typedef asio::buffers_iterator<
- asio::streambuf::const_buffers_type> iterator;
-
- std::pair<iterator, bool>
- match_whitespace(iterator begin, iterator end)
- {
- iterator i = begin;
- while (i != end)
- if (std::isspace(*i++))
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
- ...
- asio::streambuf b;
- asio::read_until(s, b, match_whitespace);
-
-
-
-
-To read data into a streambuf until a matching character is found:
-
- class match_char
- {
- public:
- explicit match_char(char c) : c_(c) {}
-
- template <typename Iterator>
- std::pair<Iterator, bool> operator()(
- Iterator begin, Iterator end) const
- {
- Iterator i = begin;
- while (i != end)
- if (c_ == *i++)
- return std::make_pair(i, true);
- return std::make_pair(i, false);
- }
-
- private:
- char c_;
- };
-
- namespace asio {
- template <> struct is_match_condition<match_char>
- : public boost::true_type {};
- } // namespace asio
- ...
- asio::streambuf b;
- asio::read_until(s, b, match_char('a'));
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload16 read_until (16 of 16 overloads)]
-
-
-Read data into a streambuf until a function object indicates a match.
-
-
- template<
- typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
- typename Allocator,
- typename MatchCondition>
- std::size_t read_until(
- SyncReadStream & s,
- asio::basic_streambuf< Allocator > & b,
- MatchCondition match_condition,
- asio::error_code & ec,
- typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
-
-
-This function is used to read data into the specified streambuf until a user-defined match condition function object, when applied to the data contained in the streambuf, indicates a successful match. The call will block until one of the following conditions is true:
-
-
-* The match condition function object returns a std::pair where the second element evaluates to true.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's read\_some function. If the match condition function object already indicates a match, the function returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream from which the data is to be read. The type must support the SyncReadStream concept.]]
-
-[[b][A streambuf object into which the data will be read.]]
-
-[[match_condition][The function object to be called to determine whether a match exists. The signature of the function object must be:
-``
- pair<iterator, bool> match_condition(iterator begin, iterator end);
-``
-where `iterator` represents the type:
-``
- buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
-``
-The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes in the streambuf's get area that have been fully consumed by the match function. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-After a successful read\_until operation, the streambuf may contain additional data beyond that which matched the function object. An application will typically leave that data in the streambuf for a subsequent read\_until operation to examine.
-
-The default implementation of the `is_match_condition` type trait evaluates to true for function pointers and function objects with a `result_type` typedef. It must be specialised for other user-defined function objects.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:serial_port serial_port]
-
-
-Provides serial port functionality.
-
-
- class serial_port :
- public serial_port_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.serial_port.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port.lowest_layer_type [*lowest_layer_type]]]
- [A basic_serial_port is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port.native_handle_type [*native_handle_type]]]
- [The native representation of a serial port. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port.assign [*assign]]]
- [Assign an existing native serial port to the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.serial_port.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.serial_port.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.close [*close]]]
- [Close the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_option [*get_option]]]
- [Get an option from the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.is_open [*is_open]]]
- [Determine whether the serial port is open. ]
- ]
-
- [
- [[link asio.reference.serial_port.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.serial_port.native_handle [*native_handle]]]
- [Get the native serial port representation. ]
- ]
-
- [
- [[link asio.reference.serial_port.open [*open]]]
- [Open the serial port using the specified device name. ]
- ]
-
- [
- [[link asio.reference.serial_port.operator_eq_ [*operator=]]]
- [Move-assign a serial_port from another. ]
- ]
-
- [
- [[link asio.reference.serial_port.read_some [*read_some]]]
- [Read some data from the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.send_break [*send_break]]]
- [Send a break sequence to the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.serial_port [*serial_port]]]
- [Construct a serial_port without opening it.
-
- Construct and open a serial_port.
-
- Construct a serial_port on an existing native serial port.
-
- Move-construct a serial_port from another. ]
- ]
-
- [
- [[link asio.reference.serial_port.set_option [*set_option]]]
- [Set an option on the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.write_some [*write_some]]]
- [Write some data to the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port._serial_port [*~serial_port]]]
- [Destroys the serial port. ]
- ]
-
-]
-
-The [link asio.reference.serial_port `serial_port`] class provides a wrapper over serial port functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign serial_port::assign]
-
-[indexterm2 asio.indexterm.serial_port.assign..assign..serial_port]
-Assign an existing native serial port to the serial port.
-
-
- void ``[link asio.reference.serial_port.assign.overload1 assign]``(
- const native_handle_type & native_serial_port);
- `` [''''&raquo;''' [link asio.reference.serial_port.assign.overload1 more...]]``
-
- void ``[link asio.reference.serial_port.assign.overload2 assign]``(
- const native_handle_type & native_serial_port,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.assign.overload2 more...]]``
-
-
-[section:overload1 serial_port::assign (1 of 2 overloads)]
-
-
-Assign an existing native serial port to the serial port.
-
-
- void assign(
- const native_handle_type & native_serial_port);
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::assign (2 of 2 overloads)]
-
-
-Assign an existing native serial port to the serial port.
-
-
- void assign(
- const native_handle_type & native_serial_port,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some serial_port::async_read_some]
-
-[indexterm2 asio.indexterm.serial_port.async_read_some..async_read_some..serial_port]
-Start an asynchronous read.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the serial port. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- serial_port.async_read_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some serial_port::async_write_some]
-
-[indexterm2 asio.indexterm.serial_port.async_write_some..async_write_some..serial_port]
-Start an asynchronous write.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the serial port. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the serial port. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- serial_port.async_write_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[section:cancel serial_port::cancel]
-
-[indexterm2 asio.indexterm.serial_port.cancel..cancel..serial_port]
-Cancel all asynchronous operations associated with the serial port.
-
-
- void ``[link asio.reference.serial_port.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.serial_port.cancel.overload1 more...]]``
-
- void ``[link asio.reference.serial_port.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.cancel.overload2 more...]]``
-
-
-[section:overload1 serial_port::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the serial port.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the serial port.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close serial_port::close]
-
-[indexterm2 asio.indexterm.serial_port.close..close..serial_port]
-Close the serial port.
-
-
- void ``[link asio.reference.serial_port.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.serial_port.close.overload1 more...]]``
-
- void ``[link asio.reference.serial_port.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.close.overload2 more...]]``
-
-
-[section:overload1 serial_port::close (1 of 2 overloads)]
-
-
-Close the serial port.
-
-
- void close();
-
-
-This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::close (2 of 2 overloads)]
-
-
-Close the serial port.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the serial port. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type serial_port::executor_type]
-
-[indexterm2 asio.indexterm.serial_port.executor_type..executor_type..serial_port]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor serial_port::get_executor]
-
-[indexterm2 asio.indexterm.serial_port.get_executor..get_executor..serial_port]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context serial_port::get_io_context]
-
-[indexterm2 asio.indexterm.serial_port.get_io_context..get_io_context..serial_port]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service serial_port::get_io_service]
-
-[indexterm2 asio.indexterm.serial_port.get_io_service..get_io_service..serial_port]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:get_option serial_port::get_option]
-
-[indexterm2 asio.indexterm.serial_port.get_option..get_option..serial_port]
-Get an option from the serial port.
-
-
- template<
- typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
- void ``[link asio.reference.serial_port.get_option.overload1 get_option]``(
- GettableSerialPortOption & option);
- `` [''''&raquo;''' [link asio.reference.serial_port.get_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
- void ``[link asio.reference.serial_port.get_option.overload2 get_option]``(
- GettableSerialPortOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.get_option.overload2 more...]]``
-
-
-[section:overload1 serial_port::get_option (1 of 2 overloads)]
-
-
-Get an option from the serial port.
-
-
- template<
- typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
- void get_option(
- GettableSerialPortOption & option);
-
-
-This function is used to get the current value of an option on the serial port.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the serial port.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::get_option (2 of 2 overloads)]
-
-
-Get an option from the serial port.
-
-
- template<
- typename ``[link asio.reference.GettableSerialPortOption GettableSerialPortOption]``>
- void get_option(
- GettableSerialPortOption & option,
- asio::error_code & ec);
-
-
-This function is used to get the current value of an option on the serial port.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be obtained from the serial port.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:is_open serial_port::is_open]
-
-[indexterm2 asio.indexterm.serial_port.is_open..is_open..serial_port]
-Determine whether the serial port is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer serial_port::lowest_layer]
-
-[indexterm2 asio.indexterm.serial_port.lowest_layer..lowest_layer..serial_port]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.serial_port.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.serial_port.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.serial_port.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.serial_port.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 serial_port::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since a [link asio.reference.serial_port `serial_port`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since a [link asio.reference.serial_port `serial_port`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type serial_port::lowest_layer_type]
-
-[indexterm2 asio.indexterm.serial_port.lowest_layer_type..lowest_layer_type..serial_port]
-A basic\_serial\_port is always the lowest layer.
-
-
- typedef serial_port lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.serial_port.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port.lowest_layer_type [*lowest_layer_type]]]
- [A basic_serial_port is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port.native_handle_type [*native_handle_type]]]
- [The native representation of a serial port. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port.assign [*assign]]]
- [Assign an existing native serial port to the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.serial_port.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.serial_port.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.close [*close]]]
- [Close the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.serial_port.get_option [*get_option]]]
- [Get an option from the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.is_open [*is_open]]]
- [Determine whether the serial port is open. ]
- ]
-
- [
- [[link asio.reference.serial_port.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.serial_port.native_handle [*native_handle]]]
- [Get the native serial port representation. ]
- ]
-
- [
- [[link asio.reference.serial_port.open [*open]]]
- [Open the serial port using the specified device name. ]
- ]
-
- [
- [[link asio.reference.serial_port.operator_eq_ [*operator=]]]
- [Move-assign a serial_port from another. ]
- ]
-
- [
- [[link asio.reference.serial_port.read_some [*read_some]]]
- [Read some data from the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.send_break [*send_break]]]
- [Send a break sequence to the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.serial_port [*serial_port]]]
- [Construct a serial_port without opening it.
-
- Construct and open a serial_port.
-
- Construct a serial_port on an existing native serial port.
-
- Move-construct a serial_port from another. ]
- ]
-
- [
- [[link asio.reference.serial_port.set_option [*set_option]]]
- [Set an option on the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port.write_some [*write_some]]]
- [Write some data to the serial port. ]
- ]
-
- [
- [[link asio.reference.serial_port._serial_port [*~serial_port]]]
- [Destroys the serial port. ]
- ]
-
-]
-
-The [link asio.reference.serial_port `serial_port`] class provides a wrapper over serial port functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle serial_port::native_handle]
-
-[indexterm2 asio.indexterm.serial_port.native_handle..native_handle..serial_port]
-Get the native serial port representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the serial port. This is intended to allow access to native serial port functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type serial_port::native_handle_type]
-
-[indexterm2 asio.indexterm.serial_port.native_handle_type..native_handle_type..serial_port]
-The native representation of a serial port.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:open serial_port::open]
-
-[indexterm2 asio.indexterm.serial_port.open..open..serial_port]
-Open the serial port using the specified device name.
-
-
- void ``[link asio.reference.serial_port.open.overload1 open]``(
- const std::string & device);
- `` [''''&raquo;''' [link asio.reference.serial_port.open.overload1 more...]]``
-
- void ``[link asio.reference.serial_port.open.overload2 open]``(
- const std::string & device,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.open.overload2 more...]]``
-
-
-[section:overload1 serial_port::open (1 of 2 overloads)]
-
-
-Open the serial port using the specified device name.
-
-
- void open(
- const std::string & device);
-
-
-This function opens the serial port for the specified device name.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[device][The platform-specific device name.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::open (2 of 2 overloads)]
-
-
-Open the serial port using the specified device name.
-
-
- void open(
- const std::string & device,
- asio::error_code & ec);
-
-
-This function opens the serial port using the given platform-specific device name.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[device][The platform-specific device name.]]
-
-[[ec][Set the indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq_ serial_port::operator=]
-
-[indexterm2 asio.indexterm.serial_port.operator_eq_..operator=..serial_port]
-Move-assign a [link asio.reference.serial_port `serial_port`] from another.
-
-
- serial_port & operator=(
- serial_port && other);
-
-
-This assignment operator moves a serial port from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.serial_port `serial_port`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `serial_port(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[section:read_some serial_port::read_some]
-
-[indexterm2 asio.indexterm.serial_port.read_some..read_some..serial_port]
-Read some data from the serial port.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.serial_port.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.serial_port.read_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.serial_port.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.read_some.overload2 more...]]``
-
-
-[section:overload1 serial_port::read_some (1 of 2 overloads)]
-
-
-Read some data from the serial port.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- serial_port.read_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::read_some (2 of 2 overloads)]
-
-
-Read some data from the serial port.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read data from the serial port. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:send_break serial_port::send_break]
-
-[indexterm2 asio.indexterm.serial_port.send_break..send_break..serial_port]
-Send a break sequence to the serial port.
-
-
- void ``[link asio.reference.serial_port.send_break.overload1 send_break]``();
- `` [''''&raquo;''' [link asio.reference.serial_port.send_break.overload1 more...]]``
-
- void ``[link asio.reference.serial_port.send_break.overload2 send_break]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.send_break.overload2 more...]]``
-
-
-[section:overload1 serial_port::send_break (1 of 2 overloads)]
-
-
-Send a break sequence to the serial port.
-
-
- void send_break();
-
-
-This function causes a break sequence of platform-specific duration to be sent out the serial port.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::send_break (2 of 2 overloads)]
-
-
-Send a break sequence to the serial port.
-
-
- void send_break(
- asio::error_code & ec);
-
-
-This function causes a break sequence of platform-specific duration to be sent out the serial port.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:serial_port serial_port::serial_port]
-
-[indexterm2 asio.indexterm.serial_port.serial_port..serial_port..serial_port]
-Construct a [link asio.reference.serial_port `serial_port`] without opening it.
-
-
- explicit ``[link asio.reference.serial_port.serial_port.overload1 serial_port]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload1 more...]]``
-
-
-Construct and open a [link asio.reference.serial_port `serial_port`].
-
-
- explicit ``[link asio.reference.serial_port.serial_port.overload2 serial_port]``(
- asio::io_context & io_context,
- const char * device);
- `` [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload2 more...]]``
-
- explicit ``[link asio.reference.serial_port.serial_port.overload3 serial_port]``(
- asio::io_context & io_context,
- const std::string & device);
- `` [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload3 more...]]``
-
-
-Construct a [link asio.reference.serial_port `serial_port`] on an existing native serial port.
-
-
- ``[link asio.reference.serial_port.serial_port.overload4 serial_port]``(
- asio::io_context & io_context,
- const native_handle_type & native_serial_port);
- `` [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload4 more...]]``
-
-
-Move-construct a [link asio.reference.serial_port `serial_port`] from another.
-
-
- ``[link asio.reference.serial_port.serial_port.overload5 serial_port]``(
- serial_port && other);
- `` [''''&raquo;''' [link asio.reference.serial_port.serial_port.overload5 more...]]``
-
-
-[section:overload1 serial_port::serial_port (1 of 5 overloads)]
-
-
-Construct a [link asio.reference.serial_port `serial_port`] without opening it.
-
-
- serial_port(
- asio::io_context & io_context);
-
-
-This constructor creates a serial port without opening it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::serial_port (2 of 5 overloads)]
-
-
-Construct and open a [link asio.reference.serial_port `serial_port`].
-
-
- serial_port(
- asio::io_context & io_context,
- const char * device);
-
-
-This constructor creates and opens a serial port for the specified device name.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
-
-[[device][The platform-specific device name for this serial port. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 serial_port::serial_port (3 of 5 overloads)]
-
-
-Construct and open a [link asio.reference.serial_port `serial_port`].
-
-
- serial_port(
- asio::io_context & io_context,
- const std::string & device);
-
-
-This constructor creates and opens a serial port for the specified device name.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
-
-[[device][The platform-specific device name for this serial port. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 serial_port::serial_port (4 of 5 overloads)]
-
-
-Construct a [link asio.reference.serial_port `serial_port`] on an existing native serial port.
-
-
- serial_port(
- asio::io_context & io_context,
- const native_handle_type & native_serial_port);
-
-
-This constructor creates a serial port object to hold an existing native serial port.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the serial port will use to dispatch handlers for any asynchronous operations performed on the port.]]
-
-[[native_serial_port][A native serial port.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 serial_port::serial_port (5 of 5 overloads)]
-
-
-Move-construct a [link asio.reference.serial_port `serial_port`] from another.
-
-
- serial_port(
- serial_port && other);
-
-
-This constructor moves a serial port from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.serial_port `serial_port`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `serial_port(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_option serial_port::set_option]
-
-[indexterm2 asio.indexterm.serial_port.set_option..set_option..serial_port]
-Set an option on the serial port.
-
-
- template<
- typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
- void ``[link asio.reference.serial_port.set_option.overload1 set_option]``(
- const SettableSerialPortOption & option);
- `` [''''&raquo;''' [link asio.reference.serial_port.set_option.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
- void ``[link asio.reference.serial_port.set_option.overload2 set_option]``(
- const SettableSerialPortOption & option,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.set_option.overload2 more...]]``
-
-
-[section:overload1 serial_port::set_option (1 of 2 overloads)]
-
-
-Set an option on the serial port.
-
-
- template<
- typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
- void set_option(
- const SettableSerialPortOption & option);
-
-
-This function is used to set an option on the serial port.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be set on the serial port.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::set_option (2 of 2 overloads)]
-
-
-Set an option on the serial port.
-
-
- template<
- typename ``[link asio.reference.SettableSerialPortOption SettableSerialPortOption]``>
- void set_option(
- const SettableSerialPortOption & option,
- asio::error_code & ec);
-
-
-This function is used to set an option on the serial port.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[option][The option value to be set on the serial port.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some serial_port::write_some]
-
-[indexterm2 asio.indexterm.serial_port.write_some..write_some..serial_port]
-Write some data to the serial port.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.serial_port.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.serial_port.write_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.serial_port.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.serial_port.write_some.overload2 more...]]``
-
-
-[section:overload1 serial_port::write_some (1 of 2 overloads)]
-
-
-Write some data to the serial port.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the serial port.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- serial_port.write_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 serial_port::write_some (2 of 2 overloads)]
-
-
-Write some data to the serial port.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write data to the serial port. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the serial port.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_serial_port serial_port::~serial_port]
-
-[indexterm2 asio.indexterm.serial_port._serial_port..~serial_port..serial_port]
-Destroys the serial port.
-
-
- ~serial_port();
-
-
-This function destroys the serial port, cancelling any outstanding asynchronous wait operations associated with the serial port as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:serial_port_base serial_port_base]
-
-
-The [link asio.reference.serial_port_base `serial_port_base`] class is used as a base for the basic\_serial\_port class template so that we have a common place to define the serial port options.
-
-
- class serial_port_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.serial_port_base__baud_rate [*baud_rate]]]
- [Serial port option to permit changing the baud rate. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port_base__character_size [*character_size]]]
- [Serial port option to permit changing the character size. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port_base__flow_control [*flow_control]]]
- [Serial port option to permit changing the flow control. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port_base__parity [*parity]]]
- [Serial port option to permit changing the parity. ]
-
- ]
-
- [
-
- [[link asio.reference.serial_port_base__stop_bits [*stop_bits]]]
- [Serial port option to permit changing the number of stop bits. ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port_base._serial_port_base [*~serial_port_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:_serial_port_base serial_port_base::~serial_port_base]
-
-[indexterm2 asio.indexterm.serial_port_base._serial_port_base..~serial_port_base..serial_port_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~serial_port_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:serial_port_base__baud_rate serial_port_base::baud_rate]
-
-
-Serial port option to permit changing the baud rate.
-
-
- class baud_rate
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port_base__baud_rate.baud_rate [*baud_rate]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__baud_rate.load [*load]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__baud_rate.store [*store]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__baud_rate.value [*value]]]
- []
- ]
-
-]
-
-Implements changing the baud rate for a given serial port.
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:baud_rate serial_port_base::baud_rate::baud_rate]
-
-[indexterm2 asio.indexterm.serial_port_base__baud_rate.baud_rate..baud_rate..serial_port_base::baud_rate]
-
- baud_rate(
- unsigned int rate = 0);
-
-
-
-[endsect]
-
-
-
-[section:load serial_port_base::baud_rate::load]
-
-[indexterm2 asio.indexterm.serial_port_base__baud_rate.load..load..serial_port_base::baud_rate]
-
- void load(
- const ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:store serial_port_base::baud_rate::store]
-
-[indexterm2 asio.indexterm.serial_port_base__baud_rate.store..store..serial_port_base::baud_rate]
-
- void store(
- ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:value serial_port_base::baud_rate::value]
-
-[indexterm2 asio.indexterm.serial_port_base__baud_rate.value..value..serial_port_base::baud_rate]
-
- unsigned int value() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:serial_port_base__character_size serial_port_base::character_size]
-
-
-Serial port option to permit changing the character size.
-
-
- class character_size
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port_base__character_size.character_size [*character_size]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__character_size.load [*load]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__character_size.store [*store]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__character_size.value [*value]]]
- []
- ]
-
-]
-
-Implements changing the character size for a given serial port.
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:character_size serial_port_base::character_size::character_size]
-
-[indexterm2 asio.indexterm.serial_port_base__character_size.character_size..character_size..serial_port_base::character_size]
-
- character_size(
- unsigned int t = 8);
-
-
-
-[endsect]
-
-
-
-[section:load serial_port_base::character_size::load]
-
-[indexterm2 asio.indexterm.serial_port_base__character_size.load..load..serial_port_base::character_size]
-
- void load(
- const ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:store serial_port_base::character_size::store]
-
-[indexterm2 asio.indexterm.serial_port_base__character_size.store..store..serial_port_base::character_size]
-
- void store(
- ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:value serial_port_base::character_size::value]
-
-[indexterm2 asio.indexterm.serial_port_base__character_size.value..value..serial_port_base::character_size]
-
- unsigned int value() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:serial_port_base__flow_control serial_port_base::flow_control]
-
-
-Serial port option to permit changing the flow control.
-
-
- class flow_control
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.serial_port_base__flow_control.type [*type]]]
- []
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port_base__flow_control.flow_control [*flow_control]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__flow_control.load [*load]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__flow_control.store [*store]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__flow_control.value [*value]]]
- []
- ]
-
-]
-
-Implements changing the flow control for a given serial port.
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:flow_control serial_port_base::flow_control::flow_control]
-
-[indexterm2 asio.indexterm.serial_port_base__flow_control.flow_control..flow_control..serial_port_base::flow_control]
-
- flow_control(
- type t = none);
-
-
-
-[endsect]
-
-
-
-[section:load serial_port_base::flow_control::load]
-
-[indexterm2 asio.indexterm.serial_port_base__flow_control.load..load..serial_port_base::flow_control]
-
- void load(
- const ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:store serial_port_base::flow_control::store]
-
-[indexterm2 asio.indexterm.serial_port_base__flow_control.store..store..serial_port_base::flow_control]
-
- void store(
- ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:type serial_port_base::flow_control::type]
-
-[indexterm2 asio.indexterm.serial_port_base__flow_control.type..type..serial_port_base::flow_control]
-
- enum type
-
-[indexterm2 asio.indexterm.serial_port_base__flow_control.type.none..none..serial_port_base::flow_control]
-[indexterm2 asio.indexterm.serial_port_base__flow_control.type.software..software..serial_port_base::flow_control]
-[indexterm2 asio.indexterm.serial_port_base__flow_control.type.hardware..hardware..serial_port_base::flow_control]
-
-[heading Values]
-[variablelist
-
- [
- [none]
- []
- ]
-
- [
- [software]
- []
- ]
-
- [
- [hardware]
- []
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:value serial_port_base::flow_control::value]
-
-[indexterm2 asio.indexterm.serial_port_base__flow_control.value..value..serial_port_base::flow_control]
-
- type value() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:serial_port_base__parity serial_port_base::parity]
-
-
-Serial port option to permit changing the parity.
-
-
- class parity
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.serial_port_base__parity.type [*type]]]
- []
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port_base__parity.load [*load]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__parity.parity [*parity]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__parity.store [*store]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__parity.value [*value]]]
- []
- ]
-
-]
-
-Implements changing the parity for a given serial port.
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:load serial_port_base::parity::load]
-
-[indexterm2 asio.indexterm.serial_port_base__parity.load..load..serial_port_base::parity]
-
- void load(
- const ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:parity serial_port_base::parity::parity]
-
-[indexterm2 asio.indexterm.serial_port_base__parity.parity..parity..serial_port_base::parity]
-
- parity(
- type t = none);
-
-
-
-[endsect]
-
-
-
-[section:store serial_port_base::parity::store]
-
-[indexterm2 asio.indexterm.serial_port_base__parity.store..store..serial_port_base::parity]
-
- void store(
- ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:type serial_port_base::parity::type]
-
-[indexterm2 asio.indexterm.serial_port_base__parity.type..type..serial_port_base::parity]
-
- enum type
-
-[indexterm2 asio.indexterm.serial_port_base__parity.type.none..none..serial_port_base::parity]
-[indexterm2 asio.indexterm.serial_port_base__parity.type.odd..odd..serial_port_base::parity]
-[indexterm2 asio.indexterm.serial_port_base__parity.type.even..even..serial_port_base::parity]
-
-[heading Values]
-[variablelist
-
- [
- [none]
- []
- ]
-
- [
- [odd]
- []
- ]
-
- [
- [even]
- []
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:value serial_port_base::parity::value]
-
-[indexterm2 asio.indexterm.serial_port_base__parity.value..value..serial_port_base::parity]
-
- type value() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:serial_port_base__stop_bits serial_port_base::stop_bits]
-
-
-Serial port option to permit changing the number of stop bits.
-
-
- class stop_bits
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.serial_port_base__stop_bits.type [*type]]]
- []
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.serial_port_base__stop_bits.load [*load]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__stop_bits.stop_bits [*stop_bits]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__stop_bits.store [*store]]]
- []
- ]
-
- [
- [[link asio.reference.serial_port_base__stop_bits.value [*value]]]
- []
- ]
-
-]
-
-Implements changing the number of stop bits for a given serial port.
-
-[heading Requirements]
-
-['Header: ][^asio/serial_port_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:load serial_port_base::stop_bits::load]
-
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.load..load..serial_port_base::stop_bits]
-
- void load(
- const ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:stop_bits serial_port_base::stop_bits::stop_bits]
-
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.stop_bits..stop_bits..serial_port_base::stop_bits]
-
- stop_bits(
- type t = one);
-
-
-
-[endsect]
-
-
-
-[section:store serial_port_base::stop_bits::store]
-
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.store..store..serial_port_base::stop_bits]
-
- void store(
- ASIO_OPTION_STORAGE & storage,
- asio::error_code & ec) const;
-
-
-
-[endsect]
-
-
-
-[section:type serial_port_base::stop_bits::type]
-
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.type..type..serial_port_base::stop_bits]
-
- enum type
-
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.type.one..one..serial_port_base::stop_bits]
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.type.onepointfive..onepointfive..serial_port_base::stop_bits]
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.type.two..two..serial_port_base::stop_bits]
-
-[heading Values]
-[variablelist
-
- [
- [one]
- []
- ]
-
- [
- [onepointfive]
- []
- ]
-
- [
- [two]
- []
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:value serial_port_base::stop_bits::value]
-
-[indexterm2 asio.indexterm.serial_port_base__stop_bits.value..value..serial_port_base::stop_bits]
-
- type value() const;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:service_already_exists service_already_exists]
-
-
-Exception thrown when trying to add a duplicate service to an [link asio.reference.execution_context `execution_context`].
-
-
- class service_already_exists
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.service_already_exists.service_already_exists [*service_already_exists]]]
- []
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:service_already_exists service_already_exists::service_already_exists]
-
-[indexterm2 asio.indexterm.service_already_exists.service_already_exists..service_already_exists..service_already_exists]
-
- service_already_exists();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:signal_set signal_set]
-
-
-Provides signal functionality.
-
-
- class signal_set
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.signal_set.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.signal_set.add [*add]]]
- [Add a signal to a signal_set. ]
- ]
-
- [
- [[link asio.reference.signal_set.async_wait [*async_wait]]]
- [Start an asynchronous operation to wait for a signal to be delivered. ]
- ]
-
- [
- [[link asio.reference.signal_set.cancel [*cancel]]]
- [Cancel all operations associated with the signal set. ]
- ]
-
- [
- [[link asio.reference.signal_set.clear [*clear]]]
- [Remove all signals from a signal_set. ]
- ]
-
- [
- [[link asio.reference.signal_set.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.signal_set.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.signal_set.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.signal_set.remove [*remove]]]
- [Remove a signal from a signal_set. ]
- ]
-
- [
- [[link asio.reference.signal_set.signal_set [*signal_set]]]
- [Construct a signal set without adding any signals.
-
- Construct a signal set and add one signal.
-
- Construct a signal set and add two signals.
-
- Construct a signal set and add three signals. ]
- ]
-
- [
- [[link asio.reference.signal_set._signal_set [*~signal_set]]]
- [Destroys the signal set. ]
- ]
-
-]
-
-The [link asio.reference.signal_set `signal_set`] class provides the ability to perform an asynchronous wait for one or more signals to occur.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Example]
-
-Performing an asynchronous wait:
-
- void handler(
- const asio::error_code& error,
- int signal_number)
- {
- if (!error)
- {
- // A signal occurred.
- }
- }
-
- ...
-
- // Construct a signal set registered for process termination.
- asio::signal_set signals(io_context, SIGINT, SIGTERM);
-
- // Start an asynchronous wait for one of the signals to occur.
- signals.async_wait(handler);
-
-
-
-
-
-[heading Queueing of signal notifications]
-
-
-
-If a signal is registered with a [link asio.reference.signal_set `signal_set`], and the signal occurs when there are no waiting handlers, then the signal notification is queued. The next async\_wait operation on that [link asio.reference.signal_set `signal_set`] will dequeue the notification. If multiple notifications are queued, subsequent async\_wait operations dequeue them one at a time. Signal notifications are dequeued in order of ascending signal number.
-
-If a signal number is removed from a [link asio.reference.signal_set `signal_set`] (using the `remove` or `erase` member functions) then any queued notifications for that signal are discarded.
-
-
-[heading Multiple registration of signals]
-
-
-
-The same signal number may be registered with different [link asio.reference.signal_set `signal_set`] objects. When the signal occurs, one handler is called for each [link asio.reference.signal_set `signal_set`] object.
-
-Note that multiple registration only works for signals that are registered using Asio. The application must not also register a signal handler using functions such as `signal()` or `sigaction()`.
-
-
-[heading Signal masking on POSIX platforms]
-
-
-
-POSIX allows signals to be blocked using functions such as `sigprocmask()` and `pthread_sigmask()`. For signals to be delivered, programs must ensure that any signals registered using [link asio.reference.signal_set `signal_set`] objects are unblocked in at least one thread.
-
-[heading Requirements]
-
-['Header: ][^asio/signal_set.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:add signal_set::add]
-
-[indexterm2 asio.indexterm.signal_set.add..add..signal_set]
-Add a signal to a [link asio.reference.signal_set `signal_set`].
-
-
- void ``[link asio.reference.signal_set.add.overload1 add]``(
- int signal_number);
- `` [''''&raquo;''' [link asio.reference.signal_set.add.overload1 more...]]``
-
- void ``[link asio.reference.signal_set.add.overload2 add]``(
- int signal_number,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.signal_set.add.overload2 more...]]``
-
-
-[section:overload1 signal_set::add (1 of 2 overloads)]
-
-
-Add a signal to a [link asio.reference.signal_set `signal_set`].
-
-
- void add(
- int signal_number);
-
-
-This function adds the specified signal to the set. It has no effect if the signal is already in the set.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[signal_number][The signal to be added to the set.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 signal_set::add (2 of 2 overloads)]
-
-
-Add a signal to a [link asio.reference.signal_set `signal_set`].
-
-
- void add(
- int signal_number,
- asio::error_code & ec);
-
-
-This function adds the specified signal to the set. It has no effect if the signal is already in the set.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[signal_number][The signal to be added to the set.]]
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait signal_set::async_wait]
-
-[indexterm2 asio.indexterm.signal_set.async_wait..async_wait..signal_set]
-Start an asynchronous operation to wait for a signal to be delivered.
-
-
- template<
- typename ``[link asio.reference.SignalHandler SignalHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- SignalHandler && handler);
-
-
-This function may be used to initiate an asynchronous wait against the signal set. It always returns immediately.
-
-For each call to `async_wait()`, the supplied handler will be called exactly once. The handler will be called when:
-
-
-* One of the registered signals in the signal set occurs; or
-
-
-* The signal set was cancelled, in which case the handler is passed the error code `asio::error::operation_aborted`.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called when the signal occurs. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- int signal_number // Indicates which signal occurred.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:cancel signal_set::cancel]
-
-[indexterm2 asio.indexterm.signal_set.cancel..cancel..signal_set]
-Cancel all operations associated with the signal set.
-
-
- void ``[link asio.reference.signal_set.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.signal_set.cancel.overload1 more...]]``
-
- void ``[link asio.reference.signal_set.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.signal_set.cancel.overload2 more...]]``
-
-
-[section:overload1 signal_set::cancel (1 of 2 overloads)]
-
-
-Cancel all operations associated with the signal set.
-
-
- void cancel();
-
-
-This function forces the completion of any pending asynchronous wait operations against the signal set. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
-
-Cancellation does not alter the set of registered signals.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-If a registered signal occurred before `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-
-[section:overload2 signal_set::cancel (2 of 2 overloads)]
-
-
-Cancel all operations associated with the signal set.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function forces the completion of any pending asynchronous wait operations against the signal set. The handler for each cancelled operation will be invoked with the `asio::error::operation_aborted` error code.
-
-Cancellation does not alter the set of registered signals.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-If a registered signal occurred before `cancel()` is called, then the handlers for asynchronous wait operations will:
-
-
-* have already been invoked; or
-
-
-* 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.
-
-
-[endsect]
-
-
-[endsect]
-
-[section:clear signal_set::clear]
-
-[indexterm2 asio.indexterm.signal_set.clear..clear..signal_set]
-Remove all signals from a [link asio.reference.signal_set `signal_set`].
-
-
- void ``[link asio.reference.signal_set.clear.overload1 clear]``();
- `` [''''&raquo;''' [link asio.reference.signal_set.clear.overload1 more...]]``
-
- void ``[link asio.reference.signal_set.clear.overload2 clear]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.signal_set.clear.overload2 more...]]``
-
-
-[section:overload1 signal_set::clear (1 of 2 overloads)]
-
-
-Remove all signals from a [link asio.reference.signal_set `signal_set`].
-
-
- void clear();
-
-
-This function removes all signals from the set. It has no effect if the set is already empty.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Removes all queued notifications.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 signal_set::clear (2 of 2 overloads)]
-
-
-Remove all signals from a [link asio.reference.signal_set `signal_set`].
-
-
- void clear(
- asio::error_code & ec);
-
-
-This function removes all signals from the set. It has no effect if the set is already empty.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Removes all queued notifications.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type signal_set::executor_type]
-
-[indexterm2 asio.indexterm.signal_set.executor_type..executor_type..signal_set]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/signal_set.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor signal_set::get_executor]
-
-[indexterm2 asio.indexterm.signal_set.get_executor..get_executor..signal_set]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context signal_set::get_io_context]
-
-[indexterm2 asio.indexterm.signal_set.get_io_context..get_io_context..signal_set]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service signal_set::get_io_service]
-
-[indexterm2 asio.indexterm.signal_set.get_io_service..get_io_service..signal_set]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[section:remove signal_set::remove]
-
-[indexterm2 asio.indexterm.signal_set.remove..remove..signal_set]
-Remove a signal from a [link asio.reference.signal_set `signal_set`].
-
-
- void ``[link asio.reference.signal_set.remove.overload1 remove]``(
- int signal_number);
- `` [''''&raquo;''' [link asio.reference.signal_set.remove.overload1 more...]]``
-
- void ``[link asio.reference.signal_set.remove.overload2 remove]``(
- int signal_number,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.signal_set.remove.overload2 more...]]``
-
-
-[section:overload1 signal_set::remove (1 of 2 overloads)]
-
-
-Remove a signal from a [link asio.reference.signal_set `signal_set`].
-
-
- void remove(
- int signal_number);
-
-
-This function removes the specified signal from the set. It has no effect if the signal is not in the set.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[signal_number][The signal to be removed from the set.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Removes any notifications that have been queued for the specified signal number.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 signal_set::remove (2 of 2 overloads)]
-
-
-Remove a signal from a [link asio.reference.signal_set `signal_set`].
-
-
- void remove(
- int signal_number,
- asio::error_code & ec);
-
-
-This function removes the specified signal from the set. It has no effect if the signal is not in the set.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[signal_number][The signal to be removed from the set.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Removes any notifications that have been queued for the specified signal number.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:signal_set signal_set::signal_set]
-
-[indexterm2 asio.indexterm.signal_set.signal_set..signal_set..signal_set]
-Construct a signal set without adding any signals.
-
-
- explicit ``[link asio.reference.signal_set.signal_set.overload1 signal_set]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload1 more...]]``
-
-
-Construct a signal set and add one signal.
-
-
- ``[link asio.reference.signal_set.signal_set.overload2 signal_set]``(
- asio::io_context & io_context,
- int signal_number_1);
- `` [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload2 more...]]``
-
-
-Construct a signal set and add two signals.
-
-
- ``[link asio.reference.signal_set.signal_set.overload3 signal_set]``(
- asio::io_context & io_context,
- int signal_number_1,
- int signal_number_2);
- `` [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload3 more...]]``
-
-
-Construct a signal set and add three signals.
-
-
- ``[link asio.reference.signal_set.signal_set.overload4 signal_set]``(
- asio::io_context & io_context,
- int signal_number_1,
- int signal_number_2,
- int signal_number_3);
- `` [''''&raquo;''' [link asio.reference.signal_set.signal_set.overload4 more...]]``
-
-
-[section:overload1 signal_set::signal_set (1 of 4 overloads)]
-
-
-Construct a signal set without adding any signals.
-
-
- signal_set(
- asio::io_context & io_context);
-
-
-This constructor creates a signal set without registering for any signals.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 signal_set::signal_set (2 of 4 overloads)]
-
-
-Construct a signal set and add one signal.
-
-
- signal_set(
- asio::io_context & io_context,
- int signal_number_1);
-
-
-This constructor creates a signal set and registers for one signal.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
-
-[[signal_number_1][The signal number to be added.]]
-
-]
-
-
-[heading Remarks]
-
-This constructor is equivalent to performing:
-
- asio::signal_set signals(io_context);
- signals.add(signal_number_1);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 signal_set::signal_set (3 of 4 overloads)]
-
-
-Construct a signal set and add two signals.
-
-
- signal_set(
- asio::io_context & io_context,
- int signal_number_1,
- int signal_number_2);
-
-
-This constructor creates a signal set and registers for two signals.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
-
-[[signal_number_1][The first signal number to be added.]]
-
-[[signal_number_2][The second signal number to be added.]]
-
-]
-
-
-[heading Remarks]
-
-This constructor is equivalent to performing:
-
- asio::signal_set signals(io_context);
- signals.add(signal_number_1);
- signals.add(signal_number_2);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 signal_set::signal_set (4 of 4 overloads)]
-
-
-Construct a signal set and add three signals.
-
-
- signal_set(
- asio::io_context & io_context,
- int signal_number_1,
- int signal_number_2,
- int signal_number_3);
-
-
-This constructor creates a signal set and registers for three signals.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the signal set will use to dispatch handlers for any asynchronous operations performed on the set.]]
-
-[[signal_number_1][The first signal number to be added.]]
-
-[[signal_number_2][The second signal number to be added.]]
-
-[[signal_number_3][The third signal number to be added.]]
-
-]
-
-
-[heading Remarks]
-
-This constructor is equivalent to performing:
-
- asio::signal_set signals(io_context);
- signals.add(signal_number_1);
- signals.add(signal_number_2);
- signals.add(signal_number_3);
-
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_signal_set signal_set::~signal_set]
-
-[indexterm2 asio.indexterm.signal_set._signal_set..~signal_set..signal_set]
-Destroys the signal set.
-
-
- ~signal_set();
-
-
-This function destroys the signal set, cancelling any outstanding asynchronous wait operations associated with the signal set as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:socket_base socket_base]
-
-
-The [link asio.reference.socket_base `socket_base`] class is used as a base for the [link asio.reference.basic_stream_socket `basic_stream_socket`] and [link asio.reference.basic_datagram_socket `basic_datagram_socket`] class templates so that we have a common place to define the shutdown\_type and enum.
-
-
- class socket_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.socket_base.broadcast [*broadcast]]]
- [Socket option to permit sending of broadcast messages. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.bytes_readable [*bytes_readable]]]
- [IO control command to get the amount of data that can be read without blocking. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.debug [*debug]]]
- [Socket option to enable socket-level debugging. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.do_not_route [*do_not_route]]]
- [Socket option to prevent routing, use local interfaces only. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.enable_connection_aborted [*enable_connection_aborted]]]
- [Socket option to report aborted connections on accept. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.keep_alive [*keep_alive]]]
- [Socket option to send keep-alives. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.linger [*linger]]]
- [Socket option to specify whether the socket lingers on close if unsent data is present. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.message_flags [*message_flags]]]
- [Bitmask type for flags that can be passed to send and receive operations. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.receive_buffer_size [*receive_buffer_size]]]
- [Socket option for the receive buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.receive_low_watermark [*receive_low_watermark]]]
- [Socket option for the receive low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.reuse_address [*reuse_address]]]
- [Socket option to allow the socket to be bound to an address that is already in use. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.send_buffer_size [*send_buffer_size]]]
- [Socket option for the send buffer size of a socket. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.send_low_watermark [*send_low_watermark]]]
- [Socket option for the send low watermark. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.shutdown_type [*shutdown_type]]]
- [Different ways a socket may be shutdown. ]
-
- ]
-
- [
-
- [[link asio.reference.socket_base.wait_type [*wait_type]]]
- [Wait types. ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.socket_base._socket_base [*~socket_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.socket_base.max_connections [*max_connections]]]
- [(Deprecated: Use max_listen_connections.) The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.socket_base.max_listen_connections [*max_listen_connections]]]
- [The maximum length of the queue of pending incoming connections. ]
- ]
-
- [
- [[link asio.reference.socket_base.message_do_not_route [*message_do_not_route]]]
- [Specify that the data should not be subject to routing. ]
- ]
-
- [
- [[link asio.reference.socket_base.message_end_of_record [*message_end_of_record]]]
- [Specifies that the data marks the end of a record. ]
- ]
-
- [
- [[link asio.reference.socket_base.message_out_of_band [*message_out_of_band]]]
- [Process out-of-band data. ]
- ]
-
- [
- [[link asio.reference.socket_base.message_peek [*message_peek]]]
- [Peek at incoming data without removing it from the input queue. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:broadcast socket_base::broadcast]
-
-[indexterm2 asio.indexterm.socket_base.broadcast..broadcast..socket_base]
-Socket option to permit sending of broadcast messages.
-
-
- typedef implementation_defined broadcast;
-
-
-
-Implements the SOL\_SOCKET/SO\_BROADCAST socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::broadcast option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:bytes_readable socket_base::bytes_readable]
-
-[indexterm2 asio.indexterm.socket_base.bytes_readable..bytes_readable..socket_base]
-IO control command to get the amount of data that can be read without blocking.
-
-
- typedef implementation_defined bytes_readable;
-
-
-
-Implements the FIONREAD IO control command.
-
-
-[heading Example]
-
-
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::bytes_readable command(true);
- socket.io_control(command);
- std::size_t bytes_readable = command.get();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:debug socket_base::debug]
-
-[indexterm2 asio.indexterm.socket_base.debug..debug..socket_base]
-Socket option to enable socket-level debugging.
-
-
- typedef implementation_defined debug;
-
-
-
-Implements the SOL\_SOCKET/SO\_DEBUG socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::debug option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:do_not_route socket_base::do_not_route]
-
-[indexterm2 asio.indexterm.socket_base.do_not_route..do_not_route..socket_base]
-Socket option to prevent routing, use local interfaces only.
-
-
- typedef implementation_defined do_not_route;
-
-
-
-Implements the SOL\_SOCKET/SO\_DONTROUTE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::udp::socket socket(io_context);
- ...
- asio::socket_base::do_not_route option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:enable_connection_aborted socket_base::enable_connection_aborted]
-
-[indexterm2 asio.indexterm.socket_base.enable_connection_aborted..enable_connection_aborted..socket_base]
-Socket option to report aborted connections on accept.
-
-
- typedef implementation_defined enable_connection_aborted;
-
-
-
-Implements a custom socket option that determines whether or not an accept operation is permitted to fail with `asio::error::connection_aborted`. By default the option is false.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::enable_connection_aborted option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:keep_alive socket_base::keep_alive]
-
-[indexterm2 asio.indexterm.socket_base.keep_alive..keep_alive..socket_base]
-Socket option to send keep-alives.
-
-
- typedef implementation_defined keep_alive;
-
-
-
-Implements the SOL\_SOCKET/SO\_KEEPALIVE socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option(true);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::keep_alive option;
- socket.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:linger socket_base::linger]
-
-[indexterm2 asio.indexterm.socket_base.linger..linger..socket_base]
-Socket option to specify whether the socket lingers on close if unsent data is present.
-
-
- typedef implementation_defined linger;
-
-
-
-Implements the SOL\_SOCKET/SO\_LINGER socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option(true, 30);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::linger option;
- socket.get_option(option);
- bool is_set = option.enabled();
- unsigned short timeout = option.timeout();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:max_connections socket_base::max_connections]
-
-[indexterm2 asio.indexterm.socket_base.max_connections..max_connections..socket_base]
-(Deprecated: Use max\_listen\_connections.) The maximum length of the queue of pending incoming connections.
-
-
- static const int max_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:max_listen_connections socket_base::max_listen_connections]
-
-[indexterm2 asio.indexterm.socket_base.max_listen_connections..max_listen_connections..socket_base]
-The maximum length of the queue of pending incoming connections.
-
-
- static const int max_listen_connections = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_do_not_route socket_base::message_do_not_route]
-
-[indexterm2 asio.indexterm.socket_base.message_do_not_route..message_do_not_route..socket_base]
-Specify that the data should not be subject to routing.
-
-
- static const int message_do_not_route = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_end_of_record socket_base::message_end_of_record]
-
-[indexterm2 asio.indexterm.socket_base.message_end_of_record..message_end_of_record..socket_base]
-Specifies that the data marks the end of a record.
-
-
- static const int message_end_of_record = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_flags socket_base::message_flags]
-
-[indexterm2 asio.indexterm.socket_base.message_flags..message_flags..socket_base]
-Bitmask type for flags that can be passed to send and receive operations.
-
-
- typedef int message_flags;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:message_out_of_band socket_base::message_out_of_band]
-
-[indexterm2 asio.indexterm.socket_base.message_out_of_band..message_out_of_band..socket_base]
-Process out-of-band data.
-
-
- static const int message_out_of_band = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:message_peek socket_base::message_peek]
-
-[indexterm2 asio.indexterm.socket_base.message_peek..message_peek..socket_base]
-Peek at incoming data without removing it from the input queue.
-
-
- static const int message_peek = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:receive_buffer_size socket_base::receive_buffer_size]
-
-[indexterm2 asio.indexterm.socket_base.receive_buffer_size..receive_buffer_size..socket_base]
-Socket option for the receive buffer size of a socket.
-
-
- typedef implementation_defined receive_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:receive_low_watermark socket_base::receive_low_watermark]
-
-[indexterm2 asio.indexterm.socket_base.receive_low_watermark..receive_low_watermark..socket_base]
-Socket option for the receive low watermark.
-
-
- typedef implementation_defined receive_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_RCVLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::receive_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:reuse_address socket_base::reuse_address]
-
-[indexterm2 asio.indexterm.socket_base.reuse_address..reuse_address..socket_base]
-Socket option to allow the socket to be bound to an address that is already in use.
-
-
- typedef implementation_defined reuse_address;
-
-
-
-Implements the SOL\_SOCKET/SO\_REUSEADDR socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option(true);
- acceptor.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::acceptor acceptor(io_context);
- ...
- asio::socket_base::reuse_address option;
- acceptor.get_option(option);
- bool is_set = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_buffer_size socket_base::send_buffer_size]
-
-[indexterm2 asio.indexterm.socket_base.send_buffer_size..send_buffer_size..socket_base]
-Socket option for the send buffer size of a socket.
-
-
- typedef implementation_defined send_buffer_size;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDBUF socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option(8192);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_buffer_size option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:send_low_watermark socket_base::send_low_watermark]
-
-[indexterm2 asio.indexterm.socket_base.send_low_watermark..send_low_watermark..socket_base]
-Socket option for the send low watermark.
-
-
- typedef implementation_defined send_low_watermark;
-
-
-
-Implements the SOL\_SOCKET/SO\_SNDLOWAT socket option.
-
-
-[heading Examples]
-
-Setting the option:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option(1024);
- socket.set_option(option);
-
-
-
-
-
-Getting the current option value:
-
- asio::ip::tcp::socket socket(io_context);
- ...
- asio::socket_base::send_low_watermark option;
- socket.get_option(option);
- int size = option.value();
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/socket_base.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:shutdown_type socket_base::shutdown_type]
-
-[indexterm2 asio.indexterm.socket_base.shutdown_type..shutdown_type..socket_base]
-Different ways a socket may be shutdown.
-
-
- enum shutdown_type
-
-[indexterm2 asio.indexterm.socket_base.shutdown_type.shutdown_receive..shutdown_receive..socket_base]
-[indexterm2 asio.indexterm.socket_base.shutdown_type.shutdown_send..shutdown_send..socket_base]
-[indexterm2 asio.indexterm.socket_base.shutdown_type.shutdown_both..shutdown_both..socket_base]
-
-[heading Values]
-[variablelist
-
- [
- [shutdown_receive]
- [Shutdown the receive side of the socket. ]
- ]
-
- [
- [shutdown_send]
- [Shutdown the send side of the socket. ]
- ]
-
- [
- [shutdown_both]
- [Shutdown both send and receive on the socket. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:wait_type socket_base::wait_type]
-
-[indexterm2 asio.indexterm.socket_base.wait_type..wait_type..socket_base]
-Wait types.
-
-
- enum wait_type
-
-[indexterm2 asio.indexterm.socket_base.wait_type.wait_read..wait_read..socket_base]
-[indexterm2 asio.indexterm.socket_base.wait_type.wait_write..wait_write..socket_base]
-[indexterm2 asio.indexterm.socket_base.wait_type.wait_error..wait_error..socket_base]
-
-[heading Values]
-[variablelist
-
- [
- [wait_read]
- [Wait for a socket to become ready to read. ]
- ]
-
- [
- [wait_write]
- [Wait for a socket to become ready to write. ]
- ]
-
- [
- [wait_error]
- [Wait for a socket to have error conditions pending. ]
- ]
-
-]
-
-
-For use with `basic_socket::wait()` and `basic_socket::async_wait()`.
-
-
-[endsect]
-
-
-
-[section:_socket_base socket_base::~socket_base]
-
-[indexterm2 asio.indexterm.socket_base._socket_base..~socket_base..socket_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~socket_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:spawn spawn]
-
-[indexterm1 asio.indexterm.spawn..spawn]
-Start a new stackful coroutine.
-
-
- template<
- typename Function>
- void ``[link asio.reference.spawn.overload1 spawn]``(
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
- `` [''''&raquo;''' [link asio.reference.spawn.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Handler Handler]``,
- typename Function>
- void ``[link asio.reference.spawn.overload2 spawn]``(
- Handler && handler,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes(),
- typename enable_if<!is_executor< typename decay< Handler >::type >::value &&!is_convertible< Handler &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.spawn.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.Handler Handler]``,
- typename Function>
- void ``[link asio.reference.spawn.overload3 spawn]``(
- basic_yield_context< Handler > ctx,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
- `` [''''&raquo;''' [link asio.reference.spawn.overload3 more...]]``
-
- template<
- typename Function,
- typename ``[link asio.reference.Executor1 Executor]``>
- void ``[link asio.reference.spawn.overload4 spawn]``(
- const Executor & ex,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes(),
- typename enable_if< is_executor< Executor >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.spawn.overload4 more...]]``
-
- template<
- typename Function,
- typename ``[link asio.reference.Executor1 Executor]``>
- void ``[link asio.reference.spawn.overload5 spawn]``(
- const strand< Executor > & ex,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
- `` [''''&raquo;''' [link asio.reference.spawn.overload5 more...]]``
-
- template<
- typename Function>
- void ``[link asio.reference.spawn.overload6 spawn]``(
- const asio::io_context::strand & s,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
- `` [''''&raquo;''' [link asio.reference.spawn.overload6 more...]]``
-
- template<
- typename Function,
- typename ExecutionContext>
- void ``[link asio.reference.spawn.overload7 spawn]``(
- ExecutionContext & ctx,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes(),
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.spawn.overload7 more...]]``
-
-The `spawn()` function is a high-level wrapper over the Boost.Coroutine library. This function enables programs to implement asynchronous logic in a synchronous manner, as illustrated by the following example:
-
-
-
- asio::spawn(my_strand, do_echo);
-
- // ...
-
- void do_echo(asio::yield_context yield)
- {
- try
- {
- char data[128];
- for (;;)
- {
- std::size_t length =
- my_socket.async_read_some(
- asio::buffer(data), yield);
-
- asio::async_write(my_socket,
- asio::buffer(data, length), yield);
- }
- }
- catch (std::exception& e)
- {
- // ...
- }
- }
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/spawn.hpp]
-
-['Convenience header: ]None
-
-
-[section:overload1 spawn (1 of 7 overloads)]
-
-
-Start a new stackful coroutine, calling the specified handler when it completes.
-
-
- template<
- typename Function>
- void spawn(
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(basic_yield_context<Handler> yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 spawn (2 of 7 overloads)]
-
-
-Start a new stackful coroutine, calling the specified handler when it completes.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``,
- typename Function>
- void spawn(
- Handler && handler,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes(),
- typename enable_if<!is_executor< typename decay< Handler >::type >::value &&!is_convertible< Handler &, execution_context & >::value >::type * = 0);
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][A handler to be called when the coroutine exits. More importantly, the handler provides an execution context (via the the handler invocation hook) for the coroutine. The handler must have the signature:
-``
- void handler();
-``
-]]
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(basic_yield_context<Handler> yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 spawn (3 of 7 overloads)]
-
-
-Start a new stackful coroutine, inheriting the execution context of another.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``,
- typename Function>
- void spawn(
- basic_yield_context< Handler > ctx,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ctx][Identifies the current coroutine as a parent of the new coroutine. This specifies that the new coroutine should inherit the execution context of the parent. For example, if the parent coroutine is executing in a particular strand, then the new coroutine will execute in the same strand.]]
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(basic_yield_context<Handler> yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 spawn (4 of 7 overloads)]
-
-
-Start a new stackful coroutine that executes on a given executor.
-
-
- template<
- typename Function,
- typename ``[link asio.reference.Executor1 Executor]``>
- void spawn(
- const Executor & ex,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes(),
- typename enable_if< is_executor< Executor >::value >::type * = 0);
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ex][Identifies the executor that will run the coroutine. The new coroutine is implicitly given its own strand within this executor.]]
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(yield_context yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 spawn (5 of 7 overloads)]
-
-
-Start a new stackful coroutine that executes on a given strand.
-
-
- template<
- typename Function,
- typename ``[link asio.reference.Executor1 Executor]``>
- void spawn(
- const strand< Executor > & ex,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ex][Identifies the strand that will run the coroutine.]]
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(yield_context yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 spawn (6 of 7 overloads)]
-
-
-Start a new stackful coroutine that executes in the context of a strand.
-
-
- template<
- typename Function>
- void spawn(
- const asio::io_context::strand & s,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes());
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][Identifies a strand. By starting multiple coroutines on the same strand, the implementation ensures that none of those coroutines can execute simultaneously.]]
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(yield_context yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 spawn (7 of 7 overloads)]
-
-
-Start a new stackful coroutine that executes on a given execution context.
-
-
- template<
- typename Function,
- typename ExecutionContext>
- void spawn(
- ExecutionContext & ctx,
- Function && function,
- const boost::coroutines::attributes & attributes = boost::coroutines::attributes(),
- typename enable_if< is_convertible< ExecutionContext &, execution_context & >::value >::type * = 0);
-
-
-This function is used to launch a new coroutine.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ctx][Identifies the execution context that will run the coroutine. The new coroutine is implicitly given its own strand within this execution context.]]
-
-[[function][The coroutine function. The function must have the signature:
-``
- void function(yield_context yield);
-``
-]]
-
-[[attributes][Boost.Coroutine attributes used to customise the coroutine. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:ssl__context ssl::context]
-
-
-
- class context :
- public ssl::context_base,
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ssl__context.file_format [*file_format]]]
- [File format types. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context.method [*method]]]
- [Different methods supported by a context. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context.native_handle_type [*native_handle_type]]]
- [The native handle type of the SSL context. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context.options [*options]]]
- [Bitmask type for SSL options. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context.password_purpose [*password_purpose]]]
- [Purpose of PEM password. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__context.add_certificate_authority [*add_certificate_authority]]]
- [Add certification authority for performing verification. ]
- ]
-
- [
- [[link asio.reference.ssl__context.add_verify_path [*add_verify_path]]]
- [Add a directory containing certificate authority files to be used for performing verification. ]
- ]
-
- [
- [[link asio.reference.ssl__context.clear_options [*clear_options]]]
- [Clear options on the context. ]
- ]
-
- [
- [[link asio.reference.ssl__context.context [*context]]]
- [Constructor.
-
- Move-construct a context from another. ]
- ]
-
- [
- [[link asio.reference.ssl__context.load_verify_file [*load_verify_file]]]
- [Load a certification authority file for performing verification. ]
- ]
-
- [
- [[link asio.reference.ssl__context.native_handle [*native_handle]]]
- [Get the underlying implementation in the native type. ]
- ]
-
- [
- [[link asio.reference.ssl__context.operator_eq_ [*operator=]]]
- [Move-assign a context from another. ]
- ]
-
- [
- [[link asio.reference.ssl__context.set_default_verify_paths [*set_default_verify_paths]]]
- [Configures the context to use the default directories for finding certification authority certificates. ]
- ]
-
- [
- [[link asio.reference.ssl__context.set_options [*set_options]]]
- [Set options on the context. ]
- ]
-
- [
- [[link asio.reference.ssl__context.set_password_callback [*set_password_callback]]]
- [Set the password callback. ]
- ]
-
- [
- [[link asio.reference.ssl__context.set_verify_callback [*set_verify_callback]]]
- [Set the callback used to verify peer certificates. ]
- ]
-
- [
- [[link asio.reference.ssl__context.set_verify_depth [*set_verify_depth]]]
- [Set the peer verification depth. ]
- ]
-
- [
- [[link asio.reference.ssl__context.set_verify_mode [*set_verify_mode]]]
- [Set the peer verification mode. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_certificate [*use_certificate]]]
- [Use a certificate from a memory buffer. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_certificate_chain [*use_certificate_chain]]]
- [Use a certificate chain from a memory buffer. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_certificate_chain_file [*use_certificate_chain_file]]]
- [Use a certificate chain from a file. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_certificate_file [*use_certificate_file]]]
- [Use a certificate from a file. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_private_key [*use_private_key]]]
- [Use a private key from a memory buffer. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_private_key_file [*use_private_key_file]]]
- [Use a private key from a file. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_rsa_private_key [*use_rsa_private_key]]]
- [Use an RSA private key from a memory buffer. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_rsa_private_key_file [*use_rsa_private_key_file]]]
- [Use an RSA private key from a file. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_tmp_dh [*use_tmp_dh]]]
- [Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters. ]
- ]
-
- [
- [[link asio.reference.ssl__context.use_tmp_dh_file [*use_tmp_dh_file]]]
- [Use the specified file to obtain the temporary Diffie-Hellman parameters. ]
- ]
-
- [
- [[link asio.reference.ssl__context._context [*~context]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__context.default_workarounds [*default_workarounds]]]
- [Implement various bug workarounds. ]
- ]
-
- [
- [[link asio.reference.ssl__context.no_compression [*no_compression]]]
- [Disable compression. Compression is disabled by default. ]
- ]
-
- [
- [[link asio.reference.ssl__context.no_sslv2 [*no_sslv2]]]
- [Disable SSL v2. ]
- ]
-
- [
- [[link asio.reference.ssl__context.no_sslv3 [*no_sslv3]]]
- [Disable SSL v3. ]
- ]
-
- [
- [[link asio.reference.ssl__context.no_tlsv1 [*no_tlsv1]]]
- [Disable TLS v1. ]
- ]
-
- [
- [[link asio.reference.ssl__context.no_tlsv1_1 [*no_tlsv1_1]]]
- [Disable TLS v1.1. ]
- ]
-
- [
- [[link asio.reference.ssl__context.no_tlsv1_2 [*no_tlsv1_2]]]
- [Disable TLS v1.2. ]
- ]
-
- [
- [[link asio.reference.ssl__context.single_dh_use [*single_dh_use]]]
- [Always create a new key when using tmp_dh parameters. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/context.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-[section:add_certificate_authority ssl::context::add_certificate_authority]
-
-[indexterm2 asio.indexterm.ssl__context.add_certificate_authority..add_certificate_authority..ssl::context]
-Add certification authority for performing verification.
-
-
- void ``[link asio.reference.ssl__context.add_certificate_authority.overload1 add_certificate_authority]``(
- const const_buffer & ca);
- `` [''''&raquo;''' [link asio.reference.ssl__context.add_certificate_authority.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.add_certificate_authority.overload2 add_certificate_authority]``(
- const const_buffer & ca,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.add_certificate_authority.overload2 more...]]``
-
-
-[section:overload1 ssl::context::add_certificate_authority (1 of 2 overloads)]
-
-
-Add certification authority for performing verification.
-
-
- void add_certificate_authority(
- const const_buffer & ca);
-
-
-This function is used to add one trusted certification authority from a memory buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ca][The buffer containing the certification authority certificate. The certificate must use the PEM format.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_get_cert_store` and `X509_STORE_add_cert`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::add_certificate_authority (2 of 2 overloads)]
-
-
-Add certification authority for performing verification.
-
-
- void add_certificate_authority(
- const const_buffer & ca,
- asio::error_code & ec);
-
-
-This function is used to add one trusted certification authority from a memory buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ca][The buffer containing the certification authority certificate. The certificate must use the PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_get_cert_store` and `X509_STORE_add_cert`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:add_verify_path ssl::context::add_verify_path]
-
-[indexterm2 asio.indexterm.ssl__context.add_verify_path..add_verify_path..ssl::context]
-Add a directory containing certificate authority files to be used for performing verification.
-
-
- void ``[link asio.reference.ssl__context.add_verify_path.overload1 add_verify_path]``(
- const std::string & path);
- `` [''''&raquo;''' [link asio.reference.ssl__context.add_verify_path.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.add_verify_path.overload2 add_verify_path]``(
- const std::string & path,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.add_verify_path.overload2 more...]]``
-
-
-[section:overload1 ssl::context::add_verify_path (1 of 2 overloads)]
-
-
-Add a directory containing certificate authority files to be used for performing verification.
-
-
- void add_verify_path(
- const std::string & path);
-
-
-This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[path][The name of a directory containing the certificates.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_load_verify_locations`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::add_verify_path (2 of 2 overloads)]
-
-
-Add a directory containing certificate authority files to be used for performing verification.
-
-
- void add_verify_path(
- const std::string & path,
- asio::error_code & ec);
-
-
-This function is used to specify the name of a directory containing certification authority certificates. Each file in the directory must contain a single certificate. The files must be named using the subject name's hash and an extension of ".0".
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[path][The name of a directory containing the certificates.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_load_verify_locations`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:clear_options ssl::context::clear_options]
-
-[indexterm2 asio.indexterm.ssl__context.clear_options..clear_options..ssl::context]
-Clear options on the context.
-
-
- void ``[link asio.reference.ssl__context.clear_options.overload1 clear_options]``(
- options o);
- `` [''''&raquo;''' [link asio.reference.ssl__context.clear_options.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.clear_options.overload2 clear_options]``(
- options o,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.clear_options.overload2 more...]]``
-
-
-[section:overload1 ssl::context::clear_options (1 of 2 overloads)]
-
-
-Clear options on the context.
-
-
- void clear_options(
- options o);
-
-
-This function may be used to configure the SSL options used by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[o][A bitmask of options. The available option values are defined in the [link asio.reference.ssl__context_base `ssl::context_base`] class. The specified options, if currently enabled on the context, are cleared.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_clear_options`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::clear_options (2 of 2 overloads)]
-
-
-Clear options on the context.
-
-
- void clear_options(
- options o,
- asio::error_code & ec);
-
-
-This function may be used to configure the SSL options used by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[o][A bitmask of options. The available option values are defined in the [link asio.reference.ssl__context_base `ssl::context_base`] class. The specified options, if currently enabled on the context, are cleared.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_clear_options`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:context ssl::context::context]
-
-[indexterm2 asio.indexterm.ssl__context.context..context..ssl::context]
-Constructor.
-
-
- explicit ``[link asio.reference.ssl__context.context.overload1 context]``(
- method m);
- `` [''''&raquo;''' [link asio.reference.ssl__context.context.overload1 more...]]``
-
-
-Move-construct a context from another.
-
-
- ``[link asio.reference.ssl__context.context.overload2 context]``(
- context && other);
- `` [''''&raquo;''' [link asio.reference.ssl__context.context.overload2 more...]]``
-
-
-[section:overload1 ssl::context::context (1 of 2 overloads)]
-
-
-Constructor.
-
-
- context(
- method m);
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::context (2 of 2 overloads)]
-
-
-Move-construct a context from another.
-
-
- context(
- context && other);
-
-
-This constructor moves an SSL context from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other context object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the following operations only are valid for the moved-from object:
-* Destruction.
-
-* As a target for move-assignment.
-
-
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:default_workarounds ssl::context::default_workarounds]
-
-[indexterm2 asio.indexterm.ssl__context.default_workarounds..default_workarounds..ssl::context]
-Implement various bug workarounds.
-
-
- static const long default_workarounds = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:file_format ssl::context::file_format]
-
-[indexterm2 asio.indexterm.ssl__context.file_format..file_format..ssl::context]
-File format types.
-
-
- enum file_format
-
-[indexterm2 asio.indexterm.ssl__context.file_format.asn1..asn1..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.file_format.pem..pem..ssl::context]
-
-[heading Values]
-[variablelist
-
- [
- [asn1]
- [ASN.1 file. ]
- ]
-
- [
- [pem]
- [PEM file. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:load_verify_file ssl::context::load_verify_file]
-
-[indexterm2 asio.indexterm.ssl__context.load_verify_file..load_verify_file..ssl::context]
-Load a certification authority file for performing verification.
-
-
- void ``[link asio.reference.ssl__context.load_verify_file.overload1 load_verify_file]``(
- const std::string & filename);
- `` [''''&raquo;''' [link asio.reference.ssl__context.load_verify_file.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.load_verify_file.overload2 load_verify_file]``(
- const std::string & filename,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.load_verify_file.overload2 more...]]``
-
-
-[section:overload1 ssl::context::load_verify_file (1 of 2 overloads)]
-
-
-Load a certification authority file for performing verification.
-
-
- void load_verify_file(
- const std::string & filename);
-
-
-This function is used to load one or more trusted certification authorities from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of a file containing certification authority certificates in PEM format.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_load_verify_locations`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::load_verify_file (2 of 2 overloads)]
-
-
-Load a certification authority file for performing verification.
-
-
- void load_verify_file(
- const std::string & filename,
- asio::error_code & ec);
-
-
-This function is used to load the certificates for one or more trusted certification authorities from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of a file containing certification authority certificates in PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_load_verify_locations`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:method ssl::context::method]
-
-[indexterm2 asio.indexterm.ssl__context.method..method..ssl::context]
-Different methods supported by a context.
-
-
- enum method
-
-[indexterm2 asio.indexterm.ssl__context.method.sslv2..sslv2..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv2_client..sslv2_client..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv2_server..sslv2_server..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv3..sslv3..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv3_client..sslv3_client..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv3_server..sslv3_server..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv1..tlsv1..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv1_client..tlsv1_client..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv1_server..tlsv1_server..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv23..sslv23..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv23_client..sslv23_client..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.sslv23_server..sslv23_server..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv11..tlsv11..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv11_client..tlsv11_client..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv11_server..tlsv11_server..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv12..tlsv12..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv12_client..tlsv12_client..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.method.tlsv12_server..tlsv12_server..ssl::context]
-
-[heading Values]
-[variablelist
-
- [
- [sslv2]
- [Generic SSL version 2. ]
- ]
-
- [
- [sslv2_client]
- [SSL version 2 client. ]
- ]
-
- [
- [sslv2_server]
- [SSL version 2 server. ]
- ]
-
- [
- [sslv3]
- [Generic SSL version 3. ]
- ]
-
- [
- [sslv3_client]
- [SSL version 3 client. ]
- ]
-
- [
- [sslv3_server]
- [SSL version 3 server. ]
- ]
-
- [
- [tlsv1]
- [Generic TLS version 1. ]
- ]
-
- [
- [tlsv1_client]
- [TLS version 1 client. ]
- ]
-
- [
- [tlsv1_server]
- [TLS version 1 server. ]
- ]
-
- [
- [sslv23]
- [Generic SSL/TLS. ]
- ]
-
- [
- [sslv23_client]
- [SSL/TLS client. ]
- ]
-
- [
- [sslv23_server]
- [SSL/TLS server. ]
- ]
-
- [
- [tlsv11]
- [Generic TLS version 1.1. ]
- ]
-
- [
- [tlsv11_client]
- [TLS version 1.1 client. ]
- ]
-
- [
- [tlsv11_server]
- [TLS version 1.1 server. ]
- ]
-
- [
- [tlsv12]
- [Generic TLS version 1.2. ]
- ]
-
- [
- [tlsv12_client]
- [TLS version 1.2 client. ]
- ]
-
- [
- [tlsv12_server]
- [TLS version 1.2 server. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:native_handle ssl::context::native_handle]
-
-[indexterm2 asio.indexterm.ssl__context.native_handle..native_handle..ssl::context]
-Get the underlying implementation in the native type.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type ssl::context::native_handle_type]
-
-[indexterm2 asio.indexterm.ssl__context.native_handle_type..native_handle_type..ssl::context]
-The native handle type of the SSL context.
-
-
- typedef SSL_CTX * native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/context.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:no_compression ssl::context::no_compression]
-
-[indexterm2 asio.indexterm.ssl__context.no_compression..no_compression..ssl::context]
-Disable compression. Compression is disabled by default.
-
-
- static const long no_compression = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_sslv2 ssl::context::no_sslv2]
-
-[indexterm2 asio.indexterm.ssl__context.no_sslv2..no_sslv2..ssl::context]
-Disable SSL v2.
-
-
- static const long no_sslv2 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_sslv3 ssl::context::no_sslv3]
-
-[indexterm2 asio.indexterm.ssl__context.no_sslv3..no_sslv3..ssl::context]
-Disable SSL v3.
-
-
- static const long no_sslv3 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_tlsv1 ssl::context::no_tlsv1]
-
-[indexterm2 asio.indexterm.ssl__context.no_tlsv1..no_tlsv1..ssl::context]
-Disable TLS v1.
-
-
- static const long no_tlsv1 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_tlsv1_1 ssl::context::no_tlsv1_1]
-
-[indexterm2 asio.indexterm.ssl__context.no_tlsv1_1..no_tlsv1_1..ssl::context]
-Disable TLS v1.1.
-
-
- static const long no_tlsv1_1 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_tlsv1_2 ssl::context::no_tlsv1_2]
-
-[indexterm2 asio.indexterm.ssl__context.no_tlsv1_2..no_tlsv1_2..ssl::context]
-Disable TLS v1.2.
-
-
- static const long no_tlsv1_2 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ ssl::context::operator=]
-
-[indexterm2 asio.indexterm.ssl__context.operator_eq_..operator=..ssl::context]
-Move-assign a context from another.
-
-
- context & operator=(
- context && other);
-
-
-This assignment operator moves an SSL context from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other context object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the following operations only are valid for the moved-from object:
-* Destruction.
-
-* As a target for move-assignment.
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:options ssl::context::options]
-
-[indexterm2 asio.indexterm.ssl__context.options..options..ssl::context]
-Bitmask type for SSL options.
-
-
- typedef long options;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/context.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:password_purpose ssl::context::password_purpose]
-
-[indexterm2 asio.indexterm.ssl__context.password_purpose..password_purpose..ssl::context]
-Purpose of PEM password.
-
-
- enum password_purpose
-
-[indexterm2 asio.indexterm.ssl__context.password_purpose.for_reading..for_reading..ssl::context]
-[indexterm2 asio.indexterm.ssl__context.password_purpose.for_writing..for_writing..ssl::context]
-
-[heading Values]
-[variablelist
-
- [
- [for_reading]
- [The password is needed for reading/decryption. ]
- ]
-
- [
- [for_writing]
- [The password is needed for writing/encryption. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:set_default_verify_paths ssl::context::set_default_verify_paths]
-
-[indexterm2 asio.indexterm.ssl__context.set_default_verify_paths..set_default_verify_paths..ssl::context]
-Configures the context to use the default directories for finding certification authority certificates.
-
-
- void ``[link asio.reference.ssl__context.set_default_verify_paths.overload1 set_default_verify_paths]``();
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_default_verify_paths.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.set_default_verify_paths.overload2 set_default_verify_paths]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_default_verify_paths.overload2 more...]]``
-
-
-[section:overload1 ssl::context::set_default_verify_paths (1 of 2 overloads)]
-
-
-Configures the context to use the default directories for finding certification authority certificates.
-
-
- void set_default_verify_paths();
-
-
-This function specifies that the context should use the default, system-dependent directories for locating certification authority certificates.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_default_verify_paths`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::set_default_verify_paths (2 of 2 overloads)]
-
-
-Configures the context to use the default directories for finding certification authority certificates.
-
-
- void set_default_verify_paths(
- asio::error_code & ec);
-
-
-This function specifies that the context should use the default, system-dependent directories for locating certification authority certificates.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_default_verify_paths`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_options ssl::context::set_options]
-
-[indexterm2 asio.indexterm.ssl__context.set_options..set_options..ssl::context]
-Set options on the context.
-
-
- void ``[link asio.reference.ssl__context.set_options.overload1 set_options]``(
- options o);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_options.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.set_options.overload2 set_options]``(
- options o,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_options.overload2 more...]]``
-
-
-[section:overload1 ssl::context::set_options (1 of 2 overloads)]
-
-
-Set options on the context.
-
-
- void set_options(
- options o);
-
-
-This function may be used to configure the SSL options used by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[o][A bitmask of options. The available option values are defined in the [link asio.reference.ssl__context_base `ssl::context_base`] class. The options are bitwise-ored with any existing value for the options.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_options`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::set_options (2 of 2 overloads)]
-
-
-Set options on the context.
-
-
- void set_options(
- options o,
- asio::error_code & ec);
-
-
-This function may be used to configure the SSL options used by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[o][A bitmask of options. The available option values are defined in the [link asio.reference.ssl__context_base `ssl::context_base`] class. The options are bitwise-ored with any existing value for the options.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_options`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_password_callback ssl::context::set_password_callback]
-
-[indexterm2 asio.indexterm.ssl__context.set_password_callback..set_password_callback..ssl::context]
-Set the password callback.
-
-
- template<
- typename PasswordCallback>
- void ``[link asio.reference.ssl__context.set_password_callback.overload1 set_password_callback]``(
- PasswordCallback callback);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_password_callback.overload1 more...]]``
-
- template<
- typename PasswordCallback>
- void ``[link asio.reference.ssl__context.set_password_callback.overload2 set_password_callback]``(
- PasswordCallback callback,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_password_callback.overload2 more...]]``
-
-
-[section:overload1 ssl::context::set_password_callback (1 of 2 overloads)]
-
-
-Set the password callback.
-
-
- template<
- typename PasswordCallback>
- void set_password_callback(
- PasswordCallback callback);
-
-
-This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[callback][The function object to be used for obtaining the password. The function signature of the handler must be:
-``
- std::string password_callback(
- std::size_t max_length, // The maximum size for a password.
- password_purpose purpose // Whether password is for reading or writing.
- );
-``
-The return value of the callback is a string containing the password.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_default_passwd_cb`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::set_password_callback (2 of 2 overloads)]
-
-
-Set the password callback.
-
-
- template<
- typename PasswordCallback>
- void set_password_callback(
- PasswordCallback callback,
- asio::error_code & ec);
-
-
-This function is used to specify a callback function to obtain password information about an encrypted key in PEM format.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[callback][The function object to be used for obtaining the password. The function signature of the handler must be:
-``
- std::string password_callback(
- std::size_t max_length, // The maximum size for a password.
- password_purpose purpose // Whether password is for reading or writing.
- );
-``
-The return value of the callback is a string containing the password.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_default_passwd_cb`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_verify_callback ssl::context::set_verify_callback]
-
-[indexterm2 asio.indexterm.ssl__context.set_verify_callback..set_verify_callback..ssl::context]
-Set the callback used to verify peer certificates.
-
-
- template<
- typename VerifyCallback>
- void ``[link asio.reference.ssl__context.set_verify_callback.overload1 set_verify_callback]``(
- VerifyCallback callback);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_verify_callback.overload1 more...]]``
-
- template<
- typename VerifyCallback>
- void ``[link asio.reference.ssl__context.set_verify_callback.overload2 set_verify_callback]``(
- VerifyCallback callback,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_verify_callback.overload2 more...]]``
-
-
-[section:overload1 ssl::context::set_verify_callback (1 of 2 overloads)]
-
-
-Set the callback used to verify peer certificates.
-
-
- template<
- typename VerifyCallback>
- void set_verify_callback(
- VerifyCallback callback);
-
-
-This function is used to specify a callback function that will be called by the implementation when it needs to verify a peer certificate.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[callback][The function object to be used for verifying a certificate. The function signature of the handler must be:
-``
- bool verify_callback(
- bool preverified, // True if the certificate passed pre-verification.
- verify_context& ctx // The peer certificate and other context.
- );
-``
-The return value of the callback is true if the certificate has passed verification, false otherwise.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_verify`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::set_verify_callback (2 of 2 overloads)]
-
-
-Set the callback used to verify peer certificates.
-
-
- template<
- typename VerifyCallback>
- void set_verify_callback(
- VerifyCallback callback,
- asio::error_code & ec);
-
-
-This function is used to specify a callback function that will be called by the implementation when it needs to verify a peer certificate.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[callback][The function object to be used for verifying a certificate. The function signature of the handler must be:
-``
- bool verify_callback(
- bool preverified, // True if the certificate passed pre-verification.
- verify_context& ctx // The peer certificate and other context.
- );
-``
-The return value of the callback is true if the certificate has passed verification, false otherwise.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_verify`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_verify_depth ssl::context::set_verify_depth]
-
-[indexterm2 asio.indexterm.ssl__context.set_verify_depth..set_verify_depth..ssl::context]
-Set the peer verification depth.
-
-
- void ``[link asio.reference.ssl__context.set_verify_depth.overload1 set_verify_depth]``(
- int depth);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_verify_depth.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.set_verify_depth.overload2 set_verify_depth]``(
- int depth,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_verify_depth.overload2 more...]]``
-
-
-[section:overload1 ssl::context::set_verify_depth (1 of 2 overloads)]
-
-
-Set the peer verification depth.
-
-
- void set_verify_depth(
- int depth);
-
-
-This function may be used to configure the maximum verification depth allowed by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[depth][Maximum depth for the certificate chain verification that shall be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_verify_depth`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::set_verify_depth (2 of 2 overloads)]
-
-
-Set the peer verification depth.
-
-
- void set_verify_depth(
- int depth,
- asio::error_code & ec);
-
-
-This function may be used to configure the maximum verification depth allowed by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[depth][Maximum depth for the certificate chain verification that shall be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_verify_depth`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_verify_mode ssl::context::set_verify_mode]
-
-[indexterm2 asio.indexterm.ssl__context.set_verify_mode..set_verify_mode..ssl::context]
-Set the peer verification mode.
-
-
- void ``[link asio.reference.ssl__context.set_verify_mode.overload1 set_verify_mode]``(
- verify_mode v);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_verify_mode.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.set_verify_mode.overload2 set_verify_mode]``(
- verify_mode v,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.set_verify_mode.overload2 more...]]``
-
-
-[section:overload1 ssl::context::set_verify_mode (1 of 2 overloads)]
-
-
-Set the peer verification mode.
-
-
- void set_verify_mode(
- verify_mode v);
-
-
-This function may be used to configure the peer verification mode used by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[v][A bitmask of peer verification modes. See [link asio.reference.ssl__verify_mode `ssl::verify_mode`] for available values.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_verify`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::set_verify_mode (2 of 2 overloads)]
-
-
-Set the peer verification mode.
-
-
- void set_verify_mode(
- verify_mode v,
- asio::error_code & ec);
-
-
-This function may be used to configure the peer verification mode used by the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[v][A bitmask of peer verification modes. See [link asio.reference.ssl__verify_mode `ssl::verify_mode`] for available values.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_verify`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:single_dh_use ssl::context::single_dh_use]
-
-[indexterm2 asio.indexterm.ssl__context.single_dh_use..single_dh_use..ssl::context]
-Always create a new key when using tmp\_dh parameters.
-
-
- static const long single_dh_use = implementation_defined;
-
-
-
-[endsect]
-
-
-[section:use_certificate ssl::context::use_certificate]
-
-[indexterm2 asio.indexterm.ssl__context.use_certificate..use_certificate..ssl::context]
-Use a certificate from a memory buffer.
-
-
- void ``[link asio.reference.ssl__context.use_certificate.overload1 use_certificate]``(
- const const_buffer & certificate,
- file_format format);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_certificate.overload2 use_certificate]``(
- const const_buffer & certificate,
- file_format format,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_certificate (1 of 2 overloads)]
-
-
-Use a certificate from a memory buffer.
-
-
- void use_certificate(
- const const_buffer & certificate,
- file_format format);
-
-
-This function is used to load a certificate into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[certificate][The buffer containing the certificate.]]
-
-[[format][The certificate format (ASN.1 or PEM).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate` or SSL\_CTX\_use\_certificate\_ASN1.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_certificate (2 of 2 overloads)]
-
-
-Use a certificate from a memory buffer.
-
-
- void use_certificate(
- const const_buffer & certificate,
- file_format format,
- asio::error_code & ec);
-
-
-This function is used to load a certificate into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[certificate][The buffer containing the certificate.]]
-
-[[format][The certificate format (ASN.1 or PEM).]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate` or SSL\_CTX\_use\_certificate\_ASN1.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_certificate_chain ssl::context::use_certificate_chain]
-
-[indexterm2 asio.indexterm.ssl__context.use_certificate_chain..use_certificate_chain..ssl::context]
-Use a certificate chain from a memory buffer.
-
-
- void ``[link asio.reference.ssl__context.use_certificate_chain.overload1 use_certificate_chain]``(
- const const_buffer & chain);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_certificate_chain.overload2 use_certificate_chain]``(
- const const_buffer & chain,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_certificate_chain (1 of 2 overloads)]
-
-
-Use a certificate chain from a memory buffer.
-
-
- void use_certificate_chain(
- const const_buffer & chain);
-
-
-This function is used to load a certificate chain into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[chain][The buffer containing the certificate chain. The certificate chain must use the PEM format.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate` and SSL\_CTX\_add\_extra\_chain\_cert.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_certificate_chain (2 of 2 overloads)]
-
-
-Use a certificate chain from a memory buffer.
-
-
- void use_certificate_chain(
- const const_buffer & chain,
- asio::error_code & ec);
-
-
-This function is used to load a certificate chain into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[chain][The buffer containing the certificate chain. The certificate chain must use the PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate` and SSL\_CTX\_add\_extra\_chain\_cert.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_certificate_chain_file ssl::context::use_certificate_chain_file]
-
-[indexterm2 asio.indexterm.ssl__context.use_certificate_chain_file..use_certificate_chain_file..ssl::context]
-Use a certificate chain from a file.
-
-
- void ``[link asio.reference.ssl__context.use_certificate_chain_file.overload1 use_certificate_chain_file]``(
- const std::string & filename);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain_file.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_certificate_chain_file.overload2 use_certificate_chain_file]``(
- const std::string & filename,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_chain_file.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_certificate_chain_file (1 of 2 overloads)]
-
-
-Use a certificate chain from a file.
-
-
- void use_certificate_chain_file(
- const std::string & filename);
-
-
-This function is used to load a certificate chain into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the certificate. The file must use the PEM format.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate_chain_file`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_certificate_chain_file (2 of 2 overloads)]
-
-
-Use a certificate chain from a file.
-
-
- void use_certificate_chain_file(
- const std::string & filename,
- asio::error_code & ec);
-
-
-This function is used to load a certificate chain into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the certificate. The file must use the PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate_chain_file`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_certificate_file ssl::context::use_certificate_file]
-
-[indexterm2 asio.indexterm.ssl__context.use_certificate_file..use_certificate_file..ssl::context]
-Use a certificate from a file.
-
-
- void ``[link asio.reference.ssl__context.use_certificate_file.overload1 use_certificate_file]``(
- const std::string & filename,
- file_format format);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_file.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_certificate_file.overload2 use_certificate_file]``(
- const std::string & filename,
- file_format format,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_certificate_file.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_certificate_file (1 of 2 overloads)]
-
-
-Use a certificate from a file.
-
-
- void use_certificate_file(
- const std::string & filename,
- file_format format);
-
-
-This function is used to load a certificate into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the certificate.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate_file`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_certificate_file (2 of 2 overloads)]
-
-
-Use a certificate from a file.
-
-
- void use_certificate_file(
- const std::string & filename,
- file_format format,
- asio::error_code & ec);
-
-
-This function is used to load a certificate into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the certificate.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_certificate_file`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_private_key ssl::context::use_private_key]
-
-[indexterm2 asio.indexterm.ssl__context.use_private_key..use_private_key..ssl::context]
-Use a private key from a memory buffer.
-
-
- void ``[link asio.reference.ssl__context.use_private_key.overload1 use_private_key]``(
- const const_buffer & private_key,
- file_format format);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_private_key.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_private_key.overload2 use_private_key]``(
- const const_buffer & private_key,
- file_format format,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_private_key.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_private_key (1 of 2 overloads)]
-
-
-Use a private key from a memory buffer.
-
-
- void use_private_key(
- const const_buffer & private_key,
- file_format format);
-
-
-This function is used to load a private key into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[private_key][The buffer containing the private key.]]
-
-[[format][The private key format (ASN.1 or PEM).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_PrivateKey` or SSL\_CTX\_use\_PrivateKey\_ASN1.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_private_key (2 of 2 overloads)]
-
-
-Use a private key from a memory buffer.
-
-
- void use_private_key(
- const const_buffer & private_key,
- file_format format,
- asio::error_code & ec);
-
-
-This function is used to load a private key into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[private_key][The buffer containing the private key.]]
-
-[[format][The private key format (ASN.1 or PEM).]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_PrivateKey` or SSL\_CTX\_use\_PrivateKey\_ASN1.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_private_key_file ssl::context::use_private_key_file]
-
-[indexterm2 asio.indexterm.ssl__context.use_private_key_file..use_private_key_file..ssl::context]
-Use a private key from a file.
-
-
- void ``[link asio.reference.ssl__context.use_private_key_file.overload1 use_private_key_file]``(
- const std::string & filename,
- file_format format);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_private_key_file.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_private_key_file.overload2 use_private_key_file]``(
- const std::string & filename,
- file_format format,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_private_key_file.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_private_key_file (1 of 2 overloads)]
-
-
-Use a private key from a file.
-
-
- void use_private_key_file(
- const std::string & filename,
- file_format format);
-
-
-This function is used to load a private key into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the private key.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_PrivateKey_file`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_private_key_file (2 of 2 overloads)]
-
-
-Use a private key from a file.
-
-
- void use_private_key_file(
- const std::string & filename,
- file_format format,
- asio::error_code & ec);
-
-
-This function is used to load a private key into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the private key.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_PrivateKey_file`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_rsa_private_key ssl::context::use_rsa_private_key]
-
-[indexterm2 asio.indexterm.ssl__context.use_rsa_private_key..use_rsa_private_key..ssl::context]
-Use an RSA private key from a memory buffer.
-
-
- void ``[link asio.reference.ssl__context.use_rsa_private_key.overload1 use_rsa_private_key]``(
- const const_buffer & private_key,
- file_format format);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_rsa_private_key.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_rsa_private_key.overload2 use_rsa_private_key]``(
- const const_buffer & private_key,
- file_format format,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_rsa_private_key.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_rsa_private_key (1 of 2 overloads)]
-
-
-Use an RSA private key from a memory buffer.
-
-
- void use_rsa_private_key(
- const const_buffer & private_key,
- file_format format);
-
-
-This function is used to load an RSA private key into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[private_key][The buffer containing the RSA private key.]]
-
-[[format][The private key format (ASN.1 or PEM).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_RSAPrivateKey` or SSL\_CTX\_use\_RSAPrivateKey\_ASN1.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_rsa_private_key (2 of 2 overloads)]
-
-
-Use an RSA private key from a memory buffer.
-
-
- void use_rsa_private_key(
- const const_buffer & private_key,
- file_format format,
- asio::error_code & ec);
-
-
-This function is used to load an RSA private key into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[private_key][The buffer containing the RSA private key.]]
-
-[[format][The private key format (ASN.1 or PEM).]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_RSAPrivateKey` or SSL\_CTX\_use\_RSAPrivateKey\_ASN1.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_rsa_private_key_file ssl::context::use_rsa_private_key_file]
-
-[indexterm2 asio.indexterm.ssl__context.use_rsa_private_key_file..use_rsa_private_key_file..ssl::context]
-Use an RSA private key from a file.
-
-
- void ``[link asio.reference.ssl__context.use_rsa_private_key_file.overload1 use_rsa_private_key_file]``(
- const std::string & filename,
- file_format format);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_rsa_private_key_file.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_rsa_private_key_file.overload2 use_rsa_private_key_file]``(
- const std::string & filename,
- file_format format,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_rsa_private_key_file.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_rsa_private_key_file (1 of 2 overloads)]
-
-
-Use an RSA private key from a file.
-
-
- void use_rsa_private_key_file(
- const std::string & filename,
- file_format format);
-
-
-This function is used to load an RSA private key into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the RSA private key.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_RSAPrivateKey_file`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_rsa_private_key_file (2 of 2 overloads)]
-
-
-Use an RSA private key from a file.
-
-
- void use_rsa_private_key_file(
- const std::string & filename,
- file_format format,
- asio::error_code & ec);
-
-
-This function is used to load an RSA private key into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the RSA private key.]]
-
-[[format][The file format (ASN.1 or PEM).]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_use_RSAPrivateKey_file`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_tmp_dh ssl::context::use_tmp_dh]
-
-[indexterm2 asio.indexterm.ssl__context.use_tmp_dh..use_tmp_dh..ssl::context]
-Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters.
-
-
- void ``[link asio.reference.ssl__context.use_tmp_dh.overload1 use_tmp_dh]``(
- const const_buffer & dh);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_tmp_dh.overload2 use_tmp_dh]``(
- const const_buffer & dh,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_tmp_dh (1 of 2 overloads)]
-
-
-Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters.
-
-
- void use_tmp_dh(
- const const_buffer & dh);
-
-
-This function is used to load Diffie-Hellman parameters into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[dh][The memory buffer containing the Diffie-Hellman parameters. The buffer must use the PEM format.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_tmp_dh`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_tmp_dh (2 of 2 overloads)]
-
-
-Use the specified memory buffer to obtain the temporary Diffie-Hellman parameters.
-
-
- void use_tmp_dh(
- const const_buffer & dh,
- asio::error_code & ec);
-
-
-This function is used to load Diffie-Hellman parameters into the context from a buffer.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[dh][The memory buffer containing the Diffie-Hellman parameters. The buffer must use the PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_tmp_dh`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_tmp_dh_file ssl::context::use_tmp_dh_file]
-
-[indexterm2 asio.indexterm.ssl__context.use_tmp_dh_file..use_tmp_dh_file..ssl::context]
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
-
-
- void ``[link asio.reference.ssl__context.use_tmp_dh_file.overload1 use_tmp_dh_file]``(
- const std::string & filename);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh_file.overload1 more...]]``
-
- void ``[link asio.reference.ssl__context.use_tmp_dh_file.overload2 use_tmp_dh_file]``(
- const std::string & filename,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__context.use_tmp_dh_file.overload2 more...]]``
-
-
-[section:overload1 ssl::context::use_tmp_dh_file (1 of 2 overloads)]
-
-
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
-
-
- void use_tmp_dh_file(
- const std::string & filename);
-
-
-This function is used to load Diffie-Hellman parameters into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_tmp_dh`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::context::use_tmp_dh_file (2 of 2 overloads)]
-
-
-Use the specified file to obtain the temporary Diffie-Hellman parameters.
-
-
- void use_tmp_dh_file(
- const std::string & filename,
- asio::error_code & ec);
-
-
-This function is used to load Diffie-Hellman parameters into the context from a file.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[filename][The name of the file containing the Diffie-Hellman parameters. The file must use the PEM format.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_CTX_set_tmp_dh`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_context ssl::context::~context]
-
-[indexterm2 asio.indexterm.ssl__context._context..~context..ssl::context]
-Destructor.
-
-
- ~context();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ssl__context_base ssl::context_base]
-
-
-The [link asio.reference.ssl__context_base `ssl::context_base`] class is used as a base for the basic\_context class template so that we have a common place to define various enums.
-
-
- class context_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ssl__context_base.file_format [*file_format]]]
- [File format types. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context_base.method [*method]]]
- [Different methods supported by a context. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context_base.options [*options]]]
- [Bitmask type for SSL options. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__context_base.password_purpose [*password_purpose]]]
- [Purpose of PEM password. ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__context_base._context_base [*~context_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__context_base.default_workarounds [*default_workarounds]]]
- [Implement various bug workarounds. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.no_compression [*no_compression]]]
- [Disable compression. Compression is disabled by default. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.no_sslv2 [*no_sslv2]]]
- [Disable SSL v2. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.no_sslv3 [*no_sslv3]]]
- [Disable SSL v3. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.no_tlsv1 [*no_tlsv1]]]
- [Disable TLS v1. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.no_tlsv1_1 [*no_tlsv1_1]]]
- [Disable TLS v1.1. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.no_tlsv1_2 [*no_tlsv1_2]]]
- [Disable TLS v1.2. ]
- ]
-
- [
- [[link asio.reference.ssl__context_base.single_dh_use [*single_dh_use]]]
- [Always create a new key when using tmp_dh parameters. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/context_base.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[section:default_workarounds ssl::context_base::default_workarounds]
-
-[indexterm2 asio.indexterm.ssl__context_base.default_workarounds..default_workarounds..ssl::context_base]
-Implement various bug workarounds.
-
-
- static const long default_workarounds = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:file_format ssl::context_base::file_format]
-
-[indexterm2 asio.indexterm.ssl__context_base.file_format..file_format..ssl::context_base]
-File format types.
-
-
- enum file_format
-
-[indexterm2 asio.indexterm.ssl__context_base.file_format.asn1..asn1..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.file_format.pem..pem..ssl::context_base]
-
-[heading Values]
-[variablelist
-
- [
- [asn1]
- [ASN.1 file. ]
- ]
-
- [
- [pem]
- [PEM file. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:method ssl::context_base::method]
-
-[indexterm2 asio.indexterm.ssl__context_base.method..method..ssl::context_base]
-Different methods supported by a context.
-
-
- enum method
-
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv2..sslv2..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv2_client..sslv2_client..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv2_server..sslv2_server..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv3..sslv3..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv3_client..sslv3_client..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv3_server..sslv3_server..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv1..tlsv1..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv1_client..tlsv1_client..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv1_server..tlsv1_server..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv23..sslv23..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv23_client..sslv23_client..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.sslv23_server..sslv23_server..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv11..tlsv11..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv11_client..tlsv11_client..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv11_server..tlsv11_server..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv12..tlsv12..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv12_client..tlsv12_client..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.method.tlsv12_server..tlsv12_server..ssl::context_base]
-
-[heading Values]
-[variablelist
-
- [
- [sslv2]
- [Generic SSL version 2. ]
- ]
-
- [
- [sslv2_client]
- [SSL version 2 client. ]
- ]
-
- [
- [sslv2_server]
- [SSL version 2 server. ]
- ]
-
- [
- [sslv3]
- [Generic SSL version 3. ]
- ]
-
- [
- [sslv3_client]
- [SSL version 3 client. ]
- ]
-
- [
- [sslv3_server]
- [SSL version 3 server. ]
- ]
-
- [
- [tlsv1]
- [Generic TLS version 1. ]
- ]
-
- [
- [tlsv1_client]
- [TLS version 1 client. ]
- ]
-
- [
- [tlsv1_server]
- [TLS version 1 server. ]
- ]
-
- [
- [sslv23]
- [Generic SSL/TLS. ]
- ]
-
- [
- [sslv23_client]
- [SSL/TLS client. ]
- ]
-
- [
- [sslv23_server]
- [SSL/TLS server. ]
- ]
-
- [
- [tlsv11]
- [Generic TLS version 1.1. ]
- ]
-
- [
- [tlsv11_client]
- [TLS version 1.1 client. ]
- ]
-
- [
- [tlsv11_server]
- [TLS version 1.1 server. ]
- ]
-
- [
- [tlsv12]
- [Generic TLS version 1.2. ]
- ]
-
- [
- [tlsv12_client]
- [TLS version 1.2 client. ]
- ]
-
- [
- [tlsv12_server]
- [TLS version 1.2 server. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:no_compression ssl::context_base::no_compression]
-
-[indexterm2 asio.indexterm.ssl__context_base.no_compression..no_compression..ssl::context_base]
-Disable compression. Compression is disabled by default.
-
-
- static const long no_compression = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_sslv2 ssl::context_base::no_sslv2]
-
-[indexterm2 asio.indexterm.ssl__context_base.no_sslv2..no_sslv2..ssl::context_base]
-Disable SSL v2.
-
-
- static const long no_sslv2 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_sslv3 ssl::context_base::no_sslv3]
-
-[indexterm2 asio.indexterm.ssl__context_base.no_sslv3..no_sslv3..ssl::context_base]
-Disable SSL v3.
-
-
- static const long no_sslv3 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_tlsv1 ssl::context_base::no_tlsv1]
-
-[indexterm2 asio.indexterm.ssl__context_base.no_tlsv1..no_tlsv1..ssl::context_base]
-Disable TLS v1.
-
-
- static const long no_tlsv1 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_tlsv1_1 ssl::context_base::no_tlsv1_1]
-
-[indexterm2 asio.indexterm.ssl__context_base.no_tlsv1_1..no_tlsv1_1..ssl::context_base]
-Disable TLS v1.1.
-
-
- static const long no_tlsv1_1 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:no_tlsv1_2 ssl::context_base::no_tlsv1_2]
-
-[indexterm2 asio.indexterm.ssl__context_base.no_tlsv1_2..no_tlsv1_2..ssl::context_base]
-Disable TLS v1.2.
-
-
- static const long no_tlsv1_2 = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:options ssl::context_base::options]
-
-[indexterm2 asio.indexterm.ssl__context_base.options..options..ssl::context_base]
-Bitmask type for SSL options.
-
-
- typedef long options;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/context_base.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:password_purpose ssl::context_base::password_purpose]
-
-[indexterm2 asio.indexterm.ssl__context_base.password_purpose..password_purpose..ssl::context_base]
-Purpose of PEM password.
-
-
- enum password_purpose
-
-[indexterm2 asio.indexterm.ssl__context_base.password_purpose.for_reading..for_reading..ssl::context_base]
-[indexterm2 asio.indexterm.ssl__context_base.password_purpose.for_writing..for_writing..ssl::context_base]
-
-[heading Values]
-[variablelist
-
- [
- [for_reading]
- [The password is needed for reading/decryption. ]
- ]
-
- [
- [for_writing]
- [The password is needed for writing/encryption. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:single_dh_use ssl::context_base::single_dh_use]
-
-[indexterm2 asio.indexterm.ssl__context_base.single_dh_use..single_dh_use..ssl::context_base]
-Always create a new key when using tmp\_dh parameters.
-
-
- static const long single_dh_use = implementation_defined;
-
-
-
-[endsect]
-
-
-
-[section:_context_base ssl::context_base::~context_base]
-
-[indexterm2 asio.indexterm.ssl__context_base._context_base..~context_base..ssl::context_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~context_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ssl__error__get_stream_category ssl::error::get_stream_category]
-
-[indexterm1 asio.indexterm.ssl__error__get_stream_category..ssl::error::get_stream_category]
-
- const asio::error_category & get_stream_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:ssl__error__make_error_code ssl::error::make_error_code]
-
-[indexterm1 asio.indexterm.ssl__error__make_error_code..ssl::error::make_error_code]
-
- asio::error_code make_error_code(
- stream_errors e);
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:ssl__error__stream_category ssl::error::stream_category]
-
-[indexterm1 asio.indexterm.ssl__error__stream_category..ssl::error::stream_category]
-
- static const asio::error_category & stream_category = asio::ssl::error::get_stream_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:ssl__error__stream_errors ssl::error::stream_errors]
-
-[indexterm1 asio.indexterm.ssl__error__stream_errors..ssl::error::stream_errors]
-
- enum stream_errors
-
-[indexterm2 asio.indexterm.ssl__error__stream_errors.stream_truncated..stream_truncated..ssl::error::stream_errors]
-
-[heading Values]
-[variablelist
-
- [
- [stream_truncated]
- [The underlying stream closed before the ssl stream gracefully shut down. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/error.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-[section:ssl__rfc2818_verification ssl::rfc2818_verification]
-
-
-Verifies a certificate against a hostname according to the rules described in RFC 2818.
-
-
- class rfc2818_verification
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ssl__rfc2818_verification.result_type [*result_type]]]
- [The type of the function object's result. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__rfc2818_verification.operator_lp__rp_ [*operator()]]]
- [Perform certificate verification. ]
- ]
-
- [
- [[link asio.reference.ssl__rfc2818_verification.rfc2818_verification [*rfc2818_verification]]]
- [Constructor. ]
- ]
-
-]
-
-
-[heading Example]
-
-The following example shows how to synchronously open a secure connection to a given host name:
-
- using asio::ip::tcp;
- namespace ssl = asio::ssl;
- typedef ssl::stream<tcp::socket> ssl_socket;
-
- // Create a context that uses the default paths for finding CA certificates.
- ssl::context ctx(ssl::context::sslv23);
- ctx.set_default_verify_paths();
-
- // Open a socket and connect it to the remote host.
- asio::io_context io_context;
- ssl_socket sock(io_context, ctx);
- tcp::resolver resolver(io_context);
- tcp::resolver::query query("host.name", "https");
- asio::connect(sock.lowest_layer(), resolver.resolve(query));
- sock.lowest_layer().set_option(tcp::no_delay(true));
-
- // Perform SSL handshake and verify the remote host's certificate.
- sock.set_verify_mode(ssl::verify_peer);
- sock.set_verify_callback(ssl::rfc2818_verification("host.name"));
- sock.handshake(ssl_socket::client);
-
- // ... read and write as normal ...
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/rfc2818_verification.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[section:operator_lp__rp_ ssl::rfc2818_verification::operator()]
-
-[indexterm2 asio.indexterm.ssl__rfc2818_verification.operator_lp__rp_..operator()..ssl::rfc2818_verification]
-Perform certificate verification.
-
-
- bool operator()(
- bool preverified,
- verify_context & ctx) const;
-
-
-
-[endsect]
-
-
-
-[section:result_type ssl::rfc2818_verification::result_type]
-
-[indexterm2 asio.indexterm.ssl__rfc2818_verification.result_type..result_type..ssl::rfc2818_verification]
-The type of the function object's result.
-
-
- typedef bool result_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/rfc2818_verification.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:rfc2818_verification ssl::rfc2818_verification::rfc2818_verification]
-
-[indexterm2 asio.indexterm.ssl__rfc2818_verification.rfc2818_verification..rfc2818_verification..ssl::rfc2818_verification]
-Constructor.
-
-
- rfc2818_verification(
- const std::string & host);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ssl__stream ssl::stream]
-
-
-Provides stream-oriented functionality using SSL.
-
-
- template<
- typename Stream>
- class stream :
- public ssl::stream_base,
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ssl__stream__impl_struct [*impl_struct]]]
- [Structure for use with deprecated impl_type. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__stream.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__stream.handshake_type [*handshake_type]]]
- [Different handshake types. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__stream.lowest_layer_type [*lowest_layer_type]]]
- [The type of the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__stream.native_handle_type [*native_handle_type]]]
- [The native handle type of the SSL stream. ]
-
- ]
-
- [
-
- [[link asio.reference.ssl__stream.next_layer_type [*next_layer_type]]]
- [The type of the next layer. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__stream.async_handshake [*async_handshake]]]
- [Start an asynchronous SSL handshake. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.async_shutdown [*async_shutdown]]]
- [Asynchronously shut down SSL on the stream. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.handshake [*handshake]]]
- [Perform SSL handshaking. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.native_handle [*native_handle]]]
- [Get the underlying implementation in the native type. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.next_layer [*next_layer]]]
- [Get a reference to the next layer. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.read_some [*read_some]]]
- [Read some data from the stream. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.set_verify_callback [*set_verify_callback]]]
- [Set the callback used to verify peer certificates. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.set_verify_depth [*set_verify_depth]]]
- [Set the peer verification depth. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.set_verify_mode [*set_verify_mode]]]
- [Set the peer verification mode. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.shutdown [*shutdown]]]
- [Shut down SSL on the stream. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.stream [*stream]]]
- [Construct a stream. ]
- ]
-
- [
- [[link asio.reference.ssl__stream.write_some [*write_some]]]
- [Write some data to the stream. ]
- ]
-
- [
- [[link asio.reference.ssl__stream._stream [*~stream]]]
- [Destructor. ]
- ]
-
-]
-
-The stream class template provides asynchronous and blocking stream-oriented functionality using SSL.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe. The application must also ensure that all asynchronous operations are performed within the same implicit or explicit strand.
-
-
-[heading Example]
-
-To use the SSL stream template with an `ip::tcp::socket`, you would write:
-
- asio::io_context io_context;
- asio::ssl::context ctx(asio::ssl::context::sslv23);
- asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
-
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-[section:async_handshake ssl::stream::async_handshake]
-
-[indexterm2 asio.indexterm.ssl__stream.async_handshake..async_handshake..ssl::stream]
-Start an asynchronous SSL handshake.
-
-
- template<
- typename ``[link asio.reference.HandshakeHandler HandshakeHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ssl__stream.async_handshake.overload1 async_handshake]``(
- handshake_type type,
- HandshakeHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.async_handshake.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.BufferedHandshakeHandler BufferedHandshakeHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.ssl__stream.async_handshake.overload2 async_handshake]``(
- handshake_type type,
- const ConstBufferSequence & buffers,
- BufferedHandshakeHandler && handler);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.async_handshake.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::async_handshake (1 of 2 overloads)]
-
-
-Start an asynchronous SSL handshake.
-
-
- template<
- typename ``[link asio.reference.HandshakeHandler HandshakeHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_handshake(
- handshake_type type,
- HandshakeHandler && handler);
-
-
-This function is used to asynchronously perform an SSL handshake on the stream. This function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::async_handshake (2 of 2 overloads)]
-
-
-Start an asynchronous SSL handshake.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.BufferedHandshakeHandler BufferedHandshakeHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_handshake(
- handshake_type type,
- const ConstBufferSequence & buffers,
- BufferedHandshakeHandler && handler);
-
-
-This function is used to asynchronously perform an SSL handshake on the stream. This function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-[[buffers][The buffered data to be reused for the handshake. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Amount of buffers used in handshake.
- );
-``
-]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some ssl::stream::async_read_some]
-
-[indexterm2 asio.indexterm.ssl__stream.async_read_some..async_read_some..ssl::stream]
-Start an asynchronous read.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read one or more bytes of data from the stream. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][The buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
-``
-]]
-
-]
-
-
-[heading Remarks]
-
-The async\_read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-
-
-[endsect]
-
-
-
-[section:async_shutdown ssl::stream::async_shutdown]
-
-[indexterm2 asio.indexterm.ssl__stream.async_shutdown..async_shutdown..ssl::stream]
-Asynchronously shut down SSL on the stream.
-
-
- template<
- typename ``[link asio.reference.ShutdownHandler ShutdownHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_shutdown(
- ShutdownHandler && handler);
-
-
-This function is used to asynchronously shut down SSL on the stream. This function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called when the handshake operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some ssl::stream::async_write_some]
-
-[indexterm2 asio.indexterm.ssl__stream.async_write_some..async_write_some..ssl::stream]
-Start an asynchronous write.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write one or more bytes of data to the stream. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][The data to be written to the stream. Although the buffers object may be copied as necessary, ownership of the underlying buffers is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The equivalent function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-``
-]]
-
-]
-
-
-[heading Remarks]
-
-The async\_write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-
-[section:executor_type ssl::stream::executor_type]
-
-[indexterm2 asio.indexterm.ssl__stream.executor_type..executor_type..ssl::stream]
-The type of the executor associated with the object.
-
-
- typedef lowest_layer_type::executor_type executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor ssl::stream::get_executor]
-
-[indexterm2 asio.indexterm.ssl__stream.get_executor..get_executor..ssl::stream]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-This function may be used to obtain the executor object that the stream uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A copy of the executor that stream will use to dispatch handlers.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_context ssl::stream::get_io_context]
-
-[indexterm2 asio.indexterm.ssl__stream.get_io_context..get_io_context..ssl::stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-
-[endsect]
-
-
-
-[section:get_io_service ssl::stream::get_io_service]
-
-[indexterm2 asio.indexterm.ssl__stream.get_io_service..get_io_service..ssl::stream]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-
-[endsect]
-
-
-[section:handshake ssl::stream::handshake]
-
-[indexterm2 asio.indexterm.ssl__stream.handshake..handshake..ssl::stream]
-Perform SSL handshaking.
-
-
- void ``[link asio.reference.ssl__stream.handshake.overload1 handshake]``(
- handshake_type type);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.handshake.overload1 more...]]``
-
- void ``[link asio.reference.ssl__stream.handshake.overload2 handshake]``(
- handshake_type type,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.handshake.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- void ``[link asio.reference.ssl__stream.handshake.overload3 handshake]``(
- handshake_type type,
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.handshake.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- void ``[link asio.reference.ssl__stream.handshake.overload4 handshake]``(
- handshake_type type,
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.handshake.overload4 more...]]``
-
-
-[section:overload1 ssl::stream::handshake (1 of 4 overloads)]
-
-
-Perform SSL handshaking.
-
-
- void handshake(
- handshake_type type);
-
-
-This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::handshake (2 of 4 overloads)]
-
-
-Perform SSL handshaking.
-
-
- void handshake(
- handshake_type type,
- asio::error_code & ec);
-
-
-This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 ssl::stream::handshake (3 of 4 overloads)]
-
-
-Perform SSL handshaking.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- void handshake(
- handshake_type type,
- const ConstBufferSequence & buffers);
-
-
-This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-[[buffers][The buffered data to be reused for the handshake.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 ssl::stream::handshake (4 of 4 overloads)]
-
-
-Perform SSL handshaking.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- void handshake(
- handshake_type type,
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[type][The type of handshaking to be performed, i.e. as a client or as a server.]]
-
-[[buffers][The buffered data to be reused for the handshake.]]
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:handshake_type ssl::stream::handshake_type]
-
-[indexterm2 asio.indexterm.ssl__stream.handshake_type..handshake_type..ssl::stream]
-Different handshake types.
-
-
- enum handshake_type
-
-[indexterm2 asio.indexterm.ssl__stream.handshake_type.client..client..ssl::stream]
-[indexterm2 asio.indexterm.ssl__stream.handshake_type.server..server..ssl::stream]
-
-[heading Values]
-[variablelist
-
- [
- [client]
- [Perform handshaking as a client. ]
- ]
-
- [
- [server]
- [Perform handshaking as a server. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-[section:lowest_layer ssl::stream::lowest_layer]
-
-[indexterm2 asio.indexterm.ssl__stream.lowest_layer..lowest_layer..ssl::stream]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.ssl__stream.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.ssl__stream.lowest_layer.overload1 more...]]``
-
- const lowest_layer_type & ``[link asio.reference.ssl__stream.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.ssl__stream.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of stream layers.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of stream layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::lowest_layer (2 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a reference to the lowest layer in a stack of stream layers.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of stream layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type ssl::stream::lowest_layer_type]
-
-[indexterm2 asio.indexterm.ssl__stream.lowest_layer_type..lowest_layer_type..ssl::stream]
-The type of the lowest layer.
-
-
- typedef next_layer_type::lowest_layer_type lowest_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle ssl::stream::native_handle]
-
-[indexterm2 asio.indexterm.ssl__stream.native_handle..native_handle..ssl::stream]
-Get the underlying implementation in the native type.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.
-
-
-[heading Example]
-
-The `native_handle()` function returns a pointer of type `SSL*` that is suitable for passing to functions such as `SSL_get_verify_result` and `SSL_get_peer_certificate:`
-
- asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
-
- // ... establish connection and perform handshake ...
-
- if (X509* cert = SSL_get_peer_certificate(sock.native_handle()))
- {
- if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
- {
- // ...
- }
- }
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:native_handle_type ssl::stream::native_handle_type]
-
-[indexterm2 asio.indexterm.ssl__stream.native_handle_type..native_handle_type..ssl::stream]
-The native handle type of the SSL stream.
-
-
- typedef SSL * native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-[section:next_layer ssl::stream::next_layer]
-
-[indexterm2 asio.indexterm.ssl__stream.next_layer..next_layer..ssl::stream]
-Get a reference to the next layer.
-
-
- const next_layer_type & ``[link asio.reference.ssl__stream.next_layer.overload1 next_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.ssl__stream.next_layer.overload1 more...]]``
-
- next_layer_type & ``[link asio.reference.ssl__stream.next_layer.overload2 next_layer]``();
- `` [''''&raquo;''' [link asio.reference.ssl__stream.next_layer.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::next_layer (1 of 2 overloads)]
-
-
-Get a reference to the next layer.
-
-
- const next_layer_type & next_layer() const;
-
-
-This function returns a reference to the next layer in a stack of stream layers.
-
-
-[heading Return Value]
-
-A reference to the next layer in the stack of stream layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::next_layer (2 of 2 overloads)]
-
-
-Get a reference to the next layer.
-
-
- next_layer_type & next_layer();
-
-
-This function returns a reference to the next layer in a stack of stream layers.
-
-
-[heading Return Value]
-
-A reference to the next layer in the stack of stream layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:next_layer_type ssl::stream::next_layer_type]
-
-[indexterm2 asio.indexterm.ssl__stream.next_layer_type..next_layer_type..ssl::stream]
-The type of the next layer.
-
-
- typedef remove_reference< Stream >::type next_layer_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-[section:read_some ssl::stream::read_some]
-
-[indexterm2 asio.indexterm.ssl__stream.read_some..read_some..ssl::stream]
-Read some data from the stream.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.ssl__stream.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.read_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.ssl__stream.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.read_some.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::read_some (1 of 2 overloads)]
-
-
-Read some data from the stream.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][The buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::read_some (2 of 2 overloads)]
-
-
-Read some data from the stream.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read data from the stream. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][The buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_verify_callback ssl::stream::set_verify_callback]
-
-[indexterm2 asio.indexterm.ssl__stream.set_verify_callback..set_verify_callback..ssl::stream]
-Set the callback used to verify peer certificates.
-
-
- template<
- typename VerifyCallback>
- void ``[link asio.reference.ssl__stream.set_verify_callback.overload1 set_verify_callback]``(
- VerifyCallback callback);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_callback.overload1 more...]]``
-
- template<
- typename VerifyCallback>
- void ``[link asio.reference.ssl__stream.set_verify_callback.overload2 set_verify_callback]``(
- VerifyCallback callback,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_callback.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::set_verify_callback (1 of 2 overloads)]
-
-
-Set the callback used to verify peer certificates.
-
-
- template<
- typename VerifyCallback>
- void set_verify_callback(
- VerifyCallback callback);
-
-
-This function is used to specify a callback function that will be called by the implementation when it needs to verify a peer certificate.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[callback][The function object to be used for verifying a certificate. The function signature of the handler must be:
-``
- bool verify_callback(
- bool preverified, // True if the certificate passed pre-verification.
- verify_context& ctx // The peer certificate and other context.
- );
-``
-The return value of the callback is true if the certificate has passed verification, false otherwise.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_set_verify`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::set_verify_callback (2 of 2 overloads)]
-
-
-Set the callback used to verify peer certificates.
-
-
- template<
- typename VerifyCallback>
- void set_verify_callback(
- VerifyCallback callback,
- asio::error_code & ec);
-
-
-This function is used to specify a callback function that will be called by the implementation when it needs to verify a peer certificate.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[callback][The function object to be used for verifying a certificate. The function signature of the handler must be:
-``
- bool verify_callback(
- bool preverified, // True if the certificate passed pre-verification.
- verify_context& ctx // The peer certificate and other context.
- );
-``
-The return value of the callback is true if the certificate has passed verification, false otherwise.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_set_verify`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_verify_depth ssl::stream::set_verify_depth]
-
-[indexterm2 asio.indexterm.ssl__stream.set_verify_depth..set_verify_depth..ssl::stream]
-Set the peer verification depth.
-
-
- void ``[link asio.reference.ssl__stream.set_verify_depth.overload1 set_verify_depth]``(
- int depth);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_depth.overload1 more...]]``
-
- void ``[link asio.reference.ssl__stream.set_verify_depth.overload2 set_verify_depth]``(
- int depth,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_depth.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::set_verify_depth (1 of 2 overloads)]
-
-
-Set the peer verification depth.
-
-
- void set_verify_depth(
- int depth);
-
-
-This function may be used to configure the maximum verification depth allowed by the stream.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[depth][Maximum depth for the certificate chain verification that shall be allowed.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_set_verify_depth`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::set_verify_depth (2 of 2 overloads)]
-
-
-Set the peer verification depth.
-
-
- void set_verify_depth(
- int depth,
- asio::error_code & ec);
-
-
-This function may be used to configure the maximum verification depth allowed by the stream.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[depth][Maximum depth for the certificate chain verification that shall be allowed.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_set_verify_depth`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:set_verify_mode ssl::stream::set_verify_mode]
-
-[indexterm2 asio.indexterm.ssl__stream.set_verify_mode..set_verify_mode..ssl::stream]
-Set the peer verification mode.
-
-
- void ``[link asio.reference.ssl__stream.set_verify_mode.overload1 set_verify_mode]``(
- verify_mode v);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_mode.overload1 more...]]``
-
- void ``[link asio.reference.ssl__stream.set_verify_mode.overload2 set_verify_mode]``(
- verify_mode v,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.set_verify_mode.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::set_verify_mode (1 of 2 overloads)]
-
-
-Set the peer verification mode.
-
-
- void set_verify_mode(
- verify_mode v);
-
-
-This function may be used to configure the peer verification mode used by the stream. The new mode will override the mode inherited from the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[v][A bitmask of peer verification modes. See [link asio.reference.ssl__verify_mode `ssl::verify_mode`] for available values.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_set_verify`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::set_verify_mode (2 of 2 overloads)]
-
-
-Set the peer verification mode.
-
-
- void set_verify_mode(
- verify_mode v,
- asio::error_code & ec);
-
-
-This function may be used to configure the peer verification mode used by the stream. The new mode will override the mode inherited from the context.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[v][A bitmask of peer verification modes. See [link asio.reference.ssl__verify_mode `ssl::verify_mode`] for available values.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Remarks]
-
-Calls `SSL_set_verify`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:shutdown ssl::stream::shutdown]
-
-[indexterm2 asio.indexterm.ssl__stream.shutdown..shutdown..ssl::stream]
-Shut down SSL on the stream.
-
-
- void ``[link asio.reference.ssl__stream.shutdown.overload1 shutdown]``();
- `` [''''&raquo;''' [link asio.reference.ssl__stream.shutdown.overload1 more...]]``
-
- void ``[link asio.reference.ssl__stream.shutdown.overload2 shutdown]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.shutdown.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::shutdown (1 of 2 overloads)]
-
-
-Shut down SSL on the stream.
-
-
- void shutdown();
-
-
-This function is used to shut down SSL on the stream. The function call will block until SSL has been shut down or an error occurs.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::shutdown (2 of 2 overloads)]
-
-
-Shut down SSL on the stream.
-
-
- void shutdown(
- asio::error_code & ec);
-
-
-This function is used to shut down SSL on the stream. The function call will block until SSL has been shut down or an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:stream ssl::stream::stream]
-
-[indexterm2 asio.indexterm.ssl__stream.stream..stream..ssl::stream]
-Construct a stream.
-
-
- template<
- typename Arg>
- stream(
- Arg && arg,
- context & ctx);
-
-
-This constructor creates a stream and initialises the underlying stream object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[arg][The argument to be passed to initialise the underlying stream.]]
-
-[[ctx][The SSL context to be used for the stream. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:write_some ssl::stream::write_some]
-
-[indexterm2 asio.indexterm.ssl__stream.write_some..write_some..ssl::stream]
-Write some data to the stream.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.ssl__stream.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.write_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.ssl__stream.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.ssl__stream.write_some.overload2 more...]]``
-
-
-[section:overload1 ssl::stream::write_some (1 of 2 overloads)]
-
-
-Write some data to the stream.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][The data to be written.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 ssl::stream::write_some (2 of 2 overloads)]
-
-
-Write some data to the stream.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write data on the stream. The function call will block until one or more bytes of data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][The data to be written to the stream.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_stream ssl::stream::~stream]
-
-[indexterm2 asio.indexterm.ssl__stream._stream..~stream..ssl::stream]
-Destructor.
-
-
- ~stream();
-
-
-
-[heading Remarks]
-
-A `stream` object must not be destroyed while there are pending asynchronous operations associated with it.
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ssl__stream__impl_struct ssl::stream::impl_struct]
-
-
-Structure for use with deprecated impl\_type.
-
-
- struct impl_struct
-
-
-[heading Data Members]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__stream__impl_struct.ssl [*ssl]]]
- []
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[section:ssl ssl::stream::impl_struct::ssl]
-
-[indexterm2 asio.indexterm.ssl__stream__impl_struct.ssl..ssl..ssl::stream::impl_struct]
-
- SSL * ssl;
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:ssl__stream_base ssl::stream_base]
-
-
-The [link asio.reference.ssl__stream_base `ssl::stream_base`] class is used as a base for the [link asio.reference.ssl__stream `ssl::stream`] class template so that we have a common place to define various enums.
-
-
- class stream_base
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ssl__stream_base.handshake_type [*handshake_type]]]
- [Different handshake types. ]
-
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__stream_base._stream_base [*~stream_base]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/stream_base.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[section:handshake_type ssl::stream_base::handshake_type]
-
-[indexterm2 asio.indexterm.ssl__stream_base.handshake_type..handshake_type..ssl::stream_base]
-Different handshake types.
-
-
- enum handshake_type
-
-[indexterm2 asio.indexterm.ssl__stream_base.handshake_type.client..client..ssl::stream_base]
-[indexterm2 asio.indexterm.ssl__stream_base.handshake_type.server..server..ssl::stream_base]
-
-[heading Values]
-[variablelist
-
- [
- [client]
- [Perform handshaking as a client. ]
- ]
-
- [
- [server]
- [Perform handshaking as a server. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:_stream_base ssl::stream_base::~stream_base]
-
-[indexterm2 asio.indexterm.ssl__stream_base._stream_base..~stream_base..ssl::stream_base]
-Protected destructor to prevent deletion through this type.
-
-
- ~stream_base();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ssl__verify_client_once ssl::verify_client_once]
-
-[indexterm1 asio.indexterm.ssl__verify_client_once..ssl::verify_client_once]
-Do not request client certificate on renegotiation. Ignored unless [link asio.reference.ssl__verify_peer `ssl::verify_peer`] is set.
-
-
- const int verify_client_once = implementation_defined;
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_mode.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-[section:ssl__verify_context ssl::verify_context]
-
-
-A simple wrapper around the X509\_STORE\_CTX type, used during verification of a peer certificate.
-
-
- class verify_context :
- noncopyable
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.ssl__verify_context.native_handle_type [*native_handle_type]]]
- [The native handle type of the verification context. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.ssl__verify_context.native_handle [*native_handle]]]
- [Get the underlying implementation in the native type. ]
- ]
-
- [
- [[link asio.reference.ssl__verify_context.verify_context [*verify_context]]]
- [Constructor. ]
- ]
-
-]
-
-
-[heading Remarks]
-
-The [link asio.reference.ssl__verify_context `ssl::verify_context`] does not own the underlying X509\_STORE\_CTX object.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_context.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[section:native_handle ssl::verify_context::native_handle]
-
-[indexterm2 asio.indexterm.ssl__verify_context.native_handle..native_handle..ssl::verify_context]
-Get the underlying implementation in the native type.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying implementation of the context. This is intended to allow access to context functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type ssl::verify_context::native_handle_type]
-
-[indexterm2 asio.indexterm.ssl__verify_context.native_handle_type..native_handle_type..ssl::verify_context]
-The native handle type of the verification context.
-
-
- typedef X509_STORE_CTX * native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_context.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:verify_context ssl::verify_context::verify_context]
-
-[indexterm2 asio.indexterm.ssl__verify_context.verify_context..verify_context..ssl::verify_context]
-Constructor.
-
-
- verify_context(
- native_handle_type handle);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:ssl__verify_fail_if_no_peer_cert ssl::verify_fail_if_no_peer_cert]
-
-[indexterm1 asio.indexterm.ssl__verify_fail_if_no_peer_cert..ssl::verify_fail_if_no_peer_cert]
-Fail verification if the peer has no certificate. Ignored unless [link asio.reference.ssl__verify_peer `ssl::verify_peer`] is set.
-
-
- const int verify_fail_if_no_peer_cert = implementation_defined;
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_mode.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:ssl__verify_mode ssl::verify_mode]
-
-[indexterm1 asio.indexterm.ssl__verify_mode..ssl::verify_mode]
-Bitmask type for peer verification.
-
-
- typedef int verify_mode;
-
-
-
-Possible values are:
-
-
-* [link asio.reference.ssl__verify_none `ssl::verify_none`]
-
-* [link asio.reference.ssl__verify_peer `ssl::verify_peer`]
-
-* [link asio.reference.ssl__verify_fail_if_no_peer_cert `ssl::verify_fail_if_no_peer_cert`]
-
-* [link asio.reference.ssl__verify_client_once `ssl::verify_client_once`]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_mode.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:ssl__verify_none ssl::verify_none]
-
-[indexterm1 asio.indexterm.ssl__verify_none..ssl::verify_none]
-No verification.
-
-
- const int verify_none = implementation_defined;
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_mode.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:ssl__verify_peer ssl::verify_peer]
-
-[indexterm1 asio.indexterm.ssl__verify_peer..ssl::verify_peer]
-Verify the peer.
-
-
- const int verify_peer = implementation_defined;
-
-
-[heading Requirements]
-
-['Header: ][^asio/ssl/verify_mode.hpp]
-
-['Convenience header: ][^asio/ssl.hpp]
-
-
-[endsect]
-
-
-
-[section:steady_timer steady_timer]
-
-[indexterm1 asio.indexterm.steady_timer..steady_timer]
-Typedef for a timer based on the steady clock.
-
-
- typedef basic_waitable_timer< chrono::steady_clock > steady_timer;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_waitable_timer.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.duration [*duration]]]
- [The duration type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
- [The time point type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.traits_type [*traits_type]]]
- [The wait traits type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_waitable_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.basic_waitable_timer [*basic_waitable_timer]]]
- [Constructor.
-
- Constructor to set a particular expiry time as an absolute time.
-
- Constructor to set a particular expiry time relative to now.
-
- Move-construct a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
- [Cancels one asynchronous operation that is waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_after [*expires_after]]]
- [Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time.
-
- Set the timer's expiry time as an absolute time.
-
- (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expiry [*expiry]]]
- [Get the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.operator_eq_ [*operator=]]]
- [Move-assign a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
- [Destroys the timer. ]
- ]
-
-]
-
-The [link asio.reference.basic_waitable_timer `basic_waitable_timer`] class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
-
-A waitable 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 one of the [link asio.reference.steady_timer `steady_timer`], [link asio.reference.system_timer `system_timer`] or [link asio.reference.high_resolution_timer `high_resolution_timer`] typedefs.
-
-
-[heading Remarks]
-
-This waitable timer functionality is for use with the C++11 standard library's `<chrono>` facility, or with the Boost.Chrono library.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Examples]
-
-Performing a blocking wait (C++11):
-
- // Construct a timer without setting an expiry time.
- asio::steady_timer timer(io_context);
-
- // Set an expiry time relative to now.
- timer.expires_after(std::chrono::seconds(5));
-
- // Wait for the timer to expire.
- timer.wait();
-
-
-
-
-
-Performing an asynchronous wait (C++11):
-
- void handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
-
- ...
-
- // Construct a timer with an absolute expiry time.
- asio::steady_timer timer(io_context,
- std::chrono::steady_clock::now() + std::chrono::seconds(60));
-
- // Start an asynchronous wait.
- timer.async_wait(handler);
-
-
-
-
-
-[heading Changing an active waitable 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:
-
-
-
- void on_some_event()
- {
- if (my_timer.expires_after(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 asio::error_code& e)
- {
- if (e != asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
-
-
-
-
-
-* The `asio::basic_waitable_timer::expires_after()` 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.
-
-
-* If a wait handler is cancelled, the [link asio.reference.error_code `error_code`] passed to it contains the value `asio::error::operation_aborted`.
-
-
-
-
-This typedef uses the C++11 `<chrono>` standard library facility, if available. Otherwise, it may use the Boost.Chrono library. To explicitly utilise Boost.Chrono, use the [link asio.reference.basic_waitable_timer `basic_waitable_timer`] template directly:
-
- typedef basic_waitable_timer<boost::chrono::steady_clock> timer;
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/steady_timer.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-[section:strand strand]
-
-
-Provides serialised function invocation for any executor type.
-
-
- template<
- typename ``[link asio.reference.Executor1 Executor]``>
- class strand
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.strand.inner_executor_type [*inner_executor_type]]]
- [The type of the underlying executor. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.strand.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.strand.defer [*defer]]]
- [Request the strand to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.strand.dispatch [*dispatch]]]
- [Request the strand to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.strand.get_inner_executor [*get_inner_executor]]]
- [Obtain the underlying executor. ]
- ]
-
- [
- [[link asio.reference.strand.on_work_finished [*on_work_finished]]]
- [Inform the strand that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.strand.on_work_started [*on_work_started]]]
- [Inform the strand that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.strand.operator_eq_ [*operator=]]]
- [Assignment operator.
-
- Converting assignment operator.
-
- Move assignment operator.
-
- Converting move assignment operator. ]
- ]
-
- [
- [[link asio.reference.strand.post [*post]]]
- [Request the strand to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.strand.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the strand is running in the current thread. ]
- ]
-
- [
- [[link asio.reference.strand.strand [*strand]]]
- [Default constructor.
-
- Construct a strand for the specified executor.
-
- Copy constructor.
-
- Converting constructor.
-
- Move constructor.
-
- Converting move constructor. ]
- ]
-
- [
- [[link asio.reference.strand._strand [*~strand]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.strand.operator_not__eq_ [*operator!=]]]
- [Compare two strands for inequality. ]
- ]
-
- [
- [[link asio.reference.strand.operator_eq__eq_ [*operator==]]]
- [Compare two strands for equality. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context strand::context]
-
-[indexterm2 asio.indexterm.strand.context..context..strand]
-Obtain the underlying execution context.
-
-
- execution_context & context();
-
-
-
-[endsect]
-
-
-
-[section:defer strand::defer]
-
-[indexterm2 asio.indexterm.strand.defer..defer..strand]
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void defer(
- Function && f,
- const Allocator & a);
-
-
-This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled by the underlying executor's defer function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:dispatch strand::dispatch]
-
-[indexterm2 asio.indexterm.strand.dispatch..dispatch..strand]
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void dispatch(
- Function && f,
- const Allocator & a);
-
-
-This function is used to ask the strand to execute the given function object on its underlying executor. The function object will be executed inside this function if the strand is not otherwise busy and if the underlying executor's `dispatch()` function is also able to execute the function before returning.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:get_inner_executor strand::get_inner_executor]
-
-[indexterm2 asio.indexterm.strand.get_inner_executor..get_inner_executor..strand]
-Obtain the underlying executor.
-
-
- inner_executor_type get_inner_executor() const;
-
-
-
-[endsect]
-
-
-
-[section:inner_executor_type strand::inner_executor_type]
-
-[indexterm2 asio.indexterm.strand.inner_executor_type..inner_executor_type..strand]
-The type of the underlying executor.
-
-
- typedef Executor inner_executor_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:on_work_finished strand::on_work_finished]
-
-[indexterm2 asio.indexterm.strand.on_work_finished..on_work_finished..strand]
-Inform the strand that some work is no longer outstanding.
-
-
- void on_work_finished();
-
-
-The strand delegates this call to its underlying executor.
-
-
-[endsect]
-
-
-
-[section:on_work_started strand::on_work_started]
-
-[indexterm2 asio.indexterm.strand.on_work_started..on_work_started..strand]
-Inform the strand that it has some outstanding work to do.
-
-
- void on_work_started();
-
-
-The strand delegates this call to its underlying executor.
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ strand::operator!=]
-
-[indexterm2 asio.indexterm.strand.operator_not__eq_..operator!=..strand]
-Compare two strands for inequality.
-
-
- friend bool operator!=(
- const strand & a,
- const strand & b);
-
-
-Two strands are equal if they refer to the same ordered, non-concurrent state.
-
-[heading Requirements]
-
-['Header: ][^asio/strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:operator_eq_ strand::operator=]
-
-[indexterm2 asio.indexterm.strand.operator_eq_..operator=..strand]
-Assignment operator.
-
-
- strand & ``[link asio.reference.strand.operator_eq_.overload1 operator=]``(
- const strand & other);
- `` [''''&raquo;''' [link asio.reference.strand.operator_eq_.overload1 more...]]``
-
-
-Converting assignment operator.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- strand & ``[link asio.reference.strand.operator_eq_.overload2 operator=]``(
- const strand< OtherExecutor > & other);
- `` [''''&raquo;''' [link asio.reference.strand.operator_eq_.overload2 more...]]``
-
-
-Move assignment operator.
-
-
- strand & ``[link asio.reference.strand.operator_eq_.overload3 operator=]``(
- strand && other);
- `` [''''&raquo;''' [link asio.reference.strand.operator_eq_.overload3 more...]]``
-
-
-Converting move assignment operator.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- strand & ``[link asio.reference.strand.operator_eq_.overload4 operator=]``(
- const strand< OtherExecutor > && other);
- `` [''''&raquo;''' [link asio.reference.strand.operator_eq_.overload4 more...]]``
-
-
-[section:overload1 strand::operator= (1 of 4 overloads)]
-
-
-Assignment operator.
-
-
- strand & operator=(
- const strand & other);
-
-
-
-[endsect]
-
-
-
-[section:overload2 strand::operator= (2 of 4 overloads)]
-
-
-Converting assignment operator.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- strand & operator=(
- const strand< OtherExecutor > & other);
-
-
-This assignment operator is only valid if the `OtherExecutor` type is convertible to `Executor`.
-
-
-[endsect]
-
-
-
-[section:overload3 strand::operator= (3 of 4 overloads)]
-
-
-Move assignment operator.
-
-
- strand & operator=(
- strand && other);
-
-
-
-[endsect]
-
-
-
-[section:overload4 strand::operator= (4 of 4 overloads)]
-
-
-Converting move assignment operator.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- strand & operator=(
- const strand< OtherExecutor > && other);
-
-
-This assignment operator is only valid if the `OtherExecutor` type is convertible to `Executor`.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq__eq_ strand::operator==]
-
-[indexterm2 asio.indexterm.strand.operator_eq__eq_..operator==..strand]
-Compare two strands for equality.
-
-
- friend bool operator==(
- const strand & a,
- const strand & b);
-
-
-Two strands are equal if they refer to the same ordered, non-concurrent state.
-
-[heading Requirements]
-
-['Header: ][^asio/strand.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:post strand::post]
-
-[indexterm2 asio.indexterm.strand.post..post..strand]
-Request the strand to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void post(
- Function && f,
- const Allocator & a);
-
-
-This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled by the underlying executor's defer function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:running_in_this_thread strand::running_in_this_thread]
-
-[indexterm2 asio.indexterm.strand.running_in_this_thread..running_in_this_thread..strand]
-Determine whether the strand is running in the current thread.
-
-
- bool running_in_this_thread() const;
-
-
-
-[heading Return Value]
-
-`true` if the current thread is executing a function that was submitted to the strand using `post()`, `dispatch()` or `defer()`. Otherwise returns `false`.
-
-
-
-
-[endsect]
-
-
-[section:strand strand::strand]
-
-[indexterm2 asio.indexterm.strand.strand..strand..strand]
-Default constructor.
-
-
- ``[link asio.reference.strand.strand.overload1 strand]``();
- `` [''''&raquo;''' [link asio.reference.strand.strand.overload1 more...]]``
-
-
-Construct a strand for the specified executor.
-
-
- explicit ``[link asio.reference.strand.strand.overload2 strand]``(
- const Executor & e);
- `` [''''&raquo;''' [link asio.reference.strand.strand.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.strand.strand.overload3 strand]``(
- const strand & other);
- `` [''''&raquo;''' [link asio.reference.strand.strand.overload3 more...]]``
-
-
-Converting constructor.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- ``[link asio.reference.strand.strand.overload4 strand]``(
- const strand< OtherExecutor > & other);
- `` [''''&raquo;''' [link asio.reference.strand.strand.overload4 more...]]``
-
-
-Move constructor.
-
-
- ``[link asio.reference.strand.strand.overload5 strand]``(
- strand && other);
- `` [''''&raquo;''' [link asio.reference.strand.strand.overload5 more...]]``
-
-
-Converting move constructor.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- ``[link asio.reference.strand.strand.overload6 strand]``(
- strand< OtherExecutor > && other);
- `` [''''&raquo;''' [link asio.reference.strand.strand.overload6 more...]]``
-
-
-[section:overload1 strand::strand (1 of 6 overloads)]
-
-
-Default constructor.
-
-
- strand();
-
-
-This constructor is only valid if the underlying executor type is default constructible.
-
-
-[endsect]
-
-
-
-[section:overload2 strand::strand (2 of 6 overloads)]
-
-
-Construct a strand for the specified executor.
-
-
- strand(
- const Executor & e);
-
-
-
-[endsect]
-
-
-
-[section:overload3 strand::strand (3 of 6 overloads)]
-
-
-Copy constructor.
-
-
- strand(
- const strand & other);
-
-
-
-[endsect]
-
-
-
-[section:overload4 strand::strand (4 of 6 overloads)]
-
-
-Converting constructor.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- strand(
- const strand< OtherExecutor > & other);
-
-
-This constructor is only valid if the `OtherExecutor` type is convertible to `Executor`.
-
-
-[endsect]
-
-
-
-[section:overload5 strand::strand (5 of 6 overloads)]
-
-
-Move constructor.
-
-
- strand(
- strand && other);
-
-
-
-[endsect]
-
-
-
-[section:overload6 strand::strand (6 of 6 overloads)]
-
-
-Converting move constructor.
-
-
- template<
- class ``[link asio.reference.Executor1 OtherExecutor]``>
- strand(
- strand< OtherExecutor > && other);
-
-
-This constructor is only valid if the `OtherExecutor` type is convertible to `Executor`.
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_strand strand::~strand]
-
-[indexterm2 asio.indexterm.strand._strand..~strand..strand]
-Destructor.
-
-
- ~strand();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:streambuf streambuf]
-
-[indexterm1 asio.indexterm.streambuf..streambuf]
-Typedef for the typical usage of [link asio.reference.basic_streambuf `basic_streambuf`].
-
-
- typedef basic_streambuf streambuf;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_streambuf.const_buffers_type [*const_buffers_type]]]
- [The type used to represent the input sequence as a list of buffers. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_streambuf.mutable_buffers_type [*mutable_buffers_type]]]
- [The type used to represent the output sequence as a list of buffers. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.basic_streambuf [*basic_streambuf]]]
- [Construct a basic_streambuf object. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.capacity [*capacity]]]
- [Get the current capacity of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.commit [*commit]]]
- [Move characters from the output sequence to the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.consume [*consume]]]
- [Remove characters from the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.data [*data]]]
- [Get a list of buffers that represents the input sequence. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.max_size [*max_size]]]
- [Get the maximum size of the basic_streambuf. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.prepare [*prepare]]]
- [Get a list of buffers that represents the output sequence, with the given size. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.size [*size]]]
- [Get the size of the input sequence. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_streambuf.overflow [*overflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
- [
- [[link asio.reference.basic_streambuf.reserve [*reserve]]]
- []
- ]
-
- [
- [[link asio.reference.basic_streambuf.underflow [*underflow]]]
- [Override std::streambuf behaviour. ]
- ]
-
-]
-
-The `basic_streambuf` class is derived from `std::streambuf` to associate the streambuf's input and output sequences with one or more character arrays. These character arrays are internal to the `basic_streambuf` object, but direct access to the array elements is provided to permit them to be used efficiently with I/O operations. Characters written to the output sequence of a `basic_streambuf` object are appended to the input sequence of the same object.
-
-The `basic_streambuf` class's public interface is intended to permit the following implementation strategies:
-
-
-* A single contiguous character array, which is reallocated as necessary to accommodate changes in the size of the character sequence. This is the implementation approach currently used in Asio.
-
-
-* A sequence of one or more character arrays, where each array is of the same size. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-
-* A sequence of one or more character arrays of varying sizes. Additional character array objects are appended to the sequence to accommodate changes in the size of the character sequence.
-
-The constructor for [link asio.reference.basic_streambuf `basic_streambuf`] accepts a `size_t` argument specifying the maximum of the sum of the sizes of the input sequence and output sequence. During the lifetime of the `basic_streambuf` object, the following invariant holds:
-
- size() <= max_size()
-
-
-Any member function that would, if successful, cause the invariant to be violated shall throw an exception of class `std::length_error`.
-
-The constructor for `basic_streambuf` takes an Allocator argument. A copy of this argument is used for any memory allocation performed, by the constructor and by all member functions, during the lifetime of each `basic_streambuf` object.
-
-
-[heading Examples]
-
-Writing directly from an streambuf to a socket:
-
- asio::streambuf b;
- std::ostream os(&b);
- os << "Hello, World!\n";
-
- // try sending some data in input sequence
- size_t n = sock.send(b.data());
-
- b.consume(n); // sent data is removed from input sequence
-
-
-
-
-Reading from a socket directly into a streambuf:
-
- asio::streambuf b;
-
- // reserve 512 bytes in output sequence
- asio::streambuf::mutable_buffers_type bufs = b.prepare(512);
-
- size_t n = sock.receive(bufs);
-
- // received data is "committed" from output sequence to input sequence
- b.commit(n);
-
- std::istream is(&b);
- std::string s;
- is >> s;
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/streambuf.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:system_category system_category]
-
-[indexterm1 asio.indexterm.system_category..system_category]
-Returns the error category used for the system errors produced by asio.
-
-
- const error_category & system_category();
-
-
-[heading Requirements]
-
-['Header: ][^asio/error_code.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:system_error system_error]
-
-
-The [link asio.reference.system_error `system_error`] class is used to represent system conditions that prevent the library from operating correctly.
-
-
- class system_error :
- public std::exception
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.system_error.code [*code]]]
- [Get the error code associated with the exception. ]
- ]
-
- [
- [[link asio.reference.system_error.operator_eq_ [*operator=]]]
- [Assignment operator. ]
- ]
-
- [
- [[link asio.reference.system_error.system_error [*system_error]]]
- [Construct with an error code.
-
- Construct with an error code and context.
-
- Copy constructor. ]
- ]
-
- [
- [[link asio.reference.system_error.what [*what]]]
- [Get a string representation of the exception. ]
- ]
-
- [
- [[link asio.reference.system_error._system_error [*~system_error]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/system_error.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:code system_error::code]
-
-[indexterm2 asio.indexterm.system_error.code..code..system_error]
-Get the error code associated with the exception.
-
-
- error_code code() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_eq_ system_error::operator=]
-
-[indexterm2 asio.indexterm.system_error.operator_eq_..operator=..system_error]
-Assignment operator.
-
-
- system_error & operator=(
- const system_error & e);
-
-
-
-[endsect]
-
-
-[section:system_error system_error::system_error]
-
-[indexterm2 asio.indexterm.system_error.system_error..system_error..system_error]
-Construct with an error code.
-
-
- ``[link asio.reference.system_error.system_error.overload1 system_error]``(
- const error_code & ec);
- `` [''''&raquo;''' [link asio.reference.system_error.system_error.overload1 more...]]``
-
-
-Construct with an error code and context.
-
-
- ``[link asio.reference.system_error.system_error.overload2 system_error]``(
- const error_code & ec,
- const std::string & context);
- `` [''''&raquo;''' [link asio.reference.system_error.system_error.overload2 more...]]``
-
-
-Copy constructor.
-
-
- ``[link asio.reference.system_error.system_error.overload3 system_error]``(
- const system_error & other);
- `` [''''&raquo;''' [link asio.reference.system_error.system_error.overload3 more...]]``
-
-
-[section:overload1 system_error::system_error (1 of 3 overloads)]
-
-
-Construct with an error code.
-
-
- system_error(
- const error_code & ec);
-
-
-
-[endsect]
-
-
-
-[section:overload2 system_error::system_error (2 of 3 overloads)]
-
-
-Construct with an error code and context.
-
-
- system_error(
- const error_code & ec,
- const std::string & context);
-
-
-
-[endsect]
-
-
-
-[section:overload3 system_error::system_error (3 of 3 overloads)]
-
-
-Copy constructor.
-
-
- system_error(
- const system_error & other);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:what system_error::what]
-
-[indexterm2 asio.indexterm.system_error.what..what..system_error]
-Get a string representation of the exception.
-
-
- virtual const char * what() const;
-
-
-
-[endsect]
-
-
-
-[section:_system_error system_error::~system_error]
-
-[indexterm2 asio.indexterm.system_error._system_error..~system_error..system_error]
-Destructor.
-
-
- virtual ~system_error();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:system_executor system_executor]
-
-
-An executor that uses arbitrary threads.
-
-
- class system_executor
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.system_executor.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.system_executor.defer [*defer]]]
- [Request the system executor to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.system_executor.dispatch [*dispatch]]]
- [Request the system executor to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.system_executor.on_work_finished [*on_work_finished]]]
- [Inform the executor that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.system_executor.on_work_started [*on_work_started]]]
- [Inform the executor that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.system_executor.post [*post]]]
- [Request the system executor to invoke the given function object. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.system_executor.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.system_executor.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-The system executor represents an execution context where functions are permitted to run on arbitrary threads. The `post()` and `defer()` functions schedule the function to run on an unspecified system thread pool, and `dispatch()` invokes the function immediately.
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context system_executor::context]
-
-[indexterm2 asio.indexterm.system_executor.context..context..system_executor]
-Obtain the underlying execution context.
-
-
- execution_context & context() const;
-
-
-
-[endsect]
-
-
-
-[section:defer system_executor::defer]
-
-[indexterm2 asio.indexterm.system_executor.defer..defer..system_executor]
-Request the system executor to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void defer(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled to run on an unspecified system thread pool.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:dispatch system_executor::dispatch]
-
-[indexterm2 asio.indexterm.system_executor.dispatch..dispatch..system_executor]
-Request the system executor to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void dispatch(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the executor to execute the given function object. The function object will always be executed inside this function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:on_work_finished system_executor::on_work_finished]
-
-[indexterm2 asio.indexterm.system_executor.on_work_finished..on_work_finished..system_executor]
-Inform the executor that some work is no longer outstanding.
-
-
- void on_work_finished() const;
-
-
-For the system executor, this is a no-op.
-
-
-[endsect]
-
-
-
-[section:on_work_started system_executor::on_work_started]
-
-[indexterm2 asio.indexterm.system_executor.on_work_started..on_work_started..system_executor]
-Inform the executor that it has some outstanding work to do.
-
-
- void on_work_started() const;
-
-
-For the system executor, this is a no-op.
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ system_executor::operator!=]
-
-[indexterm2 asio.indexterm.system_executor.operator_not__eq_..operator!=..system_executor]
-Compare two executors for inequality.
-
-
- friend bool operator!=(
- const system_executor & ,
- const system_executor & );
-
-
-System executors always compare equal.
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ system_executor::operator==]
-
-[indexterm2 asio.indexterm.system_executor.operator_eq__eq_..operator==..system_executor]
-Compare two executors for equality.
-
-
- friend bool operator==(
- const system_executor & ,
- const system_executor & );
-
-
-System executors always compare equal.
-
-[heading Requirements]
-
-['Header: ][^asio/system_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:post system_executor::post]
-
-[indexterm2 asio.indexterm.system_executor.post..post..system_executor]
-Request the system executor to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void post(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the executor to execute the given function object. The function object will never be executed inside this function. Instead, it will be scheduled to run on an unspecified system thread pool.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:system_timer system_timer]
-
-[indexterm1 asio.indexterm.system_timer..system_timer]
-Typedef for a timer based on the system clock.
-
-
- typedef basic_waitable_timer< chrono::system_clock > system_timer;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_waitable_timer.clock_type [*clock_type]]]
- [The clock type. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.duration [*duration]]]
- [The duration type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.time_point [*time_point]]]
- [The time point type of the clock. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_waitable_timer.traits_type [*traits_type]]]
- [The wait traits type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_waitable_timer.async_wait [*async_wait]]]
- [Start an asynchronous wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.basic_waitable_timer [*basic_waitable_timer]]]
- [Constructor.
-
- Constructor to set a particular expiry time as an absolute time.
-
- Constructor to set a particular expiry time relative to now.
-
- Move-construct a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel [*cancel]]]
- [Cancel any asynchronous operations that are waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancel any asynchronous operations that are waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.cancel_one [*cancel_one]]]
- [Cancels one asynchronous operation that is waiting on the timer.
-
- (Deprecated: Use non-error_code overload.) Cancels one asynchronous operation that is waiting on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_after [*expires_after]]]
- [Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_at [*expires_at]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time as an absolute time.
-
- Set the timer's expiry time as an absolute time.
-
- (Deprecated: Use non-error_code overload.) Set the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expires_from_now [*expires_from_now]]]
- [(Deprecated: Use expiry().) Get the timer's expiry time relative to now.
-
- (Deprecated: Use expires_after().) Set the timer's expiry time relative to now. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.expiry [*expiry]]]
- [Get the timer's expiry time as an absolute time. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.operator_eq_ [*operator=]]]
- [Move-assign a basic_waitable_timer from another. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer.wait [*wait]]]
- [Perform a blocking wait on the timer. ]
- ]
-
- [
- [[link asio.reference.basic_waitable_timer._basic_waitable_timer [*~basic_waitable_timer]]]
- [Destroys the timer. ]
- ]
-
-]
-
-The [link asio.reference.basic_waitable_timer `basic_waitable_timer`] class template provides the ability to perform a blocking or asynchronous wait for a timer to expire.
-
-A waitable 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 one of the [link asio.reference.steady_timer `steady_timer`], [link asio.reference.system_timer `system_timer`] or [link asio.reference.high_resolution_timer `high_resolution_timer`] typedefs.
-
-
-[heading Remarks]
-
-This waitable timer functionality is for use with the C++11 standard library's `<chrono>` facility, or with the Boost.Chrono library.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Examples]
-
-Performing a blocking wait (C++11):
-
- // Construct a timer without setting an expiry time.
- asio::steady_timer timer(io_context);
-
- // Set an expiry time relative to now.
- timer.expires_after(std::chrono::seconds(5));
-
- // Wait for the timer to expire.
- timer.wait();
-
-
-
-
-
-Performing an asynchronous wait (C++11):
-
- void handler(const asio::error_code& error)
- {
- if (!error)
- {
- // Timer expired.
- }
- }
-
- ...
-
- // Construct a timer with an absolute expiry time.
- asio::steady_timer timer(io_context,
- std::chrono::steady_clock::now() + std::chrono::seconds(60));
-
- // Start an asynchronous wait.
- timer.async_wait(handler);
-
-
-
-
-
-[heading Changing an active waitable 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:
-
-
-
- void on_some_event()
- {
- if (my_timer.expires_after(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 asio::error_code& e)
- {
- if (e != asio::error::operation_aborted)
- {
- // Timer was not cancelled, take necessary action.
- }
- }
-
-
-
-
-
-* The `asio::basic_waitable_timer::expires_after()` 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.
-
-
-* If a wait handler is cancelled, the [link asio.reference.error_code `error_code`] passed to it contains the value `asio::error::operation_aborted`.
-
-
-
-
-This typedef uses the C++11 `<chrono>` standard library facility, if available. Otherwise, it may use the Boost.Chrono library. To explicitly utilise Boost.Chrono, use the [link asio.reference.basic_waitable_timer `basic_waitable_timer`] template directly:
-
- typedef basic_waitable_timer<boost::chrono::system_clock> timer;
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/system_timer.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-[section:thread thread]
-
-
-A simple abstraction for starting threads.
-
-
- class thread :
- noncopyable
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.thread.join [*join]]]
- [Wait for the thread to exit. ]
- ]
-
- [
- [[link asio.reference.thread.thread [*thread]]]
- [Start a new thread that executes the supplied function. ]
- ]
-
- [
- [[link asio.reference.thread._thread [*~thread]]]
- [Destructor. ]
- ]
-
-]
-
-The [link asio.reference.thread `thread`] class implements the smallest possible subset of the functionality of boost::thread. It is intended to be used only for starting a thread and waiting for it to exit. If more extensive threading capabilities are required, you are strongly advised to use something else.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-[heading Example]
-
-A typical use of [link asio.reference.thread `thread`] would be to launch a thread to run an io\_context's event processing loop:
-
-
-
-
- asio::io_context io_context;
- // ...
- asio::thread t(boost::bind(&asio::io_context::run, &io_context));
- // ...
- t.join();
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/thread.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:join thread::join]
-
-[indexterm2 asio.indexterm.thread.join..join..thread]
-Wait for the thread to exit.
-
-
- void join();
-
-
-This function will block until the thread has exited.
-
-If this function is not called before the thread object is destroyed, the thread itself will continue to run until completion. You will, however, no longer have the ability to wait for it to exit.
-
-
-[endsect]
-
-
-
-[section:thread thread::thread]
-
-[indexterm2 asio.indexterm.thread.thread..thread..thread]
-Start a new thread that executes the supplied function.
-
-
- template<
- typename Function>
- thread(
- Function f);
-
-
-This constructor creates a new thread that will execute the given function or function object.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function or function object to be run in the thread. The function signature must be:
-``
- void f();
-``
-]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:_thread thread::~thread]
-
-[indexterm2 asio.indexterm.thread._thread..~thread..thread]
-Destructor.
-
-
- ~thread();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:thread_pool thread_pool]
-
-
-A simple fixed-size thread pool.
-
-
- class thread_pool :
- public execution_context
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.thread_pool__executor_type [*executor_type]]]
- [Executor used to submit functions to a thread pool. ]
-
- ]
-
- [
-
- [[link asio.reference.thread_pool.fork_event [*fork_event]]]
- [Fork-related event notifications. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.thread_pool.get_executor [*get_executor]]]
- [Obtains the executor associated with the pool. ]
- ]
-
- [
- [[link asio.reference.thread_pool.join [*join]]]
- [Joins the threads. ]
- ]
-
- [
- [[link asio.reference.thread_pool.notify_fork [*notify_fork]]]
- [Notify the execution_context of a fork-related event. ]
- ]
-
- [
- [[link asio.reference.thread_pool.stop [*stop]]]
- [Stops the threads. ]
- ]
-
- [
- [[link asio.reference.thread_pool.thread_pool [*thread_pool]]]
- [Constructs a pool with an automatically determined number of threads.
-
- Constructs a pool with a specified number of threads. ]
- ]
-
- [
- [[link asio.reference.thread_pool._thread_pool [*~thread_pool]]]
- [Destructor. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.thread_pool.destroy [*destroy]]]
- [Destroys all services in the context. ]
- ]
-
- [
- [[link asio.reference.thread_pool.shutdown [*shutdown]]]
- [Shuts down all services in the context. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.thread_pool.add_service [*add_service]]]
- [(Deprecated: Use make_service().) Add a service object to the execution_context. ]
- ]
-
- [
- [[link asio.reference.thread_pool.has_service [*has_service]]]
- [Determine if an execution_context contains a specified service type. ]
- ]
-
- [
- [[link asio.reference.thread_pool.make_service [*make_service]]]
- [Creates a service object and adds it to the execution_context. ]
- ]
-
- [
- [[link asio.reference.thread_pool.use_service [*use_service]]]
- [Obtain the service object corresponding to the given type. ]
- ]
-
-]
-
-The thread pool class is an execution context where functions are permitted to run on one of a fixed number of threads.
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:add_service thread_pool::add_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.add_service..add_service..thread_pool]
-(Deprecated: Use `make_service()`.) Add a service object to the [link asio.reference.execution_context `execution_context`].
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend void add_service(
- execution_context & e,
- Service * svc);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[svc][The service object. On success, ownership of the service object is transferred to the [link asio.reference.execution_context `execution_context`]. When the [link asio.reference.execution_context `execution_context`] object is destroyed, it will destroy the service object by performing:
-``
- delete static_cast<execution_context::service*>(svc)
-``
-]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`].]]
-
-[[asio::invalid_service_owner][Thrown if the service's owning [link asio.reference.execution_context `execution_context`] is not the [link asio.reference.execution_context `execution_context`] object specified by the `e` parameter. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:destroy thread_pool::destroy]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.destroy..destroy..thread_pool]
-Destroys all services in the context.
-
-
- void destroy();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order * of the beginning of service object lifetime, performs `delete static_cast<execution_context::service*>(svc)`.
-
-
-
-
-[endsect]
-
-
-
-[section:fork_event thread_pool::fork_event]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.fork_event..fork_event..thread_pool]
-Fork-related event notifications.
-
-
- enum fork_event
-
-[indexterm2 asio.indexterm.thread_pool.fork_event.fork_prepare..fork_prepare..thread_pool]
-[indexterm2 asio.indexterm.thread_pool.fork_event.fork_parent..fork_parent..thread_pool]
-[indexterm2 asio.indexterm.thread_pool.fork_event.fork_child..fork_child..thread_pool]
-
-[heading Values]
-[variablelist
-
- [
- [fork_prepare]
- [Notify the context that the process is about to fork. ]
- ]
-
- [
- [fork_parent]
- [Notify the context that the process has forked and is the parent. ]
- ]
-
- [
- [fork_child]
- [Notify the context that the process has forked and is the child. ]
- ]
-
-]
-
-
-
-[endsect]
-
-
-
-[section:get_executor thread_pool::get_executor]
-
-[indexterm2 asio.indexterm.thread_pool.get_executor..get_executor..thread_pool]
-Obtains the executor associated with the pool.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:has_service thread_pool::has_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.has_service..has_service..thread_pool]
-Determine if an [link asio.reference.execution_context `execution_context`] contains a specified service type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend bool has_service(
- execution_context & e);
-
-
-This function is used to determine whether the [link asio.reference.execution_context `execution_context`] contains a service object corresponding to the given service type.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-A boolean indicating whether the [link asio.reference.execution_context `execution_context`] contains the service.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:join thread_pool::join]
-
-[indexterm2 asio.indexterm.thread_pool.join..join..thread_pool]
-Joins the threads.
-
-
- void join();
-
-
-This function blocks until the threads in the pool have completed. If `stop()` is not called prior to `join()`, the `join()` call will wait until the pool has no more outstanding work.
-
-
-[endsect]
-
-
-
-[section:make_service thread_pool::make_service]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.make_service..make_service..thread_pool]
-Creates a service object and adds it to the [link asio.reference.execution_context `execution_context`].
-
-
- template<
- typename ``[link asio.reference.Service Service]``,
- typename... Args>
- friend Service & make_service(
- execution_context & e,
- Args &&... args);
-
-
-This function is used to add a service to the [link asio.reference.execution_context `execution_context`].
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-[[args][Zero or more arguments to be passed to the service constructor.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::service_already_exists][Thrown if a service of the given type is already present in the [link asio.reference.execution_context `execution_context`]. ]]
-
-]
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:notify_fork thread_pool::notify_fork]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.notify_fork..notify_fork..thread_pool]
-Notify the [link asio.reference.execution_context `execution_context`] of a fork-related event.
-
-
- void notify_fork(
- fork_event event);
-
-
-This function is used to inform the [link asio.reference.execution_context `execution_context`] that the process is about to fork, or has just forked. This allows the [link asio.reference.execution_context `execution_context`], and the services it contains, to perform any necessary housekeeping to ensure correct operation following a fork.
-
-This function must not be called while any other [link asio.reference.execution_context `execution_context`] function, or any function associated with the execution\_context's derived class, is being called in another thread. It is, however, safe to call this function from within a completion handler, provided no other thread is accessing the [link asio.reference.execution_context `execution_context`] or its derived class.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[event][A fork-related event.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. If the notification fails the [link asio.reference.execution_context `execution_context`] object should no longer be used and should be destroyed.]]
-
-]
-
-
-[heading Example]
-
-The following code illustrates how to incorporate the `notify_fork()` function:
-
- my_execution_context.notify_fork(execution_context::fork_prepare);
- if (fork() == 0)
- {
- // This is the child process.
- my_execution_context.notify_fork(execution_context::fork_child);
- }
- else
- {
- // This is the parent process.
- my_execution_context.notify_fork(execution_context::fork_parent);
- }
-
-
-
-
-
-[heading Remarks]
-
-For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, performs `svc->notify_fork();`. When processing the fork\_prepare event, services are visited in reverse order of the beginning of service object lifetime. Otherwise, services are visited in order of the beginning of service object lifetime.
-
-
-
-
-[endsect]
-
-
-
-[section:shutdown thread_pool::shutdown]
-
-
-['Inherited from execution_context.]
-
-[indexterm2 asio.indexterm.thread_pool.shutdown..shutdown..thread_pool]
-Shuts down all services in the context.
-
-
- void shutdown();
-
-
-This function is implemented as follows:
-
-
-* For each service object `svc` in the [link asio.reference.execution_context `execution_context`] set, in reverse order of the beginning of service object lifetime, performs `svc->shutdown()`.
-
-
-
-
-[endsect]
-
-
-
-[section:stop thread_pool::stop]
-
-[indexterm2 asio.indexterm.thread_pool.stop..stop..thread_pool]
-Stops the threads.
-
-
- void stop();
-
-
-This function stops the threads as soon as possible. As a result of calling `stop()`, pending function objects may be never be invoked.
-
-
-[endsect]
-
-
-[section:thread_pool thread_pool::thread_pool]
-
-[indexterm2 asio.indexterm.thread_pool.thread_pool..thread_pool..thread_pool]
-Constructs a pool with an automatically determined number of threads.
-
-
- ``[link asio.reference.thread_pool.thread_pool.overload1 thread_pool]``();
- `` [''''&raquo;''' [link asio.reference.thread_pool.thread_pool.overload1 more...]]``
-
-
-Constructs a pool with a specified number of threads.
-
-
- ``[link asio.reference.thread_pool.thread_pool.overload2 thread_pool]``(
- std::size_t num_threads);
- `` [''''&raquo;''' [link asio.reference.thread_pool.thread_pool.overload2 more...]]``
-
-
-[section:overload1 thread_pool::thread_pool (1 of 2 overloads)]
-
-
-Constructs a pool with an automatically determined number of threads.
-
-
- thread_pool();
-
-
-
-[endsect]
-
-
-
-[section:overload2 thread_pool::thread_pool (2 of 2 overloads)]
-
-
-Constructs a pool with a specified number of threads.
-
-
- thread_pool(
- std::size_t num_threads);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_service thread_pool::use_service]
-
-[indexterm2 asio.indexterm.thread_pool.use_service..use_service..thread_pool]
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & ``[link asio.reference.thread_pool.use_service.overload1 use_service]``(
- execution_context & e);
- `` [''''&raquo;''' [link asio.reference.thread_pool.use_service.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & ``[link asio.reference.thread_pool.use_service.overload2 use_service]``(
- io_context & ioc);
- `` [''''&raquo;''' [link asio.reference.thread_pool.use_service.overload2 more...]]``
-
-
-[section:overload1 thread_pool::use_service (1 of 2 overloads)]
-
-
-['Inherited from execution_context.]
-
-
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & use_service(
- execution_context & e);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.execution_context `execution_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:overload2 thread_pool::use_service (2 of 2 overloads)]
-
-
-['Inherited from execution_context.]
-
-
-Obtain the service object corresponding to the given type.
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- friend Service & use_service(
- io_context & ioc);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.io_context `io_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ioc][The [link asio.reference.io_context `io_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-[heading Remarks]
-
-This overload is preserved for backwards compatibility with services that inherit from [link asio.reference.io_context__service `io_context::service`].
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_thread_pool thread_pool::~thread_pool]
-
-[indexterm2 asio.indexterm.thread_pool._thread_pool..~thread_pool..thread_pool]
-Destructor.
-
-
- ~thread_pool();
-
-
-Automatically stops and joins the pool, if not explicitly done beforehand.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:thread_pool__executor_type thread_pool::executor_type]
-
-
-Executor used to submit functions to a thread pool.
-
-
- class executor_type
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.thread_pool__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.defer [*defer]]]
- [Request the thread pool to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.dispatch [*dispatch]]]
- [Request the thread pool to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the thread pool that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.on_work_started [*on_work_started]]]
- [Inform the thread pool that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.post [*post]]]
- [Request the thread pool to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the thread pool is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.thread_pool__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.thread_pool__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:context thread_pool::executor_type::context]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.context..context..thread_pool::executor_type]
-Obtain the underlying execution context.
-
-
- thread_pool & context() const;
-
-
-
-[endsect]
-
-
-
-[section:defer thread_pool::executor_type::defer]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.defer..defer..thread_pool::executor_type]
-Request the thread pool to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void defer(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the thread pool to execute the given function object. The function object will never be executed inside `defer()`. Instead, it will be scheduled to run on the thread pool.
-
-If the current thread belongs to the thread pool, `defer()` will delay scheduling the function object until the current thread returns control to the pool.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:dispatch thread_pool::executor_type::dispatch]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.dispatch..dispatch..thread_pool::executor_type]
-Request the thread pool to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void dispatch(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the thread pool to execute the given function object. If the current thread belongs to the pool, `dispatch()` executes the function before returning. Otherwise, the function will be scheduled to run on the thread pool.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:on_work_finished thread_pool::executor_type::on_work_finished]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.on_work_finished..on_work_finished..thread_pool::executor_type]
-Inform the thread pool that some work is no longer outstanding.
-
-
- void on_work_finished() const;
-
-
-This function is used to inform the thread pool that some work has finished. Once the count of unfinished work reaches zero, the thread pool's `join()` function is permitted to exit.
-
-
-[endsect]
-
-
-
-[section:on_work_started thread_pool::executor_type::on_work_started]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.on_work_started..on_work_started..thread_pool::executor_type]
-Inform the thread pool that it has some outstanding work to do.
-
-
- void on_work_started() const;
-
-
-This function is used to inform the thread pool that some work has begun. This ensures that the thread pool's `join()` function will not return while the work is underway.
-
-
-[endsect]
-
-
-
-[section:operator_not__eq_ thread_pool::executor_type::operator!=]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.operator_not__eq_..operator!=..thread_pool::executor_type]
-Compare two executors for inequality.
-
-
- friend bool operator!=(
- const executor_type & a,
- const executor_type & b);
-
-
-Two executors are equal if they refer to the same underlying thread pool.
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq__eq_ thread_pool::executor_type::operator==]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.operator_eq__eq_..operator==..thread_pool::executor_type]
-Compare two executors for equality.
-
-
- friend bool operator==(
- const executor_type & a,
- const executor_type & b);
-
-
-Two executors are equal if they refer to the same underlying thread pool.
-
-[heading Requirements]
-
-['Header: ][^asio/thread_pool.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:post thread_pool::executor_type::post]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.post..post..thread_pool::executor_type]
-Request the thread pool to invoke the given function object.
-
-
- template<
- typename Function,
- typename Allocator>
- void post(
- Function && f,
- const Allocator & a) const;
-
-
-This function is used to ask the thread pool to execute the given function object. The function object will never be executed inside `post()`. Instead, it will be scheduled to run on the thread pool.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[f][The function object to be called. The executor will make a copy of the handler object as required. The function signature of the function object must be:
-``
- void function();
-``
-]]
-
-[[a][An allocator that may be used by the executor to allocate the internal storage needed for function invocation. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:running_in_this_thread thread_pool::executor_type::running_in_this_thread]
-
-[indexterm2 asio.indexterm.thread_pool__executor_type.running_in_this_thread..running_in_this_thread..thread_pool::executor_type]
-Determine whether the thread pool is running in the current thread.
-
-
- bool running_in_this_thread() const;
-
-
-
-[heading Return Value]
-
-`true` if the current thread belongs to the pool. Otherwise returns `false`.
-
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:time_traits_lt__ptime__gt_ time_traits< boost::posix_time::ptime >]
-
-
-Time traits specialised for posix\_time.
-
-
- template<>
- struct time_traits< boost::posix_time::ptime >
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.time_traits_lt__ptime__gt_.duration_type [*duration_type]]]
- [The duration type. ]
-
- ]
-
- [
-
- [[link asio.reference.time_traits_lt__ptime__gt_.time_type [*time_type]]]
- [The time type. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.time_traits_lt__ptime__gt_.add [*add]]]
- [Add a duration to a time. ]
- ]
-
- [
- [[link asio.reference.time_traits_lt__ptime__gt_.less_than [*less_than]]]
- [Test whether one time is less than another. ]
- ]
-
- [
- [[link asio.reference.time_traits_lt__ptime__gt_.now [*now]]]
- [Get the current time. ]
- ]
-
- [
- [[link asio.reference.time_traits_lt__ptime__gt_.subtract [*subtract]]]
- [Subtract one time from another. ]
- ]
-
- [
- [[link asio.reference.time_traits_lt__ptime__gt_.to_posix_duration [*to_posix_duration]]]
- [Convert to POSIX duration type. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/time_traits.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:add time_traits< boost::posix_time::ptime >::add]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.add..add..time_traits< boost::posix_time::ptime >]
-Add a duration to a time.
-
-
- static time_type add(
- const time_type & t,
- const duration_type & d);
-
-
-
-[endsect]
-
-
-
-[section:duration_type time_traits< boost::posix_time::ptime >::duration_type]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.duration_type..duration_type..time_traits< boost::posix_time::ptime >]
-The duration type.
-
-
- typedef boost::posix_time::time_duration duration_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/time_traits.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:less_than time_traits< boost::posix_time::ptime >::less_than]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.less_than..less_than..time_traits< boost::posix_time::ptime >]
-Test whether one time is less than another.
-
-
- static bool less_than(
- const time_type & t1,
- const time_type & t2);
-
-
-
-[endsect]
-
-
-
-[section:now time_traits< boost::posix_time::ptime >::now]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.now..now..time_traits< boost::posix_time::ptime >]
-Get the current time.
-
-
- static time_type now();
-
-
-
-[endsect]
-
-
-
-[section:subtract time_traits< boost::posix_time::ptime >::subtract]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.subtract..subtract..time_traits< boost::posix_time::ptime >]
-Subtract one time from another.
-
-
- static duration_type subtract(
- const time_type & t1,
- const time_type & t2);
-
-
-
-[endsect]
-
-
-
-[section:time_type time_traits< boost::posix_time::ptime >::time_type]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.time_type..time_type..time_traits< boost::posix_time::ptime >]
-The time type.
-
-
- typedef boost::posix_time::ptime time_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/time_traits.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:to_posix_duration time_traits< boost::posix_time::ptime >::to_posix_duration]
-
-[indexterm2 asio.indexterm.time_traits_lt__ptime__gt_.to_posix_duration..to_posix_duration..time_traits< boost::posix_time::ptime >]
-Convert to POSIX duration type.
-
-
- static boost::posix_time::time_duration to_posix_duration(
- const duration_type & d);
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-
-[section:transfer_all transfer_all]
-
-[indexterm1 asio.indexterm.transfer_all..transfer_all]
-Return a completion condition function object that indicates that a read or write operation should continue until all of the data has been transferred, or until an error occurs.
-
-
- unspecified transfer_all();
-
-
-This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
-
-
-[heading Example]
-
-Reading until a buffer is full:
-
- boost::array<char, 128> buf;
- asio::error_code ec;
- std::size_t n = asio::read(
- sock, asio::buffer(buf),
- asio::transfer_all(), ec);
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- // n == 128
- }
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/completion_condition.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:transfer_at_least transfer_at_least]
-
-[indexterm1 asio.indexterm.transfer_at_least..transfer_at_least]
-Return a completion condition function object that indicates that a read or write operation should continue until a minimum number of bytes has been transferred, or until an error occurs.
-
-
- unspecified transfer_at_least(
- std::size_t minimum);
-
-
-This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
-
-
-[heading Example]
-
-Reading until a buffer is full or contains at least 64 bytes:
-
- boost::array<char, 128> buf;
- asio::error_code ec;
- std::size_t n = asio::read(
- sock, asio::buffer(buf),
- asio::transfer_at_least(64), ec);
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- // n >= 64 && n <= 128
- }
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/completion_condition.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:transfer_exactly transfer_exactly]
-
-[indexterm1 asio.indexterm.transfer_exactly..transfer_exactly]
-Return a completion condition function object that indicates that a read or write operation should continue until an exact number of bytes has been transferred, or until an error occurs.
-
-
- unspecified transfer_exactly(
- std::size_t size);
-
-
-This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.
-
-
-[heading Example]
-
-Reading until a buffer is full or contains exactly 64 bytes:
-
- boost::array<char, 128> buf;
- asio::error_code ec;
- std::size_t n = asio::read(
- sock, asio::buffer(buf),
- asio::transfer_exactly(64), ec);
- if (ec)
- {
- // An error occurred.
- }
- else
- {
- // n == 64
- }
-
-
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/completion_condition.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:use_future use_future]
-
-[indexterm1 asio.indexterm.use_future..use_future]
-A special value, similar to std::nothrow.
-
-
- constexpr use_future_t use_future;
-
-
-See the documentation for [link asio.reference.use_future_t `use_future_t`] for a usage example.
-
-[heading Requirements]
-
-['Header: ][^asio/use_future.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-[section:use_future_t use_future_t]
-
-
-Class used to specify that an asynchronous operation should return a future.
-
-
- template<
- typename Allocator = std::allocator<void>>
- class use_future_t
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.use_future_t.allocator_type [*allocator_type]]]
- [The allocator type. The allocator is used when constructing the std::promise object for a given asynchronous operation. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.use_future_t.get_allocator [*get_allocator]]]
- [Obtain allocator. ]
- ]
-
- [
- [[link asio.reference.use_future_t.operator_lp__rp_ [*operator()]]]
- [Wrap a function object in a packaged task. ]
- ]
-
- [
- [[link asio.reference.use_future_t.operator_lb__rb_ [*operator\[\]]]]
- [(Deprecated: Use rebind().) Specify an alternate allocator. ]
- ]
-
- [
- [[link asio.reference.use_future_t.rebind [*rebind]]]
- [Specify an alternate allocator. ]
- ]
-
- [
- [[link asio.reference.use_future_t.use_future_t [*use_future_t]]]
- [Construct using default-constructed allocator.
-
- Construct using specified allocator. ]
- ]
-
-]
-
-The [link asio.reference.use_future_t `use_future_t`] class is used to indicate that an asynchronous operation should return a std::future object. A [link asio.reference.use_future_t `use_future_t`] object may be passed as a handler to an asynchronous operation, typically using the special value `asio::use_future`. For example:
-
-
-
- std::future<std::size_t> my_future
- = my_socket.async_read_some(my_buffer, asio::use_future);
-
-
-
-
-The initiating function (async\_read\_some in the above example) returns a future that will receive the result of the operation. If the operation completes with an [link asio.reference.error_code `error_code`] indicating failure, it is converted into a [link asio.reference.system_error `system_error`] and passed back to the caller via the future.
-
-[heading Requirements]
-
-['Header: ][^asio/use_future.hpp]
-
-['Convenience header: ]None
-
-
-[section:allocator_type use_future_t::allocator_type]
-
-[indexterm2 asio.indexterm.use_future_t.allocator_type..allocator_type..use_future_t]
-The allocator type. The allocator is used when constructing the `std::promise` object for a given asynchronous operation.
-
-
- typedef Allocator allocator_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/use_future.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-
-[section:get_allocator use_future_t::get_allocator]
-
-[indexterm2 asio.indexterm.use_future_t.get_allocator..get_allocator..use_future_t]
-Obtain allocator.
-
-
- allocator_type get_allocator() const;
-
-
-
-[endsect]
-
-
-
-[section:operator_lp__rp_ use_future_t::operator()]
-
-[indexterm2 asio.indexterm.use_future_t.operator_lp__rp_..operator()..use_future_t]
-Wrap a function object in a packaged task.
-
-
- template<
- typename Function>
- unspecified operator()(
- Function && f) const;
-
-
-The `package` function is used to adapt a function object as a packaged task. When this adapter is passed as a completion token to an asynchronous operation, the result of the function object is retuned via a std::future.
-
-
-[heading Example]
-
-
-
-
-
- std::future<std::size_t> fut =
- my_socket.async_read_some(buffer,
- use_future([](asio::error_code ec, std::size_t n)
- {
- return ec ? 0 : n;
- }));
- ...
- std::size_t n = fut.get();
-
-
-
-
-
-[endsect]
-
-
-
-[section:operator_lb__rb_ use_future_t::operator\[\]]
-
-[indexterm2 asio.indexterm.use_future_t.operator_lb__rb_..operator\[\]..use_future_t]
-(Deprecated: Use `rebind()`.) Specify an alternate allocator.
-
-
- template<
- typename OtherAllocator>
- use_future_t< OtherAllocator > operator[](
- const OtherAllocator & allocator) const;
-
-
-
-[endsect]
-
-
-
-[section:rebind use_future_t::rebind]
-
-[indexterm2 asio.indexterm.use_future_t.rebind..rebind..use_future_t]
-Specify an alternate allocator.
-
-
- template<
- typename OtherAllocator>
- use_future_t< OtherAllocator > rebind(
- const OtherAllocator & allocator) const;
-
-
-
-[endsect]
-
-
-[section:use_future_t use_future_t::use_future_t]
-
-[indexterm2 asio.indexterm.use_future_t.use_future_t..use_future_t..use_future_t]
-Construct using default-constructed allocator.
-
-
- constexpr ``[link asio.reference.use_future_t.use_future_t.overload1 use_future_t]``();
- `` [''''&raquo;''' [link asio.reference.use_future_t.use_future_t.overload1 more...]]``
-
-
-Construct using specified allocator.
-
-
- explicit ``[link asio.reference.use_future_t.use_future_t.overload2 use_future_t]``(
- const Allocator & allocator);
- `` [''''&raquo;''' [link asio.reference.use_future_t.use_future_t.overload2 more...]]``
-
-
-[section:overload1 use_future_t::use_future_t (1 of 2 overloads)]
-
-
-Construct using default-constructed allocator.
-
-
- constexpr use_future_t();
-
-
-
-[endsect]
-
-
-
-[section:overload2 use_future_t::use_future_t (2 of 2 overloads)]
-
-
-Construct using specified allocator.
-
-
- use_future_t(
- const Allocator & allocator);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:use_service use_service]
-
-[indexterm1 asio.indexterm.use_service..use_service]
-
- template<
- typename ``[link asio.reference.Service Service]``>
- Service & ``[link asio.reference.use_service.overload1 use_service]``(
- execution_context & e);
- `` [''''&raquo;''' [link asio.reference.use_service.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.Service Service]``>
- Service & ``[link asio.reference.use_service.overload2 use_service]``(
- io_context & ioc);
- `` [''''&raquo;''' [link asio.reference.use_service.overload2 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/impl/execution_context.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 use_service (1 of 2 overloads)]
-
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- Service & use_service(
- execution_context & e);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.execution_context `execution_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[e][The [link asio.reference.execution_context `execution_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 use_service (2 of 2 overloads)]
-
-
-
- template<
- typename ``[link asio.reference.Service Service]``>
- Service & use_service(
- io_context & ioc);
-
-
-This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the [link asio.reference.io_context `io_context`] will create a new instance of the service.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ioc][The [link asio.reference.io_context `io_context`] object that owns the service.]]
-
-]
-
-
-[heading Return Value]
-
-The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.
-
-
-[heading Remarks]
-
-This overload is preserved for backwards compatibility with services that inherit from [link asio.reference.io_context__service `io_context::service`].
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:uses_executor uses_executor]
-
-
-The [link asio.reference.uses_executor `uses_executor`] trait detects whether a type T has an associated executor that is convertible from type Executor.
-
-
- template<
- typename T,
- typename ``[link asio.reference.Executor1 Executor]``>
- struct uses_executor
-
-
-Meets the BinaryTypeTrait requirements. The Asio library provides a definition that is derived from false\_type. A program may specialize this template to derive from true\_type for a user-defined type T that can be constructed with an executor, where the first argument of a constructor has type [link asio.reference.executor_arg_t `executor_arg_t`] and the second argument is convertible from type Executor.
-
-[heading Requirements]
-
-['Header: ][^asio/uses_executor.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-[section:wait_traits wait_traits]
-
-
-Wait traits suitable for use with the [link asio.reference.basic_waitable_timer `basic_waitable_timer`] class template.
-
-
- template<
- typename Clock>
- struct wait_traits
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.wait_traits.to_wait_duration [*to_wait_duration]]]
- [Convert a clock duration into a duration used for waiting. ]
- ]
-
-]
-
-[heading Requirements]
-
-['Header: ][^asio/wait_traits.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:to_wait_duration wait_traits::to_wait_duration]
-
-[indexterm2 asio.indexterm.wait_traits.to_wait_duration..to_wait_duration..wait_traits]
-Convert a clock duration into a duration used for waiting.
-
-
- static Clock::duration ``[link asio.reference.wait_traits.to_wait_duration.overload1 to_wait_duration]``(
- const typename Clock::duration & d);
- `` [''''&raquo;''' [link asio.reference.wait_traits.to_wait_duration.overload1 more...]]``
-
- static Clock::duration ``[link asio.reference.wait_traits.to_wait_duration.overload2 to_wait_duration]``(
- const typename Clock::time_point & t);
- `` [''''&raquo;''' [link asio.reference.wait_traits.to_wait_duration.overload2 more...]]``
-
-
-[section:overload1 wait_traits::to_wait_duration (1 of 2 overloads)]
-
-
-Convert a clock duration into a duration used for waiting.
-
-
- static Clock::duration to_wait_duration(
- const typename Clock::duration & d);
-
-
-
-[heading Return Value]
-
-`d`.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 wait_traits::to_wait_duration (2 of 2 overloads)]
-
-
-Convert a clock duration into a duration used for waiting.
-
-
- static Clock::duration to_wait_duration(
- const typename Clock::time_point & t);
-
-
-
-[heading Return Value]
-
-`d`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:windows__object_handle windows::object_handle]
-
-
-Provides object-oriented handle functionality.
-
-
- class object_handle
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__object_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__object_handle.lowest_layer_type [*lowest_layer_type]]]
- [An object_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__object_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__object_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.async_wait [*async_wait]]]
- [Start an asynchronous wait on the object handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.object_handle [*object_handle]]]
- [Construct an object_handle without opening it.
-
- Construct an object_handle on an existing native handle.
-
- Move-construct an object_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.operator_eq_ [*operator=]]]
- [Move-assign an object_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.wait [*wait]]]
- [Perform a blocking wait on the object handle. ]
- ]
-
-]
-
-The [link asio.reference.windows__object_handle `windows::object_handle`] class provides asynchronous and blocking object-oriented handle functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign windows::object_handle::assign]
-
-[indexterm2 asio.indexterm.windows__object_handle.assign..assign..windows::object_handle]
-Assign an existing native handle to the handle.
-
-
- void ``[link asio.reference.windows__object_handle.assign.overload1 assign]``(
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.assign.overload1 more...]]``
-
- void ``[link asio.reference.windows__object_handle.assign.overload2 assign]``(
- const native_handle_type & handle,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.assign.overload2 more...]]``
-
-
-[section:overload1 windows::object_handle::assign (1 of 2 overloads)]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle);
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::object_handle::assign (2 of 2 overloads)]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_wait windows::object_handle::async_wait]
-
-[indexterm2 asio.indexterm.windows__object_handle.async_wait..async_wait..windows::object_handle]
-Start an asynchronous wait on the object handle.
-
-
- template<
- typename ``[link asio.reference.WaitHandler WaitHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_wait(
- WaitHandler && handler);
-
-
-This function is be used to initiate an asynchronous wait against the object handle. It always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[handler][The handler to be called when the object handle is set to the signalled state. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error // Result of operation.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[section:cancel windows::object_handle::cancel]
-
-[indexterm2 asio.indexterm.windows__object_handle.cancel..cancel..windows::object_handle]
-Cancel all asynchronous operations associated with the handle.
-
-
- void ``[link asio.reference.windows__object_handle.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.cancel.overload1 more...]]``
-
- void ``[link asio.reference.windows__object_handle.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.cancel.overload2 more...]]``
-
-
-[section:overload1 windows::object_handle::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::object_handle::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close windows::object_handle::close]
-
-[indexterm2 asio.indexterm.windows__object_handle.close..close..windows::object_handle]
-Close the handle.
-
-
- void ``[link asio.reference.windows__object_handle.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.close.overload1 more...]]``
-
- void ``[link asio.reference.windows__object_handle.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.close.overload2 more...]]``
-
-
-[section:overload1 windows::object_handle::close (1 of 2 overloads)]
-
-
-Close the handle.
-
-
- void close();
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::object_handle::close (2 of 2 overloads)]
-
-
-Close the handle.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type windows::object_handle::executor_type]
-
-[indexterm2 asio.indexterm.windows__object_handle.executor_type..executor_type..windows::object_handle]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor windows::object_handle::get_executor]
-
-[indexterm2 asio.indexterm.windows__object_handle.get_executor..get_executor..windows::object_handle]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::object_handle::get_io_context]
-
-[indexterm2 asio.indexterm.windows__object_handle.get_io_context..get_io_context..windows::object_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::object_handle::get_io_service]
-
-[indexterm2 asio.indexterm.windows__object_handle.get_io_service..get_io_service..windows::object_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:is_open windows::object_handle::is_open]
-
-[indexterm2 asio.indexterm.windows__object_handle.is_open..is_open..windows::object_handle]
-Determine whether the handle is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer windows::object_handle::lowest_layer]
-
-[indexterm2 asio.indexterm.windows__object_handle.lowest_layer..lowest_layer..windows::object_handle]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.windows__object_handle.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.windows__object_handle.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 windows::object_handle::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__object_handle `windows::object_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::object_handle::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__object_handle `windows::object_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type windows::object_handle::lowest_layer_type]
-
-[indexterm2 asio.indexterm.windows__object_handle.lowest_layer_type..lowest_layer_type..windows::object_handle]
-An [link asio.reference.windows__object_handle `windows::object_handle`] is always the lowest layer.
-
-
- typedef object_handle lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__object_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__object_handle.lowest_layer_type [*lowest_layer_type]]]
- [An object_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__object_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__object_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.async_wait [*async_wait]]]
- [Start an asynchronous wait on the object handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.object_handle [*object_handle]]]
- [Construct an object_handle without opening it.
-
- Construct an object_handle on an existing native handle.
-
- Move-construct an object_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.operator_eq_ [*operator=]]]
- [Move-assign an object_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__object_handle.wait [*wait]]]
- [Perform a blocking wait on the object handle. ]
- ]
-
-]
-
-The [link asio.reference.windows__object_handle `windows::object_handle`] class provides asynchronous and blocking object-oriented handle functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle windows::object_handle::native_handle]
-
-[indexterm2 asio.indexterm.windows__object_handle.native_handle..native_handle..windows::object_handle]
-Get the native handle representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::object_handle::native_handle_type]
-
-[indexterm2 asio.indexterm.windows__object_handle.native_handle_type..native_handle_type..windows::object_handle]
-The native representation of a handle.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/object_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-[section:object_handle windows::object_handle::object_handle]
-
-[indexterm2 asio.indexterm.windows__object_handle.object_handle..object_handle..windows::object_handle]
-Construct an [link asio.reference.windows__object_handle `windows::object_handle`] without opening it.
-
-
- explicit ``[link asio.reference.windows__object_handle.object_handle.overload1 object_handle]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.object_handle.overload1 more...]]``
-
-
-Construct an [link asio.reference.windows__object_handle `windows::object_handle`] on an existing native handle.
-
-
- ``[link asio.reference.windows__object_handle.object_handle.overload2 object_handle]``(
- asio::io_context & io_context,
- const native_handle_type & native_handle);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.object_handle.overload2 more...]]``
-
-
-Move-construct an [link asio.reference.windows__object_handle `windows::object_handle`] from another.
-
-
- ``[link asio.reference.windows__object_handle.object_handle.overload3 object_handle]``(
- object_handle && other);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.object_handle.overload3 more...]]``
-
-
-[section:overload1 windows::object_handle::object_handle (1 of 3 overloads)]
-
-
-Construct an [link asio.reference.windows__object_handle `windows::object_handle`] without opening it.
-
-
- object_handle(
- asio::io_context & io_context);
-
-
-This constructor creates an object handle without opening it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the object handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::object_handle::object_handle (2 of 3 overloads)]
-
-
-Construct an [link asio.reference.windows__object_handle `windows::object_handle`] on an existing native handle.
-
-
- object_handle(
- asio::io_context & io_context,
- const native_handle_type & native_handle);
-
-
-This constructor creates an object handle object to hold an existing native handle.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the object handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[native_handle][The new underlying handle implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::object_handle::object_handle (3 of 3 overloads)]
-
-
-Move-construct an [link asio.reference.windows__object_handle `windows::object_handle`] from another.
-
-
- object_handle(
- object_handle && other);
-
-
-This constructor moves an object handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__object_handle `windows::object_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `object_handle(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:operator_eq_ windows::object_handle::operator=]
-
-[indexterm2 asio.indexterm.windows__object_handle.operator_eq_..operator=..windows::object_handle]
-Move-assign an [link asio.reference.windows__object_handle `windows::object_handle`] from another.
-
-
- object_handle & operator=(
- object_handle && other);
-
-
-This assignment operator moves an object handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__object_handle `windows::object_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `object_handle(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[section:wait windows::object_handle::wait]
-
-[indexterm2 asio.indexterm.windows__object_handle.wait..wait..windows::object_handle]
-Perform a blocking wait on the object handle.
-
-
- void ``[link asio.reference.windows__object_handle.wait.overload1 wait]``();
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.wait.overload1 more...]]``
-
- void ``[link asio.reference.windows__object_handle.wait.overload2 wait]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__object_handle.wait.overload2 more...]]``
-
-
-[section:overload1 windows::object_handle::wait (1 of 2 overloads)]
-
-
-Perform a blocking wait on the object handle.
-
-
- void wait();
-
-
-This function is used to wait for the object handle to be set to the signalled state. This function blocks and does not return until the object handle has been set to the signalled state.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::object_handle::wait (2 of 2 overloads)]
-
-
-Perform a blocking wait on the object handle.
-
-
- void wait(
- asio::error_code & ec);
-
-
-This function is used to wait for the object handle to be set to the signalled state. This function blocks and does not return until the object handle has been set to the signalled state.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:windows__overlapped_handle windows::overlapped_handle]
-
-
-Provides Windows handle functionality for objects that support overlapped I/O.
-
-
- class overlapped_handle
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
- [An overlapped_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
- [Move-assign an overlapped_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
- [Construct an overlapped_handle without opening it.
-
- Construct an overlapped_handle on an existing native handle.
-
- Move-construct an overlapped_handle from another. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/overlapped_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign windows::overlapped_handle::assign]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.assign..assign..windows::overlapped_handle]
-Assign an existing native handle to the handle.
-
-
- void ``[link asio.reference.windows__overlapped_handle.assign.overload1 assign]``(
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.assign.overload1 more...]]``
-
- void ``[link asio.reference.windows__overlapped_handle.assign.overload2 assign]``(
- const native_handle_type & handle,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.assign.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_handle::assign (1 of 2 overloads)]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle);
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_handle::assign (2 of 2 overloads)]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:cancel windows::overlapped_handle::cancel]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.cancel..cancel..windows::overlapped_handle]
-Cancel all asynchronous operations associated with the handle.
-
-
- void ``[link asio.reference.windows__overlapped_handle.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.cancel.overload1 more...]]``
-
- void ``[link asio.reference.windows__overlapped_handle.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.cancel.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_handle::cancel (1 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_handle::cancel (2 of 2 overloads)]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close windows::overlapped_handle::close]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.close..close..windows::overlapped_handle]
-Close the handle.
-
-
- void ``[link asio.reference.windows__overlapped_handle.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.close.overload1 more...]]``
-
- void ``[link asio.reference.windows__overlapped_handle.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.close.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_handle::close (1 of 2 overloads)]
-
-
-Close the handle.
-
-
- void close();
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_handle::close (2 of 2 overloads)]
-
-
-Close the handle.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type windows::overlapped_handle::executor_type]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.executor_type..executor_type..windows::overlapped_handle]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/overlapped_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor windows::overlapped_handle::get_executor]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.get_executor..get_executor..windows::overlapped_handle]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::overlapped_handle::get_io_context]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.get_io_context..get_io_context..windows::overlapped_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::overlapped_handle::get_io_service]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.get_io_service..get_io_service..windows::overlapped_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:is_open windows::overlapped_handle::is_open]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.is_open..is_open..windows::overlapped_handle]
-Determine whether the handle is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer windows::overlapped_handle::lowest_layer]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.lowest_layer..lowest_layer..windows::overlapped_handle]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.windows__overlapped_handle.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.windows__overlapped_handle.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_handle::lowest_layer (1 of 2 overloads)]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_handle::lowest_layer (2 of 2 overloads)]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type windows::overlapped_handle::lowest_layer_type]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.lowest_layer_type..lowest_layer_type..windows::overlapped_handle]
-An [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] is always the lowest layer.
-
-
- typedef overlapped_handle lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
- [An overlapped_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
- [Move-assign an overlapped_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
- [Construct an overlapped_handle without opening it.
-
- Construct an overlapped_handle on an existing native handle.
-
- Move-construct an overlapped_handle from another. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/overlapped_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle windows::overlapped_handle::native_handle]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.native_handle..native_handle..windows::overlapped_handle]
-Get the native handle representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::overlapped_handle::native_handle_type]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.native_handle_type..native_handle_type..windows::overlapped_handle]
-The native representation of a handle.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/overlapped_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ windows::overlapped_handle::operator=]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.operator_eq_..operator=..windows::overlapped_handle]
-Move-assign an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] from another.
-
-
- overlapped_handle & operator=(
- overlapped_handle && other);
-
-
-This assignment operator moves a handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `overlapped_handle(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[section:overlapped_handle windows::overlapped_handle::overlapped_handle]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle.overlapped_handle..overlapped_handle..windows::overlapped_handle]
-Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] without opening it.
-
-
- explicit ``[link asio.reference.windows__overlapped_handle.overlapped_handle.overload1 overlapped_handle]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.overlapped_handle.overload1 more...]]``
-
-
-Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] on an existing native handle.
-
-
- ``[link asio.reference.windows__overlapped_handle.overlapped_handle.overload2 overlapped_handle]``(
- asio::io_context & io_context,
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.overlapped_handle.overload2 more...]]``
-
-
-Move-construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] from another.
-
-
- ``[link asio.reference.windows__overlapped_handle.overlapped_handle.overload3 overlapped_handle]``(
- overlapped_handle && other);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_handle.overlapped_handle.overload3 more...]]``
-
-
-[section:overload1 windows::overlapped_handle::overlapped_handle (1 of 3 overloads)]
-
-
-Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] without opening it.
-
-
- overlapped_handle(
- asio::io_context & io_context);
-
-
-This constructor creates a handle without opening it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_handle::overlapped_handle (2 of 3 overloads)]
-
-
-Construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] on an existing native handle.
-
-
- overlapped_handle(
- asio::io_context & io_context,
- const native_handle_type & handle);
-
-
-This constructor creates a handle object to hold an existing native handle.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[handle][A native handle.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::overlapped_handle::overlapped_handle (3 of 3 overloads)]
-
-
-Move-construct an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] from another.
-
-
- overlapped_handle(
- overlapped_handle && other);
-
-
-This constructor moves a handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `overlapped_handle(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_overlapped_handle windows::overlapped_handle::~overlapped_handle]
-
-[indexterm2 asio.indexterm.windows__overlapped_handle._overlapped_handle..~overlapped_handle..windows::overlapped_handle]
-Protected destructor to prevent deletion through this type.
-
-
- ~overlapped_handle();
-
-
-This function destroys the handle, cancelling any outstanding asynchronous wait operations associated with the handle as if by calling `cancel`.
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:windows__overlapped_ptr windows::overlapped_ptr]
-
-
-Wraps a handler to create an OVERLAPPED object for use with overlapped I/O.
-
-
- class overlapped_ptr :
- noncopyable
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_ptr.complete [*complete]]]
- [Post completion notification for overlapped operation. Releases ownership. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_ptr.get [*get]]]
- [Get the contained OVERLAPPED object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_ptr.overlapped_ptr [*overlapped_ptr]]]
- [Construct an empty overlapped_ptr.
-
- Construct an overlapped_ptr to contain the specified handler. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_ptr.release [*release]]]
- [Release ownership of the OVERLAPPED object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_ptr.reset [*reset]]]
- [Reset to empty.
-
- Reset to contain the specified handler, freeing any current OVERLAPPED object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_ptr._overlapped_ptr [*~overlapped_ptr]]]
- [Destructor automatically frees the OVERLAPPED object unless released. ]
- ]
-
-]
-
-A special-purpose smart pointer used to wrap an application handler so that it can be passed as the LPOVERLAPPED argument to overlapped I/O functions.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/overlapped_ptr.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:complete windows::overlapped_ptr::complete]
-
-[indexterm2 asio.indexterm.windows__overlapped_ptr.complete..complete..windows::overlapped_ptr]
-Post completion notification for overlapped operation. Releases ownership.
-
-
- void complete(
- const asio::error_code & ec,
- std::size_t bytes_transferred);
-
-
-
-[endsect]
-
-
-[section:get windows::overlapped_ptr::get]
-
-[indexterm2 asio.indexterm.windows__overlapped_ptr.get..get..windows::overlapped_ptr]
-Get the contained OVERLAPPED object.
-
-
- OVERLAPPED * ``[link asio.reference.windows__overlapped_ptr.get.overload1 get]``();
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_ptr.get.overload1 more...]]``
-
- const OVERLAPPED * ``[link asio.reference.windows__overlapped_ptr.get.overload2 get]``() const;
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_ptr.get.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_ptr::get (1 of 2 overloads)]
-
-
-Get the contained OVERLAPPED object.
-
-
- OVERLAPPED * get();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_ptr::get (2 of 2 overloads)]
-
-
-Get the contained OVERLAPPED object.
-
-
- const OVERLAPPED * get() const;
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:overlapped_ptr windows::overlapped_ptr::overlapped_ptr]
-
-[indexterm2 asio.indexterm.windows__overlapped_ptr.overlapped_ptr..overlapped_ptr..windows::overlapped_ptr]
-Construct an empty [link asio.reference.windows__overlapped_ptr `windows::overlapped_ptr`].
-
-
- ``[link asio.reference.windows__overlapped_ptr.overlapped_ptr.overload1 overlapped_ptr]``();
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_ptr.overlapped_ptr.overload1 more...]]``
-
-
-Construct an [link asio.reference.windows__overlapped_ptr `windows::overlapped_ptr`] to contain the specified handler.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- explicit ``[link asio.reference.windows__overlapped_ptr.overlapped_ptr.overload2 overlapped_ptr]``(
- asio::io_context & io_context,
- Handler && handler);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_ptr.overlapped_ptr.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_ptr::overlapped_ptr (1 of 2 overloads)]
-
-
-Construct an empty [link asio.reference.windows__overlapped_ptr `windows::overlapped_ptr`].
-
-
- overlapped_ptr();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_ptr::overlapped_ptr (2 of 2 overloads)]
-
-
-Construct an [link asio.reference.windows__overlapped_ptr `windows::overlapped_ptr`] to contain the specified handler.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- overlapped_ptr(
- asio::io_context & io_context,
- Handler && handler);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:release windows::overlapped_ptr::release]
-
-[indexterm2 asio.indexterm.windows__overlapped_ptr.release..release..windows::overlapped_ptr]
-Release ownership of the OVERLAPPED object.
-
-
- OVERLAPPED * release();
-
-
-
-[endsect]
-
-
-[section:reset windows::overlapped_ptr::reset]
-
-[indexterm2 asio.indexterm.windows__overlapped_ptr.reset..reset..windows::overlapped_ptr]
-Reset to empty.
-
-
- void ``[link asio.reference.windows__overlapped_ptr.reset.overload1 reset]``();
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_ptr.reset.overload1 more...]]``
-
-
-Reset to contain the specified handler, freeing any current OVERLAPPED object.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- void ``[link asio.reference.windows__overlapped_ptr.reset.overload2 reset]``(
- asio::io_context & io_context,
- Handler && handler);
- `` [''''&raquo;''' [link asio.reference.windows__overlapped_ptr.reset.overload2 more...]]``
-
-
-[section:overload1 windows::overlapped_ptr::reset (1 of 2 overloads)]
-
-
-Reset to empty.
-
-
- void reset();
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::overlapped_ptr::reset (2 of 2 overloads)]
-
-
-Reset to contain the specified handler, freeing any current OVERLAPPED object.
-
-
- template<
- typename ``[link asio.reference.Handler Handler]``>
- void reset(
- asio::io_context & io_context,
- Handler && handler);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:_overlapped_ptr windows::overlapped_ptr::~overlapped_ptr]
-
-[indexterm2 asio.indexterm.windows__overlapped_ptr._overlapped_ptr..~overlapped_ptr..windows::overlapped_ptr]
-Destructor automatically frees the OVERLAPPED object unless released.
-
-
- ~overlapped_ptr();
-
-
-
-[endsect]
-
-
-
-[endsect]
-
-[section:windows__random_access_handle windows::random_access_handle]
-
-
-Provides random-access handle functionality.
-
-
- class random_access_handle :
- public windows::overlapped_handle
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__random_access_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__random_access_handle.lowest_layer_type [*lowest_layer_type]]]
- [An overlapped_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__random_access_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__random_access_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.async_read_some_at [*async_read_some_at]]]
- [Start an asynchronous read at the specified offset. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.async_write_some_at [*async_write_some_at]]]
- [Start an asynchronous write at the specified offset. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.operator_eq_ [*operator=]]]
- [Move-assign a random_access_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.random_access_handle [*random_access_handle]]]
- [Construct a random_access_handle without opening it.
-
- Construct a random_access_handle on an existing native handle.
-
- Move-construct a random_access_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.read_some_at [*read_some_at]]]
- [Read some data from the handle at the specified offset. ]
- ]
-
- [
- [[link asio.reference.windows__random_access_handle.write_some_at [*write_some_at]]]
- [Write some data to the handle at the specified offset. ]
- ]
-
-]
-
-The [link asio.reference.windows__random_access_handle `windows::random_access_handle`] class provides asynchronous and blocking random-access handle functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign windows::random_access_handle::assign]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.assign..assign..windows::random_access_handle]
-Assign an existing native handle to the handle.
-
-
- void ``[link asio.reference.windows__random_access_handle.assign.overload1 assign]``(
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.assign.overload1 more...]]``
-
- void ``[link asio.reference.windows__random_access_handle.assign.overload2 assign]``(
- const native_handle_type & handle,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.assign.overload2 more...]]``
-
-
-[section:overload1 windows::random_access_handle::assign (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle);
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::assign (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some_at windows::random_access_handle::async_read_some_at]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.async_read_some_at..async_read_some_at..windows::random_access_handle]
-Start an asynchronous read at the specified offset.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some_at(
- uint64_t offset,
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the random-access handle. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read_at `async_read_at`] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.async_read_some_at(42, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some_at windows::random_access_handle::async_write_some_at]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.async_write_some_at..async_write_some_at..windows::random_access_handle]
-Start an asynchronous write at the specified offset.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some_at(
- uint64_t offset,
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the random-access handle. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write_at `async_write_at`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.async_write_some_at(42, asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[section:cancel windows::random_access_handle::cancel]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.cancel..cancel..windows::random_access_handle]
-Cancel all asynchronous operations associated with the handle.
-
-
- void ``[link asio.reference.windows__random_access_handle.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.cancel.overload1 more...]]``
-
- void ``[link asio.reference.windows__random_access_handle.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.cancel.overload2 more...]]``
-
-
-[section:overload1 windows::random_access_handle::cancel (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::cancel (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close windows::random_access_handle::close]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.close..close..windows::random_access_handle]
-Close the handle.
-
-
- void ``[link asio.reference.windows__random_access_handle.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.close.overload1 more...]]``
-
- void ``[link asio.reference.windows__random_access_handle.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.close.overload2 more...]]``
-
-
-[section:overload1 windows::random_access_handle::close (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Close the handle.
-
-
- void close();
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::close (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Close the handle.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type windows::random_access_handle::executor_type]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.executor_type..executor_type..windows::random_access_handle]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor windows::random_access_handle::get_executor]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.get_executor..get_executor..windows::random_access_handle]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::random_access_handle::get_io_context]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.get_io_context..get_io_context..windows::random_access_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::random_access_handle::get_io_service]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.get_io_service..get_io_service..windows::random_access_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:is_open windows::random_access_handle::is_open]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.is_open..is_open..windows::random_access_handle]
-Determine whether the handle is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer windows::random_access_handle::lowest_layer]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.lowest_layer..lowest_layer..windows::random_access_handle]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.windows__random_access_handle.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.windows__random_access_handle.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 windows::random_access_handle::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type windows::random_access_handle::lowest_layer_type]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.lowest_layer_type..lowest_layer_type..windows::random_access_handle]
-An [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] is always the lowest layer.
-
-
- typedef overlapped_handle lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
- [An overlapped_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
- [Move-assign an overlapped_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
- [Construct an overlapped_handle without opening it.
-
- Construct an overlapped_handle on an existing native handle.
-
- Move-construct an overlapped_handle from another. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle windows::random_access_handle::native_handle]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.native_handle..native_handle..windows::random_access_handle]
-Get the native handle representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::random_access_handle::native_handle_type]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.native_handle_type..native_handle_type..windows::random_access_handle]
-The native representation of a handle.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/random_access_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ windows::random_access_handle::operator=]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.operator_eq_..operator=..windows::random_access_handle]
-Move-assign a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] from another.
-
-
- random_access_handle & operator=(
- random_access_handle && other);
-
-
-This assignment operator moves a random-access handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__random_access_handle `windows::random_access_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `random_access_handle(io_context&)` constructor.
-
-
-
-
-[endsect]
-
-
-[section:random_access_handle windows::random_access_handle::random_access_handle]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.random_access_handle..random_access_handle..windows::random_access_handle]
-Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] without opening it.
-
-
- explicit ``[link asio.reference.windows__random_access_handle.random_access_handle.overload1 random_access_handle]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.random_access_handle.overload1 more...]]``
-
-
-Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] on an existing native handle.
-
-
- ``[link asio.reference.windows__random_access_handle.random_access_handle.overload2 random_access_handle]``(
- asio::io_context & io_context,
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.random_access_handle.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] from another.
-
-
- ``[link asio.reference.windows__random_access_handle.random_access_handle.overload3 random_access_handle]``(
- random_access_handle && other);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.random_access_handle.overload3 more...]]``
-
-
-[section:overload1 windows::random_access_handle::random_access_handle (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] without opening it.
-
-
- random_access_handle(
- asio::io_context & io_context);
-
-
-This constructor creates a random-access handle without opening it. The handle needs to be opened before data can be written to or read from it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::random_access_handle (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] on an existing native handle.
-
-
- random_access_handle(
- asio::io_context & io_context,
- const native_handle_type & handle);
-
-
-This constructor creates a random-access handle object to hold an existing native handle.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the random-access handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[handle][The new underlying handle implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::random_access_handle::random_access_handle (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.windows__random_access_handle `windows::random_access_handle`] from another.
-
-
- random_access_handle(
- random_access_handle && other);
-
-
-This constructor moves a random-access handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__random_access_handle `windows::random_access_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `random_access_handle(io_context&)` constructor.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:read_some_at windows::random_access_handle::read_some_at]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.read_some_at..read_some_at..windows::random_access_handle]
-Read some data from the handle at the specified offset.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.windows__random_access_handle.read_some_at.overload1 read_some_at]``(
- uint64_t offset,
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.read_some_at.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.windows__random_access_handle.read_some_at.overload2 read_some_at]``(
- uint64_t offset,
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.read_some_at.overload2 more...]]``
-
-
-[section:overload1 windows::random_access_handle::read_some_at (1 of 2 overloads)]
-
-
-Read some data from the handle at the specified offset.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some_at(
- uint64_t offset,
- const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read_at `read_at`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.read_some_at(42, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::read_some_at (2 of 2 overloads)]
-
-
-Read some data from the handle at the specified offset.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some_at(
- uint64_t offset,
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read data from the random-access handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[offset][The offset at which the data will be read.]]
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read_at `read_at`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some_at windows::random_access_handle::write_some_at]
-
-[indexterm2 asio.indexterm.windows__random_access_handle.write_some_at..write_some_at..windows::random_access_handle]
-Write some data to the handle at the specified offset.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.windows__random_access_handle.write_some_at.overload1 write_some_at]``(
- uint64_t offset,
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.write_some_at.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.windows__random_access_handle.write_some_at.overload2 write_some_at]``(
- uint64_t offset,
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__random_access_handle.write_some_at.overload2 more...]]``
-
-
-[section:overload1 windows::random_access_handle::write_some_at (1 of 2 overloads)]
-
-
-Write some data to the handle at the specified offset.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some_at(
- uint64_t offset,
- const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more data buffers to be written to the handle.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The write\_some\_at operation may not write all of the data. Consider using the [link asio.reference.write_at `write_at`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.write_some_at(42, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::random_access_handle::write_some_at (2 of 2 overloads)]
-
-
-Write some data to the handle at the specified offset.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some_at(
- uint64_t offset,
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write data to the random-access handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more data buffers to be written to the handle.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write_at `write_at`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:windows__stream_handle windows::stream_handle]
-
-
-Provides stream-oriented handle functionality.
-
-
- class stream_handle :
- public windows::overlapped_handle
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__stream_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__stream_handle.lowest_layer_type [*lowest_layer_type]]]
- [An overlapped_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__stream_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__stream_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.async_read_some [*async_read_some]]]
- [Start an asynchronous read. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.async_write_some [*async_write_some]]]
- [Start an asynchronous write. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.operator_eq_ [*operator=]]]
- [Move-assign a stream_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.read_some [*read_some]]]
- [Read some data from the handle. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.stream_handle [*stream_handle]]]
- [Construct a stream_handle without opening it.
-
- Construct a stream_handle on an existing native handle.
-
- Move-construct a stream_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__stream_handle.write_some [*write_some]]]
- [Write some data to the handle. ]
- ]
-
-]
-
-The [link asio.reference.windows__stream_handle `windows::stream_handle`] class provides asynchronous and blocking stream-oriented handle functionality.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-[section:assign windows::stream_handle::assign]
-
-[indexterm2 asio.indexterm.windows__stream_handle.assign..assign..windows::stream_handle]
-Assign an existing native handle to the handle.
-
-
- void ``[link asio.reference.windows__stream_handle.assign.overload1 assign]``(
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.assign.overload1 more...]]``
-
- void ``[link asio.reference.windows__stream_handle.assign.overload2 assign]``(
- const native_handle_type & handle,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.assign.overload2 more...]]``
-
-
-[section:overload1 windows::stream_handle::assign (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle);
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::assign (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Assign an existing native handle to the handle.
-
-
- void assign(
- const native_handle_type & handle,
- asio::error_code & ec);
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:async_read_some windows::stream_handle::async_read_some]
-
-[indexterm2 asio.indexterm.windows__stream_handle.async_read_some..async_read_some..windows::stream_handle]
-Start an asynchronous read.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``,
- typename ``[link asio.reference.ReadHandler ReadHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_some(
- const MutableBufferSequence & buffers,
- ReadHandler && handler);
-
-
-This function is used to asynchronously read data from the stream handle. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the read operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes read.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The read operation may not read all of the requested number of bytes. Consider using the [link asio.reference.async_read `async_read`] function if you need to ensure that the requested amount of data is read before the asynchronous operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.async_read_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:async_write_some windows::stream_handle::async_write_some]
-
-[indexterm2 asio.indexterm.windows__stream_handle.async_write_some..async_write_some..windows::stream_handle]
-Start an asynchronous write.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.WriteHandler WriteHandler]``>
- ``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write_some(
- const ConstBufferSequence & buffers,
- WriteHandler && handler);
-
-
-This function is used to asynchronously write data to the stream handle. The function call always returns immediately.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the handle. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called.]]
-
-[[handler][The handler to be called when the write operation completes. Copies will be made of the handler as required. The function signature of the handler must be:
-``
- void handler(
- const asio::error_code& error, // Result of operation.
- std::size_t bytes_transferred // Number of bytes written.
- );
-``
-Regardless of whether the asynchronous operation completes immediately or not, the handler will not be invoked from within this function. Invocation of the handler will be performed in a manner equivalent to using `asio::io_context::post()`.]]
-
-]
-
-
-[heading Remarks]
-
-The write operation may not transmit all of the data to the peer. Consider using the [link asio.reference.async_write `async_write`] function if you need to ensure that all data is written before the asynchronous operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.async_write_some(asio::buffer(data, size), handler);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-[section:cancel windows::stream_handle::cancel]
-
-[indexterm2 asio.indexterm.windows__stream_handle.cancel..cancel..windows::stream_handle]
-Cancel all asynchronous operations associated with the handle.
-
-
- void ``[link asio.reference.windows__stream_handle.cancel.overload1 cancel]``();
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.cancel.overload1 more...]]``
-
- void ``[link asio.reference.windows__stream_handle.cancel.overload2 cancel]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.cancel.overload2 more...]]``
-
-
-[section:overload1 windows::stream_handle::cancel (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel();
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::cancel (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Cancel all asynchronous operations associated with the handle.
-
-
- void cancel(
- asio::error_code & ec);
-
-
-This function causes all outstanding asynchronous read or write operations to finish immediately, and the handlers for cancelled operations will be passed the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:close windows::stream_handle::close]
-
-[indexterm2 asio.indexterm.windows__stream_handle.close..close..windows::stream_handle]
-Close the handle.
-
-
- void ``[link asio.reference.windows__stream_handle.close.overload1 close]``();
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.close.overload1 more...]]``
-
- void ``[link asio.reference.windows__stream_handle.close.overload2 close]``(
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.close.overload2 more...]]``
-
-
-[section:overload1 windows::stream_handle::close (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Close the handle.
-
-
- void close();
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::close (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Close the handle.
-
-
- void close(
- asio::error_code & ec);
-
-
-This function is used to close the handle. Any asynchronous read or write operations will be cancelled immediately, and will complete with the `asio::error::operation_aborted` error.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[ec][Set to indicate what error occurred, if any. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:executor_type windows::stream_handle::executor_type]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.executor_type..executor_type..windows::stream_handle]
-The type of the executor associated with the object.
-
-
- typedef io_context::executor_type executor_type;
-
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.context [*context]]]
- [Obtain the underlying execution context. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.defer [*defer]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.dispatch [*dispatch]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_finished [*on_work_finished]]]
- [Inform the io_context that some work is no longer outstanding. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.on_work_started [*on_work_started]]]
- [Inform the io_context that it has some outstanding work to do. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.post [*post]]]
- [Request the io_context to invoke the given function object. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.running_in_this_thread [*running_in_this_thread]]]
- [Determine whether the io_context is running in the current thread. ]
- ]
-
-]
-
-[heading Friends]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.io_context__executor_type.operator_not__eq_ [*operator!=]]]
- [Compare two executors for inequality. ]
- ]
-
- [
- [[link asio.reference.io_context__executor_type.operator_eq__eq_ [*operator==]]]
- [Compare two executors for equality. ]
- ]
-
-]
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:get_executor windows::stream_handle::get_executor]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.get_executor..get_executor..windows::stream_handle]
-Get the executor associated with the object.
-
-
- executor_type get_executor();
-
-
-
-[endsect]
-
-
-
-[section:get_io_context windows::stream_handle::get_io_context]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.get_io_context..get_io_context..windows::stream_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_context();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:get_io_service windows::stream_handle::get_io_service]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.get_io_service..get_io_service..windows::stream_handle]
-(Deprecated: Use `get_executor()`.) Get the [link asio.reference.io_context `io_context`] associated with the object.
-
-
- asio::io_context & get_io_service();
-
-
-This function may be used to obtain the [link asio.reference.io_context `io_context`] object that the I/O object uses to dispatch handlers for asynchronous operations.
-
-
-[heading Return Value]
-
-A reference to the [link asio.reference.io_context `io_context`] object that the I/O object will use to dispatch handlers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:is_open windows::stream_handle::is_open]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.is_open..is_open..windows::stream_handle]
-Determine whether the handle is open.
-
-
- bool is_open() const;
-
-
-
-[endsect]
-
-
-[section:lowest_layer windows::stream_handle::lowest_layer]
-
-[indexterm2 asio.indexterm.windows__stream_handle.lowest_layer..lowest_layer..windows::stream_handle]
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & ``[link asio.reference.windows__stream_handle.lowest_layer.overload1 lowest_layer]``();
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.lowest_layer.overload1 more...]]``
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & ``[link asio.reference.windows__stream_handle.lowest_layer.overload2 lowest_layer]``() const;
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.lowest_layer.overload2 more...]]``
-
-
-[section:overload1 windows::stream_handle::lowest_layer (1 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Get a reference to the lowest layer.
-
-
- lowest_layer_type & lowest_layer();
-
-
-This function returns a reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::lowest_layer (2 of 2 overloads)]
-
-
-['Inherited from windows::overlapped_handle.]
-
-
-Get a const reference to the lowest layer.
-
-
- const lowest_layer_type & lowest_layer() const;
-
-
-This function returns a const reference to the lowest layer in a stack of layers. Since an [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] cannot contain any further layers, it simply returns a reference to itself.
-
-
-[heading Return Value]
-
-A const reference to the lowest layer in the stack of layers. Ownership is not transferred to the caller.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:lowest_layer_type windows::stream_handle::lowest_layer_type]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.lowest_layer_type..lowest_layer_type..windows::stream_handle]
-An [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] is always the lowest layer.
-
-
- typedef overlapped_handle lowest_layer_type;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.executor_type [*executor_type]]]
- [The type of the executor associated with the object. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.lowest_layer_type [*lowest_layer_type]]]
- [An overlapped_handle is always the lowest layer. ]
-
- ]
-
- [
-
- [[link asio.reference.windows__overlapped_handle.native_handle_type [*native_handle_type]]]
- [The native representation of a handle. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle.assign [*assign]]]
- [Assign an existing native handle to the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.cancel [*cancel]]]
- [Cancel all asynchronous operations associated with the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.close [*close]]]
- [Close the handle. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_executor [*get_executor]]]
- [Get the executor associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_context [*get_io_context]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.get_io_service [*get_io_service]]]
- [(Deprecated: Use get_executor().) Get the io_context associated with the object. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.is_open [*is_open]]]
- [Determine whether the handle is open. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.lowest_layer [*lowest_layer]]]
- [Get a reference to the lowest layer.
-
- Get a const reference to the lowest layer. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.native_handle [*native_handle]]]
- [Get the native handle representation. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.operator_eq_ [*operator=]]]
- [Move-assign an overlapped_handle from another. ]
- ]
-
- [
- [[link asio.reference.windows__overlapped_handle.overlapped_handle [*overlapped_handle]]]
- [Construct an overlapped_handle without opening it.
-
- Construct an overlapped_handle on an existing native handle.
-
- Move-construct an overlapped_handle from another. ]
- ]
-
-]
-
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.windows__overlapped_handle._overlapped_handle [*~overlapped_handle]]]
- [Protected destructor to prevent deletion through this type. ]
- ]
-
-]
-
-The [link asio.reference.windows__overlapped_handle `windows::overlapped_handle`] class provides the ability to wrap a Windows handle. The underlying object referred to by the handle must support overlapped I/O.
-
-
-[heading Thread Safety]
-
-['Distinct] ['objects:] Safe.
-
-['Shared] ['objects:] Unsafe.
-
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:native_handle windows::stream_handle::native_handle]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.native_handle..native_handle..windows::stream_handle]
-Get the native handle representation.
-
-
- native_handle_type native_handle();
-
-
-This function may be used to obtain the underlying representation of the handle. This is intended to allow access to native handle functionality that is not otherwise provided.
-
-
-[endsect]
-
-
-
-[section:native_handle_type windows::stream_handle::native_handle_type]
-
-
-['Inherited from windows::overlapped_handle.]
-
-[indexterm2 asio.indexterm.windows__stream_handle.native_handle_type..native_handle_type..windows::stream_handle]
-The native representation of a handle.
-
-
- typedef implementation_defined native_handle_type;
-
-
-
-[heading Requirements]
-
-['Header: ][^asio/windows/stream_handle.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[endsect]
-
-
-
-[section:operator_eq_ windows::stream_handle::operator=]
-
-[indexterm2 asio.indexterm.windows__stream_handle.operator_eq_..operator=..windows::stream_handle]
-Move-assign a [link asio.reference.windows__stream_handle `windows::stream_handle`] from another.
-
-
- stream_handle & operator=(
- stream_handle && other);
-
-
-This assignment operator moves a stream handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__stream_handle `windows::stream_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `stream_handle(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[section:read_some windows::stream_handle::read_some]
-
-[indexterm2 asio.indexterm.windows__stream_handle.read_some..read_some..windows::stream_handle]
-Read some data from the handle.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.windows__stream_handle.read_some.overload1 read_some]``(
- const MutableBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.read_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t ``[link asio.reference.windows__stream_handle.read_some.overload2 read_some]``(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.read_some.overload2 more...]]``
-
-
-[section:overload1 windows::stream_handle::read_some (1 of 2 overloads)]
-
-
-Read some data from the handle.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers);
-
-
-This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-[heading Example]
-
-To read into a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.read_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on reading into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::read_some (2 of 2 overloads)]
-
-
-Read some data from the handle.
-
-
- template<
- typename ``[link asio.reference.MutableBufferSequence MutableBufferSequence]``>
- std::size_t read_some(
- const MutableBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to read data from the stream handle. The function call will block until one or more bytes of data has been read successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more buffers into which the data will be read.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes read. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The read\_some operation may not read all of the requested number of bytes. Consider using the [link asio.reference.read `read`] function if you need to ensure that the requested amount of data is read before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:stream_handle windows::stream_handle::stream_handle]
-
-[indexterm2 asio.indexterm.windows__stream_handle.stream_handle..stream_handle..windows::stream_handle]
-Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] without opening it.
-
-
- explicit ``[link asio.reference.windows__stream_handle.stream_handle.overload1 stream_handle]``(
- asio::io_context & io_context);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.stream_handle.overload1 more...]]``
-
-
-Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] on an existing native handle.
-
-
- ``[link asio.reference.windows__stream_handle.stream_handle.overload2 stream_handle]``(
- asio::io_context & io_context,
- const native_handle_type & handle);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.stream_handle.overload2 more...]]``
-
-
-Move-construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] from another.
-
-
- ``[link asio.reference.windows__stream_handle.stream_handle.overload3 stream_handle]``(
- stream_handle && other);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.stream_handle.overload3 more...]]``
-
-
-[section:overload1 windows::stream_handle::stream_handle (1 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] without opening it.
-
-
- stream_handle(
- asio::io_context & io_context);
-
-
-This constructor creates a stream handle without opening it. The handle needs to be opened and then connected or accepted before data can be sent or received on it.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::stream_handle (2 of 3 overloads)]
-
-
-Construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] on an existing native handle.
-
-
- stream_handle(
- asio::io_context & io_context,
- const native_handle_type & handle);
-
-
-This constructor creates a stream handle object to hold an existing native handle.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[io_context][The [link asio.reference.io_context `io_context`] object that the stream handle will use to dispatch handlers for any asynchronous operations performed on the handle.]]
-
-[[handle][The new underlying handle implementation.]]
-
-]
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 windows::stream_handle::stream_handle (3 of 3 overloads)]
-
-
-Move-construct a [link asio.reference.windows__stream_handle `windows::stream_handle`] from another.
-
-
- stream_handle(
- stream_handle && other);
-
-
-This constructor moves a stream handle from one object to another.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[other][The other [link asio.reference.windows__stream_handle `windows::stream_handle`] object from which the move will occur.]]
-
-]
-
-
-[heading Remarks]
-
-Following the move, the moved-from object is in the same state as if constructed using the `stream_handle(io_context&) constructor`.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_some windows::stream_handle::write_some]
-
-[indexterm2 asio.indexterm.windows__stream_handle.write_some..write_some..windows::stream_handle]
-Write some data to the handle.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.windows__stream_handle.write_some.overload1 write_some]``(
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.write_some.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.windows__stream_handle.write_some.overload2 write_some]``(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.windows__stream_handle.write_some.overload2 more...]]``
-
-
-[section:overload1 windows::stream_handle::write_some (1 of 2 overloads)]
-
-
-Write some data to the handle.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers);
-
-
-This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the handle.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. An error code of `asio::error::eof` indicates that the connection was closed by the peer.]]
-
-]
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- handle.write_some(asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 windows::stream_handle::write_some (2 of 2 overloads)]
-
-
-Write some data to the handle.
-
-
- template<
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_some(
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write data to the stream handle. The function call will block until one or more bytes of the data has been written successfully, or until an error occurs.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[buffers][One or more data buffers to be written to the handle.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. Returns 0 if an error occurred.
-
-
-[heading Remarks]
-
-The write\_some operation may not transmit all of the data to the peer. Consider using the [link asio.reference.write `write`] function if you need to ensure that all data is written before the blocking operation completes.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write write]
-
-[indexterm1 asio.indexterm.write..write]
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.write.overload1 write]``(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.write.overload2 write]``(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- asio::error_code & ec,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write.overload3 write]``(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write.overload4 write]``(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.write.overload5 write]``(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t ``[link asio.reference.write.overload6 write]``(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write.overload7 write]``(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write.overload8 write]``(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
- `` [''''&raquo;''' [link asio.reference.write.overload8 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.write.overload9 write]``(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b);
- `` [''''&raquo;''' [link asio.reference.write.overload9 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator>
- std::size_t ``[link asio.reference.write.overload10 write]``(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.write.overload10 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write.overload11 write]``(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
- `` [''''&raquo;''' [link asio.reference.write.overload11 more...]]``
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write.overload12 write]``(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.write.overload12 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/write.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 write (1 of 12 overloads)]
-
-
-Write all of the supplied data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::write(s, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write(
- s, buffers,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 write (2 of 12 overloads)]
-
-
-Write all of the supplied data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- asio::error_code & ec,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::write(s, asio::buffer(data, size), ec);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write(
- s, buffers,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 write (3 of 12 overloads)]
-
-
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's write\_some function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::write(s, asio::buffer(data, size),
- asio::transfer_at_least(32));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 write (4 of 12 overloads)]
-
-
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write(
- SyncWriteStream & s,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_const_buffer_sequence< ConstBufferSequence >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's write\_some function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 write (5 of 12 overloads)]
-
-
-Write all of the supplied data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t write(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied dynamic buffer sequence has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][The dynamic buffer sequence from which data will be written. Successfully written data is automatically consumed from the buffers.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write(
- s, buffers,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 write (6 of 12 overloads)]
-
-
-Write all of the supplied data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
- std::size_t write(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied dynamic buffer sequence has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][The dynamic buffer sequence from which data will be written. Successfully written data is automatically consumed from the buffers.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write(
- s, buffers,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 write (7 of 12 overloads)]
-
-
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied dynamic buffer sequence has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][The dynamic buffer sequence from which data will be written. Successfully written data is automatically consumed from the buffers.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's write\_some function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 write (8 of 12 overloads)]
-
-
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write(
- SyncWriteStream & s,
- DynamicBuffer && buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec,
- typename enable_if< is_dynamic_buffer< DynamicBuffer >::value >::type * = 0);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied dynamic buffer sequence has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[buffers][The dynamic buffer sequence from which data will be written. Successfully written data is automatically consumed from the buffers.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's write\_some function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-
-[section:overload9 write (9 of 12 overloads)]
-
-
-Write all of the supplied data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator>
- std::size_t write(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write(
- s, b,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload10 write (10 of 12 overloads)]
-
-
-Write all of the supplied data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator>
- std::size_t write(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write(
- s, b,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload11 write (11 of 12 overloads)]
-
-
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's write\_some function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload12 write (12 of 12 overloads)]
-
-
-Write a certain amount of data to a stream before returning.
-
-
- template<
- typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write(
- SyncWriteStream & s,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
-
-
-This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the stream's write\_some function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[s][The stream to which the data is to be written. The type must support the SyncWriteStream concept.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the stream's write\_some function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-[section:write_at write_at]
-
-[indexterm1 asio.indexterm.write_at..write_at]
-Write a certain amount of data at a specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.write_at.overload1 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers);
- `` [''''&raquo;''' [link asio.reference.write_at.overload1 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t ``[link asio.reference.write_at.overload2 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.write_at.overload2 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write_at.overload3 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition);
- `` [''''&raquo;''' [link asio.reference.write_at.overload3 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write_at.overload4 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.write_at.overload4 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator>
- std::size_t ``[link asio.reference.write_at.overload5 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b);
- `` [''''&raquo;''' [link asio.reference.write_at.overload5 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator>
- std::size_t ``[link asio.reference.write_at.overload6 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.write_at.overload6 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write_at.overload7 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
- `` [''''&raquo;''' [link asio.reference.write_at.overload7 more...]]``
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t ``[link asio.reference.write_at.overload8 write_at]``(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
- `` [''''&raquo;''' [link asio.reference.write_at.overload8 more...]]``
-
-[heading Requirements]
-
-['Header: ][^asio/write_at.hpp]
-
-['Convenience header: ][^asio.hpp]
-
-
-[section:overload1 write_at (1 of 8 overloads)]
-
-
-Write all of the supplied data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::write_at(d, 42, asio::buffer(data, size));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write_at(
- d, offset, buffers,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload2 write_at (2 of 8 overloads)]
-
-
-Write all of the supplied data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- asio::error_code & ec);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::write_at(d, 42,
- asio::buffer(data, size), ec);
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write_at(
- d, offset, buffers,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload3 write_at (3 of 8 overloads)]
-
-
-Write a certain amount of data at a specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the device's write\_some\_at function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Example]
-
-To write a single data buffer use the [link asio.reference.buffer `buffer`] function as follows:
-
- asio::write_at(d, 42, asio::buffer(data, size),
- asio::transfer_at_least(32));
-
-
-See the [link asio.reference.buffer `buffer`] documentation for information on writing multiple buffers in one go, and how to use it with arrays, boost::array or std::vector.
-
-
-
-
-[endsect]
-
-
-
-[section:overload4 write_at (4 of 8 overloads)]
-
-
-Write a certain amount of data at a specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename ``[link asio.reference.ConstBufferSequence ConstBufferSequence]``,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- const ConstBufferSequence & buffers,
- CompletionCondition completion_condition,
- asio::error_code & ec);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied buffers has been written. That is, the bytes transferred is equal to the sum of the buffer sizes.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[buffers][One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the device.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the device's write\_some\_at function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-
-[section:overload5 write_at (5 of 8 overloads)]
-
-
-Write all of the supplied data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure.]]
-
-]
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write_at(
- d, 42, b,
- asio::transfer_all());
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload6 write_at (6 of 8 overloads)]
-
-
-Write all of the supplied data at the specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- asio::error_code & ec);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* An error occurred.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Remarks]
-
-This overload is equivalent to calling:
-
- asio::write_at(
- d, 42, b,
- asio::transfer_all(), ec);
-
-
-
-
-
-
-
-[endsect]
-
-
-
-[section:overload7 write_at (7 of 8 overloads)]
-
-
-Write a certain amount of data at a specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the device's write\_some\_at function.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes transferred.
-
-
-[heading Exceptions]
-
-
-[variablelist
-
-[[asio::system_error][Thrown on failure. ]]
-
-]
-
-
-
-
-[endsect]
-
-
-
-[section:overload8 write_at (8 of 8 overloads)]
-
-
-Write a certain amount of data at a specified offset before returning.
-
-
- template<
- typename ``[link asio.reference.SyncRandomAccessWriteDevice SyncRandomAccessWriteDevice]``,
- typename Allocator,
- typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
- std::size_t write_at(
- SyncRandomAccessWriteDevice & d,
- uint64_t offset,
- basic_streambuf< Allocator > & b,
- CompletionCondition completion_condition,
- asio::error_code & ec);
-
-
-This function is used to write a certain number of bytes of data to a random access device at a specified offset. The call will block until one of the following conditions is true:
-
-
-* All of the data in the supplied [link asio.reference.basic_streambuf `basic_streambuf`] has been written.
-
-
-* The completion\_condition function object returns 0.
-
-This operation is implemented in terms of zero or more calls to the device's write\_some\_at function.
-
-
-[heading Parameters]
-
-
-[variablelist
-
-[[d][The device to which the data is to be written. The type must support the SyncRandomAccessWriteDevice concept.]]
-
-[[offset][The offset at which the data will be written.]]
-
-[[b][The [link asio.reference.basic_streambuf `basic_streambuf`] object from which data will be written.]]
-
-[[completion_condition][The function object to be called to determine whether the write operation is complete. The signature of the function object must be:
-``
- std::size_t completion_condition(
- // Result of latest write_some_at operation.
- const asio::error_code& error,
-
- // Number of bytes transferred so far.
- std::size_t bytes_transferred
- );
-``
-A return value of 0 indicates that the write operation is complete. A non-zero return value indicates the maximum number of bytes to be written on the next call to the device's write\_some\_at function.]]
-
-[[ec][Set to indicate what error occurred, if any.]]
-
-]
-
-
-[heading Return Value]
-
-The number of bytes written. If an error occurs, returns the total number of bytes successfully transferred prior to the error.
-
-
-
-
-[endsect]
-
-
-[endsect]
-
-
-[section:yield_context yield_context]
-
-[indexterm1 asio.indexterm.yield_context..yield_context]
-Context object that represents the currently executing coroutine.
-
-
- typedef basic_yield_context< unspecified > yield_context;
-
-
-[heading Types]
-[table
- [[Name][Description]]
-
- [
-
- [[link asio.reference.basic_yield_context.callee_type [*callee_type]]]
- [The coroutine callee type, used by the implementation. ]
-
- ]
-
- [
-
- [[link asio.reference.basic_yield_context.caller_type [*caller_type]]]
- [The coroutine caller type, used by the implementation. ]
-
- ]
-
-]
-
-[heading Member Functions]
-[table
- [[Name][Description]]
-
- [
- [[link asio.reference.basic_yield_context.basic_yield_context [*basic_yield_context]]]
- [Construct a yield context to represent the specified coroutine.
-
- Construct a yield context from another yield context type. ]
- ]
-
- [
- [[link asio.reference.basic_yield_context.operator_lb__rb_ [*operator\[\]]]]
- [Return a yield context that sets the specified error_code. ]
- ]
-
-]
-
-The [link asio.reference.basic_yield_context `basic_yield_context`] class is used to represent the currently executing stackful coroutine. A [link asio.reference.basic_yield_context `basic_yield_context`] may be passed as a handler to an asynchronous operation. For example:
-
-
-
- template <typename Handler>
- void my_coroutine(basic_yield_context<Handler> yield)
- {
- ...
- std::size_t n = my_socket.async_read_some(buffer, yield);
- ...
- }
-
-
-
-
-The initiating function (async\_read\_some in the above example) suspends the current coroutine. The coroutine is resumed when the asynchronous operation completes, and the result of the operation is returned.
-
-
-[heading Requirements]
-
-['Header: ][^asio/spawn.hpp]
-
-['Convenience header: ]None
-
-
-[endsect]
-
-
-[endsect] \ No newline at end of file
diff --git a/3rdparty/asio/src/doc/reference.xsl b/3rdparty/asio/src/doc/reference.xsl
deleted file mode 100644
index e652cd9bd24..00000000000
--- a/3rdparty/asio/src/doc/reference.xsl
+++ /dev/null
@@ -1,1779 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!--
- Copyright (c) 2003-2016 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)
--->
-
-<xsl:output method="text"/>
-<xsl:strip-space elements="*"/>
-<xsl:preserve-space elements="para"/>
-
-
-<xsl:variable name="newline">
-<xsl:text>
-</xsl:text>
-</xsl:variable>
-
-
-<!--
- Loop over all top-level documentation elements (i.e. classes, functions,
- variables and typedefs at namespace scope). The elements are sorted by name.
- Anything in a "detail" namespace or with "_handler" in the name is skipped.
--->
-<xsl:template match="/doxygen">
-<xsl:text>[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:reference Reference]
-
-[xinclude quickref.xml]
-
-[include requirements/asynchronous_operations.qbk]
-[include requirements/read_write_operations.qbk]
-[include requirements/synchronous_socket_operations.qbk]
-[include requirements/asynchronous_socket_operations.qbk]
-[include requirements/AcceptableProtocol.qbk]
-[include requirements/AcceptHandler.qbk]
-[include requirements/AsyncRandomAccessReadDevice.qbk]
-[include requirements/AsyncRandomAccessWriteDevice.qbk]
-[include requirements/AsyncReadStream.qbk]
-[include requirements/AsyncWriteStream.qbk]
-[include requirements/BufferedHandshakeHandler.qbk]
-[include requirements/CompletionCondition.qbk]
-[include requirements/CompletionHandler.qbk]
-[include requirements/ConnectCondition.qbk]
-[include requirements/ConnectHandler.qbk]
-[include requirements/ConstBufferSequence.qbk]
-[include requirements/DynamicBuffer.qbk]
-[include requirements/Endpoint.qbk]
-[include requirements/EndpointSequence.qbk]
-[include requirements/ExecutionContext.qbk]
-[include requirements/Executor.qbk]
-[include requirements/GettableSerialPortOption.qbk]
-[include requirements/GettableSocketOption.qbk]
-[include requirements/Handler.qbk]
-[include requirements/HandshakeHandler.qbk]
-[include requirements/InternetProtocol.qbk]
-[include requirements/IoControlCommand.qbk]
-[include requirements/IoObjectService.qbk]
-[include requirements/IteratorConnectHandler.qbk]
-[include requirements/MoveAcceptHandler.qbk]
-[include requirements/MutableBufferSequence.qbk]
-[include requirements/ProtoAllocator.qbk]
-[include requirements/Protocol.qbk]
-[include requirements/RangeConnectHandler.qbk]
-[include requirements/ReadHandler.qbk]
-[include requirements/ResolveHandler.qbk]
-[include requirements/Service.qbk]
-[include requirements/SettableSerialPortOption.qbk]
-[include requirements/SettableSocketOption.qbk]
-[include requirements/ShutdownHandler.qbk]
-[include requirements/SignalHandler.qbk]
-[include requirements/SyncRandomAccessReadDevice.qbk]
-[include requirements/SyncRandomAccessWriteDevice.qbk]
-[include requirements/SyncReadStream.qbk]
-[include requirements/SyncWriteStream.qbk]
-[include requirements/TimeTraits.qbk]
-[include requirements/WaitHandler.qbk]
-[include requirements/WaitTraits.qbk]
-[include requirements/WriteHandler.qbk]
-
-</xsl:text>
-
- <xsl:for-each select="
- compounddef[@kind = 'class' or @kind = 'struct'] |
- compounddef[@kind = 'namespace']/sectiondef[1]/memberdef">
- <xsl:sort select="concat((. | ancestor::*)/compoundname, '::', name, ':x')"/>
- <xsl:sort select="name"/>
- <xsl:choose>
- <xsl:when test="@kind='class' or @kind='struct'">
- <xsl:if test="
- contains(compoundname, 'asio::') and
- not(contains(compoundname, '::detail')) and
- not(contains(compoundname, '::service::key')) and
- not(contains(compoundname, '_handler')) and
- not(contains(compoundname, 'thread_function')) and
- not(contains(compoundname, 'context_impl'))">
- <xsl:call-template name="class"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="
- not(contains(ancestor::*/compoundname, '::detail')) and
- not(contains(ancestor::*/compoundname, '::service::key')) and
- not(contains(ancestor::*/compoundname, '_helper')) and
- not(contains(name, '_helper')) and
- not(contains(name, 'thread_function')) and
- not(contains(name, 'io_context_impl'))">
- <xsl:call-template name="namespace-memberdef"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
-
- <xsl:value-of select="$newline"/>
- <xsl:text>[endsect]</xsl:text>
-
-</xsl:template>
-
-
-<!--========== Utilities ==========-->
-
-<xsl:template name="strip-asio-ns">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="contains($name, 'boost::system::is_error_code_enum')">
- <xsl:value-of select="$name"/>
- </xsl:when>
- <xsl:when test="contains($name, 'asio::')">
- <xsl:value-of select="substring-after($name, 'asio::')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="strip-ns">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="contains($name, 'boost::system::is_error_code_enum')">
- <xsl:value-of select="$name"/>
- </xsl:when>
- <xsl:when test="contains($name, '::') and contains($name, '&lt;')">
- <xsl:choose>
- <xsl:when test="string-length(substring-before($name, '::')) &lt; string-length(substring-before($name, '&lt;'))">
- <xsl:call-template name="strip-ns">
- <xsl:with-param name="name" select="substring-after($name, '::')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="contains($name, '::')">
- <xsl:call-template name="strip-ns">
- <xsl:with-param name="name" select="substring-after($name, '::')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="cleanup-type">
- <xsl:param name="name"/>
- <xsl:variable name="type">
- <xsl:choose>
- <xsl:when test="contains($name, 'ASIO_DECL ')">
- <xsl:value-of select="substring-after($name, 'ASIO_DECL ')"/>
- </xsl:when>
- <xsl:when test="contains($name, 'ASIO_DECL')">
- <xsl:value-of select="substring-after($name, 'ASIO_DECL')"/>
- </xsl:when>
- <xsl:when test="$name = 'virtual'"></xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$type='void_or_deduced'">
- <xsl:text>``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]``</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$type"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="make-id">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="contains($name, 'boost::system::')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="substring-after($name, 'boost::system::')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, 'boost::asio::error::')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, 'boost::asio::error::'), substring-after($name, 'boost::asio::error::'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '::')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '::'), '__', substring-after($name, '::'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '=')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '='), '_eq_', substring-after($name, '='))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '!')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '!'), '_not_', substring-after($name, '!'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '-&gt;')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '-&gt;'), '_arrow_', substring-after($name, '-&gt;'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '&lt;')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '&lt;'), '_lt_', substring-after($name, '&lt;'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '&gt;')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '&gt;'), '_gt_', substring-after($name, '&gt;'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '[')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '['), '_lb_', substring-after($name, '['))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, ']')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, ']'), '_rb_', substring-after($name, ']'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '(')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '('), '_lp_', substring-after($name, '('))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, ')')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, ')'), '_rp_', substring-after($name, ')'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '+')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '+'), '_plus_', substring-after($name, '+'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '-')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '-'), '_minus_', substring-after($name, '-'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '*')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '*'), '_star_', substring-after($name, '*'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '~')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '~'), '_', substring-after($name, '~'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, ',')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, ','), '_comma_', substring-after($name, ','))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '...')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '...'), '_ellipsis_', substring-after($name, '...'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, ' ')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, ' '), '_', substring-after($name, ' '))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, 'boost__posix_time__ptime')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, 'boost__posix_time__ptime'), 'ptime', substring-after($name, 'boost__posix_time__ptime'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--========== Markup ==========-->
-
-<xsl:template match="para" mode="markup">
-<xsl:text>
-</xsl:text><xsl:apply-templates mode="markup"/><xsl:text>
-</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="para" mode="markup-nested">
-<xsl:apply-templates mode="markup-nested"/>
-</xsl:template>
-
-
-<xsl:template match="title" mode="markup">
- <xsl:variable name="title">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:if test="string-length($title) > 0">
-[heading <xsl:value-of select="."/>]
- </xsl:if>
-</xsl:template>
-
-
-<xsl:template match="programlisting" mode="markup">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:apply-templates mode="codeline"/>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="programlisting" mode="markup-nested">
- <xsl:value-of select="$newline"/>
- <xsl:text>``</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:apply-templates mode="codeline"/>
- <xsl:if test="substring(., string-length(.)) = $newline">
- <xsl:value-of select="$newline"/>
- </xsl:if>
- <xsl:text>``</xsl:text>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="codeline" mode="codeline">
- <xsl:if test="string-length(.) &gt; 0">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="codeline"/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="sp" mode="markup">
-<xsl:text> </xsl:text>
-</xsl:template>
-
-
-<xsl:template match="sp" mode="markup-nested">
-<xsl:text> </xsl:text>
-</xsl:template>
-
-
-<xsl:template match="sp" mode="codeline">
- <xsl:text> </xsl:text>
-</xsl:template>
-
-
-<xsl:template match="linebreak" mode="markup">
-<xsl:text>
-
-</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="linebreak" mode="markup-nested">
-<xsl:text>
-
-</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="computeroutput" mode="markup">
-<xsl:text>`</xsl:text><xsl:value-of select="."/><xsl:text>`</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="computeroutput" mode="markup-nested">
-<xsl:text>`</xsl:text><xsl:value-of select="."/><xsl:text>`</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="listitem" mode="markup">
-* <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text">
- <xsl:apply-templates mode="markup"/>
- </xsl:with-param>
-</xsl:call-template>
-</xsl:template>
-
-
-<xsl:template match="bold" mode="markup">[*<xsl:apply-templates mode="markup"/>]</xsl:template>
-
-
-<xsl:template match="emphasis" mode="markup">['<xsl:apply-templates mode="markup"/>]</xsl:template>
-
-
-<xsl:template match="parameterlist" mode="markup">
- <xsl:choose>
- <xsl:when test="@kind='param'">
-[heading Parameters]
- </xsl:when>
- <xsl:when test="@kind='exception'">
-[heading Exceptions]
- </xsl:when>
- </xsl:choose>
-
-[variablelist
- <xsl:apply-templates mode="markup"/>
-]
-</xsl:template>
-
-
-<xsl:template match="parameteritem" mode="markup">
-[[<xsl:value-of select="parameternamelist"/>][<xsl:apply-templates select="parameterdescription" mode="markup-nested"/>]]
-</xsl:template>
-
-
-<xsl:template match="simplesect" mode="markup">
- <xsl:choose>
- <xsl:when test="@kind='return'">
-[heading Return Value]
- <xsl:apply-templates mode="markup"/>
- </xsl:when>
- <xsl:when test="@kind='see'">
- </xsl:when>
- <xsl:when test="@kind='note'">
-[heading Remarks]
- <xsl:apply-templates mode="markup"/>
- </xsl:when>
- <xsl:when test="@kind='par'">
- <xsl:if test="not(starts-with(title, 'Concepts:'))">
- <xsl:apply-templates mode="markup"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="markup"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="text()" mode="markup">
- <xsl:variable name="text" select="."/>
- <xsl:variable name="starts-with-whitespace" select="
- starts-with($text, ' ') or starts-with($text, $newline)"/>
- <xsl:variable name="preceding-node-name">
- <xsl:for-each select="preceding-sibling::*">
- <xsl:if test="position() = last()">
- <xsl:value-of select="local-name()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="after-newline" select="
- $preceding-node-name = 'programlisting' or
- $preceding-node-name = 'linebreak'"/>
- <xsl:choose>
- <xsl:when test="$starts-with-whitespace and $after-newline">
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="text()" mode="markup-nested">
- <xsl:variable name="text" select="."/>
- <xsl:variable name="starts-with-whitespace" select="
- starts-with($text, ' ') or starts-with($text, $newline)"/>
- <xsl:variable name="preceding-node-name">
- <xsl:for-each select="preceding-sibling::*">
- <xsl:if test="position() = last()">
- <xsl:value-of select="local-name()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="after-newline" select="
- $preceding-node-name = 'programlisting' or
- $preceding-node-name = 'linebreak'"/>
- <xsl:choose>
- <xsl:when test="$starts-with-whitespace and $after-newline">
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="strip-leading-whitespace">
- <xsl:param name="text"/>
- <xsl:choose>
- <xsl:when test="starts-with($text, ' ')">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="substring($text, 2)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="starts-with($text, $newline)">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="substring($text, 2)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="escape-text">
- <xsl:param name="text"/>
- <xsl:choose>
- <xsl:when test="contains($text, '_')">
- <xsl:value-of select="substring-before($text, '_')"/>
- <xsl:text>\_</xsl:text>
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text" select="substring-after($text, '_')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="escape-name">
- <xsl:param name="text"/>
- <xsl:choose>
- <xsl:when test="contains($text, '[')">
- <xsl:value-of select="substring-before($text, '[')"/>
- <xsl:text>\[</xsl:text>
- <xsl:call-template name="escape-name">
- <xsl:with-param name="text" select="substring-after($text, '[')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($text, ']')">
- <xsl:value-of select="substring-before($text, ']')"/>
- <xsl:text>\]</xsl:text>
- <xsl:call-template name="escape-name">
- <xsl:with-param name="text" select="substring-after($text, ']')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($text, '...')">
- <xsl:value-of select="substring-before($text, '...')"/>
- <xsl:text>\.\.\.</xsl:text>
- <xsl:call-template name="escape-name">
- <xsl:with-param name="text" select="substring-after($text, '...')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ref[@kindref='compound']" mode="markup">
- <xsl:variable name="name">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="contains(@refid, 'asio') or contains($name, 'asio::')">
- <xsl:variable name="dox-ref-id" select="@refid"/>
- <xsl:variable name="ref-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name"
- select="(/doxygen//compounddef[@id=$dox-ref-id])[1]/compoundname"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="ref-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$ref-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text>[link asio.reference.</xsl:text>
- <xsl:value-of select="$ref-id"/>
- <xsl:text> `</xsl:text>
- <xsl:value-of name="text" select="$ref-name"/>
- <xsl:text>`]</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>`</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>`</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ref[@kindref='compound']" mode="markup-nested">
- <xsl:variable name="name">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="contains(@refid, 'asio') or contains($name, 'asio::')">
- <xsl:variable name="dox-ref-id" select="@refid"/>
- <xsl:variable name="ref-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name"
- select="(/doxygen//compounddef[@id=$dox-ref-id])[1]/compoundname"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="ref-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$ref-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text>[link asio.reference.</xsl:text>
- <xsl:value-of select="$ref-id"/>
- <xsl:text> `</xsl:text>
- <xsl:value-of name="text" select="$ref-name"/>
- <xsl:text>`]</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>`</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>`</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ref[@kindref='member']" mode="markup">
- <xsl:variable name="dox-ref-id" select="@refid"/>
- <xsl:variable name="memberdefs" select="/doxygen//compounddef/sectiondef/memberdef[@id=$dox-ref-id]"/>
- <xsl:choose>
- <xsl:when test="contains(@refid, 'namespaceasio') and count($memberdefs) &gt; 0">
- <xsl:variable name="dox-compound-name" select="($memberdefs)[1]/../../compoundname"/>
- <xsl:variable name="dox-name" select="($memberdefs)[1]/name"/>
- <xsl:variable name="ref-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="concat($dox-compound-name,'::',$dox-name)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="ref-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$ref-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text>[link asio.reference.</xsl:text>
- <xsl:value-of select="$ref-id"/>
- <xsl:text> `</xsl:text>
- <xsl:value-of name="text" select="$ref-name"/>
- <xsl:text>`]</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>`</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>`</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ref[@kindref='member']" mode="markup-nested">
- <xsl:variable name="dox-ref-id" select="@refid"/>
- <xsl:variable name="memberdefs" select="/doxygen//compounddef/sectiondef/memberdef[@id=$dox-ref-id]"/>
- <xsl:choose>
- <xsl:when test="contains(@refid, 'namespaceasio') and count($memberdefs) &gt; 0">
- <xsl:variable name="dox-compound-name" select="($memberdefs)[1]/../../compoundname"/>
- <xsl:variable name="dox-name" select="($memberdefs)[1]/name"/>
- <xsl:variable name="ref-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="concat($dox-compound-name,'::',$dox-name)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="ref-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$ref-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text>[link asio.reference.</xsl:text>
- <xsl:value-of select="$ref-id"/>
- <xsl:text> `</xsl:text>
- <xsl:value-of name="text" select="$ref-name"/>
- <xsl:text>`]</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>`</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>`</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="header-requirements">
- <xsl:param name="file"/>
- <xsl:value-of select="$newline"/>
- <xsl:text>[heading Requirements]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text>['Header: ]</xsl:text>
- <xsl:text>[^asio/</xsl:text>
- <xsl:value-of select="substring-after($file, 'include/asio/')"/>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text>['Convenience header: ]</xsl:text>
- <xsl:choose>
- <xsl:when test="contains($file, 'include/asio/ssl')">
- <xsl:text>[^asio/ssl.hpp]</xsl:text>
- </xsl:when>
- <xsl:when test="contains($file, 'include/asio/high_resolution_timer')">
- <xsl:text>None</xsl:text>
- </xsl:when>
- <xsl:when test="contains($file, 'include/asio/package')">
- <xsl:text>None</xsl:text>
- </xsl:when>
- <xsl:when test="contains($file, 'include/asio/spawn')">
- <xsl:text>None</xsl:text>
- </xsl:when>
- <xsl:when test="contains($file, 'include/asio/steady_timer')">
- <xsl:text>None</xsl:text>
- </xsl:when>
- <xsl:when test="contains($file, 'include/asio/system_timer')">
- <xsl:text>None</xsl:text>
- </xsl:when>
- <xsl:when test="contains($file, 'include/asio/use_future')">
- <xsl:text>None</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>[^asio.hpp]</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<!--========== Class ==========-->
-
-<xsl:template name="class">
- <xsl:variable name="class-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="compoundname"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="unqualified-class-name">
- <xsl:call-template name="strip-ns">
- <xsl:with-param name="name" select="compoundname"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="class-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$class-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="class-file" select="location/@file"/>
-[section:<xsl:value-of select="$class-id"/><xsl:text> </xsl:text><xsl:value-of select="$class-name"/>]
-
-<xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
-
-</xsl:text>
-
-<xsl:apply-templates select="templateparamlist"
- mode="class-detail"/><xsl:text> </xsl:text><xsl:value-of select="@kind"/><xsl:text> </xsl:text><xsl:value-of
- select="$unqualified-class-name"/><xsl:if test="count(basecompoundref[not(contains(.,'::detail'))]) > 0"> :</xsl:if><xsl:text>
-</xsl:text><xsl:for-each select="basecompoundref[not(contains(.,'::detail'))]">
-<xsl:text> </xsl:text><xsl:if test="@prot='public'">public </xsl:if><xsl:call-template
- name="strip-asio-ns"><xsl:with-param name="name" select="."/></xsl:call-template><xsl:if
- test="not(position() = last())">,</xsl:if><xsl:text>
-</xsl:text></xsl:for-each><xsl:text>
-</xsl:text>
-
-<xsl:call-template name="class-tables">
- <xsl:with-param name="class-name" select="$class-name"/>
- <xsl:with-param name="class-id" select="$class-id"/>
-</xsl:call-template>
-
-<xsl:apply-templates select="detaileddescription" mode="markup"/>
-
-<xsl:call-template name="header-requirements">
- <xsl:with-param name="file" select="$class-file"/>
-</xsl:call-template>
-
-<xsl:call-template name="class-members">
- <xsl:with-param name="class-name" select="$class-name"/>
- <xsl:with-param name="class-id" select="$class-id"/>
- <xsl:with-param name="class-file" select="$class-file"/>
-</xsl:call-template>
-
-[endsect]
-</xsl:template>
-
-
-<xsl:template name="class-tables">
-<xsl:param name="class-name"/>
-<xsl:param name="class-id"/>
-<xsl:if test="
- count(
- sectiondef[@kind='public-type'] |
- innerclass[@prot='public' and not(contains(., '_handler'))]) &gt; 0">
-[heading Types]
-[table
- [[Name][Description]]
-<xsl:for-each select="
- sectiondef[@kind='public-type']/memberdef |
- innerclass[@prot='public' and not(contains(., '_handler')) and not(contains(., 'thread_function'))]" mode="class-table">
- <xsl:sort select="concat(name, (.)[not(name)])"/>
- [
-<xsl:choose>
- <xsl:when test="count(name) &gt; 0">
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="name"/>]]]
- [<xsl:call-template name="escape-name"><xsl:with-param name="text" select="briefdescription"/></xsl:call-template>]
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="type-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="unqualified-type-name">
- <xsl:call-template name="strip-ns">
- <xsl:with-param name="name" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="type-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$type-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="type-ref-id" select="@refid"/>
- [[link asio.reference.<xsl:value-of select="$type-id"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="$unqualified-type-name"/>]]]
- [<xsl:value-of select="(/doxygen//compounddef[@id=$type-ref-id])[1]/briefdescription"/>]
- </xsl:otherwise>
-</xsl:choose>
- ]
-</xsl:for-each>
-]
-</xsl:if>
-
-<xsl:if test="count(sectiondef[@kind='public-func' or @kind='public-static-func']) > 0">
-[heading Member Functions]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='public-func' or @kind='public-static-func']/memberdef" mode="class-table">
- <xsl:sort select="name"/>
- <xsl:variable name="name">
- <xsl:value-of select="name"/>
- </xsl:variable>
- <xsl:variable name="escaped-name">
- <xsl:call-template name="escape-name">
- <xsl:with-param name="text" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$overload-position = 1">
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="$escaped-name"/><xsl:text>]]]
- [</xsl:text><xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="$overload-position = $overload-count">
- <xsl:text>]
- ]
- </xsl:text>
- </xsl:if>
-</xsl:for-each>
-]
-</xsl:if>
-
-<xsl:if test="count(sectiondef[@kind='protected-func' or @kind='protected-static-func']) > 0">
-[heading Protected Member Functions]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='protected-func' or @kind='protected-static-func']/memberdef" mode="class-table">
- <xsl:sort select="name"/>
- <xsl:variable name="name">
- <xsl:value-of select="name"/>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$overload-position = 1">
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/><xsl:text>]]]
- [</xsl:text><xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="$overload-position = $overload-count">
- <xsl:text>]
- ]
- </xsl:text>
- </xsl:if>
-</xsl:for-each>
-]
-</xsl:if>
-
-<xsl:if test="$class-name = 'execution_context::service'">
-<xsl:if test="count(sectiondef[@kind='private-func']) > 0">
-[heading Private Member Functions]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='private-func']/memberdef" mode="class-table">
- <xsl:sort select="name"/>
- <xsl:variable name="name">
- <xsl:value-of select="name"/>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$overload-position = 1">
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/><xsl:text>]]]
- [</xsl:text><xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="$overload-position = $overload-count">
- <xsl:text>]
- ]
- </xsl:text>
- </xsl:if>
-</xsl:for-each>
-]
-</xsl:if>
-</xsl:if>
-
-<xsl:if test="count(sectiondef[@kind='public-attrib' or @kind='public-static-attrib']) > 0">
-[heading Data Members]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='public-attrib' or @kind='public-static-attrib']/memberdef" mode="class-table">
- <xsl:sort select="name"/>
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="name"/>]]]
- [<xsl:value-of select="briefdescription"/>]
- ]
-</xsl:for-each>
-]
-</xsl:if>
-
-<xsl:if test="count(sectiondef[@kind='protected-attrib' or @kind='protected-static-attrib']) > 0">
-[heading Protected Data Members]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='protected-attrib' or @kind='protected-static-attrib']/memberdef" mode="class-table">
- <xsl:sort select="name"/>
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="name"/>]]]
- [<xsl:value-of select="briefdescription"/>]
- ]
-</xsl:for-each>
-]
-</xsl:if>
-
-<xsl:if test="count(sectiondef[@kind='friend']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]) &gt; 0">
-[heading Friends]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='friend']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-table">
- <xsl:sort select="name"/>
- <xsl:variable name="name">
- <xsl:value-of select="name"/>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$overload-position = 1">
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/><xsl:text>]]]
- [</xsl:text><xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="$overload-position = $overload-count">
- <xsl:text>]
- ]
- </xsl:text>
- </xsl:if>
-</xsl:for-each>
-]
-</xsl:if>
-
-<xsl:if test="count(sectiondef[@kind='related']/memberdef) &gt; 0">
-[heading Related Functions]
-[table
- [[Name][Description]]
-<xsl:for-each select="sectiondef[@kind='related']/memberdef" mode="class-table">
- <xsl:sort select="name"/>
- <xsl:variable name="name">
- <xsl:value-of select="name"/>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$overload-position = 1">
- [
- [[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
- <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/><xsl:text>]]]
- [</xsl:text><xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="briefdescription"/>
- </xsl:if>
- <xsl:if test="$overload-position = $overload-count">
- <xsl:text>]
- ]
- </xsl:text>
- </xsl:if>
-</xsl:for-each>
-]
-</xsl:if>
-
-</xsl:template>
-
-
-<xsl:template name="class-members">
-<xsl:param name="class-name"/>
-<xsl:param name="class-id"/>
-<xsl:param name="class-file"/>
-<xsl:apply-templates select="sectiondef[@kind='public-type' or @kind='public-func' or @kind='public-static-func' or @kind='public-attrib' or @kind='public-static-attrib' or @kind='protected-func' or @kind='protected-static-func' or @kind='protected-attrib' or @kind='protected-static-attrib' or @kind='friend' or @kind='related']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-detail">
- <xsl:sort select="name"/>
- <xsl:with-param name="class-name" select="$class-name"/>
- <xsl:with-param name="class-id" select="$class-id"/>
- <xsl:with-param name="class-file" select="$class-file"/>
-</xsl:apply-templates>
-<xsl:if test="$class-name = 'execution_context::service'">
- <xsl:apply-templates select="sectiondef[@kind='private-func']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-detail">
- <xsl:sort select="name"/>
- <xsl:with-param name="class-name" select="$class-name"/>
- <xsl:with-param name="class-id" select="$class-id"/>
- <xsl:with-param name="class-file" select="$class-file"/>
- </xsl:apply-templates>
-</xsl:if>
-</xsl:template>
-
-
-<!-- Class detail -->
-
-<xsl:template match="memberdef" mode="class-detail">
- <xsl:param name="class-name"/>
- <xsl:param name="class-id"/>
- <xsl:param name="class-file"/>
- <xsl:variable name="name">
- <xsl:value-of select="name"/>
- </xsl:variable>
- <xsl:variable name="escaped-name">
- <xsl:call-template name="escape-name">
- <xsl:with-param name="text" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="escaped-class-name">
- <xsl:call-template name="escape-name">
- <xsl:with-param name="text" select="$class-name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
-
-<xsl:if test="$overload-count &gt; 1 and $overload-position = 1">
-[section:<xsl:value-of select="$id"/><xsl:text> </xsl:text>
-<xsl:value-of select="$class-name"/>::<xsl:value-of select="$escaped-name"/>]
-
-<xsl:text>[indexterm2 </xsl:text>
-<xsl:text>asio.indexterm.</xsl:text>
-<xsl:value-of select="$class-id"/>
-<xsl:text>.</xsl:text>
-<xsl:value-of select="$id"/>
-<xsl:text>..</xsl:text>
-<xsl:value-of select="$escaped-name"/>
-<xsl:text>..</xsl:text>
-<xsl:value-of select="$escaped-class-name"/>
-<xsl:text>] </xsl:text>
-
-<xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
-</xsl:text>
-
-<xsl:for-each select="../memberdef[name = $name]">
-<xsl:if test="position() &gt; 1 and not(briefdescription = preceding-sibling::*/briefdescription)">
- <xsl:value-of select="$newline"/>
- <xsl:apply-templates select="briefdescription" mode="markup"/>
- <xsl:value-of select="$newline"/>
-</xsl:if>
-<xsl:text>
-</xsl:text><xsl:apply-templates select="templateparamlist" mode="class-detail"/>
-<xsl:text> </xsl:text>
- <xsl:if test="@explicit='yes'">explicit </xsl:if>
- <xsl:if test="@static='yes'">static </xsl:if>
- <xsl:if test="@virt='virtual'">virtual </xsl:if>
- <xsl:variable name="stripped-type">
- <xsl:call-template name="cleanup-type">
- <xsl:with-param name="name" select="type"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="string-length($stripped-type) &gt; 0">
- <xsl:value-of select="$stripped-type"/><xsl:text> </xsl:text>
-</xsl:if>``[link asio.reference.<xsl:value-of select="$class-id"/>.<xsl:value-of
- select="$id"/>.overload<xsl:value-of select="position()"/><xsl:text> </xsl:text><xsl:value-of
- select="name"/>]``(<xsl:apply-templates select="param"
- mode="class-detail"/>)<xsl:if test="@const='yes'"> const</xsl:if>;
-<xsl:text> `` [''''&amp;raquo;'''</xsl:text>
-<xsl:text> [link asio.reference.</xsl:text>
-<xsl:value-of select="$class-id"/>.<xsl:value-of
- select="$id"/>.overload<xsl:value-of select="position()"/>
-<xsl:text> more...]]``
-</xsl:text>
-</xsl:for-each>
-</xsl:if>
-
-[section:<xsl:if test="$overload-count = 1"><xsl:value-of select="$id"/></xsl:if>
-<xsl:if test="$overload-count &gt; 1">overload<xsl:value-of select="$overload-position"/></xsl:if>
-<xsl:text> </xsl:text><xsl:value-of select="$class-name"/>::<xsl:value-of select="$escaped-name"/>
-<xsl:if test="$overload-count &gt; 1"> (<xsl:value-of
- select="$overload-position"/> of <xsl:value-of select="$overload-count"/> overloads)</xsl:if>]
-
-<xsl:if test="not(starts-with($doxygen-id, ../../@id))">
-<xsl:variable name="inherited-from" select="/doxygen/compounddef[starts-with($doxygen-id, @id)]/compoundname"/>
-<xsl:if test="not(contains($inherited-from, '::detail'))">
-['Inherited from <xsl:call-template name="strip-asio-ns">
-<xsl:with-param name="name" select="$inherited-from"/>
-</xsl:call-template>.]<xsl:text>
-
-</xsl:text></xsl:if></xsl:if>
-
-<xsl:if test="$overload-count = 1">
- <xsl:text>[indexterm2 </xsl:text>
- <xsl:text>asio.indexterm.</xsl:text>
- <xsl:value-of select="$class-id"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="$id"/>
- <xsl:text>..</xsl:text>
- <xsl:value-of select="$escaped-name"/>
- <xsl:text>..</xsl:text>
- <xsl:value-of select="$escaped-class-name"/>
- <xsl:text>] </xsl:text>
-</xsl:if>
-
-<xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
-</xsl:text>
-
- <xsl:choose>
- <xsl:when test="@kind='typedef'">
- <xsl:call-template name="typedef" mode="class-detail">
- <xsl:with-param name="class-name" select="$class-name"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@kind='variable'">
- <xsl:call-template name="variable" mode="class-detail"/>
- </xsl:when>
- <xsl:when test="@kind='enum'">
- <xsl:call-template name="enum" mode="class-detail">
- <xsl:with-param name="enum-name" select="$class-name"/>
- <xsl:with-param name="id" select="concat($class-id, '.', $id)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@kind='function'">
- <xsl:call-template name="function" mode="class-detail"/>
- </xsl:when>
- <xsl:when test="@kind='friend'">
- <xsl:call-template name="function" mode="class-detail"/>
- </xsl:when>
- </xsl:choose>
-
-<xsl:text>
-</xsl:text><xsl:apply-templates select="detaileddescription" mode="markup"/>
-
-<xsl:if test="@kind='typedef' or @kind='friend'">
- <xsl:call-template name="header-requirements">
- <xsl:with-param name="file" select="$class-file"/>
- </xsl:call-template>
-</xsl:if>
-
-[endsect]
-
-<xsl:if test="$overload-count &gt; 1 and $overload-position = $overload-count">
-[endsect]
-</xsl:if>
-</xsl:template>
-
-
-<xsl:template name="typedef">
-<xsl:param name="class-name"/>
-<xsl:text>
- </xsl:text>typedef <xsl:value-of select="type"/><xsl:text> </xsl:text><xsl:value-of select="name"/>;<xsl:text>
-
-</xsl:text>
-<xsl:if test="count(type/ref) &gt; 0 and not(contains(type, '*'))">
- <xsl:variable name="class-refid">
- <xsl:for-each select="type/ref[1]">
- <xsl:value-of select="@refid"/>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="name" select="name"/>
- <xsl:for-each select="/doxygen/compounddef[@id=$class-refid]">
- <xsl:call-template name="class-tables">
- <xsl:with-param name="class-name">
- <xsl:value-of select="concat($class-name, '::', $name)"/>
- </xsl:with-param>
- <xsl:with-param name="class-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="compoundname"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:apply-templates select="detaileddescription" mode="markup"/>
- </xsl:for-each>
-</xsl:if>
-</xsl:template>
-
-
-<xsl:template name="variable">
-<xsl:text>
- </xsl:text><xsl:if test="@static='yes'">static </xsl:if><xsl:value-of
- select="type"/><xsl:text> </xsl:text><xsl:value-of select="name"/>
- <xsl:if test="count(initializer) = 1"><xsl:text> =</xsl:text>
- <xsl:value-of select="initializer"/></xsl:if>;
-</xsl:template>
-
-
-<xsl:template name="enum">
-<xsl:param name="enum-name"/>
-<xsl:param name="id"/>
- enum <xsl:value-of select="name"/><xsl:text>
-</xsl:text><xsl:if test="count(enumvalue) &gt; 0">
-<xsl:value-of select="$newline"/>
-<xsl:for-each select="enumvalue">
- <xsl:text>[indexterm2 </xsl:text>
- <xsl:text>asio.indexterm.</xsl:text>
- <xsl:value-of select="$id"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="name"/>
- <xsl:text>..</xsl:text>
- <xsl:value-of select="name"/>
- <xsl:text>..</xsl:text>
- <xsl:value-of select="$enum-name"/>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="$newline"/>
-</xsl:for-each>
-[heading Values]
-[variablelist
-<xsl:for-each select="enumvalue">
- [
- [<xsl:value-of select="name"/>]
- [<xsl:value-of select="briefdescription"/>]
- ]
-</xsl:for-each>
-]
-</xsl:if>
-</xsl:template>
-
-
-<xsl:template name="function">
-<xsl:text>
-</xsl:text>
-<xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
-</xsl:variable>
-<xsl:choose>
- <xsl:when test="count(/doxygen//memberdef[@id=$doxygen-id]/templateparamlist) = 1">
- <xsl:apply-templates select="/doxygen//memberdef[@id=$doxygen-id]/templateparamlist" mode="class-detail"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="templateparamlist" mode="class-detail"/>
- </xsl:otherwise>
-</xsl:choose>
-<xsl:variable name="stripped-type">
- <xsl:call-template name="cleanup-type">
- <xsl:with-param name="name" select="type"/>
- </xsl:call-template>
-</xsl:variable>
-<xsl:text> </xsl:text><xsl:if test="@static='yes'">static </xsl:if><xsl:if
- test="@virt='virtual'">virtual </xsl:if><xsl:if
- test="string-length($stripped-type) &gt; 0"><xsl:value-of select="$stripped-type"/><xsl:text> </xsl:text></xsl:if>
-<xsl:value-of select="name"/>(<xsl:apply-templates select="param"
- mode="class-detail"/>)<xsl:if test="@const='yes'"> const</xsl:if>;
-</xsl:template>
-
-
-<xsl:template match="templateparamlist" mode="class-detail">
-<xsl:text> </xsl:text>template&lt;<xsl:apply-templates select="param" mode="class-detail-template"/>&gt;
-</xsl:template>
-
-
-<xsl:template match="param" mode="class-detail-template">
-<xsl:text>
- </xsl:text><xsl:value-of select="type"/><xsl:text> </xsl:text>
- <xsl:choose>
- <xsl:when test="declname = 'Allocator'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Arg'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Args'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'BufferSequence'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'ByteType'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'C'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Clock'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'CompletionToken'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Context_Service'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Duration'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'DatagramSocketService1'">
- <xsl:value-of select="concat('``[link asio.reference.DatagramSocketService ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'EndpointIterator'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Elem'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'ErrorEnum'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'ExecutionContext'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Executor'">
- <xsl:value-of select="concat('``[link asio.reference.Executor1 ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'Function'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Iterator'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'MatchCondition'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'N'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'OtherAllocator'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'OtherExecutor'">
- <xsl:value-of select="concat('``[link asio.reference.Executor1 ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'OtherHandler'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'PasswordCallback'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Period'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'PodType'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'PointerToPodType'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Protocol1'">
- <xsl:value-of select="concat('``[link asio.reference.Protocol ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'RawSocketService1'">
- <xsl:value-of select="concat('``[link asio.reference.RawSocketService ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'Rep'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Result'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'SeqPacketSocketService1'">
- <xsl:value-of select="concat('``[link asio.reference.SeqPacketSocketService ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'Signature'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'SocketAcceptorService1' or declname = 'SocketAcceptorService2'">
- <xsl:value-of select="concat('``[link asio.reference.SocketAcceptorService ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'SocketService1' or declname = 'SocketService2'">
- <xsl:value-of select="concat('``[link asio.reference.SocketService ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'Stream'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'StreamSocketService1'">
- <xsl:value-of select="concat('``[link asio.reference.StreamSocketService ', declname, ']``')"/>
- </xsl:when>
- <xsl:when test="declname = 'T'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'T1'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'TN'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Time'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'TimeType'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'Traits'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'U'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="declname = 'VerifyCallback'">
- <xsl:value-of select="declname"/>
- </xsl:when>
- <xsl:when test="count(declname) = 0">
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('``[link asio.reference.', declname, ' ', declname, ']``')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="count(defval) > 0"> = <xsl:value-of
- select="defval"/></xsl:if><xsl:if test="not(position() = last())">,</xsl:if>
-</xsl:template>
-
-
-<xsl:template match="param" mode="class-detail">
-<xsl:text>
- </xsl:text>
- <xsl:choose>
- <xsl:when test="string-length(array) &gt; 0">
- <xsl:value-of select="substring-before(type, '&amp;')"/>
- <xsl:text>(&amp;</xsl:text>
- <xsl:value-of select="declname"/>
- <xsl:text>)</xsl:text>
- <xsl:value-of select="array"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="declname"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="count(defval) > 0"> = <xsl:value-of select="defval"/></xsl:if>
- <xsl:if test="not(position() = last())">,</xsl:if>
-</xsl:template>
-
-
-<xsl:template match="*" mode="class-detail"/>
-
-
-<!--========== Namespace ==========-->
-
-<xsl:template name="namespace-memberdef">
- <xsl:variable name="name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="concat(../../compoundname, '::', name)"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="unqualified-name">
- <xsl:call-template name="strip-ns">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="doxygen-id">
- <xsl:value-of select="@id"/>
- </xsl:variable>
- <xsl:variable name="overload-count">
- <xsl:value-of select="count(../memberdef[name = $unqualified-name])"/>
- </xsl:variable>
- <xsl:variable name="overload-position">
- <xsl:for-each select="../memberdef[name = $unqualified-name]">
- <xsl:if test="@id = $doxygen-id">
- <xsl:value-of select="position()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
-
-<xsl:if test="$overload-count &gt; 1 and $overload-position = 1">
-[section:<xsl:value-of select="$id"/><xsl:text> </xsl:text><xsl:value-of select="$name"/>]
-
-<xsl:text>[indexterm1 </xsl:text>
-<xsl:text>asio.indexterm.</xsl:text>
-<xsl:value-of select="$id"/>
-<xsl:text>..</xsl:text>
-<xsl:value-of select="$name"/>
-<xsl:text>] </xsl:text>
-
-<xsl:choose>
- <xsl:when test="count(/doxygen/compounddef[@kind='group' and compoundname=$name]) &gt; 0">
- <xsl:for-each select="/doxygen/compounddef[@kind='group' and compoundname=$name]">
- <xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
- </xsl:text>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
- </xsl:text>
- </xsl:otherwise>
-</xsl:choose>
-
-<xsl:for-each select="../memberdef[name = $unqualified-name]">
-<xsl:variable name="stripped-type">
- <xsl:call-template name="cleanup-type">
- <xsl:with-param name="name" select="type"/>
- </xsl:call-template>
-</xsl:variable>
-<xsl:text>
-</xsl:text><xsl:apply-templates select="templateparamlist" mode="class-detail"/>
-<xsl:text> </xsl:text><xsl:if test="string-length($stripped-type) &gt; 0"><xsl:value-of
- select="$stripped-type"/><xsl:text> </xsl:text></xsl:if>``[link asio.reference.<xsl:value-of
- select="$id"/>.overload<xsl:value-of select="position()"/><xsl:text> </xsl:text>
-<xsl:value-of select="name"/>]``(<xsl:apply-templates select="param" mode="class-detail"/>);
-<xsl:text> `` [''''&amp;raquo;'''</xsl:text>
-<xsl:text> [link asio.reference.</xsl:text>
-<xsl:value-of select="$id"/>.overload<xsl:value-of select="position()"/>
-<xsl:text> more...]]``
-</xsl:text>
-</xsl:for-each>
-
-<xsl:for-each select="/doxygen/compounddef[@kind='group' and compoundname=$name]">
- <xsl:apply-templates select="detaileddescription" mode="markup"/>
-</xsl:for-each>
-
-<xsl:call-template name="header-requirements">
- <xsl:with-param name="file" select="location/@file"/>
-</xsl:call-template>
-
-</xsl:if>
-
-[section:<xsl:if test="$overload-count = 1"><xsl:value-of select="$id"/></xsl:if>
-<xsl:if test="$overload-count &gt; 1">overload<xsl:value-of select="$overload-position"/>
-</xsl:if><xsl:text> </xsl:text><xsl:value-of select="$name"/>
-<xsl:if test="$overload-count &gt; 1"> (<xsl:value-of
- select="$overload-position"/> of <xsl:value-of select="$overload-count"/> overloads)</xsl:if>]
-
-<xsl:if test="$overload-count = 1">
- <xsl:text>[indexterm1 </xsl:text>
- <xsl:text>asio.indexterm.</xsl:text>
- <xsl:value-of select="$id"/>
- <xsl:text>..</xsl:text>
- <xsl:value-of select="$name"/>
- <xsl:text>] </xsl:text>
-</xsl:if>
-
-<xsl:apply-templates select="briefdescription" mode="markup"/><xsl:text>
-</xsl:text>
-
- <xsl:choose>
- <xsl:when test="@kind='typedef'">
- <xsl:call-template name="typedef">
- <xsl:with-param name="class-name" select="$name"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@kind='variable'">
- <xsl:call-template name="variable"/>
- </xsl:when>
- <xsl:when test="@kind='enum'">
- <xsl:call-template name="enum">
- <xsl:with-param name="enum-name" select="$name"/>
- <xsl:with-param name="id" select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@kind='function'">
- <xsl:call-template name="function"/>
- </xsl:when>
- </xsl:choose>
-
-<xsl:text>
-</xsl:text><xsl:apply-templates select="detaileddescription" mode="markup"/>
-
-<xsl:if test="$overload-count = 1">
- <xsl:call-template name="header-requirements">
- <xsl:with-param name="file" select="location/@file"/>
- </xsl:call-template>
-</xsl:if>
-
-[endsect]
-
-<xsl:if test="$overload-count &gt; 1 and $overload-position = $overload-count">
-[endsect]
-</xsl:if>
-</xsl:template>
-
-
-</xsl:stylesheet>
diff --git a/3rdparty/asio/src/doc/release_checklist.htm b/3rdparty/asio/src/doc/release_checklist.htm
deleted file mode 100644
index 3ce2cbe8c53..00000000000
--- a/3rdparty/asio/src/doc/release_checklist.htm
+++ /dev/null
@@ -1,68 +0,0 @@
-<html>
- <head>
- <title>asio Release Checklist</title>
- </head>
- <body>
- <h1>asio Release Checklist</h1>
- <form>
- <table border="1">
- <tr>
- <td>Update version number in configure.ac</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Update version number and date in README</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Generate a clean distribution by doing a `make maintainer-clean`
- followed by the steps necessary to do a `make dist'</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Unpack/build/test distribution on Mac OS X using g++ 4.0 with
- adjacent boost directory</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Unpack/build/test distribution on Linux using g++ 3.4 using the
- `--with-boost' configure option</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Unpack/build/test distribution on Solaris using g++ 3.3 with
- adjacent boost directory</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Unpack/build/test distribution using MSVC 7.1 with adjacent boost
- directory</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Unpack/build/test distribution using bcc32 5.6.4 with adjacent
- boost directory</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Unpack/build/test distribution using MinGW-4.1.0 with adjacent
- boost directory</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Commit version number changes to CVS</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Apply CVS tag of the form asio-x-y-z</td>
- <td><input type="checkbox"></td>
- </tr>
- <tr>
- <td>Generate a clean distribution by doing a `make maintainer-clean`
- followed by the steps necessary to do a `make dist'</td>
- <td><input type="checkbox"></td>
- </tr>
- </table>
- </form>
- </body>
-</html>
diff --git a/3rdparty/asio/src/doc/requirements/AcceptHandler.qbk b/3rdparty/asio/src/doc/requirements/AcceptHandler.qbk
deleted file mode 100644
index ae5ea3f0388..00000000000
--- a/3rdparty/asio/src/doc/requirements/AcceptHandler.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:AcceptHandler Accept handler requirements]
-
-An accept handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of an accept handler
-class should work correctly in the expression `h(ec)`, where `ec` is an lvalue
-of type `const error_code`.
-
-[heading Examples]
-
-A free function as an accept handler:
-
- void accept_handler(
- const asio::error_code& ec)
- {
- ...
- }
-
-An accept handler function object:
-
- struct accept_handler
- {
- ...
- void operator()(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- };
-
-A lambda as an accept handler:
-
- acceptor.async_accept(...,
- [](const asio::error_code& ec)
- {
- ...
- });
-
-A non-static class member function adapted to an accept handler using
-`std::bind()`:
-
- void my_class::accept_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- acceptor.async_accept(...,
- std::bind(&my_class::accept_handler,
- this, std::placeholders::_1));
-
-A non-static class member function adapted to an accept handler using
-`boost::bind()`:
-
- void my_class::accept_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- acceptor.async_accept(...,
- boost::bind(&my_class::accept_handler,
- this, asio::placeholders::error));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/AcceptableProtocol.qbk b/3rdparty/asio/src/doc/requirements/AcceptableProtocol.qbk
deleted file mode 100644
index 37683879adf..00000000000
--- a/3rdparty/asio/src/doc/requirements/AcceptableProtocol.qbk
+++ /dev/null
@@ -1,25 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:AcceptableProtocol Acceptable protocol requirements]
-
-A type `X` meets the `AcceptableProtocol` requirements if it satisfies the
-requirements of [link asio.reference.Protocol `Protocol`] as well as the
-additional requirements listed below.
-
-[table AcceptableProtocol requirements
- [[expression] [return type] [assertion/note\npre/post-conditions]]
- [
- [`X::socket`]
- [A type that satisfies the requirements of `Destructible` (C++Std
- \[destructible\]) and `MoveConstructible` (C++Std \[moveconstructible\]),
- and that is publicly and unambiguously derived from `basic_socket<X>`.]
- []
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk b/3rdparty/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk
deleted file mode 100644
index 4109c0157dc..00000000000
--- a/3rdparty/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk
+++ /dev/null
@@ -1,56 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:AsyncRandomAccessReadDevice Buffer-oriented asynchronous random-access
-read device requirements]
-
-In the table below, `a` denotes an asynchronous random access read device
-object, `o` denotes an offset of type `boost::uint64_t`, `mb` denotes an object
-satisfying [link asio.reference.MutableBufferSequence mutable buffer sequence]
-requirements, and `h` denotes an object satisfying [link
-asio.reference.ReadHandler read handler] requirements.
-
-[table Buffer-oriented asynchronous random-access read device requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.get_executor()`]
- [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
- [Returns the associated I/O executor.]
- ]
- [
- [`a.async_read_some_at(o, mb, h);`]
- [`void`]
- [
- Initiates an asynchronous operation to read one or more bytes of data
- from the device `a` at the offset `o`. The operation is performed via the
- `io_service` object `a.get_io_service()` and behaves according to [link
- asio.reference.asynchronous_operations asynchronous operation]
- requirements.\n
- \n
- The mutable buffer sequence `mb` specifies memory where the data should
- be placed. The `async_read_some_at` operation shall always fill a buffer
- in the sequence completely before proceeding to the next.\n
- \n
- The implementation shall maintain one or more copies of `mb` until such
- time as the read operation no longer requires access to the memory
- specified by the buffers in the sequence. The program must ensure the
- memory is valid until:\n
- \n
- [mdash] the last copy of `mb` is destroyed, or\n
- \n
- [mdash] the handler for the asynchronous read operation is invoked,\n
- \n
- whichever comes first.\n
- \n
- If the total size of all buffers in the sequence `mb` is `0`, the
- asynchronous read operation shall complete immediately and pass `0` as
- the argument to the handler that specifies the number of bytes read.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk b/3rdparty/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk
deleted file mode 100644
index bd9ecbd834b..00000000000
--- a/3rdparty/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk
+++ /dev/null
@@ -1,57 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:AsyncRandomAccessWriteDevice Buffer-oriented asynchronous
-random-access write device requirements]
-
-In the table below, `a` denotes an asynchronous write stream object, `o`
-denotes an offset of type `boost::uint64_t`, `cb` denotes an object satisfying
-[link asio.reference.ConstBufferSequence constant buffer sequence]
-requirements, and `h` denotes an object satisfying [link
-asio.reference.WriteHandler write handler] requirements.
-
-[table Buffer-oriented asynchronous random-access write device requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.get_executor()`]
- [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
- [Returns the associated I/O executor.]
- ]
- [
- [`a.async_write_some_at(o, cb, h);`]
- [`void`]
- [
- Initiates an asynchronous operation to write one or more bytes of data to
- the device `a` at offset `o`. The operation is performed via the
- `io_service` object `a.get_io_service()` and behaves according to [link
- asio.reference.asynchronous_operations asynchronous operation]
- requirements.\n
- \n
- The constant buffer sequence `cb` specifies memory where the data to be
- written is located. The `async_write_some_at` operation shall always
- write a buffer in the sequence completely before proceeding to the
- next.\n
- \n
- The implementation shall maintain one or more copies of `cb` until such
- time as the write operation no longer requires access to the memory
- specified by the buffers in the sequence. The program must ensure the
- memory is valid until:\n
- \n
- [mdash] the last copy of `cb` is destroyed, or\n
- \n
- [mdash] the handler for the asynchronous write operation is invoked,\n
- \n
- whichever comes first.\n
- \n
- If the total size of all buffers in the sequence `cb` is `0`, the
- asynchronous write operation shall complete immediately and pass `0` as
- the argument to the handler that specifies the number of bytes written.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/AsyncReadStream.qbk b/3rdparty/asio/src/doc/requirements/AsyncReadStream.qbk
deleted file mode 100644
index 0fcd42f9c14..00000000000
--- a/3rdparty/asio/src/doc/requirements/AsyncReadStream.qbk
+++ /dev/null
@@ -1,50 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:AsyncReadStream Buffer-oriented asynchronous read stream requirements]
-
-A type `X` meets the `AsyncReadStream` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a value of type `X`, `mb` denotes a (possibly
-const) value satisfying the [link asio.reference.MutableBufferSequence
-`MutableBufferSequence`] requirements, and `t` is a completion token.
-
-[table AsyncReadStream requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.get_executor()`]
- [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
- [Returns the associated I/O executor.]
- ]
- [
- [`a.async_read_some(mb,t)`]
- [
- The return type is determined according to the requirements for an
- [link asio.reference.asynchronous_operations asynchronous operation].
- ]
- [
- Meets the requirements for a [link asio.reference.read_write_operations
- read operation] and an [link asio.reference.asynchronous_operations
- asynchronous operation] with completion signature `void(error_code ec,
- size_t n)`.\n
- \n
- If `buffer_size(mb) > 0`, initiates an asynchronous operation to read one
- or more bytes of data from the stream `a` into the buffer sequence `mb`.
- If successful, `ec` is set such that `!ec` is `true`, and `n` is the
- number of bytes read. If an error occurred, `ec` is set such that `!!ec`
- is `true`, and `n` is 0. If all data has been read from the stream, and
- the stream performed an orderly shutdown, `ec` is
- `stream_errc::eof` and `n` is 0.\n
- \n
- If `buffer_size(mb) == 0`, the operation completes immediately. `ec` is
- set such that `!ec` is `true`, and `n` is 0.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/AsyncWriteStream.qbk b/3rdparty/asio/src/doc/requirements/AsyncWriteStream.qbk
deleted file mode 100644
index ee53b238c11..00000000000
--- a/3rdparty/asio/src/doc/requirements/AsyncWriteStream.qbk
+++ /dev/null
@@ -1,48 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:AsyncWriteStream Buffer-oriented asynchronous write stream requirements]
-
-A type `X` meets the `AsyncWriteStream` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a value of type `X`, `cb` denotes a (possibly
-const) value satisfying the [link asio.reference.ConstBufferSequence
-`ConstBufferSequence`] requirements, and `t` is a completion token.
-
-[table AsyncWriteStream requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.get_executor()`]
- [A type satisfying the [link asio.reference.Executor1 Executor requirements].]
- [Returns the associated I/O executor.]
- ]
- [
- [`a.async_write_some(cb,t)`]
- [
- The return type is determined according to the requirements for an
- [link asio.reference.asynchronous_operations asynchronous operation].
- ]
- [
- Meets the requirements for a [link asio.reference.read_write_operations
- write operation] and an [link asio.reference.asynchronous_operations
- asynchronous operation] with completion signature `void(error_code ec,
- size_t n)`.\n
- \n
- If `buffer_size(cb) > 0`, initiates an asynchronous operation to write
- one or more bytes of data to the stream `a` from the buffer sequence
- `cb`. If successful, `ec` is set such that `!ec` is `true`, and `n` is
- the number of bytes written. If an error occurred, `ec` is set such that
- `!!ec` is `true`, and `n` is 0.\n
- \n
- If `buffer_size(cb) == 0`, the operation completes immediately. `ec` is
- set such that `!ec` is `true`, and `n` is 0.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/BufferedHandshakeHandler.qbk b/3rdparty/asio/src/doc/requirements/BufferedHandshakeHandler.qbk
deleted file mode 100644
index 6e6bbf231c3..00000000000
--- a/3rdparty/asio/src/doc/requirements/BufferedHandshakeHandler.qbk
+++ /dev/null
@@ -1,55 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:BufferedHandshakeHandler Buffered handshake handler requirements]
-
-A buffered handshake handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a buffered handshake handler
-class should work correctly in the expression `h(ec, s)`, where `ec` is an
-lvalue of type `const error_code` and `s` is an lvalue of type `const size_t`.
-
-[heading Examples]
-
-A free function as a buffered handshake handler:
-
- void handshake_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
-
-A buffered handshake handler function object:
-
- struct handshake_handler
- {
- ...
- void operator()(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- };
-
-A non-static class member function adapted to a buffered handshake handler
-using `boost::bind()`:
-
- void my_class::handshake_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- socket.async_handshake(...,
- boost::bind(&my_class::handshake_handler,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/CompletionCondition.qbk b/3rdparty/asio/src/doc/requirements/CompletionCondition.qbk
deleted file mode 100644
index 157561380b5..00000000000
--- a/3rdparty/asio/src/doc/requirements/CompletionCondition.qbk
+++ /dev/null
@@ -1,42 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:CompletionCondition Completion condition requirements]
-
-A ['completion condition] is a function object that is used with the algorithms
-[link asio.reference.read `read`], [link asio.reference.async_read
-`async_read`], [link asio.reference.write `write`], and [link
-asio.reference.async_write `async_write`] to determine when the algorithm has
-completed transferring data.
-
-A type `X` meets the `CompletionCondition` requirements if it satisfies the
-requirements of `Destructible` (C++Std [destructible]) and
-`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
-requirements listed below.
-
-In the table below, `x` denotes a value of type `X`, `ec` denotes a (possibly
-const) value of type `error_code`, and `n` denotes a (possibly const) value of
-type `size_t`.
-
-[table CompletionCondition requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`x(ec, n)`]
- [`size_t`]
- [
- Let `n` be the total number of bytes transferred by the read or write
- algorithm so far.\n
- \n
- Returns the maximum number of bytes to be transferred on the next
- `read_some`, `async_read_some`, `write_some`, or `async_write_some`
- operation performed by the algorithm. Returns `0` to indicate that the
- algorithm is complete.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/CompletionHandler.qbk b/3rdparty/asio/src/doc/requirements/CompletionHandler.qbk
deleted file mode 100644
index 28d158b6cdd..00000000000
--- a/3rdparty/asio/src/doc/requirements/CompletionHandler.qbk
+++ /dev/null
@@ -1,63 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:CompletionHandler Completion handler requirements]
-
-A completion handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a completion handler
-class should work correctly in the expression `h()`.
-
-[heading Examples]
-
-A free function as a completion handler:
-
- void completion_handler()
- {
- ...
- }
-
-A completion handler function object:
-
- struct completion_handler
- {
- ...
- void operator()()
- {
- ...
- }
- ...
- };
-
-A lambda as a completion handler:
-
- my_io_service.post(
- []()
- {
- ...
- });
-
-A non-static class member function adapted to a completion handler using
-`std::bind()`:
-
- void my_class::completion_handler()
- {
- ...
- }
- ...
- my_io_service.post(std::bind(&my_class::completion_handler, this));
-
-A non-static class member function adapted to a completion handler using
-`boost::bind()`:
-
- void my_class::completion_handler()
- {
- ...
- }
- ...
- my_io_service.post(boost::bind(&my_class::completion_handler, this));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ConnectCondition.qbk b/3rdparty/asio/src/doc/requirements/ConnectCondition.qbk
deleted file mode 100644
index 995398c31d2..00000000000
--- a/3rdparty/asio/src/doc/requirements/ConnectCondition.qbk
+++ /dev/null
@@ -1,34 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ConnectCondition Connect condition requirements]
-
-A type `X` meets the `ConnectCondition` requirements if it satisfies the
-requirements of `Destructible` (C++Std [destructible]) and
-`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
-requirements listed below.
-
-In the table below, `x` denotes a value of type `X`, `ec` denotes a (possibly
-const) value of type `error_code`, and `ep` denotes a (possibly const) value of
-some type satisfying the [link asio.reference.Endpoint endpoint] requirements.
-
-[table ConnectCondition requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`x(ec, ep)`]
- [`bool`]
- [
- Returns `true` to indicate that the `connect` or `async_connect`
- algorithm should attempt a connection to the endpoint `ep`. Otherwise,
- returns `false` to indicate that the algorithm should not attempt
- connection to the endpoint `ep`, and should instead skip to the next
- endpoint in the sequence.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ConnectHandler.qbk b/3rdparty/asio/src/doc/requirements/ConnectHandler.qbk
deleted file mode 100644
index 14b57d251d6..00000000000
--- a/3rdparty/asio/src/doc/requirements/ConnectHandler.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ConnectHandler Connect handler requirements]
-
-A connect handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a connect handler
-class should work correctly in the expression `h(ec)`, where `ec` is an lvalue
-of type `const error_code`.
-
-[heading Examples]
-
-A free function as a connect handler:
-
- void connect_handler(
- const asio::error_code& ec)
- {
- ...
- }
-
-A connect handler function object:
-
- struct connect_handler
- {
- ...
- void operator()(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- };
-
-A lambda as a connect handler:
-
- socket.async_connect(...,
- [](const asio::error_code& ec)
- {
- ...
- });
-
-A non-static class member function adapted to a connect handler using
-`std::bind()`:
-
- void my_class::connect_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- socket.async_connect(...,
- std::bind(&my_class::connect_handler,
- this, std::placeholders::_1));
-
-A non-static class member function adapted to a connect handler using
-`boost::bind()`:
-
- void my_class::connect_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- socket.async_connect(...,
- boost::bind(&my_class::connect_handler,
- this, asio::placeholders::error));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ConstBufferSequence.qbk b/3rdparty/asio/src/doc/requirements/ConstBufferSequence.qbk
deleted file mode 100644
index 1ff91ebf32a..00000000000
--- a/3rdparty/asio/src/doc/requirements/ConstBufferSequence.qbk
+++ /dev/null
@@ -1,55 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ConstBufferSequence Constant buffer sequence requirements]
-
-A ['constant buffer sequence] represents a set of memory regions that may be
-used as input to an operation, such as the `send` operation of a socket.
-
-A type `X` meets the `ConstBufferSequence` requirements if it satisfies the
-requirements of `Destructible` (C++Std [destructible]) and
-`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
-requirements listed below.
-
-In the table below, `x` denotes a (possibly const) value of type `X`, and `u`
-denotes an identifier.
-
-[table ConstBufferSequence requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`asio::buffer_sequence_begin(x)`\n
- `asio::buffer_sequence_end(x)`]
- [An iterator type meeting the requirements for bidirectional iterators
- (C++Std \[bidirectional.iterators\]) whose value type is convertible to
- `const_buffer`.]
- []
- ]
- [
- [``
- X u(x);
- ``]
- []
- [post:\n
- ``
- equal(
- asio::buffer_sequence_begin(x),
- asio::buffer_sequence_end(x),
- asio::buffer_sequence_begin(u),
- asio::buffer_sequence_end(u),
- [](const typename X::value_type& v1,
- const typename X::value_type& v2)
- {
- const_buffer b1(v1);
- const_buffer b2(v2);
- return b1.data() == b2.data()
- && b1.size() == b2.size();
- })
- ``]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/DynamicBuffer.qbk b/3rdparty/asio/src/doc/requirements/DynamicBuffer.qbk
deleted file mode 100644
index 4e0cd880d51..00000000000
--- a/3rdparty/asio/src/doc/requirements/DynamicBuffer.qbk
+++ /dev/null
@@ -1,93 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:DynamicBuffer Dynamic buffer requirements]
-
-A dynamic buffer encapsulates memory storage that may be automatically resized
-as required, where the memory is divided into an input sequence followed by an
-output sequence. These memory regions are internal to the dynamic buffer
-sequence, but direct access to the elements is provided to permit them to be
-efficiently used with I/O operations, such as the `send` or `receive`
-operations of a socket. Data written to the output sequence of a dynamic buffer
-sequence object is appended to the input sequence of the same object.
-
-A dynamic buffer type `X` shall satisfy the requirements of `MoveConstructible`
-(C++ Std, [moveconstructible]) types in addition to those listed below.
-
-In the table below, `X` denotes a dynamic buffer class, `x` denotes a
-value of type `X&`, `x1` denotes values of type `const X&`, and `n` denotes a
-value of type `size_t`, and `u` denotes an identifier.
-
-[table DynamicBuffer requirements
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`X::const_buffers_type`]
- [type meeting [link asio.reference.ConstBufferSequence ConstBufferSequence]
- requirements.]
- [This type represents the memory associated with the input sequence.]
- ]
- [
- [`X::mutable_buffers_type`]
- [type meeting [link asio.reference.MutableBufferSequence MutableBufferSequence]
- requirements.]
- [This type represents the memory associated with the output sequence.]
- ]
- [
- [`x1.size()`]
- [`size_t`]
- [Returns the size, in bytes, of the input sequence.]
- ]
- [
- [`x1.max_size()`]
- [`size_t`]
- [Returns the permitted maximum of the sum of the sizes of the input
- sequence and output sequence.]
- ]
- [
- [`x1.capacity()`]
- [`size_t`]
- [Returns the maximum sum of the sizes of the input sequence and output
- sequence that the dynamic buffer can hold without requiring reallocation.]
- ]
- [
- [`x1.data()`]
- [`X::const_buffers_type`]
- [Returns a constant buffer sequence `u` that represents the memory
- associated with the input sequence, and where `buffer_size(u) == size()`.]
- ]
- [
- [`x.prepare(n)`]
- [`X::mutable_buffers_type`]
- [Requires: `size() + n <= max_size()`.\n
- \n
- Returns a mutable buffer sequence `u` representing the output sequence, and
- where `buffer_size(u) == n`. The dynamic buffer reallocates memory as
- required. All constant or mutable buffer sequences previously obtained
- using `data()` or `prepare()` are invalidated.\n
- \n
- Throws: `length_error` if `size() + n > max_size()`.]
- ]
- [
- [`x.commit(n)`]
- []
- [Appends `n` bytes from the start of the output sequence to the end of the
- input sequence. The remainder of the output sequence is discarded. If `n`
- is greater than the size of the output sequence, the entire output sequence
- is appended to the input sequence. All constant or mutable buffer sequences
- previously obtained using `data()` or `prepare()` are invalidated.]
- ]
- [
- [`x.consume(n)`]
- []
- [Removes `n` bytes from beginning of the input sequence. If `n` is greater
- than the size of the input sequence, the entire input sequence is removed.
- All constant or mutable buffer sequences previously obtained using `data()`
- or `prepare()` are invalidated.]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/Endpoint.qbk b/3rdparty/asio/src/doc/requirements/Endpoint.qbk
deleted file mode 100644
index 4940dae4833..00000000000
--- a/3rdparty/asio/src/doc/requirements/Endpoint.qbk
+++ /dev/null
@@ -1,94 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:Endpoint Endpoint requirements]
-
-A type `X` meets the `Endpoint` requirements if it satisfies the requirements
-of `Destructible` (C++Std [destructible]), `DefaultConstructible` (C++Std
-[defaultconstructible]), `CopyConstructible` (C++Std [copyconstructible]),
-and `CopyAssignable` (C++Std [copyassignable]), as well as the additional
-requirements listed below.
-
-In the table below, `a` denotes a (possibly const) value of type `X`, and `u`
-denotes an identifier.
-
-[table Endpoint requirements
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`X::protocol_type`]
- [type meeting [link asio.reference.Protocol `Protocol`] requirements]
- []
- ]
- [
- [`a.protocol()`]
- [`protocol_type`]
- []
- ]
-]
-
-In the table below, `a` denotes a (possibly const) value of type `X`, `b`
-denotes a value of type `X`, and `s` denotes a (possibly const) value of a type
-that is convertible to `size_t` and denotes a size in bytes.
-
-[table Endpoint requirements for extensible implementations
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`a.data()`]
- [`const void*`]
- [
- Returns a pointer suitable for passing as the /address/ argument to
- functions such as __POSIX__ __connect__, or as the /dest_addr/ argument
- to functions such as __POSIX__ __sendto__. The implementation shall
- perform a `static_cast` on the pointer to convert it to `const
- sockaddr*`.
- ]
- ]
- [
- [`b.data()`]
- [`void*`]
- [
- Returns a pointer suitable for passing as the /address/ argument to
- functions such as __POSIX__ __accept__, __getpeername__, __getsockname__
- and __recvfrom__. The implementation shall perform a `static_cast` on the
- pointer to convert it to `sockaddr*`.
- ]
- ]
- [
- [`a.size()`]
- [`size_t`]
- [
- Returns a value suitable for passing as the /address_len/ argument
- to functions such as __POSIX__ __connect__, or as the /dest_len/ argument
- to functions such as __POSIX__ __sendto__, after appropriate integer
- conversion has been performed.
- ]
- ]
- [
- [`b.resize(s)`]
- []
- [
- pre: `s >= 0`\n
- post: `a.size() == s`\n
- Passed the value contained in the /address_len/ argument to functions
- such as __POSIX__ __accept__, __getpeername__, __getsockname__ and
- __recvfrom__, after successful completion of the function. Permitted to
- throw an exception if the protocol associated with the endpoint object
- `a` does not support the specified size.
- ]
- ]
- [
- [`a.capacity()`]
- [`size_t`]
- [
- Returns a value suitable for passing as the /address_len/ argument to
- functions such as __POSIX__ __accept__, __getpeername__, __getsockname__
- and __recvfrom__, after appropriate integer conversion has been performed.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/EndpointSequence.qbk b/3rdparty/asio/src/doc/requirements/EndpointSequence.qbk
deleted file mode 100644
index 1e1648eb7a7..00000000000
--- a/3rdparty/asio/src/doc/requirements/EndpointSequence.qbk
+++ /dev/null
@@ -1,30 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:EndpointSequence Endpoint sequence requirements]
-
-A type `X` meets the `EndpointSequence` requirements if it satisfies the
-requirements of `Destructible` (C++Std [destructible]) and `CopyConstructible`
-(C++Std [copyconstructible]), as well as the additional requirements listed
-below.
-
-In the table below, `x` denotes a (possibly const) value of type `X`.
-
-[table EndpointSequence requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`x.begin()`\n
- `x.end()`]
- [A type meeting the requirements for forward iterators
- (C++Std \[forward.iterators\]) whose value type is convertible to
- a type satisfying the [link asio.reference.Endpoint `Endpoint`]
- requirements.]
- [[half_open_range `x.begin()`,`x.end()`] is a valid range.]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ExecutionContext.qbk b/3rdparty/asio/src/doc/requirements/ExecutionContext.qbk
deleted file mode 100644
index 94d1cd141da..00000000000
--- a/3rdparty/asio/src/doc/requirements/ExecutionContext.qbk
+++ /dev/null
@@ -1,36 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ExecutionContext Execution context requirements]
-
-A type `X` meets the `ExecutionContext` requirements if it is publicly and
-unambiguously derived from `execution_context`, and satisfies the additional
-requirements listed below.
-
-In the table below, `x` denotes a value of type `X`.
-
-[table ExecutionContext requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`X::executor_type`]
- [type meeting [link asio.reference.Executor1 `Executor`] requirements]
- []
- ]
- [
- [`x.~X()`]
- []
- [Destroys all unexecuted function objects that were submitted via an
- executor object that is associated with the execution context.]
- ]
- [
- [`x.get_executor()`]
- [`X::executor_type`]
- [Returns an executor object that is associated with the execution context.]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/Executor.qbk b/3rdparty/asio/src/doc/requirements/Executor.qbk
deleted file mode 100644
index 07548605730..00000000000
--- a/3rdparty/asio/src/doc/requirements/Executor.qbk
+++ /dev/null
@@ -1,141 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:Executor1 Executor requirements]
-
-The library describes a standard set of requirements for ['executors]. A type
-meeting the `Executor` requirements embodies a set of rules for determining how
-submitted function objects are to be executed.
-
-A type `X` meets the `Executor` requirements if it satisfies the requirements of
-`CopyConstructible` (C++Std [copyconstructible]) and `Destructible` (C++Std
-[destructible]), as well as the additional requirements listed below.
-
-No constructor, comparison operator, copy operation, move operation, swap
-operation, or member functions `context`, `on_work_started`, and
-`on_work_finished` on these types shall exit via an exception.
-
-The executor copy constructor, comparison operators, and other member functions
-defined in these requirements shall not introduce data races as a result of
-concurrent calls to those functions from different threads.
-
-Let `ctx` be the execution context returned by the executor's `context()`
-member function. An executor becomes ['invalid] when the first call to
-`ctx.shutdown()` returns. The effect of calling `on_work_started`,
-`on_work_finished`, `dispatch`, `post`, or `defer` on an invalid executor is
-undefined. [inline_note The copy constructor, comparison operators, and
-`context()` member function continue to remain valid until `ctx` is destroyed.]
-
-In the table below, `x1` and `x2` denote (possibly const) values of type `X`,
-`mx1` denotes an xvalue of type `X`, `f` denotes a `MoveConstructible` (C++Std
-[moveconstructible]) function object callable with zero arguments, `a` denotes
-a (possibly const) value of type `A` meeting the `Allocator` requirements
-(C++Std [allocator.requirements]), and `u` denotes an identifier.
-
-[table Executor requirements
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`X u(x1);`]
- []
- [Shall not exit via an exception.\n
- \n
- post: `u == x1` and
- `std::addressof(u.context()) == std::addressof(x1.context()).`]
- ]
- [
- [`X u(mx1);`]
- []
- [Shall not exit via an exception.\n
- \n
- post: `u` equals the prior value of `mx1` and
- `std::addressof(u.context())` equals the prior value of
- `std::addressof(mx1.context())`.]
- ]
- [
- [`x1 == x2`]
- [`bool`]
- [ Returns `true` only if `x1` and `x2` can be interchanged with identical
- effects in any of the expressions defined in these type requirements.
- [inline_note Returning `false` does not necessarily imply that the effects
- are not identical.]\n
- \n
- `operator==` shall be reflexive, symmetric, and transitive, and shall not
- exit via an exception.]
- ]
- [
- [`x1 != x2`]
- [`bool`]
- [Same as `!(x1 == x2)`.]
- ]
- [
- [`x1.context()`]
- [`execution_context&`, or `E&` where `E` is a type that satifisfies the
- [link asio.reference.ExecutionContext `ExecutionContext`] requirements.]
- [Shall not exit via an exception.\n
- \n
- The comparison operators and member functions defined in these
- requirements shall not alter the reference returned by this function.]
- ]
- [
- [`x1.on_work_started()`]
- []
- [Shall not exit via an exception.]
- ]
- [
- [`x1.on_work_finished()`]
- []
- [Shall not exit via an exception.\n
- \n
- Precondition: A preceding call `x2.on_work_started()` where `x1 == x2`.]
- ]
- [
- [`x1.dispatch(std::move(f),a)`]
- []
- [Effects: Creates an object `f1` initialized with
- [^['DECAY_COPY]]`(forward<Func>(f))` (C++Std \[thread.decaycopy\]) in the
- current thread of execution . Calls `f1()` at most once. The executor may
- block forward progress of the caller until `f1()` finishes execution.\n
- \n
- Executor implementations should use the supplied allocator to allocate any
- memory required to store the function object. Prior to invoking the
- function object, the executor shall deallocate any memory allocated.
- [inline_note Executors defined in this Technical Specification always use
- the supplied allocator unless otherwise specified.]\n
- \n
- Synchronization: The invocation of `dispatch` synchronizes with (C++Std
- \[intro.multithread\]) the invocation of `f1`.]
- ]
- [
- [`x1.post(std::move(f),a)`\n
- `x1.defer(std::move(f),a)`]
- []
- [Effects: Creates an object `f1` initialized with
- [^['DECAY_COPY]]`(forward<Func>(f))` in the current thread of execution.
- Calls `f1()` at most once. The executor shall not block forward progress
- of the caller pending completion of `f1()`.\n
- \n
- Executor implementations should use the supplied allocator to allocate any
- memory required to store the function object. Prior to invoking the
- function object, the executor shall deallocate any memory allocated.
- [inline_note Executors defined in this Technical Specification always use
- the supplied allocator unless otherwise specified.]\n
- \n
- Synchronization: The invocation of `post` or `defer` synchronizes with
- (C++Std \[intro.multithread\]) the invocation of `f1`.\n
- \n
- [inline_note Although the requirements placed on `defer` are identical to
- `post`, the use of `post` conveys a preference that the caller ['does not]
- block the first step of [^f1]'s progress, whereas `defer` conveys a
- preference that the caller ['does] block the first step of [^f1]. One use
- of `defer` is to convey the intention of the caller that [^f1] is a
- continuation of the current call context. The executor may use this
- information to optimize or otherwise adjust the way in which `f1` is
- invoked.]]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/GettableSerialPortOption.qbk b/3rdparty/asio/src/doc/requirements/GettableSerialPortOption.qbk
deleted file mode 100644
index 8da158da1a4..00000000000
--- a/3rdparty/asio/src/doc/requirements/GettableSerialPortOption.qbk
+++ /dev/null
@@ -1,33 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:GettableSerialPortOption Gettable serial port option requirements]
-
-In the table below, `X` denotes a serial port option class, `a` denotes a value
-of `X`, `ec` denotes a value of type `error_code`, and `s` denotes a value of
-implementation-defined type ['[^storage]] (where ['[^storage]] is the type
-`DCB` on Windows and `termios` on __POSIX__ platforms), and `u` denotes an
-identifier.
-
-[table GettableSerialPortOption requirements
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [
- `const `['[^storage]]`& u = s;`\n
- `a.load(u, ec);`
- ]
- [`error_code`]
- [
- Retrieves the value of the serial port option from the storage.\n
- \n
- If successful, sets `ec` such that `!ec` is true. If an error occurred,
- sets `ec` such that `!!ec` is true. Returns `ec`.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/GettableSocketOption.qbk b/3rdparty/asio/src/doc/requirements/GettableSocketOption.qbk
deleted file mode 100644
index e859a54e599..00000000000
--- a/3rdparty/asio/src/doc/requirements/GettableSocketOption.qbk
+++ /dev/null
@@ -1,67 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:GettableSocketOption Gettable socket option requirements]
-
-A type `X` meets the `GettableSocketOption` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a (possibly const) value of type `X`, `b`
-denotes a value of type `X`, `p` denotes a (possibly const) value that meets
-the [link asio.reference.Protocol `Protocol`] requirements, and `s` denotes a
-(possibly const) value of a type that is convertible to `size_t` and denotes a
-size in bytes.
-
-[table GettableSocketOption requirements for extensible implementations
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`a.level(p)`]
- [`int`]
- [
- Returns a value suitable for passing as the /level/ argument to __POSIX__
- __getsockopt__ (or equivalent).
- ]
- ]
- [
- [`a.name(p)`]
- [`int`]
- [
- Returns a value suitable for passing as the /option_name/ argument to
- __POSIX__ __getsockopt__ (or equivalent).
- ]
- ]
- [
- [`b.data(p)`]
- [`void*`]
- [
- Returns a pointer suitable for passing as the /option_value/ argument to
- __POSIX__ __getsockopt__ (or equivalent).
- ]
- ]
- [
- [`a.size(p)`]
- [`size_t`]
- [
- Returns a value suitable for passing as the /option_len/ argument to
- __POSIX__ __getsockopt__ (or equivalent), after appropriate
- integer conversion has been performed.
- ]
- ]
- [
- [`b.resize(p,s)`]
- []
- [
- post: `b.size(p) == s`.\n
- Passed the value contained in the /option_len/ argument to __POSIX__
- __getsockopt__ (or equivalent) after successful completion of the
- function. Permitted to throw an exception if the socket option object `b`
- does not support the specified size.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/Handler.qbk b/3rdparty/asio/src/doc/requirements/Handler.qbk
deleted file mode 100644
index 74dcd05494b..00000000000
--- a/3rdparty/asio/src/doc/requirements/Handler.qbk
+++ /dev/null
@@ -1,64 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:Handler Handlers]
-
-A handler must meet the requirements of `CopyConstructible` types (C++ Std,
-20.1.3).
-
-In the table below, `X` denotes a handler class, `h` denotes a value of `X`,
-`p` denotes a pointer to a block of allocated memory of type `void*`, `s`
-denotes the size for a block of allocated memory, and `f` denotes a function
-object taking no arguments.
-
-[table Handler requirements
- [[expression] [return type] [assertion/note\npre/post-conditions]]
- [
- [``
- using asio::asio_handler_allocate;
- asio_handler_allocate(s, &h);
- ``]
- [`void*`]
- [
- Returns a pointer to a block of memory of size `s`. The pointer must
- satisfy the same alignment requirements as a pointer returned by
- `::operator new()`. Throws `bad_alloc` on failure.\n\n The
- `asio_handler_allocate()` function is located using argument-dependent
- lookup. The function `asio::asio_handler_allocate()` serves as a
- default if no user-supplied function is available.
- ]
- ]
- [
- [``
- using asio::asio_handler_deallocate;
- asio_handler_deallocate(p, s, &h);
- ``]
- []
- [
- Frees a block of memory associated with a pointer `p`, of at least size
- `s`, that was previously allocated using `asio_handler_allocate()`.\n\n The
- `asio_handler_deallocate()` function is located using argument-dependent
- lookup. The function `asio::asio_handler_deallocate()` serves as a
- default if no user-supplied function is available.
- ]
- ]
- [
- [``
- using asio::asio_handler_invoke;
- asio_handler_invoke(f, &h);
- ``]
- []
- [
- Causes the function object `f` to be executed as if by calling `f()`.\n\n
- The `asio_handler_invoke()` function is located using argument-dependent
- lookup. The function `asio::asio_handler_invoke()` serves as a
- default if no user-supplied function is available.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/HandshakeHandler.qbk b/3rdparty/asio/src/doc/requirements/HandshakeHandler.qbk
deleted file mode 100644
index 98891bfd87d..00000000000
--- a/3rdparty/asio/src/doc/requirements/HandshakeHandler.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:HandshakeHandler SSL handshake handler requirements]
-
-A handshake handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a handshake handler
-class should work correctly in the expression `h(ec)`, where `ec` is an lvalue
-of type `const error_code`.
-
-[heading Examples]
-
-A free function as a handshake handler:
-
- void handshake_handler(
- const asio::error_code& ec)
- {
- ...
- }
-
-A handshake handler function object:
-
- struct handshake_handler
- {
- ...
- void operator()(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- };
-
-A lambda as a handshake handler:
-
- ssl_stream.async_handshake(...,
- [](const asio::error_code& ec)
- {
- ...
- });
-
-A non-static class member function adapted to a handshake handler using
-`std::bind()`:
-
- void my_class::handshake_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- ssl_stream.async_handshake(...,
- std::bind(&my_class::handshake_handler,
- this, std::placeholders::_1));
-
-A non-static class member function adapted to a handshake handler using
-`boost::bind()`:
-
- void my_class::handshake_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- ssl_stream.async_handshake(...,
- boost::bind(&my_class::handshake_handler,
- this, asio::placeholders::error));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/InternetProtocol.qbk b/3rdparty/asio/src/doc/requirements/InternetProtocol.qbk
deleted file mode 100644
index 70ab668e8b2..00000000000
--- a/3rdparty/asio/src/doc/requirements/InternetProtocol.qbk
+++ /dev/null
@@ -1,47 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:InternetProtocol Internet protocol requirements]
-
-A type `X` meets the `InternetProtocol` requirements if it satisfies the
-requirements of [link asio.reference.AcceptableProtocol `AcceptableProtocol`],
-as well as the additional requirements listed below.
-
-In the table below, `a` denotes a (possibly const) value of type `X`, and `b`
-denotes a (possibly const) value of type `X`.
-
-[table InternetProtocol requirements
- [[expression] [return type] [assertion/note\npre/post-conditions]]
- [
- [`X::resolver`]
- [`ip::basic_resolver<X>`]
- [The type of a resolver for the protocol.]
- ]
- [
- [`X::v4()`]
- [`X`]
- [Returns an object representing the IP version 4 protocol.]
- ]
- [
- [`X::v6()`]
- [`X`]
- [Returns an object representing the IP version 6 protocol.]
- ]
- [
- [`a == b`]
- [convertible to `bool`]
- [Returns `true` if `a` and `b` represent the same IP protocol version,
- otherwise `false`.]
- ]
- [
- [`a != b`]
- [convertible to `bool`]
- [Returns `!(a == b)`.]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/IoControlCommand.qbk b/3rdparty/asio/src/doc/requirements/IoControlCommand.qbk
deleted file mode 100644
index 8809335a4ee..00000000000
--- a/3rdparty/asio/src/doc/requirements/IoControlCommand.qbk
+++ /dev/null
@@ -1,34 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:IoControlCommand I/O control command requirements]
-
-A type `X` meets the `IoControlCommand` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a (possibly const) value of type `X`, and `b`
-denotes a value of type `X`.
-
-[table IoControlCommand requirements for extensible implementations
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`a.name()`]
- [`int`]
- [
- Returns a value suitable for passing as the /request/ argument to
- __POSIX__ __ioctl__ (or equivalent).
- ]
- ]
- [
- [`b.data()`]
- [`void*`]
- [
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/IoObjectService.qbk b/3rdparty/asio/src/doc/requirements/IoObjectService.qbk
deleted file mode 100644
index 3d3ccc0fb61..00000000000
--- a/3rdparty/asio/src/doc/requirements/IoObjectService.qbk
+++ /dev/null
@@ -1,62 +0,0 @@
-[/
- / Copyright (c) 2003-2015 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)
- /]
-
-[section:IoObjectService I/O object service requirements]
-
-An I/O object service must meet the requirements for a [link
-asio.reference.Service service], as well as the requirements listed
-below.
-
-In the table below, `X` denotes an I/O object service class, `a` and `ao` denote
-values of type `X`, `b` and `c` denote values of type `X::implementation_type`,
-and `u` denotes an identifier.
-
-[table IoObjectService requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`X::implementation_type`]
- []
- []
- ]
- [
- [`X::implementation_type u;`]
- []
- [note: `X::implementation_type` has a public default constructor and
- destructor.]
- ]
- [
- [``
- a.construct(b);
- ``]
- []
- []
- ]
- [
- [``
- a.destroy(b);
- ``]
- []
- [note: `destroy()` will only be called on a value that has previously been
- initialised with `construct()` or `move_construct()`.]
- ]
- [
- [``
- a.move_construct(b, c);
- ``]
- []
- [note: only required for I/O objects that support movability.]
- ]
- [
- [``
- a.move_assign(b, ao, c);
- ``]
- []
- [note: only required for I/O objects that support movability.]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/IteratorConnectHandler.qbk b/3rdparty/asio/src/doc/requirements/IteratorConnectHandler.qbk
deleted file mode 100644
index db2aee42c28..00000000000
--- a/3rdparty/asio/src/doc/requirements/IteratorConnectHandler.qbk
+++ /dev/null
@@ -1,81 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:IteratorConnectHandler Iterator connect handler requirements]
-
-An iterator connect handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of an iterator connect handler
-class should work correctly in the expression `h(ec, i)`, where `ec` is an
-lvalue of type `const error_code` and `i` is an lvalue of the type `Iterator`
-used in the corresponding `connect()` or async_connect()` function.
-
-[heading Examples]
-
-A free function as an iterator connect handler:
-
- void connect_handler(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::iterator iterator)
- {
- ...
- }
-
-An iterator connect handler function object:
-
- struct connect_handler
- {
- ...
- template <typename Iterator>
- void operator()(
- const asio::error_code& ec,
- Iterator iterator)
- {
- ...
- }
- ...
- };
-
-A lambda as an iterator connect handler:
-
- asio::async_connect(...,
- [](const asio::error_code& ec,
- asio::ip::tcp::resolver::iterator iterator)
- {
- ...
- });
-
-A non-static class member function adapted to an iterator connect handler using
-`std::bind()`:
-
- void my_class::connect_handler(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::iterator iterator)
- {
- ...
- }
- ...
- asio::async_connect(...,
- std::bind(&my_class::connect_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-A non-static class member function adapted to an iterator connect handler using
-`boost::bind()`:
-
- void my_class::connect_handler(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::iterator iterator)
- {
- ...
- }
- ...
- asio::async_connect(...,
- boost::bind(&my_class::connect_handler,
- this, asio::placeholders::error,
- asio::placeholders::iterator));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/MoveAcceptHandler.qbk b/3rdparty/asio/src/doc/requirements/MoveAcceptHandler.qbk
deleted file mode 100644
index d545497fde6..00000000000
--- a/3rdparty/asio/src/doc/requirements/MoveAcceptHandler.qbk
+++ /dev/null
@@ -1,61 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:MoveAcceptHandler Move accept handler requirements]
-
-A move accept handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a move accept handler class
-should work correctly in the expression `h(ec, s)`, where `ec` is an lvalue of
-type `const error_code` and `s` is an lvalue of the nested type
-`Protocol::socket` for the type `Protocol` of the socket class template.
-
-[heading Examples]
-
-A free function as a move accept handler:
-
- void accept_handler(
- const asio::error_code& ec, asio::ip::tcp::socket s)
- {
- ...
- }
-
-A move accept handler function object:
-
- struct accept_handler
- {
- ...
- void operator()(
- const asio::error_code& ec, asio::ip::tcp::socket s)
- {
- ...
- }
- ...
- };
-
-A lambda as a move accept handler:
-
- acceptor.async_accept(...,
- [](const asio::error_code& ec, asio::ip::tcp::socket s)
- {
- ...
- });
-
-A non-static class member function adapted to a move accept handler using
-`std::bind()`:
-
- void my_class::accept_handler(
- const asio::error_code& ec, asio::ip::tcp::socket socket)
- {
- ...
- }
- ...
- asio::async_accept(...,
- std::bind(&my_class::accept_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/MutableBufferSequence.qbk b/3rdparty/asio/src/doc/requirements/MutableBufferSequence.qbk
deleted file mode 100644
index 7683a682ec6..00000000000
--- a/3rdparty/asio/src/doc/requirements/MutableBufferSequence.qbk
+++ /dev/null
@@ -1,56 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:MutableBufferSequence Mutable buffer sequence requirements]
-
-A ['mutable buffer sequence] represents a set of memory regions that may be
-used to receive the output of an operation, such as the `receive` operation of
-a socket.
-
-A type `X` meets the `MutableBufferSequence` requirements if it satisfies the
-requirements of `Destructible` (C++Std [destructible]) and
-`CopyConstructible` (C++Std [copyconstructible]), as well as the additional
-requirements listed below.
-
-In the table below, `x` denotes a (possibly const) value of type `X`, and `u`
-denotes an identifier.
-
-[table MutableBufferSequence requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`asio::buffer_sequence_begin(x)`\n
- `asio::buffer_sequence_end(x)`]
- [An iterator type meeting the requirements for bidirectional iterators
- (C++Std \[bidirectional.iterators\]) whose value type is convertible to
- `mutable_buffer`.]
- []
- ]
- [
- [``
- X u(x);
- ``]
- []
- [post:\n
- ``
- equal(
- asio::buffer_sequence_begin(x),
- asio::buffer_sequence_end(x),
- asio::buffer_sequence_begin(u),
- asio::buffer_sequence_end(u),
- [](const typename X::value_type& v1,
- const typename X::value_type& v2)
- {
- mutable_buffer b1(v1);
- mutable_buffer b2(v2);
- return b1.data() == b2.data()
- && b1.size() == b2.size();
- })
- ``]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ProtoAllocator.qbk b/3rdparty/asio/src/doc/requirements/ProtoAllocator.qbk
deleted file mode 100644
index 2d318f2565f..00000000000
--- a/3rdparty/asio/src/doc/requirements/ProtoAllocator.qbk
+++ /dev/null
@@ -1,19 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ProtoAllocator Proto-allocator requirements]
-
-A type `A` meets the proto-allocator requirements if `A` is `CopyConstructible`
-(C++Std [copyconstructible]), `Destructible` (C++Std [destructible]), and
-`allocator_traits<A>::rebind_alloc<U>` meets the allocator requirements (C++Std
-[allocator.requirements]), where `U` is an object type. [inline_note For
-example, `std::allocator<void>` meets the proto-allocator requirements but not
-the allocator requirements.] No constructor, comparison operator, copy
-operation, move operation, or swap operation on these types shall exit via an
-exception.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/Protocol.qbk b/3rdparty/asio/src/doc/requirements/Protocol.qbk
deleted file mode 100644
index 7a55d147fc1..00000000000
--- a/3rdparty/asio/src/doc/requirements/Protocol.qbk
+++ /dev/null
@@ -1,54 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:Protocol Protocol requirements]
-
-A type `X` meets the `Protocol` requirements if it satisfies the requirements
-of `Destructible` (C++Std [destructible]), `CopyConstructible` (C++Std
-[copyconstructible]), and `CopyAssignable` (C++Std [copyassignable]), as well
-as the additional requirements listed below.
-
-[table Protocol requirements
- [[expression] [return type] [assertion/note\npre/post-conditions]]
- [
- [`X::endpoint`]
- [type meeting [link asio.reference.Endpoint endpoint] requirements]
- []
- ]
-]
-
-In the table below, `a` denotes a (possibly const) value of type `X`.
-
-[table Protocol requirements for extensible implementations
- [[expression] [return type] [assertion/note\npre/post-conditions]]
- [
- [`a.family()`]
- [`int`]
- [
- Returns a value suitable for passing as the /domain/ argument to
- __POSIX__ __socket__ (or equivalent).
- ]
- ]
- [
- [`a.type()`]
- [`int`]
- [
- Returns a value suitable for passing as the /type/ argument to __POSIX__
- __socket__ (or equivalent).
- ]
- ]
- [
- [`a.protocol()`]
- [`int`]
- [
- Returns a value suitable for passing as the /protocol/ argument to
- __POSIX__ __socket__ (or equivalent).
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/RangeConnectHandler.qbk b/3rdparty/asio/src/doc/requirements/RangeConnectHandler.qbk
deleted file mode 100644
index 4300af1003b..00000000000
--- a/3rdparty/asio/src/doc/requirements/RangeConnectHandler.qbk
+++ /dev/null
@@ -1,82 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:RangeConnectHandler Range connect handler requirements]
-
-A range connect handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a range connect handler class
-should work correctly in the expression `h(ec, ep)`, where `ec` is an lvalue of
-type `const error_code` and `ep` is an lvalue of the type `Protocol::endpoint`
-for the `Protocol` type in the corresponding `connect()` or async_connect()`
-function.
-
-[heading Examples]
-
-A free function as a range connect handler:
-
- void connect_handler(
- const asio::error_code& ec,
- const asio::ip::tcp::endpoint& endpoint)
- {
- ...
- }
-
-A range connect handler function object:
-
- struct connect_handler
- {
- ...
- template <typename Range>
- void operator()(
- const asio::error_code& ec,
- const asio::ip::tcp::endpoint& endpoint)
- {
- ...
- }
- ...
- };
-
-A lambda as a range connect handler:
-
- asio::async_connect(...,
- [](const asio::error_code& ec,
- const asio::ip::tcp::endpoint& endpoint)
- {
- ...
- });
-
-A non-static class member function adapted to a range connect handler using
-`std::bind()`:
-
- void my_class::connect_handler(
- const asio::error_code& ec,
- const asio::ip::tcp::endpoint& endpoint)
- {
- ...
- }
- ...
- asio::async_connect(...,
- std::bind(&my_class::connect_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-A non-static class member function adapted to a range connect handler using
-`boost::bind()`:
-
- void my_class::connect_handler(
- const asio::error_code& ec,
- const asio::ip::tcp::endpoint& endpoint)
- {
- ...
- }
- ...
- asio::async_connect(...,
- boost::bind(&my_class::connect_handler,
- this, asio::placeholders::error,
- asio::placeholders::endpoint));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ReadHandler.qbk b/3rdparty/asio/src/doc/requirements/ReadHandler.qbk
deleted file mode 100644
index 373af8720e0..00000000000
--- a/3rdparty/asio/src/doc/requirements/ReadHandler.qbk
+++ /dev/null
@@ -1,79 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ReadHandler Read handler requirements]
-
-A read handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a read handler class
-should work correctly in the expression `h(ec, s)`, where `ec` is an lvalue of
-type `const error_code` and `s` is an lvalue of type `const size_t`.
-
-[heading Examples]
-
-A free function as a read handler:
-
- void read_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
-
-A read handler function object:
-
- struct read_handler
- {
- ...
- void operator()(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- };
-
-A lambda as a read handler:
-
- socket.async_read(...
- [](const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- });
-
-A non-static class member function adapted to a read handler using
-`std::bind()`:
-
- void my_class::read_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- socket.async_read(...,
- std::bind(&my_class::read_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-A non-static class member function adapted to a read handler using
-`boost::bind()`:
-
- void my_class::read_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- socket.async_read(...,
- boost::bind(&my_class::read_handler,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ResolveHandler.qbk b/3rdparty/asio/src/doc/requirements/ResolveHandler.qbk
deleted file mode 100644
index 0ba93855a75..00000000000
--- a/3rdparty/asio/src/doc/requirements/ResolveHandler.qbk
+++ /dev/null
@@ -1,82 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ResolveHandler Resolve handler requirements]
-
-A resolve handler must meet the requirements for a [link asio.reference.Handler
-handler]. A value `h` of a resolve handler class should work correctly in the
-expression `h(ec, r)`, where `ec` is an lvalue of type `const error_code` and
-`r` is an lvalue of type `const ip::basic_resolver_results<InternetProtocol>`.
-`InternetProtocol` is the template parameter of the [link
-asio.reference.ip__basic_resolver `ip::basic_resolver<>`] which is used to
-initiate the asynchronous operation.
-
-[heading Examples]
-
-A free function as a resolve handler:
-
- void resolve_handler(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::results_type results)
- {
- ...
- }
-
-A resolve handler function object:
-
- struct resolve_handler
- {
- ...
- void operator()(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::results_type results)
- {
- ...
- }
- ...
- };
-
-A lambda as a resolve handler:
-
- resolver.async_resolve(...,
- [](const asio::error_code& ec,
- asio::ip::tcp::resolver::results_type results)
- {
- ...
- });
-
-A non-static class member function adapted to a resolve handler using
-`std::bind()`:
-
- void my_class::resolve_handler(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::results_type results)
- {
- ...
- }
- ...
- resolver.async_resolve(...,
- std::bind(&my_class::resolve_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-A non-static class member function adapted to a resolve handler using
-`boost::bind()`:
-
- void my_class::resolve_handler(
- const asio::error_code& ec,
- asio::ip::tcp::resolver::results_type results)
- {
- ...
- }
- ...
- resolver.async_resolve(...,
- boost::bind(&my_class::resolve_handler,
- this, asio::placeholders::error,
- asio::placeholders::results));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/Service.qbk b/3rdparty/asio/src/doc/requirements/Service.qbk
deleted file mode 100644
index 24a1ae584e4..00000000000
--- a/3rdparty/asio/src/doc/requirements/Service.qbk
+++ /dev/null
@@ -1,40 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:Service Service requirements]
-
-A class is a ['service] if it is publicly and unambiguously derived from
-`execution_context::service`, or if it is publicly and unambiguously derived
-from another service. For a service `S`, `S::key_type` shall be valid and
-denote a type (C++Std [temp.deduct]), `is_base_of_v<typename S::key_type, S>`
-shall be `true`, and `S` shall satisfy the `Destructible` requirements (C++Std
-[destructible]).
-
-The first parameter of all service constructors shall be an lvalue reference to
-`execution_context`. This parameter denotes the `execution_context` object that
-represents a set of services, of which the service object will be a member.
-[inline_note These constructors may be called by the `make_service` function.]
-
-A service shall provide an explicit constructor with a single parameter of
-lvalue reference to `execution_context`. [inline_note This constructor may be
-called by the `use_service` function.]
-
- class my_service : public execution_context::service
- {
- public:
- typedef my_service key_type;
- explicit my_service(execution_context& ctx);
- my_service(execution_context& ctx, int some_value);
- private:
- virtual void shutdown() noexcept override;
- ...
- };
-
-A service's `shutdown` member function shall destroy all copies of user-defined
-function objects that are held by the service.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SettableSerialPortOption.qbk b/3rdparty/asio/src/doc/requirements/SettableSerialPortOption.qbk
deleted file mode 100644
index 5cbe5f13e5c..00000000000
--- a/3rdparty/asio/src/doc/requirements/SettableSerialPortOption.qbk
+++ /dev/null
@@ -1,33 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SettableSerialPortOption Settable serial port option requirements]
-
-In the table below, `X` denotes a serial port option class, `a` denotes a value
-of `X`, `ec` denotes a value of type `error_code`, and `s` denotes a value of
-implementation-defined type ['[^storage]] (where ['[^storage]] is the type
-`DCB` on Windows and `termios` on __POSIX__ platforms), and `u` denotes an
-identifier.
-
-[table SettableSerialPortOption requirements
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [
- `const X& u = a;`\n
- `u.store(s, ec);`
- ]
- [`error_code`]
- [
- Saves the value of the serial port option to the storage.\n
- \n
- If successful, sets `ec` such that `!ec` is true. If an error occurred,
- sets `ec` such that `!!ec` is true. Returns `ec`.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SettableSocketOption.qbk b/3rdparty/asio/src/doc/requirements/SettableSocketOption.qbk
deleted file mode 100644
index 162c0a96325..00000000000
--- a/3rdparty/asio/src/doc/requirements/SettableSocketOption.qbk
+++ /dev/null
@@ -1,54 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SettableSocketOption Settable socket option requirements]
-
-A type `X` meets the `SettableSocketOption` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a (possibly const) value of type `X`, `p`
-denotes a (possibly const) value that meets the [link asio.reference.Protocol
-`Protocol`] requirements, and `u` denotes an identifier.
-
-[table SettableSocketOption requirements for extensible implementations
- [[expression] [type] [assertion/note\npre/post-conditions]]
- [
- [`a.level(p)`]
- [`int`]
- [
- Returns a value suitable for passing as the /level/ argument to __POSIX__
- __setsockopt__ (or equivalent).
- ]
- ]
- [
- [`a.name(p)`]
- [`int`]
- [
- Returns a value suitable for passing as the /option_name/ argument to
- __POSIX__ __setsockopt__ (or equivalent).
- ]
- ]
- [
- [`a.data(p)`]
- [`const void*`]
- [
- Returns a pointer suitable for passing as the /option_value/ argument to
- __POSIX__ __setsockopt__ (or equivalent).
- ]
- ]
- [
- [`a.size(p)`]
- [`size_t`]
- [
- Returns a value suitable for passing as the /option_len/ argument to
- __POSIX__ __setsockopt__ (or equivalent), after appropriate integer
- conversion has been performed.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/ShutdownHandler.qbk b/3rdparty/asio/src/doc/requirements/ShutdownHandler.qbk
deleted file mode 100644
index 601c625cb11..00000000000
--- a/3rdparty/asio/src/doc/requirements/ShutdownHandler.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:ShutdownHandler SSL shutdown handler requirements]
-
-A shutdown handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a shutdown handler
-class should work correctly in the expression `h(ec)`, where `ec` is an lvalue
-of type `const error_code`.
-
-[heading Examples]
-
-A free function as a shutdown handler:
-
- void shutdown_handler(
- const asio::error_code& ec)
- {
- ...
- }
-
-A shutdown handler function object:
-
- struct shutdown_handler
- {
- ...
- void operator()(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- };
-
-A lambda as a shutdown handler:
-
- ssl_stream.async_shutdown(...,
- [](const asio::error_code& ec)
- {
- ...
- });
-
-A non-static class member function adapted to a shutdown handler using
-`std::bind()`:
-
- void my_class::shutdown_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- ssl_stream.async_shutdown(
- std::bind(&my_class::shutdown_handler,
- this, std::placeholders::_1));
-
-A non-static class member function adapted to a shutdown handler using
-`boost::bind()`:
-
- void my_class::shutdown_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- ssl_stream.async_shutdown(
- boost::bind(&my_class::shutdown_handler,
- this, asio::placeholders::error));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SignalHandler.qbk b/3rdparty/asio/src/doc/requirements/SignalHandler.qbk
deleted file mode 100644
index cfd806a8448..00000000000
--- a/3rdparty/asio/src/doc/requirements/SignalHandler.qbk
+++ /dev/null
@@ -1,79 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SignalHandler Signal handler requirements]
-
-A signal handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a signal handler class
-should work correctly in the expression `h(ec, n)`, where `ec` is an lvalue of
-type `const error_code` and `n` is an lvalue of type `const int`.
-
-[heading Examples]
-
-A free function as a signal handler:
-
- void signal_handler(
- const asio::error_code& ec,
- int signal_number)
- {
- ...
- }
-
-A signal handler function object:
-
- struct signal_handler
- {
- ...
- void operator()(
- const asio::error_code& ec,
- int signal_number)
- {
- ...
- }
- ...
- };
-
-A lambda as a signal handler:
-
- my_signal_set.async_wait(
- [](const asio::error_code& ec,
- int signal_number)
- {
- ...
- });
-
-A non-static class member function adapted to a signal handler using
-`std::bind()`:
-
- void my_class::signal_handler(
- const asio::error_code& ec,
- int signal_number)
- {
- ...
- }
- ...
- my_signal_set.async_wait(
- std::bind(&my_class::signal_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-A non-static class member function adapted to a signal handler using
-`boost::bind()`:
-
- void my_class::signal_handler(
- const asio::error_code& ec,
- int signal_number)
- {
- ...
- }
- ...
- my_signal_set.async_wait(
- boost::bind(&my_class::signal_handler,
- this, asio::placeholders::error,
- asio::placeholders::signal_number));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk b/3rdparty/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk
deleted file mode 100644
index 4e960b0a55e..00000000000
--- a/3rdparty/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk
+++ /dev/null
@@ -1,49 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SyncRandomAccessReadDevice Buffer-oriented synchronous random-access
-read device requirements]
-
-In the table below, `a` denotes a synchronous random-access read device object,
-`o` denotes an offset of type `boost::uint64_t`, `mb` denotes an object
-satisfying [link asio.reference.MutableBufferSequence mutable buffer sequence]
-requirements, and `ec` denotes an object of type `error_code`.
-
-[table Buffer-oriented synchronous random-access read device requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.read_some_at(o, mb);`]
- [`size_t`]
- [Equivalent to:
- ``
- error_code ec;
- size_t s = a.read_some_at(o, mb, ec);
- if (ec) throw system_error(ec);
- return s;
- ``]
- ]
- [
- [`a.read_some_at(o, mb, ec);`]
- [`size_t`]
- [
- Reads one or more bytes of data from the device `a` at offset `o`.\n
- \n
- The mutable buffer sequence `mb` specifies memory where the data should
- be placed. The `read_some_at` operation shall always fill a buffer in the
- sequence completely before proceeding to the next.\n
- \n
- If successful, returns the number of bytes read and sets `ec` such that
- `!ec` is true. If an error occurred, returns `0` and sets `ec` such that
- `!!ec` is true.\n
- \n
- If the total size of all buffers in the sequence `mb` is `0`, the
- function shall return `0` immediately.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk b/3rdparty/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk
deleted file mode 100644
index c7a2686f17b..00000000000
--- a/3rdparty/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk
+++ /dev/null
@@ -1,49 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SyncRandomAccessWriteDevice Buffer-oriented synchronous random-access
-write device requirements]
-
-In the table below, `a` denotes a synchronous random-access write device
-object, `o` denotes an offset of type `boost::uint64_t`, `cb` denotes an object
-satisfying [link asio.reference.ConstBufferSequence constant buffer sequence]
-requirements, and `ec` denotes an object of type `error_code`.
-
-[table Buffer-oriented synchronous random-access write device requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.write_some_at(o, cb);`]
- [`size_t`]
- [Equivalent to:
- ``
- error_code ec;
- size_t s = a.write_some(o, cb, ec);
- if (ec) throw system_error(ec);
- return s;
- ``]
- ]
- [
- [`a.write_some_at(o, cb, ec);`]
- [`size_t`]
- [
- Writes one or more bytes of data to the device `a` at offset `o`.\n
- \n
- The constant buffer sequence `cb` specifies memory where the data to be
- written is located. The `write_some_at` operation shall always write a
- buffer in the sequence completely before proceeding to the next.\n
- \n
- If successful, returns the number of bytes written and sets `ec` such
- that `!ec` is true. If an error occurred, returns `0` and sets `ec` such
- that `!!ec` is true.\n
- \n
- If the total size of all buffers in the sequence `cb` is `0`, the
- function shall return `0` immediately.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SyncReadStream.qbk b/3rdparty/asio/src/doc/requirements/SyncReadStream.qbk
deleted file mode 100644
index 48d3c23816d..00000000000
--- a/3rdparty/asio/src/doc/requirements/SyncReadStream.qbk
+++ /dev/null
@@ -1,41 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SyncReadStream Buffer-oriented synchronous read stream requirements]
-
-A type `X` meets the `SyncReadStream` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a value of type `X`, `mb` denotes a (possibly
-const) value satisfying the [link asio.reference.MutableBufferSequence
-`MutableBufferSequence`] requirements, and `ec` denotes an object of type
-`error_code`.
-
-[table SyncReadStream requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.read_some(mb)`\n
- `a.read_some(mb,ec)`]
- [`size_t`]
- [
- Meets the requirements for a [link asio.reference.read_write_operations
- read operation].\n
- \n
- If `buffer_size(mb) > 0`, reads one or more bytes of data from the stream
- `a` into the buffer sequence `mb`. If successful, sets `ec` such that
- `!ec` is `true`, and returns the number of bytes read. If an error
- occurred, sets `ec` such that `!!ec` is `true`, and returns 0. If all
- data has been read from the stream, and the stream performed an orderly
- shutdown, sets `ec` to `stream_errc::eof` and returns 0.\n
- \n
- If `buffer_size(mb) == 0`, the operation shall not block. Sets `ec` such
- that `!ec` is `true`, and returns 0.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/SyncWriteStream.qbk b/3rdparty/asio/src/doc/requirements/SyncWriteStream.qbk
deleted file mode 100644
index 713050c7552..00000000000
--- a/3rdparty/asio/src/doc/requirements/SyncWriteStream.qbk
+++ /dev/null
@@ -1,39 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:SyncWriteStream Buffer-oriented synchronous write stream requirements]
-
-A type `X` meets the `SyncWriteStream` requirements if it satisfies the
-requirements listed below.
-
-In the table below, `a` denotes a value of type `X`, `cb` denotes a (possibly
-const) value satisfying the [link asio.reference.ConstBufferSequence
-`ConstBufferSequence`] requirements, and `ec` denotes an object of type
-`error_code`.
-
-[table SyncWriteStream requirements
- [[operation] [type] [semantics, pre/post-conditions]]
- [
- [`a.write_some(cb)`\n
- `a.write_some(cb,ec)`]
- [`size_t`]
- [
- Meets the requirements for a [link asio.reference.read_write_operations
- write operation].\n
- \n
- If `buffer_size(cb) > 0`, writes one or more bytes of data to the stream
- `a` from the buffer sequence `cb`. If successful, sets `ec` such that
- `!ec` is `true`, and returns the number of bytes written. If an error
- occurred, sets `ec` such that `!!ec` is `true`, and returns 0.\n
- \n
- If `buffer_size(cb) == 0`, the operation shall not block. Sets `ec` such
- that `!ec` is `true`, and returns 0.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/TimeTraits.qbk b/3rdparty/asio/src/doc/requirements/TimeTraits.qbk
deleted file mode 100644
index edd01b8fd30..00000000000
--- a/3rdparty/asio/src/doc/requirements/TimeTraits.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:TimeTraits Time traits requirements]
-
-In the table below, `X` denotes a time traits class for time type `Time`, `t`,
-`t1`, and `t2` denote values of type `Time`, and `d` denotes a value of type
-`X::duration_type`.
-
-[table TimeTraits requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`X::time_type`]
- [`Time`]
- [
- Represents an absolute time. Must support default construction, and meet
- the requirements for `CopyConstructible` and `Assignable`.
- ]
- ]
- [
- [`X::duration_type`]
- []
- [
- Represents the difference between two absolute times. Must support
- default construction, and meet the requirements for `CopyConstructible`
- and `Assignable`. A duration can be positive, negative, or zero.
- ]
- ]
- [
- [`X::now();`]
- [`time_type`]
- [
- Returns the current time.
- ]
- ]
- [
- [`X::add(t, d);`]
- [`time_type`]
- [
- Returns a new absolute time resulting from adding the duration `d` to the
- absolute time `t`.
- ]
- ]
- [
- [`X::subtract(t1, t2);`]
- [`duration_type`]
- [
- Returns the duration resulting from subtracting `t2` from `t1`.
- ]
- ]
- [
- [`X::less_than(t1, t2);`]
- [`bool`]
- [
- Returns whether `t1` is to be treated as less than `t2`.
- ]
- ]
- [
- [`X::to_posix_duration(d);`]
- [`date_time::time_duration_type`]
- [
- Returns the `date_time::time_duration_type` value that most closely
- represents the duration `d`.
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/WaitHandler.qbk b/3rdparty/asio/src/doc/requirements/WaitHandler.qbk
deleted file mode 100644
index a7135f07369..00000000000
--- a/3rdparty/asio/src/doc/requirements/WaitHandler.qbk
+++ /dev/null
@@ -1,72 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:WaitHandler Wait handler requirements]
-
-A wait handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a wait handler class
-should work correctly in the expression `h(ec)`, where `ec` is an lvalue of
-type `const error_code`.
-
-[heading Examples]
-
-A free function as a wait handler:
-
- void wait_handler(
- const asio::error_code& ec)
- {
- ...
- }
-
-A wait handler function object:
-
- struct wait_handler
- {
- ...
- void operator()(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- };
-
-A lambda as a wait handler:
-
- socket.async_wait(...,
- [](const asio::error_code& ec)
- {
- ...
- });
-
-A non-static class member function adapted to a wait handler using
-`std::bind()`:
-
- void my_class::wait_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- socket.async_wait(...,
- std::bind(&my_class::wait_handler,
- this, std::placeholders::_1));
-
-A non-static class member function adapted to a wait handler using
-`boost::bind()`:
-
- void my_class::wait_handler(
- const asio::error_code& ec)
- {
- ...
- }
- ...
- socket.async_wait(...,
- boost::bind(&my_class::wait_handler,
- this, asio::placeholders::error));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/WaitTraits.qbk b/3rdparty/asio/src/doc/requirements/WaitTraits.qbk
deleted file mode 100644
index 13eb7482879..00000000000
--- a/3rdparty/asio/src/doc/requirements/WaitTraits.qbk
+++ /dev/null
@@ -1,52 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:WaitTraits Wait traits requirements]
-
-The `basic_waitable_timer` template uses wait traits to allow programs to
-customize `wait` and `async_wait` behavior.
-[inline_note Possible uses of wait traits include:\n
-[mdash] To enable timers based on non-realtime clocks.\n
-[mdash] Determining how quickly wallclock-based timers respond to system time
-changes.\n
-[mdash] Correcting for errors or rounding timeouts to boundaries.\n
-[mdash] Preventing duration overflow. That is, a program may set a timer's
-expiry `e` to be `Clock::max()` (meaning never reached) or `Clock::min()`
-(meaning always in the past). As a result, computing the duration until timer
-expiry as `e - Clock::now()` may cause overflow.]
-
-For a type `Clock` meeting the `Clock` requirements (C++Std
-[time.clock.req]), a type `X` meets the `WaitTraits` requirements if it
-satisfies the requirements listed below.
-
-In the table below, `t` denotes a (possibly const) value of type
-`Clock::time_point`; and `d` denotes a (possibly const) value of type
-`Clock::duration`.
-
-[table WaitTraits requirements
- [[expression] [return type] [assertion/note\npre/post-condition]]
- [
- [`X::to_wait_duration(d)`]
- [`Clock::duration`]
- [
- Returns a `Clock::duration` value to be used in a `wait` or `async_wait`
- operation. [inline_note The return value is typically representative of
- the duration `d`.]
- ]
- ]
- [
- [`X::to_wait_duration(t)`]
- [`Clock::duration`]
- [
- Returns a `Clock::duration` value to be used in a `wait` or `async_wait`
- operation. [inline_note The return value is typically representative of
- the duration from `Clock::now()` until the time point `t`.]
- ]
- ]
-]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/WriteHandler.qbk b/3rdparty/asio/src/doc/requirements/WriteHandler.qbk
deleted file mode 100644
index 29987ad8dd6..00000000000
--- a/3rdparty/asio/src/doc/requirements/WriteHandler.qbk
+++ /dev/null
@@ -1,79 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:WriteHandler Write handler requirements]
-
-A write handler must meet the requirements for a [link
-asio.reference.Handler handler]. A value `h` of a write handler class
-should work correctly in the expression `h(ec, s)`, where `ec` is an lvalue of
-type `const error_code` and `s` is an lvalue of type `const size_t`.
-
-[heading Examples]
-
-A free function as a write handler:
-
- void write_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
-
-A write handler function object:
-
- struct write_handler
- {
- ...
- void operator()(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- };
-
-A lambda as a write handler:
-
- socket.async_write(...
- [](const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- });
-
-A non-static class member function adapted to a write handler using
-`std::bind()`:
-
- void my_class::write_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- socket.async_write(...,
- std::bind(&my_class::write_handler,
- this, std::placeholders::_1,
- std::placeholders::_2));
-
-A non-static class member function adapted to a write handler using
-`boost::bind()`:
-
- void my_class::write_handler(
- const asio::error_code& ec,
- std::size_t bytes_transferred)
- {
- ...
- }
- ...
- socket.async_write(...,
- boost::bind(&my_class::write_handler,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/asynchronous_operations.qbk b/3rdparty/asio/src/doc/requirements/asynchronous_operations.qbk
deleted file mode 100644
index 40ccccf4c55..00000000000
--- a/3rdparty/asio/src/doc/requirements/asynchronous_operations.qbk
+++ /dev/null
@@ -1,281 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:asynchronous_operations Requirements on asynchronous operations]
-
-This section uses the names `Alloc1`, `Alloc2`, `alloc1`, `alloc2`, `Args`,
-`CompletionHandler`, `completion_handler`, `Executor1`, `Executor2`, `ex1`,
-`ex2`, `f`, [^['i]], [^['N]], `Signature`, `token`, [^T[sub ['i]]], [^t[sub
-['i]]], `work1`, and `work2` as placeholders for specifying the requirements
-below.
-
-[section General asynchronous operation concepts]
-
-An ['initiating function] is a function which may be called to start an
-asynchronous operation. A ['completion handler] is a function object that will
-be invoked, at most once, with the result of the asynchronous operation.
-
-The lifecycle of an asynchronous operation is comprised of the following events
-and phases:
-
-[mdash] Event 1: The asynchronous operation is started by a call to the
-initiating function.
-
-[mdash] Phase 1: The asynchronous operation is now ['outstanding].
-
-[mdash] Event 2: The externally observable side effects of the asynchronous
-operation, if any, are fully established. The completion handler is submitted
-to an executor.
-
-[mdash] Phase 2: The asynchronous operation is now ['completed].
-
-[mdash] Event 3: The completion handler is called with the result of the
-asynchronous operation.
-
-In this library, all functions with the prefix `async_` are initiating
-functions.
-
-[endsect]
-
-[section:completion_token Completion tokens and handlers]
-
-Initiating functions:
-
-[mdash] are function templates with template parameter `CompletionToken`;
-
-[mdash] accept, as the final parameter, a ['completion token] object `token`
-of type `CompletionToken`;
-
-[mdash] specify a ['completion signature], which is a call signature (C++Std
-[func.def]) `Signature` that determines the arguments to the completion
-handler.
-
-An initiating function determines the type `CompletionHandler` of its
-completion handler function object by performing `typename
-async_result<decay_t<CompletionToken>, Signature>::completion_handler_type`.
-The completion handler object `completion_handler` is initialized with
-`forward<CompletionToken>(token)`. [inline_note No other requirements are
-placed on the type `CompletionToken`.]
-
-The type `CompletionHandler` must satisfy the requirements of `Destructible`
-(C++Std [destructible]) and `MoveConstructible` (C++Std
-[moveconstructible]), and be callable with the specified call signature.
-
-In this library, all initiating functions specify a ['Completion signature]
-element that defines the call signature `Signature`. The ['Completion
-signature] elements in this Technical Specification have named parameters, and
-the results of an asynchronous operation are specified in terms of these names.
-
-[endsect]
-
-[section Automatic deduction of initiating function return type]
-
-The return type of an initiating function is `typename
-async_result<decay_t<CompletionToken>, Signature>::return_type`.
-
-For the sake of exposition, this library sometimes annotates functions with a
-return type ['[^DEDUCED]]. For every function declaration that returns
-['[^DEDUCED]], the meaning is equivalent to specifying the return type as
-`typename async_result<decay_t<CompletionToken>, Signature>::return_type`.
-
-[endsect]
-
-[section Production of initiating function return value]
-
-An initiating function produces its return type as follows:
-
-[mdash] constructing an object `result` of type
-`async_result<decay_t<CompletionToken>, Signature>`, initialized as
-`result(completion_handler)`; and
-
-[mdash] using `result.get()` as the operand of the return statement.
-
-\[['Example:] Given an asynchronous operation with ['Completion signature]
-`void(R1 r1, R2 r2)`, an initiating function meeting these requirements may be
-implemented as follows:
-
- template<class CompletionToken>
- auto async_xyz(T1 t1, T2 t2, CompletionToken&& token)
- {
- typename async_result<decay_t<CompletionToken>, void(R1, R2)>::completion_handler_type
- completion_handler(forward<CompletionToken>(token));
-
- async_result<decay_t<CompletionToken>, void(R1, R2)> result(completion_handler);
-
- // initiate the operation and cause completion_handler to be invoked with
- // the result
-
- return result.get();
- }
-
-For convenience, initiating functions may be implemented using the
-`async_completion` template:
-
- template<class CompletionToken>
- auto async_xyz(T1 t1, T2 t2, CompletionToken&& token)
- {
- async_completion<CompletionToken, void(R1, R2)> init(token);
-
- // initiate the operation and cause init.completion_handler to be invoked
- // with the result
-
- return init.result.get();
- }
-
-'''&mdash;'''['end example]\]
-
-[endsect]
-
-[section Lifetime of initiating function arguments]
-
-Unless otherwise specified, the lifetime of arguments to initiating functions
-shall be treated as follows:
-
-[mdash] If the parameter has a pointer type or has a type of lvalue reference
-to non-const, the implementation may assume the validity of the pointee or
-referent, respectively, until the completion handler is invoked. [inline_note
-In other words, the program must guarantee the validity of the argument until
-the completion handler is invoked.]
-
-[mdash] Otherwise, the implementation must not assume the validity of the
-argument after the initiating function completes. [inline_note In other words,
-the program is not required to guarantee the validity of the argument after the
-initiating function completes.] The implementation may make copies of the
-argument, and all copies shall be destroyed no later than immediately after
-invocation of the completion handler.
-
-[endsect]
-
-[section Non-blocking requirements on initiating functions]
-
-An initiating function shall not block (C++Std [defns.block]) the calling
-thread pending completion of the outstanding operation.
-
-[std_note Initiating functions may still block the calling thread for other
-reasons. For example, an initiating function may lock a mutex in order to
-synchronize access to shared data.]
-
-[endsect]
-
-[section Associated executor]
-
-Certain objects that participate in asynchronous operations have an
-['associated executor]. These are obtained as specified below.
-
-[endsect]
-
-[section I/O executor]
-
-An asynchronous operation has an associated executor satisfying the [link
-asio.reference.Executor1 `Executor`] requirements. If not otherwise specified by
-the asynchronous operation, this associated executor is an object of type
-`system_executor`.
-
-All asynchronous operations in this library have an associated executor object
-that is determined as follows:
-
-[mdash] If the initiating function is a member function, the associated
-executor is that returned by the `get_executor` member function on the same
-object.
-
-[mdash] If the initiating function is not a member function, the associated
-executor is that returned by the `get_executor` member function of the first
-argument to the initiating function.
-
-Let `Executor1` be the type of the associated executor. Let `ex1` be a value of
-type `Executor1`, representing the associated executor object obtained as
-described above.
-
-[endsect]
-
-[section Completion handler executor]
-
-A completion handler object of type `CompletionHandler` has an associated
-executor of type `Executor2` satisfying the [link asio.reference.Executor1
-Executor requirements]. The type `Executor2` is
-`associated_executor_t<CompletionHandler, Executor1>`. Let `ex2` be a value of
-type `Executor2` obtained by performing
-`get_associated_executor(completion_handler, ex1)`.
-
-[endsect]
-
-[section Outstanding work]
-
-Until the asynchronous operation has completed, the asynchronous operation
-shall maintain:
-
-[mdash] an object `work1` of type `executor_work_guard<Executor1>`, initialized
-as `work1(ex1)`, and where `work1.owns_work() == true`; and
-
-[mdash] an object `work2` of type `executor_work_guard<Executor2>`, initialized
-as `work2(ex2)`, and where `work2.owns_work() == true`.
-
-[endsect]
-
-[section Allocation of intermediate storage]
-
-Asynchronous operations may allocate memory. [inline_note Such as a data
-structure to store copies of the `completion_handler` object and the initiating
-function's arguments.]
-
-Let `Alloc1` be a type, satisfying the [link asio.reference.ProtoAllocator
-`ProtoAllocator`] requirements, that represents the asynchronous operation's
-default allocation strategy. [inline_note Typically `std::allocator<void>`.]
-Let `alloc1` be a value of type `Alloc1`.
-
-A completion handler object of type `CompletionHandler` has an associated
-allocator object `alloc2` of type `Alloc2` satisfying the [link
-asio.reference.ProtoAllocator `ProtoAllocator`] requirements. The type `Alloc2`
-is `associated_allocator_t<CompletionHandler, Alloc1>`. Let `alloc2` be a value
-of type `Alloc2` obtained by performing
-`get_associated_allocator(completion_handler, alloc1)`.
-
-The asynchronous operations defined in this library:
-
-[mdash] If required, allocate memory using only the completion handler's
-associated allocator.
-
-[mdash] Prior to completion handler execution, deallocate any memory allocated
-using the completion handler's associated allocator.
-
-[std_note The implementation may perform operating system or underlying API
-calls that perform memory allocations not using the associated allocator.
-Invocations of the allocator functions may not introduce data races (See C++Std
-\[res.on.data.races\]).]
-
-[endsect]
-
-[section Execution of completion handler on completion of asynchronous operation]
-
-Let `Args...` be the argument types of the completion signature `Signature` and
-let [^['N]] be `sizeof...(Args)`. Let [^['i]] be in the range [half_open_range
-`0`,[^['N]]]. Let [^T[sub ['i]]] be the [^['i]]th type in `Args...` and let
-[^t[sub ['i]]] be the [^['i]]th completion handler argument associated with
-[^T[sub ['i]]].
-
-Let `f` be a function object, callable as `f()`, that invokes
-`completion_handler` as if by [^completion_handler(forward<T[sub ['0]]>(t[sub
-['0]]), ..., forward<T[sub ['N-1]]>(t[sub ['N-1]]))].
-
-If an asynchonous operation completes immediately (that is, within the thread
-of execution calling the initiating function, and before the initiating
-function returns), the completion handler shall be submitted for execution as
-if by performing `ex2.post(std::move(f), alloc2)`. Otherwise, the completion
-handler shall be submitted for execution as if by performing
-`ex2.dispatch(std::move(f), alloc2)`.
-
-[endsect]
-
-[section Completion handlers and exceptions]
-
-Completion handlers are permitted to throw exceptions. The effect of any
-exception propagated from the execution of a completion handler is determined
-by the executor which is executing the completion handler.
-
-[endsect]
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/asynchronous_socket_operations.qbk b/3rdparty/asio/src/doc/requirements/asynchronous_socket_operations.qbk
deleted file mode 100644
index c0555286176..00000000000
--- a/3rdparty/asio/src/doc/requirements/asynchronous_socket_operations.qbk
+++ /dev/null
@@ -1,39 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:asynchronous_socket_operations Requirements on asynchronous socket operations]
-
-In this library, ['asynchronous socket operations] are those member functions
-having prefix `async_`.
-
-For an object `s`, a program may initiate asynchronous socket operations such
-that there are multiple simultaneously outstanding asynchronous operations.
-
-When there are multiple outstanding asynchronous [link
-asio.reference.read_write_operations read operations] on `s`:
-
-[mdash] having no argument `flags` of type `socket_base::message_flags`, or
-
-[mdash] having an argument `flags` of type `socket_base::message_flags` but
-where `(flags & socket_base::message_out_of_band) == 0`
-
-then the `buffers` are filled in the order in which these operations were
-issued. The order of invocation of the completion handlers for these operations
-is unspecified.
-
-When there are multiple outstanding asynchronous [link
-asio.reference.read_write_operations read operations] on `s` having an argument
-`flags` of type `socket_base::message_flags` where `(flags &
-socket_base::message_out_of_band) != 0` then the `buffers` are filled in the
-order in which these operations were issued.
-
-When there are multiple outstanding asynchronous [link
-asio.reference.read_write_operations write operations] on `s`, the `buffers`
-are transmitted in the order in which these operations were issued. The order
-of invocation of the completion handlers for these operations is unspecified.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/read_write_operations.qbk b/3rdparty/asio/src/doc/requirements/read_write_operations.qbk
deleted file mode 100644
index d7185a9beaf..00000000000
--- a/3rdparty/asio/src/doc/requirements/read_write_operations.qbk
+++ /dev/null
@@ -1,34 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:read_write_operations Requirements on read and write operations]
-
-A ['read operation] is an operation that reads data into a mutable buffer
-sequence argument of a type meeting [link asio.reference.MutableBufferSequence
-`MutableBufferSequence`] requirements. The mutable buffer sequence specifies
-memory where the data should be placed. A read operation shall always fill a
-buffer in the sequence completely before proceeding to the next.
-
-A ['write operation] is an operation that writes data from a constant buffer
-sequence argument of a type meeting [link asio.reference.ConstBufferSequence
-`ConstBufferSequence`] requirements. The constant buffer sequence specifies
-memory where the data to be written is located. A write operation shall always
-write a buffer in the sequence completely before proceeding to the next.
-
-If a read or write operation is also an [link
-asio.reference.asynchronous_operations asynchronous operation], the operation
-shall maintain one or more copies of the buffer sequence until such time as the
-operation no longer requires access to the memory specified by the buffers in
-the sequence. The program shall ensure the memory remains valid until:
-
-[mdash] the last copy of the buffer sequence is destroyed, or
-
-[mdash] the completion handler for the asynchronous operation is invoked,
-
-whichever comes first.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/requirements/synchronous_socket_operations.qbk b/3rdparty/asio/src/doc/requirements/synchronous_socket_operations.qbk
deleted file mode 100644
index e6d52505c08..00000000000
--- a/3rdparty/asio/src/doc/requirements/synchronous_socket_operations.qbk
+++ /dev/null
@@ -1,37 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:synchronous_socket_operations Requirements on synchronous socket operations]
-
-In this section, ['synchronous socket operations] are those member functions
-specified as two overloads, with and without an argument of type `error_code&`:
-
- ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN);
- ``[*['R f]]``(``['[*A1]]`` a1, ``['[*A2]]`` a2, ..., ``['[*AN]]`` aN, error_code& ec);
-
-For an object `s`, the conditions under which its synchronous socket operations
-may block the calling thread (C++Std [defns.block]) are determined as follows.
-
-If:
-
-[mdash] `s.non_blocking() == true`,
-
-[mdash] the synchronous socket operation is specified in terms of a __POSIX__
-function other than `__poll__`,
-
-[mdash] that __POSIX__ function lists `EWOULDBLOCK` or `EAGAIN`
-in its failure conditions, and
-
-[mdash] the effects of the operation cannot be established immediately
-
-then the synchronous socket operation shall not block the calling thread.
-[inline_note And the effects of the operation are not established.]
-
-Otherwise, the synchronous socket operation shall block the calling thread
-until the effects are established.
-
-[endsect]
diff --git a/3rdparty/asio/src/doc/std_exception_dox.txt b/3rdparty/asio/src/doc/std_exception_dox.txt
deleted file mode 100644
index b355e29afe8..00000000000
--- a/3rdparty/asio/src/doc/std_exception_dox.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
-\namespace std
-*/
-
-/**
-\class std::exception
-*/
diff --git a/3rdparty/asio/src/doc/tutorial.dox b/3rdparty/asio/src/doc/tutorial.dox
deleted file mode 100644
index 1dac40d2c29..00000000000
--- a/3rdparty/asio/src/doc/tutorial.dox
+++ /dev/null
@@ -1,226 +0,0 @@
-# Doxyfile 1.4.5
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "Asio Tutorial"
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = .
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = ./../../
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 2
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-BUILTIN_STL_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = NO
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = NO
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ./../examples/cpp03/tutorial/index_dox.txt \
- ./../examples/cpp03/tutorial/timer_dox.txt \
- ./../examples/cpp03/tutorial/daytime_dox.txt \
- ./boost_bind_dox.txt
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH = ./../examples
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = YES
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-USE_HTAGS = NO
-VERBATIM_HEADERS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 1
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = .
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 1
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = YES
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = GENERATING_DOCUMENTATION
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = reference.tags
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = YES
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = NO
-INCLUDED_BY_GRAPH = NO
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = NO
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = NO
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
diff --git a/3rdparty/asio/src/doc/tutorial.qbk b/3rdparty/asio/src/doc/tutorial.qbk
deleted file mode 100644
index e68c9362f0d..00000000000
--- a/3rdparty/asio/src/doc/tutorial.qbk
+++ /dev/null
@@ -1,2227 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:tutorial Tutorial]
-
-[heading Basic Skills]
-
-The tutorial programs in this first section introduce the fundamental concepts required to use the asio toolkit. Before plunging into the complex world of network programming, these tutorial programs illustrate the basic skills using simple asynchronous timers.
-
-* [link asio.tutorial.tuttimer1 Timer.1 - Using a timer synchronously]
-
-
-* [link asio.tutorial.tuttimer2 Timer.2 - Using a timer asynchronously]
-
-
-* [link asio.tutorial.tuttimer3 Timer.3 - Binding arguments to a handler]
-
-
-* [link asio.tutorial.tuttimer4 Timer.4 - Using a member function as a handler]
-
-
-* [link asio.tutorial.tuttimer5 Timer.5 - Synchronising handlers in multithreaded programs]
-
-
-
-
-[heading Introduction to Sockets]
-
-The tutorial programs in this section show how to use asio to develop simple client and server programs. These tutorial programs are based around the [@http://www.ietf.org/rfc/rfc867.txt daytime] protocol, which supports both TCP and UDP.
-
-The first three tutorial programs implement the daytime protocol using TCP.
-
-* [link asio.tutorial.tutdaytime1 Daytime.1 - A synchronous TCP daytime client]
-
-
-* [link asio.tutorial.tutdaytime2 Daytime.2 - A synchronous TCP daytime server]
-
-
-* [link asio.tutorial.tutdaytime3 Daytime.3 - An asynchronous TCP daytime server]
-
-
-
-The next three tutorial programs implement the daytime protocol using UDP.
-
-* [link asio.tutorial.tutdaytime4 Daytime.4 - A synchronous UDP daytime client]
-
-
-* [link asio.tutorial.tutdaytime5 Daytime.5 - A synchronous UDP daytime server]
-
-
-* [link asio.tutorial.tutdaytime6 Daytime.6 - An asynchronous UDP daytime server]
-
-
-
-The last tutorial program in this section demonstrates how asio allows the TCP and UDP servers to be easily combined into a single program.
-
-* [link asio.tutorial.tutdaytime7 Daytime.7 - A combined TCP/UDP asynchronous server]
-
-
-
-
-[section:tuttimer1 Timer.1 - Using a timer synchronously]
-
-This tutorial program introduces asio by showing how to perform a blocking wait on a timer.
-
-
-
-
-
-We start by including the necessary header files.
-
-All of the asio classes can be used by simply including the `"asio.hpp"` header file.
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
-
-
-
-Since this example uses timers, we need to include the appropriate Boost.Date\_Time header file for manipulating times.
-
-
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
-
-
-All programs that use asio need to have at least one asio::io\_service object. This class provides access to I/O functionality. We declare an object of this type first thing in the main function.
-
-
-
-
-
-Next we declare an object of type asio::deadline\_timer. The core asio classes that provide I/O functionality (or as in this case timer functionality) always take a reference to an io\_service as their first constructor argument. The second argument to the constructor sets the timer to expire 5 seconds from now.
-
-
-
-
-
-In this simple example we perform a blocking wait on the timer. That is, the call to [link asio.reference.basic_deadline_timer.wait deadline_timer::wait()] will not return until the timer has expired, 5 seconds after it was created (i.e. not from when the wait starts).
-
-A deadline timer is always in one of two states: "expired" or "not expired". If the [link asio.reference.basic_deadline_timer.wait deadline_timer::wait()] function is called on an expired timer, it will return immediately.
-
-
-
-
-
-Finally we print the obligatory `"Hello, world!"` message to show when the timer has expired.
-
-
-
-
-
-See the [link asio.tutorial.tuttimer1.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Next: [link asio.tutorial.tuttimer2 Timer.2 - Using a timer asynchronously]
-
-
-
-[section:src Source listing for Timer.1]
-
-
- ``''''''``//
- ``''''''``// timer.cpp
- ``''''''``// ~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
-
- ``''''''`` asio::deadline_timer t(io, boost::posix_time::seconds(5));
- ``''''''`` t.wait();
-
- ``''''''`` std::cout << "Hello, world!" << std::endl;
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tuttimer1 Timer.1 - Using a timer synchronously]
-
-[endsect]
-
-[endsect]
-
-[section:tuttimer2 Timer.2 - Using a timer asynchronously]
-
-This tutorial program demonstrates how to use asio's asynchronous callback functionality by modifying the program from tutorial Timer.1 to perform an asynchronous wait on the timer.
-
-
-
-
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
-
-
-Using asio's asynchronous functionality means having a callback function that will be called when an asynchronous operation completes. In this program we define a function called `print` to be called when the asynchronous wait finishes.
-
-
-
- ``''''''``void print(const asio::error_code& /*e*/)
- ``''''''``{
- ``''''''`` std::cout << "Hello, world!" << std::endl;
- ``''''''``}
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
-
- ``''''''`` asio::deadline_timer t(io, boost::posix_time::seconds(5));
-
-
-
-Next, instead of doing a blocking wait as in tutorial Timer.1, we call the [link asio.reference.basic_deadline_timer.async_wait deadline_timer::async_wait()] function to perform an asynchronous wait. When calling this function we pass the `print` callback handler that was defined above.
-
-
- ``''''''`` t.async_wait(&print);
-
-
-
-Finally, we must call the [link asio.reference.io_context.run io_service::run()] member function on the io\_service object.
-
-The asio library provides a guarantee that callback handlers will only be called from threads that are currently calling [link asio.reference.io_context.run io_service::run()]. Therefore unless the [link asio.reference.io_context.run io_service::run()] function is called the callback for the asynchronous wait completion will never be invoked.
-
-The [link asio.reference.io_context.run io_service::run()] function will also continue to run while there is still "work" to do. In this example, the work is the asynchronous wait on the timer, so the call will not return until the timer has expired and the callback has completed.
-
-It is important to remember to give the io\_service some work to do before calling [link asio.reference.io_context.run io_service::run()]. For example, if we had omitted the above call to [link asio.reference.basic_deadline_timer.async_wait deadline_timer::async_wait()], the io\_service would not have had any work to do, and consequently [link asio.reference.io_context.run io_service::run()] would have returned immediately.
-
-
- ``''''''`` io.run();
-
- ``''''''`` return 0;
- ``''''''``}
-
-
-
-See the [link asio.tutorial.tuttimer2.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tuttimer1 Timer.1 - Using a timer synchronously]
-
-Next: [link asio.tutorial.tuttimer3 Timer.3 - Binding arguments to a handler]
-
-
-
-[section:src Source listing for Timer.2]
-
-
- ``''''''``//
- ``''''''``// timer.cpp
- ``''''''``// ~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
- ``''''''``void print(const asio::error_code& /*e*/)
- ``''''''``{
- ``''''''`` std::cout << "Hello, world!" << std::endl;
- ``''''''``}
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
-
- ``''''''`` asio::deadline_timer t(io, boost::posix_time::seconds(5));
- ``''''''`` t.async_wait(&print);
-
- ``''''''`` io.run();
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tuttimer2 Timer.2 - Using a timer asynchronously]
-
-[endsect]
-
-[endsect]
-
-[section:tuttimer3 Timer.3 - Binding arguments to a handler]
-
-In this tutorial we will modify the program from tutorial Timer.2 so that the timer fires once a second. This will show how to pass additional parameters to your handler function.
-
-
-
-
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
-
-
-To implement a repeating timer using asio you need to change the timer's expiry time in your callback function, and to then start a new asynchronous wait. Obviously this means that the callback function will need to be able to access the timer object. To this end we add two new parameters to the `print` function:
-
-* A pointer to a timer object.
-
-
-* A counter so that we can stop the program when the timer fires for the sixth time.
-
-
-
-
- ``''''''``void print(const asio::error_code& /*e*/,
- ``''''''`` asio::deadline_timer* t, int* count)
- ``''''''``{
-
-
-
-As mentioned above, this tutorial program uses a counter to stop running when the timer fires for the sixth time. However you will observe that there is no explicit call to ask the io\_service to stop. Recall that in tutorial Timer.2 we learnt that the [link asio.reference.io_context.run io_service::run()] function completes when there is no more "work" to do. By not starting a new asynchronous wait on the timer when `count` reaches 5, the io\_service will run out of work and stop running.
-
-
- ``''''''`` if (*count < 5)
- ``''''''`` {
- ``''''''`` std::cout << *count << std::endl;
- ``''''''`` ++(*count);
-
-
-
-Next we move the expiry time for the timer along by one second from the previous expiry time. By calculating the new expiry time relative to the old, we can ensure that the timer does not drift away from the whole-second mark due to any delays in processing the handler.
-
-
-
- ``''''''`` t->expires_at(t->expires_at() + boost::posix_time::seconds(1));
-
-
-
-Then we start a new asynchronous wait on the timer. As you can see, the [link asio.tutorial.boost_bind boost::bind] function is used to associate the extra parameters with your callback handler. The [link asio.reference.basic_deadline_timer.async_wait deadline_timer::async_wait()] function expects a handler function (or function object) with the signature `void(const asio::error_code&)`. Binding the additional parameters converts your `print` function into a function object that matches the signature correctly.
-
-See the [@http://www.boost.org/libs/bind/bind.html Boost.Bind documentation] for more information on how to use [link asio.tutorial.boost_bind boost::bind] .
-
-In this example, the asio::placeholders::error argument to [link asio.tutorial.boost_bind boost::bind] is a named placeholder for the error object passed to the handler. When initiating the asynchronous operation, and if using [link asio.tutorial.boost_bind boost::bind] , you must specify only the arguments that match the handler's parameter list. In tutorial Timer.4 you will see that this placeholder may be elided if the parameter is not needed by the callback handler.
-
-
-
-
-
-A new `count` variable is added so that we can stop the program when the timer fires for the sixth time.
-
-
-
-
-
-As in Step 4, when making the call to [link asio.reference.basic_deadline_timer.async_wait deadline_timer::async_wait()] from `main` we bind the additional parameters needed for the `print` function.
-
-
-
-
-
-Finally, just to prove that the `count` variable was being used in the `print` handler function, we will print out its new value.
-
-
-
-
-
-See the [link asio.tutorial.tuttimer3.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tuttimer2 Timer.2 - Using a timer asynchronously]
-
-Next: [link asio.tutorial.tuttimer4 Timer.4 - Using a member function as a handler]
-
-
-
-[section:src Source listing for Timer.3]
-
-
- ``''''''``//
- ``''''''``// timer.cpp
- ``''''''``// ~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
- ``''''''``void print(const asio::error_code& /*e*/,
- ``''''''`` asio::deadline_timer* t, int* count)
- ``''''''``{
- ``''''''`` if (*count < 5)
- ``''''''`` {
- ``''''''`` std::cout << *count << std::endl;
- ``''''''`` ++(*count);
-
- ``''''''`` t->expires_at(t->expires_at() + boost::posix_time::seconds(1));
- ``''''''`` t->async_wait(boost::bind(print,
- ``''''''`` asio::placeholders::error, t, count));
- ``''''''`` }
- ``''''''``}
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
-
- ``''''''`` int count = 0;
- ``''''''`` asio::deadline_timer t(io, boost::posix_time::seconds(1));
- ``''''''`` t.async_wait(boost::bind(print,
- ``''''''`` asio::placeholders::error, &t, &count));
-
- ``''''''`` io.run();
-
- ``''''''`` std::cout << "Final count is " << count << std::endl;
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tuttimer3 Timer.3 - Binding arguments to a handler]
-
-[endsect]
-
-[endsect]
-
-[section:tuttimer4 Timer.4 - Using a member function as a handler]
-
-In this tutorial we will see how to use a class member function as a callback handler. The program should execute identically to the tutorial program from tutorial Timer.3.
-
-
-
-
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
-
-
-Instead of defining a free function `print` as the callback handler, as we did in the earlier tutorial programs, we now define a class called `printer`.
-
-
-
- ``''''''``class printer
- ``''''''``{
- ``''''''``public:
-
-
-
-The constructor of this class will take a reference to the io\_service object and use it when initialising the `timer_` member. The counter used to shut down the program is now also a member of the class.
-
-
- ``''''''`` printer(asio::io_context& io)
- ``''''''`` : timer_(io, boost::posix_time::seconds(1)),
- ``''''''`` count_(0)
- ``''''''`` {
-
-
-
-The [link asio.tutorial.boost_bind boost::bind] function works just as well with class member functions as with free functions. Since all non-static class member functions have an implicit `this` parameter, we need to bind `this` to the function. As in tutorial Timer.3, [link asio.tutorial.boost_bind boost::bind] converts our callback handler (now a member function) into a function object that can be invoked as though it has the signature `void(const asio::error_code&)`.
-
-You will note that the asio::placeholders::error placeholder is not specified here, as the `print` member function does not accept an error object as a parameter.
-
-
- ``''''''`` timer_.async_wait(boost::bind(&printer::print, this));
- ``''''''`` }
-
-
-
-In the class destructor we will print out the final value of the counter.
-
-
-
- ``''''''`` ~printer()
- ``''''''`` {
- ``''''''`` std::cout << "Final count is " << count_ << std::endl;
- ``''''''`` }
-
-
-
-The `print` member function is very similar to the `print` function from tutorial Timer.3, except that it now operates on the class data members instead of having the timer and counter passed in as parameters.
-
-
-
- ``''''''`` void print()
- ``''''''`` {
- ``''''''`` if (count_ < 5)
- ``''''''`` {
- ``''''''`` std::cout << count_ << std::endl;
- ``''''''`` ++count_;
-
- ``''''''`` timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
- ``''''''`` timer_.async_wait(boost::bind(&printer::print, this));
- ``''''''`` }
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` asio::deadline_timer timer_;
- ``''''''`` int count_;
- ``''''''``};
-
-
-
-The `main` function is much simpler than before, as it now declares a local `printer` object before running the io\_service as normal.
-
-
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
- ``''''''`` printer p(io);
- ``''''''`` io.run();
-
- ``''''''`` return 0;
- ``''''''``}
-
-
-
-See the [link asio.tutorial.tuttimer4.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tuttimer3 Timer.3 - Binding arguments to a handler]
-
-Next: [link asio.tutorial.tuttimer5 Timer.5 - Synchronising handlers in multithreaded programs]
-
-
-
-
-
-[section:src Source listing for Timer.4]
-
-
- ``''''''``//
- ``''''''``// timer.cpp
- ``''''''``// ~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
- ``''''''``class printer
- ``''''''``{
- ``''''''``public:
- ``''''''`` printer(asio::io_context& io)
- ``''''''`` : timer_(io, boost::posix_time::seconds(1)),
- ``''''''`` count_(0)
- ``''''''`` {
- ``''''''`` timer_.async_wait(boost::bind(&printer::print, this));
- ``''''''`` }
-
- ``''''''`` ~printer()
- ``''''''`` {
- ``''''''`` std::cout << "Final count is " << count_ << std::endl;
- ``''''''`` }
-
- ``''''''`` void print()
- ``''''''`` {
- ``''''''`` if (count_ < 5)
- ``''''''`` {
- ``''''''`` std::cout << count_ << std::endl;
- ``''''''`` ++count_;
-
- ``''''''`` timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
- ``''''''`` timer_.async_wait(boost::bind(&printer::print, this));
- ``''''''`` }
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` asio::deadline_timer timer_;
- ``''''''`` int count_;
- ``''''''``};
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
- ``''''''`` printer p(io);
- ``''''''`` io.run();
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tuttimer4 Timer.4 - Using a member function as a handler]
-
-[endsect]
-
-[endsect]
-
-[section:tuttimer5 Timer.5 - Synchronising handlers in multithreaded programs]
-
-This tutorial demonstrates the use of the asio::io\_service::strand class to synchronise callback handlers in a multithreaded program.
-
-The previous four tutorials avoided the issue of handler synchronisation by calling the [link asio.reference.io_context.run io_service::run()] function from one thread only. As you already know, the asio library provides a guarantee that callback handlers will only be called from threads that are currently calling [link asio.reference.io_context.run io_service::run()]. Consequently, calling [link asio.reference.io_context.run io_service::run()] from only one thread ensures that callback handlers cannot run concurrently.
-
-The single threaded approach is usually the best place to start when developing applications using asio. The downside is the limitations it places on programs, particularly servers, including:
-
-* Poor responsiveness when handlers can take a long time to complete.
-
-
-* An inability to scale on multiprocessor systems.
-
-
-
-
-If you find yourself running into these limitations, an alternative approach is to have a pool of threads calling [link asio.reference.io_context.run io_service::run()]. However, as this allows handlers to execute concurrently, we need a method of synchronisation when handlers might be accessing a shared, thread-unsafe resource.
-
-
-
-
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
-
-
-We start by defining a class called `printer`, similar to the class in the previous tutorial. This class will extend the previous tutorial by running two timers in parallel.
-
-
-
- ``''''''``class printer
- ``''''''``{
- ``''''''``public:
-
-
-
-In addition to initialising a pair of asio::deadline\_timer members, the constructor initialises the `strand_` member, an object of type asio::io\_service::strand.
-
-An asio::io\_service::strand is an executor that guarantees that, for those handlers that are dispatched through it, an executing handler will be allowed to complete before the next one is started. This is guaranteed irrespective of the number of threads that are calling [link asio.reference.io_context.run io_service::run()]. Of course, the handlers may still execute concurrently with other handlers that were not dispatched through an asio::io\_service::strand, or were dispatched through a different asio::io\_service::strand object.
-
-
- ``''''''`` printer(asio::io_context& io)
- ``''''''`` : strand_(io),
- ``''''''`` timer1_(io, boost::posix_time::seconds(1)),
- ``''''''`` timer2_(io, boost::posix_time::seconds(1)),
- ``''''''`` count_(0)
- ``''''''`` {
-
-
-
-When initiating the asynchronous operations, each callback handler is "bound" to an asio::io\_service::strand object. The asio::io\_service::strand::bind\_executor() function returns a new handler that automatically dispatches its contained handler through the asio::io\_service::strand object. By binding the handlers to the same asio::io\_service::strand, we are ensuring that they cannot execute concurrently.
-
-
- ``''''''`` timer1_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print1, this)));
-
- ``''''''`` timer2_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print2, this)));
- ``''''''`` }
-
- ``''''''`` ~printer()
- ``''''''`` {
- ``''''''`` std::cout << "Final count is " << count_ << std::endl;
- ``''''''`` }
-
-
-
-In a multithreaded program, the handlers for asynchronous operations should be synchronised if they access shared resources. In this tutorial, the shared resources used by the handlers (`print1` and `print2`) are `std::cout` and the `count_` data member.
-
-
-
- ``''''''`` void print1()
- ``''''''`` {
- ``''''''`` if (count_ < 10)
- ``''''''`` {
- ``''''''`` std::cout << "Timer 1: " << count_ << std::endl;
- ``''''''`` ++count_;
-
- ``''''''`` timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
-
- ``''''''`` timer1_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print1, this)));
- ``''''''`` }
- ``''''''`` }
-
- ``''''''`` void print2()
- ``''''''`` {
- ``''''''`` if (count_ < 10)
- ``''''''`` {
- ``''''''`` std::cout << "Timer 2: " << count_ << std::endl;
- ``''''''`` ++count_;
-
- ``''''''`` timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
-
- ``''''''`` timer2_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print2, this)));
- ``''''''`` }
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` asio::io_context::strand strand_;
- ``''''''`` asio::deadline_timer timer1_;
- ``''''''`` asio::deadline_timer timer2_;
- ``''''''`` int count_;
- ``''''''``};
-
-
-
-The `main` function now causes [link asio.reference.io_context.run io_service::run()] to be called from two threads: the main thread and one additional thread. This is accomplished using an
-[link asio.reference.thread thread] object.
-
-Just as it would with a call from a single thread, concurrent calls to [link asio.reference.io_context.run io_service::run()] will continue to execute while there is "work" left to do. The background thread will not exit until all asynchronous operations have completed.
-
-
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
- ``''''''`` printer p(io);
- ``''''''`` asio::thread t(boost::bind(&asio::io_context::run, &io));
- ``''''''`` io.run();
- ``''''''`` t.join();
-
- ``''''''`` return 0;
- ``''''''``}
-
-
-
-See the [link asio.tutorial.tuttimer5.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tuttimer4 Timer.4 - Using a member function as a handler]
-
-
-
-
-
-[section:src Source listing for Timer.5]
-
-
- ``''''''``//
- ``''''''``// timer.cpp
- ``''''''``// ~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <asio.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/date_time/posix_time/posix_time.hpp>
-
- ``''''''``class printer
- ``''''''``{
- ``''''''``public:
- ``''''''`` printer(asio::io_context& io)
- ``''''''`` : strand_(io),
- ``''''''`` timer1_(io, boost::posix_time::seconds(1)),
- ``''''''`` timer2_(io, boost::posix_time::seconds(1)),
- ``''''''`` count_(0)
- ``''''''`` {
- ``''''''`` timer1_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print1, this)));
-
- ``''''''`` timer2_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print2, this)));
- ``''''''`` }
-
- ``''''''`` ~printer()
- ``''''''`` {
- ``''''''`` std::cout << "Final count is " << count_ << std::endl;
- ``''''''`` }
-
- ``''''''`` void print1()
- ``''''''`` {
- ``''''''`` if (count_ < 10)
- ``''''''`` {
- ``''''''`` std::cout << "Timer 1: " << count_ << std::endl;
- ``''''''`` ++count_;
-
- ``''''''`` timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
-
- ``''''''`` timer1_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print1, this)));
- ``''''''`` }
- ``''''''`` }
-
- ``''''''`` void print2()
- ``''''''`` {
- ``''''''`` if (count_ < 10)
- ``''''''`` {
- ``''''''`` std::cout << "Timer 2: " << count_ << std::endl;
- ``''''''`` ++count_;
-
- ``''''''`` timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
-
- ``''''''`` timer2_.async_wait(asio::bind_executor(strand_,
- ``''''''`` boost::bind(&printer::print2, this)));
- ``''''''`` }
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` asio::io_context::strand strand_;
- ``''''''`` asio::deadline_timer timer1_;
- ``''''''`` asio::deadline_timer timer2_;
- ``''''''`` int count_;
- ``''''''``};
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` asio::io_context io;
- ``''''''`` printer p(io);
- ``''''''`` asio::thread t(boost::bind(&asio::io_context::run, &io));
- ``''''''`` io.run();
- ``''''''`` t.join();
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tuttimer5 Timer.5 - Synchronising handlers in multithreaded programs]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime1 Daytime.1 - A synchronous TCP daytime client]
-
-This tutorial program shows how to use asio to implement a client application with TCP.
-
-
-
-
-
-We start by including the necessary header files.
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <asio.hpp>
-
-
-
-The purpose of this application is to access a daytime service, so we need the user to specify the server.
-
-
-
- ``''''''``using asio::ip::tcp;
-
- ``''''''``int main(int argc, char* argv[])
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` if (argc != 2)
- ``''''''`` {
- ``''''''`` std::cerr << "Usage: client <host>" << std::endl;
- ``''''''`` return 1;
- ``''''''`` }
-
-
-
-All programs that use asio need to have at least one asio::io\_service object.
-
-
-
-
-
-We need to turn the server name that was specified as a parameter to the application, into a TCP endpoint. To do this we use an [link asio.reference.ip__tcp.resolver ip::tcp::resolver] object.
-
-
-
-
-
-A resolver takes a query object and turns it into a list of endpoints. We construct a query using the name of the server, specified in `argv[1]`, and the name of the service, in this case `"daytime"`.
-
-
-
-
-
-The list of endpoints is returned using an iterator of type [link asio.reference.ip__basic_resolver.iterator ip::tcp::resolver::iterator]. (Note that a default constructed [link asio.reference.ip__basic_resolver.iterator ip::tcp::resolver::iterator] object can be used as an end iterator.)
-
-
-
-
-
-Now we create and connect the socket. The list of endpoints obtained above may contain both IPv4 and IPv6 endpoints, so we need to try each of them until we find one that works. This keeps the client program independent of a specific IP version. The asio::connect() function does this for us automatically.
-
-
-
-
-
-The connection is open. All we need to do now is read the response from the daytime service.
-
-We use a `boost::array` to hold the received data. The asio::buffer() function automatically determines the size of the array to help prevent buffer overruns. Instead of a `boost::array`, we could have used a `char []` or `std::vector`.
-
-
-
-
-
-When the server closes the connection, the [link asio.reference.basic_stream_socket.read_some ip::tcp::socket::read_some()] function will exit with the asio::error::eof error, which is how we know to exit the loop.
-
-
-
-
-
-Finally, handle any exceptions that may have been thrown.
-
-
-
-
-
-See the [link asio.tutorial.tutdaytime1.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Next: [link asio.tutorial.tutdaytime2 Daytime.2 - A synchronous TCP daytime server]
-
-
-
-[section:src Source listing for Daytime.1]
-
-
- ``''''''``//
- ``''''''``// client.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::tcp;
-
- ``''''''``int main(int argc, char* argv[])
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` if (argc != 2)
- ``''''''`` {
- ``''''''`` std::cerr << "Usage: client <host>" << std::endl;
- ``''''''`` return 1;
- ``''''''`` }
-
- ``''''''`` asio::io_context io_context;
-
- ``''''''`` tcp::resolver resolver(io_context);
- ``''''''`` tcp::resolver::results_type endpoints =
- ``''''''`` resolver.resolve(argv[1], "daytime");
-
- ``''''''`` tcp::socket socket(io_context);
- ``''''''`` asio::connect(socket, endpoints);
-
- ``''''''`` for (;;)
- ``''''''`` {
- ``''''''`` boost::array<char, 128> buf;
- ``''''''`` asio::error_code error;
-
- ``''''''`` size_t len = socket.read_some(asio::buffer(buf), error);
-
- ``''''''`` if (error == asio::error::eof)
- ``''''''`` break; // Connection closed cleanly by peer.
- ``''''''`` else if (error)
- ``''''''`` throw asio::system_error(error); // Some other error.
-
- ``''''''`` std::cout.write(buf.data(), len);
- ``''''''`` }
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime1 Daytime.1 - A synchronous TCP daytime client]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime2 Daytime.2 - A synchronous TCP daytime server]
-
-This tutorial program shows how to use asio to implement a server application with TCP.
-
-
-
-
-
-
- ``''''''``#include <ctime>
- ``''''''``#include <iostream>
- ``''''''``#include <string>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::tcp;
-
-
-
-We define the function `make_daytime_string()` to create the string to be sent back to the client. This function will be reused in all of our daytime server applications.
-
-
-
-
-
-A [link asio.reference.ip__tcp.acceptor ip::tcp::acceptor] object needs to be created to listen for new connections. It is initialised to listen on TCP port 13, for IP version 4.
-
-
-
-
-
-This is an iterative server, which means that it will handle one connection at a time. Create a socket that will represent the connection to the client, and then wait for a connection.
-
-
-
-
-
-A client is accessing our service. Determine the current time and transfer this information to the client.
-
-
-
-
-
-Finally, handle any exceptions.
-
-
-
-
-
-See the [link asio.tutorial.tutdaytime2.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tutdaytime1 Daytime.1 - A synchronous TCP daytime client]
-
-Next: [link asio.tutorial.tutdaytime3 Daytime.3 - An asynchronous TCP daytime server]
-
-
-
-[section:src Source listing for Daytime.2]
-
-
- ``''''''``//
- ``''''''``// server.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <ctime>
- ``''''''``#include <iostream>
- ``''''''``#include <string>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::tcp;
-
- ``''''''``std::string make_daytime_string()
- ``''''''``{
- ``''''''`` using namespace std; // For time_t, time and ctime;
- ``''''''`` time_t now = time(0);
- ``''''''`` return ctime(&now);
- ``''''''``}
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` asio::io_context io_context;
-
- ``''''''`` tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v4(), 13));
-
- ``''''''`` for (;;)
- ``''''''`` {
- ``''''''`` tcp::socket socket(io_context);
- ``''''''`` acceptor.accept(socket);
-
- ``''''''`` std::string message = make_daytime_string();
-
- ``''''''`` asio::error_code ignored_error;
- ``''''''`` asio::write(socket, asio::buffer(message), ignored_error);
- ``''''''`` }
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime2 Daytime.2 - A synchronous TCP daytime server]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime3 Daytime.3 - An asynchronous TCP daytime server]
-
-[heading The main() function]
-
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
-
-
-
-We need to create a server object to accept incoming client connections. The asio::io\_service object provides I/O services, such as sockets, that the server object will use.
-
-
- ``''''''`` asio::io_context io_context;
- ``''''''`` tcp_server server(io_context);
-
-
-
-Run the asio::io\_service object so that it will perform asynchronous operations on your behalf.
-
-
- ``''''''`` io_context.run();
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-
-
-[heading The tcp_server class]
-
-
- ``''''''``class tcp_server
- ``''''''``{
- ``''''''``public:
-
-
-
-The constructor initialises an acceptor to listen on TCP port 13.
-
-
- ``''''''`` tcp_server(asio::io_context& io_context)
- ``''''''`` : acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''``private:
-
-
-
-The function `start_accept()` creates a socket and initiates an asynchronous accept operation to wait for a new connection.
-
-
- ``''''''`` void start_accept()
- ``''''''`` {
- ``''''''`` tcp_connection::pointer new_connection =
- ``''''''`` tcp_connection::create(acceptor_.get_executor().context());
-
- ``''''''`` acceptor_.async_accept(new_connection->socket(),
- ``''''''`` boost::bind(&tcp_server::handle_accept, this, new_connection,
- ``''''''`` asio::placeholders::error));
- ``''''''`` }
-
-
-
-The function `handle_accept()` is called when the asynchronous accept operation initiated by `start_accept()` finishes. It services the client request, and then calls `start_accept()` to initiate the next accept operation.
-
-
-
- ``''''''`` void handle_accept(tcp_connection::pointer new_connection,
- ``''''''`` const asio::error_code& error)
- ``''''''`` {
- ``''''''`` if (!error)
- ``''''''`` {
- ``''''''`` new_connection->start();
- ``''''''`` }
-
- ``''''''`` start_accept();
- ``''''''`` }
-
-
-
-[heading The tcp_connection class]
-
-We will use `shared_ptr` and `enable_shared_from_this` because we want to keep the `tcp_connection` object alive as long as there is an operation that refers to it.
-
-
- ``''''''``class tcp_connection
- ``''''''`` : public boost::enable_shared_from_this<tcp_connection>
- ``''''''``{
- ``''''''``public:
- ``''''''`` typedef boost::shared_ptr<tcp_connection> pointer;
-
- ``''''''`` static pointer create(asio::io_context& io_context)
- ``''''''`` {
- ``''''''`` return pointer(new tcp_connection(io_context));
- ``''''''`` }
-
- ``''''''`` tcp::socket& socket()
- ``''''''`` {
- ``''''''`` return socket_;
- ``''''''`` }
-
-
-
-In the function `start()`, we call asio::async\_write() to serve the data to the client. Note that we are using asio::async\_write(), rather than [link asio.reference.basic_stream_socket.async_write_some ip::tcp::socket::async_write_some()], to ensure that the entire block of data is sent.
-
-
-
- ``''''''`` void start()
- ``''''''`` {
-
-
-
-The data to be sent is stored in the class member `message_` as we need to keep the data valid until the asynchronous operation is complete.
-
-
- ``''''''`` message_ = make_daytime_string();
-
-
-
-When initiating the asynchronous operation, and if using [link asio.tutorial.boost_bind boost::bind] , you must specify only the arguments that match the handler's parameter list. In this program, both of the argument placeholders (asio::placeholders::error and asio::placeholders::bytes\_transferred) could potentially have been removed, since they are not being used in `handle_write()`.
-
-
-
- ``''''''`` asio::async_write(socket_, asio::buffer(message_),
- ``''''''`` boost::bind(&tcp_connection::handle_write, shared_from_this(),
- ``''''''`` asio::placeholders::error,
- ``''''''`` asio::placeholders::bytes_transferred));
-
-
-
-Any further actions for this client connection are now the responsibility of `handle_write()`.
-
-
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` tcp_connection(asio::io_context& io_context)
- ``''''''`` : socket_(io_context)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` void handle_write(const asio::error_code& /*error*/,
- ``''''''`` size_t /*bytes_transferred*/)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` tcp::socket socket_;
- ``''''''`` std::string message_;
- ``''''''``};
-
-
-
-[heading Removing unused handler parameters]
-
-You may have noticed that the `error`, and `bytes_transferred` parameters are not used in the body of the `handle_write()` function. If parameters are not needed, it is possible to remove them from the function so that it looks like:
-
-
- ``''''''`` void handle_write()
- ``''''''`` {
- ``''''''`` }
-
-
-
-The asio::async\_write() call used to initiate the call can then be changed to just:
-
-
- ``''''''`` asio::async_write(socket_, asio::buffer(message_),
- ``''''''`` boost::bind(&tcp_connection::handle_write, shared_from_this()));
-
-
-
-See the [link asio.tutorial.tutdaytime3.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tutdaytime2 Daytime.2 - A synchronous TCP daytime server]
-
-Next: [link asio.tutorial.tutdaytime4 Daytime.4 - A synchronous UDP daytime client]
-
-
-
-[section:src Source listing for Daytime.3]
-
-
- ``''''''``//
- ``''''''``// server.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <ctime>
- ``''''''``#include <iostream>
- ``''''''``#include <string>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/shared_ptr.hpp>
- ``''''''``#include <boost/enable_shared_from_this.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::tcp;
-
- ``''''''``std::string make_daytime_string()
- ``''''''``{
- ``''''''`` using namespace std; // For time_t, time and ctime;
- ``''''''`` time_t now = time(0);
- ``''''''`` return ctime(&now);
- ``''''''``}
-
- ``''''''``class tcp_connection
- ``''''''`` : public boost::enable_shared_from_this<tcp_connection>
- ``''''''``{
- ``''''''``public:
- ``''''''`` typedef boost::shared_ptr<tcp_connection> pointer;
-
- ``''''''`` static pointer create(asio::io_context& io_context)
- ``''''''`` {
- ``''''''`` return pointer(new tcp_connection(io_context));
- ``''''''`` }
-
- ``''''''`` tcp::socket& socket()
- ``''''''`` {
- ``''''''`` return socket_;
- ``''''''`` }
-
- ``''''''`` void start()
- ``''''''`` {
- ``''''''`` message_ = make_daytime_string();
-
- ``''''''`` asio::async_write(socket_, asio::buffer(message_),
- ``''''''`` boost::bind(&tcp_connection::handle_write, shared_from_this(),
- ``''''''`` asio::placeholders::error,
- ``''''''`` asio::placeholders::bytes_transferred));
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` tcp_connection(asio::io_context& io_context)
- ``''''''`` : socket_(io_context)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` void handle_write(const asio::error_code& /*error*/,
- ``''''''`` size_t /*bytes_transferred*/)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` tcp::socket socket_;
- ``''''''`` std::string message_;
- ``''''''``};
-
- ``''''''``class tcp_server
- ``''''''``{
- ``''''''``public:
- ``''''''`` tcp_server(asio::io_context& io_context)
- ``''''''`` : acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_accept()
- ``''''''`` {
- ``''''''`` tcp_connection::pointer new_connection =
- ``''''''`` tcp_connection::create(acceptor_.get_executor().context());
-
- ``''''''`` acceptor_.async_accept(new_connection->socket(),
- ``''''''`` boost::bind(&tcp_server::handle_accept, this, new_connection,
- ``''''''`` asio::placeholders::error));
- ``''''''`` }
-
- ``''''''`` void handle_accept(tcp_connection::pointer new_connection,
- ``''''''`` const asio::error_code& error)
- ``''''''`` {
- ``''''''`` if (!error)
- ``''''''`` {
- ``''''''`` new_connection->start();
- ``''''''`` }
-
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''`` tcp::acceptor acceptor_;
- ``''''''``};
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` asio::io_context io_context;
- ``''''''`` tcp_server server(io_context);
- ``''''''`` io_context.run();
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime3 Daytime.3 - An asynchronous TCP daytime server]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime4 Daytime.4 - A synchronous UDP daytime client]
-
-This tutorial program shows how to use asio to implement a client application with UDP.
-
-
- ``''''''``#include <iostream>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::udp;
-
-
-
-The start of the application is essentially the same as for the TCP daytime client.
-
-
-
-
-
-We use an [link asio.reference.ip__udp.resolver ip::udp::resolver] object to find the correct remote endpoint to use based on the host and service names. The query is restricted to return only IPv4 endpoints by the [link asio.reference.ip__udp.v4 ip::udp::v4()] argument.
-
-
-
-
-
-The [link asio.reference.ip__basic_resolver.resolve ip::udp::resolver::resolve()] function is guaranteed to return at least one endpoint in the list if it does not fail. This means it is safe to dereference the return value directly.
-
-
-
-
-
-Since UDP is datagram-oriented, we will not be using a stream socket. Create an [link asio.reference.ip__udp.socket ip::udp::socket] and initiate contact with the remote endpoint.
-
-
-
-
-
-Now we need to be ready to accept whatever the server sends back to us. The endpoint on our side that receives the server's response will be initialised by [link asio.reference.basic_datagram_socket.receive_from ip::udp::socket::receive_from()].
-
-
-
-
-
-Finally, handle any exceptions that may have been thrown.
-
-
-
-See the [link asio.tutorial.tutdaytime4.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tutdaytime3 Daytime.3 - An asynchronous TCP daytime server]
-
-Next: [link asio.tutorial.tutdaytime5 Daytime.5 - A synchronous UDP daytime server]
-
-
-
-[section:src Source listing for Daytime.4]
-
-
- ``''''''``//
- ``''''''``// client.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <iostream>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::udp;
-
- ``''''''``int main(int argc, char* argv[])
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` if (argc != 2)
- ``''''''`` {
- ``''''''`` std::cerr << "Usage: client <host>" << std::endl;
- ``''''''`` return 1;
- ``''''''`` }
-
- ``''''''`` asio::io_context io_context;
-
- ``''''''`` udp::resolver resolver(io_context);
- ``''''''`` udp::endpoint receiver_endpoint =
- ``''''''`` *resolver.resolve(udp::v4(), argv[1], "daytime").begin();
-
- ``''''''`` udp::socket socket(io_context);
- ``''''''`` socket.open(udp::v4());
-
- ``''''''`` boost::array<char, 1> send_buf = {{ 0 }};
- ``''''''`` socket.send_to(asio::buffer(send_buf), receiver_endpoint);
-
- ``''''''`` boost::array<char, 128> recv_buf;
- ``''''''`` udp::endpoint sender_endpoint;
- ``''''''`` size_t len = socket.receive_from(
- ``''''''`` asio::buffer(recv_buf), sender_endpoint);
-
- ``''''''`` std::cout.write(recv_buf.data(), len);
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime4 Daytime.4 - A synchronous UDP daytime client]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime5 Daytime.5 - A synchronous UDP daytime server]
-
-This tutorial program shows how to use asio to implement a server application with UDP.
-
-
-
-
-
-Create an [link asio.reference.ip__udp.socket ip::udp::socket] object to receive requests on UDP port 13.
-
-
-
-
-
-Wait for a client to initiate contact with us. The remote\_endpoint object will be populated by [link asio.reference.basic_datagram_socket.receive_from ip::udp::socket::receive_from()].
-
-
-
-
-
-Determine what we are going to send back to the client.
-
-
-
-
-
-Send the response to the remote\_endpoint.
-
-
-
-
-
-Finally, handle any exceptions.
-
-
-
-
-
-See the [link asio.tutorial.tutdaytime5.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tutdaytime4 Daytime.4 - A synchronous UDP daytime client]
-
-Next: [link asio.tutorial.tutdaytime6 Daytime.6 - An asynchronous UDP daytime server]
-
-
-
-[section:src Source listing for Daytime.5]
-
-
- ``''''''``//
- ``''''''``// server.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <ctime>
- ``''''''``#include <iostream>
- ``''''''``#include <string>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::udp;
-
- ``''''''``std::string make_daytime_string()
- ``''''''``{
- ``''''''`` using namespace std; // For time_t, time and ctime;
- ``''''''`` time_t now = time(0);
- ``''''''`` return ctime(&now);
- ``''''''``}
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` asio::io_context io_context;
-
- ``''''''`` udp::socket socket(io_context, udp::endpoint(udp::v4(), 13));
-
- ``''''''`` for (;;)
- ``''''''`` {
- ``''''''`` boost::array<char, 1> recv_buf;
- ``''''''`` udp::endpoint remote_endpoint;
- ``''''''`` asio::error_code error;
- ``''''''`` socket.receive_from(asio::buffer(recv_buf),
- ``''''''`` remote_endpoint, 0, error);
-
- ``''''''`` if (error && error != asio::error::message_size)
- ``''''''`` throw asio::system_error(error);
-
- ``''''''`` std::string message = make_daytime_string();
-
- ``''''''`` asio::error_code ignored_error;
- ``''''''`` socket.send_to(asio::buffer(message),
- ``''''''`` remote_endpoint, 0, ignored_error);
- ``''''''`` }
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime5 Daytime.5 - A synchronous UDP daytime server]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime6 Daytime.6 - An asynchronous UDP daytime server]
-
-[heading The main() function]
-
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
-
-
-
-Create a server object to accept incoming client requests, and run the asio::io\_service object.
-
-
- ``''''''`` asio::io_context io_context;
- ``''''''`` udp_server server(io_context);
- ``''''''`` io_context.run();
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-
-
-[heading The udp_server class]
-
-
- ``''''''``class udp_server
- ``''''''``{
- ``''''''``public:
-
-
-
-The constructor initialises a socket to listen on UDP port 13.
-
-
- ``''''''`` udp_server(asio::io_context& io_context)
- ``''''''`` : socket_(io_context, udp::endpoint(udp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_receive();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_receive()
- ``''''''`` {
-
-
-
-The function [link asio.reference.basic_datagram_socket.async_receive_from ip::udp::socket::async_receive_from()] will cause the application to listen in the background for a new request. When such a request is received, the asio::io\_service object will invoke the `handle_receive()` function with two arguments: a value of type
-[link asio.reference.error_code error_code] indicating whether the operation succeeded or failed, and a `size_t` value `bytes_transferred` specifying the number of bytes received.
-
-
- ``''''''`` socket_.async_receive_from(
- ``''''''`` asio::buffer(recv_buffer_), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_receive, this,
- ``''''''`` asio::placeholders::error,
- ``''''''`` asio::placeholders::bytes_transferred));
- ``''''''`` }
-
-
-
-The function `handle_receive()` will service the client request.
-
-
-
- ``''''''`` void handle_receive(const asio::error_code& error,
- ``''''''`` std::size_t /*bytes_transferred*/)
- ``''''''`` {
-
-
-
-The `error` parameter contains the result of the asynchronous operation. Since we only provide the 1-byte `recv_buffer_` to contain the client's request, the asio::io\_service object would return an error if the client sent anything larger. We can ignore such an error if it comes up.
-
-
- ``''''''`` if (!error || error == asio::error::message_size)
- ``''''''`` {
-
-
-
-Determine what we are going to send.
-
-
- ``''''''`` boost::shared_ptr<std::string> message(
- ``''''''`` new std::string(make_daytime_string()));
-
-
-
-We now call [link asio.reference.basic_datagram_socket.async_send_to ip::udp::socket::async_send_to()] to serve the data to the client.
-
-
-
- ``''''''`` socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_send, this, message,
- ``''''''`` asio::placeholders::error,
- ``''''''`` asio::placeholders::bytes_transferred));
-
-
-
-When initiating the asynchronous operation, and if using [link asio.tutorial.boost_bind boost::bind] , you must specify only the arguments that match the handler's parameter list. In this program, both of the argument placeholders (asio::placeholders::error and asio::placeholders::bytes\_transferred) could potentially have been removed.
-
-Start listening for the next client request.
-
-
-
- ``''''''`` start_receive();
-
-
-
-Any further actions for this client request are now the responsibility of `handle_send()`.
-
-
- ``''''''`` }
- ``''''''`` }
-
-
-
-The function `handle_send()` is invoked after the service request has been completed.
-
-
-
- ``''''''`` void handle_send(boost::shared_ptr<std::string> /*message*/,
- ``''''''`` const asio::error_code& /*error*/,
- ``''''''`` std::size_t /*bytes_transferred*/)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` udp::socket socket_;
- ``''''''`` udp::endpoint remote_endpoint_;
- ``''''''`` boost::array<char, 1> recv_buffer_;
- ``''''''``};
-
-
-
-See the [link asio.tutorial.tutdaytime6.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tutdaytime5 Daytime.5 - A synchronous UDP daytime server]
-
-Next: [link asio.tutorial.tutdaytime7 Daytime.7 - A combined TCP/UDP asynchronous server]
-
-
-
-[section:src Source listing for Daytime.6]
-
-
- ``''''''``//
- ``''''''``// server.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <ctime>
- ``''''''``#include <iostream>
- ``''''''``#include <string>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/shared_ptr.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::udp;
-
- ``''''''``std::string make_daytime_string()
- ``''''''``{
- ``''''''`` using namespace std; // For time_t, time and ctime;
- ``''''''`` time_t now = time(0);
- ``''''''`` return ctime(&now);
- ``''''''``}
-
- ``''''''``class udp_server
- ``''''''``{
- ``''''''``public:
- ``''''''`` udp_server(asio::io_context& io_context)
- ``''''''`` : socket_(io_context, udp::endpoint(udp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_receive();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_receive()
- ``''''''`` {
- ``''''''`` socket_.async_receive_from(
- ``''''''`` asio::buffer(recv_buffer_), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_receive, this,
- ``''''''`` asio::placeholders::error,
- ``''''''`` asio::placeholders::bytes_transferred));
- ``''''''`` }
-
- ``''''''`` void handle_receive(const asio::error_code& error,
- ``''''''`` std::size_t /*bytes_transferred*/)
- ``''''''`` {
- ``''''''`` if (!error || error == asio::error::message_size)
- ``''''''`` {
- ``''''''`` boost::shared_ptr<std::string> message(
- ``''''''`` new std::string(make_daytime_string()));
-
- ``''''''`` socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_send, this, message,
- ``''''''`` asio::placeholders::error,
- ``''''''`` asio::placeholders::bytes_transferred));
-
- ``''''''`` start_receive();
- ``''''''`` }
- ``''''''`` }
-
- ``''''''`` void handle_send(boost::shared_ptr<std::string> /*message*/,
- ``''''''`` const asio::error_code& /*error*/,
- ``''''''`` std::size_t /*bytes_transferred*/)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` udp::socket socket_;
- ``''''''`` udp::endpoint remote_endpoint_;
- ``''''''`` boost::array<char, 1> recv_buffer_;
- ``''''''``};
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` asio::io_context io_context;
- ``''''''`` udp_server server(io_context);
- ``''''''`` io_context.run();
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime6 Daytime.6 - An asynchronous UDP daytime server]
-
-[endsect]
-
-[endsect]
-
-[section:tutdaytime7 Daytime.7 - A combined TCP/UDP asynchronous server]
-
-This tutorial program shows how to combine the two asynchronous servers that we have just written, into a single server application.
-
-[heading The main() function]
-
-
-
-
-
-We will begin by creating a server object to accept a TCP client connection.
-
-
-
-
-
-We also need a server object to accept a UDP client request.
-
-
-
-
-
-We have created two lots of work for the asio::io\_service object to do.
-
-
-
-
-
-[heading The tcp_connection and tcp_server classes]
-
-The following two classes are taken from [link asio.tutorial.tutdaytime3 Daytime.3] .
-
-
- ``''''''``class tcp_connection
- ``''''''`` : public boost::enable_shared_from_this<tcp_connection>
- ``''''''``{
- ``''''''``public:
- ``''''''`` typedef boost::shared_ptr<tcp_connection> pointer;
-
- ``''''''`` static pointer create(asio::io_context& io_context)
- ``''''''`` {
- ``''''''`` return pointer(new tcp_connection(io_context));
- ``''''''`` }
-
- ``''''''`` tcp::socket& socket()
- ``''''''`` {
- ``''''''`` return socket_;
- ``''''''`` }
-
- ``''''''`` void start()
- ``''''''`` {
- ``''''''`` message_ = make_daytime_string();
-
- ``''''''`` asio::async_write(socket_, asio::buffer(message_),
- ``''''''`` boost::bind(&tcp_connection::handle_write, shared_from_this()));
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` tcp_connection(asio::io_context& io_context)
- ``''''''`` : socket_(io_context)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` void handle_write()
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` tcp::socket socket_;
- ``''''''`` std::string message_;
- ``''''''``};
-
- ``''''''``class tcp_server
- ``''''''``{
- ``''''''``public:
- ``''''''`` tcp_server(asio::io_context& io_context)
- ``''''''`` : acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_accept()
- ``''''''`` {
- ``''''''`` tcp_connection::pointer new_connection =
- ``''''''`` tcp_connection::create(acceptor_.get_executor().context());
-
- ``''''''`` acceptor_.async_accept(new_connection->socket(),
- ``''''''`` boost::bind(&tcp_server::handle_accept, this, new_connection,
- ``''''''`` asio::placeholders::error));
- ``''''''`` }
-
- ``''''''`` void handle_accept(tcp_connection::pointer new_connection,
- ``''''''`` const asio::error_code& error)
- ``''''''`` {
- ``''''''`` if (!error)
- ``''''''`` {
- ``''''''`` new_connection->start();
- ``''''''`` }
-
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''`` tcp::acceptor acceptor_;
- ``''''''``};
-
-
-
-[heading The udp_server class]
-
-Similarly, this next class is taken from the [link asio.tutorial.tutdaytime6 previous tutorial step] .
-
-
- ``''''''``class udp_server
- ``''''''``{
- ``''''''``public:
- ``''''''`` udp_server(asio::io_context& io_context)
- ``''''''`` : socket_(io_context, udp::endpoint(udp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_receive();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_receive()
- ``''''''`` {
- ``''''''`` socket_.async_receive_from(
- ``''''''`` asio::buffer(recv_buffer_), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_receive, this,
- ``''''''`` asio::placeholders::error));
- ``''''''`` }
-
- ``''''''`` void handle_receive(const asio::error_code& error)
- ``''''''`` {
- ``''''''`` if (!error || error == asio::error::message_size)
- ``''''''`` {
- ``''''''`` boost::shared_ptr<std::string> message(
- ``''''''`` new std::string(make_daytime_string()));
-
- ``''''''`` socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_send, this, message));
-
- ``''''''`` start_receive();
- ``''''''`` }
- ``''''''`` }
-
- ``''''''`` void handle_send(boost::shared_ptr<std::string> /*message*/)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` udp::socket socket_;
- ``''''''`` udp::endpoint remote_endpoint_;
- ``''''''`` boost::array<char, 1> recv_buffer_;
- ``''''''``};
-
-
-
-See the [link asio.tutorial.tutdaytime7.src full source listing]
-
-Return to the [link asio.tutorial tutorial index]
-
-Previous: [link asio.tutorial.tutdaytime6 Daytime.6 - An asynchronous UDP daytime server]
-
-
-
-[section:src Source listing for Daytime.7]
-
-
- ``''''''``//
- ``''''''``// server.cpp
- ``''''''``// ~~~~~~~~~~
- ``''''''``//
- ``''''''``// Copyright (c) 2003-2016 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)
- ``''''''``//
-
- ``''''''``#include <ctime>
- ``''''''``#include <iostream>
- ``''''''``#include <string>
- ``''''''``#include <boost/array.hpp>
- ``''''''``#include <boost/bind.hpp>
- ``''''''``#include <boost/shared_ptr.hpp>
- ``''''''``#include <boost/enable_shared_from_this.hpp>
- ``''''''``#include <asio.hpp>
-
- ``''''''``using asio::ip::tcp;
- ``''''''``using asio::ip::udp;
-
- ``''''''``std::string make_daytime_string()
- ``''''''``{
- ``''''''`` using namespace std; // For time_t, time and ctime;
- ``''''''`` time_t now = time(0);
- ``''''''`` return ctime(&now);
- ``''''''``}
-
- ``''''''``class tcp_connection
- ``''''''`` : public boost::enable_shared_from_this<tcp_connection>
- ``''''''``{
- ``''''''``public:
- ``''''''`` typedef boost::shared_ptr<tcp_connection> pointer;
-
- ``''''''`` static pointer create(asio::io_context& io_context)
- ``''''''`` {
- ``''''''`` return pointer(new tcp_connection(io_context));
- ``''''''`` }
-
- ``''''''`` tcp::socket& socket()
- ``''''''`` {
- ``''''''`` return socket_;
- ``''''''`` }
-
- ``''''''`` void start()
- ``''''''`` {
- ``''''''`` message_ = make_daytime_string();
-
- ``''''''`` asio::async_write(socket_, asio::buffer(message_),
- ``''''''`` boost::bind(&tcp_connection::handle_write, shared_from_this()));
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` tcp_connection(asio::io_context& io_context)
- ``''''''`` : socket_(io_context)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` void handle_write()
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` tcp::socket socket_;
- ``''''''`` std::string message_;
- ``''''''``};
-
- ``''''''``class tcp_server
- ``''''''``{
- ``''''''``public:
- ``''''''`` tcp_server(asio::io_context& io_context)
- ``''''''`` : acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_accept()
- ``''''''`` {
- ``''''''`` tcp_connection::pointer new_connection =
- ``''''''`` tcp_connection::create(acceptor_.get_executor().context());
-
- ``''''''`` acceptor_.async_accept(new_connection->socket(),
- ``''''''`` boost::bind(&tcp_server::handle_accept, this, new_connection,
- ``''''''`` asio::placeholders::error));
- ``''''''`` }
-
- ``''''''`` void handle_accept(tcp_connection::pointer new_connection,
- ``''''''`` const asio::error_code& error)
- ``''''''`` {
- ``''''''`` if (!error)
- ``''''''`` {
- ``''''''`` new_connection->start();
- ``''''''`` }
-
- ``''''''`` start_accept();
- ``''''''`` }
-
- ``''''''`` tcp::acceptor acceptor_;
- ``''''''``};
-
- ``''''''``class udp_server
- ``''''''``{
- ``''''''``public:
- ``''''''`` udp_server(asio::io_context& io_context)
- ``''''''`` : socket_(io_context, udp::endpoint(udp::v4(), 13))
- ``''''''`` {
- ``''''''`` start_receive();
- ``''''''`` }
-
- ``''''''``private:
- ``''''''`` void start_receive()
- ``''''''`` {
- ``''''''`` socket_.async_receive_from(
- ``''''''`` asio::buffer(recv_buffer_), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_receive, this,
- ``''''''`` asio::placeholders::error));
- ``''''''`` }
-
- ``''''''`` void handle_receive(const asio::error_code& error)
- ``''''''`` {
- ``''''''`` if (!error || error == asio::error::message_size)
- ``''''''`` {
- ``''''''`` boost::shared_ptr<std::string> message(
- ``''''''`` new std::string(make_daytime_string()));
-
- ``''''''`` socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- ``''''''`` boost::bind(&udp_server::handle_send, this, message));
-
- ``''''''`` start_receive();
- ``''''''`` }
- ``''''''`` }
-
- ``''''''`` void handle_send(boost::shared_ptr<std::string> /*message*/)
- ``''''''`` {
- ``''''''`` }
-
- ``''''''`` udp::socket socket_;
- ``''''''`` udp::endpoint remote_endpoint_;
- ``''''''`` boost::array<char, 1> recv_buffer_;
- ``''''''``};
-
- ``''''''``int main()
- ``''''''``{
- ``''''''`` try
- ``''''''`` {
- ``''''''`` asio::io_context io_context;
- ``''''''`` tcp_server server1(io_context);
- ``''''''`` udp_server server2(io_context);
- ``''''''`` io_context.run();
- ``''''''`` }
- ``''''''`` catch (std::exception& e)
- ``''''''`` {
- ``''''''`` std::cerr << e.what() << std::endl;
- ``''''''`` }
-
- ``''''''`` return 0;
- ``''''''``}
-
-Return to [link asio.tutorial.tutdaytime7 Daytime.7 - A combined TCP/UDP asynchronous server]
-
-[endsect]
-
-[endsect]
-
-[section:boost_bind boost::bind]
-
-See the [@http://www.boost.org/libs/bind/bind.html Boost: bind.hpp documentation] for more information on how to use `boost::bind`.
-
-[endsect]
-
-
-[endsect] \ No newline at end of file
diff --git a/3rdparty/asio/src/doc/tutorial.xsl b/3rdparty/asio/src/doc/tutorial.xsl
deleted file mode 100644
index da9be491d53..00000000000
--- a/3rdparty/asio/src/doc/tutorial.xsl
+++ /dev/null
@@ -1,437 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!--
- Copyright (c) 2003-2016 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)
--->
-
-<xsl:output method="text"/>
-<xsl:strip-space elements="*"/>
-
-
-<xsl:variable name="newline">
-<xsl:text>
-</xsl:text>
-</xsl:variable>
-
-
-<xsl:template match="/doxygen">
-<xsl:text>[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:tutorial Tutorial]
-
-</xsl:text>
-
- <xsl:for-each select="compounddef[@kind = 'page' and @id = 'indexpage']">
- <xsl:apply-templates select="detaileddescription"/>
- </xsl:for-each>
-
- <xsl:for-each select="
- compounddef[
- @kind = 'page' and
- @id != 'indexpage' and
- not(contains(@id, 'src'))]">
- <xsl:text>[section:</xsl:text>
- <xsl:value-of select="concat(@id, ' ', title)"/>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:apply-templates select="detaileddescription"/>
- <xsl:variable name="srcid" select="concat(@id, 'src')"/>
- <xsl:if test="count(/doxygen/compounddef[@id = $srcid]) &gt; 0">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:text>[section:src </xsl:text>
- <xsl:value-of select="/doxygen/compounddef[@id = $srcid]/title"/>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- <xsl:apply-templates select="/doxygen/compounddef[@id = $srcid]/detaileddescription"/>
- <xsl:text>[endsect]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- </xsl:if>
- <xsl:text>[endsect]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- </xsl:for-each>
-
- <xsl:value-of select="$newline"/>
- <xsl:text>[endsect]</xsl:text>
-
-</xsl:template>
-
-
-<!--========== Utilities ==========-->
-
-<xsl:template name="strip-asio-ns">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="contains($name, 'boost::system::is_error_code_enum')">
- <xsl:value-of select="$name"/>
- </xsl:when>
- <xsl:when test="contains($name, 'asio::')">
- <xsl:value-of select="substring-after($name, 'asio::')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="make-id">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="contains($name, '::')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '::'), '__', substring-after($name, '::'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '=')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '='), '_eq_', substring-after($name, '='))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '!')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '!'), '_not_', substring-after($name, '!'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '&lt;')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '&lt;'), '_lt_', substring-after($name, '&lt;'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '&gt;')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '&gt;'), '_gt_', substring-after($name, '&gt;'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '+')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '+'), '_plus_', substring-after($name, '+'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, '~')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, '~'), '_', substring-after($name, '~'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, ' ')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, ' '), '_', substring-after($name, ' '))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($name, 'boost__posix_time__ptime')">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name"
- select="concat(substring-before($name, 'boost__posix_time__ptime'), 'ptime', substring-after($name, 'boost__posix_time__ptime'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="replace-scope-marker">
- <xsl:param name="text"/>
- <xsl:choose>
- <xsl:when test="contains($text, '_1_1')">
- <xsl:call-template name="replace-scope-marker">
- <xsl:with-param name="text"
- select="concat(substring-before($text, '_1_1'), '::', substring-after($text, '_1_1'))"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="refid-to-anchor">
- <xsl:param name="text"/>
- <xsl:variable name="scoped-text">
- <xsl:call-template name="replace-scope-marker">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="substring-after($scoped-text, '_1')"/>
-</xsl:template>
-
-
-<!--========== Markup ==========-->
-
-<xsl:template match="para">
- <xsl:apply-templates/>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="title">
- <xsl:variable name="title">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:if test="string-length($title) > 0">
- <xsl:text>[heading </xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
- </xsl:if>
-</xsl:template>
-
-
-<xsl:template match="programlisting">
- <xsl:value-of select="$newline"/>
- <xsl:apply-templates/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="codeline">
- <xsl:if test="string-length(.) &gt; 0">
- <xsl:text> ``''''''``</xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="codeline"/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="sp">
- <xsl:text> </xsl:text>
-</xsl:template>
-
-
-<xsl:template match="sp" mode="codeline">
- <xsl:text> </xsl:text>
-</xsl:template>
-
-
-<xsl:template match="linebreak">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="listitem">
- <xsl:text>* </xsl:text>
- <xsl:apply-templates/>
- <xsl:value-of select="$newline"/>
-</xsl:template>
-
-
-<xsl:template match="emphasis">
- <xsl:text>[*</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>]</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="computeroutput">
- <xsl:text>`</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>`</xsl:text>
-</xsl:template>
-
-
-<xsl:template match="text()">
- <xsl:variable name="text" select="."/>
- <xsl:variable name="starts-with-whitespace" select="
- starts-with($text, ' ') or starts-with($text, $newline)"/>
- <xsl:variable name="preceding-node-name">
- <xsl:for-each select="preceding-sibling::*">
- <xsl:if test="position() = last()">
- <xsl:value-of select="local-name()"/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="after-newline" select="
- $preceding-node-name = 'programlisting' or
- $preceding-node-name = 'linebreak'"/>
- <xsl:choose>
- <xsl:when test="$starts-with-whitespace and $after-newline">
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text" select="$text"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="strip-leading-whitespace">
- <xsl:param name="text"/>
- <xsl:choose>
- <xsl:when test="starts-with($text, ' ')">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="substring($text, 2)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="starts-with($text, $newline)">
- <xsl:call-template name="strip-leading-whitespace">
- <xsl:with-param name="text" select="substring($text, 2)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="escape-text">
- <xsl:param name="text"/>
- <xsl:choose>
- <xsl:when test="contains($text, '_')">
- <xsl:value-of select="substring-before($text, '_')"/>
- <xsl:text>\_</xsl:text>
- <xsl:call-template name="escape-text">
- <xsl:with-param name="text" select="substring-after($text, '_')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$text"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ref[@kindref='compound']">
- <xsl:variable name="name">
- <xsl:value-of select="."/>
- </xsl:variable>
- <xsl:variable name="refid">
- <xsl:value-of select="@refid"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="count(/doxygen/compounddef[@id=$refid]) &gt; 0">
- <xsl:text>[link asio.tutorial.</xsl:text>
- <xsl:choose>
- <xsl:when test="contains($refid, 'src')">
- <xsl:value-of select="substring-before($refid, 'src')"/>
- <xsl:text>.src</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$refid"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="concat(' ', .)"/>
- <xsl:text>]</xsl:text>
- </xsl:when>
- <xsl:when test="contains($name, 'asio::')">
- <xsl:variable name="ref-name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="ref-id">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="$ref-name"/>
- </xsl:call-template>
- </xsl:variable>
-[link asio.reference.<xsl:value-of select="$ref-id"/><xsl:text> </xsl:text><xsl:value-of
- select="$ref-name"/>]</xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ref[@kindref='member']">
- <xsl:variable name="refid">
- <xsl:value-of select="@refid"/>
- </xsl:variable>
- <xsl:variable name="text">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$refid='index_1index'">
- <xsl:text>[link asio.tutorial </xsl:text>
- <xsl:value-of select="$text"/>
- <xsl:text>]</xsl:text>
- </xsl:when>
- <xsl:when test="@external='reference.tags'">
- <xsl:variable name="anchor">
- <xsl:call-template name="refid-to-anchor">
- <xsl:with-param name="text" select="$refid"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="count(document('reference.tags')/tagfile/compound[@kind='class']/member[anchor=$anchor]) &gt; 0">
- <xsl:for-each select="document('reference.tags')/tagfile/compound[@kind='class']/member[anchor=$anchor]">
- <xsl:variable name="scope">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name">
- <xsl:call-template name="strip-asio-ns">
- <xsl:with-param name="name" select="../name"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="name">
- <xsl:call-template name="make-id">
- <xsl:with-param name="name" select="name"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text>[link asio.reference.</xsl:text>
- <xsl:if test="string-length($scope) &gt; 0">
- <xsl:value-of select="$scope"/><xsl:text>.</xsl:text>
- </xsl:if>
- <xsl:value-of select="$name"/>
- <xsl:text> </xsl:text><xsl:value-of select="$text"/><xsl:text>]</xsl:text>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="ulink">
- <xsl:text>[@</xsl:text>
- <xsl:value-of select="@url"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>]</xsl:text>
-</xsl:template>
-
-
-</xsl:stylesheet>
diff --git a/3rdparty/asio/src/doc/using.qbk b/3rdparty/asio/src/doc/using.qbk
deleted file mode 100644
index b4bcb01c831..00000000000
--- a/3rdparty/asio/src/doc/using.qbk
+++ /dev/null
@@ -1,316 +0,0 @@
-[/
- / Copyright (c) 2003-2016 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)
- /]
-
-[section:using Using Asio]
-
-[heading Supported Platforms]
-
-The following platforms and compilers have been tested:
-
-* Win32 and Win64 using Visual C++ 7.1 and Visual C++ 8.0.
-* Win32 using MinGW.
-* Win32 using Cygwin. (`__USE_W32_SOCKETS` must be defined.)
-* Linux (2.4 or 2.6 kernels) using g++ 3.3 or later.
-* Solaris using g++ 3.3 or later.
-* Mac OS X 10.4 using g++ 3.3 or later.
-
-The following platforms may also work:
-
-* AIX 5.3 using XL C/C++ v9.
-* HP-UX 11i v3 using patched aC++ A.06.14.
-* QNX Neutrino 6.3 using g++ 3.3 or later.
-* Solaris using Sun Studio 11 or later.
-* Tru64 v5.1 using Compaq C++ v7.1.
-
-[heading Dependencies]
-
-The following libraries must be available in order to link programs that use
-Asio:
-
-* Boost.Regex (optional) if you use any of the [link
-asio.reference.read_until `read_until()`] or [link
-asio.reference.async_read_until `async_read_until()`] overloads that take
-a `boost::regex` parameter.
-
-* [@http://www.openssl.org OpenSSL] (optional) if you use Asio's SSL
-support.
-
-Furthermore, some of the examples also require Boost.Date_Time or
-Boost.Serialization libraries.
-
-[note With MSVC or Borland C++ you may want to add `-DBOOST_DATE_TIME_NO_LIB`
-and `-DBOOST_REGEX_NO_LIB` to your project settings to disable autolinking of
-the Boost.Date_Time and Boost.Regex libraries respectively. Alternatively, you
-may choose to build these libraries and link to them.]
-
-[heading Optional separate compilation]
-
-By default, Asio is a header-only library. However, some developers may prefer
-to build Asio using separately compiled source code. To do this, add `#include
-<asio/impl/src.hpp>` to one (and only one) source file in a program, then build
-the program with `ASIO_SEPARATE_COMPILATION` defined in the project\/compiler
-settings. Alternatively, `ASIO_DYN_LINK` may be defined to build a
-separately-compiled Asio as part of a shared library.
-
-If using Asio's SSL support, you will also need to add `#include
-<asio/ssl/impl/src.hpp>`.
-
-[heading Building the tests and examples on Linux or UNIX]
-
-If the boost directory (e.g. the directory called `boost_1_34_1`) is in the
-same directory as the asio source kit, then you may configure asio by simply
-going:
-
- ./configure
-
-in the root directory of the asio source kit. Note that configure will always
-use the most recent boost version it knows about (i.e. 1.34.1) in preference to
-earlier versions, if there is more than one version present.
-
-If the boost directory is in some other location, then you need to
-specify this directory when running configure:
-
- ./configure --with-boost=``['path_to_boost]``
-
-When specifying the boost directory in this way you should ensure that you use
-an absolute path.
-
-To build the examples, simply run `make` in the root directory of the asio
-source kit. To also build and run the unit tests, to confirm that asio is
-working correctly, run `make check`.
-
-[heading Building the tests and examples with MSVC]
-
-To build using the MSVC 7.1 or MSVC 8.0 command line compiler, perform the
-following steps in a Command Prompt window:
-
-* If you are using a version of boost other than 1.34.1, or if the boost
- directory (i.e. the directory called `boost_1_34_1`) is not in the same
- directory as the asio source kit, then specify the location of boost by
- running a command similar to [^set BOOSTDIR=['path_to_boost]]. Ensure that
- you specify an absolute path.
-
-* Change to the asio `src` directory.
-
-* Execute the command `nmake -f Makefile.msc`.
-
-* Execute the command `nmake -f Makefile.msc check` to run a suite of tests to
- confirm that asio is working correctly.
-
-[heading Building the tests and examples with MinGW]
-
-To build using the MinGW g++ compiler from the command line, perform the
-following steps in a Command Prompt window:
-
-* If you are using a version of boost other than 1.34.1, or if the boost
- directory (i.e. the directory called `boost_1_34_1`) is not in the same
- directory as the asio source kit, then specify the location of boost by
- running a command similar to [^set BOOSTDIR=['path_to_boost]]. Ensure that
- you specify an absolute path using ['forward slashes] (i.e.
- `c:/projects/boost_1_34_1` rather than `c:\projects\boost_1_34_1`).
-
-* Change to the asio `src` directory.
-
-* Execute the command `make -f Makefile.mgw`.
-
-* Execute the command `make -f Makefile.mgw check` to run a suite of tests to
- confirm that asio is working correctly.
-
-[note The above instructions do not work when building inside MSYS. If you want
-to build using MSYS, you should use [^export] rather than [^set] to specify the
-location of boost.]
-
-[heading Macros]
-
-The macros listed in the table below may be used to control the behaviour of
-Asio.
-
-[table
- [[Macro][Description]]
- [
- [`ASIO_ENABLE_BUFFER_DEBUGGING`]
- [
- Enables Asio's buffer debugging support, which can help identify when
- invalid buffers are used in read or write operations (e.g. if a
- std::string object being written is destroyed before the write operation
- completes).
-
- When using Microsoft Visual C++, this macro is defined automatically if
- the compiler's iterator debugging support is enabled, unless
- `ASIO_DISABLE_BUFFER_DEBUGGING` has been defined.
-
- When using g++, this macro is defined automatically if standard library
- debugging is enabled (`_GLIBCXX_DEBUG` is defined), unless
- `ASIO_DISABLE_BUFFER_DEBUGGING` has been defined.
- ]
- ]
- [
- [`ASIO_DISABLE_BUFFER_DEBUGGING`]
- [
- Explictly disables Asio's buffer debugging support.
- ]
- ]
- [
- [`ASIO_DISABLE_DEV_POLL`]
- [
- Explicitly disables [^/dev/poll] support on Solaris, forcing the use of
- a `select`-based implementation.
- ]
- ]
- [
- [`ASIO_DISABLE_EPOLL`]
- [
- Explicitly disables `epoll` support on Linux, forcing the use of a
- `select`-based implementation.
- ]
- ]
- [
- [`ASIO_DISABLE_EVENTFD`]
- [
- Explicitly disables `eventfd` support on Linux, forcing the use of a
- pipe to interrupt blocked epoll/select system calls.
- ]
- ]
- [
- [`ASIO_DISABLE_KQUEUE`]
- [
- Explicitly disables `kqueue` support on Mac OS X and BSD variants,
- forcing the use of a `select`-based implementation.
- ]
- ]
- [
- [`ASIO_DISABLE_IOCP`]
- [
- Explicitly disables I/O completion ports support on Windows, forcing the
- use of a `select`-based implementation.
- ]
- ]
- [
- [`ASIO_DISABLE_THREADS`]
- [
- Explicitly disables Asio's threading support, independent of whether or
- not Boost supports threads.
- ]
- ]
- [
- [`ASIO_NO_WIN32_LEAN_AND_MEAN`]
- [
- By default, Asio will automatically define `WIN32_LEAN_AND_MEAN` when
- compiling for Windows, to minimise the number of Windows SDK header files
- and features that are included. The presence of
- `ASIO_NO_WIN32_LEAN_AND_MEAN` prevents `WIN32_LEAN_AND_MEAN` from
- being defined.
- ]
- ]
- [
- [`ASIO_NO_NOMINMAX`]
- [
- By default, Asio will automatically define `NOMINMAX` when compiling for
- Windows, to suppress the definition of the `min()` and `max()` macros.
- The presence of `ASIO_NO_NOMINMAX` prevents `NOMINMAX` from being
- defined.
- ]
- ]
- [
- [`ASIO_NO_DEFAULT_LINKED_LIBS`]
- [
- When compiling for Windows using Microsoft Visual C++ or Borland C++, Asio
- will automatically link in the necessary Windows SDK libraries for sockets
- support (i.e. [^ws2_32.lib] and [^mswsock.lib], or [^ws2.lib] when
- building for Windows CE). The `ASIO_NO_DEFAULT_LINKED_LIBS` macro
- prevents these libraries from being linked.
- ]
- ]
- [
- [`ASIO_SOCKET_STREAMBUF_MAX_ARITY`]
- [
- Determines the maximum number of arguments that may be passed to the
- `basic_socket_streambuf` class template's `connect` member function.
- Defaults to 5.
- ]
- ]
- [
- [`ASIO_SOCKET_IOSTREAM_MAX_ARITY`]
- [
- Determines the maximum number of arguments that may be passed to the
- `basic_socket_iostream` class template's constructor and `connect` member
- function. Defaults to 5.
- ]
- ]
- [
- [`ASIO_ENABLE_CANCELIO`]
- [
- Enables use of the `CancelIo` function on older versions of Windows. If
- not enabled, calls to `cancel()` on a socket object will always fail with
- `asio::error::operation_not_supported` when run on Windows XP, Windows
- Server 2003, and earlier versions of Windows. When running on Windows
- Vista, Windows Server 2008, and later, the `CancelIoEx` function is
- always used.
-
- The `CancelIo` function has two issues that should be considered before
- enabling its use:
-
- * It will only cancel asynchronous operations that were initiated in the
- current thread.
-
- * It can appear to complete without error, but the request
- to cancel the unfinished operations may be silently ignored by the
- operating system. Whether it works or not seems to depend on the
- drivers that are installed.
-
- For portable cancellation, consider using one of the following
- alternatives:
-
- * Disable asio's I/O completion port backend by defining
- ASIO_DISABLE_IOCP.
-
- * Use the socket object's close() function to simultaneously
- cancel the outstanding operations and close the socket.
- ]
- ]
- [
- [`ASIO_NO_TYPEID`]
- [
- Disables uses of the `typeid` operator in asio. Defined automatically if
- `BOOST_NO_TYPEID` is defined.
- ]
- ]
- [
- [`ASIO_HASH_MAP_BUCKETS`]
- [
- Determines the number of buckets in asio's internal `hash_map` objects.
- The value should be a comma separated list of prime numbers, in ascending
- order. The `hash_map` implementation will automatically increase the
- number of buckets as the number of elements in the map increases.
-
- Some examples:
-
- * Defining `ASIO_HASH_MAP_BUCKETS` to `1021` means that the `hash_map`
- objects will always contain 1021 buckets, irrespective of the number of
- elements in the map.
-
- * Defining `ASIO_HASH_MAP_BUCKETS` to `53,389,1543` means that the
- `hash_map` objects will initially contain 53 buckets. The number of
- buckets will be increased to 389 and then 1543 as elements are added to
- the map.
- ]
- ]
-]
-
-[heading Mailing List]
-
-A mailing list specifically for Asio may be found on
-[@http://sourceforge.net/mail/?group_id=122478 SourceForge.net]. Newsgroup
-access is provided via [@http://dir.gmane.org/gmane.comp.lib.boost.asio.user
-Gmane].
-
-[heading Wiki]
-
-Users are encouraged to share examples, tips and FAQs on the Asio wiki,
-which is located at [@http://think-async.com/Asio/].
-
-[endsect]
diff --git a/3rdparty/asio/src/examples/cpp03/Makefile.am b/3rdparty/asio/src/examples/cpp03/Makefile.am
deleted file mode 100644
index adacab88ef6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/Makefile.am
+++ /dev/null
@@ -1,250 +0,0 @@
-AUTOMAKE_OPTIONS = subdir-objects
-
-if SEPARATE_COMPILATION
-noinst_LIBRARIES = libasio.a
-libasio_a_SOURCES = ../../asio.cpp
-if HAVE_OPENSSL
-libasio_a_SOURCES += ../../asio_ssl.cpp
-endif
-LDADD = libasio.a
-endif
-
-noinst_PROGRAMS = \
- allocation/server \
- buffers/reference_counted \
- chat/chat_client \
- chat/chat_server \
- echo/async_tcp_echo_server \
- echo/async_udp_echo_server \
- echo/blocking_tcp_echo_client \
- echo/blocking_tcp_echo_server \
- echo/blocking_udp_echo_client \
- echo/blocking_udp_echo_server \
- http/client/async_client \
- http/client/sync_client \
- http/server/http_server \
- http/server2/http_server \
- http/server3/http_server \
- http/server4/http_server \
- icmp/ping \
- invocation/prioritised_handlers \
- iostreams/daytime_client \
- iostreams/daytime_server \
- iostreams/http_client \
- multicast/receiver \
- multicast/sender \
- nonblocking/third_party_lib \
- porthopper/client \
- porthopper/server \
- services/daytime_client \
- socks4/sync_client \
- timeouts/async_tcp_client \
- timeouts/blocking_tcp_client \
- timeouts/blocking_udp_client \
- timeouts/server \
- timers/time_t_timer \
- tutorial/timer1/timer \
- tutorial/timer2/timer \
- tutorial/timer3/timer \
- tutorial/timer4/timer \
- tutorial/timer5/timer \
- tutorial/daytime1/client \
- tutorial/daytime2/server \
- tutorial/daytime3/server \
- tutorial/daytime4/client \
- tutorial/daytime5/server \
- tutorial/daytime6/server \
- tutorial/daytime7/server
-
-if !WINDOWS_TARGET
-noinst_PROGRAMS += \
- chat/posix_chat_client \
- fork/daemon \
- fork/process_per_connection \
- local/connect_pair \
- local/iostream_client \
- local/stream_server \
- local/stream_client
-endif
-
-if WINDOWS_TARGET
-noinst_PROGRAMS += \
- windows/transmit_file
-endif
-
-if HAVE_OPENSSL
-noinst_PROGRAMS += \
- ssl/client \
- ssl/server
-endif
-
-if HAVE_BOOST_COROUTINE
-noinst_PROGRAMS += \
- spawn/echo_server \
- spawn/parallel_grep
-endif
-
-noinst_HEADERS = \
- chat/chat_message.hpp \
- services/basic_logger.hpp \
- services/logger.hpp \
- services/logger_service.hpp
-
-AM_CXXFLAGS = -I$(srcdir)/../../../include
-
-allocation_server_SOURCES = allocation/server.cpp
-buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
-chat_chat_client_SOURCES = chat/chat_client.cpp
-chat_chat_server_SOURCES = chat/chat_server.cpp
-echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
-echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
-echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
-echo_blocking_tcp_echo_server_SOURCES = echo/blocking_tcp_echo_server.cpp
-echo_blocking_udp_echo_client_SOURCES = echo/blocking_udp_echo_client.cpp
-echo_blocking_udp_echo_server_SOURCES = echo/blocking_udp_echo_server.cpp
-http_client_async_client_SOURCES = http/client/async_client.cpp
-http_client_sync_client_SOURCES = http/client/sync_client.cpp
-http_server_http_server_SOURCES = \
- http/server/connection.cpp \
- http/server/connection_manager.cpp \
- http/server/main.cpp \
- http/server/mime_types.cpp \
- http/server/reply.cpp \
- http/server/request_handler.cpp \
- http/server/request_parser.cpp \
- http/server/server.cpp
-http_server2_http_server_SOURCES = \
- http/server2/connection.cpp \
- http/server2/io_context_pool.cpp \
- http/server2/main.cpp \
- http/server2/mime_types.cpp \
- http/server2/reply.cpp \
- http/server2/request_handler.cpp \
- http/server2/request_parser.cpp \
- http/server2/server.cpp
-http_server3_http_server_SOURCES = \
- http/server3/connection.cpp \
- http/server3/main.cpp \
- http/server3/mime_types.cpp \
- http/server3/reply.cpp \
- http/server3/request_handler.cpp \
- http/server3/request_parser.cpp \
- http/server3/server.cpp
-http_server4_http_server_SOURCES = \
- http/server4/file_handler.cpp \
- http/server4/main.cpp \
- http/server4/mime_types.cpp \
- http/server4/reply.cpp \
- http/server4/request_parser.cpp \
- http/server4/server.cpp
-icmp_ping_SOURCES = icmp/ping.cpp
-invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
-iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
-iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
-iostreams_http_client_SOURCES = iostreams/http_client.cpp
-multicast_receiver_SOURCES = multicast/receiver.cpp
-multicast_sender_SOURCES = multicast/sender.cpp
-nonblocking_third_party_lib_SOURCES = nonblocking/third_party_lib.cpp
-porthopper_client_SOURCES = porthopper/client.cpp
-porthopper_server_SOURCES = porthopper/server.cpp
-services_daytime_client_SOURCES = \
- services/daytime_client.cpp \
- services/logger_service.cpp
-socks4_sync_client_SOURCES = socks4/sync_client.cpp
-timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
-timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
-timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
-timeouts_server_SOURCES = timeouts/server.cpp
-timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
-tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
-tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
-tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
-tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
-tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
-tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
-tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
-tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
-tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
-tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
-tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
-tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
-
-if !WINDOWS_TARGET
-chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
-fork_daemon_SOURCES = fork/daemon.cpp
-fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
-local_connect_pair_SOURCES = local/connect_pair.cpp
-local_iostream_client_SOURCES = local/iostream_client.cpp
-local_stream_server_SOURCES = local/stream_server.cpp
-local_stream_client_SOURCES = local/stream_client.cpp
-endif
-
-if WINDOWS_TARGET
-windows_transmit_file_SOURCES = windows/transmit_file.cpp
-endif
-
-if HAVE_OPENSSL
-ssl_client_SOURCES = ssl/client.cpp
-ssl_server_SOURCES = ssl/server.cpp
-endif
-
-if HAVE_BOOST_COROUTINE
-spawn_echo_server_SOURCES = spawn/echo_server.cpp
-spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
-spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
-spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
-endif
-
-EXTRA_DIST = \
- http/server/connection.hpp \
- http/server/connection_manager.hpp \
- http/server/header.hpp \
- http/server/mime_types.hpp \
- http/server/reply.hpp \
- http/server/request.hpp \
- http/server/request_handler.hpp \
- http/server/request_parser.hpp \
- http/server/server.hpp \
- http/server2/connection.hpp \
- http/server2/io_context_pool.hpp \
- http/server2/header.hpp \
- http/server2/mime_types.hpp \
- http/server2/reply.hpp \
- http/server2/request.hpp \
- http/server2/request_handler.hpp \
- http/server2/request_parser.hpp \
- http/server2/server.hpp \
- http/server3/connection.hpp \
- http/server3/header.hpp \
- http/server3/mime_types.hpp \
- http/server3/reply.hpp \
- http/server3/request.hpp \
- http/server3/request_handler.hpp \
- http/server3/request_parser.hpp \
- http/server3/server.hpp \
- http/server4/file_handler.hpp \
- http/server4/header.hpp \
- http/server4/mime_types.hpp \
- http/server4/reply.hpp \
- http/server4/request.hpp \
- http/server4/request_parser.hpp \
- http/server4/server.hpp \
- icmp/icmp_header.hpp \
- icmp/ipv4_header.hpp \
- porthopper/protocol.hpp \
- serialization/client.cpp \
- serialization/server.cpp \
- serialization/connection.hpp \
- serialization/stock.hpp \
- services/basic_logger.hpp \
- services/logger.hpp \
- services/logger_service.hpp \
- socks4/socks4.hpp \
- ssl/README \
- ssl/ca.pem \
- ssl/server.pem \
- ssl/dh2048.pem \
- timers/tick_count_timer.cpp
-
-MAINTAINERCLEANFILES = \
- $(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp03/allocation/.gitignore b/3rdparty/asio/src/examples/cpp03/allocation/.gitignore
deleted file mode 100644
index 180ba886e58..00000000000
--- a/3rdparty/asio/src/examples/cpp03/allocation/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/allocation/server.cpp b/3rdparty/asio/src/examples/cpp03/allocation/server.cpp
deleted file mode 100644
index e26eb564918..00000000000
--- a/3rdparty/asio/src/examples/cpp03/allocation/server.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/aligned_storage.hpp>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-// Class to manage the memory to be used for handler-based custom allocation.
-// It contains a single block of memory which may be returned for allocation
-// requests. If the memory is in use when an allocation request is made, the
-// allocator delegates allocation to the global heap.
-class handler_allocator
- : private boost::noncopyable
-{
-public:
- handler_allocator()
- : in_use_(false)
- {
- }
-
- void* allocate(std::size_t size)
- {
- if (!in_use_ && size < storage_.size)
- {
- in_use_ = true;
- return storage_.address();
- }
- else
- {
- return ::operator new(size);
- }
- }
-
- void deallocate(void* pointer)
- {
- if (pointer == storage_.address())
- {
- in_use_ = false;
- }
- else
- {
- ::operator delete(pointer);
- }
- }
-
-private:
- // Storage space used for handler-based custom memory allocation.
- boost::aligned_storage<1024> storage_;
-
- // Whether the handler-based custom allocation storage has been used.
- bool in_use_;
-};
-
-// Wrapper class template for handler objects to allow handler memory
-// allocation to be customised. Calls to operator() are forwarded to the
-// encapsulated handler.
-template <typename Handler>
-class custom_alloc_handler
-{
-public:
- custom_alloc_handler(handler_allocator& a, Handler h)
- : allocator_(a),
- handler_(h)
- {
- }
-
- template <typename Arg1>
- void operator()(Arg1 arg1)
- {
- handler_(arg1);
- }
-
- template <typename Arg1, typename Arg2>
- void operator()(Arg1 arg1, Arg2 arg2)
- {
- handler_(arg1, arg2);
- }
-
- friend void* asio_handler_allocate(std::size_t size,
- custom_alloc_handler<Handler>* this_handler)
- {
- return this_handler->allocator_.allocate(size);
- }
-
- friend void asio_handler_deallocate(void* pointer, std::size_t /*size*/,
- custom_alloc_handler<Handler>* this_handler)
- {
- this_handler->allocator_.deallocate(pointer);
- }
-
-private:
- handler_allocator& allocator_;
- Handler handler_;
-};
-
-// Helper function to wrap a handler object to add custom allocation.
-template <typename Handler>
-inline custom_alloc_handler<Handler> make_custom_alloc_handler(
- handler_allocator& a, Handler h)
-{
- return custom_alloc_handler<Handler>(a, h);
-}
-
-class session
- : public boost::enable_shared_from_this<session>
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- socket_.async_read_some(asio::buffer(data_),
- make_custom_alloc_handler(allocator_,
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred)));
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- make_custom_alloc_handler(allocator_,
- boost::bind(&session::handle_write,
- shared_from_this(),
- asio::placeholders::error)));
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_),
- make_custom_alloc_handler(allocator_,
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred)));
- }
- }
-
-private:
- // The socket used to communicate with the client.
- tcp::socket socket_;
-
- // Buffer used to store data received from the client.
- boost::array<char, 1024> data_;
-
- // The allocator to use for handler-based custom memory allocation.
- handler_allocator allocator_;
-};
-
-typedef boost::shared_ptr<session> session_ptr;
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : io_context_(io_context),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- session_ptr new_session(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session_ptr new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
-
- new_session.reset(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/buffers/.gitignore b/3rdparty/asio/src/examples/cpp03/buffers/.gitignore
deleted file mode 100644
index abe68c665f5..00000000000
--- a/3rdparty/asio/src/examples/cpp03/buffers/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-reference_counted
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp b/3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp
deleted file mode 100644
index 9f7455cdbbd..00000000000
--- a/3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// reference_counted.cpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/shared_ptr.hpp>
-#include <iostream>
-#include <vector>
-
-using asio::ip::tcp;
-
-// A reference-counted non-modifiable buffer class.
-class shared_const_buffer
-{
-public:
- // Construct from a std::string.
- explicit shared_const_buffer(const std::string& data)
- : data_(new std::vector<char>(data.begin(), data.end())),
- buffer_(asio::buffer(*data_))
- {
- }
-
- // Implement the ConstBufferSequence requirements.
- typedef asio::const_buffer value_type;
- typedef const asio::const_buffer* const_iterator;
- const asio::const_buffer* begin() const { return &buffer_; }
- const asio::const_buffer* end() const { return &buffer_ + 1; }
-
-private:
- boost::shared_ptr<std::vector<char> > data_;
- asio::const_buffer buffer_;
-};
-
-class session
- : public boost::enable_shared_from_this<session>
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- using namespace std; // For time_t, time and ctime.
- time_t now = time(0);
- shared_const_buffer buffer(ctime(&now));
- asio::async_write(socket_, buffer,
- boost::bind(&session::handle_write, shared_from_this()));
- }
-
- void handle_write()
- {
- }
-
-private:
- // The socket used to communicate with the client.
- tcp::socket socket_;
-};
-
-typedef boost::shared_ptr<session> session_ptr;
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : io_context_(io_context),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- session_ptr new_session(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session_ptr new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
-
- new_session.reset(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: reference_counted <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/chat/.gitignore b/3rdparty/asio/src/examples/cpp03/chat/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp b/3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp
deleted file mode 100644
index 9dd16145b81..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-//
-// chat_client.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <deque>
-#include <iostream>
-#include <boost/bind.hpp>
-#include "asio.hpp"
-#include "chat_message.hpp"
-
-using asio::ip::tcp;
-
-typedef std::deque<chat_message> chat_message_queue;
-
-class chat_client
-{
-public:
- chat_client(asio::io_context& io_context,
- const tcp::resolver::results_type& endpoints)
- : io_context_(io_context),
- socket_(io_context)
- {
- asio::async_connect(socket_, endpoints,
- boost::bind(&chat_client::handle_connect, this,
- asio::placeholders::error));
- }
-
- void write(const chat_message& msg)
- {
- asio::post(io_context_,
- boost::bind(&chat_client::do_write, this, msg));
- }
-
- void close()
- {
- asio::post(io_context_,
- boost::bind(&chat_client::do_close, this));
- }
-
-private:
-
- void handle_connect(const asio::error_code& error)
- {
- if (!error)
- {
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&chat_client::handle_read_header, this,
- asio::placeholders::error));
- }
- }
-
- void handle_read_header(const asio::error_code& error)
- {
- if (!error && read_msg_.decode_header())
- {
- asio::async_read(socket_,
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- boost::bind(&chat_client::handle_read_body, this,
- asio::placeholders::error));
- }
- else
- {
- do_close();
- }
- }
-
- void handle_read_body(const asio::error_code& error)
- {
- if (!error)
- {
- std::cout.write(read_msg_.body(), read_msg_.body_length());
- std::cout << "\n";
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&chat_client::handle_read_header, this,
- asio::placeholders::error));
- }
- else
- {
- do_close();
- }
- }
-
- void do_write(chat_message msg)
- {
- bool write_in_progress = !write_msgs_.empty();
- write_msgs_.push_back(msg);
- if (!write_in_progress)
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_client::handle_write, this,
- asio::placeholders::error));
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- write_msgs_.pop_front();
- if (!write_msgs_.empty())
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_client::handle_write, this,
- asio::placeholders::error));
- }
- }
- else
- {
- do_close();
- }
- }
-
- void do_close()
- {
- socket_.close();
- }
-
-private:
- asio::io_context& io_context_;
- tcp::socket socket_;
- chat_message read_msg_;
- chat_message_queue write_msgs_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: chat_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
-
- chat_client c(io_context, endpoints);
-
- asio::thread t(boost::bind(&asio::io_context::run, &io_context));
-
- char line[chat_message::max_body_length + 1];
- while (std::cin.getline(line, chat_message::max_body_length + 1))
- {
- using namespace std; // For strlen and memcpy.
- chat_message msg;
- msg.body_length(strlen(line));
- memcpy(msg.body(), line, msg.body_length());
- msg.encode_header();
- c.write(msg);
- }
-
- c.close();
- t.join();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp b/3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp
deleted file mode 100644
index ceeef2f03f8..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// chat_message.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 CHAT_MESSAGE_HPP
-#define CHAT_MESSAGE_HPP
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-
-class chat_message
-{
-public:
- enum { header_length = 4 };
- enum { max_body_length = 512 };
-
- chat_message()
- : body_length_(0)
- {
- }
-
- const char* data() const
- {
- return data_;
- }
-
- char* data()
- {
- return data_;
- }
-
- size_t length() const
- {
- return header_length + body_length_;
- }
-
- const char* body() const
- {
- return data_ + header_length;
- }
-
- char* body()
- {
- return data_ + header_length;
- }
-
- size_t body_length() const
- {
- return body_length_;
- }
-
- void body_length(size_t new_length)
- {
- body_length_ = new_length;
- if (body_length_ > max_body_length)
- body_length_ = max_body_length;
- }
-
- bool decode_header()
- {
- using namespace std; // For strncat and atoi.
- char header[header_length + 1] = "";
- strncat(header, data_, header_length);
- body_length_ = atoi(header);
- if (body_length_ > max_body_length)
- {
- body_length_ = 0;
- return false;
- }
- return true;
- }
-
- void encode_header()
- {
- using namespace std; // For sprintf and memcpy.
- char header[header_length + 1] = "";
- sprintf(header, "%4d", static_cast<int>(body_length_));
- memcpy(data_, header, header_length);
- }
-
-private:
- char data_[header_length + max_body_length];
- size_t body_length_;
-};
-
-#endif // CHAT_MESSAGE_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp b/3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp
deleted file mode 100644
index 902515b3b54..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-//
-// chat_server.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <algorithm>
-#include <cstdlib>
-#include <deque>
-#include <iostream>
-#include <list>
-#include <set>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include "asio.hpp"
-#include "chat_message.hpp"
-
-using asio::ip::tcp;
-
-//----------------------------------------------------------------------
-
-typedef std::deque<chat_message> chat_message_queue;
-
-//----------------------------------------------------------------------
-
-class chat_participant
-{
-public:
- virtual ~chat_participant() {}
- virtual void deliver(const chat_message& msg) = 0;
-};
-
-typedef boost::shared_ptr<chat_participant> chat_participant_ptr;
-
-//----------------------------------------------------------------------
-
-class chat_room
-{
-public:
- void join(chat_participant_ptr participant)
- {
- participants_.insert(participant);
- std::for_each(recent_msgs_.begin(), recent_msgs_.end(),
- boost::bind(&chat_participant::deliver, participant, _1));
- }
-
- void leave(chat_participant_ptr participant)
- {
- participants_.erase(participant);
- }
-
- void deliver(const chat_message& msg)
- {
- recent_msgs_.push_back(msg);
- while (recent_msgs_.size() > max_recent_msgs)
- recent_msgs_.pop_front();
-
- std::for_each(participants_.begin(), participants_.end(),
- boost::bind(&chat_participant::deliver, _1, boost::ref(msg)));
- }
-
-private:
- std::set<chat_participant_ptr> participants_;
- enum { max_recent_msgs = 100 };
- chat_message_queue recent_msgs_;
-};
-
-//----------------------------------------------------------------------
-
-class chat_session
- : public chat_participant,
- public boost::enable_shared_from_this<chat_session>
-{
-public:
- chat_session(asio::io_context& io_context, chat_room& room)
- : socket_(io_context),
- room_(room)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- room_.join(shared_from_this());
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(
- &chat_session::handle_read_header, shared_from_this(),
- asio::placeholders::error));
- }
-
- void deliver(const chat_message& msg)
- {
- bool write_in_progress = !write_msgs_.empty();
- write_msgs_.push_back(msg);
- if (!write_in_progress)
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_session::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- }
-
- void handle_read_header(const asio::error_code& error)
- {
- if (!error && read_msg_.decode_header())
- {
- asio::async_read(socket_,
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- boost::bind(&chat_session::handle_read_body, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- room_.leave(shared_from_this());
- }
- }
-
- void handle_read_body(const asio::error_code& error)
- {
- if (!error)
- {
- room_.deliver(read_msg_);
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&chat_session::handle_read_header, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- room_.leave(shared_from_this());
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- write_msgs_.pop_front();
- if (!write_msgs_.empty())
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_session::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- }
- else
- {
- room_.leave(shared_from_this());
- }
- }
-
-private:
- tcp::socket socket_;
- chat_room& room_;
- chat_message read_msg_;
- chat_message_queue write_msgs_;
-};
-
-typedef boost::shared_ptr<chat_session> chat_session_ptr;
-
-//----------------------------------------------------------------------
-
-class chat_server
-{
-public:
- chat_server(asio::io_context& io_context,
- const tcp::endpoint& endpoint)
- : io_context_(io_context),
- acceptor_(io_context, endpoint)
- {
- start_accept();
- }
-
- void start_accept()
- {
- chat_session_ptr new_session(new chat_session(io_context_, room_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&chat_server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(chat_session_ptr session,
- const asio::error_code& error)
- {
- if (!error)
- {
- session->start();
- }
-
- start_accept();
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
- chat_room room_;
-};
-
-typedef boost::shared_ptr<chat_server> chat_server_ptr;
-typedef std::list<chat_server_ptr> chat_server_list;
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc < 2)
- {
- std::cerr << "Usage: chat_server <port> [<port> ...]\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- chat_server_list servers;
- for (int i = 1; i < argc; ++i)
- {
- using namespace std; // For atoi.
- tcp::endpoint endpoint(tcp::v4(), atoi(argv[i]));
- chat_server_ptr server(new chat_server(io_context, endpoint));
- servers.push_back(server);
- }
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp b/3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp
deleted file mode 100644
index 91428825aad..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-//
-// posix_chat_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include "asio.hpp"
-#include "chat_message.hpp"
-
-#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
-
-using asio::ip::tcp;
-namespace posix = asio::posix;
-
-class posix_chat_client
-{
-public:
- posix_chat_client(asio::io_context& io_context,
- const tcp::resolver::results_type& endpoints)
- : socket_(io_context),
- input_(io_context, ::dup(STDIN_FILENO)),
- output_(io_context, ::dup(STDOUT_FILENO)),
- input_buffer_(chat_message::max_body_length)
- {
- asio::async_connect(socket_, endpoints,
- boost::bind(&posix_chat_client::handle_connect, this,
- asio::placeholders::error));
- }
-
-private:
-
- void handle_connect(const asio::error_code& error)
- {
- if (!error)
- {
- // Read the fixed-length header of the next message from the server.
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&posix_chat_client::handle_read_header, this,
- asio::placeholders::error));
-
- // Read a line of input entered by the user.
- asio::async_read_until(input_, input_buffer_, '\n',
- boost::bind(&posix_chat_client::handle_read_input, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- void handle_read_header(const asio::error_code& error)
- {
- if (!error && read_msg_.decode_header())
- {
- // Read the variable-length body of the message from the server.
- asio::async_read(socket_,
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- boost::bind(&posix_chat_client::handle_read_body, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_read_body(const asio::error_code& error)
- {
- if (!error)
- {
- // Write out the message we just received, terminated by a newline.
- static char eol[] = { '\n' };
- boost::array<asio::const_buffer, 2> buffers = {{
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- asio::buffer(eol) }};
- asio::async_write(output_, buffers,
- boost::bind(&posix_chat_client::handle_write_output, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_write_output(const asio::error_code& error)
- {
- if (!error)
- {
- // Read the fixed-length header of the next message from the server.
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&posix_chat_client::handle_read_header, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_read_input(const asio::error_code& error,
- std::size_t length)
- {
- if (!error)
- {
- // Write the message (minus the newline) to the server.
- write_msg_.body_length(length - 1);
- input_buffer_.sgetn(write_msg_.body(), length - 1);
- input_buffer_.consume(1); // Remove newline from input.
- write_msg_.encode_header();
- asio::async_write(socket_,
- asio::buffer(write_msg_.data(), write_msg_.length()),
- boost::bind(&posix_chat_client::handle_write, this,
- asio::placeholders::error));
- }
- else if (error == asio::error::not_found)
- {
- // Didn't get a newline. Send whatever we have.
- write_msg_.body_length(input_buffer_.size());
- input_buffer_.sgetn(write_msg_.body(), input_buffer_.size());
- write_msg_.encode_header();
- asio::async_write(socket_,
- asio::buffer(write_msg_.data(), write_msg_.length()),
- boost::bind(&posix_chat_client::handle_write, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- // Read a line of input entered by the user.
- asio::async_read_until(input_, input_buffer_, '\n',
- boost::bind(&posix_chat_client::handle_read_input, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- close();
- }
- }
-
- void close()
- {
- // Cancel all outstanding asynchronous operations.
- socket_.close();
- input_.close();
- output_.close();
- }
-
-private:
- tcp::socket socket_;
- posix::stream_descriptor input_;
- posix::stream_descriptor output_;
- chat_message read_msg_;
- chat_message write_msg_;
- asio::streambuf input_buffer_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: posix_chat_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
-
- posix_chat_client c(io_context, endpoints);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
-
-#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
-int main() {}
-#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp03/echo/.gitignore b/3rdparty/asio/src/examples/cpp03/echo/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
deleted file mode 100644
index c26136e89b5..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//
-// async_tcp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind.hpp>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-class session
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
-private:
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- boost::bind(&session::handle_write, this,
- asio::placeholders::error));
- }
- else
- {
- delete this;
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- delete this;
- }
- }
-
- tcp::socket socket_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : io_context_(io_context),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- start_accept();
- }
-
-private:
- void start_accept()
- {
- session* new_session = new session(io_context_);
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session* new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
- else
- {
- delete new_session;
- }
-
- start_accept();
- }
-
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: async_tcp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
deleted file mode 100644
index 851c46b0803..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// async_udp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind.hpp>
-#include "asio.hpp"
-
-using asio::ip::udp;
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : socket_(io_context, udp::endpoint(udp::v4(), port))
- {
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&server::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
- void handle_receive_from(const asio::error_code& error,
- size_t bytes_recvd)
- {
- if (!error && bytes_recvd > 0)
- {
- socket_.async_send_to(
- asio::buffer(data_, bytes_recvd), sender_endpoint_,
- boost::bind(&server::handle_send_to, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&server::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- void handle_send_to(const asio::error_code& /*error*/,
- size_t /*bytes_sent*/)
- {
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&server::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
-private:
- udp::socket socket_;
- udp::endpoint sender_endpoint_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: async_udp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
deleted file mode 100644
index 224b9dbb1b2..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// blocking_tcp_echo_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-enum { max_length = 1024 };
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: blocking_tcp_echo_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints =
- resolver.resolve(tcp::v4(), argv[1], argv[2]);
-
- tcp::socket s(io_context);
- asio::connect(s, endpoints);
-
- using namespace std; // For strlen.
- std::cout << "Enter message: ";
- char request[max_length];
- std::cin.getline(request, max_length);
- size_t request_length = strlen(request);
- asio::write(s, asio::buffer(request, request_length));
-
- char reply[max_length];
- size_t reply_length = asio::read(s,
- asio::buffer(reply, request_length));
- std::cout << "Reply is: ";
- std::cout.write(reply, reply_length);
- std::cout << "\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
deleted file mode 100644
index 163dc2a392c..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// blocking_tcp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind.hpp>
-#include <boost/smart_ptr.hpp>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-const int max_length = 1024;
-
-typedef boost::shared_ptr<tcp::socket> socket_ptr;
-
-void session(socket_ptr sock)
-{
- try
- {
- for (;;)
- {
- char data[max_length];
-
- asio::error_code error;
- size_t length = sock->read_some(asio::buffer(data), error);
- if (error == asio::error::eof)
- break; // Connection closed cleanly by peer.
- else if (error)
- throw asio::system_error(error); // Some other error.
-
- asio::write(*sock, asio::buffer(data, length));
- }
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception in thread: " << e.what() << "\n";
- }
-}
-
-void server(asio::io_context& io_context, unsigned short port)
-{
- tcp::acceptor a(io_context, tcp::endpoint(tcp::v4(), port));
- for (;;)
- {
- socket_ptr sock(new tcp::socket(io_context));
- a.accept(*sock);
- asio::thread t(boost::bind(session, sock));
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: blocking_tcp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server(io_context, atoi(argv[1]));
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
deleted file mode 100644
index ee90081b7ea..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// blocking_udp_echo_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include "asio.hpp"
-
-using asio::ip::udp;
-
-enum { max_length = 1024 };
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: blocking_udp_echo_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- udp::socket s(io_context, udp::endpoint(udp::v4(), 0));
-
- udp::resolver resolver(io_context);
- udp::resolver::results_type endpoints =
- resolver.resolve(udp::v4(), argv[1], argv[2]);
-
- using namespace std; // For strlen.
- std::cout << "Enter message: ";
- char request[max_length];
- std::cin.getline(request, max_length);
- size_t request_length = strlen(request);
- s.send_to(asio::buffer(request, request_length), *endpoints.begin());
-
- char reply[max_length];
- udp::endpoint sender_endpoint;
- size_t reply_length = s.receive_from(
- asio::buffer(reply, max_length), sender_endpoint);
- std::cout << "Reply is: ";
- std::cout.write(reply, reply_length);
- std::cout << "\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
deleted file mode 100644
index 3cc364c20b5..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// blocking_udp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include "asio.hpp"
-
-using asio::ip::udp;
-
-enum { max_length = 1024 };
-
-void server(asio::io_context& io_context, unsigned short port)
-{
- udp::socket sock(io_context, udp::endpoint(udp::v4(), port));
- for (;;)
- {
- char data[max_length];
- udp::endpoint sender_endpoint;
- size_t length = sock.receive_from(
- asio::buffer(data, max_length), sender_endpoint);
- sock.send_to(asio::buffer(data, length), sender_endpoint);
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: blocking_udp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server(io_context, atoi(argv[1]));
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/fork/.gitignore b/3rdparty/asio/src/examples/cpp03/fork/.gitignore
deleted file mode 100644
index 6b565fe313a..00000000000
--- a/3rdparty/asio/src/examples/cpp03/fork/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-daemon
-process_per_connection
diff --git a/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp b/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
deleted file mode 100644
index 483147e9552..00000000000
--- a/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-//
-// process_per_connection.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio/io_context.hpp>
-#include <asio/ip/tcp.hpp>
-#include <asio/signal_set.hpp>
-#include <asio/write.hpp>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include <cstdlib>
-#include <iostream>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-using asio::ip::tcp;
-
-class server
-{
-public:
- server(asio::io_context& io_context, unsigned short port)
- : io_context_(io_context),
- signal_(io_context, SIGCHLD),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port)),
- socket_(io_context)
- {
- start_signal_wait();
- start_accept();
- }
-
-private:
- void start_signal_wait()
- {
- signal_.async_wait(boost::bind(&server::handle_signal_wait, this));
- }
-
- void handle_signal_wait()
- {
- // Only the parent process should check for this signal. We can determine
- // whether we are in the parent by checking if the acceptor is still open.
- if (acceptor_.is_open())
- {
- // Reap completed child processes so that we don't end up with zombies.
- int status = 0;
- while (waitpid(-1, &status, WNOHANG) > 0) {}
-
- start_signal_wait();
- }
- }
-
- void start_accept()
- {
- acceptor_.async_accept(socket_,
- boost::bind(&server::handle_accept, this, _1));
- }
-
- void handle_accept(const asio::error_code& ec)
- {
- if (!ec)
- {
- // Inform the io_context that we are about to fork. The io_context cleans
- // up any internal resources, such as threads, that may interfere with
- // forking.
- io_context_.notify_fork(asio::io_context::fork_prepare);
-
- if (fork() == 0)
- {
- // Inform the io_context that the fork is finished and that this is the
- // child process. The io_context uses this opportunity to create any
- // internal file descriptors that must be private to the new process.
- io_context_.notify_fork(asio::io_context::fork_child);
-
- // The child won't be accepting new connections, so we can close the
- // acceptor. It remains open in the parent.
- acceptor_.close();
-
- // The child process is not interested in processing the SIGCHLD signal.
- signal_.cancel();
-
- start_read();
- }
- else
- {
- // Inform the io_context that the fork is finished (or failed) and that
- // this is the parent process. The io_context uses this opportunity to
- // recreate any internal resources that were cleaned up during
- // preparation for the fork.
- io_context_.notify_fork(asio::io_context::fork_parent);
-
- socket_.close();
- start_accept();
- }
- }
- else
- {
- std::cerr << "Accept error: " << ec.message() << std::endl;
- start_accept();
- }
- }
-
- void start_read()
- {
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&server::handle_read, this, _1, _2));
- }
-
- void handle_read(const asio::error_code& ec, std::size_t length)
- {
- if (!ec)
- start_write(length);
- }
-
- void start_write(std::size_t length)
- {
- asio::async_write(socket_, asio::buffer(data_, length),
- boost::bind(&server::handle_write, this, _1));
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (!ec)
- start_read();
- }
-
- asio::io_context& io_context_;
- asio::signal_set signal_;
- tcp::acceptor acceptor_;
- tcp::socket socket_;
- boost::array<char, 1024> data_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: process_per_connection <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << std::endl;
- }
-}
diff --git a/3rdparty/asio/src/examples/cpp03/http/client/.gitignore b/3rdparty/asio/src/examples/cpp03/http/client/.gitignore
deleted file mode 100644
index e80f510d76c..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/client/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_1K.html b/3rdparty/asio/src/examples/cpp03/http/doc_root/data_1K.html
deleted file mode 100644
index 1372c4dd177..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_1K.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-Copyright (c) 2003-2016 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)
--->
-
-<html>
-<body>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the<br/>
-</body>
-</html>
-
-<!-- boostinspect:nounlinked -->
diff --git a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_2K.html b/3rdparty/asio/src/examples/cpp03/http/doc_root/data_2K.html
deleted file mode 100644
index 686ce52b0a0..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_2K.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-Copyright (c) 2003-2016 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)
--->
-
-<html>
-<body>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps ove<br/>
-</body>
-</html>
-
-<!-- boostinspect:nounlinked -->
diff --git a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_4K.html b/3rdparty/asio/src/examples/cpp03/http/doc_root/data_4K.html
deleted file mode 100644
index f5db0a2bc00..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_4K.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!--
-Copyright (c) 2003-2016 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)
--->
-
-<html>
-<body>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox<br/>
-</body>
-</html>
-
-<!-- boostinspect:nounlinked -->
diff --git a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_8K.html b/3rdparty/asio/src/examples/cpp03/http/doc_root/data_8K.html
deleted file mode 100644
index 0d42f72886b..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/doc_root/data_8K.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<!--
-Copyright (c) 2003-2016 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)
--->
-
-<html>
-<body>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-The quick brown fox jumps over the lazy dog<br/>
-....
-</body>
-</html>
-
-<!-- boostinspect:nounlinked -->
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/.gitignore b/3rdparty/asio/src/examples/cpp03/http/server/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection.cpp b/3rdparty/asio/src/examples/cpp03/http/server/connection.cpp
deleted file mode 100644
index acbf637b453..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// connection.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "connection.hpp"
-#include <vector>
-#include <boost/bind.hpp>
-#include "connection_manager.hpp"
-#include "request_handler.hpp"
-
-namespace http {
-namespace server {
-
-connection::connection(asio::io_context& io_context,
- connection_manager& manager, request_handler& handler)
- : socket_(io_context),
- connection_manager_(manager),
- request_handler_(handler)
-{
-}
-
-asio::ip::tcp::socket& connection::socket()
-{
- return socket_;
-}
-
-void connection::start()
-{
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-}
-
-void connection::stop()
-{
- socket_.close();
-}
-
-void connection::handle_read(const asio::error_code& e,
- std::size_t bytes_transferred)
-{
- if (!e)
- {
- boost::tribool result;
- boost::tie(result, boost::tuples::ignore) = request_parser_.parse(
- request_, buffer_.data(), buffer_.data() + bytes_transferred);
-
- if (result)
- {
- request_handler_.handle_request(request_, reply_);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else if (!result)
- {
- reply_ = reply::stock_reply(reply::bad_request);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
- else if (e != asio::error::operation_aborted)
- {
- connection_manager_.stop(shared_from_this());
- }
-}
-
-void connection::handle_write(const asio::error_code& e)
-{
- if (!e)
- {
- // Initiate graceful connection closure.
- asio::error_code ignored_ec;
- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
- }
-
- if (e != asio::error::operation_aborted)
- {
- connection_manager_.stop(shared_from_this());
- }
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection.hpp b/3rdparty/asio/src/examples/cpp03/http/server/connection.hpp
deleted file mode 100644
index 6193b486443..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// connection.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_CONNECTION_HPP
-#define HTTP_CONNECTION_HPP
-
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include "reply.hpp"
-#include "request.hpp"
-#include "request_handler.hpp"
-#include "request_parser.hpp"
-
-namespace http {
-namespace server {
-
-class connection_manager;
-
-/// Represents a single connection from a client.
-class connection
- : public boost::enable_shared_from_this<connection>,
- private boost::noncopyable
-{
-public:
- /// Construct a connection with the given io_context.
- explicit connection(asio::io_context& io_context,
- connection_manager& manager, request_handler& handler);
-
- /// Get the socket associated with the connection.
- asio::ip::tcp::socket& socket();
-
- /// Start the first asynchronous operation for the connection.
- void start();
-
- /// Stop all asynchronous operations associated with the connection.
- void stop();
-
-private:
- /// Handle completion of a read operation.
- void handle_read(const asio::error_code& e,
- std::size_t bytes_transferred);
-
- /// Handle completion of a write operation.
- void handle_write(const asio::error_code& e);
-
- /// Socket for the connection.
- asio::ip::tcp::socket socket_;
-
- /// The manager for this connection.
- connection_manager& connection_manager_;
-
- /// The handler used to process the incoming request.
- request_handler& request_handler_;
-
- /// Buffer for incoming data.
- boost::array<char, 8192> buffer_;
-
- /// The incoming request.
- request request_;
-
- /// The parser for the incoming request.
- request_parser request_parser_;
-
- /// The reply to be sent back to the client.
- reply reply_;
-};
-
-typedef boost::shared_ptr<connection> connection_ptr;
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_CONNECTION_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp b/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp
deleted file mode 100644
index 8fc9d8f285b..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// connection_manager.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "connection_manager.hpp"
-#include <algorithm>
-#include <boost/bind.hpp>
-
-namespace http {
-namespace server {
-
-void connection_manager::start(connection_ptr c)
-{
- connections_.insert(c);
- c->start();
-}
-
-void connection_manager::stop(connection_ptr c)
-{
- connections_.erase(c);
- c->stop();
-}
-
-void connection_manager::stop_all()
-{
- std::for_each(connections_.begin(), connections_.end(),
- boost::bind(&connection::stop, _1));
- connections_.clear();
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp b/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp
deleted file mode 100644
index e67653f6a26..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// connection_manager.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_CONNECTION_MANAGER_HPP
-#define HTTP_CONNECTION_MANAGER_HPP
-
-#include <set>
-#include <boost/noncopyable.hpp>
-#include "connection.hpp"
-
-namespace http {
-namespace server {
-
-/// Manages open connections so that they may be cleanly stopped when the server
-/// needs to shut down.
-class connection_manager
- : private boost::noncopyable
-{
-public:
- /// Add the specified connection to the manager and start it.
- void start(connection_ptr c);
-
- /// Stop the specified connection.
- void stop(connection_ptr c);
-
- /// Stop all connections.
- void stop_all();
-
-private:
- /// The managed connections.
- std::set<connection_ptr> connections_;
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_CONNECTION_MANAGER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/header.hpp b/3rdparty/asio/src/examples/cpp03/http/server/header.hpp
deleted file mode 100644
index 22e3c4a7a10..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/header.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// header.hpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_HEADER_HPP
-#define HTTP_HEADER_HPP
-
-#include <string>
-
-namespace http {
-namespace server {
-
-struct header
-{
- std::string name;
- std::string value;
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_HEADER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/main.cpp b/3rdparty/asio/src/examples/cpp03/http/server/main.cpp
deleted file mode 100644
index 32d6f54dcb5..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/main.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// main.cpp
-// ~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <iostream>
-#include <string>
-#include <asio.hpp>
-#include <boost/bind.hpp>
-#include "server.hpp"
-
-int main(int argc, char* argv[])
-{
- try
- {
- // Check command line arguments.
- if (argc != 4)
- {
- std::cerr << "Usage: http_server <address> <port> <doc_root>\n";
- std::cerr << " For IPv4, try:\n";
- std::cerr << " receiver 0.0.0.0 80 .\n";
- std::cerr << " For IPv6, try:\n";
- std::cerr << " receiver 0::0 80 .\n";
- return 1;
- }
-
- // Initialise the server.
- http::server::server s(argv[1], argv[2], argv[3]);
-
- // Run the server until stopped.
- s.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp b/3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp
deleted file mode 100644
index 80fdfe30e64..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// mime_types.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "mime_types.hpp"
-
-namespace http {
-namespace server {
-namespace mime_types {
-
-struct mapping
-{
- const char* extension;
- const char* mime_type;
-} mappings[] =
-{
- { "gif", "image/gif" },
- { "htm", "text/html" },
- { "html", "text/html" },
- { "jpg", "image/jpeg" },
- { "png", "image/png" },
- { 0, 0 } // Marks end of list.
-};
-
-std::string extension_to_type(const std::string& extension)
-{
- for (mapping* m = mappings; m->extension; ++m)
- {
- if (m->extension == extension)
- {
- return m->mime_type;
- }
- }
-
- return "text/plain";
-}
-
-} // namespace mime_types
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp b/3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp
deleted file mode 100644
index 2fc0332791f..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// mime_types.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_MIME_TYPES_HPP
-#define HTTP_MIME_TYPES_HPP
-
-#include <string>
-
-namespace http {
-namespace server {
-namespace mime_types {
-
-/// Convert a file extension into a MIME type.
-std::string extension_to_type(const std::string& extension);
-
-} // namespace mime_types
-} // namespace server
-} // namespace http
-
-#endif // HTTP_MIME_TYPES_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/reply.cpp b/3rdparty/asio/src/examples/cpp03/http/server/reply.cpp
deleted file mode 100644
index f3730d3d94d..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/reply.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-//
-// reply.cpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "reply.hpp"
-#include <string>
-#include <boost/lexical_cast.hpp>
-
-namespace http {
-namespace server {
-
-namespace status_strings {
-
-const std::string ok =
- "HTTP/1.0 200 OK\r\n";
-const std::string created =
- "HTTP/1.0 201 Created\r\n";
-const std::string accepted =
- "HTTP/1.0 202 Accepted\r\n";
-const std::string no_content =
- "HTTP/1.0 204 No Content\r\n";
-const std::string multiple_choices =
- "HTTP/1.0 300 Multiple Choices\r\n";
-const std::string moved_permanently =
- "HTTP/1.0 301 Moved Permanently\r\n";
-const std::string moved_temporarily =
- "HTTP/1.0 302 Moved Temporarily\r\n";
-const std::string not_modified =
- "HTTP/1.0 304 Not Modified\r\n";
-const std::string bad_request =
- "HTTP/1.0 400 Bad Request\r\n";
-const std::string unauthorized =
- "HTTP/1.0 401 Unauthorized\r\n";
-const std::string forbidden =
- "HTTP/1.0 403 Forbidden\r\n";
-const std::string not_found =
- "HTTP/1.0 404 Not Found\r\n";
-const std::string internal_server_error =
- "HTTP/1.0 500 Internal Server Error\r\n";
-const std::string not_implemented =
- "HTTP/1.0 501 Not Implemented\r\n";
-const std::string bad_gateway =
- "HTTP/1.0 502 Bad Gateway\r\n";
-const std::string service_unavailable =
- "HTTP/1.0 503 Service Unavailable\r\n";
-
-asio::const_buffer to_buffer(reply::status_type status)
-{
- switch (status)
- {
- case reply::ok:
- return asio::buffer(ok);
- case reply::created:
- return asio::buffer(created);
- case reply::accepted:
- return asio::buffer(accepted);
- case reply::no_content:
- return asio::buffer(no_content);
- case reply::multiple_choices:
- return asio::buffer(multiple_choices);
- case reply::moved_permanently:
- return asio::buffer(moved_permanently);
- case reply::moved_temporarily:
- return asio::buffer(moved_temporarily);
- case reply::not_modified:
- return asio::buffer(not_modified);
- case reply::bad_request:
- return asio::buffer(bad_request);
- case reply::unauthorized:
- return asio::buffer(unauthorized);
- case reply::forbidden:
- return asio::buffer(forbidden);
- case reply::not_found:
- return asio::buffer(not_found);
- case reply::internal_server_error:
- return asio::buffer(internal_server_error);
- case reply::not_implemented:
- return asio::buffer(not_implemented);
- case reply::bad_gateway:
- return asio::buffer(bad_gateway);
- case reply::service_unavailable:
- return asio::buffer(service_unavailable);
- default:
- return asio::buffer(internal_server_error);
- }
-}
-
-} // namespace status_strings
-
-namespace misc_strings {
-
-const char name_value_separator[] = { ':', ' ' };
-const char crlf[] = { '\r', '\n' };
-
-} // namespace misc_strings
-
-std::vector<asio::const_buffer> reply::to_buffers()
-{
- std::vector<asio::const_buffer> buffers;
- buffers.push_back(status_strings::to_buffer(status));
- for (std::size_t i = 0; i < headers.size(); ++i)
- {
- header& h = headers[i];
- buffers.push_back(asio::buffer(h.name));
- buffers.push_back(asio::buffer(misc_strings::name_value_separator));
- buffers.push_back(asio::buffer(h.value));
- buffers.push_back(asio::buffer(misc_strings::crlf));
- }
- buffers.push_back(asio::buffer(misc_strings::crlf));
- buffers.push_back(asio::buffer(content));
- return buffers;
-}
-
-namespace stock_replies {
-
-const char ok[] = "";
-const char created[] =
- "<html>"
- "<head><title>Created</title></head>"
- "<body><h1>201 Created</h1></body>"
- "</html>";
-const char accepted[] =
- "<html>"
- "<head><title>Accepted</title></head>"
- "<body><h1>202 Accepted</h1></body>"
- "</html>";
-const char no_content[] =
- "<html>"
- "<head><title>No Content</title></head>"
- "<body><h1>204 Content</h1></body>"
- "</html>";
-const char multiple_choices[] =
- "<html>"
- "<head><title>Multiple Choices</title></head>"
- "<body><h1>300 Multiple Choices</h1></body>"
- "</html>";
-const char moved_permanently[] =
- "<html>"
- "<head><title>Moved Permanently</title></head>"
- "<body><h1>301 Moved Permanently</h1></body>"
- "</html>";
-const char moved_temporarily[] =
- "<html>"
- "<head><title>Moved Temporarily</title></head>"
- "<body><h1>302 Moved Temporarily</h1></body>"
- "</html>";
-const char not_modified[] =
- "<html>"
- "<head><title>Not Modified</title></head>"
- "<body><h1>304 Not Modified</h1></body>"
- "</html>";
-const char bad_request[] =
- "<html>"
- "<head><title>Bad Request</title></head>"
- "<body><h1>400 Bad Request</h1></body>"
- "</html>";
-const char unauthorized[] =
- "<html>"
- "<head><title>Unauthorized</title></head>"
- "<body><h1>401 Unauthorized</h1></body>"
- "</html>";
-const char forbidden[] =
- "<html>"
- "<head><title>Forbidden</title></head>"
- "<body><h1>403 Forbidden</h1></body>"
- "</html>";
-const char not_found[] =
- "<html>"
- "<head><title>Not Found</title></head>"
- "<body><h1>404 Not Found</h1></body>"
- "</html>";
-const char internal_server_error[] =
- "<html>"
- "<head><title>Internal Server Error</title></head>"
- "<body><h1>500 Internal Server Error</h1></body>"
- "</html>";
-const char not_implemented[] =
- "<html>"
- "<head><title>Not Implemented</title></head>"
- "<body><h1>501 Not Implemented</h1></body>"
- "</html>";
-const char bad_gateway[] =
- "<html>"
- "<head><title>Bad Gateway</title></head>"
- "<body><h1>502 Bad Gateway</h1></body>"
- "</html>";
-const char service_unavailable[] =
- "<html>"
- "<head><title>Service Unavailable</title></head>"
- "<body><h1>503 Service Unavailable</h1></body>"
- "</html>";
-
-std::string to_string(reply::status_type status)
-{
- switch (status)
- {
- case reply::ok:
- return ok;
- case reply::created:
- return created;
- case reply::accepted:
- return accepted;
- case reply::no_content:
- return no_content;
- case reply::multiple_choices:
- return multiple_choices;
- case reply::moved_permanently:
- return moved_permanently;
- case reply::moved_temporarily:
- return moved_temporarily;
- case reply::not_modified:
- return not_modified;
- case reply::bad_request:
- return bad_request;
- case reply::unauthorized:
- return unauthorized;
- case reply::forbidden:
- return forbidden;
- case reply::not_found:
- return not_found;
- case reply::internal_server_error:
- return internal_server_error;
- case reply::not_implemented:
- return not_implemented;
- case reply::bad_gateway:
- return bad_gateway;
- case reply::service_unavailable:
- return service_unavailable;
- default:
- return internal_server_error;
- }
-}
-
-} // namespace stock_replies
-
-reply reply::stock_reply(reply::status_type status)
-{
- reply rep;
- rep.status = status;
- rep.content = stock_replies::to_string(status);
- rep.headers.resize(2);
- rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
- rep.headers[1].name = "Content-Type";
- rep.headers[1].value = "text/html";
- return rep;
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/reply.hpp b/3rdparty/asio/src/examples/cpp03/http/server/reply.hpp
deleted file mode 100644
index 5189ac4363e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/reply.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// reply.hpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_REPLY_HPP
-#define HTTP_REPLY_HPP
-
-#include <string>
-#include <vector>
-#include <asio.hpp>
-#include "header.hpp"
-
-namespace http {
-namespace server {
-
-/// A reply to be sent to a client.
-struct reply
-{
- /// The status of the reply.
- enum status_type
- {
- ok = 200,
- created = 201,
- accepted = 202,
- no_content = 204,
- multiple_choices = 300,
- moved_permanently = 301,
- moved_temporarily = 302,
- not_modified = 304,
- bad_request = 400,
- unauthorized = 401,
- forbidden = 403,
- not_found = 404,
- internal_server_error = 500,
- not_implemented = 501,
- bad_gateway = 502,
- service_unavailable = 503
- } status;
-
- /// The headers to be included in the reply.
- std::vector<header> headers;
-
- /// The content to be sent in the reply.
- std::string content;
-
- /// Convert the reply into a vector of buffers. The buffers do not own the
- /// underlying memory blocks, therefore the reply object must remain valid and
- /// not be changed until the write operation has completed.
- std::vector<asio::const_buffer> to_buffers();
-
- /// Get a stock reply.
- static reply stock_reply(status_type status);
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_REPLY_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp b/3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp
deleted file mode 100644
index 1201ef109d2..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// request_handler.cpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "request_handler.hpp"
-#include <fstream>
-#include <sstream>
-#include <string>
-#include <boost/lexical_cast.hpp>
-#include "mime_types.hpp"
-#include "reply.hpp"
-#include "request.hpp"
-
-namespace http {
-namespace server {
-
-request_handler::request_handler(const std::string& doc_root)
- : doc_root_(doc_root)
-{
-}
-
-void request_handler::handle_request(const request& req, reply& rep)
-{
- // Decode url to path.
- std::string request_path;
- if (!url_decode(req.uri, request_path))
- {
- rep = reply::stock_reply(reply::bad_request);
- return;
- }
-
- // Request path must be absolute and not contain "..".
- if (request_path.empty() || request_path[0] != '/'
- || request_path.find("..") != std::string::npos)
- {
- rep = reply::stock_reply(reply::bad_request);
- return;
- }
-
- // If path ends in slash (i.e. is a directory) then add "index.html".
- if (request_path[request_path.size() - 1] == '/')
- {
- request_path += "index.html";
- }
-
- // Determine the file extension.
- std::size_t last_slash_pos = request_path.find_last_of("/");
- std::size_t last_dot_pos = request_path.find_last_of(".");
- std::string extension;
- if (last_dot_pos != std::string::npos && last_dot_pos > last_slash_pos)
- {
- extension = request_path.substr(last_dot_pos + 1);
- }
-
- // Open the file to send back.
- std::string full_path = doc_root_ + request_path;
- std::ifstream is(full_path.c_str(), std::ios::in | std::ios::binary);
- if (!is)
- {
- rep = reply::stock_reply(reply::not_found);
- return;
- }
-
- // Fill out the reply to be sent to the client.
- rep.status = reply::ok;
- char buf[512];
- while (is.read(buf, sizeof(buf)).gcount() > 0)
- rep.content.append(buf, is.gcount());
- rep.headers.resize(2);
- rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
- rep.headers[1].name = "Content-Type";
- rep.headers[1].value = mime_types::extension_to_type(extension);
-}
-
-bool request_handler::url_decode(const std::string& in, std::string& out)
-{
- out.clear();
- out.reserve(in.size());
- for (std::size_t i = 0; i < in.size(); ++i)
- {
- if (in[i] == '%')
- {
- if (i + 3 <= in.size())
- {
- int value = 0;
- std::istringstream is(in.substr(i + 1, 2));
- if (is >> std::hex >> value)
- {
- out += static_cast<char>(value);
- i += 2;
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
- else if (in[i] == '+')
- {
- out += ' ';
- }
- else
- {
- out += in[i];
- }
- }
- return true;
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp b/3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp
deleted file mode 100644
index 56a16dd395a..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// request_handler.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_REQUEST_HANDLER_HPP
-#define HTTP_REQUEST_HANDLER_HPP
-
-#include <string>
-#include <boost/noncopyable.hpp>
-
-namespace http {
-namespace server {
-
-struct reply;
-struct request;
-
-/// The common handler for all incoming requests.
-class request_handler
- : private boost::noncopyable
-{
-public:
- /// Construct with a directory containing files to be served.
- explicit request_handler(const std::string& doc_root);
-
- /// Handle a request and produce a reply.
- void handle_request(const request& req, reply& rep);
-
-private:
- /// The directory containing the files to be served.
- std::string doc_root_;
-
- /// Perform URL-decoding on a string. Returns false if the encoding was
- /// invalid.
- static bool url_decode(const std::string& in, std::string& out);
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_REQUEST_HANDLER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/server.cpp b/3rdparty/asio/src/examples/cpp03/http/server/server.cpp
deleted file mode 100644
index 89e19d08d42..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/server.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "server.hpp"
-#include <boost/bind.hpp>
-#include <signal.h>
-
-namespace http {
-namespace server {
-
-server::server(const std::string& address, const std::string& port,
- const std::string& doc_root)
- : io_context_(),
- signals_(io_context_),
- acceptor_(io_context_),
- connection_manager_(),
- new_connection_(),
- request_handler_(doc_root)
-{
- // Register to handle the signals that indicate when the server should exit.
- // It is safe to register for the same signal multiple times in a program,
- // provided all registration for the specified signal is made through Asio.
- signals_.add(SIGINT);
- signals_.add(SIGTERM);
-#if defined(SIGQUIT)
- signals_.add(SIGQUIT);
-#endif // defined(SIGQUIT)
- signals_.async_wait(boost::bind(&server::handle_stop, this));
-
- // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
- asio::ip::tcp::resolver resolver(io_context_);
- asio::ip::tcp::endpoint endpoint =
- *resolver.resolve(address, port).begin();
- acceptor_.open(endpoint.protocol());
- acceptor_.set_option(asio::ip::tcp::acceptor::reuse_address(true));
- acceptor_.bind(endpoint);
- acceptor_.listen();
-
- start_accept();
-}
-
-void server::run()
-{
- // The io_context::run() call will block until all asynchronous operations
- // have finished. While the server is running, there is always at least one
- // asynchronous operation outstanding: the asynchronous accept call waiting
- // for new incoming connections.
- io_context_.run();
-}
-
-void server::start_accept()
-{
- new_connection_.reset(new connection(io_context_,
- connection_manager_, request_handler_));
- acceptor_.async_accept(new_connection_->socket(),
- boost::bind(&server::handle_accept, this,
- asio::placeholders::error));
-}
-
-void server::handle_accept(const asio::error_code& e)
-{
- // Check whether the server was stopped by a signal before this completion
- // handler had a chance to run.
- if (!acceptor_.is_open())
- {
- return;
- }
-
- if (!e)
- {
- connection_manager_.start(new_connection_);
- }
-
- start_accept();
-}
-
-void server::handle_stop()
-{
- // The server is stopped by cancelling all outstanding asynchronous
- // operations. Once all operations have finished the io_context::run() call
- // will exit.
- acceptor_.close();
- connection_manager_.stop_all();
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/server.hpp b/3rdparty/asio/src/examples/cpp03/http/server/server.hpp
deleted file mode 100644
index 8b0b1a23296..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/server.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// server.hpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_SERVER_HPP
-#define HTTP_SERVER_HPP
-
-#include <asio.hpp>
-#include <string>
-#include <boost/noncopyable.hpp>
-#include "connection.hpp"
-#include "connection_manager.hpp"
-#include "request_handler.hpp"
-
-namespace http {
-namespace server {
-
-/// The top-level class of the HTTP server.
-class server
- : private boost::noncopyable
-{
-public:
- /// Construct the server to listen on the specified TCP address and port, and
- /// serve up files from the given directory.
- explicit server(const std::string& address, const std::string& port,
- const std::string& doc_root);
-
- /// Run the server's io_context loop.
- void run();
-
-private:
- /// Initiate an asynchronous accept operation.
- void start_accept();
-
- /// Handle completion of an asynchronous accept operation.
- void handle_accept(const asio::error_code& e);
-
- /// Handle a request to stop the server.
- void handle_stop();
-
- /// The io_context used to perform asynchronous operations.
- asio::io_context io_context_;
-
- /// The signal_set is used to register for process termination notifications.
- asio::signal_set signals_;
-
- /// Acceptor used to listen for incoming connections.
- asio::ip::tcp::acceptor acceptor_;
-
- /// The connection manager which owns all live connections.
- connection_manager connection_manager_;
-
- /// The next connection to be accepted.
- connection_ptr new_connection_;
-
- /// The handler for all incoming requests.
- request_handler request_handler_;
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_SERVER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/.gitignore b/3rdparty/asio/src/examples/cpp03/http/server2/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server2/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp b/3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp
deleted file mode 100644
index 81f4a102217..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// connection.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "connection.hpp"
-#include <vector>
-#include <boost/bind.hpp>
-#include "request_handler.hpp"
-
-namespace http {
-namespace server2 {
-
-connection::connection(asio::io_context& io_context,
- request_handler& handler)
- : socket_(io_context),
- request_handler_(handler)
-{
-}
-
-asio::ip::tcp::socket& connection::socket()
-{
- return socket_;
-}
-
-void connection::start()
-{
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-}
-
-void connection::handle_read(const asio::error_code& e,
- std::size_t bytes_transferred)
-{
- if (!e)
- {
- boost::tribool result;
- boost::tie(result, boost::tuples::ignore) = request_parser_.parse(
- request_, buffer_.data(), buffer_.data() + bytes_transferred);
-
- if (result)
- {
- request_handler_.handle_request(request_, reply_);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else if (!result)
- {
- reply_ = reply::stock_reply(reply::bad_request);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- // If an error occurs then no new asynchronous operations are started. This
- // means that all shared_ptr references to the connection object will
- // disappear and the object will be destroyed automatically after this
- // handler returns. The connection class's destructor closes the socket.
-}
-
-void connection::handle_write(const asio::error_code& e)
-{
- if (!e)
- {
- // Initiate graceful connection closure.
- asio::error_code ignored_ec;
- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
- }
-
- // No new asynchronous operations are started. This means that all shared_ptr
- // references to the connection object will disappear and the object will be
- // destroyed automatically after this handler returns. The connection class's
- // destructor closes the socket.
-}
-
-} // namespace server2
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/.gitignore b/3rdparty/asio/src/examples/cpp03/http/server3/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server3/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp b/3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp
deleted file mode 100644
index 5db960a9109..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// connection.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "connection.hpp"
-#include <vector>
-#include <boost/bind.hpp>
-#include "request_handler.hpp"
-
-namespace http {
-namespace server3 {
-
-connection::connection(asio::io_context& io_context,
- request_handler& handler)
- : strand_(io_context),
- socket_(io_context),
- request_handler_(handler)
-{
-}
-
-asio::ip::tcp::socket& connection::socket()
-{
- return socket_;
-}
-
-void connection::start()
-{
- socket_.async_read_some(asio::buffer(buffer_),
- asio::bind_executor(strand_,
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred)));
-}
-
-void connection::handle_read(const asio::error_code& e,
- std::size_t bytes_transferred)
-{
- if (!e)
- {
- boost::tribool result;
- boost::tie(result, boost::tuples::ignore) = request_parser_.parse(
- request_, buffer_.data(), buffer_.data() + bytes_transferred);
-
- if (result)
- {
- request_handler_.handle_request(request_, reply_);
- asio::async_write(socket_, reply_.to_buffers(),
- asio::bind_executor(strand_,
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error)));
- }
- else if (!result)
- {
- reply_ = reply::stock_reply(reply::bad_request);
- asio::async_write(socket_, reply_.to_buffers(),
- asio::bind_executor(strand_,
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error)));
- }
- else
- {
- socket_.async_read_some(asio::buffer(buffer_),
- asio::bind_executor(strand_,
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred)));
- }
- }
-
- // If an error occurs then no new asynchronous operations are started. This
- // means that all shared_ptr references to the connection object will
- // disappear and the object will be destroyed automatically after this
- // handler returns. The connection class's destructor closes the socket.
-}
-
-void connection::handle_write(const asio::error_code& e)
-{
- if (!e)
- {
- // Initiate graceful connection closure.
- asio::error_code ignored_ec;
- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
- }
-
- // No new asynchronous operations are started. This means that all shared_ptr
- // references to the connection object will disappear and the object will be
- // destroyed automatically after this handler returns. The connection class's
- // destructor closes the socket.
-}
-
-} // namespace server3
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/.gitignore b/3rdparty/asio/src/examples/cpp03/http/server4/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/request.hpp b/3rdparty/asio/src/examples/cpp03/http/server4/request.hpp
deleted file mode 100644
index 43947d7f09e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/request.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// request.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_SERVER4_REQUEST_HPP
-#define HTTP_SERVER4_REQUEST_HPP
-
-#include <string>
-#include <vector>
-#include "header.hpp"
-
-namespace http {
-namespace server4 {
-
-/// A request received from a client.
-struct request
-{
- /// The request method, e.g. "GET", "POST".
- std::string method;
-
- /// The requested URI, such as a path to a file.
- std::string uri;
-
- /// Major version number, usually 1.
- int http_version_major;
-
- /// Minor version number, usually 0 or 1.
- int http_version_minor;
-
- /// The headers included with the request.
- std::vector<header> headers;
-
- /// The optional content sent with the request.
- std::string content;
-};
-
-} // namespace server4
-} // namespace http
-
-#endif // HTTP_SERVER4_REQUEST_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp b/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp
deleted file mode 100644
index 0ec31ad3939..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-//
-// request_parser.cpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "request_parser.hpp"
-#include <algorithm>
-#include <cctype>
-#include <boost/lexical_cast.hpp>
-#include "request.hpp"
-
-namespace http {
-namespace server4 {
-
-// Enable the pseudo-keywords reenter, yield and fork.
-#include <asio/yield.hpp>
-
-std::string request_parser::content_length_name_ = "Content-Length";
-
-boost::tribool request_parser::consume(request& req, char c)
-{
- reenter (this)
- {
- req.method.clear();
- req.uri.clear();
- req.http_version_major = 0;
- req.http_version_minor = 0;
- req.headers.clear();
- req.content.clear();
- content_length_ = 0;
-
- // Request method.
- while (is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != ' ')
- {
- req.method.push_back(c);
- yield return boost::indeterminate;
- }
- if (req.method.empty())
- return false;
-
- // Space.
- if (c != ' ') return false;
- yield return boost::indeterminate;
-
- // URI.
- while (!is_ctl(c) && c != ' ')
- {
- req.uri.push_back(c);
- yield return boost::indeterminate;
- }
- if (req.uri.empty()) return false;
-
- // Space.
- if (c != ' ') return false;
- yield return boost::indeterminate;
-
- // HTTP protocol identifier.
- if (c != 'H') return false;
- yield return boost::indeterminate;
- if (c != 'T') return false;
- yield return boost::indeterminate;
- if (c != 'T') return false;
- yield return boost::indeterminate;
- if (c != 'P') return false;
- yield return boost::indeterminate;
-
- // Slash.
- if (c != '/') return false;
- yield return boost::indeterminate;
-
- // Major version number.
- if (!is_digit(c)) return false;
- while (is_digit(c))
- {
- req.http_version_major = req.http_version_major * 10 + c - '0';
- yield return boost::indeterminate;
- }
-
- // Dot.
- if (c != '.') return false;
- yield return boost::indeterminate;
-
- // Minor version number.
- if (!is_digit(c)) return false;
- while (is_digit(c))
- {
- req.http_version_minor = req.http_version_minor * 10 + c - '0';
- yield return boost::indeterminate;
- }
-
- // CRLF.
- if (c != '\r') return false;
- yield return boost::indeterminate;
- if (c != '\n') return false;
- yield return boost::indeterminate;
-
- // Headers.
- while ((is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != '\r')
- || (c == ' ' || c == '\t'))
- {
- if (c == ' ' || c == '\t')
- {
- // Leading whitespace. Must be continuation of previous header's value.
- if (req.headers.empty()) return false;
- while (c == ' ' || c == '\t')
- yield return boost::indeterminate;
- }
- else
- {
- // Start the next header.
- req.headers.push_back(header());
-
- // Header name.
- while (is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != ':')
- {
- req.headers.back().name.push_back(c);
- yield return boost::indeterminate;
- }
-
- // Colon and space separates the header name from the header value.
- if (c != ':') return false;
- yield return boost::indeterminate;
- if (c != ' ') return false;
- yield return boost::indeterminate;
- }
-
- // Header value.
- while (is_char(c) && !is_ctl(c) && c != '\r')
- {
- req.headers.back().value.push_back(c);
- yield return boost::indeterminate;
- }
-
- // CRLF.
- if (c != '\r') return false;
- yield return boost::indeterminate;
- if (c != '\n') return false;
- yield return boost::indeterminate;
- }
-
- // CRLF.
- if (c != '\r') return false;
- yield return boost::indeterminate;
- if (c != '\n') return false;
-
- // Check for optional Content-Length header.
- for (std::size_t i = 0; i < req.headers.size(); ++i)
- {
- if (headers_equal(req.headers[i].name, content_length_name_))
- {
- try
- {
- content_length_ =
- boost::lexical_cast<std::size_t>(req.headers[i].value);
- }
- catch (boost::bad_lexical_cast&)
- {
- return false;
- }
- }
- }
-
- // Content.
- while (req.content.size() < content_length_)
- {
- yield return boost::indeterminate;
- req.content.push_back(c);
- }
- }
-
- return true;
-}
-
-// Disable the pseudo-keywords reenter, yield and fork.
-#include <asio/unyield.hpp>
-
-bool request_parser::is_char(int c)
-{
- return c >= 0 && c <= 127;
-}
-
-bool request_parser::is_ctl(int c)
-{
- return (c >= 0 && c <= 31) || (c == 127);
-}
-
-bool request_parser::is_tspecial(int c)
-{
- switch (c)
- {
- case '(': case ')': case '<': case '>': case '@':
- case ',': case ';': case ':': case '\\': case '"':
- case '/': case '[': case ']': case '?': case '=':
- case '{': case '}': case ' ': case '\t':
- return true;
- default:
- return false;
- }
-}
-
-bool request_parser::is_digit(int c)
-{
- return c >= '0' && c <= '9';
-}
-
-bool request_parser::tolower_compare(char a, char b)
-{
- return std::tolower(a) == std::tolower(b);
-}
-
-bool request_parser::headers_equal(const std::string& a, const std::string& b)
-{
- if (a.length() != b.length())
- return false;
-
- return std::equal(a.begin(), a.end(), b.begin(),
- &request_parser::tolower_compare);
-}
-
-} // namespace server4
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp b/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp
deleted file mode 100644
index a61356e36a6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// request_parser.hpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 HTTP_SERVER4_REQUEST_PARSER_HPP
-#define HTTP_SERVER4_REQUEST_PARSER_HPP
-
-#include <string>
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <asio/coroutine.hpp>
-
-namespace http {
-namespace server4 {
-
-struct request;
-
-/// Parser for incoming requests.
-class request_parser : asio::coroutine
-{
-public:
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
- template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
- InputIterator begin, InputIterator end)
- {
- while (begin != end)
- {
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
- }
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
- }
-
-private:
- /// The name of the content length header.
- static std::string content_length_name_;
-
- /// Content length as decoded from headers. Defaults to 0.
- std::size_t content_length_;
-
- /// Handle the next character of input.
- boost::tribool consume(request& req, char input);
-
- /// Check if a byte is an HTTP character.
- static bool is_char(int c);
-
- /// Check if a byte is an HTTP control character.
- static bool is_ctl(int c);
-
- /// Check if a byte is defined as an HTTP tspecial character.
- static bool is_tspecial(int c);
-
- /// Check if a byte is a digit.
- static bool is_digit(int c);
-
- /// Check if two characters are equal, without regard to case.
- static bool tolower_compare(char a, char b);
-
- /// Check whether the two request header names match.
- bool headers_equal(const std::string& a, const std::string& b);
-};
-
-} // namespace server4
-} // namespace http
-
-#endif // HTTP_SERVER4_REQUEST_PARSER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/.gitignore b/3rdparty/asio/src/examples/cpp03/icmp/.gitignore
deleted file mode 100644
index 62ea912e2e4..00000000000
--- a/3rdparty/asio/src/examples/cpp03/icmp/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-ping
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/invocation/.gitignore b/3rdparty/asio/src/examples/cpp03/invocation/.gitignore
deleted file mode 100644
index e5876b7811a..00000000000
--- a/3rdparty/asio/src/examples/cpp03/invocation/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-prioritised_handlers
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp b/3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
deleted file mode 100644
index 73897946966..00000000000
--- a/3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-//
-// prioritised_handlers.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "asio.hpp"
-#include <boost/function.hpp>
-#include <iostream>
-#include <queue>
-
-using asio::ip::tcp;
-
-class handler_priority_queue
-{
-public:
- void add(int priority, boost::function<void()> function)
- {
- handlers_.push(queued_handler(priority, function));
- }
-
- void execute_all()
- {
- while (!handlers_.empty())
- {
- queued_handler handler = handlers_.top();
- handler.execute();
- handlers_.pop();
- }
- }
-
- // A generic wrapper class for handlers to allow the invocation to be hooked.
- template <typename Handler>
- class wrapped_handler
- {
- public:
- wrapped_handler(handler_priority_queue& q, int p, Handler h)
- : queue_(q), priority_(p), handler_(h)
- {
- }
-
- void operator()()
- {
- handler_();
- }
-
- template <typename Arg1>
- void operator()(Arg1 arg1)
- {
- handler_(arg1);
- }
-
- template <typename Arg1, typename Arg2>
- void operator()(Arg1 arg1, Arg2 arg2)
- {
- handler_(arg1, arg2);
- }
-
- //private:
- handler_priority_queue& queue_;
- int priority_;
- Handler handler_;
- };
-
- template <typename Handler>
- wrapped_handler<Handler> wrap(int priority, Handler handler)
- {
- return wrapped_handler<Handler>(*this, priority, handler);
- }
-
-private:
- class queued_handler
- {
- public:
- queued_handler(int p, boost::function<void()> f)
- : priority_(p), function_(f)
- {
- }
-
- void execute()
- {
- function_();
- }
-
- friend bool operator<(const queued_handler& a,
- const queued_handler& b)
- {
- return a.priority_ < b.priority_;
- }
-
- private:
- int priority_;
- boost::function<void()> function_;
- };
-
- std::priority_queue<queued_handler> handlers_;
-};
-
-// Custom invocation hook for wrapped handlers.
-template <typename Function, typename Handler>
-void asio_handler_invoke(Function f,
- handler_priority_queue::wrapped_handler<Handler>* h)
-{
- h->queue_.add(h->priority_, f);
-}
-
-//----------------------------------------------------------------------
-
-void high_priority_handler(const asio::error_code& /*ec*/)
-{
- std::cout << "High priority handler\n";
-}
-
-void middle_priority_handler(const asio::error_code& /*ec*/)
-{
- std::cout << "Middle priority handler\n";
-}
-
-void low_priority_handler()
-{
- std::cout << "Low priority handler\n";
-}
-
-int main()
-{
- asio::io_context io_context;
-
- handler_priority_queue pri_queue;
-
- // Post a completion handler to be run immediately.
- asio::post(io_context, pri_queue.wrap(0, low_priority_handler));
-
- // Start an asynchronous accept that will complete immediately.
- tcp::endpoint endpoint(asio::ip::address_v4::loopback(), 0);
- tcp::acceptor acceptor(io_context, endpoint);
- tcp::socket server_socket(io_context);
- acceptor.async_accept(server_socket,
- pri_queue.wrap(100, high_priority_handler));
- tcp::socket client_socket(io_context);
- client_socket.connect(acceptor.local_endpoint());
-
- // Set a deadline timer to expire immediately.
- asio::deadline_timer timer(io_context);
- timer.expires_at(boost::posix_time::neg_infin);
- timer.async_wait(pri_queue.wrap(42, middle_priority_handler));
-
- while (io_context.run_one())
- {
- // The custom invocation hook adds the handlers to the priority queue
- // rather than executing them from within the poll_one() call.
- while (io_context.poll_one())
- ;
-
- pri_queue.execute_all();
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/.gitignore b/3rdparty/asio/src/examples/cpp03/iostreams/.gitignore
deleted file mode 100644
index bc2b4f8f7fe..00000000000
--- a/3rdparty/asio/src/examples/cpp03/iostreams/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_client
-*_server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp b/3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp
deleted file mode 100644
index 247df0f37e4..00000000000
--- a/3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// http_client.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <iostream>
-#include <istream>
-#include <ostream>
-#include <string>
-#include <asio/ip/tcp.hpp>
-
-using asio::ip::tcp;
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cout << "Usage: http_client <server> <path>\n";
- std::cout << "Example:\n";
- std::cout << " http_client www.boost.org /LICENSE_1_0.txt\n";
- return 1;
- }
-
- asio::ip::tcp::iostream s;
-
- // The entire sequence of I/O operations must complete within 60 seconds.
- // If an expiry occurs, the socket is automatically closed and the stream
- // becomes bad.
- s.expires_after(boost::posix_time::seconds(60));
-
- // Establish a connection to the server.
- s.connect(argv[1], "http");
- if (!s)
- {
- std::cout << "Unable to connect: " << s.error().message() << "\n";
- return 1;
- }
-
- // Send the request. We specify the "Connection: close" header so that the
- // server will close the socket after transmitting the response. This will
- // allow us to treat all data up until the EOF as the content.
- s << "GET " << argv[2] << " HTTP/1.0\r\n";
- s << "Host: " << argv[1] << "\r\n";
- s << "Accept: */*\r\n";
- s << "Connection: close\r\n\r\n";
-
- // By default, the stream is tied with itself. This means that the stream
- // automatically flush the buffered output before attempting a read. It is
- // not necessary not explicitly flush the stream at this point.
-
- // Check that response is OK.
- std::string http_version;
- s >> http_version;
- unsigned int status_code;
- s >> status_code;
- std::string status_message;
- std::getline(s, status_message);
- if (!s || http_version.substr(0, 5) != "HTTP/")
- {
- std::cout << "Invalid response\n";
- return 1;
- }
- if (status_code != 200)
- {
- std::cout << "Response returned with status code " << status_code << "\n";
- return 1;
- }
-
- // Process the response headers, which are terminated by a blank line.
- std::string header;
- while (std::getline(s, header) && header != "\r")
- std::cout << header << "\n";
- std::cout << "\n";
-
- // Write the remaining data to output.
- std::cout << s.rdbuf();
- }
- catch (std::exception& e)
- {
- std::cout << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/local/.gitignore b/3rdparty/asio/src/examples/cpp03/local/.gitignore
deleted file mode 100644
index 688277b48d0..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-connect_pair
-stream_server
-stream_client
-iostream_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp b/3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp
deleted file mode 100644
index 92e0ae866d5..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// connect_pair.cpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <iostream>
-#include <string>
-#include <cctype>
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-
-#if defined(ASIO_HAS_LOCAL_SOCKETS)
-
-using asio::local::stream_protocol;
-
-class uppercase_filter
-{
-public:
- uppercase_filter(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- stream_protocol::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- // Wait for request.
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&uppercase_filter::handle_read,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
-private:
- void handle_read(const asio::error_code& ec, std::size_t size)
- {
- if (!ec)
- {
- // Compute result.
- for (std::size_t i = 0; i < size; ++i)
- data_[i] = std::toupper(data_[i]);
-
- // Send result.
- asio::async_write(socket_, asio::buffer(data_, size),
- boost::bind(&uppercase_filter::handle_write,
- this, asio::placeholders::error));
- }
- else
- {
- throw asio::system_error(ec);
- }
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (!ec)
- {
- // Wait for request.
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&uppercase_filter::handle_read,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- throw asio::system_error(ec);
- }
- }
-
- stream_protocol::socket socket_;
- boost::array<char, 512> data_;
-};
-
-void run(asio::io_context* io_context)
-{
- try
- {
- io_context->run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception in thread: " << e.what() << "\n";
- std::exit(1);
- }
-}
-
-int main()
-{
- try
- {
- asio::io_context io_context;
-
- // Create filter and establish a connection to it.
- uppercase_filter filter(io_context);
- stream_protocol::socket socket(io_context);
- asio::local::connect_pair(socket, filter.socket());
- filter.start();
-
- // The io_context runs in a background thread to perform filtering.
- asio::thread thread(boost::bind(run, &io_context));
-
- for (;;)
- {
- // Collect request from user.
- std::cout << "Enter a string: ";
- std::string request;
- std::getline(std::cin, request);
-
- // Send request to filter.
- asio::write(socket, asio::buffer(request));
-
- // Wait for reply from filter.
- std::vector<char> reply(request.size());
- asio::read(socket, asio::buffer(reply));
-
- // Show reply to user.
- std::cout << "Result: ";
- std::cout.write(&reply[0], request.size());
- std::cout << std::endl;
- }
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- std::exit(1);
- }
-}
-
-#else // defined(ASIO_HAS_LOCAL_SOCKETS)
-# error Local sockets not available on this platform.
-#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/local/stream_server.cpp b/3rdparty/asio/src/examples/cpp03/local/stream_server.cpp
deleted file mode 100644
index 0bfe2788cae..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/stream_server.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// stream_server.cpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdio>
-#include <iostream>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/shared_ptr.hpp>
-#include "asio.hpp"
-
-#if defined(ASIO_HAS_LOCAL_SOCKETS)
-
-using asio::local::stream_protocol;
-
-class session
- : public boost::enable_shared_from_this<session>
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- stream_protocol::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- boost::bind(&session::handle_write,
- shared_from_this(),
- asio::placeholders::error));
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
-private:
- // The socket used to communicate with the client.
- stream_protocol::socket socket_;
-
- // Buffer used to store data received from the client.
- boost::array<char, 1024> data_;
-};
-
-typedef boost::shared_ptr<session> session_ptr;
-
-class server
-{
-public:
- server(asio::io_context& io_context, const std::string& file)
- : io_context_(io_context),
- acceptor_(io_context, stream_protocol::endpoint(file))
- {
- session_ptr new_session(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session_ptr new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
-
- new_session.reset(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
-private:
- asio::io_context& io_context_;
- stream_protocol::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: stream_server <file>\n";
- std::cerr << "*** WARNING: existing file is removed ***\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- std::remove(argv[1]);
- server s(io_context, argv[1]);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
-
-#else // defined(ASIO_HAS_LOCAL_SOCKETS)
-# error Local sockets not available on this platform.
-#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/multicast/.gitignore b/3rdparty/asio/src/examples/cpp03/multicast/.gitignore
deleted file mode 100644
index 0c30ebdd7df..00000000000
--- a/3rdparty/asio/src/examples/cpp03/multicast/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-receiver
-sender
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/nonblocking/.gitignore b/3rdparty/asio/src/examples/cpp03/nonblocking/.gitignore
deleted file mode 100644
index 760e0dcebb4..00000000000
--- a/3rdparty/asio/src/examples/cpp03/nonblocking/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-third_party_lib
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp b/3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
deleted file mode 100644
index 8ec06f6034d..00000000000
--- a/3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-//
-// third_party_lib.cpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <iostream>
-
-using asio::ip::tcp;
-
-namespace third_party_lib {
-
-// Simulation of a third party library that wants to perform read and write
-// operations directly on a socket. It needs to be polled to determine whether
-// it requires a read or write operation, and notified when the socket is ready
-// for reading or writing.
-class session
-{
-public:
- session(tcp::socket& socket)
- : socket_(socket),
- state_(reading)
- {
- }
-
- // Returns true if the third party library wants to be notified when the
- // socket is ready for reading.
- bool want_read() const
- {
- return state_ == reading;
- }
-
- // Notify that third party library that it should perform its read operation.
- void do_read(asio::error_code& ec)
- {
- if (std::size_t len = socket_.read_some(asio::buffer(data_), ec))
- {
- write_buffer_ = asio::buffer(data_, len);
- state_ = writing;
- }
- }
-
- // Returns true if the third party library wants to be notified when the
- // socket is ready for writing.
- bool want_write() const
- {
- return state_ == writing;
- }
-
- // Notify that third party library that it should perform its write operation.
- void do_write(asio::error_code& ec)
- {
- if (std::size_t len = socket_.write_some(
- asio::buffer(write_buffer_), ec))
- {
- write_buffer_ = write_buffer_ + len;
- state_ = asio::buffer_size(write_buffer_) > 0 ? writing : reading;
- }
- }
-
-private:
- tcp::socket& socket_;
- enum { reading, writing } state_;
- boost::array<char, 128> data_;
- asio::const_buffer write_buffer_;
-};
-
-} // namespace third_party_lib
-
-// The glue between asio's sockets and the third party library.
-class connection
- : public boost::enable_shared_from_this<connection>
-{
-public:
- typedef boost::shared_ptr<connection> pointer;
-
- static pointer create(asio::io_context& io_context)
- {
- return pointer(new connection(io_context));
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- // Put the socket into non-blocking mode.
- socket_.non_blocking(true);
-
- start_operations();
- }
-
-private:
- connection(asio::io_context& io_context)
- : socket_(io_context),
- session_impl_(socket_),
- read_in_progress_(false),
- write_in_progress_(false)
- {
- }
-
- void start_operations()
- {
- // Start a read operation if the third party library wants one.
- if (session_impl_.want_read() && !read_in_progress_)
- {
- read_in_progress_ = true;
- socket_.async_wait(tcp::socket::wait_read,
- boost::bind(&connection::handle_read,
- shared_from_this(),
- asio::placeholders::error));
- }
-
- // Start a write operation if the third party library wants one.
- if (session_impl_.want_write() && !write_in_progress_)
- {
- write_in_progress_ = true;
- socket_.async_wait(tcp::socket::wait_write,
- boost::bind(&connection::handle_write,
- shared_from_this(),
- asio::placeholders::error));
- }
- }
-
- void handle_read(asio::error_code ec)
- {
- read_in_progress_ = false;
-
- // Notify third party library that it can perform a read.
- if (!ec)
- session_impl_.do_read(ec);
-
- // The third party library successfully performed a read on the socket.
- // Start new read or write operations based on what it now wants.
- if (!ec || ec == asio::error::would_block)
- start_operations();
-
- // Otherwise, an error occurred. Closing the socket cancels any outstanding
- // asynchronous read or write operations. The connection object will be
- // destroyed automatically once those outstanding operations complete.
- else
- socket_.close();
- }
-
- void handle_write(asio::error_code ec)
- {
- write_in_progress_ = false;
-
- // Notify third party library that it can perform a write.
- if (!ec)
- session_impl_.do_write(ec);
-
- // The third party library successfully performed a write on the socket.
- // Start new read or write operations based on what it now wants.
- if (!ec || ec == asio::error::would_block)
- start_operations();
-
- // Otherwise, an error occurred. Closing the socket cancels any outstanding
- // asynchronous read or write operations. The connection object will be
- // destroyed automatically once those outstanding operations complete.
- else
- socket_.close();
- }
-
-private:
- tcp::socket socket_;
- third_party_lib::session session_impl_;
- bool read_in_progress_;
- bool write_in_progress_;
-};
-
-class server
-{
-public:
- server(asio::io_context& io_context, unsigned short port)
- : acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- start_accept();
- }
-
-private:
- void start_accept()
- {
- connection::pointer new_connection =
- connection::create(acceptor_.get_executor().context());
-
- acceptor_.async_accept(new_connection->socket(),
- boost::bind(&server::handle_accept, this, new_connection,
- asio::placeholders::error));
- }
-
- void handle_accept(connection::pointer new_connection,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_connection->start();
- }
-
- start_accept();
- }
-
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: third_party_lib <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/.gitignore b/3rdparty/asio/src/examples/cpp03/porthopper/.gitignore
deleted file mode 100644
index 692ea7e7e65..00000000000
--- a/3rdparty/asio/src/examples/cpp03/porthopper/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-client
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/.gitignore b/3rdparty/asio/src/examples/cpp03/serialization/.gitignore
deleted file mode 100644
index 692ea7e7e65..00000000000
--- a/3rdparty/asio/src/examples/cpp03/serialization/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-client
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/services/.gitignore b/3rdparty/asio/src/examples/cpp03/services/.gitignore
deleted file mode 100644
index 701b1b85834..00000000000
--- a/3rdparty/asio/src/examples/cpp03/services/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
-log.txt
diff --git a/3rdparty/asio/src/examples/cpp03/socks4/.gitignore b/3rdparty/asio/src/examples/cpp03/socks4/.gitignore
deleted file mode 100644
index e11e0de344e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/socks4/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-sync_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/spawn/.gitignore b/3rdparty/asio/src/examples/cpp03/spawn/.gitignore
deleted file mode 100644
index 6b8a121e099..00000000000
--- a/3rdparty/asio/src/examples/cpp03/spawn/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.dirstamp
-parallel_grep
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp b/3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp
deleted file mode 100644
index 415f6da8f33..00000000000
--- a/3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// echo_server.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio/deadline_timer.hpp>
-#include <asio/io_context.hpp>
-#include <asio/ip/tcp.hpp>
-#include <asio/spawn.hpp>
-#include <asio/write.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <iostream>
-
-using asio::ip::tcp;
-
-class session : public boost::enable_shared_from_this<session>
-{
-public:
- explicit session(asio::io_context& io_context)
- : strand_(io_context),
- socket_(io_context),
- timer_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void go()
- {
- asio::spawn(strand_,
- boost::bind(&session::echo,
- shared_from_this(), _1));
- asio::spawn(strand_,
- boost::bind(&session::timeout,
- shared_from_this(), _1));
- }
-
-private:
- void echo(asio::yield_context yield)
- {
- try
- {
- char data[128];
- for (;;)
- {
- timer_.expires_from_now(boost::posix_time::seconds(10));
- std::size_t n = socket_.async_read_some(asio::buffer(data), yield);
- asio::async_write(socket_, asio::buffer(data, n), yield);
- }
- }
- catch (std::exception& e)
- {
- socket_.close();
- timer_.cancel();
- }
- }
-
- void timeout(asio::yield_context yield)
- {
- while (socket_.is_open())
- {
- asio::error_code ignored_ec;
- timer_.async_wait(yield[ignored_ec]);
- if (timer_.expires_from_now() <= boost::posix_time::seconds(0))
- socket_.close();
- }
- }
-
- asio::io_context::strand strand_;
- tcp::socket socket_;
- asio::deadline_timer timer_;
-};
-
-void do_accept(asio::io_context& io_context,
- unsigned short port, asio::yield_context yield)
-{
- tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v4(), port));
-
- for (;;)
- {
- asio::error_code ec;
- boost::shared_ptr<session> new_session(new session(io_context));
- acceptor.async_accept(new_session->socket(), yield[ec]);
- if (!ec) new_session->go();
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- asio::spawn(io_context,
- boost::bind(do_accept,
- boost::ref(io_context), atoi(argv[1]), _1));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp b/3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp
deleted file mode 100644
index d742f196d78..00000000000
--- a/3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// parallel_grep.cpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio/dispatch.hpp>
-#include <asio/post.hpp>
-#include <asio/spawn.hpp>
-#include <asio/strand.hpp>
-#include <asio/thread_pool.hpp>
-#include <boost/bind.hpp>
-#include <fstream>
-#include <iostream>
-#include <string>
-
-using asio::dispatch;
-using asio::spawn;
-using asio::strand;
-using asio::thread_pool;
-using asio::yield_context;
-
-void print_match(std::string input_file, std::string line)
-{
- std::cout << input_file << ':' << line << std::endl;
-}
-
-void search_file(std::string search_string, std::string input_file,
- strand<thread_pool::executor_type> output_strand, yield_context yield)
-{
- std::ifstream is(input_file.c_str());
- std::string line;
- std::size_t line_num = 0;
- while (std::getline(is, line))
- {
- // If we find a match, send a message to the output.
- if (line.find(search_string) != std::string::npos)
- {
- dispatch(output_strand, boost::bind(&print_match, input_file, line));
- }
-
- // Every so often we yield control to another coroutine.
- if (++line_num % 10 == 0)
- post(yield);
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc < 2)
- {
- std::cerr << "Usage: parallel_grep <string> <files...>\n";
- return 1;
- }
-
- // We use a fixed size pool of threads for reading the input files. The
- // number of threads is automatically determined based on the number of
- // CPUs available in the system.
- thread_pool pool;
-
- // To prevent the output from being garbled, we use a strand to synchronise
- // printing.
- strand<thread_pool::executor_type> output_strand(pool.get_executor());
-
- // Spawn a new coroutine for each file specified on the command line.
- std::string search_string = argv[1];
- for (int argn = 2; argn < argc; ++argn)
- {
- std::string input_file = argv[argn];
- spawn(pool, boost::bind(&search_file,
- search_string, input_file, output_strand, _1));
- }
-
- // Join the thread pool to wait for all the spawned tasks to complete.
- pool.join();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/.gitignore b/3rdparty/asio/src/examples/cpp03/ssl/.gitignore
deleted file mode 100644
index a67811253d9..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-server
-client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/ca.pem b/3rdparty/asio/src/examples/cpp03/ssl/ca.pem
deleted file mode 100644
index 1ee5f2ca43b..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/ca.pem
+++ /dev/null
@@ -1,49 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDlzCCAn+gAwIBAgIJAMJYU3U6A0IRMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNV
-BAYTAkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChME
-YXNpbzAeFw0xNTExMTgyMjMzNDhaFw0yMDExMTYyMjMzNDhaMDsxCzAJBgNVBAYT
-AkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNp
-bzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcRJocHdVMdLUJ/pypY
-QVSTC0t3IIgjwjazrK3kAaoIMvzPmDFxEXWcDx+nyz8kQ/E38Ir/ef2BCNGci5hu
-wkfMSuMoW9l2N4hx3QCcF46tTDEZztFxWAH7QbE2wYMlMgKZSxWimNfq0YjxEEXb
-QM0lGPLFh7Xoko29H0F3LKaaQV9u/vop3Hs0h12HeWlY4PiLp7QQTNGqbWcXycA0
-NZ/fyismireyEvPAgo6L8iXuAi7g0TVKVNlrticGGjMcMq6IMvxzEpSMkuMQ5rWj
-pZjWOoBjSYBuXdblcBRvXhOr2Ws8jJLMZfehKq9q1reQfoGV6xMnbwmumSXbWRWT
-0vkCAwEAAaOBnTCBmjAdBgNVHQ4EFgQUK/Zv/AVtfIeucJw8VEtux1dhI1YwawYD
-VR0jBGQwYoAUK/Zv/AVtfIeucJw8VEtux1dhI1ahP6Q9MDsxCzAJBgNVBAYTAkFV
-MQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNpb4IJ
-AMJYU3U6A0IRMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABLYXimq
-v/HLyIJi7Xn8AJUsICj8LKF/J24nwwiF+ibf7UkoChJURs4nN78bod/lpDVPTEVl
-gTBdV/vBJs416sCEFfsGjqB9OBYj4gb0VaJDsQd0+NMvXp0faKv2y9wgScxG9/cg
-aM7eRmyfMn1qjb6tpNxVOPpe/nFi8Vx/1orejBRaZr4zF5TkoPepfwLWQeXDUIdE
-+QHZ60jZAkR5RXTVU4u3kOKcJs839pmJYyxM4H2VxpR18vy4/YdIVWkREIUM2OgT
-5iznIQIIgR56QRGP85uef+I6n0BHzrBk6du69bkQFxrFjLVGlal4bIQqSg4KGWgx
-dEdymMWzmMxpO9s=
------END CERTIFICATE-----
------BEGIN RSA PRIVATE KEY-----
-MIIEpgIBAAKCAQEAxxEmhwd1Ux0tQn+nKlhBVJMLS3cgiCPCNrOsreQBqggy/M+Y
-MXERdZwPH6fLPyRD8Tfwiv95/YEI0ZyLmG7CR8xK4yhb2XY3iHHdAJwXjq1MMRnO
-0XFYAftBsTbBgyUyAplLFaKY1+rRiPEQRdtAzSUY8sWHteiSjb0fQXcspppBX27+
-+incezSHXYd5aVjg+IuntBBM0aptZxfJwDQ1n9/KKyaKt7IS88CCjovyJe4CLuDR
-NUpU2Wu2JwYaMxwyrogy/HMSlIyS4xDmtaOlmNY6gGNJgG5d1uVwFG9eE6vZazyM
-ksxl96Eqr2rWt5B+gZXrEydvCa6ZJdtZFZPS+QIDAQABAoIBAQCOma+SvPoDzvvU
-DiPOxqgOEMPfjHfGbm86xl0luBalGfiEd6WbjVanfGKtF4MWOUFec+chez+FJMEP
-fufVC0qrKiJfNVMOpYvEd2SMgkSx1VymM8me6WXVDYsSipn2+1cm228ZEYAR9Emj
-oqQ4loaGLlP/3RaJbhBF7ruMJvXaZZQ4fZy74Z4tyRaaE1B659ua7Rjne7eNhQE8
-cR7cQDkxsNNN3LTbfLRwEc/gcDXWgLe5JlR/K4ZrdKc3lyivm+Uew3ubKs+fgkyY
-kHmuI3RJGIjpnsZW0/So+pHm3b/fo6lmlhTXtNNd+tkkKn2K9ttbXT3Sc13Pc+4w
-c4MLyUpdAoGBAOxTtGDpeF6U4s+GPuOCzHCwKQyzfOyCL/UTZv1UJX7Kn1FYycJH
-eOjtBRtS661cGkGd1MPfjdX2VV84AmBGDUmRqJ2KfTI1NjLAEJ115ANTpmSTm3lF
-UYncgbzl6aflLpjE1mgY+JTJykYeN5jhhO0r2bsdY7S+zaMCSI5NLuznAoGBANej
-aMtqLg2qKoq+fUkNBHHLXelR5dBXFnKgSrTj++H4yeW9pYbl8bK3gTF3I5+dSjHW
-DdC4+X09iPqY7p8vm8Gq/vgO8Bu+EnKNVr80PJSj7AzFGd6mk/CVrAzoY2XJWbAp
-YFwpo1WfHjS5wBfQzBlXY7kWVB7fj32kk14PYmUfAoGBAJXfd7NGHPoOfdCSGGv8
-VV7ZuQ6+/WiYH4XS6iuaI7VHFsZmAn3dCcbeGbD8Y04r7NLUH0yhB7g7YmTihk87
-3c1cPIy8eS1QJbEFsQPK8fFSKWH7YkwEM/O0DesX+5hodaaYnkiiHXNujYLuQuAH
-lV87wfcyajsEDjFkj1L/i9TdAoGBAKYfRUQv8HqmdU+doHb+iEYCHb75UMpHzQtR
-YTwpxoo3V5Kdnz9lNeYwaF7rIY59ZgMunEYHumw5U6V625nW228/hF0lZOR6cUu+
-hu2WGHWKMvdDgMJ+IcpeA8WN4cUwcN+9gHZ/vUzg4CxOTSYLvLBpGnIkOXnvUGPC
-vaTgxTSRAoGBAOHcuZ9hcUrPuVI1HVkjQQLu5mLZ3tz6linEbe/RCdJMK8JrRX4w
-ubB7gFclMYGbLlDNAJVYkydJaCy/2NAI3rfsOda+VmDqGx6z4BbSGceHhomyU1Oo
-1H7YaXsuzDkzl23HRsyp0pKJpTdghZdbVsGF8vAB8ygK3ehM233neSln
------END RSA PRIVATE KEY-----
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/client.cpp b/3rdparty/asio/src/examples/cpp03/ssl/client.cpp
deleted file mode 100644
index 02a3ce8b3ca..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/client.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-//
-// client.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind.hpp>
-#include "asio.hpp"
-#include "asio/ssl.hpp"
-
-enum { max_length = 1024 };
-
-class client
-{
-public:
- client(asio::io_context& io_context,
- asio::ssl::context& context,
- asio::ip::tcp::resolver::results_type endpoints)
- : socket_(io_context, context)
- {
- socket_.set_verify_mode(asio::ssl::verify_peer);
- socket_.set_verify_callback(
- boost::bind(&client::verify_certificate, this, _1, _2));
-
- asio::async_connect(socket_.lowest_layer(), endpoints,
- boost::bind(&client::handle_connect, this,
- asio::placeholders::error));
- }
-
- bool verify_certificate(bool preverified,
- asio::ssl::verify_context& ctx)
- {
- // The verify callback can be used to check whether the certificate that is
- // being presented is valid for the peer. For example, RFC 2818 describes
- // the steps involved in doing this for HTTPS. Consult the OpenSSL
- // documentation for more details. Note that the callback is called once
- // for each certificate in the certificate chain, starting from the root
- // certificate authority.
-
- // In this example we will simply print the certificate's subject name.
- char subject_name[256];
- X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
- X509_NAME_oneline(X509_get_subject_name(cert), subject_name, 256);
- std::cout << "Verifying " << subject_name << "\n";
-
- return preverified;
- }
-
- void handle_connect(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_handshake(asio::ssl::stream_base::client,
- boost::bind(&client::handle_handshake, this,
- asio::placeholders::error));
- }
- else
- {
- std::cout << "Connect failed: " << error.message() << "\n";
- }
- }
-
- void handle_handshake(const asio::error_code& error)
- {
- if (!error)
- {
- std::cout << "Enter message: ";
- std::cin.getline(request_, max_length);
- size_t request_length = strlen(request_);
-
- asio::async_write(socket_,
- asio::buffer(request_, request_length),
- boost::bind(&client::handle_write, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- std::cout << "Handshake failed: " << error.message() << "\n";
- }
- }
-
- void handle_write(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_read(socket_,
- asio::buffer(reply_, bytes_transferred),
- boost::bind(&client::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- std::cout << "Write failed: " << error.message() << "\n";
- }
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- std::cout << "Reply: ";
- std::cout.write(reply_, bytes_transferred);
- std::cout << "\n";
- }
- else
- {
- std::cout << "Read failed: " << error.message() << "\n";
- }
- }
-
-private:
- asio::ssl::stream<asio::ip::tcp::socket> socket_;
- char request_[max_length];
- char reply_[max_length];
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- asio::ip::tcp::resolver resolver(io_context);
- asio::ip::tcp::resolver::results_type endpoints =
- resolver.resolve(argv[1], argv[2]);
-
- asio::ssl::context ctx(asio::ssl::context::sslv23);
- ctx.load_verify_file("ca.pem");
-
- client c(io_context, ctx, endpoints);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem b/3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem
deleted file mode 100644
index 07250cca62f..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN DH PARAMETERS-----
-MIIBCAKCAQEAyNnxZSYc6J89mDNnqOH8bnwBiAJxcaUS3PkIEcwW8D9o2BlNq6EO
-XKMIbdfwPFZi80GMpNu3YP2A2B42sAHmb7w7ZA92QDv3JjqzR0QuS/CkMv4CEjha
-QBFwBDDWnnHBSj4w/t54ii0SH34mWcjBItI2eMtnM9J6fnvNiWqJxdt4iA4mZjZD
-qZTjIRyjgKAevzkqAlBqQRoVUUgu+9Cf29wXjVl3bE+0VU5CdFeyT+Y9yunz88mq
-rGyx1uPt+zbIfxuNLH+coY67y1ht7iZEL5WLd3wGCycRT+lYy2AL/rxGBPxStFIT
-2bOkQao6sAfb4UdGEUlwHUXZrAV51oM30wIBAg==
------END DH PARAMETERS-----
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/server.cpp b/3rdparty/asio/src/examples/cpp03/ssl/server.cpp
deleted file mode 100644
index ad3d73a2c44..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/server.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind.hpp>
-#include "asio.hpp"
-#include "asio/ssl.hpp"
-
-typedef asio::ssl::stream<asio::ip::tcp::socket> ssl_socket;
-
-class session
-{
-public:
- session(asio::io_context& io_context,
- asio::ssl::context& context)
- : socket_(io_context, context)
- {
- }
-
- ssl_socket::lowest_layer_type& socket()
- {
- return socket_.lowest_layer();
- }
-
- void start()
- {
- socket_.async_handshake(asio::ssl::stream_base::server,
- boost::bind(&session::handle_handshake, this,
- asio::placeholders::error));
- }
-
- void handle_handshake(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- delete this;
- }
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- boost::bind(&session::handle_write, this,
- asio::placeholders::error));
- }
- else
- {
- delete this;
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- delete this;
- }
- }
-
-private:
- ssl_socket socket_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-class server
-{
-public:
- server(asio::io_context& io_context, unsigned short port)
- : io_context_(io_context),
- acceptor_(io_context,
- asio::ip::tcp::endpoint(asio::ip::tcp::v4(), port)),
- context_(asio::ssl::context::sslv23)
- {
- context_.set_options(
- asio::ssl::context::default_workarounds
- | asio::ssl::context::no_sslv2
- | asio::ssl::context::single_dh_use);
- context_.set_password_callback(boost::bind(&server::get_password, this));
- context_.use_certificate_chain_file("server.pem");
- context_.use_private_key_file("server.pem", asio::ssl::context::pem);
- context_.use_tmp_dh_file("dh2048.pem");
-
- start_accept();
- }
-
- std::string get_password() const
- {
- return "test";
- }
-
- void start_accept()
- {
- session* new_session = new session(io_context_, context_);
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session* new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
- else
- {
- delete new_session;
- }
-
- start_accept();
- }
-
-private:
- asio::io_context& io_context_;
- asio::ip::tcp::acceptor acceptor_;
- asio::ssl::context context_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/server.pem b/3rdparty/asio/src/examples/cpp03/ssl/server.pem
deleted file mode 100644
index 37ea6e26715..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/server.pem
+++ /dev/null
@@ -1,71 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDAzCCAesCCQD9QcRiWk0y9TANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJB
-VTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8w
-HhcNMTUxMTE4MjIzNzMxWhcNMjAxMTE2MjIzNzMxWjBMMQswCQYDVQQGEwJBVTEM
-MAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8xDzAN
-BgNVBAsTBnNlcnZlcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALr0
-+NXSklsGJR7HYHP/H4V5+KpYrmFKva/K7iiqi+XyWEjGnj+/iImJW26phhg9GouN
-JJxdrP7/0LwpMsEC/9v09dMNAEewtYhPgD4kiUH/E/79wVmayMZZZGrpF9Rw+wWv
-q58y3L1wKge3qilX6slVDdNhqU3vBiMKEJfsjE4PKcEVjPCjVJG2562eHK9FxyjQ
-DykyH61lQKBQOiElilPQKzAO7U36yTvs+chWuUfK47B8EC+PJ5KcLEppli4ljlwE
-w01HnGxwvjDLobKm2jL6CWi3aYGWudyTsNAd7YC5C7psktBypQLBcfp7uUrrR5Bb
-PEjFHJUWIlyoYvm2OjMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAtceVW6tixFsB
-ZRhjL5aRCcbx2iMwEXd54lcP6BWe1qOcDPHoSYI1zvvGzohbEvBfqUv78S9MtzaT
-gMe5rIU9M1ZM09PyaM6ZutGpKHE8L4qcOslTt41GQFsSqPFdcbgSV20MvBzjGayR
-AI/WV0avW3oasdetJPZCR7bRbCbMbWTgclUfv5F25ENcR+BhNuilfL15owL0s4sS
-Wb4jOOHhXV9iXeS2dH0snFqv4BmQ9ZoA7zbM9lG3EU5DuxHESYkCnzJyEqqY3vWv
-PFRViCxLp5LQLmkTQ3dglVQA4x6ZaonaewdPtdhjkLUuIqDvQx5+kIaOELbSws+c
-bREYlnGrFw==
------END CERTIFICATE-----
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: AES-256-CBC,D459676347D389E9135496D8AAFA7953
-
-wbrjxr9NHur8kgxDsgXOY9qFGKpONIQLxkuahUrDD/H+s/l7ugsLWOPsOXbjNL/7
-QYUBAx85HKm9D8BQ5g78Y82qfArap3/3IIuysDfQDh4fQodhVtmGTFiCOvudlGEp
-lq1niQRLThlxeRoFphH8KKiOTO9a/d8tdL7zRmiFwnVnhK4014mgVmgcSefA1AF5
-RbJAeMclUKddG6ltQK00ptg84CDXiMWQXFBGGmQ1av2lyFzC+xLP+qDqZAYTM9lZ
-NFRo2oEZP1ozfOVNSbXTanJgZ0DSSmhGE1PcVrHSeE/v+k1kPh3oVKi9GV51kIDC
-Zd9f/XltuDOzy1Ybn6gRy4nzNpzcwjSCIHEdSD5nxU5JfHfQ3OtnsEab7qf989iP
-s2LbCSp5uGTMvfesMIkixIZAQp2FeahZTAgU2Vx+wi5Kks68rOqeywEfzACL/Um5
-7XZu8gDs4MgRRWnxK1BbJDPifICLvSJZvgB9FKX/hk4FHFF+MtcrkalehCuLooDV
-3rfHNvRSbg7J97XQ3QC+k9ZDaumpy6n+LhaVv7BIJRBnBBtZ5Eg3DmPg6flqaHAU
-Y/8d82wb/pCmbvR3B1/Ebgs84DPJ+uZnY9M5Iwx19oqlVSR2ts/Tx619LGAm+BiQ
-7YDoC4CFmpAA8Uw0xnUbNgx94NdNmlnLeLtS50b0XlWpHKbVzmVbNYEjY6NHMlLt
-aqxWHTYTa7g/c1bg2/nxF1Lbfu5VSTROGBUuer1c3yzVuyBrjcX92Jp4BJH78qOp
-N6lY6MnH4HYRXHjzlt/S0ZzO0faPPe18Q8SWvnDVuE3fYzzL772B56d2t8eodc+/
-t6M3qJ60eXdsmgYOaPRLRUovN2xT2UUr0+biuguHyqfaVfcEU/adw+b9oUVE+5Nw
-nZHI5qhPnhLxChyZqbBl68zMUyKlfff4OyLvRGpfcHwBw6DTGjduB+DDsqqkcIB9
-2VL6nps7ZVCwMPI18siUd6cttEOf6ZXrVqHg9wfDvJOlh2NNKNLxSAFubHc90Jlj
-KejrWenXo2w6YkSUeTV4t4cWu7U8rXIkTJXDl1S6NO8DWqNDo5KjgJ2SK5NlSOJ7
-jgECn390ooneJOxxytPVQO2xppXQZZS65RHrvhB+ss5xUknly9q+ICyt6xTR9nqA
-PKkeSE6qVY0J4JgFXpkgQxgwMnjSED3LKr3jlz28pr5cC6tsc5SSlekHjT2fcSrX
-uccaVahaJRigf+q+4XzmJtdwbZU+YWGZRVMlQLA5yzPHQHDYkPpOeYU4WReND8S4
-TZRkPHaxOZ2lKQwJB93V8Vbt2MvwRy392452a33S4TcQLaWzoOljXjmZjrp2rvRz
-prBaNe8LnO4V8Oliv+H+E0UWiWFDuI+HBy4X4O9plsbw/gk64Phl9qLiBwaX/AIR
-66FXvC/czABo9oSt2jekcMtJofYr8Gr2bsJlt5ZX+GEOxz4jMv7xvz5/L3W7jVav
-pHGIv4xfN9FrXzL47O7UuUF9xZg4Rp/fxwpgEDNZmX/3DnP0ewZQUcgUX0pdqNGQ
-YVqJXcRF7KqG2NSQFuwPESZQnxU0WzSgRyUae7xg1WKfSuN8NVAzKhOgeqlD2IAo
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIIDlzCCAn+gAwIBAgIJAMJYU3U6A0IRMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNV
-BAYTAkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChME
-YXNpbzAeFw0xNTExMTgyMjMzNDhaFw0yMDExMTYyMjMzNDhaMDsxCzAJBgNVBAYT
-AkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNp
-bzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcRJocHdVMdLUJ/pypY
-QVSTC0t3IIgjwjazrK3kAaoIMvzPmDFxEXWcDx+nyz8kQ/E38Ir/ef2BCNGci5hu
-wkfMSuMoW9l2N4hx3QCcF46tTDEZztFxWAH7QbE2wYMlMgKZSxWimNfq0YjxEEXb
-QM0lGPLFh7Xoko29H0F3LKaaQV9u/vop3Hs0h12HeWlY4PiLp7QQTNGqbWcXycA0
-NZ/fyismireyEvPAgo6L8iXuAi7g0TVKVNlrticGGjMcMq6IMvxzEpSMkuMQ5rWj
-pZjWOoBjSYBuXdblcBRvXhOr2Ws8jJLMZfehKq9q1reQfoGV6xMnbwmumSXbWRWT
-0vkCAwEAAaOBnTCBmjAdBgNVHQ4EFgQUK/Zv/AVtfIeucJw8VEtux1dhI1YwawYD
-VR0jBGQwYoAUK/Zv/AVtfIeucJw8VEtux1dhI1ahP6Q9MDsxCzAJBgNVBAYTAkFV
-MQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNpb4IJ
-AMJYU3U6A0IRMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABLYXimq
-v/HLyIJi7Xn8AJUsICj8LKF/J24nwwiF+ibf7UkoChJURs4nN78bod/lpDVPTEVl
-gTBdV/vBJs416sCEFfsGjqB9OBYj4gb0VaJDsQd0+NMvXp0faKv2y9wgScxG9/cg
-aM7eRmyfMn1qjb6tpNxVOPpe/nFi8Vx/1orejBRaZr4zF5TkoPepfwLWQeXDUIdE
-+QHZ60jZAkR5RXTVU4u3kOKcJs839pmJYyxM4H2VxpR18vy4/YdIVWkREIUM2OgT
-5iznIQIIgR56QRGP85uef+I6n0BHzrBk6du69bkQFxrFjLVGlal4bIQqSg4KGWgx
-dEdymMWzmMxpO9s=
------END CERTIFICATE-----
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/.gitignore b/3rdparty/asio/src/examples/cpp03/timeouts/.gitignore
deleted file mode 100644
index dda7f39c3c2..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_client
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
deleted file mode 100644
index 69d467af1bb..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-//
-// blocking_tcp_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "asio/connect.hpp"
-#include "asio/deadline_timer.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/read_until.hpp"
-#include "asio/streambuf.hpp"
-#include "asio/system_error.hpp"
-#include "asio/write.hpp"
-#include "asio/thread.hpp"
-#include <cstdlib>
-#include <iostream>
-#include <string>
-#include <boost/lambda/bind.hpp>
-#include <boost/lambda/lambda.hpp>
-
-using asio::deadline_timer;
-using asio::ip::tcp;
-using boost::lambda::bind;
-using boost::lambda::var;
-using boost::lambda::_1;
-
-//----------------------------------------------------------------------
-
-//
-// This class manages socket timeouts by applying the concept of a deadline.
-// Each asynchronous operation is given a deadline by which it must complete.
-// Deadlines are enforced by an "actor" that persists for the lifetime of the
-// client object:
-//
-// +----------------+
-// | |
-// | check_deadline |<---+
-// | | |
-// +----------------+ | async_wait()
-// | |
-// +---------+
-//
-// If the actor determines that the deadline has expired, the socket is closed
-// and any outstanding operations are consequently cancelled. The socket
-// operations themselves use boost::lambda function objects as completion
-// handlers. For a given socket operation, the client object runs the
-// io_context to block thread execution until the actor completes.
-//
-class client
-{
-public:
- client()
- : socket_(io_context_),
- deadline_(io_context_)
- {
- // No deadline is required until the first socket operation is started. We
- // set the deadline to positive infinity so that the actor takes no action
- // until a specific deadline is set.
- deadline_.expires_at(boost::posix_time::pos_infin);
-
- // Start the persistent actor that checks for deadline expiry.
- check_deadline();
- }
-
- void connect(const std::string& host, const std::string& service,
- boost::posix_time::time_duration timeout)
- {
- // Resolve the host name and service to a list of endpoints.
- tcp::resolver::results_type endpoints =
- tcp::resolver(io_context_).resolve(host, service);
-
- // Set a deadline for the asynchronous operation. As a host name may
- // resolve to multiple endpoints, this function uses the composed operation
- // async_connect. The deadline applies to the entire operation, rather than
- // individual connection attempts.
- deadline_.expires_from_now(timeout);
-
- // Set up the variable that receives the result of the asynchronous
- // operation. The error code is set to would_block to signal that the
- // operation is incomplete. Asio guarantees that its asynchronous
- // operations will never fail with would_block, so any other value in
- // ec indicates completion.
- asio::error_code ec = asio::error::would_block;
-
- // Start the asynchronous operation itself. The boost::lambda function
- // object is used as a callback and will update the ec variable when the
- // operation completes. The blocking_udp_client.cpp example shows how you
- // can use boost::bind rather than boost::lambda.
- asio::async_connect(socket_, endpoints, var(ec) = _1);
-
- // Block until the asynchronous operation has completed.
- do io_context_.run_one(); while (ec == asio::error::would_block);
-
- // Determine whether a connection was successfully established. The
- // deadline actor may have had a chance to run and close our socket, even
- // though the connect operation notionally succeeded. Therefore we must
- // check whether the socket is still open before deciding if we succeeded
- // or failed.
- if (ec || !socket_.is_open())
- throw asio::system_error(
- ec ? ec : asio::error::operation_aborted);
- }
-
- std::string read_line(boost::posix_time::time_duration timeout)
- {
- // Set a deadline for the asynchronous operation. Since this function uses
- // a composed operation (async_read_until), the deadline applies to the
- // entire operation, rather than individual reads from the socket.
- deadline_.expires_from_now(timeout);
-
- // Set up the variable that receives the result of the asynchronous
- // operation. The error code is set to would_block to signal that the
- // operation is incomplete. Asio guarantees that its asynchronous
- // operations will never fail with would_block, so any other value in
- // ec indicates completion.
- asio::error_code ec = asio::error::would_block;
-
- // Start the asynchronous operation itself. The boost::lambda function
- // object is used as a callback and will update the ec variable when the
- // operation completes. The blocking_udp_client.cpp example shows how you
- // can use boost::bind rather than boost::lambda.
- asio::async_read_until(socket_, input_buffer_, '\n', var(ec) = _1);
-
- // Block until the asynchronous operation has completed.
- do io_context_.run_one(); while (ec == asio::error::would_block);
-
- if (ec)
- throw asio::system_error(ec);
-
- std::string line;
- std::istream is(&input_buffer_);
- std::getline(is, line);
- return line;
- }
-
- void write_line(const std::string& line,
- boost::posix_time::time_duration timeout)
- {
- std::string data = line + "\n";
-
- // Set a deadline for the asynchronous operation. Since this function uses
- // a composed operation (async_write), the deadline applies to the entire
- // operation, rather than individual writes to the socket.
- deadline_.expires_from_now(timeout);
-
- // Set up the variable that receives the result of the asynchronous
- // operation. The error code is set to would_block to signal that the
- // operation is incomplete. Asio guarantees that its asynchronous
- // operations will never fail with would_block, so any other value in
- // ec indicates completion.
- asio::error_code ec = asio::error::would_block;
-
- // Start the asynchronous operation itself. The boost::lambda function
- // object is used as a callback and will update the ec variable when the
- // operation completes. The blocking_udp_client.cpp example shows how you
- // can use boost::bind rather than boost::lambda.
- asio::async_write(socket_, asio::buffer(data), var(ec) = _1);
-
- // Block until the asynchronous operation has completed.
- do io_context_.run_one(); while (ec == asio::error::would_block);
-
- if (ec)
- throw asio::system_error(ec);
- }
-
-private:
- void check_deadline()
- {
- // Check whether the deadline has passed. We compare the deadline against
- // the current time since a new asynchronous operation may have moved the
- // deadline before this actor had a chance to run.
- if (deadline_.expires_at() <= deadline_timer::traits_type::now())
- {
- // The deadline has passed. The socket is closed so that any outstanding
- // asynchronous operations are cancelled. This allows the blocked
- // connect(), read_line() or write_line() functions to return.
- asio::error_code ignored_ec;
- socket_.close(ignored_ec);
-
- // There is no longer an active deadline. The expiry is set to positive
- // infinity so that the actor takes no action until a new deadline is set.
- deadline_.expires_at(boost::posix_time::pos_infin);
- }
-
- // Put the actor back to sleep.
- deadline_.async_wait(bind(&client::check_deadline, this));
- }
-
- asio::io_context io_context_;
- tcp::socket socket_;
- deadline_timer deadline_;
- asio::streambuf input_buffer_;
-};
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 4)
- {
- std::cerr << "Usage: blocking_tcp <host> <port> <message>\n";
- return 1;
- }
-
- client c;
- c.connect(argv[1], argv[2], boost::posix_time::seconds(10));
-
- boost::posix_time::ptime time_sent =
- boost::posix_time::microsec_clock::universal_time();
-
- c.write_line(argv[3], boost::posix_time::seconds(10));
-
- for (;;)
- {
- std::string line = c.read_line(boost::posix_time::seconds(10));
-
- // Keep going until we get back the line that was sent.
- if (line == argv[3])
- break;
- }
-
- boost::posix_time::ptime time_received =
- boost::posix_time::microsec_clock::universal_time();
-
- std::cout << "Round trip time: ";
- std::cout << (time_received - time_sent).total_microseconds();
- std::cout << " microseconds\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
deleted file mode 100644
index fd2da7640b8..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-//
-// blocking_udp_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "asio/deadline_timer.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/udp.hpp"
-#include <cstdlib>
-#include <boost/bind.hpp>
-#include <boost/date_time/posix_time/posix_time_types.hpp>
-#include <iostream>
-
-using asio::deadline_timer;
-using asio::ip::udp;
-
-//----------------------------------------------------------------------
-
-//
-// This class manages socket timeouts by applying the concept of a deadline.
-// Each asynchronous operation is given a deadline by which it must complete.
-// Deadlines are enforced by an "actor" that persists for the lifetime of the
-// client object:
-//
-// +----------------+
-// | |
-// | check_deadline |<---+
-// | | |
-// +----------------+ | async_wait()
-// | |
-// +---------+
-//
-// If the actor determines that the deadline has expired, any outstanding
-// socket operations are cancelled. The socket operations themselves are
-// implemented as transient actors:
-//
-// +---------------+
-// | |
-// | receive |
-// | |
-// +---------------+
-// |
-// async_- | +----------------+
-// receive() | | |
-// +--->| handle_receive |
-// | |
-// +----------------+
-//
-// The client object runs the io_context to block thread execution until the
-// actor completes.
-//
-class client
-{
-public:
- client(const udp::endpoint& listen_endpoint)
- : socket_(io_context_, listen_endpoint),
- deadline_(io_context_)
- {
- // No deadline is required until the first socket operation is started. We
- // set the deadline to positive infinity so that the actor takes no action
- // until a specific deadline is set.
- deadline_.expires_at(boost::posix_time::pos_infin);
-
- // Start the persistent actor that checks for deadline expiry.
- check_deadline();
- }
-
- std::size_t receive(const asio::mutable_buffer& buffer,
- boost::posix_time::time_duration timeout, asio::error_code& ec)
- {
- // Set a deadline for the asynchronous operation.
- deadline_.expires_from_now(timeout);
-
- // Set up the variables that receive the result of the asynchronous
- // operation. The error code is set to would_block to signal that the
- // operation is incomplete. Asio guarantees that its asynchronous
- // operations will never fail with would_block, so any other value in
- // ec indicates completion.
- ec = asio::error::would_block;
- std::size_t length = 0;
-
- // Start the asynchronous operation itself. The handle_receive function
- // used as a callback will update the ec and length variables.
- socket_.async_receive(asio::buffer(buffer),
- boost::bind(&client::handle_receive, _1, _2, &ec, &length));
-
- // Block until the asynchronous operation has completed.
- do io_context_.run_one(); while (ec == asio::error::would_block);
-
- return length;
- }
-
-private:
- void check_deadline()
- {
- // Check whether the deadline has passed. We compare the deadline against
- // the current time since a new asynchronous operation may have moved the
- // deadline before this actor had a chance to run.
- if (deadline_.expires_at() <= deadline_timer::traits_type::now())
- {
- // The deadline has passed. The outstanding asynchronous operation needs
- // to be cancelled so that the blocked receive() function will return.
- //
- // Please note that cancel() has portability issues on some versions of
- // Microsoft Windows, and it may be necessary to use close() instead.
- // Consult the documentation for cancel() for further information.
- socket_.cancel();
-
- // There is no longer an active deadline. The expiry is set to positive
- // infinity so that the actor takes no action until a new deadline is set.
- deadline_.expires_at(boost::posix_time::pos_infin);
- }
-
- // Put the actor back to sleep.
- deadline_.async_wait(boost::bind(&client::check_deadline, this));
- }
-
- static void handle_receive(
- const asio::error_code& ec, std::size_t length,
- asio::error_code* out_ec, std::size_t* out_length)
- {
- *out_ec = ec;
- *out_length = length;
- }
-
-private:
- asio::io_context io_context_;
- udp::socket socket_;
- deadline_timer deadline_;
-};
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- using namespace std; // For atoi.
-
- if (argc != 3)
- {
- std::cerr << "Usage: blocking_udp_timeout <listen_addr> <listen_port>\n";
- return 1;
- }
-
- udp::endpoint listen_endpoint(
- asio::ip::make_address(argv[1]),
- std::atoi(argv[2]));
-
- client c(listen_endpoint);
-
- for (;;)
- {
- char data[1024];
- asio::error_code ec;
- std::size_t n = c.receive(asio::buffer(data),
- boost::posix_time::seconds(10), ec);
-
- if (ec)
- {
- std::cout << "Receive error: " << ec.message() << "\n";
- }
- else
- {
- std::cout << "Received: ";
- std::cout.write(data, n);
- std::cout << "\n";
- }
- }
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/server.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/server.cpp
deleted file mode 100644
index 212cd90d820..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/server.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <algorithm>
-#include <cstdlib>
-#include <deque>
-#include <iostream>
-#include <set>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include "asio/deadline_timer.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/ip/udp.hpp"
-#include "asio/read_until.hpp"
-#include "asio/streambuf.hpp"
-#include "asio/write.hpp"
-
-using asio::deadline_timer;
-using asio::ip::tcp;
-using asio::ip::udp;
-
-//----------------------------------------------------------------------
-
-class subscriber
-{
-public:
- virtual ~subscriber() {}
- virtual void deliver(const std::string& msg) = 0;
-};
-
-typedef boost::shared_ptr<subscriber> subscriber_ptr;
-
-//----------------------------------------------------------------------
-
-class channel
-{
-public:
- void join(subscriber_ptr subscriber)
- {
- subscribers_.insert(subscriber);
- }
-
- void leave(subscriber_ptr subscriber)
- {
- subscribers_.erase(subscriber);
- }
-
- void deliver(const std::string& msg)
- {
- std::for_each(subscribers_.begin(), subscribers_.end(),
- boost::bind(&subscriber::deliver, _1, boost::ref(msg)));
- }
-
-private:
- std::set<subscriber_ptr> subscribers_;
-};
-
-//----------------------------------------------------------------------
-
-//
-// This class manages socket timeouts by applying the concept of a deadline.
-// Some asynchronous operations are given deadlines by which they must complete.
-// Deadlines are enforced by two "actors" that persist for the lifetime of the
-// session object, one for input and one for output:
-//
-// +----------------+ +----------------+
-// | | | |
-// | check_deadline |<---+ | check_deadline |<---+
-// | | | async_wait() | | | async_wait()
-// +----------------+ | on input +----------------+ | on output
-// | | deadline | | deadline
-// +---------+ +---------+
-//
-// If either deadline actor determines that the corresponding deadline has
-// expired, the socket is closed and any outstanding operations are cancelled.
-//
-// The input actor reads messages from the socket, where messages are delimited
-// by the newline character:
-//
-// +------------+
-// | |
-// | start_read |<---+
-// | | |
-// +------------+ |
-// | |
-// async_- | +-------------+
-// read_- | | |
-// until() +--->| handle_read |
-// | |
-// +-------------+
-//
-// The deadline for receiving a complete message is 30 seconds. If a non-empty
-// message is received, it is delivered to all subscribers. If a heartbeat (a
-// message that consists of a single newline character) is received, a heartbeat
-// is enqueued for the client, provided there are no other messages waiting to
-// be sent.
-//
-// The output actor is responsible for sending messages to the client:
-//
-// +--------------+
-// | |<---------------------+
-// | await_output | |
-// | |<---+ |
-// +--------------+ | |
-// | | | async_wait() |
-// | +--------+ |
-// V |
-// +-------------+ +--------------+
-// | | async_write() | |
-// | start_write |-------------->| handle_write |
-// | | | |
-// +-------------+ +--------------+
-//
-// The output actor first waits for an output message to be enqueued. It does
-// this by using a deadline_timer as an asynchronous condition variable. The
-// deadline_timer will be signalled whenever the output queue is non-empty.
-//
-// Once a message is available, it is sent to the client. The deadline for
-// sending a complete message is 30 seconds. After the message is successfully
-// sent, the output actor again waits for the output queue to become non-empty.
-//
-class tcp_session
- : public subscriber,
- public boost::enable_shared_from_this<tcp_session>
-{
-public:
- tcp_session(asio::io_context& io_context, channel& ch)
- : channel_(ch),
- socket_(io_context),
- input_deadline_(io_context),
- non_empty_output_queue_(io_context),
- output_deadline_(io_context)
- {
- input_deadline_.expires_at(boost::posix_time::pos_infin);
- output_deadline_.expires_at(boost::posix_time::pos_infin);
-
- // The non_empty_output_queue_ deadline_timer is set to pos_infin whenever
- // the output queue is empty. This ensures that the output actor stays
- // asleep until a message is put into the queue.
- non_empty_output_queue_.expires_at(boost::posix_time::pos_infin);
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- // Called by the server object to initiate the four actors.
- void start()
- {
- channel_.join(shared_from_this());
-
- start_read();
-
- input_deadline_.async_wait(
- boost::bind(&tcp_session::check_deadline,
- shared_from_this(), &input_deadline_));
-
- await_output();
-
- output_deadline_.async_wait(
- boost::bind(&tcp_session::check_deadline,
- shared_from_this(), &output_deadline_));
- }
-
-private:
- void stop()
- {
- channel_.leave(shared_from_this());
-
- asio::error_code ignored_ec;
- socket_.close(ignored_ec);
- input_deadline_.cancel();
- non_empty_output_queue_.cancel();
- output_deadline_.cancel();
- }
-
- bool stopped() const
- {
- return !socket_.is_open();
- }
-
- void deliver(const std::string& msg)
- {
- output_queue_.push_back(msg + "\n");
-
- // Signal that the output queue contains messages. Modifying the expiry
- // will wake the output actor, if it is waiting on the timer.
- non_empty_output_queue_.expires_at(boost::posix_time::neg_infin);
- }
-
- void start_read()
- {
- // Set a deadline for the read operation.
- input_deadline_.expires_from_now(boost::posix_time::seconds(30));
-
- // Start an asynchronous operation to read a newline-delimited message.
- asio::async_read_until(socket_, input_buffer_, '\n',
- boost::bind(&tcp_session::handle_read, shared_from_this(), _1));
- }
-
- void handle_read(const asio::error_code& ec)
- {
- if (stopped())
- return;
-
- if (!ec)
- {
- // Extract the newline-delimited message from the buffer.
- std::string msg;
- std::istream is(&input_buffer_);
- std::getline(is, msg);
-
- if (!msg.empty())
- {
- channel_.deliver(msg);
- }
- else
- {
- // We received a heartbeat message from the client. If there's nothing
- // else being sent or ready to be sent, send a heartbeat right back.
- if (output_queue_.empty())
- {
- output_queue_.push_back("\n");
-
- // Signal that the output queue contains messages. Modifying the
- // expiry will wake the output actor, if it is waiting on the timer.
- non_empty_output_queue_.expires_at(boost::posix_time::neg_infin);
- }
- }
-
- start_read();
- }
- else
- {
- stop();
- }
- }
-
- void await_output()
- {
- if (stopped())
- return;
-
- if (output_queue_.empty())
- {
- // There are no messages that are ready to be sent. The actor goes to
- // sleep by waiting on the non_empty_output_queue_ timer. When a new
- // message is added, the timer will be modified and the actor will wake.
- non_empty_output_queue_.expires_at(boost::posix_time::pos_infin);
- non_empty_output_queue_.async_wait(
- boost::bind(&tcp_session::await_output, shared_from_this()));
- }
- else
- {
- start_write();
- }
- }
-
- void start_write()
- {
- // Set a deadline for the write operation.
- output_deadline_.expires_from_now(boost::posix_time::seconds(30));
-
- // Start an asynchronous operation to send a message.
- asio::async_write(socket_,
- asio::buffer(output_queue_.front()),
- boost::bind(&tcp_session::handle_write, shared_from_this(), _1));
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (stopped())
- return;
-
- if (!ec)
- {
- output_queue_.pop_front();
-
- await_output();
- }
- else
- {
- stop();
- }
- }
-
- void check_deadline(deadline_timer* deadline)
- {
- if (stopped())
- return;
-
- // Check whether the deadline has passed. We compare the deadline against
- // the current time since a new asynchronous operation may have moved the
- // deadline before this actor had a chance to run.
- if (deadline->expires_at() <= deadline_timer::traits_type::now())
- {
- // The deadline has passed. Stop the session. The other actors will
- // terminate as soon as possible.
- stop();
- }
- else
- {
- // Put the actor back to sleep.
- deadline->async_wait(
- boost::bind(&tcp_session::check_deadline,
- shared_from_this(), deadline));
- }
- }
-
- channel& channel_;
- tcp::socket socket_;
- asio::streambuf input_buffer_;
- deadline_timer input_deadline_;
- std::deque<std::string> output_queue_;
- deadline_timer non_empty_output_queue_;
- deadline_timer output_deadline_;
-};
-
-typedef boost::shared_ptr<tcp_session> tcp_session_ptr;
-
-//----------------------------------------------------------------------
-
-class udp_broadcaster
- : public subscriber
-{
-public:
- udp_broadcaster(asio::io_context& io_context,
- const udp::endpoint& broadcast_endpoint)
- : socket_(io_context)
- {
- socket_.connect(broadcast_endpoint);
- }
-
-private:
- void deliver(const std::string& msg)
- {
- asio::error_code ignored_ec;
- socket_.send(asio::buffer(msg), 0, ignored_ec);
- }
-
- udp::socket socket_;
-};
-
-//----------------------------------------------------------------------
-
-class server
-{
-public:
- server(asio::io_context& io_context,
- const tcp::endpoint& listen_endpoint,
- const udp::endpoint& broadcast_endpoint)
- : io_context_(io_context),
- acceptor_(io_context, listen_endpoint)
- {
- subscriber_ptr bc(new udp_broadcaster(io_context_, broadcast_endpoint));
- channel_.join(bc);
-
- start_accept();
- }
-
- void start_accept()
- {
- tcp_session_ptr new_session(new tcp_session(io_context_, channel_));
-
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session, _1));
- }
-
- void handle_accept(tcp_session_ptr session,
- const asio::error_code& ec)
- {
- if (!ec)
- {
- session->start();
- }
-
- start_accept();
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
- channel channel_;
-};
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- using namespace std; // For atoi.
-
- if (argc != 4)
- {
- std::cerr << "Usage: server <listen_port> <bcast_address> <bcast_port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::endpoint listen_endpoint(tcp::v4(), atoi(argv[1]));
-
- udp::endpoint broadcast_endpoint(
- asio::ip::make_address(argv[2]), atoi(argv[3]));
-
- server s(io_context, listen_endpoint, broadcast_endpoint);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timers/.gitignore b/3rdparty/asio/src/examples/cpp03/timers/.gitignore
deleted file mode 100644
index a3fe695226f..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timers/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*timer
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/timers/tick_count_timer.cpp b/3rdparty/asio/src/examples/cpp03/timers/tick_count_timer.cpp
deleted file mode 100644
index 8b98cfd2a54..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timers/tick_count_timer.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// tick_count_timer.cpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio.hpp>
-#include <ctime>
-#include <iostream>
-
-#if defined(WIN32)
-# include <windows.h>
-#else
-# error This example is for Windows only!
-#endif
-
-struct tick_count_traits
-{
- // The time type. This type has no constructor that takes a DWORD to ensure
- // that the timer can only be used with relative times.
- class time_type
- {
- public:
- time_type() : ticks_(0) {}
- private:
- friend struct tick_count_traits;
- DWORD ticks_;
- };
-
- // The duration type. According to the TimeTraits requirements, the duration
- // must be a signed type. This means we can't handle durations larger than
- // 2^31.
- class duration_type
- {
- public:
- duration_type() : ticks_(0) {}
- duration_type(LONG ticks) : ticks_(ticks) {}
- private:
- friend struct tick_count_traits;
- LONG ticks_;
- };
-
- // Get the current time.
- static time_type now()
- {
- time_type result;
- result.ticks_ = ::GetTickCount();
- return result;
- }
-
- // Add a duration to a time.
- static time_type add(const time_type& t, const duration_type& d)
- {
- time_type result;
- result.ticks_ = t.ticks_ + d.ticks_;
- return result;
- }
-
- // Subtract one time from another.
- static duration_type subtract(const time_type& t1, const time_type& t2)
- {
- // DWORD tick count values can wrap (see less_than() below). We'll convert
- // to a duration by taking the absolute difference and adding the sign
- // based on which is the "lesser" absolute time.
- return duration_type(less_than(t1, t2)
- ? -static_cast<LONG>(t2.ticks_ - t1.ticks_)
- : static_cast<LONG>(t1.ticks_ - t2.ticks_));
- }
-
- // Test whether one time is less than another.
- static bool less_than(const time_type& t1, const time_type& t2)
- {
- // DWORD tick count values wrap periodically, so we'll use a heuristic that
- // says that if subtracting t1 from t2 yields a value smaller than 2^31,
- // then t1 is probably less than t2. This means that we can't handle
- // durations larger than 2^31, which shouldn't be a problem in practice.
- return (t2.ticks_ - t1.ticks_) < static_cast<DWORD>(1 << 31);
- }
-
- // Convert to POSIX duration type.
- static boost::posix_time::time_duration to_posix_duration(
- const duration_type& d)
- {
- return boost::posix_time::milliseconds(d.ticks_);
- }
-};
-
-typedef asio::basic_deadline_timer<
- DWORD, tick_count_traits> tick_count_timer;
-
-void handle_timeout(const asio::error_code&)
-{
- std::cout << "handle_timeout\n";
-}
-
-int main()
-{
- try
- {
- asio::io_context io_context;
-
- tick_count_timer timer(io_context, 5000);
- std::cout << "Starting synchronous wait\n";
- timer.wait();
- std::cout << "Finished synchronous wait\n";
-
- timer.expires_from_now(5000);
- std::cout << "Starting asynchronous wait\n";
- timer.async_wait(&handle_timeout);
- io_context.run();
- std::cout << "Finished asynchronous wait\n";
- }
- catch (std::exception& e)
- {
- std::cout << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp b/3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp
deleted file mode 100644
index 8a434e9b20c..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// time_t_timer.cpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include <asio.hpp>
-#include <ctime>
-#include <iostream>
-
-struct time_t_traits
-{
- // The time type.
- typedef std::time_t time_type;
-
- // The duration type.
- struct duration_type
- {
- duration_type() : value(0) {}
- duration_type(std::time_t v) : value(v) {}
- std::time_t value;
- };
-
- // Get the current time.
- static time_type now()
- {
- return std::time(0);
- }
-
- // Add a duration to a time.
- static time_type add(const time_type& t, const duration_type& d)
- {
- return t + d.value;
- }
-
- // Subtract one time from another.
- static duration_type subtract(const time_type& t1, const time_type& t2)
- {
- return duration_type(t1 - t2);
- }
-
- // Test whether one time is less than another.
- static bool less_than(const time_type& t1, const time_type& t2)
- {
- return t1 < t2;
- }
-
- // Convert to POSIX duration type.
- static boost::posix_time::time_duration to_posix_duration(
- const duration_type& d)
- {
- return boost::posix_time::seconds(d.value);
- }
-};
-
-typedef asio::basic_deadline_timer<
- std::time_t, time_t_traits> time_t_timer;
-
-void handle_timeout(const asio::error_code&)
-{
- std::cout << "handle_timeout\n";
-}
-
-int main()
-{
- try
- {
- asio::io_context io_context;
-
- time_t_timer timer(io_context);
-
- timer.expires_from_now(5);
- std::cout << "Starting synchronous wait\n";
- timer.wait();
- std::cout << "Finished synchronous wait\n";
-
- timer.expires_from_now(5);
- std::cout << "Starting asynchronous wait\n";
- timer.async_wait(&handle_timeout);
- io_context.run();
- std::cout << "Finished asynchronous wait\n";
- }
- catch (std::exception& e)
- {
- std::cout << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/.gitignore
deleted file mode 100644
index 2926eaf9bf6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-client
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/.gitignore
deleted file mode 100644
index 7f06efb3296..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-server
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/.gitignore
deleted file mode 100644
index 7f06efb3296..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-server
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/.gitignore
deleted file mode 100644
index 2926eaf9bf6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-client
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/.gitignore
deleted file mode 100644
index 7f06efb3296..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-server
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/.gitignore
deleted file mode 100644
index 7f06efb3296..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-server
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/.gitignore
deleted file mode 100644
index 7f06efb3296..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-server
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime_dox.txt b/3rdparty/asio/src/examples/cpp03/tutorial/daytime_dox.txt
deleted file mode 100644
index 1bf591a43a8..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime_dox.txt
+++ /dev/null
@@ -1,502 +0,0 @@
-//
-// Copyright (c) 2003-2016 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)
-//
-
-/**
-\page tutdaytime1 Daytime.1 - A synchronous TCP daytime client
-
-This tutorial program shows how to use asio to implement a client application
-with TCP.
-
-\dontinclude daytime1/client.cpp
-\skip #include
-
-We start by including the necessary header files.
-
-\until asio.hpp
-
-The purpose of this application is to access a daytime service,
-so we need the user to specify the server.
-
-\until }
-
-All programs that use asio need to have at least one asio::io_service
-object.
-
-\until asio::io_service
-
-We need to turn the server name that was specified as a parameter to the
-application, into a TCP endpoint. To do this we use an
-asio::ip::tcp::resolver object.
-
-\until tcp::resolver
-
-A resolver takes a query object and turns it into a list of endpoints. We
-construct a query using the name of the server, specified in <tt>argv[1]</tt>,
-and the name of the service, in this case <tt>"daytime"</tt>.
-
-\until tcp::resolver::query
-
-The list of endpoints is returned using an iterator of type
-asio::ip::tcp::resolver::iterator. (Note that a default constructed
-asio::ip::tcp::resolver::iterator object can be used as an end iterator.)
-
-\until tcp::resolver::iterator
-
-Now we create and connect the socket. The list of endpoints obtained above may
-contain both IPv4 and IPv6 endpoints, so we need to try each of them until we
-find one that works. This keeps the client program independent of a specific IP
-version. The asio::connect() function does this for us automatically.
-
-\until asio::connect
-
-The connection is open. All we need to do now is read the response from the
-daytime service.
-
-We use a <tt>boost::array</tt> to hold the received data. The asio::buffer()
-function automatically determines the size of the array to help prevent buffer
-overruns. Instead of a <tt>boost::array</tt>, we could have used a <tt>char
-[]</tt> or <tt>std::vector</tt>.
-
-\until read_some
-
-When the server closes the connection, the asio::ip::tcp::socket::read_some()
-function will exit with the asio::error::eof error, which is how we know to
-exit the loop.
-
-\until }
-
-Finally, handle any exceptions that may have been thrown.
-
-\until }
-\until }
-
-See the \ref tutdaytime1src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Next: \ref tutdaytime2
-
-*/
-
-/**
-\page tutdaytime1src Source listing for Daytime.1
-\include daytime1/client.cpp
-Return to \ref tutdaytime1
-*/
-
-/**
-\page tutdaytime2 Daytime.2 - A synchronous TCP daytime server
-
-This tutorial program shows how to use asio to implement a server application
-with TCP.
-
-\dontinclude daytime2/server.cpp
-\skip #include
-
-\until using
-
-We define the function <tt>make_daytime_string()</tt> to create the string to
-be sent back to the client. This function will be reused in all of our daytime
-server applications.
-
-\until asio::io_service
-
-A asio::ip::tcp::acceptor object needs to be created to listen
-for new connections. It is initialised to listen on TCP port 13, for IP version 4.
-
-\until tcp::acceptor
-
-This is an iterative server, which means that it will handle one
-connection at a time. Create a socket that will represent the connection to the
-client, and then wait for a connection.
-
-\until acceptor.accept
-
-A client is accessing our service. Determine the current time
-and transfer this information to the client.
-
-\until }
-\until }
-
-Finally, handle any exceptions.
-
-\until }
-\until }
-
-See the \ref tutdaytime2src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tutdaytime1 \n
-Next: \ref tutdaytime3
-
-*/
-
-/**
-\page tutdaytime2src Source listing for Daytime.2
-\include daytime2/server.cpp
-Return to \ref tutdaytime2
-*/
-
-/**
-\page tutdaytime3 Daytime.3 - An asynchronous TCP daytime server
-
-\section tutdaytime3funcmain The main() function
-
-\dontinclude daytime3/server.cpp
-\skip int main()
-\until try
-\until {
-
-We need to create a server object to accept incoming client connections. The
-asio::io_service object provides I/O services, such as sockets, that the
-server object will use.
-
-\until tcp_server
-
-Run the asio::io_service object so that it will perform asynchronous operations
-on your behalf.
-
-\until return 0;
-\until }
-
-\section tutdaytime3classtcp_server The tcp_server class
-
-\dontinclude daytime3/server.cpp
-\skip class tcp_server
-\until public:
-
-The constructor initialises an acceptor to listen on TCP port 13.
-
-\until private:
-
-The function <tt>start_accept()</tt> creates a socket and initiates an
-asynchronous accept operation to wait for a new connection.
-
-\until }
-
-The function <tt>handle_accept()</tt> is called when the asynchronous accept
-operation initiated by <tt>start_accept()</tt> finishes. It services the client
-request, and then calls <tt>start_accept()</tt> to initiate the next accept
-operation.
-
-\until }
-\until }
-
-\section tutdaytime3classtcp_connection The tcp_connection class
-
-We will use <tt>shared_ptr</tt> and <tt>enable_shared_from_this</tt> because we
-want to keep the <tt>tcp_connection</tt> object alive as long as there is an
-operation that refers to it.
-
-\dontinclude daytime3/server.cpp
-\skip class tcp_connection
-\until shared_ptr
-\until }
-\until }
-
-In the function <tt>start()</tt>, we call asio::async_write() to serve the data
-to the client. Note that we are using asio::async_write(), rather than
-asio::ip::tcp::socket::async_write_some(), to ensure that the entire block of
-data is sent.
-
-\until {
-
-The data to be sent is stored in the class member <tt>message_</tt> as we need
-to keep the data valid until the asynchronous operation is complete.
-
-\until message_
-
-When initiating the asynchronous operation, and if using \ref boost_bind, you
-must specify only the arguments that match the handler's parameter list. In
-this program, both of the argument placeholders (asio::placeholders::error and
-asio::placeholders::bytes_transferred) could potentially have been removed,
-since they are not being used in <tt>handle_write()</tt>.
-
-\until placeholders::bytes_transferred
-
-Any further actions for this client connection are now the responsibility of
-<tt>handle_write()</tt>.
-
-\until };
-
-\section tutdaytime3remunused Removing unused handler parameters
-
-You may have noticed that the <tt>error</tt>, and <tt>bytes_transferred</tt>
-parameters are not used in the body of the <tt>handle_write()</tt> function. If
-parameters are not needed, it is possible to remove them from the function so
-that it looks like:
-
-\code
- void handle_write()
- {
- }
-\endcode
-
-The asio::async_write() call used to initiate the call can then be changed to
-just:
-
-\code
- asio::async_write(socket_, asio::buffer(message_),
- boost::bind(&tcp_connection::handle_write, shared_from_this()));
-\endcode
-
-See the \ref tutdaytime3src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tutdaytime2 \n
-Next: \ref tutdaytime4
-
-*/
-
-/**
-\page tutdaytime3src Source listing for Daytime.3
-\include daytime3/server.cpp
-Return to \ref tutdaytime3
-*/
-
-/**
-\page tutdaytime4 Daytime.4 - A synchronous UDP daytime client
-
-This tutorial program shows how to use asio to implement a client application
-with UDP.
-
-\dontinclude daytime4/client.cpp
-\skip #include
-\until using asio::ip::udp;
-
-The start of the application is essentially the same as for the TCP daytime
-client.
-
-\until asio::io_service
-
-We use an asio::ip::udp::resolver object to find the correct remote endpoint to
-use based on the host and service names. The query is restricted to return only
-IPv4 endpoints by the asio::ip::udp::v4() argument.
-
-\until udp::v4
-
-The asio::ip::udp::resolver::resolve() function is guaranteed to return at
-least one endpoint in the list if it does not fail. This means it is safe to
-dereference the return value directly.
-
-\until udp::endpoint
-
-Since UDP is datagram-oriented, we will not be using a stream socket. Create an
-asio::ip::udp::socket and initiate contact with the remote endpoint.
-
-\until receiver_endpoint
-
-Now we need to be ready to accept whatever the server sends back to us. The
-endpoint on our side that receives the server's response will be initialised by
-asio::ip::udp::socket::receive_from().
-
-\until }
-
-Finally, handle any exceptions that may have been thrown.
-
-\until }
-\until }
-See the \ref tutdaytime4src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tutdaytime3 \n
-Next: \ref tutdaytime5
-
-*/
-
-/**
-\page tutdaytime4src Source listing for Daytime.4
-\include daytime4/client.cpp
-Return to \ref tutdaytime4
-*/
-
-/**
-\page tutdaytime5 Daytime.5 - A synchronous UDP daytime server
-
-This tutorial program shows how to use asio to implement a server application
-with UDP.
-
-\dontinclude daytime5/server.cpp
-\skip int main()
-\until asio::io_service
-
-Create an asio::ip::udp::socket object to receive requests on UDP port 13.
-
-\until udp::socket
-
-Wait for a client to initiate contact with us. The remote_endpoint object will
-be populated by asio::ip::udp::socket::receive_from().
-
-\until throw
-
-Determine what we are going to send back to the client.
-
-\until std::string message
-
-Send the response to the remote_endpoint.
-
-\until }
-\until }
-
-Finally, handle any exceptions.
-
-\until }
-\until }
-
-See the \ref tutdaytime5src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tutdaytime4 \n
-Next: \ref tutdaytime6
-
-*/
-
-/**
-\page tutdaytime5src Source listing for Daytime.5
-\include daytime5/server.cpp
-Return to \ref tutdaytime5
-*/
-
-/**
-\page tutdaytime6 Daytime.6 - An asynchronous UDP daytime server
-
-\section tutdaytime6funcmain The main() function
-
-\dontinclude daytime6/server.cpp
-\skip int main()
-\until try
-\until {
-
-Create a server object to accept incoming client requests, and run
-the asio::io_service object.
-
-\until return 0;
-\until }
-
-\section tutdaytime6classudp_server The udp_server class
-
-\dontinclude daytime6/server.cpp
-\skip class udp_server
-\until public:
-
-The constructor initialises a socket to listen on UDP port 13.
-
-\until private:
-\until {
-
-The function asio::ip::udp::socket::async_receive_from() will cause the
-application to listen in the background for a new request. When such a request
-is received, the asio::io_service object will invoke the
-<tt>handle_receive()</tt> function with two arguments: a value of type
-asio::error_code indicating whether the operation succeeded or failed, and a
-<tt>size_t</tt> value <tt>bytes_transferred</tt> specifying the number of bytes
-received.
-
-\until }
-
-The function <tt>handle_receive()</tt> will service the client request.
-
-\until {
-
-The <tt>error</tt> parameter contains the result of the asynchronous operation.
-Since we only provide the 1-byte <tt>recv_buffer_</tt> to contain the client's
-request, the asio::io_service object would return an error if the client sent
-anything larger. We can ignore such an error if it comes up.
-
-\until {
-
-Determine what we are going to send.
-
-\until make_daytime_string()
-
-We now call asio::ip::udp::socket::async_send_to() to serve the data to the
-client.
-
-\until asio::placeholders::bytes_transferred
-
-When initiating the asynchronous operation, and if using \ref boost_bind, you
-must specify only the arguments that match the handler's parameter list. In
-this program, both of the argument placeholders (asio::placeholders::error and
-asio::placeholders::bytes_transferred) could potentially have been removed.
-
-Start listening for the next client request.
-
-\until start_receive
-
-Any further actions for this client request are now the responsibility of
-<tt>handle_send()</tt>.
-
-\until }
-\until }
-
-The function <tt>handle_send()</tt> is invoked after the service request has
-been completed.
-
-\until }
-\until }
-
-See the \ref tutdaytime6src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tutdaytime5 \n
-Next: \ref tutdaytime7
-
-*/
-
-/**
-\page tutdaytime6src Source listing for Daytime.6
-\include daytime6/server.cpp
-Return to \ref tutdaytime6
-*/
-
-/**
-\page tutdaytime7 Daytime.7 - A combined TCP/UDP asynchronous server
-
-This tutorial program shows how to combine the two asynchronous servers that we
-have just written, into a single server application.
-
-\section tutdaytime7funcmain The main() function
-
-\dontinclude daytime7/server.cpp
-\skip int main()
-\until asio::io_service
-
-We will begin by creating a server object to accept a TCP client connection.
-
-\until tcp_server
-
-We also need a server object to accept a UDP client request.
-
-\until udp_server
-
-We have created two lots of work for the asio::io_service object to do.
-
-\until return 0;
-\until }
-
-\section tutdaytime7classtcp The tcp_connection and tcp_server classes
-
-The following two classes are taken from \ref tutdaytime3 "Daytime.3".
-
-\dontinclude daytime7/server.cpp
-\skip class tcp_connection
-\until };
-\until };
-
-\section tutdaytime7classudp The udp_server class
-
-Similarly, this next class is taken from the
-\ref tutdaytime6 "previous tutorial step".
-
-\dontinclude daytime7/server.cpp
-\skip class udp_server
-\until };
-
-See the \ref tutdaytime7src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tutdaytime6
-
-*/
-
-/**
-\page tutdaytime7src Source listing for Daytime.7
-\include daytime7/server.cpp
-Return to \ref tutdaytime7
-*/
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/index_dox.txt b/3rdparty/asio/src/examples/cpp03/tutorial/index_dox.txt
deleted file mode 100644
index 7d3bd1a2912..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/index_dox.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// Copyright (c) 2003-2016 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)
-//
-
-/**
-\mainpage asio Tutorial
-
-\section tuttimer Basic Skills
-
-The tutorial programs in this first section introduce the fundamental concepts
-required to use the asio toolkit. Before plunging into the complex world of
-network programming, these tutorial programs illustrate the basic skills using
-simple asynchronous timers.
-
-\li \ref tuttimer1
-\li \ref tuttimer2
-\li \ref tuttimer3
-\li \ref tuttimer4
-\li \ref tuttimer5
-
-\section tutdaytime Introduction to Sockets
-
-The tutorial programs in this section show how to use asio to develop simple
-client and server programs. These tutorial programs are based around the <a
-href="http://www.ietf.org/rfc/rfc867.txt">daytime</a> protocol, which supports
-both TCP and UDP.
-
-The first three tutorial programs implement the daytime protocol using TCP.
-
-\li \ref tutdaytime1
-\li \ref tutdaytime2
-\li \ref tutdaytime3
-
-The next three tutorial programs implement the daytime protocol using UDP.
-
-\li \ref tutdaytime4
-\li \ref tutdaytime5
-\li \ref tutdaytime6
-
-The last tutorial program in this section demonstrates how asio allows the TCP
-and UDP servers to be easily combined into a single program.
-
-\li \ref tutdaytime7
-
-*/
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer1/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/timer1/.gitignore
deleted file mode 100644
index 1d47ca67c43..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer1/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-timer
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer2/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/timer2/.gitignore
deleted file mode 100644
index 1d47ca67c43..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer2/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-timer
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer3/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/timer3/.gitignore
deleted file mode 100644
index 1d47ca67c43..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer3/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-timer
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer4/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/timer4/.gitignore
deleted file mode 100644
index 1d47ca67c43..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer4/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-timer
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer5/.gitignore b/3rdparty/asio/src/examples/cpp03/tutorial/timer5/.gitignore
deleted file mode 100644
index 1d47ca67c43..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer5/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-timer
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer_dox.txt b/3rdparty/asio/src/examples/cpp03/tutorial/timer_dox.txt
deleted file mode 100644
index 7c5a0a099a6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer_dox.txt
+++ /dev/null
@@ -1,383 +0,0 @@
-//
-// Copyright (c) 2003-2016 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)
-//
-
-/**
-\page tuttimer1 Timer.1 - Using a timer synchronously
-
-This tutorial program introduces asio by showing how to perform a blocking
-wait on a timer.
-
-\dontinclude timer1/timer.cpp
-\skip #include
-
-We start by including the necessary header files.
-
-All of the asio classes can be used by simply including the <tt>"asio.hpp"</tt>
-header file.
-
-\until asio.hpp
-
-Since this example uses timers, we need to include the appropriate
-Boost.Date_Time header file for manipulating times.
-
-\until posix_time.hpp
-
-All programs that use asio need to have at least one asio::io_service object.
-This class provides access to I/O functionality. We declare an object of this
-type first thing in the main function.
-
-\until asio::io_service
-
-Next we declare an object of type asio::deadline_timer. The core asio classes
-that provide I/O functionality (or as in this case timer functionality) always
-take a reference to an io_service as their first constructor argument. The
-second argument to the constructor sets the timer to expire 5 seconds from now.
-
-\until asio::deadline_timer
-
-In this simple example we perform a blocking wait on the timer.
-That is, the call to asio::deadline_timer::wait() will not return until the
-timer has expired, 5 seconds after it was created (i.e. <b>not</b> from when the
-wait starts).
-
-A deadline timer is always in one of two states: "expired" or "not expired". If
-the asio::deadline_timer::wait() function is called on an expired timer, it
-will return immediately.
-
-\until wait
-
-Finally we print the obligatory <tt>"Hello, world!"</tt>
-message to show when the timer has expired.
-
-\until }
-
-See the \ref tuttimer1src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Next: \ref tuttimer2
-
-*/
-
-/**
-\page tuttimer1src Source listing for Timer.1
-\include timer1/timer.cpp
-Return to \ref tuttimer1
-*/
-
-/**
-\page tuttimer2 Timer.2 - Using a timer asynchronously
-
-This tutorial program demonstrates how to use asio's asynchronous callback
-functionality by modifying the program from tutorial Timer.1 to perform an
-asynchronous wait on the timer.
-
-\dontinclude timer2/timer.cpp
-\skip #include
-
-\until posix_time.hpp
-
-Using asio's asynchronous functionality means having a callback
-function that will be called when an asynchronous operation completes. In this
-program we define a function called <tt>print</tt> to be called when the
-asynchronous wait finishes.
-
-\until asio::deadline_timer
-
-Next, instead of doing a blocking wait as in tutorial Timer.1,
-we call the asio::deadline_timer::async_wait() function to perform an
-asynchronous wait. When calling this function we pass the <tt>print</tt>
-callback handler that was defined above.
-
-\skipline async_wait
-
-Finally, we must call the asio::io_service::run() member function
-on the io_service object.
-
-The asio library provides a guarantee that callback handlers will <b>only</b>
-be called from threads that are currently calling asio::io_service::run().
-Therefore unless the asio::io_service::run() function is called the callback for
-the asynchronous wait completion will never be invoked.
-
-The asio::io_service::run() function will also continue to run while there is
-still "work" to do. In this example, the work is the asynchronous wait on the
-timer, so the call will not return until the timer has expired and the
-callback has completed.
-
-It is important to remember to give the io_service some work to do before
-calling asio::io_service::run(). For example, if we had omitted the above call
-to asio::deadline_timer::async_wait(), the io_service would not have had any
-work to do, and consequently asio::io_service::run() would have returned
-immediately.
-
-\skip run
-\until }
-
-See the \ref tuttimer2src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tuttimer1 \n
-Next: \ref tuttimer3
-
-*/
-
-/**
-\page tuttimer2src Source listing for Timer.2
-\include timer2/timer.cpp
-Return to \ref tuttimer2
-*/
-
-/**
-\page tuttimer3 Timer.3 - Binding arguments to a handler
-
-In this tutorial we will modify the program from tutorial Timer.2 so that the
-timer fires once a second. This will show how to pass additional parameters to
-your handler function.
-
-\dontinclude timer3/timer.cpp
-\skip #include
-
-\until posix_time.hpp
-
-To implement a repeating timer using asio you need to change
-the timer's expiry time in your callback function, and to then start a new
-asynchronous wait. Obviously this means that the callback function will need
-to be able to access the timer object. To this end we add two new parameters
-to the <tt>print</tt> function:
-
-\li A pointer to a timer object.
-
-\li A counter so that we can stop the program when the timer fires for the
-sixth time.
-
-\until {
-
-As mentioned above, this tutorial program uses a counter to
-stop running when the timer fires for the sixth time. However you will observe
-that there is no explicit call to ask the io_service to stop. Recall that in
-tutorial Timer.2 we learnt that the asio::io_service::run() function completes
-when there is no more "work" to do. By not starting a new asynchronous wait on
-the timer when <tt>count</tt> reaches 5, the io_service will run out of work and
-stop running.
-
-\until ++
-
-Next we move the expiry time for the timer along by one second
-from the previous expiry time. By calculating the new expiry time relative to
-the old, we can ensure that the timer does not drift away from the
-whole-second mark due to any delays in processing the handler.
-
-\until expires_at
-
-Then we start a new asynchronous wait on the timer. As you can
-see, the \ref boost_bind function is used to associate the extra parameters
-with your callback handler. The asio::deadline_timer::async_wait() function
-expects a handler function (or function object) with the signature
-<tt>void(const asio::error_code&)</tt>. Binding the additional parameters
-converts your <tt>print</tt> function into a function object that matches the
-signature correctly.
-
-See the <a href="http://www.boost.org/libs/bind/bind.html">Boost.Bind
-documentation</a> for more information on how to use \ref boost_bind.
-
-In this example, the asio::placeholders::error argument to \ref boost_bind is a
-named placeholder for the error object passed to the handler. When initiating
-the asynchronous operation, and if using \ref boost_bind, you must specify only
-the arguments that match the handler's parameter list. In tutorial Timer.4 you
-will see that this placeholder may be elided if the parameter is not needed by
-the callback handler.
-
-\until asio::io_service
-
-A new <tt>count</tt> variable is added so that we can stop the
-program when the timer fires for the sixth time.
-
-\until asio::deadline_timer
-
-As in Step 4, when making the call to
-asio::deadline_timer::async_wait() from <tt>main</tt> we bind the additional
-parameters needed for the <tt>print</tt> function.
-
-\until run
-
-Finally, just to prove that the <tt>count</tt> variable was
-being used in the <tt>print</tt> handler function, we will print out its new
-value.
-
-\until }
-
-See the \ref tuttimer3src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tuttimer2 \n
-Next: \ref tuttimer4
-
-*/
-
-/**
-\page tuttimer3src Source listing for Timer.3
-\include timer3/timer.cpp
-Return to \ref tuttimer3
-*/
-
-/**
-\page tuttimer4 Timer.4 - Using a member function as a handler
-
-In this tutorial we will see how to use a class member function as a callback
-handler. The program should execute identically to the tutorial program from
-tutorial Timer.3.
-
-\dontinclude timer4/timer.cpp
-\skip #include
-
-\until posix_time.hpp
-
-Instead of defining a free function <tt>print</tt> as the
-callback handler, as we did in the earlier tutorial programs, we now define a
-class called <tt>printer</tt>.
-
-\until public
-
-The constructor of this class will take a reference to the
-io_service object and use it when initialising the <tt>timer_</tt> member. The
-counter used to shut down the program is now also a member of the class.
-
-\until {
-
-The \ref boost_bind function works just as well with class
-member functions as with free functions. Since all non-static class member
-functions have an implicit <tt>this</tt> parameter, we need to bind
-<tt>this</tt> to the function. As in tutorial Timer.3, \ref boost_bind
-converts our callback handler (now a member function) into a function object
-that can be invoked as though it has the signature <tt>void(const
-asio::error_code&)</tt>.
-
-You will note that the asio::placeholders::error placeholder is not specified
-here, as the <tt>print</tt> member function does not accept an error object as
-a parameter.
-
-\until }
-
-In the class destructor we will print out the final value of
-the counter.
-
-\until }
-
-The <tt>print</tt> member function is very similar to the
-<tt>print</tt> function from tutorial Timer.3, except that it now operates on
-the class data members instead of having the timer and counter passed in as
-parameters.
-
-\until };
-
-The <tt>main</tt> function is much simpler than before, as it
-now declares a local <tt>printer</tt> object before running the io_service as
-normal.
-
-\until }
-
-See the \ref tuttimer4src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tuttimer3 \n
-Next: \ref tuttimer5 \n
-
-*/
-
-/**
-\page tuttimer4src Source listing for Timer.4
-\include timer4/timer.cpp
-Return to \ref tuttimer4
-*/
-
-/**
-\page tuttimer5 Timer.5 - Synchronising handlers in multithreaded programs
-
-This tutorial demonstrates the use of the asio::io_service::strand class to
-synchronise callback handlers in a multithreaded program.
-
-The previous four tutorials avoided the issue of handler synchronisation by
-calling the asio::io_service::run() function from one thread only. As you
-already know, the asio library provides a guarantee that callback handlers will
-<b>only</b> be called from threads that are currently calling
-asio::io_service::run(). Consequently, calling asio::io_service::run() from
-only one thread ensures that callback handlers cannot run concurrently.
-
-The single threaded approach is usually the best place to start when
-developing applications using asio. The downside is the limitations it places
-on programs, particularly servers, including:
-
-<ul>
-<li>Poor responsiveness when handlers can take a long time to complete.</li>
-<li>An inability to scale on multiprocessor systems.</li>
-</ul>
-
-If you find yourself running into these limitations, an alternative approach
-is to have a pool of threads calling asio::io_service::run(). However, as this
-allows handlers to execute concurrently, we need a method of synchronisation
-when handlers might be accessing a shared, thread-unsafe resource.
-
-\dontinclude timer5/timer.cpp
-\skip #include
-
-\until posix_time.hpp
-
-We start by defining a class called <tt>printer</tt>, similar
-to the class in the previous tutorial. This class will extend the previous
-tutorial by running two timers in parallel.
-
-\until public
-
-In addition to initialising a pair of asio::deadline_timer members, the
-constructor initialises the <tt>strand_</tt> member, an object of type
-asio::io_service::strand.
-
-An asio::io_service::strand is an executor that guarantees that, for those
-handlers that are dispatched through it, an executing handler will be allowed
-to complete before the next one is started. This is guaranteed irrespective of
-the number of threads that are calling asio::io_service::run(). Of course, the
-handlers may still execute concurrently with other handlers that were
-<b>not</b> dispatched through an asio::io_service::strand, or were dispatched
-through a different asio::io_service::strand object.
-
-\until {
-
-When initiating the asynchronous operations, each callback handler is "bound"
-to an asio::io_service::strand object. The
-asio::io_service::strand::bind_executor() function returns a new handler that
-automatically dispatches its contained handler through the
-asio::io_service::strand object. By binding the handlers to the same
-asio::io_service::strand, we are ensuring that they cannot execute
-concurrently.
-
-\until }
-\until }
-
-In a multithreaded program, the handlers for asynchronous
-operations should be synchronised if they access shared resources. In this
-tutorial, the shared resources used by the handlers (<tt>print1</tt> and
-<tt>print2</tt>) are <tt>std::cout</tt> and the <tt>count_</tt> data member.
-
-\until };
-
-The <tt>main</tt> function now causes asio::io_service::run() to
-be called from two threads: the main thread and one additional thread. This is
-accomplished using an asio::thread object.
-
-Just as it would with a call from a single thread, concurrent calls to
-asio::io_service::run() will continue to execute while there is "work" left to
-do. The background thread will not exit until all asynchronous operations have
-completed.
-
-\until }
-
-See the \ref tuttimer5src "full source listing" \n
-Return to the \ref index "tutorial index" \n
-Previous: \ref tuttimer4 \n
-
-*/
-
-/**
-\page tuttimer5src Source listing for Timer.5
-\include timer5/timer.cpp
-Return to \ref tuttimer5
-*/
diff --git a/3rdparty/asio/src/examples/cpp03/windows/.gitignore b/3rdparty/asio/src/examples/cpp03/windows/.gitignore
deleted file mode 100644
index 180ba886e58..00000000000
--- a/3rdparty/asio/src/examples/cpp03/windows/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/Makefile.am b/3rdparty/asio/src/examples/cpp11/Makefile.am
index 182c711229f..a132a469ff5 100644
--- a/3rdparty/asio/src/examples/cpp11/Makefile.am
+++ b/3rdparty/asio/src/examples/cpp11/Makefile.am
@@ -14,6 +14,8 @@ noinst_PROGRAMS = \
buffers/reference_counted \
chat/chat_client \
chat/chat_server \
+ deferred/deferred_1 \
+ deferred/deferred_2 \
echo/async_tcp_echo_server \
echo/async_udp_echo_server \
echo/blocking_tcp_echo_client \
@@ -26,9 +28,84 @@ noinst_PROGRAMS = \
executors/fork_join \
executors/pipeline \
executors/priority_scheduler \
+ files/blocking_file_copy \
+ files/async_file_copy \
futures/daytime_client \
+ handler_tracking/async_tcp_echo_server \
+ http/client/async_client \
+ http/client/sync_client \
http/server/http_server \
- iostreams/http_client
+ http/server2/http_server \
+ http/server3/http_server \
+ http/server4/http_server \
+ icmp/ping \
+ invocation/prioritised_handlers \
+ iostreams/daytime_client \
+ iostreams/daytime_server \
+ iostreams/http_client \
+ multicast/receiver \
+ multicast/sender \
+ nonblocking/third_party_lib \
+ operations/composed_1 \
+ operations/composed_2 \
+ operations/composed_3 \
+ operations/composed_4 \
+ operations/composed_5 \
+ operations/composed_6 \
+ operations/composed_7 \
+ operations/composed_8 \
+ parallel_group/ranged_wait_for_all \
+ parallel_group/wait_for_all \
+ parallel_group/wait_for_one \
+ parallel_group/wait_for_one_error \
+ parallel_group/wait_for_one_success \
+ porthopper/client \
+ porthopper/server \
+ services/daytime_client \
+ socks4/sync_client \
+ timeouts/async_tcp_client \
+ timeouts/blocking_tcp_client \
+ timeouts/blocking_token_tcp_client \
+ timeouts/blocking_udp_client \
+ timeouts/server \
+ timers/time_t_timer \
+ tutorial/timer1/timer \
+ tutorial/timer2/timer \
+ tutorial/timer3/timer \
+ tutorial/timer4/timer \
+ tutorial/timer5/timer \
+ tutorial/daytime1/client \
+ tutorial/daytime2/server \
+ tutorial/daytime3/server \
+ tutorial/daytime4/client \
+ tutorial/daytime5/server \
+ tutorial/daytime6/server \
+ tutorial/daytime7/server \
+ type_erasure/type_erasure
+
+if !WINDOWS_TARGET
+noinst_PROGRAMS += \
+ chat/posix_chat_client \
+ fork/daemon \
+ fork/process_per_connection \
+ local/connect_pair \
+ local/iostream_client \
+ local/stream_server \
+ local/stream_client \
+ local/fd_passing_stream_server \
+ local/fd_passing_stream_client
+endif
+
+if WINDOWS_TARGET
+noinst_PROGRAMS += \
+ windows/transmit_file
+endif
+
+if HAVE_OPENSSL
+noinst_PROGRAMS += \
+ ssl/client \
+ ssl/server
+endif
if HAVE_BOOST_COROUTINE
noinst_PROGRAMS += \
@@ -37,7 +114,51 @@ noinst_PROGRAMS += \
endif
noinst_HEADERS = \
- chat/chat_message.hpp
+ chat/chat_message.hpp \
+ handler_tracking/custom_tracking.hpp \
+ http/server/connection.hpp \
+ http/server/connection_manager.hpp \
+ http/server/header.hpp \
+ http/server/mime_types.hpp \
+ http/server/reply.hpp \
+ http/server/request.hpp \
+ http/server/request_handler.hpp \
+ http/server/request_parser.hpp \
+ http/server/server.hpp \
+ http/server2/connection.hpp \
+ http/server2/io_context_pool.hpp \
+ http/server2/header.hpp \
+ http/server2/mime_types.hpp \
+ http/server2/reply.hpp \
+ http/server2/request.hpp \
+ http/server2/request_handler.hpp \
+ http/server2/request_parser.hpp \
+ http/server2/server.hpp \
+ http/server3/connection.hpp \
+ http/server3/header.hpp \
+ http/server3/mime_types.hpp \
+ http/server3/reply.hpp \
+ http/server3/request.hpp \
+ http/server3/request_handler.hpp \
+ http/server3/request_parser.hpp \
+ http/server3/server.hpp \
+ http/server4/file_handler.hpp \
+ http/server4/header.hpp \
+ http/server4/mime_types.hpp \
+ http/server4/reply.hpp \
+ http/server4/request.hpp \
+ http/server4/request_parser.hpp \
+ http/server4/server.hpp \
+ icmp/icmp_header.hpp \
+ icmp/ipv4_header.hpp \
+ porthopper/protocol.hpp \
+ services/basic_logger.hpp \
+ services/logger.hpp \
+ services/logger_service.hpp \
+ socks4/socks4.hpp \
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
AM_CXXFLAGS = -I$(srcdir)/../../../include
@@ -45,6 +166,8 @@ allocation_server_SOURCES = allocation/server.cpp
buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
chat_chat_client_SOURCES = chat/chat_client.cpp
chat_chat_server_SOURCES = chat/chat_server.cpp
+deferred_deferred_1_SOURCES = deferred/deferred_1.cpp
+deferred_deferred_2_SOURCES = deferred/deferred_2.cpp
echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
@@ -57,7 +180,12 @@ executors_bank_account_2_SOURCES = executors/bank_account_2.cpp
executors_fork_join_SOURCES = executors/fork_join.cpp
executors_pipeline_SOURCES = executors/pipeline.cpp
executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
+files_blocking_file_copy_SOURCES = files/blocking_file_copy.cpp
+files_async_file_copy_SOURCES = files/async_file_copy.cpp
futures_daytime_client_SOURCES = futures/daytime_client.cpp
+handler_tracking_async_tcp_echo_server_SOURCES = handler_tracking/async_tcp_echo_server.cpp
+http_client_async_client_SOURCES = http/client/async_client.cpp
+http_client_sync_client_SOURCES = http/client/sync_client.cpp
http_server_http_server_SOURCES = \
http/server/connection.cpp \
http/server/connection_manager.cpp \
@@ -67,7 +195,97 @@ http_server_http_server_SOURCES = \
http/server/request_handler.cpp \
http/server/request_parser.cpp \
http/server/server.cpp
+http_server2_http_server_SOURCES = \
+ http/server2/connection.cpp \
+ http/server2/io_context_pool.cpp \
+ http/server2/main.cpp \
+ http/server2/mime_types.cpp \
+ http/server2/reply.cpp \
+ http/server2/request_handler.cpp \
+ http/server2/request_parser.cpp \
+ http/server2/server.cpp
+http_server3_http_server_SOURCES = \
+ http/server3/connection.cpp \
+ http/server3/main.cpp \
+ http/server3/mime_types.cpp \
+ http/server3/reply.cpp \
+ http/server3/request_handler.cpp \
+ http/server3/request_parser.cpp \
+ http/server3/server.cpp
+http_server4_http_server_SOURCES = \
+ http/server4/file_handler.cpp \
+ http/server4/main.cpp \
+ http/server4/mime_types.cpp \
+ http/server4/reply.cpp \
+ http/server4/request_parser.cpp \
+ http/server4/server.cpp
+icmp_ping_SOURCES = icmp/ping.cpp
+invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
+iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
+iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
iostreams_http_client_SOURCES = iostreams/http_client.cpp
+multicast_receiver_SOURCES = multicast/receiver.cpp
+multicast_sender_SOURCES = multicast/sender.cpp
+nonblocking_third_party_lib_SOURCES = nonblocking/third_party_lib.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
+parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
+parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
+parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
+parallel_group_wait_for_one_success_SOURCES = parallel_group/wait_for_one_success.cpp
+porthopper_client_SOURCES = porthopper/client.cpp
+porthopper_server_SOURCES = porthopper/server.cpp
+services_daytime_client_SOURCES = \
+ services/daytime_client.cpp \
+ services/logger_service.cpp
+socks4_sync_client_SOURCES = socks4/sync_client.cpp
+timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
+timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
+timeouts_blocking_token_tcp_client_SOURCES = timeouts/blocking_token_tcp_client.cpp
+timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
+timeouts_server_SOURCES = timeouts/server.cpp
+timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
+tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
+tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
+tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
+tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
+tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
+tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
+tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
+tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
+tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
+tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
+tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
+tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
+type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+
+if !WINDOWS_TARGET
+chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
+fork_daemon_SOURCES = fork/daemon.cpp
+fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
+local_connect_pair_SOURCES = local/connect_pair.cpp
+local_iostream_client_SOURCES = local/iostream_client.cpp
+local_stream_server_SOURCES = local/stream_server.cpp
+local_stream_client_SOURCES = local/stream_client.cpp
+local_fd_passing_stream_server_SOURCES = local/fd_passing_stream_server.cpp
+local_fd_passing_stream_client_SOURCES = local/fd_passing_stream_client.cpp
+endif
+
+if WINDOWS_TARGET
+windows_transmit_file_SOURCES = windows/transmit_file.cpp
+endif
+
+if HAVE_OPENSSL
+ssl_client_SOURCES = ssl/client.cpp
+ssl_server_SOURCES = ssl/server.cpp
+endif
if HAVE_BOOST_COROUTINE
spawn_echo_server_SOURCES = spawn/echo_server.cpp
@@ -77,16 +295,14 @@ spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_t
endif
EXTRA_DIST = \
- handler_tracking/custom_tracking.hpp \
- http/server/connection.hpp \
- http/server/connection_manager.hpp \
- http/server/header.hpp \
- http/server/mime_types.hpp \
- http/server/reply.hpp \
- http/server/request.hpp \
- http/server/request_handler.hpp \
- http/server/request_parser.hpp \
- http/server/server.hpp
+ serialization/client.cpp \
+ serialization/server.cpp \
+ serialization/connection.hpp \
+ serialization/stock.hpp \
+ ssl/README \
+ ssl/ca.pem \
+ ssl/server.pem \
+ ssl/dh4096.pem
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp11/Makefile.in b/3rdparty/asio/src/examples/cpp11/Makefile.in
new file mode 100644
index 00000000000..0f73bb5b85a
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/Makefile.in
@@ -0,0 +1,2975 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
+noinst_PROGRAMS = allocation/server$(EXEEXT) \
+ buffers/reference_counted$(EXEEXT) chat/chat_client$(EXEEXT) \
+ chat/chat_server$(EXEEXT) deferred/deferred_1$(EXEEXT) \
+ deferred/deferred_2$(EXEEXT) \
+ echo/async_tcp_echo_server$(EXEEXT) \
+ echo/async_udp_echo_server$(EXEEXT) \
+ echo/blocking_tcp_echo_client$(EXEEXT) \
+ echo/blocking_tcp_echo_server$(EXEEXT) \
+ echo/blocking_udp_echo_client$(EXEEXT) \
+ echo/blocking_udp_echo_server$(EXEEXT) \
+ executors/actor$(EXEEXT) executors/bank_account_1$(EXEEXT) \
+ executors/bank_account_2$(EXEEXT) executors/fork_join$(EXEEXT) \
+ executors/pipeline$(EXEEXT) \
+ executors/priority_scheduler$(EXEEXT) \
+ files/blocking_file_copy$(EXEEXT) \
+ files/async_file_copy$(EXEEXT) futures/daytime_client$(EXEEXT) \
+ handler_tracking/async_tcp_echo_server$(EXEEXT) \
+ http/client/async_client$(EXEEXT) \
+ http/client/sync_client$(EXEEXT) \
+ http/server/http_server$(EXEEXT) \
+ http/server2/http_server$(EXEEXT) \
+ http/server3/http_server$(EXEEXT) \
+ http/server4/http_server$(EXEEXT) icmp/ping$(EXEEXT) \
+ invocation/prioritised_handlers$(EXEEXT) \
+ iostreams/daytime_client$(EXEEXT) \
+ iostreams/daytime_server$(EXEEXT) \
+ iostreams/http_client$(EXEEXT) multicast/receiver$(EXEEXT) \
+ multicast/sender$(EXEEXT) nonblocking/third_party_lib$(EXEEXT) \
+ operations/composed_1$(EXEEXT) operations/composed_2$(EXEEXT) \
+ operations/composed_3$(EXEEXT) operations/composed_4$(EXEEXT) \
+ operations/composed_5$(EXEEXT) operations/composed_6$(EXEEXT) \
+ operations/composed_7$(EXEEXT) operations/composed_8$(EXEEXT) \
+ parallel_group/ranged_wait_for_all$(EXEEXT) \
+ parallel_group/wait_for_all$(EXEEXT) \
+ parallel_group/wait_for_one$(EXEEXT) \
+ parallel_group/wait_for_one_error$(EXEEXT) \
+ parallel_group/wait_for_one_success$(EXEEXT) \
+ porthopper/client$(EXEEXT) porthopper/server$(EXEEXT) \
+ services/daytime_client$(EXEEXT) socks4/sync_client$(EXEEXT) \
+ timeouts/async_tcp_client$(EXEEXT) \
+ timeouts/blocking_tcp_client$(EXEEXT) \
+ timeouts/blocking_token_tcp_client$(EXEEXT) \
+ timeouts/blocking_udp_client$(EXEEXT) timeouts/server$(EXEEXT) \
+ timers/time_t_timer$(EXEEXT) tutorial/timer1/timer$(EXEEXT) \
+ tutorial/timer2/timer$(EXEEXT) tutorial/timer3/timer$(EXEEXT) \
+ tutorial/timer4/timer$(EXEEXT) tutorial/timer5/timer$(EXEEXT) \
+ tutorial/daytime1/client$(EXEEXT) \
+ tutorial/daytime2/server$(EXEEXT) \
+ tutorial/daytime3/server$(EXEEXT) \
+ tutorial/daytime4/client$(EXEEXT) \
+ tutorial/daytime5/server$(EXEEXT) \
+ tutorial/daytime6/server$(EXEEXT) \
+ tutorial/daytime7/server$(EXEEXT) \
+ type_erasure/type_erasure$(EXEEXT) $(am__EXEEXT_1) \
+ $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4)
+@WINDOWS_TARGET_FALSE@am__append_2 = \
+@WINDOWS_TARGET_FALSE@ chat/posix_chat_client \
+@WINDOWS_TARGET_FALSE@ fork/daemon \
+@WINDOWS_TARGET_FALSE@ fork/process_per_connection \
+@WINDOWS_TARGET_FALSE@ local/connect_pair \
+@WINDOWS_TARGET_FALSE@ local/iostream_client \
+@WINDOWS_TARGET_FALSE@ local/stream_server \
+@WINDOWS_TARGET_FALSE@ local/stream_client \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_server \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_client
+
+@WINDOWS_TARGET_TRUE@am__append_3 = \
+@WINDOWS_TARGET_TRUE@ windows/transmit_file
+
+@HAVE_OPENSSL_TRUE@am__append_4 = \
+@HAVE_OPENSSL_TRUE@ ssl/client \
+@HAVE_OPENSSL_TRUE@ ssl/server
+
+@HAVE_BOOST_COROUTINE_TRUE@am__append_5 = \
+@HAVE_BOOST_COROUTINE_TRUE@ spawn/echo_server \
+@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep
+
+subdir = src/examples/cpp11
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@WINDOWS_TARGET_FALSE@am__EXEEXT_1 = chat/posix_chat_client$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ fork/daemon$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ fork/process_per_connection$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/connect_pair$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/iostream_client$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/stream_server$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/stream_client$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_server$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_client$(EXEEXT)
+@WINDOWS_TARGET_TRUE@am__EXEEXT_2 = windows/transmit_file$(EXEEXT)
+@HAVE_OPENSSL_TRUE@am__EXEEXT_3 = ssl/client$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ ssl/server$(EXEEXT)
+@HAVE_BOOST_COROUTINE_TRUE@am__EXEEXT_4 = spawn/echo_server$(EXEEXT) \
+@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libasio_a_AR = $(AR) $(ARFLAGS)
+libasio_a_LIBADD =
+am__libasio_a_SOURCES_DIST = ../../asio.cpp ../../asio_ssl.cpp
+am__dirstamp = $(am__leading_dot)dirstamp
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../../asio_ssl.$(OBJEXT)
+@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = \
+@SEPARATE_COMPILATION_TRUE@ ../../asio.$(OBJEXT) \
+@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
+libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
+am_allocation_server_OBJECTS = allocation/server.$(OBJEXT)
+allocation_server_OBJECTS = $(am_allocation_server_OBJECTS)
+allocation_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@allocation_server_DEPENDENCIES = libasio.a
+am_buffers_reference_counted_OBJECTS = \
+ buffers/reference_counted.$(OBJEXT)
+buffers_reference_counted_OBJECTS = \
+ $(am_buffers_reference_counted_OBJECTS)
+buffers_reference_counted_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@buffers_reference_counted_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_chat_chat_client_OBJECTS = chat/chat_client.$(OBJEXT)
+chat_chat_client_OBJECTS = $(am_chat_chat_client_OBJECTS)
+chat_chat_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@chat_chat_client_DEPENDENCIES = libasio.a
+am_chat_chat_server_OBJECTS = chat/chat_server.$(OBJEXT)
+chat_chat_server_OBJECTS = $(am_chat_chat_server_OBJECTS)
+chat_chat_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@chat_chat_server_DEPENDENCIES = libasio.a
+am__chat_posix_chat_client_SOURCES_DIST = chat/posix_chat_client.cpp
+@WINDOWS_TARGET_FALSE@am_chat_posix_chat_client_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ chat/posix_chat_client.$(OBJEXT)
+chat_posix_chat_client_OBJECTS = $(am_chat_posix_chat_client_OBJECTS)
+chat_posix_chat_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@chat_posix_chat_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_1_OBJECTS = deferred/deferred_1.$(OBJEXT)
+deferred_deferred_1_OBJECTS = $(am_deferred_deferred_1_OBJECTS)
+deferred_deferred_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_2_OBJECTS = deferred/deferred_2.$(OBJEXT)
+deferred_deferred_2_OBJECTS = $(am_deferred_deferred_2_OBJECTS)
+deferred_deferred_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_async_tcp_echo_server_OBJECTS = \
+ echo/async_tcp_echo_server.$(OBJEXT)
+echo_async_tcp_echo_server_OBJECTS = \
+ $(am_echo_async_tcp_echo_server_OBJECTS)
+echo_async_tcp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_async_tcp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_async_udp_echo_server_OBJECTS = \
+ echo/async_udp_echo_server.$(OBJEXT)
+echo_async_udp_echo_server_OBJECTS = \
+ $(am_echo_async_udp_echo_server_OBJECTS)
+echo_async_udp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_async_udp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_tcp_echo_client_OBJECTS = \
+ echo/blocking_tcp_echo_client.$(OBJEXT)
+echo_blocking_tcp_echo_client_OBJECTS = \
+ $(am_echo_blocking_tcp_echo_client_OBJECTS)
+echo_blocking_tcp_echo_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_tcp_echo_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_tcp_echo_server_OBJECTS = \
+ echo/blocking_tcp_echo_server.$(OBJEXT)
+echo_blocking_tcp_echo_server_OBJECTS = \
+ $(am_echo_blocking_tcp_echo_server_OBJECTS)
+echo_blocking_tcp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_tcp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_udp_echo_client_OBJECTS = \
+ echo/blocking_udp_echo_client.$(OBJEXT)
+echo_blocking_udp_echo_client_OBJECTS = \
+ $(am_echo_blocking_udp_echo_client_OBJECTS)
+echo_blocking_udp_echo_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_udp_echo_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_udp_echo_server_OBJECTS = \
+ echo/blocking_udp_echo_server.$(OBJEXT)
+echo_blocking_udp_echo_server_OBJECTS = \
+ $(am_echo_blocking_udp_echo_server_OBJECTS)
+echo_blocking_udp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_udp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_actor_OBJECTS = executors/actor.$(OBJEXT)
+executors_actor_OBJECTS = $(am_executors_actor_OBJECTS)
+executors_actor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_actor_DEPENDENCIES = libasio.a
+am_executors_bank_account_1_OBJECTS = \
+ executors/bank_account_1.$(OBJEXT)
+executors_bank_account_1_OBJECTS = \
+ $(am_executors_bank_account_1_OBJECTS)
+executors_bank_account_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_bank_account_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_bank_account_2_OBJECTS = \
+ executors/bank_account_2.$(OBJEXT)
+executors_bank_account_2_OBJECTS = \
+ $(am_executors_bank_account_2_OBJECTS)
+executors_bank_account_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_bank_account_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_fork_join_OBJECTS = executors/fork_join.$(OBJEXT)
+executors_fork_join_OBJECTS = $(am_executors_fork_join_OBJECTS)
+executors_fork_join_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_fork_join_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_pipeline_OBJECTS = executors/pipeline.$(OBJEXT)
+executors_pipeline_OBJECTS = $(am_executors_pipeline_OBJECTS)
+executors_pipeline_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_pipeline_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_priority_scheduler_OBJECTS = \
+ executors/priority_scheduler.$(OBJEXT)
+executors_priority_scheduler_OBJECTS = \
+ $(am_executors_priority_scheduler_OBJECTS)
+executors_priority_scheduler_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_priority_scheduler_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_files_async_file_copy_OBJECTS = files/async_file_copy.$(OBJEXT)
+files_async_file_copy_OBJECTS = $(am_files_async_file_copy_OBJECTS)
+files_async_file_copy_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@files_async_file_copy_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_files_blocking_file_copy_OBJECTS = \
+ files/blocking_file_copy.$(OBJEXT)
+files_blocking_file_copy_OBJECTS = \
+ $(am_files_blocking_file_copy_OBJECTS)
+files_blocking_file_copy_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@files_blocking_file_copy_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__fork_daemon_SOURCES_DIST = fork/daemon.cpp
+@WINDOWS_TARGET_FALSE@am_fork_daemon_OBJECTS = fork/daemon.$(OBJEXT)
+fork_daemon_OBJECTS = $(am_fork_daemon_OBJECTS)
+fork_daemon_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@fork_daemon_DEPENDENCIES = libasio.a
+am__fork_process_per_connection_SOURCES_DIST = \
+ fork/process_per_connection.cpp
+@WINDOWS_TARGET_FALSE@am_fork_process_per_connection_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ fork/process_per_connection.$(OBJEXT)
+fork_process_per_connection_OBJECTS = \
+ $(am_fork_process_per_connection_OBJECTS)
+fork_process_per_connection_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@fork_process_per_connection_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_futures_daytime_client_OBJECTS = futures/daytime_client.$(OBJEXT)
+futures_daytime_client_OBJECTS = $(am_futures_daytime_client_OBJECTS)
+futures_daytime_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@futures_daytime_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_handler_tracking_async_tcp_echo_server_OBJECTS = \
+ handler_tracking/async_tcp_echo_server.$(OBJEXT)
+handler_tracking_async_tcp_echo_server_OBJECTS = \
+ $(am_handler_tracking_async_tcp_echo_server_OBJECTS)
+handler_tracking_async_tcp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@handler_tracking_async_tcp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_client_async_client_OBJECTS = \
+ http/client/async_client.$(OBJEXT)
+http_client_async_client_OBJECTS = \
+ $(am_http_client_async_client_OBJECTS)
+http_client_async_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_client_async_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_client_sync_client_OBJECTS = \
+ http/client/sync_client.$(OBJEXT)
+http_client_sync_client_OBJECTS = \
+ $(am_http_client_sync_client_OBJECTS)
+http_client_sync_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_client_sync_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server_http_server_OBJECTS = http/server/connection.$(OBJEXT) \
+ http/server/connection_manager.$(OBJEXT) \
+ http/server/main.$(OBJEXT) http/server/mime_types.$(OBJEXT) \
+ http/server/reply.$(OBJEXT) \
+ http/server/request_handler.$(OBJEXT) \
+ http/server/request_parser.$(OBJEXT) \
+ http/server/server.$(OBJEXT)
+http_server_http_server_OBJECTS = \
+ $(am_http_server_http_server_OBJECTS)
+http_server_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server2_http_server_OBJECTS = \
+ http/server2/connection.$(OBJEXT) \
+ http/server2/io_context_pool.$(OBJEXT) \
+ http/server2/main.$(OBJEXT) http/server2/mime_types.$(OBJEXT) \
+ http/server2/reply.$(OBJEXT) \
+ http/server2/request_handler.$(OBJEXT) \
+ http/server2/request_parser.$(OBJEXT) \
+ http/server2/server.$(OBJEXT)
+http_server2_http_server_OBJECTS = \
+ $(am_http_server2_http_server_OBJECTS)
+http_server2_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server2_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server3_http_server_OBJECTS = \
+ http/server3/connection.$(OBJEXT) http/server3/main.$(OBJEXT) \
+ http/server3/mime_types.$(OBJEXT) http/server3/reply.$(OBJEXT) \
+ http/server3/request_handler.$(OBJEXT) \
+ http/server3/request_parser.$(OBJEXT) \
+ http/server3/server.$(OBJEXT)
+http_server3_http_server_OBJECTS = \
+ $(am_http_server3_http_server_OBJECTS)
+http_server3_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server3_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server4_http_server_OBJECTS = \
+ http/server4/file_handler.$(OBJEXT) \
+ http/server4/main.$(OBJEXT) http/server4/mime_types.$(OBJEXT) \
+ http/server4/reply.$(OBJEXT) \
+ http/server4/request_parser.$(OBJEXT) \
+ http/server4/server.$(OBJEXT)
+http_server4_http_server_OBJECTS = \
+ $(am_http_server4_http_server_OBJECTS)
+http_server4_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server4_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_icmp_ping_OBJECTS = icmp/ping.$(OBJEXT)
+icmp_ping_OBJECTS = $(am_icmp_ping_OBJECTS)
+icmp_ping_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@icmp_ping_DEPENDENCIES = libasio.a
+am_invocation_prioritised_handlers_OBJECTS = \
+ invocation/prioritised_handlers.$(OBJEXT)
+invocation_prioritised_handlers_OBJECTS = \
+ $(am_invocation_prioritised_handlers_OBJECTS)
+invocation_prioritised_handlers_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@invocation_prioritised_handlers_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_iostreams_daytime_client_OBJECTS = \
+ iostreams/daytime_client.$(OBJEXT)
+iostreams_daytime_client_OBJECTS = \
+ $(am_iostreams_daytime_client_OBJECTS)
+iostreams_daytime_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@iostreams_daytime_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_iostreams_daytime_server_OBJECTS = \
+ iostreams/daytime_server.$(OBJEXT)
+iostreams_daytime_server_OBJECTS = \
+ $(am_iostreams_daytime_server_OBJECTS)
+iostreams_daytime_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@iostreams_daytime_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_iostreams_http_client_OBJECTS = iostreams/http_client.$(OBJEXT)
+iostreams_http_client_OBJECTS = $(am_iostreams_http_client_OBJECTS)
+iostreams_http_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@iostreams_http_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_connect_pair_SOURCES_DIST = local/connect_pair.cpp
+@WINDOWS_TARGET_FALSE@am_local_connect_pair_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ local/connect_pair.$(OBJEXT)
+local_connect_pair_OBJECTS = $(am_local_connect_pair_OBJECTS)
+local_connect_pair_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_connect_pair_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_fd_passing_stream_client_SOURCES_DIST = \
+ local/fd_passing_stream_client.cpp
+@WINDOWS_TARGET_FALSE@am_local_fd_passing_stream_client_OBJECTS = local/fd_passing_stream_client.$(OBJEXT)
+local_fd_passing_stream_client_OBJECTS = \
+ $(am_local_fd_passing_stream_client_OBJECTS)
+local_fd_passing_stream_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_fd_passing_stream_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_fd_passing_stream_server_SOURCES_DIST = \
+ local/fd_passing_stream_server.cpp
+@WINDOWS_TARGET_FALSE@am_local_fd_passing_stream_server_OBJECTS = local/fd_passing_stream_server.$(OBJEXT)
+local_fd_passing_stream_server_OBJECTS = \
+ $(am_local_fd_passing_stream_server_OBJECTS)
+local_fd_passing_stream_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_fd_passing_stream_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_iostream_client_SOURCES_DIST = local/iostream_client.cpp
+@WINDOWS_TARGET_FALSE@am_local_iostream_client_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ local/iostream_client.$(OBJEXT)
+local_iostream_client_OBJECTS = $(am_local_iostream_client_OBJECTS)
+local_iostream_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_iostream_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_stream_client_SOURCES_DIST = local/stream_client.cpp
+@WINDOWS_TARGET_FALSE@am_local_stream_client_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ local/stream_client.$(OBJEXT)
+local_stream_client_OBJECTS = $(am_local_stream_client_OBJECTS)
+local_stream_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_stream_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_stream_server_SOURCES_DIST = local/stream_server.cpp
+@WINDOWS_TARGET_FALSE@am_local_stream_server_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ local/stream_server.$(OBJEXT)
+local_stream_server_OBJECTS = $(am_local_stream_server_OBJECTS)
+local_stream_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_stream_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_multicast_receiver_OBJECTS = multicast/receiver.$(OBJEXT)
+multicast_receiver_OBJECTS = $(am_multicast_receiver_OBJECTS)
+multicast_receiver_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@multicast_receiver_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_multicast_sender_OBJECTS = multicast/sender.$(OBJEXT)
+multicast_sender_OBJECTS = $(am_multicast_sender_OBJECTS)
+multicast_sender_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@multicast_sender_DEPENDENCIES = libasio.a
+am_nonblocking_third_party_lib_OBJECTS = \
+ nonblocking/third_party_lib.$(OBJEXT)
+nonblocking_third_party_lib_OBJECTS = \
+ $(am_nonblocking_third_party_lib_OBJECTS)
+nonblocking_third_party_lib_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@nonblocking_third_party_lib_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_1_OBJECTS = operations/composed_1.$(OBJEXT)
+operations_composed_1_OBJECTS = $(am_operations_composed_1_OBJECTS)
+operations_composed_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_2_OBJECTS = operations/composed_2.$(OBJEXT)
+operations_composed_2_OBJECTS = $(am_operations_composed_2_OBJECTS)
+operations_composed_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_3_OBJECTS = operations/composed_3.$(OBJEXT)
+operations_composed_3_OBJECTS = $(am_operations_composed_3_OBJECTS)
+operations_composed_3_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_3_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_4_OBJECTS = operations/composed_4.$(OBJEXT)
+operations_composed_4_OBJECTS = $(am_operations_composed_4_OBJECTS)
+operations_composed_4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_5_OBJECTS = operations/composed_5.$(OBJEXT)
+operations_composed_5_OBJECTS = $(am_operations_composed_5_OBJECTS)
+operations_composed_5_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_5_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_6_OBJECTS = operations/composed_6.$(OBJEXT)
+operations_composed_6_OBJECTS = $(am_operations_composed_6_OBJECTS)
+operations_composed_6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_7_OBJECTS = operations/composed_7.$(OBJEXT)
+operations_composed_7_OBJECTS = $(am_operations_composed_7_OBJECTS)
+operations_composed_7_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_7_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_8_OBJECTS = operations/composed_8.$(OBJEXT)
+operations_composed_8_OBJECTS = $(am_operations_composed_8_OBJECTS)
+operations_composed_8_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_8_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_ranged_wait_for_all_OBJECTS = \
+ parallel_group/ranged_wait_for_all.$(OBJEXT)
+parallel_group_ranged_wait_for_all_OBJECTS = \
+ $(am_parallel_group_ranged_wait_for_all_OBJECTS)
+parallel_group_ranged_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_ranged_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_all_OBJECTS = \
+ parallel_group/wait_for_all.$(OBJEXT)
+parallel_group_wait_for_all_OBJECTS = \
+ $(am_parallel_group_wait_for_all_OBJECTS)
+parallel_group_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_OBJECTS = \
+ parallel_group/wait_for_one.$(OBJEXT)
+parallel_group_wait_for_one_OBJECTS = \
+ $(am_parallel_group_wait_for_one_OBJECTS)
+parallel_group_wait_for_one_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_error_OBJECTS = \
+ parallel_group/wait_for_one_error.$(OBJEXT)
+parallel_group_wait_for_one_error_OBJECTS = \
+ $(am_parallel_group_wait_for_one_error_OBJECTS)
+parallel_group_wait_for_one_error_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_error_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_success_OBJECTS = \
+ parallel_group/wait_for_one_success.$(OBJEXT)
+parallel_group_wait_for_one_success_OBJECTS = \
+ $(am_parallel_group_wait_for_one_success_OBJECTS)
+parallel_group_wait_for_one_success_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_success_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_porthopper_client_OBJECTS = porthopper/client.$(OBJEXT)
+porthopper_client_OBJECTS = $(am_porthopper_client_OBJECTS)
+porthopper_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@porthopper_client_DEPENDENCIES = libasio.a
+am_porthopper_server_OBJECTS = porthopper/server.$(OBJEXT)
+porthopper_server_OBJECTS = $(am_porthopper_server_OBJECTS)
+porthopper_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@porthopper_server_DEPENDENCIES = libasio.a
+am_services_daytime_client_OBJECTS = \
+ services/daytime_client.$(OBJEXT) \
+ services/logger_service.$(OBJEXT)
+services_daytime_client_OBJECTS = \
+ $(am_services_daytime_client_OBJECTS)
+services_daytime_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@services_daytime_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_socks4_sync_client_OBJECTS = socks4/sync_client.$(OBJEXT)
+socks4_sync_client_OBJECTS = $(am_socks4_sync_client_OBJECTS)
+socks4_sync_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@socks4_sync_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__spawn_echo_server_SOURCES_DIST = spawn/echo_server.cpp
+@HAVE_BOOST_COROUTINE_TRUE@am_spawn_echo_server_OBJECTS = \
+@HAVE_BOOST_COROUTINE_TRUE@ spawn/echo_server.$(OBJEXT)
+spawn_echo_server_OBJECTS = $(am_spawn_echo_server_OBJECTS)
+@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_DEPENDENCIES = $(LDADD)
+am__spawn_parallel_grep_SOURCES_DIST = spawn/parallel_grep.cpp
+@HAVE_BOOST_COROUTINE_TRUE@am_spawn_parallel_grep_OBJECTS = \
+@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep.$(OBJEXT)
+spawn_parallel_grep_OBJECTS = $(am_spawn_parallel_grep_OBJECTS)
+@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_DEPENDENCIES = \
+@HAVE_BOOST_COROUTINE_TRUE@ $(LDADD)
+am__ssl_client_SOURCES_DIST = ssl/client.cpp
+@HAVE_OPENSSL_TRUE@am_ssl_client_OBJECTS = ssl/client.$(OBJEXT)
+ssl_client_OBJECTS = $(am_ssl_client_OBJECTS)
+ssl_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@ssl_client_DEPENDENCIES = libasio.a
+am__ssl_server_SOURCES_DIST = ssl/server.cpp
+@HAVE_OPENSSL_TRUE@am_ssl_server_OBJECTS = ssl/server.$(OBJEXT)
+ssl_server_OBJECTS = $(am_ssl_server_OBJECTS)
+ssl_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@ssl_server_DEPENDENCIES = libasio.a
+am_timeouts_async_tcp_client_OBJECTS = \
+ timeouts/async_tcp_client.$(OBJEXT)
+timeouts_async_tcp_client_OBJECTS = \
+ $(am_timeouts_async_tcp_client_OBJECTS)
+timeouts_async_tcp_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@timeouts_async_tcp_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_timeouts_blocking_tcp_client_OBJECTS = \
+ timeouts/blocking_tcp_client.$(OBJEXT)
+timeouts_blocking_tcp_client_OBJECTS = \
+ $(am_timeouts_blocking_tcp_client_OBJECTS)
+timeouts_blocking_tcp_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@timeouts_blocking_tcp_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_timeouts_blocking_token_tcp_client_OBJECTS = \
+ timeouts/blocking_token_tcp_client.$(OBJEXT)
+timeouts_blocking_token_tcp_client_OBJECTS = \
+ $(am_timeouts_blocking_token_tcp_client_OBJECTS)
+timeouts_blocking_token_tcp_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@timeouts_blocking_token_tcp_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_timeouts_blocking_udp_client_OBJECTS = \
+ timeouts/blocking_udp_client.$(OBJEXT)
+timeouts_blocking_udp_client_OBJECTS = \
+ $(am_timeouts_blocking_udp_client_OBJECTS)
+timeouts_blocking_udp_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@timeouts_blocking_udp_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_timeouts_server_OBJECTS = timeouts/server.$(OBJEXT)
+timeouts_server_OBJECTS = $(am_timeouts_server_OBJECTS)
+timeouts_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@timeouts_server_DEPENDENCIES = libasio.a
+am_timers_time_t_timer_OBJECTS = timers/time_t_timer.$(OBJEXT)
+timers_time_t_timer_OBJECTS = $(am_timers_time_t_timer_OBJECTS)
+timers_time_t_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@timers_time_t_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime1_client_OBJECTS = \
+ tutorial/daytime1/client.$(OBJEXT)
+tutorial_daytime1_client_OBJECTS = \
+ $(am_tutorial_daytime1_client_OBJECTS)
+tutorial_daytime1_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime1_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime2_server_OBJECTS = \
+ tutorial/daytime2/server.$(OBJEXT)
+tutorial_daytime2_server_OBJECTS = \
+ $(am_tutorial_daytime2_server_OBJECTS)
+tutorial_daytime2_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime2_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime3_server_OBJECTS = \
+ tutorial/daytime3/server.$(OBJEXT)
+tutorial_daytime3_server_OBJECTS = \
+ $(am_tutorial_daytime3_server_OBJECTS)
+tutorial_daytime3_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime3_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime4_client_OBJECTS = \
+ tutorial/daytime4/client.$(OBJEXT)
+tutorial_daytime4_client_OBJECTS = \
+ $(am_tutorial_daytime4_client_OBJECTS)
+tutorial_daytime4_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime4_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime5_server_OBJECTS = \
+ tutorial/daytime5/server.$(OBJEXT)
+tutorial_daytime5_server_OBJECTS = \
+ $(am_tutorial_daytime5_server_OBJECTS)
+tutorial_daytime5_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime5_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime6_server_OBJECTS = \
+ tutorial/daytime6/server.$(OBJEXT)
+tutorial_daytime6_server_OBJECTS = \
+ $(am_tutorial_daytime6_server_OBJECTS)
+tutorial_daytime6_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime6_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime7_server_OBJECTS = \
+ tutorial/daytime7/server.$(OBJEXT)
+tutorial_daytime7_server_OBJECTS = \
+ $(am_tutorial_daytime7_server_OBJECTS)
+tutorial_daytime7_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime7_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer1_timer_OBJECTS = tutorial/timer1/timer.$(OBJEXT)
+tutorial_timer1_timer_OBJECTS = $(am_tutorial_timer1_timer_OBJECTS)
+tutorial_timer1_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer1_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer2_timer_OBJECTS = tutorial/timer2/timer.$(OBJEXT)
+tutorial_timer2_timer_OBJECTS = $(am_tutorial_timer2_timer_OBJECTS)
+tutorial_timer2_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer2_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer3_timer_OBJECTS = tutorial/timer3/timer.$(OBJEXT)
+tutorial_timer3_timer_OBJECTS = $(am_tutorial_timer3_timer_OBJECTS)
+tutorial_timer3_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer3_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer4_timer_OBJECTS = tutorial/timer4/timer.$(OBJEXT)
+tutorial_timer4_timer_OBJECTS = $(am_tutorial_timer4_timer_OBJECTS)
+tutorial_timer4_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer4_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer5_timer_OBJECTS = tutorial/timer5/timer.$(OBJEXT)
+tutorial_timer5_timer_OBJECTS = $(am_tutorial_timer5_timer_OBJECTS)
+tutorial_timer5_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer5_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_type_erasure_type_erasure_OBJECTS = type_erasure/main.$(OBJEXT) \
+ type_erasure/stdin_line_reader.$(OBJEXT) \
+ type_erasure/sleep.$(OBJEXT)
+type_erasure_type_erasure_OBJECTS = \
+ $(am_type_erasure_type_erasure_OBJECTS)
+type_erasure_type_erasure_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@type_erasure_type_erasure_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__windows_transmit_file_SOURCES_DIST = windows/transmit_file.cpp
+@WINDOWS_TARGET_TRUE@am_windows_transmit_file_OBJECTS = \
+@WINDOWS_TARGET_TRUE@ windows/transmit_file.$(OBJEXT)
+windows_transmit_file_OBJECTS = $(am_windows_transmit_file_OBJECTS)
+windows_transmit_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@windows_transmit_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
+ ../../$(DEPDIR)/asio_ssl.Po allocation/$(DEPDIR)/server.Po \
+ buffers/$(DEPDIR)/reference_counted.Po \
+ chat/$(DEPDIR)/chat_client.Po chat/$(DEPDIR)/chat_server.Po \
+ chat/$(DEPDIR)/posix_chat_client.Po \
+ deferred/$(DEPDIR)/deferred_1.Po \
+ deferred/$(DEPDIR)/deferred_2.Po \
+ echo/$(DEPDIR)/async_tcp_echo_server.Po \
+ echo/$(DEPDIR)/async_udp_echo_server.Po \
+ echo/$(DEPDIR)/blocking_tcp_echo_client.Po \
+ echo/$(DEPDIR)/blocking_tcp_echo_server.Po \
+ echo/$(DEPDIR)/blocking_udp_echo_client.Po \
+ echo/$(DEPDIR)/blocking_udp_echo_server.Po \
+ executors/$(DEPDIR)/actor.Po \
+ executors/$(DEPDIR)/bank_account_1.Po \
+ executors/$(DEPDIR)/bank_account_2.Po \
+ executors/$(DEPDIR)/fork_join.Po \
+ executors/$(DEPDIR)/pipeline.Po \
+ executors/$(DEPDIR)/priority_scheduler.Po \
+ files/$(DEPDIR)/async_file_copy.Po \
+ files/$(DEPDIR)/blocking_file_copy.Po fork/$(DEPDIR)/daemon.Po \
+ fork/$(DEPDIR)/process_per_connection.Po \
+ futures/$(DEPDIR)/daytime_client.Po \
+ handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po \
+ http/client/$(DEPDIR)/async_client.Po \
+ http/client/$(DEPDIR)/sync_client.Po \
+ http/server/$(DEPDIR)/connection.Po \
+ http/server/$(DEPDIR)/connection_manager.Po \
+ http/server/$(DEPDIR)/main.Po \
+ http/server/$(DEPDIR)/mime_types.Po \
+ http/server/$(DEPDIR)/reply.Po \
+ http/server/$(DEPDIR)/request_handler.Po \
+ http/server/$(DEPDIR)/request_parser.Po \
+ http/server/$(DEPDIR)/server.Po \
+ http/server2/$(DEPDIR)/connection.Po \
+ http/server2/$(DEPDIR)/io_context_pool.Po \
+ http/server2/$(DEPDIR)/main.Po \
+ http/server2/$(DEPDIR)/mime_types.Po \
+ http/server2/$(DEPDIR)/reply.Po \
+ http/server2/$(DEPDIR)/request_handler.Po \
+ http/server2/$(DEPDIR)/request_parser.Po \
+ http/server2/$(DEPDIR)/server.Po \
+ http/server3/$(DEPDIR)/connection.Po \
+ http/server3/$(DEPDIR)/main.Po \
+ http/server3/$(DEPDIR)/mime_types.Po \
+ http/server3/$(DEPDIR)/reply.Po \
+ http/server3/$(DEPDIR)/request_handler.Po \
+ http/server3/$(DEPDIR)/request_parser.Po \
+ http/server3/$(DEPDIR)/server.Po \
+ http/server4/$(DEPDIR)/file_handler.Po \
+ http/server4/$(DEPDIR)/main.Po \
+ http/server4/$(DEPDIR)/mime_types.Po \
+ http/server4/$(DEPDIR)/reply.Po \
+ http/server4/$(DEPDIR)/request_parser.Po \
+ http/server4/$(DEPDIR)/server.Po icmp/$(DEPDIR)/ping.Po \
+ invocation/$(DEPDIR)/prioritised_handlers.Po \
+ iostreams/$(DEPDIR)/daytime_client.Po \
+ iostreams/$(DEPDIR)/daytime_server.Po \
+ iostreams/$(DEPDIR)/http_client.Po \
+ local/$(DEPDIR)/connect_pair.Po \
+ local/$(DEPDIR)/fd_passing_stream_client.Po \
+ local/$(DEPDIR)/fd_passing_stream_server.Po \
+ local/$(DEPDIR)/iostream_client.Po \
+ local/$(DEPDIR)/stream_client.Po \
+ local/$(DEPDIR)/stream_server.Po \
+ multicast/$(DEPDIR)/receiver.Po multicast/$(DEPDIR)/sender.Po \
+ nonblocking/$(DEPDIR)/third_party_lib.Po \
+ operations/$(DEPDIR)/composed_1.Po \
+ operations/$(DEPDIR)/composed_2.Po \
+ operations/$(DEPDIR)/composed_3.Po \
+ operations/$(DEPDIR)/composed_4.Po \
+ operations/$(DEPDIR)/composed_5.Po \
+ operations/$(DEPDIR)/composed_6.Po \
+ operations/$(DEPDIR)/composed_7.Po \
+ operations/$(DEPDIR)/composed_8.Po \
+ parallel_group/$(DEPDIR)/ranged_wait_for_all.Po \
+ parallel_group/$(DEPDIR)/wait_for_all.Po \
+ parallel_group/$(DEPDIR)/wait_for_one.Po \
+ parallel_group/$(DEPDIR)/wait_for_one_error.Po \
+ parallel_group/$(DEPDIR)/wait_for_one_success.Po \
+ porthopper/$(DEPDIR)/client.Po porthopper/$(DEPDIR)/server.Po \
+ services/$(DEPDIR)/daytime_client.Po \
+ services/$(DEPDIR)/logger_service.Po \
+ socks4/$(DEPDIR)/sync_client.Po spawn/$(DEPDIR)/echo_server.Po \
+ spawn/$(DEPDIR)/parallel_grep.Po ssl/$(DEPDIR)/client.Po \
+ ssl/$(DEPDIR)/server.Po timeouts/$(DEPDIR)/async_tcp_client.Po \
+ timeouts/$(DEPDIR)/blocking_tcp_client.Po \
+ timeouts/$(DEPDIR)/blocking_token_tcp_client.Po \
+ timeouts/$(DEPDIR)/blocking_udp_client.Po \
+ timeouts/$(DEPDIR)/server.Po timers/$(DEPDIR)/time_t_timer.Po \
+ tutorial/daytime1/$(DEPDIR)/client.Po \
+ tutorial/daytime2/$(DEPDIR)/server.Po \
+ tutorial/daytime3/$(DEPDIR)/server.Po \
+ tutorial/daytime4/$(DEPDIR)/client.Po \
+ tutorial/daytime5/$(DEPDIR)/server.Po \
+ tutorial/daytime6/$(DEPDIR)/server.Po \
+ tutorial/daytime7/$(DEPDIR)/server.Po \
+ tutorial/timer1/$(DEPDIR)/timer.Po \
+ tutorial/timer2/$(DEPDIR)/timer.Po \
+ tutorial/timer3/$(DEPDIR)/timer.Po \
+ tutorial/timer4/$(DEPDIR)/timer.Po \
+ tutorial/timer5/$(DEPDIR)/timer.Po \
+ type_erasure/$(DEPDIR)/main.Po type_erasure/$(DEPDIR)/sleep.Po \
+ type_erasure/$(DEPDIR)/stdin_line_reader.Po \
+ windows/$(DEPDIR)/transmit_file.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libasio_a_SOURCES) $(allocation_server_SOURCES) \
+ $(buffers_reference_counted_SOURCES) \
+ $(chat_chat_client_SOURCES) $(chat_chat_server_SOURCES) \
+ $(chat_posix_chat_client_SOURCES) \
+ $(deferred_deferred_1_SOURCES) $(deferred_deferred_2_SOURCES) \
+ $(echo_async_tcp_echo_server_SOURCES) \
+ $(echo_async_udp_echo_server_SOURCES) \
+ $(echo_blocking_tcp_echo_client_SOURCES) \
+ $(echo_blocking_tcp_echo_server_SOURCES) \
+ $(echo_blocking_udp_echo_client_SOURCES) \
+ $(echo_blocking_udp_echo_server_SOURCES) \
+ $(executors_actor_SOURCES) $(executors_bank_account_1_SOURCES) \
+ $(executors_bank_account_2_SOURCES) \
+ $(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
+ $(executors_priority_scheduler_SOURCES) \
+ $(files_async_file_copy_SOURCES) \
+ $(files_blocking_file_copy_SOURCES) $(fork_daemon_SOURCES) \
+ $(fork_process_per_connection_SOURCES) \
+ $(futures_daytime_client_SOURCES) \
+ $(handler_tracking_async_tcp_echo_server_SOURCES) \
+ $(http_client_async_client_SOURCES) \
+ $(http_client_sync_client_SOURCES) \
+ $(http_server_http_server_SOURCES) \
+ $(http_server2_http_server_SOURCES) \
+ $(http_server3_http_server_SOURCES) \
+ $(http_server4_http_server_SOURCES) $(icmp_ping_SOURCES) \
+ $(invocation_prioritised_handlers_SOURCES) \
+ $(iostreams_daytime_client_SOURCES) \
+ $(iostreams_daytime_server_SOURCES) \
+ $(iostreams_http_client_SOURCES) $(local_connect_pair_SOURCES) \
+ $(local_fd_passing_stream_client_SOURCES) \
+ $(local_fd_passing_stream_server_SOURCES) \
+ $(local_iostream_client_SOURCES) \
+ $(local_stream_client_SOURCES) $(local_stream_server_SOURCES) \
+ $(multicast_receiver_SOURCES) $(multicast_sender_SOURCES) \
+ $(nonblocking_third_party_lib_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_one_SOURCES) \
+ $(parallel_group_wait_for_one_error_SOURCES) \
+ $(parallel_group_wait_for_one_success_SOURCES) \
+ $(porthopper_client_SOURCES) $(porthopper_server_SOURCES) \
+ $(services_daytime_client_SOURCES) \
+ $(socks4_sync_client_SOURCES) $(spawn_echo_server_SOURCES) \
+ $(spawn_parallel_grep_SOURCES) $(ssl_client_SOURCES) \
+ $(ssl_server_SOURCES) $(timeouts_async_tcp_client_SOURCES) \
+ $(timeouts_blocking_tcp_client_SOURCES) \
+ $(timeouts_blocking_token_tcp_client_SOURCES) \
+ $(timeouts_blocking_udp_client_SOURCES) \
+ $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES) \
+ $(tutorial_daytime1_client_SOURCES) \
+ $(tutorial_daytime2_server_SOURCES) \
+ $(tutorial_daytime3_server_SOURCES) \
+ $(tutorial_daytime4_client_SOURCES) \
+ $(tutorial_daytime5_server_SOURCES) \
+ $(tutorial_daytime6_server_SOURCES) \
+ $(tutorial_daytime7_server_SOURCES) \
+ $(tutorial_timer1_timer_SOURCES) \
+ $(tutorial_timer2_timer_SOURCES) \
+ $(tutorial_timer3_timer_SOURCES) \
+ $(tutorial_timer4_timer_SOURCES) \
+ $(tutorial_timer5_timer_SOURCES) \
+ $(type_erasure_type_erasure_SOURCES) \
+ $(windows_transmit_file_SOURCES)
+DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
+ $(allocation_server_SOURCES) \
+ $(buffers_reference_counted_SOURCES) \
+ $(chat_chat_client_SOURCES) $(chat_chat_server_SOURCES) \
+ $(am__chat_posix_chat_client_SOURCES_DIST) \
+ $(deferred_deferred_1_SOURCES) $(deferred_deferred_2_SOURCES) \
+ $(echo_async_tcp_echo_server_SOURCES) \
+ $(echo_async_udp_echo_server_SOURCES) \
+ $(echo_blocking_tcp_echo_client_SOURCES) \
+ $(echo_blocking_tcp_echo_server_SOURCES) \
+ $(echo_blocking_udp_echo_client_SOURCES) \
+ $(echo_blocking_udp_echo_server_SOURCES) \
+ $(executors_actor_SOURCES) $(executors_bank_account_1_SOURCES) \
+ $(executors_bank_account_2_SOURCES) \
+ $(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
+ $(executors_priority_scheduler_SOURCES) \
+ $(files_async_file_copy_SOURCES) \
+ $(files_blocking_file_copy_SOURCES) \
+ $(am__fork_daemon_SOURCES_DIST) \
+ $(am__fork_process_per_connection_SOURCES_DIST) \
+ $(futures_daytime_client_SOURCES) \
+ $(handler_tracking_async_tcp_echo_server_SOURCES) \
+ $(http_client_async_client_SOURCES) \
+ $(http_client_sync_client_SOURCES) \
+ $(http_server_http_server_SOURCES) \
+ $(http_server2_http_server_SOURCES) \
+ $(http_server3_http_server_SOURCES) \
+ $(http_server4_http_server_SOURCES) $(icmp_ping_SOURCES) \
+ $(invocation_prioritised_handlers_SOURCES) \
+ $(iostreams_daytime_client_SOURCES) \
+ $(iostreams_daytime_server_SOURCES) \
+ $(iostreams_http_client_SOURCES) \
+ $(am__local_connect_pair_SOURCES_DIST) \
+ $(am__local_fd_passing_stream_client_SOURCES_DIST) \
+ $(am__local_fd_passing_stream_server_SOURCES_DIST) \
+ $(am__local_iostream_client_SOURCES_DIST) \
+ $(am__local_stream_client_SOURCES_DIST) \
+ $(am__local_stream_server_SOURCES_DIST) \
+ $(multicast_receiver_SOURCES) $(multicast_sender_SOURCES) \
+ $(nonblocking_third_party_lib_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_one_SOURCES) \
+ $(parallel_group_wait_for_one_error_SOURCES) \
+ $(parallel_group_wait_for_one_success_SOURCES) \
+ $(porthopper_client_SOURCES) $(porthopper_server_SOURCES) \
+ $(services_daytime_client_SOURCES) \
+ $(socks4_sync_client_SOURCES) \
+ $(am__spawn_echo_server_SOURCES_DIST) \
+ $(am__spawn_parallel_grep_SOURCES_DIST) \
+ $(am__ssl_client_SOURCES_DIST) $(am__ssl_server_SOURCES_DIST) \
+ $(timeouts_async_tcp_client_SOURCES) \
+ $(timeouts_blocking_tcp_client_SOURCES) \
+ $(timeouts_blocking_token_tcp_client_SOURCES) \
+ $(timeouts_blocking_udp_client_SOURCES) \
+ $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES) \
+ $(tutorial_daytime1_client_SOURCES) \
+ $(tutorial_daytime2_server_SOURCES) \
+ $(tutorial_daytime3_server_SOURCES) \
+ $(tutorial_daytime4_client_SOURCES) \
+ $(tutorial_daytime5_server_SOURCES) \
+ $(tutorial_daytime6_server_SOURCES) \
+ $(tutorial_daytime7_server_SOURCES) \
+ $(tutorial_timer1_timer_SOURCES) \
+ $(tutorial_timer2_timer_SOURCES) \
+ $(tutorial_timer3_timer_SOURCES) \
+ $(tutorial_timer4_timer_SOURCES) \
+ $(tutorial_timer5_timer_SOURCES) \
+ $(type_erasure_type_erasure_SOURCES) \
+ $(am__windows_transmit_file_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
+@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../../asio.cpp \
+@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
+@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
+noinst_HEADERS = \
+ chat/chat_message.hpp \
+ handler_tracking/custom_tracking.hpp \
+ http/server/connection.hpp \
+ http/server/connection_manager.hpp \
+ http/server/header.hpp \
+ http/server/mime_types.hpp \
+ http/server/reply.hpp \
+ http/server/request.hpp \
+ http/server/request_handler.hpp \
+ http/server/request_parser.hpp \
+ http/server/server.hpp \
+ http/server2/connection.hpp \
+ http/server2/io_context_pool.hpp \
+ http/server2/header.hpp \
+ http/server2/mime_types.hpp \
+ http/server2/reply.hpp \
+ http/server2/request.hpp \
+ http/server2/request_handler.hpp \
+ http/server2/request_parser.hpp \
+ http/server2/server.hpp \
+ http/server3/connection.hpp \
+ http/server3/header.hpp \
+ http/server3/mime_types.hpp \
+ http/server3/reply.hpp \
+ http/server3/request.hpp \
+ http/server3/request_handler.hpp \
+ http/server3/request_parser.hpp \
+ http/server3/server.hpp \
+ http/server4/file_handler.hpp \
+ http/server4/header.hpp \
+ http/server4/mime_types.hpp \
+ http/server4/reply.hpp \
+ http/server4/request.hpp \
+ http/server4/request_parser.hpp \
+ http/server4/server.hpp \
+ icmp/icmp_header.hpp \
+ icmp/ipv4_header.hpp \
+ porthopper/protocol.hpp \
+ services/basic_logger.hpp \
+ services/logger.hpp \
+ services/logger_service.hpp \
+ socks4/socks4.hpp \
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
+
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+allocation_server_SOURCES = allocation/server.cpp
+buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
+chat_chat_client_SOURCES = chat/chat_client.cpp
+chat_chat_server_SOURCES = chat/chat_server.cpp
+deferred_deferred_1_SOURCES = deferred/deferred_1.cpp
+deferred_deferred_2_SOURCES = deferred/deferred_2.cpp
+echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
+echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
+echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
+echo_blocking_tcp_echo_server_SOURCES = echo/blocking_tcp_echo_server.cpp
+echo_blocking_udp_echo_client_SOURCES = echo/blocking_udp_echo_client.cpp
+echo_blocking_udp_echo_server_SOURCES = echo/blocking_udp_echo_server.cpp
+executors_actor_SOURCES = executors/actor.cpp
+executors_bank_account_1_SOURCES = executors/bank_account_1.cpp
+executors_bank_account_2_SOURCES = executors/bank_account_2.cpp
+executors_fork_join_SOURCES = executors/fork_join.cpp
+executors_pipeline_SOURCES = executors/pipeline.cpp
+executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
+files_blocking_file_copy_SOURCES = files/blocking_file_copy.cpp
+files_async_file_copy_SOURCES = files/async_file_copy.cpp
+futures_daytime_client_SOURCES = futures/daytime_client.cpp
+handler_tracking_async_tcp_echo_server_SOURCES = handler_tracking/async_tcp_echo_server.cpp
+http_client_async_client_SOURCES = http/client/async_client.cpp
+http_client_sync_client_SOURCES = http/client/sync_client.cpp
+http_server_http_server_SOURCES = \
+ http/server/connection.cpp \
+ http/server/connection_manager.cpp \
+ http/server/main.cpp \
+ http/server/mime_types.cpp \
+ http/server/reply.cpp \
+ http/server/request_handler.cpp \
+ http/server/request_parser.cpp \
+ http/server/server.cpp
+
+http_server2_http_server_SOURCES = \
+ http/server2/connection.cpp \
+ http/server2/io_context_pool.cpp \
+ http/server2/main.cpp \
+ http/server2/mime_types.cpp \
+ http/server2/reply.cpp \
+ http/server2/request_handler.cpp \
+ http/server2/request_parser.cpp \
+ http/server2/server.cpp
+
+http_server3_http_server_SOURCES = \
+ http/server3/connection.cpp \
+ http/server3/main.cpp \
+ http/server3/mime_types.cpp \
+ http/server3/reply.cpp \
+ http/server3/request_handler.cpp \
+ http/server3/request_parser.cpp \
+ http/server3/server.cpp
+
+http_server4_http_server_SOURCES = \
+ http/server4/file_handler.cpp \
+ http/server4/main.cpp \
+ http/server4/mime_types.cpp \
+ http/server4/reply.cpp \
+ http/server4/request_parser.cpp \
+ http/server4/server.cpp
+
+icmp_ping_SOURCES = icmp/ping.cpp
+invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
+iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
+iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
+iostreams_http_client_SOURCES = iostreams/http_client.cpp
+multicast_receiver_SOURCES = multicast/receiver.cpp
+multicast_sender_SOURCES = multicast/sender.cpp
+nonblocking_third_party_lib_SOURCES = nonblocking/third_party_lib.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
+parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
+parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
+parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
+parallel_group_wait_for_one_success_SOURCES = parallel_group/wait_for_one_success.cpp
+porthopper_client_SOURCES = porthopper/client.cpp
+porthopper_server_SOURCES = porthopper/server.cpp
+services_daytime_client_SOURCES = \
+ services/daytime_client.cpp \
+ services/logger_service.cpp
+
+socks4_sync_client_SOURCES = socks4/sync_client.cpp
+timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
+timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
+timeouts_blocking_token_tcp_client_SOURCES = timeouts/blocking_token_tcp_client.cpp
+timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
+timeouts_server_SOURCES = timeouts/server.cpp
+timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
+tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
+tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
+tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
+tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
+tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
+tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
+tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
+tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
+tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
+tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
+tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
+tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
+type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+@WINDOWS_TARGET_FALSE@chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
+@WINDOWS_TARGET_FALSE@fork_daemon_SOURCES = fork/daemon.cpp
+@WINDOWS_TARGET_FALSE@fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
+@WINDOWS_TARGET_FALSE@local_connect_pair_SOURCES = local/connect_pair.cpp
+@WINDOWS_TARGET_FALSE@local_iostream_client_SOURCES = local/iostream_client.cpp
+@WINDOWS_TARGET_FALSE@local_stream_server_SOURCES = local/stream_server.cpp
+@WINDOWS_TARGET_FALSE@local_stream_client_SOURCES = local/stream_client.cpp
+@WINDOWS_TARGET_FALSE@local_fd_passing_stream_server_SOURCES = local/fd_passing_stream_server.cpp
+@WINDOWS_TARGET_FALSE@local_fd_passing_stream_client_SOURCES = local/fd_passing_stream_client.cpp
+@WINDOWS_TARGET_TRUE@windows_transmit_file_SOURCES = windows/transmit_file.cpp
+@HAVE_OPENSSL_TRUE@ssl_client_SOURCES = ssl/client.cpp
+@HAVE_OPENSSL_TRUE@ssl_server_SOURCES = ssl/server.cpp
+@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_SOURCES = spawn/echo_server.cpp
+@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
+@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
+@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
+EXTRA_DIST = \
+ serialization/client.cpp \
+ serialization/server.cpp \
+ serialization/connection.hpp \
+ serialization/stock.hpp \
+ ssl/README \
+ ssl/ca.pem \
+ ssl/server.pem \
+ ssl/dh4096.pem
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/cpp11/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/examples/cpp11/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../../$(am__dirstamp):
+ @$(MKDIR_P) ../..
+ @: > ../../$(am__dirstamp)
+../../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../../$(DEPDIR)
+ @: > ../../$(DEPDIR)/$(am__dirstamp)
+../../asio.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+../../asio_ssl.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+
+libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libasio.a
+ $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libasio.a
+allocation/$(am__dirstamp):
+ @$(MKDIR_P) allocation
+ @: > allocation/$(am__dirstamp)
+allocation/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) allocation/$(DEPDIR)
+ @: > allocation/$(DEPDIR)/$(am__dirstamp)
+allocation/server.$(OBJEXT): allocation/$(am__dirstamp) \
+ allocation/$(DEPDIR)/$(am__dirstamp)
+
+allocation/server$(EXEEXT): $(allocation_server_OBJECTS) $(allocation_server_DEPENDENCIES) $(EXTRA_allocation_server_DEPENDENCIES) allocation/$(am__dirstamp)
+ @rm -f allocation/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(allocation_server_OBJECTS) $(allocation_server_LDADD) $(LIBS)
+buffers/$(am__dirstamp):
+ @$(MKDIR_P) buffers
+ @: > buffers/$(am__dirstamp)
+buffers/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) buffers/$(DEPDIR)
+ @: > buffers/$(DEPDIR)/$(am__dirstamp)
+buffers/reference_counted.$(OBJEXT): buffers/$(am__dirstamp) \
+ buffers/$(DEPDIR)/$(am__dirstamp)
+
+buffers/reference_counted$(EXEEXT): $(buffers_reference_counted_OBJECTS) $(buffers_reference_counted_DEPENDENCIES) $(EXTRA_buffers_reference_counted_DEPENDENCIES) buffers/$(am__dirstamp)
+ @rm -f buffers/reference_counted$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(buffers_reference_counted_OBJECTS) $(buffers_reference_counted_LDADD) $(LIBS)
+chat/$(am__dirstamp):
+ @$(MKDIR_P) chat
+ @: > chat/$(am__dirstamp)
+chat/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) chat/$(DEPDIR)
+ @: > chat/$(DEPDIR)/$(am__dirstamp)
+chat/chat_client.$(OBJEXT): chat/$(am__dirstamp) \
+ chat/$(DEPDIR)/$(am__dirstamp)
+
+chat/chat_client$(EXEEXT): $(chat_chat_client_OBJECTS) $(chat_chat_client_DEPENDENCIES) $(EXTRA_chat_chat_client_DEPENDENCIES) chat/$(am__dirstamp)
+ @rm -f chat/chat_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(chat_chat_client_OBJECTS) $(chat_chat_client_LDADD) $(LIBS)
+chat/chat_server.$(OBJEXT): chat/$(am__dirstamp) \
+ chat/$(DEPDIR)/$(am__dirstamp)
+
+chat/chat_server$(EXEEXT): $(chat_chat_server_OBJECTS) $(chat_chat_server_DEPENDENCIES) $(EXTRA_chat_chat_server_DEPENDENCIES) chat/$(am__dirstamp)
+ @rm -f chat/chat_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(chat_chat_server_OBJECTS) $(chat_chat_server_LDADD) $(LIBS)
+chat/posix_chat_client.$(OBJEXT): chat/$(am__dirstamp) \
+ chat/$(DEPDIR)/$(am__dirstamp)
+
+chat/posix_chat_client$(EXEEXT): $(chat_posix_chat_client_OBJECTS) $(chat_posix_chat_client_DEPENDENCIES) $(EXTRA_chat_posix_chat_client_DEPENDENCIES) chat/$(am__dirstamp)
+ @rm -f chat/posix_chat_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(chat_posix_chat_client_OBJECTS) $(chat_posix_chat_client_LDADD) $(LIBS)
+deferred/$(am__dirstamp):
+ @$(MKDIR_P) deferred
+ @: > deferred/$(am__dirstamp)
+deferred/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) deferred/$(DEPDIR)
+ @: > deferred/$(DEPDIR)/$(am__dirstamp)
+deferred/deferred_1.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_1$(EXEEXT): $(deferred_deferred_1_OBJECTS) $(deferred_deferred_1_DEPENDENCIES) $(EXTRA_deferred_deferred_1_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_1_OBJECTS) $(deferred_deferred_1_LDADD) $(LIBS)
+deferred/deferred_2.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_2$(EXEEXT): $(deferred_deferred_2_OBJECTS) $(deferred_deferred_2_DEPENDENCIES) $(EXTRA_deferred_deferred_2_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_2_OBJECTS) $(deferred_deferred_2_LDADD) $(LIBS)
+echo/$(am__dirstamp):
+ @$(MKDIR_P) echo
+ @: > echo/$(am__dirstamp)
+echo/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) echo/$(DEPDIR)
+ @: > echo/$(DEPDIR)/$(am__dirstamp)
+echo/async_tcp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/async_tcp_echo_server$(EXEEXT): $(echo_async_tcp_echo_server_OBJECTS) $(echo_async_tcp_echo_server_DEPENDENCIES) $(EXTRA_echo_async_tcp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/async_tcp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_async_tcp_echo_server_OBJECTS) $(echo_async_tcp_echo_server_LDADD) $(LIBS)
+echo/async_udp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/async_udp_echo_server$(EXEEXT): $(echo_async_udp_echo_server_OBJECTS) $(echo_async_udp_echo_server_DEPENDENCIES) $(EXTRA_echo_async_udp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/async_udp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_async_udp_echo_server_OBJECTS) $(echo_async_udp_echo_server_LDADD) $(LIBS)
+echo/blocking_tcp_echo_client.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_tcp_echo_client$(EXEEXT): $(echo_blocking_tcp_echo_client_OBJECTS) $(echo_blocking_tcp_echo_client_DEPENDENCIES) $(EXTRA_echo_blocking_tcp_echo_client_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_tcp_echo_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_tcp_echo_client_OBJECTS) $(echo_blocking_tcp_echo_client_LDADD) $(LIBS)
+echo/blocking_tcp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_tcp_echo_server$(EXEEXT): $(echo_blocking_tcp_echo_server_OBJECTS) $(echo_blocking_tcp_echo_server_DEPENDENCIES) $(EXTRA_echo_blocking_tcp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_tcp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_tcp_echo_server_OBJECTS) $(echo_blocking_tcp_echo_server_LDADD) $(LIBS)
+echo/blocking_udp_echo_client.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_udp_echo_client$(EXEEXT): $(echo_blocking_udp_echo_client_OBJECTS) $(echo_blocking_udp_echo_client_DEPENDENCIES) $(EXTRA_echo_blocking_udp_echo_client_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_udp_echo_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_udp_echo_client_OBJECTS) $(echo_blocking_udp_echo_client_LDADD) $(LIBS)
+echo/blocking_udp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_udp_echo_server$(EXEEXT): $(echo_blocking_udp_echo_server_OBJECTS) $(echo_blocking_udp_echo_server_DEPENDENCIES) $(EXTRA_echo_blocking_udp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_udp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_udp_echo_server_OBJECTS) $(echo_blocking_udp_echo_server_LDADD) $(LIBS)
+executors/$(am__dirstamp):
+ @$(MKDIR_P) executors
+ @: > executors/$(am__dirstamp)
+executors/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) executors/$(DEPDIR)
+ @: > executors/$(DEPDIR)/$(am__dirstamp)
+executors/actor.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/actor$(EXEEXT): $(executors_actor_OBJECTS) $(executors_actor_DEPENDENCIES) $(EXTRA_executors_actor_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/actor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_actor_OBJECTS) $(executors_actor_LDADD) $(LIBS)
+executors/bank_account_1.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/bank_account_1$(EXEEXT): $(executors_bank_account_1_OBJECTS) $(executors_bank_account_1_DEPENDENCIES) $(EXTRA_executors_bank_account_1_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/bank_account_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_bank_account_1_OBJECTS) $(executors_bank_account_1_LDADD) $(LIBS)
+executors/bank_account_2.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/bank_account_2$(EXEEXT): $(executors_bank_account_2_OBJECTS) $(executors_bank_account_2_DEPENDENCIES) $(EXTRA_executors_bank_account_2_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/bank_account_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_bank_account_2_OBJECTS) $(executors_bank_account_2_LDADD) $(LIBS)
+executors/fork_join.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/fork_join$(EXEEXT): $(executors_fork_join_OBJECTS) $(executors_fork_join_DEPENDENCIES) $(EXTRA_executors_fork_join_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/fork_join$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_fork_join_OBJECTS) $(executors_fork_join_LDADD) $(LIBS)
+executors/pipeline.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/pipeline$(EXEEXT): $(executors_pipeline_OBJECTS) $(executors_pipeline_DEPENDENCIES) $(EXTRA_executors_pipeline_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/pipeline$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_pipeline_OBJECTS) $(executors_pipeline_LDADD) $(LIBS)
+executors/priority_scheduler.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/priority_scheduler$(EXEEXT): $(executors_priority_scheduler_OBJECTS) $(executors_priority_scheduler_DEPENDENCIES) $(EXTRA_executors_priority_scheduler_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/priority_scheduler$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_priority_scheduler_OBJECTS) $(executors_priority_scheduler_LDADD) $(LIBS)
+files/$(am__dirstamp):
+ @$(MKDIR_P) files
+ @: > files/$(am__dirstamp)
+files/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) files/$(DEPDIR)
+ @: > files/$(DEPDIR)/$(am__dirstamp)
+files/async_file_copy.$(OBJEXT): files/$(am__dirstamp) \
+ files/$(DEPDIR)/$(am__dirstamp)
+
+files/async_file_copy$(EXEEXT): $(files_async_file_copy_OBJECTS) $(files_async_file_copy_DEPENDENCIES) $(EXTRA_files_async_file_copy_DEPENDENCIES) files/$(am__dirstamp)
+ @rm -f files/async_file_copy$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(files_async_file_copy_OBJECTS) $(files_async_file_copy_LDADD) $(LIBS)
+files/blocking_file_copy.$(OBJEXT): files/$(am__dirstamp) \
+ files/$(DEPDIR)/$(am__dirstamp)
+
+files/blocking_file_copy$(EXEEXT): $(files_blocking_file_copy_OBJECTS) $(files_blocking_file_copy_DEPENDENCIES) $(EXTRA_files_blocking_file_copy_DEPENDENCIES) files/$(am__dirstamp)
+ @rm -f files/blocking_file_copy$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(files_blocking_file_copy_OBJECTS) $(files_blocking_file_copy_LDADD) $(LIBS)
+fork/$(am__dirstamp):
+ @$(MKDIR_P) fork
+ @: > fork/$(am__dirstamp)
+fork/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) fork/$(DEPDIR)
+ @: > fork/$(DEPDIR)/$(am__dirstamp)
+fork/daemon.$(OBJEXT): fork/$(am__dirstamp) \
+ fork/$(DEPDIR)/$(am__dirstamp)
+
+fork/daemon$(EXEEXT): $(fork_daemon_OBJECTS) $(fork_daemon_DEPENDENCIES) $(EXTRA_fork_daemon_DEPENDENCIES) fork/$(am__dirstamp)
+ @rm -f fork/daemon$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(fork_daemon_OBJECTS) $(fork_daemon_LDADD) $(LIBS)
+fork/process_per_connection.$(OBJEXT): fork/$(am__dirstamp) \
+ fork/$(DEPDIR)/$(am__dirstamp)
+
+fork/process_per_connection$(EXEEXT): $(fork_process_per_connection_OBJECTS) $(fork_process_per_connection_DEPENDENCIES) $(EXTRA_fork_process_per_connection_DEPENDENCIES) fork/$(am__dirstamp)
+ @rm -f fork/process_per_connection$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(fork_process_per_connection_OBJECTS) $(fork_process_per_connection_LDADD) $(LIBS)
+futures/$(am__dirstamp):
+ @$(MKDIR_P) futures
+ @: > futures/$(am__dirstamp)
+futures/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) futures/$(DEPDIR)
+ @: > futures/$(DEPDIR)/$(am__dirstamp)
+futures/daytime_client.$(OBJEXT): futures/$(am__dirstamp) \
+ futures/$(DEPDIR)/$(am__dirstamp)
+
+futures/daytime_client$(EXEEXT): $(futures_daytime_client_OBJECTS) $(futures_daytime_client_DEPENDENCIES) $(EXTRA_futures_daytime_client_DEPENDENCIES) futures/$(am__dirstamp)
+ @rm -f futures/daytime_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(futures_daytime_client_OBJECTS) $(futures_daytime_client_LDADD) $(LIBS)
+handler_tracking/$(am__dirstamp):
+ @$(MKDIR_P) handler_tracking
+ @: > handler_tracking/$(am__dirstamp)
+handler_tracking/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) handler_tracking/$(DEPDIR)
+ @: > handler_tracking/$(DEPDIR)/$(am__dirstamp)
+handler_tracking/async_tcp_echo_server.$(OBJEXT): \
+ handler_tracking/$(am__dirstamp) \
+ handler_tracking/$(DEPDIR)/$(am__dirstamp)
+
+handler_tracking/async_tcp_echo_server$(EXEEXT): $(handler_tracking_async_tcp_echo_server_OBJECTS) $(handler_tracking_async_tcp_echo_server_DEPENDENCIES) $(EXTRA_handler_tracking_async_tcp_echo_server_DEPENDENCIES) handler_tracking/$(am__dirstamp)
+ @rm -f handler_tracking/async_tcp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(handler_tracking_async_tcp_echo_server_OBJECTS) $(handler_tracking_async_tcp_echo_server_LDADD) $(LIBS)
+http/client/$(am__dirstamp):
+ @$(MKDIR_P) http/client
+ @: > http/client/$(am__dirstamp)
+http/client/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/client/$(DEPDIR)
+ @: > http/client/$(DEPDIR)/$(am__dirstamp)
+http/client/async_client.$(OBJEXT): http/client/$(am__dirstamp) \
+ http/client/$(DEPDIR)/$(am__dirstamp)
+
+http/client/async_client$(EXEEXT): $(http_client_async_client_OBJECTS) $(http_client_async_client_DEPENDENCIES) $(EXTRA_http_client_async_client_DEPENDENCIES) http/client/$(am__dirstamp)
+ @rm -f http/client/async_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_client_async_client_OBJECTS) $(http_client_async_client_LDADD) $(LIBS)
+http/client/sync_client.$(OBJEXT): http/client/$(am__dirstamp) \
+ http/client/$(DEPDIR)/$(am__dirstamp)
+
+http/client/sync_client$(EXEEXT): $(http_client_sync_client_OBJECTS) $(http_client_sync_client_DEPENDENCIES) $(EXTRA_http_client_sync_client_DEPENDENCIES) http/client/$(am__dirstamp)
+ @rm -f http/client/sync_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_client_sync_client_OBJECTS) $(http_client_sync_client_LDADD) $(LIBS)
+http/server/$(am__dirstamp):
+ @$(MKDIR_P) http/server
+ @: > http/server/$(am__dirstamp)
+http/server/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server/$(DEPDIR)
+ @: > http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/connection.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/connection_manager.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/main.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/mime_types.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/reply.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/request_handler.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/request_parser.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+http/server/server.$(OBJEXT): http/server/$(am__dirstamp) \
+ http/server/$(DEPDIR)/$(am__dirstamp)
+
+http/server/http_server$(EXEEXT): $(http_server_http_server_OBJECTS) $(http_server_http_server_DEPENDENCIES) $(EXTRA_http_server_http_server_DEPENDENCIES) http/server/$(am__dirstamp)
+ @rm -f http/server/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server_http_server_OBJECTS) $(http_server_http_server_LDADD) $(LIBS)
+http/server2/$(am__dirstamp):
+ @$(MKDIR_P) http/server2
+ @: > http/server2/$(am__dirstamp)
+http/server2/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server2/$(DEPDIR)
+ @: > http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/connection.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/io_context_pool.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/main.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/mime_types.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/reply.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/request_handler.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/request_parser.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/server.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+
+http/server2/http_server$(EXEEXT): $(http_server2_http_server_OBJECTS) $(http_server2_http_server_DEPENDENCIES) $(EXTRA_http_server2_http_server_DEPENDENCIES) http/server2/$(am__dirstamp)
+ @rm -f http/server2/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server2_http_server_OBJECTS) $(http_server2_http_server_LDADD) $(LIBS)
+http/server3/$(am__dirstamp):
+ @$(MKDIR_P) http/server3
+ @: > http/server3/$(am__dirstamp)
+http/server3/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server3/$(DEPDIR)
+ @: > http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/connection.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/main.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/mime_types.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/reply.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/request_handler.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/request_parser.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/server.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+
+http/server3/http_server$(EXEEXT): $(http_server3_http_server_OBJECTS) $(http_server3_http_server_DEPENDENCIES) $(EXTRA_http_server3_http_server_DEPENDENCIES) http/server3/$(am__dirstamp)
+ @rm -f http/server3/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server3_http_server_OBJECTS) $(http_server3_http_server_LDADD) $(LIBS)
+http/server4/$(am__dirstamp):
+ @$(MKDIR_P) http/server4
+ @: > http/server4/$(am__dirstamp)
+http/server4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server4/$(DEPDIR)
+ @: > http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/file_handler.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/main.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/mime_types.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/reply.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/request_parser.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/server.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+
+http/server4/http_server$(EXEEXT): $(http_server4_http_server_OBJECTS) $(http_server4_http_server_DEPENDENCIES) $(EXTRA_http_server4_http_server_DEPENDENCIES) http/server4/$(am__dirstamp)
+ @rm -f http/server4/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server4_http_server_OBJECTS) $(http_server4_http_server_LDADD) $(LIBS)
+icmp/$(am__dirstamp):
+ @$(MKDIR_P) icmp
+ @: > icmp/$(am__dirstamp)
+icmp/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) icmp/$(DEPDIR)
+ @: > icmp/$(DEPDIR)/$(am__dirstamp)
+icmp/ping.$(OBJEXT): icmp/$(am__dirstamp) \
+ icmp/$(DEPDIR)/$(am__dirstamp)
+
+icmp/ping$(EXEEXT): $(icmp_ping_OBJECTS) $(icmp_ping_DEPENDENCIES) $(EXTRA_icmp_ping_DEPENDENCIES) icmp/$(am__dirstamp)
+ @rm -f icmp/ping$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(icmp_ping_OBJECTS) $(icmp_ping_LDADD) $(LIBS)
+invocation/$(am__dirstamp):
+ @$(MKDIR_P) invocation
+ @: > invocation/$(am__dirstamp)
+invocation/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) invocation/$(DEPDIR)
+ @: > invocation/$(DEPDIR)/$(am__dirstamp)
+invocation/prioritised_handlers.$(OBJEXT): invocation/$(am__dirstamp) \
+ invocation/$(DEPDIR)/$(am__dirstamp)
+
+invocation/prioritised_handlers$(EXEEXT): $(invocation_prioritised_handlers_OBJECTS) $(invocation_prioritised_handlers_DEPENDENCIES) $(EXTRA_invocation_prioritised_handlers_DEPENDENCIES) invocation/$(am__dirstamp)
+ @rm -f invocation/prioritised_handlers$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(invocation_prioritised_handlers_OBJECTS) $(invocation_prioritised_handlers_LDADD) $(LIBS)
+iostreams/$(am__dirstamp):
+ @$(MKDIR_P) iostreams
+ @: > iostreams/$(am__dirstamp)
+iostreams/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) iostreams/$(DEPDIR)
+ @: > iostreams/$(DEPDIR)/$(am__dirstamp)
+iostreams/daytime_client.$(OBJEXT): iostreams/$(am__dirstamp) \
+ iostreams/$(DEPDIR)/$(am__dirstamp)
+
+iostreams/daytime_client$(EXEEXT): $(iostreams_daytime_client_OBJECTS) $(iostreams_daytime_client_DEPENDENCIES) $(EXTRA_iostreams_daytime_client_DEPENDENCIES) iostreams/$(am__dirstamp)
+ @rm -f iostreams/daytime_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(iostreams_daytime_client_OBJECTS) $(iostreams_daytime_client_LDADD) $(LIBS)
+iostreams/daytime_server.$(OBJEXT): iostreams/$(am__dirstamp) \
+ iostreams/$(DEPDIR)/$(am__dirstamp)
+
+iostreams/daytime_server$(EXEEXT): $(iostreams_daytime_server_OBJECTS) $(iostreams_daytime_server_DEPENDENCIES) $(EXTRA_iostreams_daytime_server_DEPENDENCIES) iostreams/$(am__dirstamp)
+ @rm -f iostreams/daytime_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(iostreams_daytime_server_OBJECTS) $(iostreams_daytime_server_LDADD) $(LIBS)
+iostreams/http_client.$(OBJEXT): iostreams/$(am__dirstamp) \
+ iostreams/$(DEPDIR)/$(am__dirstamp)
+
+iostreams/http_client$(EXEEXT): $(iostreams_http_client_OBJECTS) $(iostreams_http_client_DEPENDENCIES) $(EXTRA_iostreams_http_client_DEPENDENCIES) iostreams/$(am__dirstamp)
+ @rm -f iostreams/http_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(iostreams_http_client_OBJECTS) $(iostreams_http_client_LDADD) $(LIBS)
+local/$(am__dirstamp):
+ @$(MKDIR_P) local
+ @: > local/$(am__dirstamp)
+local/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) local/$(DEPDIR)
+ @: > local/$(DEPDIR)/$(am__dirstamp)
+local/connect_pair.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/connect_pair$(EXEEXT): $(local_connect_pair_OBJECTS) $(local_connect_pair_DEPENDENCIES) $(EXTRA_local_connect_pair_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/connect_pair$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_connect_pair_OBJECTS) $(local_connect_pair_LDADD) $(LIBS)
+local/fd_passing_stream_client.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/fd_passing_stream_client$(EXEEXT): $(local_fd_passing_stream_client_OBJECTS) $(local_fd_passing_stream_client_DEPENDENCIES) $(EXTRA_local_fd_passing_stream_client_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/fd_passing_stream_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_fd_passing_stream_client_OBJECTS) $(local_fd_passing_stream_client_LDADD) $(LIBS)
+local/fd_passing_stream_server.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/fd_passing_stream_server$(EXEEXT): $(local_fd_passing_stream_server_OBJECTS) $(local_fd_passing_stream_server_DEPENDENCIES) $(EXTRA_local_fd_passing_stream_server_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/fd_passing_stream_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_fd_passing_stream_server_OBJECTS) $(local_fd_passing_stream_server_LDADD) $(LIBS)
+local/iostream_client.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/iostream_client$(EXEEXT): $(local_iostream_client_OBJECTS) $(local_iostream_client_DEPENDENCIES) $(EXTRA_local_iostream_client_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/iostream_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_iostream_client_OBJECTS) $(local_iostream_client_LDADD) $(LIBS)
+local/stream_client.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/stream_client$(EXEEXT): $(local_stream_client_OBJECTS) $(local_stream_client_DEPENDENCIES) $(EXTRA_local_stream_client_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/stream_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_stream_client_OBJECTS) $(local_stream_client_LDADD) $(LIBS)
+local/stream_server.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/stream_server$(EXEEXT): $(local_stream_server_OBJECTS) $(local_stream_server_DEPENDENCIES) $(EXTRA_local_stream_server_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/stream_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_stream_server_OBJECTS) $(local_stream_server_LDADD) $(LIBS)
+multicast/$(am__dirstamp):
+ @$(MKDIR_P) multicast
+ @: > multicast/$(am__dirstamp)
+multicast/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) multicast/$(DEPDIR)
+ @: > multicast/$(DEPDIR)/$(am__dirstamp)
+multicast/receiver.$(OBJEXT): multicast/$(am__dirstamp) \
+ multicast/$(DEPDIR)/$(am__dirstamp)
+
+multicast/receiver$(EXEEXT): $(multicast_receiver_OBJECTS) $(multicast_receiver_DEPENDENCIES) $(EXTRA_multicast_receiver_DEPENDENCIES) multicast/$(am__dirstamp)
+ @rm -f multicast/receiver$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(multicast_receiver_OBJECTS) $(multicast_receiver_LDADD) $(LIBS)
+multicast/sender.$(OBJEXT): multicast/$(am__dirstamp) \
+ multicast/$(DEPDIR)/$(am__dirstamp)
+
+multicast/sender$(EXEEXT): $(multicast_sender_OBJECTS) $(multicast_sender_DEPENDENCIES) $(EXTRA_multicast_sender_DEPENDENCIES) multicast/$(am__dirstamp)
+ @rm -f multicast/sender$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(multicast_sender_OBJECTS) $(multicast_sender_LDADD) $(LIBS)
+nonblocking/$(am__dirstamp):
+ @$(MKDIR_P) nonblocking
+ @: > nonblocking/$(am__dirstamp)
+nonblocking/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) nonblocking/$(DEPDIR)
+ @: > nonblocking/$(DEPDIR)/$(am__dirstamp)
+nonblocking/third_party_lib.$(OBJEXT): nonblocking/$(am__dirstamp) \
+ nonblocking/$(DEPDIR)/$(am__dirstamp)
+
+nonblocking/third_party_lib$(EXEEXT): $(nonblocking_third_party_lib_OBJECTS) $(nonblocking_third_party_lib_DEPENDENCIES) $(EXTRA_nonblocking_third_party_lib_DEPENDENCIES) nonblocking/$(am__dirstamp)
+ @rm -f nonblocking/third_party_lib$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(nonblocking_third_party_lib_OBJECTS) $(nonblocking_third_party_lib_LDADD) $(LIBS)
+operations/$(am__dirstamp):
+ @$(MKDIR_P) operations
+ @: > operations/$(am__dirstamp)
+operations/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) operations/$(DEPDIR)
+ @: > operations/$(DEPDIR)/$(am__dirstamp)
+operations/composed_1.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_1$(EXEEXT): $(operations_composed_1_OBJECTS) $(operations_composed_1_DEPENDENCIES) $(EXTRA_operations_composed_1_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_1_OBJECTS) $(operations_composed_1_LDADD) $(LIBS)
+operations/composed_2.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_2$(EXEEXT): $(operations_composed_2_OBJECTS) $(operations_composed_2_DEPENDENCIES) $(EXTRA_operations_composed_2_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_2_OBJECTS) $(operations_composed_2_LDADD) $(LIBS)
+operations/composed_3.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_3$(EXEEXT): $(operations_composed_3_OBJECTS) $(operations_composed_3_DEPENDENCIES) $(EXTRA_operations_composed_3_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_3$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_3_OBJECTS) $(operations_composed_3_LDADD) $(LIBS)
+operations/composed_4.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_4$(EXEEXT): $(operations_composed_4_OBJECTS) $(operations_composed_4_DEPENDENCIES) $(EXTRA_operations_composed_4_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_4_OBJECTS) $(operations_composed_4_LDADD) $(LIBS)
+operations/composed_5.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_5$(EXEEXT): $(operations_composed_5_OBJECTS) $(operations_composed_5_DEPENDENCIES) $(EXTRA_operations_composed_5_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_5$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_5_OBJECTS) $(operations_composed_5_LDADD) $(LIBS)
+operations/composed_6.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_6$(EXEEXT): $(operations_composed_6_OBJECTS) $(operations_composed_6_DEPENDENCIES) $(EXTRA_operations_composed_6_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_6_OBJECTS) $(operations_composed_6_LDADD) $(LIBS)
+operations/composed_7.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_7$(EXEEXT): $(operations_composed_7_OBJECTS) $(operations_composed_7_DEPENDENCIES) $(EXTRA_operations_composed_7_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_7$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_7_OBJECTS) $(operations_composed_7_LDADD) $(LIBS)
+operations/composed_8.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_8$(EXEEXT): $(operations_composed_8_OBJECTS) $(operations_composed_8_DEPENDENCIES) $(EXTRA_operations_composed_8_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_8$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_8_OBJECTS) $(operations_composed_8_LDADD) $(LIBS)
+parallel_group/$(am__dirstamp):
+ @$(MKDIR_P) parallel_group
+ @: > parallel_group/$(am__dirstamp)
+parallel_group/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) parallel_group/$(DEPDIR)
+ @: > parallel_group/$(DEPDIR)/$(am__dirstamp)
+parallel_group/ranged_wait_for_all.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/ranged_wait_for_all$(EXEEXT): $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_ranged_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/ranged_wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_LDADD) $(LIBS)
+parallel_group/wait_for_all.$(OBJEXT): parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_all$(EXEEXT): $(parallel_group_wait_for_all_OBJECTS) $(parallel_group_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_all_OBJECTS) $(parallel_group_wait_for_all_LDADD) $(LIBS)
+parallel_group/wait_for_one.$(OBJEXT): parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one$(EXEEXT): $(parallel_group_wait_for_one_OBJECTS) $(parallel_group_wait_for_one_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_OBJECTS) $(parallel_group_wait_for_one_LDADD) $(LIBS)
+parallel_group/wait_for_one_error.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one_error$(EXEEXT): $(parallel_group_wait_for_one_error_OBJECTS) $(parallel_group_wait_for_one_error_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_error_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one_error$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_error_OBJECTS) $(parallel_group_wait_for_one_error_LDADD) $(LIBS)
+parallel_group/wait_for_one_success.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one_success$(EXEEXT): $(parallel_group_wait_for_one_success_OBJECTS) $(parallel_group_wait_for_one_success_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_success_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one_success$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_success_OBJECTS) $(parallel_group_wait_for_one_success_LDADD) $(LIBS)
+porthopper/$(am__dirstamp):
+ @$(MKDIR_P) porthopper
+ @: > porthopper/$(am__dirstamp)
+porthopper/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) porthopper/$(DEPDIR)
+ @: > porthopper/$(DEPDIR)/$(am__dirstamp)
+porthopper/client.$(OBJEXT): porthopper/$(am__dirstamp) \
+ porthopper/$(DEPDIR)/$(am__dirstamp)
+
+porthopper/client$(EXEEXT): $(porthopper_client_OBJECTS) $(porthopper_client_DEPENDENCIES) $(EXTRA_porthopper_client_DEPENDENCIES) porthopper/$(am__dirstamp)
+ @rm -f porthopper/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(porthopper_client_OBJECTS) $(porthopper_client_LDADD) $(LIBS)
+porthopper/server.$(OBJEXT): porthopper/$(am__dirstamp) \
+ porthopper/$(DEPDIR)/$(am__dirstamp)
+
+porthopper/server$(EXEEXT): $(porthopper_server_OBJECTS) $(porthopper_server_DEPENDENCIES) $(EXTRA_porthopper_server_DEPENDENCIES) porthopper/$(am__dirstamp)
+ @rm -f porthopper/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(porthopper_server_OBJECTS) $(porthopper_server_LDADD) $(LIBS)
+services/$(am__dirstamp):
+ @$(MKDIR_P) services
+ @: > services/$(am__dirstamp)
+services/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) services/$(DEPDIR)
+ @: > services/$(DEPDIR)/$(am__dirstamp)
+services/daytime_client.$(OBJEXT): services/$(am__dirstamp) \
+ services/$(DEPDIR)/$(am__dirstamp)
+services/logger_service.$(OBJEXT): services/$(am__dirstamp) \
+ services/$(DEPDIR)/$(am__dirstamp)
+
+services/daytime_client$(EXEEXT): $(services_daytime_client_OBJECTS) $(services_daytime_client_DEPENDENCIES) $(EXTRA_services_daytime_client_DEPENDENCIES) services/$(am__dirstamp)
+ @rm -f services/daytime_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(services_daytime_client_OBJECTS) $(services_daytime_client_LDADD) $(LIBS)
+socks4/$(am__dirstamp):
+ @$(MKDIR_P) socks4
+ @: > socks4/$(am__dirstamp)
+socks4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) socks4/$(DEPDIR)
+ @: > socks4/$(DEPDIR)/$(am__dirstamp)
+socks4/sync_client.$(OBJEXT): socks4/$(am__dirstamp) \
+ socks4/$(DEPDIR)/$(am__dirstamp)
+
+socks4/sync_client$(EXEEXT): $(socks4_sync_client_OBJECTS) $(socks4_sync_client_DEPENDENCIES) $(EXTRA_socks4_sync_client_DEPENDENCIES) socks4/$(am__dirstamp)
+ @rm -f socks4/sync_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(socks4_sync_client_OBJECTS) $(socks4_sync_client_LDADD) $(LIBS)
+spawn/$(am__dirstamp):
+ @$(MKDIR_P) spawn
+ @: > spawn/$(am__dirstamp)
+spawn/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) spawn/$(DEPDIR)
+ @: > spawn/$(DEPDIR)/$(am__dirstamp)
+spawn/echo_server.$(OBJEXT): spawn/$(am__dirstamp) \
+ spawn/$(DEPDIR)/$(am__dirstamp)
+
+spawn/echo_server$(EXEEXT): $(spawn_echo_server_OBJECTS) $(spawn_echo_server_DEPENDENCIES) $(EXTRA_spawn_echo_server_DEPENDENCIES) spawn/$(am__dirstamp)
+ @rm -f spawn/echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(spawn_echo_server_OBJECTS) $(spawn_echo_server_LDADD) $(LIBS)
+spawn/parallel_grep.$(OBJEXT): spawn/$(am__dirstamp) \
+ spawn/$(DEPDIR)/$(am__dirstamp)
+
+spawn/parallel_grep$(EXEEXT): $(spawn_parallel_grep_OBJECTS) $(spawn_parallel_grep_DEPENDENCIES) $(EXTRA_spawn_parallel_grep_DEPENDENCIES) spawn/$(am__dirstamp)
+ @rm -f spawn/parallel_grep$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(spawn_parallel_grep_OBJECTS) $(spawn_parallel_grep_LDADD) $(LIBS)
+ssl/$(am__dirstamp):
+ @$(MKDIR_P) ssl
+ @: > ssl/$(am__dirstamp)
+ssl/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ssl/$(DEPDIR)
+ @: > ssl/$(DEPDIR)/$(am__dirstamp)
+ssl/client.$(OBJEXT): ssl/$(am__dirstamp) \
+ ssl/$(DEPDIR)/$(am__dirstamp)
+
+ssl/client$(EXEEXT): $(ssl_client_OBJECTS) $(ssl_client_DEPENDENCIES) $(EXTRA_ssl_client_DEPENDENCIES) ssl/$(am__dirstamp)
+ @rm -f ssl/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(ssl_client_OBJECTS) $(ssl_client_LDADD) $(LIBS)
+ssl/server.$(OBJEXT): ssl/$(am__dirstamp) \
+ ssl/$(DEPDIR)/$(am__dirstamp)
+
+ssl/server$(EXEEXT): $(ssl_server_OBJECTS) $(ssl_server_DEPENDENCIES) $(EXTRA_ssl_server_DEPENDENCIES) ssl/$(am__dirstamp)
+ @rm -f ssl/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(ssl_server_OBJECTS) $(ssl_server_LDADD) $(LIBS)
+timeouts/$(am__dirstamp):
+ @$(MKDIR_P) timeouts
+ @: > timeouts/$(am__dirstamp)
+timeouts/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) timeouts/$(DEPDIR)
+ @: > timeouts/$(DEPDIR)/$(am__dirstamp)
+timeouts/async_tcp_client.$(OBJEXT): timeouts/$(am__dirstamp) \
+ timeouts/$(DEPDIR)/$(am__dirstamp)
+
+timeouts/async_tcp_client$(EXEEXT): $(timeouts_async_tcp_client_OBJECTS) $(timeouts_async_tcp_client_DEPENDENCIES) $(EXTRA_timeouts_async_tcp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
+ @rm -f timeouts/async_tcp_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(timeouts_async_tcp_client_OBJECTS) $(timeouts_async_tcp_client_LDADD) $(LIBS)
+timeouts/blocking_tcp_client.$(OBJEXT): timeouts/$(am__dirstamp) \
+ timeouts/$(DEPDIR)/$(am__dirstamp)
+
+timeouts/blocking_tcp_client$(EXEEXT): $(timeouts_blocking_tcp_client_OBJECTS) $(timeouts_blocking_tcp_client_DEPENDENCIES) $(EXTRA_timeouts_blocking_tcp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
+ @rm -f timeouts/blocking_tcp_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(timeouts_blocking_tcp_client_OBJECTS) $(timeouts_blocking_tcp_client_LDADD) $(LIBS)
+timeouts/blocking_token_tcp_client.$(OBJEXT): \
+ timeouts/$(am__dirstamp) timeouts/$(DEPDIR)/$(am__dirstamp)
+
+timeouts/blocking_token_tcp_client$(EXEEXT): $(timeouts_blocking_token_tcp_client_OBJECTS) $(timeouts_blocking_token_tcp_client_DEPENDENCIES) $(EXTRA_timeouts_blocking_token_tcp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
+ @rm -f timeouts/blocking_token_tcp_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(timeouts_blocking_token_tcp_client_OBJECTS) $(timeouts_blocking_token_tcp_client_LDADD) $(LIBS)
+timeouts/blocking_udp_client.$(OBJEXT): timeouts/$(am__dirstamp) \
+ timeouts/$(DEPDIR)/$(am__dirstamp)
+
+timeouts/blocking_udp_client$(EXEEXT): $(timeouts_blocking_udp_client_OBJECTS) $(timeouts_blocking_udp_client_DEPENDENCIES) $(EXTRA_timeouts_blocking_udp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
+ @rm -f timeouts/blocking_udp_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(timeouts_blocking_udp_client_OBJECTS) $(timeouts_blocking_udp_client_LDADD) $(LIBS)
+timeouts/server.$(OBJEXT): timeouts/$(am__dirstamp) \
+ timeouts/$(DEPDIR)/$(am__dirstamp)
+
+timeouts/server$(EXEEXT): $(timeouts_server_OBJECTS) $(timeouts_server_DEPENDENCIES) $(EXTRA_timeouts_server_DEPENDENCIES) timeouts/$(am__dirstamp)
+ @rm -f timeouts/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(timeouts_server_OBJECTS) $(timeouts_server_LDADD) $(LIBS)
+timers/$(am__dirstamp):
+ @$(MKDIR_P) timers
+ @: > timers/$(am__dirstamp)
+timers/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) timers/$(DEPDIR)
+ @: > timers/$(DEPDIR)/$(am__dirstamp)
+timers/time_t_timer.$(OBJEXT): timers/$(am__dirstamp) \
+ timers/$(DEPDIR)/$(am__dirstamp)
+
+timers/time_t_timer$(EXEEXT): $(timers_time_t_timer_OBJECTS) $(timers_time_t_timer_DEPENDENCIES) $(EXTRA_timers_time_t_timer_DEPENDENCIES) timers/$(am__dirstamp)
+ @rm -f timers/time_t_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(timers_time_t_timer_OBJECTS) $(timers_time_t_timer_LDADD) $(LIBS)
+tutorial/daytime1/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime1
+ @: > tutorial/daytime1/$(am__dirstamp)
+tutorial/daytime1/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime1/$(DEPDIR)
+ @: > tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime1/client.$(OBJEXT): tutorial/daytime1/$(am__dirstamp) \
+ tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime1/client$(EXEEXT): $(tutorial_daytime1_client_OBJECTS) $(tutorial_daytime1_client_DEPENDENCIES) $(EXTRA_tutorial_daytime1_client_DEPENDENCIES) tutorial/daytime1/$(am__dirstamp)
+ @rm -f tutorial/daytime1/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime1_client_OBJECTS) $(tutorial_daytime1_client_LDADD) $(LIBS)
+tutorial/daytime2/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime2
+ @: > tutorial/daytime2/$(am__dirstamp)
+tutorial/daytime2/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime2/$(DEPDIR)
+ @: > tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime2/server.$(OBJEXT): tutorial/daytime2/$(am__dirstamp) \
+ tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime2/server$(EXEEXT): $(tutorial_daytime2_server_OBJECTS) $(tutorial_daytime2_server_DEPENDENCIES) $(EXTRA_tutorial_daytime2_server_DEPENDENCIES) tutorial/daytime2/$(am__dirstamp)
+ @rm -f tutorial/daytime2/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime2_server_OBJECTS) $(tutorial_daytime2_server_LDADD) $(LIBS)
+tutorial/daytime3/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime3
+ @: > tutorial/daytime3/$(am__dirstamp)
+tutorial/daytime3/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime3/$(DEPDIR)
+ @: > tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime3/server.$(OBJEXT): tutorial/daytime3/$(am__dirstamp) \
+ tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime3/server$(EXEEXT): $(tutorial_daytime3_server_OBJECTS) $(tutorial_daytime3_server_DEPENDENCIES) $(EXTRA_tutorial_daytime3_server_DEPENDENCIES) tutorial/daytime3/$(am__dirstamp)
+ @rm -f tutorial/daytime3/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime3_server_OBJECTS) $(tutorial_daytime3_server_LDADD) $(LIBS)
+tutorial/daytime4/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime4
+ @: > tutorial/daytime4/$(am__dirstamp)
+tutorial/daytime4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime4/$(DEPDIR)
+ @: > tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime4/client.$(OBJEXT): tutorial/daytime4/$(am__dirstamp) \
+ tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime4/client$(EXEEXT): $(tutorial_daytime4_client_OBJECTS) $(tutorial_daytime4_client_DEPENDENCIES) $(EXTRA_tutorial_daytime4_client_DEPENDENCIES) tutorial/daytime4/$(am__dirstamp)
+ @rm -f tutorial/daytime4/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime4_client_OBJECTS) $(tutorial_daytime4_client_LDADD) $(LIBS)
+tutorial/daytime5/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime5
+ @: > tutorial/daytime5/$(am__dirstamp)
+tutorial/daytime5/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime5/$(DEPDIR)
+ @: > tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime5/server.$(OBJEXT): tutorial/daytime5/$(am__dirstamp) \
+ tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime5/server$(EXEEXT): $(tutorial_daytime5_server_OBJECTS) $(tutorial_daytime5_server_DEPENDENCIES) $(EXTRA_tutorial_daytime5_server_DEPENDENCIES) tutorial/daytime5/$(am__dirstamp)
+ @rm -f tutorial/daytime5/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime5_server_OBJECTS) $(tutorial_daytime5_server_LDADD) $(LIBS)
+tutorial/daytime6/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime6
+ @: > tutorial/daytime6/$(am__dirstamp)
+tutorial/daytime6/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime6/$(DEPDIR)
+ @: > tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime6/server.$(OBJEXT): tutorial/daytime6/$(am__dirstamp) \
+ tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime6/server$(EXEEXT): $(tutorial_daytime6_server_OBJECTS) $(tutorial_daytime6_server_DEPENDENCIES) $(EXTRA_tutorial_daytime6_server_DEPENDENCIES) tutorial/daytime6/$(am__dirstamp)
+ @rm -f tutorial/daytime6/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime6_server_OBJECTS) $(tutorial_daytime6_server_LDADD) $(LIBS)
+tutorial/daytime7/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime7
+ @: > tutorial/daytime7/$(am__dirstamp)
+tutorial/daytime7/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime7/$(DEPDIR)
+ @: > tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime7/server.$(OBJEXT): tutorial/daytime7/$(am__dirstamp) \
+ tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime7/server$(EXEEXT): $(tutorial_daytime7_server_OBJECTS) $(tutorial_daytime7_server_DEPENDENCIES) $(EXTRA_tutorial_daytime7_server_DEPENDENCIES) tutorial/daytime7/$(am__dirstamp)
+ @rm -f tutorial/daytime7/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime7_server_OBJECTS) $(tutorial_daytime7_server_LDADD) $(LIBS)
+tutorial/timer1/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer1
+ @: > tutorial/timer1/$(am__dirstamp)
+tutorial/timer1/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer1/$(DEPDIR)
+ @: > tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer1/timer.$(OBJEXT): tutorial/timer1/$(am__dirstamp) \
+ tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer1/timer$(EXEEXT): $(tutorial_timer1_timer_OBJECTS) $(tutorial_timer1_timer_DEPENDENCIES) $(EXTRA_tutorial_timer1_timer_DEPENDENCIES) tutorial/timer1/$(am__dirstamp)
+ @rm -f tutorial/timer1/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer1_timer_OBJECTS) $(tutorial_timer1_timer_LDADD) $(LIBS)
+tutorial/timer2/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer2
+ @: > tutorial/timer2/$(am__dirstamp)
+tutorial/timer2/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer2/$(DEPDIR)
+ @: > tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer2/timer.$(OBJEXT): tutorial/timer2/$(am__dirstamp) \
+ tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer2/timer$(EXEEXT): $(tutorial_timer2_timer_OBJECTS) $(tutorial_timer2_timer_DEPENDENCIES) $(EXTRA_tutorial_timer2_timer_DEPENDENCIES) tutorial/timer2/$(am__dirstamp)
+ @rm -f tutorial/timer2/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer2_timer_OBJECTS) $(tutorial_timer2_timer_LDADD) $(LIBS)
+tutorial/timer3/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer3
+ @: > tutorial/timer3/$(am__dirstamp)
+tutorial/timer3/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer3/$(DEPDIR)
+ @: > tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer3/timer.$(OBJEXT): tutorial/timer3/$(am__dirstamp) \
+ tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer3/timer$(EXEEXT): $(tutorial_timer3_timer_OBJECTS) $(tutorial_timer3_timer_DEPENDENCIES) $(EXTRA_tutorial_timer3_timer_DEPENDENCIES) tutorial/timer3/$(am__dirstamp)
+ @rm -f tutorial/timer3/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer3_timer_OBJECTS) $(tutorial_timer3_timer_LDADD) $(LIBS)
+tutorial/timer4/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer4
+ @: > tutorial/timer4/$(am__dirstamp)
+tutorial/timer4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer4/$(DEPDIR)
+ @: > tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer4/timer.$(OBJEXT): tutorial/timer4/$(am__dirstamp) \
+ tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer4/timer$(EXEEXT): $(tutorial_timer4_timer_OBJECTS) $(tutorial_timer4_timer_DEPENDENCIES) $(EXTRA_tutorial_timer4_timer_DEPENDENCIES) tutorial/timer4/$(am__dirstamp)
+ @rm -f tutorial/timer4/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer4_timer_OBJECTS) $(tutorial_timer4_timer_LDADD) $(LIBS)
+tutorial/timer5/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer5
+ @: > tutorial/timer5/$(am__dirstamp)
+tutorial/timer5/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer5/$(DEPDIR)
+ @: > tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer5/timer.$(OBJEXT): tutorial/timer5/$(am__dirstamp) \
+ tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer5/timer$(EXEEXT): $(tutorial_timer5_timer_OBJECTS) $(tutorial_timer5_timer_DEPENDENCIES) $(EXTRA_tutorial_timer5_timer_DEPENDENCIES) tutorial/timer5/$(am__dirstamp)
+ @rm -f tutorial/timer5/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer5_timer_OBJECTS) $(tutorial_timer5_timer_LDADD) $(LIBS)
+type_erasure/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure
+ @: > type_erasure/$(am__dirstamp)
+type_erasure/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure/$(DEPDIR)
+ @: > type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/main.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/stdin_line_reader.$(OBJEXT): \
+ type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/sleep.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+
+type_erasure/type_erasure$(EXEEXT): $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_DEPENDENCIES) $(EXTRA_type_erasure_type_erasure_DEPENDENCIES) type_erasure/$(am__dirstamp)
+ @rm -f type_erasure/type_erasure$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_LDADD) $(LIBS)
+windows/$(am__dirstamp):
+ @$(MKDIR_P) windows
+ @: > windows/$(am__dirstamp)
+windows/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) windows/$(DEPDIR)
+ @: > windows/$(DEPDIR)/$(am__dirstamp)
+windows/transmit_file.$(OBJEXT): windows/$(am__dirstamp) \
+ windows/$(DEPDIR)/$(am__dirstamp)
+
+windows/transmit_file$(EXEEXT): $(windows_transmit_file_OBJECTS) $(windows_transmit_file_DEPENDENCIES) $(EXTRA_windows_transmit_file_DEPENDENCIES) windows/$(am__dirstamp)
+ @rm -f windows/transmit_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(windows_transmit_file_OBJECTS) $(windows_transmit_file_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ../../*.$(OBJEXT)
+ -rm -f allocation/*.$(OBJEXT)
+ -rm -f buffers/*.$(OBJEXT)
+ -rm -f chat/*.$(OBJEXT)
+ -rm -f deferred/*.$(OBJEXT)
+ -rm -f echo/*.$(OBJEXT)
+ -rm -f executors/*.$(OBJEXT)
+ -rm -f files/*.$(OBJEXT)
+ -rm -f fork/*.$(OBJEXT)
+ -rm -f futures/*.$(OBJEXT)
+ -rm -f handler_tracking/*.$(OBJEXT)
+ -rm -f http/client/*.$(OBJEXT)
+ -rm -f http/server/*.$(OBJEXT)
+ -rm -f http/server2/*.$(OBJEXT)
+ -rm -f http/server3/*.$(OBJEXT)
+ -rm -f http/server4/*.$(OBJEXT)
+ -rm -f icmp/*.$(OBJEXT)
+ -rm -f invocation/*.$(OBJEXT)
+ -rm -f iostreams/*.$(OBJEXT)
+ -rm -f local/*.$(OBJEXT)
+ -rm -f multicast/*.$(OBJEXT)
+ -rm -f nonblocking/*.$(OBJEXT)
+ -rm -f operations/*.$(OBJEXT)
+ -rm -f parallel_group/*.$(OBJEXT)
+ -rm -f porthopper/*.$(OBJEXT)
+ -rm -f services/*.$(OBJEXT)
+ -rm -f socks4/*.$(OBJEXT)
+ -rm -f spawn/*.$(OBJEXT)
+ -rm -f ssl/*.$(OBJEXT)
+ -rm -f timeouts/*.$(OBJEXT)
+ -rm -f timers/*.$(OBJEXT)
+ -rm -f tutorial/daytime1/*.$(OBJEXT)
+ -rm -f tutorial/daytime2/*.$(OBJEXT)
+ -rm -f tutorial/daytime3/*.$(OBJEXT)
+ -rm -f tutorial/daytime4/*.$(OBJEXT)
+ -rm -f tutorial/daytime5/*.$(OBJEXT)
+ -rm -f tutorial/daytime6/*.$(OBJEXT)
+ -rm -f tutorial/daytime7/*.$(OBJEXT)
+ -rm -f tutorial/timer1/*.$(OBJEXT)
+ -rm -f tutorial/timer2/*.$(OBJEXT)
+ -rm -f tutorial/timer3/*.$(OBJEXT)
+ -rm -f tutorial/timer4/*.$(OBJEXT)
+ -rm -f tutorial/timer5/*.$(OBJEXT)
+ -rm -f type_erasure/*.$(OBJEXT)
+ -rm -f windows/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@allocation/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@buffers/$(DEPDIR)/reference_counted.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/chat_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/chat_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/posix_chat_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_tcp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_udp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_udp_echo_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_udp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/actor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/bank_account_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/bank_account_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/fork_join.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/pipeline.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/priority_scheduler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@files/$(DEPDIR)/async_file_copy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@files/$(DEPDIR)/blocking_file_copy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@fork/$(DEPDIR)/daemon.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@fork/$(DEPDIR)/process_per_connection.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@futures/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/client/$(DEPDIR)/async_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/client/$(DEPDIR)/sync_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/connection_manager.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/io_context_pool.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/file_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@icmp/$(DEPDIR)/ping.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@invocation/$(DEPDIR)/prioritised_handlers.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/daytime_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/http_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/connect_pair.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/fd_passing_stream_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/fd_passing_stream_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/iostream_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/stream_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/stream_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@multicast/$(DEPDIR)/receiver.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@multicast/$(DEPDIR)/sender.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@nonblocking/$(DEPDIR)/third_party_lib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_7.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_8.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/ranged_wait_for_all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_success.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@porthopper/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@porthopper/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@services/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@services/$(DEPDIR)/logger_service.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@socks4/$(DEPDIR)/sync_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@spawn/$(DEPDIR)/echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@spawn/$(DEPDIR)/parallel_grep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@ssl/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@ssl/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/async_tcp_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_tcp_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_token_tcp_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_udp_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@timers/$(DEPDIR)/time_t_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime1/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime2/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime3/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime4/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime5/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime6/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime7/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer1/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer2/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer3/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer4/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer5/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/stdin_line_reader.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@windows/$(DEPDIR)/transmit_file.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../../$(am__dirstamp)
+ -rm -f allocation/$(DEPDIR)/$(am__dirstamp)
+ -rm -f allocation/$(am__dirstamp)
+ -rm -f buffers/$(DEPDIR)/$(am__dirstamp)
+ -rm -f buffers/$(am__dirstamp)
+ -rm -f chat/$(DEPDIR)/$(am__dirstamp)
+ -rm -f chat/$(am__dirstamp)
+ -rm -f deferred/$(DEPDIR)/$(am__dirstamp)
+ -rm -f deferred/$(am__dirstamp)
+ -rm -f echo/$(DEPDIR)/$(am__dirstamp)
+ -rm -f echo/$(am__dirstamp)
+ -rm -f executors/$(DEPDIR)/$(am__dirstamp)
+ -rm -f executors/$(am__dirstamp)
+ -rm -f files/$(DEPDIR)/$(am__dirstamp)
+ -rm -f files/$(am__dirstamp)
+ -rm -f fork/$(DEPDIR)/$(am__dirstamp)
+ -rm -f fork/$(am__dirstamp)
+ -rm -f futures/$(DEPDIR)/$(am__dirstamp)
+ -rm -f futures/$(am__dirstamp)
+ -rm -f handler_tracking/$(DEPDIR)/$(am__dirstamp)
+ -rm -f handler_tracking/$(am__dirstamp)
+ -rm -f http/client/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/client/$(am__dirstamp)
+ -rm -f http/server/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server/$(am__dirstamp)
+ -rm -f http/server2/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server2/$(am__dirstamp)
+ -rm -f http/server3/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server3/$(am__dirstamp)
+ -rm -f http/server4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server4/$(am__dirstamp)
+ -rm -f icmp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f icmp/$(am__dirstamp)
+ -rm -f invocation/$(DEPDIR)/$(am__dirstamp)
+ -rm -f invocation/$(am__dirstamp)
+ -rm -f iostreams/$(DEPDIR)/$(am__dirstamp)
+ -rm -f iostreams/$(am__dirstamp)
+ -rm -f local/$(DEPDIR)/$(am__dirstamp)
+ -rm -f local/$(am__dirstamp)
+ -rm -f multicast/$(DEPDIR)/$(am__dirstamp)
+ -rm -f multicast/$(am__dirstamp)
+ -rm -f nonblocking/$(DEPDIR)/$(am__dirstamp)
+ -rm -f nonblocking/$(am__dirstamp)
+ -rm -f operations/$(DEPDIR)/$(am__dirstamp)
+ -rm -f operations/$(am__dirstamp)
+ -rm -f parallel_group/$(DEPDIR)/$(am__dirstamp)
+ -rm -f parallel_group/$(am__dirstamp)
+ -rm -f porthopper/$(DEPDIR)/$(am__dirstamp)
+ -rm -f porthopper/$(am__dirstamp)
+ -rm -f services/$(DEPDIR)/$(am__dirstamp)
+ -rm -f services/$(am__dirstamp)
+ -rm -f socks4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f socks4/$(am__dirstamp)
+ -rm -f spawn/$(DEPDIR)/$(am__dirstamp)
+ -rm -f spawn/$(am__dirstamp)
+ -rm -f ssl/$(DEPDIR)/$(am__dirstamp)
+ -rm -f ssl/$(am__dirstamp)
+ -rm -f timeouts/$(DEPDIR)/$(am__dirstamp)
+ -rm -f timeouts/$(am__dirstamp)
+ -rm -f timers/$(DEPDIR)/$(am__dirstamp)
+ -rm -f timers/$(am__dirstamp)
+ -rm -f tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime1/$(am__dirstamp)
+ -rm -f tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime2/$(am__dirstamp)
+ -rm -f tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime3/$(am__dirstamp)
+ -rm -f tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime4/$(am__dirstamp)
+ -rm -f tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime5/$(am__dirstamp)
+ -rm -f tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime6/$(am__dirstamp)
+ -rm -f tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime7/$(am__dirstamp)
+ -rm -f tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer1/$(am__dirstamp)
+ -rm -f tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer2/$(am__dirstamp)
+ -rm -f tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer3/$(am__dirstamp)
+ -rm -f tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer4/$(am__dirstamp)
+ -rm -f tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer5/$(am__dirstamp)
+ -rm -f type_erasure/$(DEPDIR)/$(am__dirstamp)
+ -rm -f type_erasure/$(am__dirstamp)
+ -rm -f windows/$(DEPDIR)/$(am__dirstamp)
+ -rm -f windows/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f allocation/$(DEPDIR)/server.Po
+ -rm -f buffers/$(DEPDIR)/reference_counted.Po
+ -rm -f chat/$(DEPDIR)/chat_client.Po
+ -rm -f chat/$(DEPDIR)/chat_server.Po
+ -rm -f chat/$(DEPDIR)/posix_chat_client.Po
+ -rm -f deferred/$(DEPDIR)/deferred_1.Po
+ -rm -f deferred/$(DEPDIR)/deferred_2.Po
+ -rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_server.Po
+ -rm -f executors/$(DEPDIR)/actor.Po
+ -rm -f executors/$(DEPDIR)/bank_account_1.Po
+ -rm -f executors/$(DEPDIR)/bank_account_2.Po
+ -rm -f executors/$(DEPDIR)/fork_join.Po
+ -rm -f executors/$(DEPDIR)/pipeline.Po
+ -rm -f executors/$(DEPDIR)/priority_scheduler.Po
+ -rm -f files/$(DEPDIR)/async_file_copy.Po
+ -rm -f files/$(DEPDIR)/blocking_file_copy.Po
+ -rm -f fork/$(DEPDIR)/daemon.Po
+ -rm -f fork/$(DEPDIR)/process_per_connection.Po
+ -rm -f futures/$(DEPDIR)/daytime_client.Po
+ -rm -f handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f http/client/$(DEPDIR)/async_client.Po
+ -rm -f http/client/$(DEPDIR)/sync_client.Po
+ -rm -f http/server/$(DEPDIR)/connection.Po
+ -rm -f http/server/$(DEPDIR)/connection_manager.Po
+ -rm -f http/server/$(DEPDIR)/main.Po
+ -rm -f http/server/$(DEPDIR)/mime_types.Po
+ -rm -f http/server/$(DEPDIR)/reply.Po
+ -rm -f http/server/$(DEPDIR)/request_handler.Po
+ -rm -f http/server/$(DEPDIR)/request_parser.Po
+ -rm -f http/server/$(DEPDIR)/server.Po
+ -rm -f http/server2/$(DEPDIR)/connection.Po
+ -rm -f http/server2/$(DEPDIR)/io_context_pool.Po
+ -rm -f http/server2/$(DEPDIR)/main.Po
+ -rm -f http/server2/$(DEPDIR)/mime_types.Po
+ -rm -f http/server2/$(DEPDIR)/reply.Po
+ -rm -f http/server2/$(DEPDIR)/request_handler.Po
+ -rm -f http/server2/$(DEPDIR)/request_parser.Po
+ -rm -f http/server2/$(DEPDIR)/server.Po
+ -rm -f http/server3/$(DEPDIR)/connection.Po
+ -rm -f http/server3/$(DEPDIR)/main.Po
+ -rm -f http/server3/$(DEPDIR)/mime_types.Po
+ -rm -f http/server3/$(DEPDIR)/reply.Po
+ -rm -f http/server3/$(DEPDIR)/request_handler.Po
+ -rm -f http/server3/$(DEPDIR)/request_parser.Po
+ -rm -f http/server3/$(DEPDIR)/server.Po
+ -rm -f http/server4/$(DEPDIR)/file_handler.Po
+ -rm -f http/server4/$(DEPDIR)/main.Po
+ -rm -f http/server4/$(DEPDIR)/mime_types.Po
+ -rm -f http/server4/$(DEPDIR)/reply.Po
+ -rm -f http/server4/$(DEPDIR)/request_parser.Po
+ -rm -f http/server4/$(DEPDIR)/server.Po
+ -rm -f icmp/$(DEPDIR)/ping.Po
+ -rm -f invocation/$(DEPDIR)/prioritised_handlers.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_client.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_server.Po
+ -rm -f iostreams/$(DEPDIR)/http_client.Po
+ -rm -f local/$(DEPDIR)/connect_pair.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_client.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_server.Po
+ -rm -f local/$(DEPDIR)/iostream_client.Po
+ -rm -f local/$(DEPDIR)/stream_client.Po
+ -rm -f local/$(DEPDIR)/stream_server.Po
+ -rm -f multicast/$(DEPDIR)/receiver.Po
+ -rm -f multicast/$(DEPDIR)/sender.Po
+ -rm -f nonblocking/$(DEPDIR)/third_party_lib.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_success.Po
+ -rm -f porthopper/$(DEPDIR)/client.Po
+ -rm -f porthopper/$(DEPDIR)/server.Po
+ -rm -f services/$(DEPDIR)/daytime_client.Po
+ -rm -f services/$(DEPDIR)/logger_service.Po
+ -rm -f socks4/$(DEPDIR)/sync_client.Po
+ -rm -f spawn/$(DEPDIR)/echo_server.Po
+ -rm -f spawn/$(DEPDIR)/parallel_grep.Po
+ -rm -f ssl/$(DEPDIR)/client.Po
+ -rm -f ssl/$(DEPDIR)/server.Po
+ -rm -f timeouts/$(DEPDIR)/async_tcp_client.Po
+ -rm -f timeouts/$(DEPDIR)/blocking_tcp_client.Po
+ -rm -f timeouts/$(DEPDIR)/blocking_token_tcp_client.Po
+ -rm -f timeouts/$(DEPDIR)/blocking_udp_client.Po
+ -rm -f timeouts/$(DEPDIR)/server.Po
+ -rm -f timers/$(DEPDIR)/time_t_timer.Po
+ -rm -f tutorial/daytime1/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime2/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime3/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime4/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime5/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime6/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime7/$(DEPDIR)/server.Po
+ -rm -f tutorial/timer1/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer2/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer3/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer4/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer5/$(DEPDIR)/timer.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f windows/$(DEPDIR)/transmit_file.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f allocation/$(DEPDIR)/server.Po
+ -rm -f buffers/$(DEPDIR)/reference_counted.Po
+ -rm -f chat/$(DEPDIR)/chat_client.Po
+ -rm -f chat/$(DEPDIR)/chat_server.Po
+ -rm -f chat/$(DEPDIR)/posix_chat_client.Po
+ -rm -f deferred/$(DEPDIR)/deferred_1.Po
+ -rm -f deferred/$(DEPDIR)/deferred_2.Po
+ -rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_server.Po
+ -rm -f executors/$(DEPDIR)/actor.Po
+ -rm -f executors/$(DEPDIR)/bank_account_1.Po
+ -rm -f executors/$(DEPDIR)/bank_account_2.Po
+ -rm -f executors/$(DEPDIR)/fork_join.Po
+ -rm -f executors/$(DEPDIR)/pipeline.Po
+ -rm -f executors/$(DEPDIR)/priority_scheduler.Po
+ -rm -f files/$(DEPDIR)/async_file_copy.Po
+ -rm -f files/$(DEPDIR)/blocking_file_copy.Po
+ -rm -f fork/$(DEPDIR)/daemon.Po
+ -rm -f fork/$(DEPDIR)/process_per_connection.Po
+ -rm -f futures/$(DEPDIR)/daytime_client.Po
+ -rm -f handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f http/client/$(DEPDIR)/async_client.Po
+ -rm -f http/client/$(DEPDIR)/sync_client.Po
+ -rm -f http/server/$(DEPDIR)/connection.Po
+ -rm -f http/server/$(DEPDIR)/connection_manager.Po
+ -rm -f http/server/$(DEPDIR)/main.Po
+ -rm -f http/server/$(DEPDIR)/mime_types.Po
+ -rm -f http/server/$(DEPDIR)/reply.Po
+ -rm -f http/server/$(DEPDIR)/request_handler.Po
+ -rm -f http/server/$(DEPDIR)/request_parser.Po
+ -rm -f http/server/$(DEPDIR)/server.Po
+ -rm -f http/server2/$(DEPDIR)/connection.Po
+ -rm -f http/server2/$(DEPDIR)/io_context_pool.Po
+ -rm -f http/server2/$(DEPDIR)/main.Po
+ -rm -f http/server2/$(DEPDIR)/mime_types.Po
+ -rm -f http/server2/$(DEPDIR)/reply.Po
+ -rm -f http/server2/$(DEPDIR)/request_handler.Po
+ -rm -f http/server2/$(DEPDIR)/request_parser.Po
+ -rm -f http/server2/$(DEPDIR)/server.Po
+ -rm -f http/server3/$(DEPDIR)/connection.Po
+ -rm -f http/server3/$(DEPDIR)/main.Po
+ -rm -f http/server3/$(DEPDIR)/mime_types.Po
+ -rm -f http/server3/$(DEPDIR)/reply.Po
+ -rm -f http/server3/$(DEPDIR)/request_handler.Po
+ -rm -f http/server3/$(DEPDIR)/request_parser.Po
+ -rm -f http/server3/$(DEPDIR)/server.Po
+ -rm -f http/server4/$(DEPDIR)/file_handler.Po
+ -rm -f http/server4/$(DEPDIR)/main.Po
+ -rm -f http/server4/$(DEPDIR)/mime_types.Po
+ -rm -f http/server4/$(DEPDIR)/reply.Po
+ -rm -f http/server4/$(DEPDIR)/request_parser.Po
+ -rm -f http/server4/$(DEPDIR)/server.Po
+ -rm -f icmp/$(DEPDIR)/ping.Po
+ -rm -f invocation/$(DEPDIR)/prioritised_handlers.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_client.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_server.Po
+ -rm -f iostreams/$(DEPDIR)/http_client.Po
+ -rm -f local/$(DEPDIR)/connect_pair.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_client.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_server.Po
+ -rm -f local/$(DEPDIR)/iostream_client.Po
+ -rm -f local/$(DEPDIR)/stream_client.Po
+ -rm -f local/$(DEPDIR)/stream_server.Po
+ -rm -f multicast/$(DEPDIR)/receiver.Po
+ -rm -f multicast/$(DEPDIR)/sender.Po
+ -rm -f nonblocking/$(DEPDIR)/third_party_lib.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_success.Po
+ -rm -f porthopper/$(DEPDIR)/client.Po
+ -rm -f porthopper/$(DEPDIR)/server.Po
+ -rm -f services/$(DEPDIR)/daytime_client.Po
+ -rm -f services/$(DEPDIR)/logger_service.Po
+ -rm -f socks4/$(DEPDIR)/sync_client.Po
+ -rm -f spawn/$(DEPDIR)/echo_server.Po
+ -rm -f spawn/$(DEPDIR)/parallel_grep.Po
+ -rm -f ssl/$(DEPDIR)/client.Po
+ -rm -f ssl/$(DEPDIR)/server.Po
+ -rm -f timeouts/$(DEPDIR)/async_tcp_client.Po
+ -rm -f timeouts/$(DEPDIR)/blocking_tcp_client.Po
+ -rm -f timeouts/$(DEPDIR)/blocking_token_tcp_client.Po
+ -rm -f timeouts/$(DEPDIR)/blocking_udp_client.Po
+ -rm -f timeouts/$(DEPDIR)/server.Po
+ -rm -f timers/$(DEPDIR)/time_t_timer.Po
+ -rm -f tutorial/daytime1/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime2/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime3/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime4/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime5/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime6/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime7/$(DEPDIR)/server.Po
+ -rm -f tutorial/timer1/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer2/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer3/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer4/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer5/$(DEPDIR)/timer.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f windows/$(DEPDIR)/transmit_file.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/examples/cpp11/allocation/.gitignore b/3rdparty/asio/src/examples/cpp11/allocation/.gitignore
deleted file mode 100644
index 180ba886e58..00000000000
--- a/3rdparty/asio/src/examples/cpp11/allocation/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/allocation/server.cpp b/3rdparty/asio/src/examples/cpp11/allocation/server.cpp
index cbcbe76fe68..48bc119c1c5 100644
--- a/3rdparty/asio/src/examples/cpp11/allocation/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/allocation/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -22,16 +22,16 @@ using asio::ip::tcp;
// It contains a single block of memory which may be returned for allocation
// requests. If the memory is in use when an allocation request is made, the
// allocator delegates allocation to the global heap.
-class handler_allocator
+class handler_memory
{
public:
- handler_allocator()
+ handler_memory()
: in_use_(false)
{
}
- handler_allocator(const handler_allocator&) = delete;
- handler_allocator& operator=(const handler_allocator&) = delete;
+ handler_memory(const handler_memory&) = delete;
+ handler_memory& operator=(const handler_memory&) = delete;
void* allocate(std::size_t size)
{
@@ -66,49 +66,51 @@ private:
bool in_use_;
};
-// Wrapper class template for handler objects to allow handler memory
-// allocation to be customised. Calls to operator() are forwarded to the
-// encapsulated handler.
-template <typename Handler>
-class custom_alloc_handler
+// The allocator to be associated with the handler objects. This allocator only
+// needs to satisfy the C++11 minimal allocator requirements.
+template <typename T>
+class handler_allocator
{
public:
- custom_alloc_handler(handler_allocator& a, Handler h)
- : allocator_(a),
- handler_(h)
+ using value_type = T;
+
+ explicit handler_allocator(handler_memory& mem)
+ : memory_(mem)
{
}
- template <typename ...Args>
- void operator()(Args&&... args)
+ template <typename U>
+ handler_allocator(const handler_allocator<U>& other) noexcept
+ : memory_(other.memory_)
{
- handler_(std::forward<Args>(args)...);
}
- friend void* asio_handler_allocate(std::size_t size,
- custom_alloc_handler<Handler>* this_handler)
+ bool operator==(const handler_allocator& other) const noexcept
{
- return this_handler->allocator_.allocate(size);
+ return &memory_ == &other.memory_;
}
- friend void asio_handler_deallocate(void* pointer, std::size_t /*size*/,
- custom_alloc_handler<Handler>* this_handler)
+ bool operator!=(const handler_allocator& other) const noexcept
{
- this_handler->allocator_.deallocate(pointer);
+ return &memory_ != &other.memory_;
+ }
+
+ T* allocate(std::size_t n) const
+ {
+ return static_cast<T*>(memory_.allocate(sizeof(T) * n));
+ }
+
+ void deallocate(T* p, std::size_t /*n*/) const
+ {
+ return memory_.deallocate(p);
}
private:
- handler_allocator& allocator_;
- Handler handler_;
-};
+ template <typename> friend class handler_allocator;
-// Helper function to wrap a handler object to add custom allocation.
-template <typename Handler>
-inline custom_alloc_handler<Handler> make_custom_alloc_handler(
- handler_allocator& a, Handler h)
-{
- return custom_alloc_handler<Handler>(a, h);
-}
+ // The underlying memory.
+ handler_memory& memory_;
+};
class session
: public std::enable_shared_from_this<session>
@@ -129,7 +131,8 @@ private:
{
auto self(shared_from_this());
socket_.async_read_some(asio::buffer(data_),
- make_custom_alloc_handler(allocator_,
+ asio::bind_allocator(
+ handler_allocator<int>(handler_memory_),
[this, self](std::error_code ec, std::size_t length)
{
if (!ec)
@@ -143,7 +146,8 @@ private:
{
auto self(shared_from_this());
asio::async_write(socket_, asio::buffer(data_, length),
- make_custom_alloc_handler(allocator_,
+ asio::bind_allocator(
+ handler_allocator<int>(handler_memory_),
[this, self](std::error_code ec, std::size_t /*length*/)
{
if (!ec)
@@ -159,8 +163,8 @@ private:
// Buffer used to store data received from the client.
std::array<char, 1024> data_;
- // The allocator to use for handler-based custom memory allocation.
- handler_allocator allocator_;
+ // The memory to use for handler-based custom memory allocation.
+ handler_memory handler_memory_;
};
class server
diff --git a/3rdparty/asio/src/examples/cpp11/buffers/.gitignore b/3rdparty/asio/src/examples/cpp11/buffers/.gitignore
deleted file mode 100644
index abe68c665f5..00000000000
--- a/3rdparty/asio/src/examples/cpp11/buffers/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-reference_counted
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp b/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp
index 34fe9090dfd..cee56ff786b 100644
--- a/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp
+++ b/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp
@@ -2,7 +2,7 @@
// reference_counted.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -13,6 +13,7 @@
#include <memory>
#include <utility>
#include <vector>
+#include <ctime>
using asio::ip::tcp;
@@ -60,7 +61,7 @@ private:
auto self(shared_from_this());
asio::async_write(socket_, buffer,
- [this, self](std::error_code /*ec*/, std::size_t /*length*/)
+ [self](std::error_code /*ec*/, std::size_t /*length*/)
{
});
}
diff --git a/3rdparty/asio/src/examples/cpp11/chat/.gitignore b/3rdparty/asio/src/examples/cpp11/chat/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp11/chat/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp b/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp
index e672a022d04..c0393ee8266 100644
--- a/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp
@@ -2,7 +2,7 @@
// chat_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp b/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp
index f6e949bf2e2..2ae82fa1257 100644
--- a/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp
+++ b/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp
@@ -2,7 +2,7 @@
// chat_message.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -18,8 +18,8 @@
class chat_message
{
public:
- enum { header_length = 4 };
- enum { max_body_length = 512 };
+ static constexpr std::size_t header_length = 4;
+ static constexpr std::size_t max_body_length = 512;
chat_message()
: body_length_(0)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp b/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp
index 6e5ba3b8ee2..7a5dfe33d4f 100644
--- a/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp
@@ -2,7 +2,7 @@
// chat_server.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp b/3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp
new file mode 100644
index 00000000000..a77b8cfb001
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp
@@ -0,0 +1,198 @@
+//
+// posix_chat_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <array>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include "asio.hpp"
+#include "chat_message.hpp"
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+using asio::ip::tcp;
+namespace posix = asio::posix;
+
+class posix_chat_client
+{
+public:
+ posix_chat_client(asio::io_context& io_context,
+ const tcp::resolver::results_type& endpoints)
+ : socket_(io_context),
+ input_(io_context, ::dup(STDIN_FILENO)),
+ output_(io_context, ::dup(STDOUT_FILENO)),
+ input_buffer_(chat_message::max_body_length)
+ {
+ do_connect(endpoints);
+ }
+
+private:
+ void do_connect(const tcp::resolver::results_type& endpoints)
+ {
+ asio::async_connect(socket_, endpoints,
+ [this](std::error_code ec, tcp::endpoint)
+ {
+ if (!ec)
+ {
+ do_read_header();
+ do_read_input();
+ }
+ });
+ }
+
+ void do_read_header()
+ {
+ asio::async_read(socket_,
+ asio::buffer(read_msg_.data(), chat_message::header_length),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec && read_msg_.decode_header())
+ {
+ do_read_body();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_read_body()
+ {
+ asio::async_read(socket_,
+ asio::buffer(read_msg_.body(), read_msg_.body_length()),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_write_output();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_write_output()
+ {
+ // Write out the message we just received, terminated by a newline.
+ static char eol[] = { '\n' };
+ std::array<asio::const_buffer, 2> buffers = {{
+ asio::buffer(read_msg_.body(), read_msg_.body_length()),
+ asio::buffer(eol) }};
+ asio::async_write(output_, buffers,
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_read_header();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_read_input()
+ {
+ // Read a line of input entered by the user.
+ asio::async_read_until(input_, input_buffer_, '\n',
+ [this](std::error_code ec, std::size_t length)
+ {
+ if (!ec)
+ {
+ // Write the message (minus the newline) to the server.
+ write_msg_.body_length(length - 1);
+ input_buffer_.sgetn(write_msg_.body(), length - 1);
+ input_buffer_.consume(1); // Remove newline from input.
+ write_msg_.encode_header();
+ do_write_message();
+ }
+ else if (ec == asio::error::not_found)
+ {
+ // Didn't get a newline. Send whatever we have.
+ write_msg_.body_length(input_buffer_.size());
+ input_buffer_.sgetn(write_msg_.body(), input_buffer_.size());
+ write_msg_.encode_header();
+ do_write_message();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_write_message()
+ {
+ asio::async_write(socket_,
+ asio::buffer(write_msg_.data(), write_msg_.length()),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_read_input();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void close()
+ {
+ // Cancel all outstanding asynchronous operations.
+ socket_.close();
+ input_.close();
+ output_.close();
+ }
+
+private:
+ tcp::socket socket_;
+ posix::stream_descriptor input_;
+ posix::stream_descriptor output_;
+ chat_message read_msg_;
+ chat_message write_msg_;
+ asio::streambuf input_buffer_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: posix_chat_client <host> <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ tcp::resolver resolver(io_context);
+ tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
+
+ posix_chat_client c(io_context, endpoints);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp b/3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp
new file mode 100644
index 00000000000..db9213eb3be
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp
@@ -0,0 +1,35 @@
+//
+// deferred_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ auto deferred_op = timer.async_wait(deferred);
+
+ std::move(deferred_op)(
+ [](std::error_code ec)
+ {
+ std::cout << "timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp b/3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp
new file mode 100644
index 00000000000..07528282de5
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp
@@ -0,0 +1,44 @@
+//
+// deferred_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ auto deferred_op = timer.async_wait(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer.expires_after(std::chrono::seconds(1));
+ return timer.async_wait(deferred);
+ }
+ )
+ );
+
+ std::move(deferred_op)(
+ [](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/echo/.gitignore b/3rdparty/asio/src/examples/cpp11/echo/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp11/echo/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
index d76ebe94aae..b8ba5337697 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
index 8eb1b37f8b6..8e5c26fba2a 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
index c7c648df97f..8a281203f89 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
index 84a72d44453..34e5f221695 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -26,12 +26,12 @@ void session(tcp::socket sock)
{
char data[max_length];
- asio::error_code error;
+ std::error_code error;
size_t length = sock.read_some(asio::buffer(data), error);
if (error == asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
- throw asio::system_error(error); // Some other error.
+ throw std::system_error(error); // Some other error.
asio::write(sock, asio::buffer(data, length));
}
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
index 1d15780c429..3f2b60e3ccc 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
index 8bb51735f26..64c6defb885 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/executors/.gitignore b/3rdparty/asio/src/examples/cpp11/executors/.gitignore
deleted file mode 100644
index 183cecf7165..00000000000
--- a/3rdparty/asio/src/examples/cpp11/executors/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-actor
-bank_account_[0-9]
-fork_join
-pipeline
-priority_scheduler
diff --git a/3rdparty/asio/src/examples/cpp11/executors/actor.cpp b/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
index 22dbf206a17..1f0e2c11308 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/actor.cpp
@@ -1,5 +1,5 @@
+#include <asio/any_io_executor.hpp>
#include <asio/defer.hpp>
-#include <asio/executor.hpp>
#include <asio/post.hpp>
#include <asio/strand.hpp>
#include <asio/system_executor.hpp>
@@ -10,8 +10,8 @@
#include <typeinfo>
#include <vector>
+using asio::any_io_executor;
using asio::defer;
-using asio::executor;
using asio::post;
using asio::strand;
using asio::system_executor;
@@ -106,7 +106,7 @@ public:
protected:
// Construct the actor to use the specified executor for all message handlers.
- actor(executor e)
+ actor(any_io_executor e)
: executor_(std::move(e))
{
}
@@ -124,7 +124,7 @@ protected:
template <class Actor, class Message>
void deregister_handler(void (Actor::* mf)(Message, actor_address))
{
- const std::type_info& id = typeid(message_handler<Message>);
+ const std::type_info& id = typeid(Message);
for (auto iter = handlers_.begin(); iter != handlers_.end(); ++iter)
{
if ((*iter)->message_id() == id)
@@ -171,7 +171,7 @@ private:
// All messages associated with a single actor object should be processed
// non-concurrently. We use a strand to ensure non-concurrent execution even
// if the underlying executor may use multiple threads.
- strand<executor> executor_;
+ strand<any_io_executor> executor_;
std::vector<std::shared_ptr<message_handler_base>> handlers_;
};
@@ -221,7 +221,7 @@ using asio::thread_pool;
class member : public actor
{
public:
- explicit member(executor e)
+ explicit member(any_io_executor e)
: actor(std::move(e))
{
register_handler(&member::init_handler);
diff --git a/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp b/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp
index 85f7d9582af..a63d7fc059b 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp
@@ -1,9 +1,9 @@
-#include <asio/post.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
-using asio::post;
-using asio::thread_pool;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// Traditional active object pattern.
// Member functions do not block.
@@ -11,37 +11,40 @@ using asio::thread_pool;
class bank_account
{
int balance_ = 0;
- mutable thread_pool pool_{1};
+ mutable static_thread_pool pool_{1};
public:
void deposit(int amount)
{
- post(pool_, [=]
- {
- balance_ += amount;
- });
+ pool_.executor().execute(
+ [this, amount]
+ {
+ balance_ += amount;
+ });
}
void withdraw(int amount)
{
- post(pool_, [=]
- {
- if (balance_ >= amount)
- balance_ -= amount;
- });
+ pool_.executor().execute(
+ [this, amount]
+ {
+ if (balance_ >= amount)
+ balance_ -= amount;
+ });
}
void print_balance() const
{
- post(pool_, [=]
- {
- std::cout << "balance = " << balance_ << "\n";
- });
+ pool_.executor().execute(
+ [this]
+ {
+ std::cout << "balance = " << balance_ << "\n";
+ });
}
~bank_account()
{
- pool_.join();
+ pool_.wait();
}
};
diff --git a/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp b/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp
index b646cb29518..45a24abc352 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp
@@ -1,11 +1,9 @@
-#include <asio/post.hpp>
-#include <asio/thread_pool.hpp>
-#include <asio/use_future.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
-using asio::post;
-using asio::thread_pool;
-using asio::use_future;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// Traditional active object pattern.
// Member functions block until operation is finished.
@@ -13,35 +11,37 @@ using asio::use_future;
class bank_account
{
int balance_ = 0;
- mutable thread_pool pool_{1};
+ mutable static_thread_pool pool_{1};
public:
void deposit(int amount)
{
- post(pool_,
- use_future([=]
+ asio::require(pool_.executor(), execution::blocking.always).execute(
+ [this, amount]
{
balance_ += amount;
- })).get();
+ });
}
void withdraw(int amount)
{
- post(pool_,
- use_future([=]
+ asio::require(pool_.executor(), execution::blocking.always).execute(
+ [this, amount]
{
if (balance_ >= amount)
balance_ -= amount;
- })).get();
+ });
}
int balance() const
{
- return post(pool_,
- use_future([=]
+ int result = 0;
+ asio::require(pool_.executor(), execution::blocking.always).execute(
+ [this, &result]
{
- return balance_;
- })).get();
+ result = balance_;
+ });
+ return result;
}
};
diff --git a/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp b/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp
index 69716814823..7e8a827356d 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp
@@ -1,20 +1,20 @@
-#include <asio/dispatch.hpp>
-#include <asio/execution_context.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
+#include <algorithm>
#include <condition_variable>
#include <memory>
#include <mutex>
#include <queue>
#include <thread>
+#include <numeric>
-using asio::dispatch;
-using asio::execution_context;
-using asio::thread_pool;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// A fixed-size thread pool used to implement fork/join semantics. Functions
// are scheduled using a simple FIFO queue. Implementing work stealing, or
// using a queue based on atomic operations, are left as tasks for the reader.
-class fork_join_pool : public execution_context
+class fork_join_pool
{
public:
// The constructor starts a thread pool with the specified number of threads.
@@ -22,7 +22,7 @@ public:
// Additional threads may temporarily be added to the pool if they join a
// fork_executor.
explicit fork_join_pool(
- std::size_t thread_count = std::thread::hardware_concurrency() * 2)
+ std::size_t thread_count = std::max(std::thread::hardware_concurrency(), 1u) * 2)
: use_count_(1),
threads_(thread_count)
{
@@ -32,7 +32,8 @@ public:
// it is time to shut down, i.e. the use count is zero.
for (thread_count_ = 0; thread_count_ < thread_count; ++thread_count_)
{
- dispatch(threads_, [&]
+ threads_.executor().execute(
+ [this]
{
std::unique_lock<std::mutex> lock(mutex_);
while (use_count_ > 0)
@@ -44,7 +45,7 @@ public:
catch (...)
{
stop_threads();
- threads_.join();
+ threads_.wait();
throw;
}
}
@@ -53,7 +54,7 @@ public:
~fork_join_pool()
{
stop_threads();
- threads_.join();
+ threads_.wait();
}
private:
@@ -117,7 +118,7 @@ private:
// Dispatch a function, executing it immediately if the queue is already
// loaded. Otherwise adds the function to the queue and wakes a thread.
- void do_dispatch(std::shared_ptr<function_base> p,
+ void do_execute(std::shared_ptr<function_base> p,
const std::shared_ptr<std::size_t>& work_count)
{
std::unique_lock<std::mutex> lock(mutex_);
@@ -135,16 +136,6 @@ private:
}
}
- // Add a function to the queue and wake a thread.
- void do_post(std::shared_ptr<function_base> p,
- const std::shared_ptr<std::size_t>& work_count)
- {
- std::lock_guard<std::mutex> lock(mutex_);
- queue_.push(p);
- do_work_started(work_count);
- condition_.notify_one();
- }
-
// Ask all threads to shut down.
void stop_threads()
{
@@ -158,7 +149,7 @@ private:
std::queue<std::shared_ptr<function_base>> queue_;
std::size_t use_count_;
std::size_t thread_count_;
- thread_pool threads_;
+ static_thread_pool threads_;
};
// A class that satisfies the Executor requirements. Every function or piece of
@@ -172,45 +163,16 @@ public:
{
}
- fork_join_pool& context() const noexcept
+ fork_join_pool& query(execution::context_t) const noexcept
{
return context_;
}
- void on_work_started() const noexcept
- {
- std::lock_guard<std::mutex> lock(context_.mutex_);
- context_.do_work_started(work_count_);
- }
-
- void on_work_finished() const noexcept
- {
- std::lock_guard<std::mutex> lock(context_.mutex_);
- context_.do_work_finished(work_count_);
- }
-
- template <class Func, class Alloc>
- void dispatch(Func&& f, const Alloc& a) const
- {
- auto p(std::allocate_shared<function<Func>>(
- typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
- std::move(f), work_count_));
- context_.do_dispatch(p, work_count_);
- }
-
- template <class Func, class Alloc>
- void post(Func f, const Alloc& a) const
- {
- auto p(std::allocate_shared<function<Func>>(
- typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
- std::move(f), work_count_));
- context_.do_post(p, work_count_);
- }
-
- template <class Func, class Alloc>
- void defer(Func&& f, const Alloc& a) const
+ template <class Func>
+ void execute(Func f) const
{
- post(std::forward<Func>(f), a);
+ auto p(std::make_shared<function<Func>>(std::move(f), work_count_));
+ context_.do_execute(p, work_count_);
}
friend bool operator==(const fork_executor& a,
@@ -289,8 +251,8 @@ void fork_join_sort(Iterator begin, Iterator end)
{
fork_executor fork(pool);
join_guard join(fork);
- dispatch(fork, [=]{ fork_join_sort(begin, begin + n / 2); });
- dispatch(fork, [=]{ fork_join_sort(begin + n / 2, end); });
+ fork.execute([=]{ fork_join_sort(begin, begin + n / 2); });
+ fork.execute([=]{ fork_join_sort(begin + n / 2, end); });
}
std::inplace_merge(begin, begin + n / 2, end);
}
diff --git a/3rdparty/asio/src/examples/cpp11/executors/pipeline.cpp b/3rdparty/asio/src/examples/cpp11/executors/pipeline.cpp
index 86bf860cb9c..f441e322688 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/pipeline.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/pipeline.cpp
@@ -11,6 +11,7 @@
#include <queue>
#include <thread>
#include <vector>
+#include <cctype>
using asio::execution_context;
using asio::executor_binder;
@@ -19,9 +20,10 @@ using asio::post;
using asio::system_executor;
using asio::use_future;
using asio::use_service;
+namespace execution = asio::execution;
// An executor that launches a new thread for each function submitted to it.
-// This class satisfies the Executor requirements.
+// This class satisfies the executor requirements.
class thread_executor
{
private:
@@ -54,40 +56,28 @@ private:
};
public:
- execution_context& context() const noexcept
+ execution_context& query(execution::context_t) const
{
- return system_executor().context();
+ return asio::query(system_executor(), execution::context);
}
- void on_work_started() const noexcept
+ execution::blocking_t query(execution::blocking_t) const
{
- // This executor doesn't count work.
+ return execution::blocking.never;
}
- void on_work_finished() const noexcept
+ thread_executor require(execution::blocking_t::never_t) const
{
- // This executor doesn't count work.
+ return *this;
}
- template <class Func, class Alloc>
- void dispatch(Func&& f, const Alloc& a) const
+ template <class Func>
+ void execute(Func f) const
{
- post(std::forward<Func>(f), a);
- }
-
- template <class Func, class Alloc>
- void post(Func f, const Alloc&) const
- {
- thread_bag& bag = use_service<thread_bag>(context());
+ thread_bag& bag = use_service<thread_bag>(query(execution::context));
bag.add_thread(std::thread(std::move(f)));
}
- template <class Func, class Alloc>
- void defer(Func&& f, const Alloc& a) const
- {
- post(std::forward<Func>(f), a);
- }
-
friend bool operator==(const thread_executor&,
const thread_executor&) noexcept
{
@@ -291,7 +281,7 @@ void writer(queue_back<std::string> in)
int main()
{
- thread_pool pool;
+ thread_pool pool(1);
auto f = pipeline(reader, filter, bind_executor(pool, upper), writer);
f.wait();
diff --git a/3rdparty/asio/src/examples/cpp11/executors/priority_scheduler.cpp b/3rdparty/asio/src/examples/cpp11/executors/priority_scheduler.cpp
index fb38fa2ce4b..d8ef79f3a51 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/priority_scheduler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/priority_scheduler.cpp
@@ -8,6 +8,7 @@
using asio::dispatch;
using asio::execution_context;
+namespace execution = asio::execution;
class priority_scheduler : public execution_context
{
@@ -21,47 +22,20 @@ public:
{
}
- priority_scheduler& context() const noexcept
+ priority_scheduler& query(execution::context_t) const noexcept
{
return context_;
}
- void on_work_started() const noexcept
+ template <class Func>
+ void execute(Func f) const
{
- // This executor doesn't count work. Instead, the scheduler simply runs
- // until explicitly stopped.
- }
-
- void on_work_finished() const noexcept
- {
- // This executor doesn't count work. Instead, the scheduler simply runs
- // until explicitly stopped.
- }
-
- template <class Func, class Alloc>
- void dispatch(Func&& f, const Alloc& a) const
- {
- post(std::forward<Func>(f), a);
- }
-
- template <class Func, class Alloc>
- void post(Func f, const Alloc& a) const
- {
- auto p(std::allocate_shared<item<Func>>(
- typename std::allocator_traits<
- Alloc>::template rebind_alloc<char>(a),
- priority_, std::move(f)));
+ auto p(std::make_shared<item<Func>>(priority_, std::move(f)));
std::lock_guard<std::mutex> lock(context_.mutex_);
context_.queue_.push(p);
context_.condition_.notify_one();
}
- template <class Func, class Alloc>
- void defer(Func&& f, const Alloc& a) const
- {
- post(std::forward<Func>(f), a);
- }
-
friend bool operator==(const executor_type& a,
const executor_type& b) noexcept
{
@@ -79,6 +53,12 @@ public:
int priority_;
};
+ ~priority_scheduler() noexcept
+ {
+ shutdown();
+ destroy();
+ }
+
executor_type get_executor(int pri = 0) noexcept
{
return executor_type(*const_cast<priority_scheduler*>(this), pri);
diff --git a/3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp b/3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp
new file mode 100644
index 00000000000..edfb2765ed5
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp
@@ -0,0 +1,101 @@
+//
+// async_file_copy.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <iostream>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_FILE)
+
+class file_copier
+{
+public:
+ file_copier(asio::io_context& io_context,
+ const char* from, const char* to)
+ : from_file_(io_context, from,
+ asio::stream_file::read_only),
+ to_file_(io_context, to,
+ asio::stream_file::write_only
+ | asio::stream_file::create
+ | asio::stream_file::truncate)
+ {
+ }
+
+ void start()
+ {
+ do_read();
+ }
+
+private:
+ void do_read()
+ {
+ from_file_.async_read_some(asio::buffer(data_),
+ [this](std::error_code error, std::size_t n)
+ {
+ if (!error)
+ {
+ do_write(n);
+ }
+ else if (error != asio::error::eof)
+ {
+ std::cerr << "Error copying file: " << error.message() << "\n";
+ }
+ });
+ }
+
+ void do_write(std::size_t n)
+ {
+ asio::async_write(to_file_, asio::buffer(data_, n),
+ [this](std::error_code error, std::size_t /*n*/)
+ {
+ if (!error)
+ {
+ do_read();
+ }
+ else
+ {
+ std::cerr << "Error copying file: " << error.message() << "\n";
+ }
+ });
+ }
+
+ asio::stream_file from_file_;
+ asio::stream_file to_file_;
+ char data_[4096];
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: async_file_copy <from> <to>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ file_copier copier(io_context, argv[1], argv[2]);
+ copier.start();
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ return 1;
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_FILE)
+int main() {}
+#endif // defined(ASIO_HAS_FILE)
diff --git a/3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp b/3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp
new file mode 100644
index 00000000000..6e111b4909d
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp
@@ -0,0 +1,65 @@
+//
+// blocking_file_copy.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <iostream>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_FILE)
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: blocking_file_copy <from> <to>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ asio::stream_file from_file(io_context, argv[1],
+ asio::stream_file::read_only);
+
+ asio::stream_file to_file(io_context, argv[2],
+ asio::stream_file::write_only
+ | asio::stream_file::create
+ | asio::stream_file::truncate);
+
+ char data[4096];
+ std::error_code error;
+ for (;;)
+ {
+ std::size_t n = from_file.read_some(asio::buffer(data), error);
+ if (error)
+ break;
+ asio::write(to_file, asio::buffer(data, n), error);
+ if (error)
+ break;
+ }
+
+ if (error && error != asio::error::eof)
+ {
+ std::cerr << "Error copying file: " << error.message() << "\n";
+ return 1;
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ return 1;
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_FILE)
+int main() {}
+#endif // defined(ASIO_HAS_FILE)
diff --git a/3rdparty/asio/src/examples/cpp03/fork/daemon.cpp b/3rdparty/asio/src/examples/cpp11/fork/daemon.cpp
index 06eef3d6b49..547acb33a5a 100644
--- a/3rdparty/asio/src/examples/cpp03/fork/daemon.cpp
+++ b/3rdparty/asio/src/examples/cpp11/fork/daemon.cpp
@@ -2,7 +2,7 @@
// daemon.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,8 +11,7 @@
#include <asio/io_context.hpp>
#include <asio/ip/udp.hpp>
#include <asio/signal_set.hpp>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
+#include <array>
#include <ctime>
#include <iostream>
#include <syslog.h>
@@ -24,38 +23,36 @@ class udp_daytime_server
{
public:
udp_daytime_server(asio::io_context& io_context)
- : socket_(io_context, udp::endpoint(udp::v4(), 13))
+ : socket_(io_context, {udp::v4(), 13})
{
- start_receive();
+ receive();
}
private:
- void start_receive()
+ void receive()
{
socket_.async_receive_from(
asio::buffer(recv_buffer_), remote_endpoint_,
- boost::bind(&udp_daytime_server::handle_receive, this, _1));
- }
-
- void handle_receive(const asio::error_code& ec)
- {
- if (!ec || ec == asio::error::message_size)
- {
- using namespace std; // For time_t, time and ctime;
- time_t now = time(0);
- std::string message = ctime(&now);
-
- asio::error_code ignored_ec;
- socket_.send_to(asio::buffer(message),
- remote_endpoint_, 0, ignored_ec);
- }
-
- start_receive();
+ [this](std::error_code ec, std::size_t /*n*/)
+ {
+ if (!ec)
+ {
+ using namespace std; // For time_t, time and ctime;
+ time_t now = time(0);
+ std::string message = ctime(&now);
+
+ std::error_code ignored_ec;
+ socket_.send_to(asio::buffer(message),
+ remote_endpoint_, 0, ignored_ec);
+ }
+
+ receive();
+ });
}
udp::socket socket_;
udp::endpoint remote_endpoint_;
- boost::array<char, 1> recv_buffer_;
+ std::array<char, 1> recv_buffer_;
};
int main()
@@ -74,7 +71,10 @@ int main()
// re-read of a configuration file.
asio::signal_set signals(io_context, SIGINT, SIGTERM);
signals.async_wait(
- boost::bind(&asio::io_context::stop, &io_context));
+ [&](std::error_code /*ec*/, int /*signo*/)
+ {
+ io_context.stop();
+ });
// Inform the io_context that we are about to become a daemon. The
// io_context cleans up any internal resources, such as threads, that may
diff --git a/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp b/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp
new file mode 100644
index 00000000000..cad52e7ab9f
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp
@@ -0,0 +1,162 @@
+//
+// process_per_connection.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdlib>
+#include <iostream>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+using asio::ip::tcp;
+
+class server
+{
+public:
+ server(asio::io_context& io_context, unsigned short port)
+ : io_context_(io_context),
+ signal_(io_context, SIGCHLD),
+ acceptor_(io_context, {tcp::v4(), port}),
+ socket_(io_context)
+ {
+ wait_for_signal();
+ accept();
+ }
+
+private:
+ void wait_for_signal()
+ {
+ signal_.async_wait(
+ [this](std::error_code /*ec*/, int /*signo*/)
+ {
+ // Only the parent process should check for this signal. We can
+ // determine whether we are in the parent by checking if the acceptor
+ // is still open.
+ if (acceptor_.is_open())
+ {
+ // Reap completed child processes so that we don't end up with
+ // zombies.
+ int status = 0;
+ while (waitpid(-1, &status, WNOHANG) > 0) {}
+
+ wait_for_signal();
+ }
+ });
+ }
+
+ void accept()
+ {
+ acceptor_.async_accept(
+ [this](std::error_code ec, tcp::socket new_socket)
+ {
+ if (!ec)
+ {
+ // Take ownership of the newly accepted socket.
+ socket_ = std::move(new_socket);
+
+ // Inform the io_context that we are about to fork. The io_context
+ // cleans up any internal resources, such as threads, that may
+ // interfere with forking.
+ io_context_.notify_fork(asio::io_context::fork_prepare);
+
+ if (fork() == 0)
+ {
+ // Inform the io_context that the fork is finished and that this
+ // is the child process. The io_context uses this opportunity to
+ // create any internal file descriptors that must be private to
+ // the new process.
+ io_context_.notify_fork(asio::io_context::fork_child);
+
+ // The child won't be accepting new connections, so we can close
+ // the acceptor. It remains open in the parent.
+ acceptor_.close();
+
+ // The child process is not interested in processing the SIGCHLD
+ // signal.
+ signal_.cancel();
+
+ read();
+ }
+ else
+ {
+
+ // Inform the io_context that the fork is finished (or failed)
+ // and that this is the parent process. The io_context uses this
+ // opportunity to recreate any internal resources that were
+ // cleaned up during preparation for the fork.
+ io_context_.notify_fork(asio::io_context::fork_parent);
+
+ // The parent process can now close the newly accepted socket. It
+ // remains open in the child.
+ socket_.close();
+
+ accept();
+ }
+ }
+ else
+ {
+ std::cerr << "Accept error: " << ec.message() << std::endl;
+ accept();
+ }
+ });
+ }
+
+ void read()
+ {
+ socket_.async_read_some(asio::buffer(data_),
+ [this](std::error_code ec, std::size_t length)
+ {
+ if (!ec)
+ write(length);
+ });
+ }
+
+ void write(std::size_t length)
+ {
+ asio::async_write(socket_, asio::buffer(data_, length),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ read();
+ });
+ }
+
+ asio::io_context& io_context_;
+ asio::signal_set signal_;
+ tcp::acceptor acceptor_;
+ tcp::socket socket_;
+ std::array<char, 1024> data_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: process_per_connection <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ using namespace std; // For atoi.
+ server s(io_context, atoi(argv[1]));
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << std::endl;
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp11/futures/.gitignore b/3rdparty/asio/src/examples/cpp11/futures/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp11/futures/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp b/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp
index 0004e124ff6..2f5314ede39 100644
--- a/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp
@@ -2,7 +2,7 @@
// daytime_client.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp
new file mode 100644
index 00000000000..42a31f7b316
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp
@@ -0,0 +1,135 @@
+//
+// async_tcp_echo_server.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <cstdlib>
+#include <iostream>
+#include <memory>
+#include <utility>
+#include <asio.hpp>
+
+using asio::ip::tcp;
+
+// Define a helper macro to invoke ASIO_HANDLER_LOCATION with the current
+// file name, line number, and function name. For the function name, you might
+// also consider using __PRETTY_FUNCTION__, BOOST_CURRENT_FUNCTION, or a hand-
+// crafted name. For C++20 or later, you may also use std::source_location.
+#define HANDLER_LOCATION \
+ ASIO_HANDLER_LOCATION((__FILE__, __LINE__, __func__))
+
+class session
+ : public std::enable_shared_from_this<session>
+{
+public:
+ session(tcp::socket socket)
+ : socket_(std::move(socket))
+ {
+ }
+
+ void start()
+ {
+ HANDLER_LOCATION;
+
+ do_read();
+ }
+
+private:
+ void do_read()
+ {
+ HANDLER_LOCATION;
+
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(data_, max_length),
+ [this, self](std::error_code ec, std::size_t length)
+ {
+ HANDLER_LOCATION;
+
+ if (!ec)
+ {
+ do_write(length);
+ }
+ });
+ }
+
+ void do_write(std::size_t length)
+ {
+ HANDLER_LOCATION;
+
+ auto self(shared_from_this());
+ asio::async_write(socket_, asio::buffer(data_, length),
+ [this, self](std::error_code ec, std::size_t /*length*/)
+ {
+ HANDLER_LOCATION;
+
+ if (!ec)
+ {
+ do_read();
+ }
+ });
+ }
+
+ tcp::socket socket_;
+ enum { max_length = 1024 };
+ char data_[max_length];
+};
+
+class server
+{
+public:
+ server(asio::io_context& io_context, short port)
+ : acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
+ {
+ do_accept();
+ }
+
+private:
+ void do_accept()
+ {
+ HANDLER_LOCATION;
+
+ acceptor_.async_accept(
+ [this](std::error_code ec, tcp::socket socket)
+ {
+ HANDLER_LOCATION;
+
+ if (!ec)
+ {
+ std::make_shared<session>(std::move(socket))->start();
+ }
+
+ do_accept();
+ });
+ }
+
+ tcp::acceptor acceptor_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: async_tcp_echo_server <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ server s(io_context, std::atoi(argv[1]));
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp b/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
index 41b355c748c..57b162a51e8 100644
--- a/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
+++ b/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
@@ -2,7 +2,7 @@
// custom_tracking.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,6 +24,9 @@
# define ASIO_HANDLER_TRACKING_INIT \
::custom_tracking::init()
+# define ASIO_HANDLER_LOCATION(args) \
+ ::custom_tracking::location args
+
# define ASIO_HANDLER_CREATION(args) \
::custom_tracking::creation args
@@ -71,9 +74,16 @@ struct custom_tracking
{
}
+ // Record a source location.
+ static void location(const char* file_name,
+ int line, const char* function_name)
+ {
+ std::printf("At location %s:%d in %s\n", file_name, line, function_name);
+ }
+
// Record the creation of a tracked handler.
- static void creation(asio::execution_context& /*ctx*/, tracked_handler& h,
- const char* object_type, void* /*object*/,
+ static void creation(asio::execution_context& /*ctx*/,
+ tracked_handler& h, const char* object_type, void* /*object*/,
std::uintmax_t native_handle, const char* op_name)
{
// Generate a unique id for the new handler.
@@ -177,7 +187,7 @@ struct custom_tracking
// Record a reactor-based operation that is associated with a handler.
static void reactor_operation(const tracked_handler& h,
- const char* op_name, const asio::error_code& ec)
+ const char* op_name, const std::error_code& ec)
{
std::printf(
"Performed operation %s.%s for native_handle = %" PRIuMAX
@@ -187,7 +197,7 @@ struct custom_tracking
// Record a reactor-based operation that is associated with a handler.
static void reactor_operation(const tracked_handler& h,
- const char* op_name, const asio::error_code& ec,
+ const char* op_name, const std::error_code& ec,
std::size_t bytes_transferred)
{
std::printf(
diff --git a/3rdparty/asio/src/examples/cpp03/http/client/async_client.cpp b/3rdparty/asio/src/examples/cpp11/http/client/async_client.cpp
index 83dcc36d53a..309ae252147 100644
--- a/3rdparty/asio/src/examples/cpp03/http/client/async_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/client/async_client.cpp
@@ -2,18 +2,18 @@
// async_client.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <functional>
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include <asio.hpp>
-#include <boost/bind.hpp>
using asio::ip::tcp;
@@ -37,13 +37,13 @@ public:
// Start an asynchronous resolve to translate the server and service names
// into a list of endpoints.
resolver_.async_resolve(server, "http",
- boost::bind(&client::handle_resolve, this,
+ std::bind(&client::handle_resolve, this,
asio::placeholders::error,
asio::placeholders::results));
}
private:
- void handle_resolve(const asio::error_code& err,
+ void handle_resolve(const std::error_code& err,
const tcp::resolver::results_type& endpoints)
{
if (!err)
@@ -51,7 +51,7 @@ private:
// Attempt a connection to each endpoint in the list until we
// successfully establish a connection.
asio::async_connect(socket_, endpoints,
- boost::bind(&client::handle_connect, this,
+ std::bind(&client::handle_connect, this,
asio::placeholders::error));
}
else
@@ -60,13 +60,13 @@ private:
}
}
- void handle_connect(const asio::error_code& err)
+ void handle_connect(const std::error_code& err)
{
if (!err)
{
// The connection was successful. Send the request.
asio::async_write(socket_, request_,
- boost::bind(&client::handle_write_request, this,
+ std::bind(&client::handle_write_request, this,
asio::placeholders::error));
}
else
@@ -75,7 +75,7 @@ private:
}
}
- void handle_write_request(const asio::error_code& err)
+ void handle_write_request(const std::error_code& err)
{
if (!err)
{
@@ -83,7 +83,7 @@ private:
// automatically grow to accommodate the entire line. The growth may be
// limited by passing a maximum size to the streambuf constructor.
asio::async_read_until(socket_, response_, "\r\n",
- boost::bind(&client::handle_read_status_line, this,
+ std::bind(&client::handle_read_status_line, this,
asio::placeholders::error));
}
else
@@ -92,7 +92,7 @@ private:
}
}
- void handle_read_status_line(const asio::error_code& err)
+ void handle_read_status_line(const std::error_code& err)
{
if (!err)
{
@@ -118,7 +118,7 @@ private:
// Read the response headers, which are terminated by a blank line.
asio::async_read_until(socket_, response_, "\r\n\r\n",
- boost::bind(&client::handle_read_headers, this,
+ std::bind(&client::handle_read_headers, this,
asio::placeholders::error));
}
else
@@ -127,7 +127,7 @@ private:
}
}
- void handle_read_headers(const asio::error_code& err)
+ void handle_read_headers(const std::error_code& err)
{
if (!err)
{
@@ -145,7 +145,7 @@ private:
// Start reading remaining data until EOF.
asio::async_read(socket_, response_,
asio::transfer_at_least(1),
- boost::bind(&client::handle_read_content, this,
+ std::bind(&client::handle_read_content, this,
asio::placeholders::error));
}
else
@@ -154,7 +154,7 @@ private:
}
}
- void handle_read_content(const asio::error_code& err)
+ void handle_read_content(const std::error_code& err)
{
if (!err)
{
@@ -164,7 +164,7 @@ private:
// Continue reading remaining data until EOF.
asio::async_read(socket_, response_,
asio::transfer_at_least(1),
- boost::bind(&client::handle_read_content, this,
+ std::bind(&client::handle_read_content, this,
asio::placeholders::error));
}
else if (err != asio::error::eof)
diff --git a/3rdparty/asio/src/examples/cpp03/http/client/sync_client.cpp b/3rdparty/asio/src/examples/cpp11/http/client/sync_client.cpp
index a11b5c7c76a..4f5ad099317 100644
--- a/3rdparty/asio/src/examples/cpp03/http/client/sync_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/client/sync_client.cpp
@@ -2,7 +2,7 @@
// sync_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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,12 +90,12 @@ int main(int argc, char* argv[])
std::cout << &response;
// Read until EOF, writing data to output as we go.
- asio::error_code error;
+ std::error_code error;
while (asio::read(socket, response,
asio::transfer_at_least(1), error))
std::cout << &response;
if (error != asio::error::eof)
- throw asio::system_error(error);
+ throw std::system_error(error);
}
catch (std::exception& e)
{
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/.gitignore b/3rdparty/asio/src/examples/cpp11/http/server/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp11/http/server/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp b/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp
index f4d9cac46e5..58d619fec76 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp
@@ -2,7 +2,7 @@
// connection.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,6 @@
#include "connection.hpp"
#include <utility>
-#include <vector>
#include "connection_manager.hpp"
#include "request_handler.hpp"
@@ -78,7 +77,7 @@ void connection::do_write()
if (!ec)
{
// Initiate graceful connection closure.
- asio::error_code ignored_ec;
+ std::error_code ignored_ec;
socket_.shutdown(asio::ip::tcp::socket::shutdown_both,
ignored_ec);
}
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp b/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp
index 96364db0daa..1d671ebdcbe 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,9 +11,9 @@
#ifndef HTTP_CONNECTION_HPP
#define HTTP_CONNECTION_HPP
+#include <asio.hpp>
#include <array>
#include <memory>
-#include <asio.hpp>
#include "reply.hpp"
#include "request.hpp"
#include "request_handler.hpp"
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp
index 55bfb9ad719..88161919330 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp
@@ -2,7 +2,7 @@
// connection_manager.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp
index 8dadf416347..0b35408fae5 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp
@@ -2,7 +2,7 @@
// connection_manager.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server/header.hpp
index 22e3c4a7a10..e91e6ff23a2 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server/main.cpp
index 44fc930f494..b76044a96cd 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp
index eb779197189..23153caa1df 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp
index 2fc0332791f..fcefce5437b 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp
index 2c9901312bb..9d8f04e2ae1 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp
index 5189ac4363e..f1eee1f891b 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server/request.hpp
index 129a3990b3d..93a96db12b4 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request.hpp
@@ -2,7 +2,7 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp
index c346ab9791e..97b4ac6a8e6 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp
@@ -2,7 +2,7 @@
// request_handler.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp
index 24cca33565a..978b37ca537 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp
@@ -2,7 +2,7 @@
// request_handler.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp
index 6812a558879..ff56e9c618a 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp
index 643dd71c6f4..260e8759acb 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp
@@ -2,7 +2,7 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server/server.cpp
index fa76a4def03..d824ebbf229 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server/server.hpp
index 4f98f6cd07f..c88d0149114 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp
new file mode 100644
index 00000000000..ab8ab9e0524
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp
@@ -0,0 +1,89 @@
+//
+// connection.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "connection.hpp"
+#include <utility>
+#include "request_handler.hpp"
+
+namespace http {
+namespace server2 {
+
+connection::connection(asio::ip::tcp::socket socket,
+ request_handler& handler)
+ : socket_(std::move(socket)),
+ request_handler_(handler)
+{
+}
+
+void connection::start()
+{
+ do_read();
+}
+
+void connection::do_read()
+{
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(buffer_),
+ [this, self](std::error_code ec, std::size_t bytes_transferred)
+ {
+ if (!ec)
+ {
+ request_parser::result_type result;
+ std::tie(result, std::ignore) = request_parser_.parse(
+ request_, buffer_.data(), buffer_.data() + bytes_transferred);
+
+ if (result == request_parser::good)
+ {
+ request_handler_.handle_request(request_, reply_);
+ do_write();
+ }
+ else if (result == request_parser::bad)
+ {
+ reply_ = reply::stock_reply(reply::bad_request);
+ do_write();
+ }
+ else
+ {
+ do_read();
+ }
+ }
+
+ // If an error occurs then no new asynchronous operations are
+ // started. This means that all shared_ptr references to the
+ // connection object will disappear and the object will be
+ // destroyed automatically after this handler returns. The
+ // connection class's destructor closes the socket.
+ });
+}
+
+void connection::do_write()
+{
+ auto self(shared_from_this());
+ asio::async_write(socket_, reply_.to_buffers(),
+ [this, self](std::error_code ec, std::size_t)
+ {
+ if (!ec)
+ {
+ // Initiate graceful connection closure.
+ std::error_code ignored_ec;
+ socket_.shutdown(asio::ip::tcp::socket::shutdown_both,
+ ignored_ec);
+ }
+
+ // No new asynchronous operations are started. This means that
+ // all shared_ptr references to the connection object will
+ // disappear and the object will be destroyed automatically after
+ // this handler returns. The connection class's destructor closes
+ // the socket.
+ });
+}
+
+} // namespace server2
+} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/connection.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/connection.hpp
index 9c624a8a172..7d4a4735754 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,10 +12,8 @@
#define HTTP_SERVER2_CONNECTION_HPP
#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
+#include <array>
+#include <memory>
#include "reply.hpp"
#include "request.hpp"
#include "request_handler.hpp"
@@ -26,27 +24,25 @@ namespace server2 {
/// Represents a single connection from a client.
class connection
- : public boost::enable_shared_from_this<connection>,
- private boost::noncopyable
+ : public std::enable_shared_from_this<connection>
{
public:
- /// Construct a connection with the given io_context.
- explicit connection(asio::io_context& io_context,
- request_handler& handler);
+ connection(const connection&) = delete;
+ connection& operator=(const connection&) = delete;
- /// Get the socket associated with the connection.
- asio::ip::tcp::socket& socket();
+ /// Construct a connection with the given socket.
+ explicit connection(asio::ip::tcp::socket socket,
+ request_handler& handler);
/// Start the first asynchronous operation for the connection.
void start();
private:
- /// Handle completion of a read operation.
- void handle_read(const asio::error_code& e,
- std::size_t bytes_transferred);
+ /// Perform an asynchronous read operation.
+ void do_read();
- /// Handle completion of a write operation.
- void handle_write(const asio::error_code& e);
+ /// Perform an asynchronous write operation.
+ void do_write();
/// Socket for the connection.
asio::ip::tcp::socket socket_;
@@ -55,7 +51,7 @@ private:
request_handler& request_handler_;
/// Buffer for incoming data.
- boost::array<char, 8192> buffer_;
+ std::array<char, 8192> buffer_;
/// The incoming request.
request request_;
@@ -67,7 +63,7 @@ private:
reply reply_;
};
-typedef boost::shared_ptr<connection> connection_ptr;
+typedef std::shared_ptr<connection> connection_ptr;
} // namespace server2
} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/header.hpp
index 0e44c551409..f888dde03c0 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.cpp
index 049ac988615..bea08903087 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.cpp
@@ -2,7 +2,7 @@
// io_context_pool.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,8 +10,7 @@
#include "server.hpp"
#include <stdexcept>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
+#include <thread>
namespace http {
namespace server2 {
@@ -35,17 +34,13 @@ io_context_pool::io_context_pool(std::size_t pool_size)
void io_context_pool::run()
{
// Create a pool of threads to run all of the io_contexts.
- std::vector<boost::shared_ptr<asio::thread> > threads;
+ std::vector<std::thread> threads;
for (std::size_t i = 0; i < io_contexts_.size(); ++i)
- {
- boost::shared_ptr<asio::thread> thread(new asio::thread(
- boost::bind(&asio::io_context::run, io_contexts_[i])));
- threads.push_back(thread);
- }
+ threads.emplace_back([this, i]{ io_contexts_[i]->run(); });
// Wait for all threads in the pool to exit.
for (std::size_t i = 0; i < threads.size(); ++i)
- threads[i]->join();
+ threads[i].join();
}
void io_context_pool::stop()
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.hpp
index 6a573c539f6..0946ba6e484 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.hpp
@@ -2,7 +2,7 @@
// io_context_pool.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,16 +12,15 @@
#define HTTP_SERVER2_IO_SERVICE_POOL_HPP
#include <asio.hpp>
+#include <list>
+#include <memory>
#include <vector>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
namespace http {
namespace server2 {
/// A pool of io_context objects.
class io_context_pool
- : private boost::noncopyable
{
public:
/// Construct the io_context pool.
@@ -37,7 +36,10 @@ public:
asio::io_context& get_io_context();
private:
- typedef boost::shared_ptr<asio::io_context> io_context_ptr;
+ io_context_pool(const io_context_pool&) = delete;
+ io_context_pool& operator=(const io_context_pool&) = delete;
+
+ typedef std::shared_ptr<asio::io_context> io_context_ptr;
typedef asio::executor_work_guard<
asio::io_context::executor_type> io_context_work;
@@ -45,7 +47,7 @@ private:
std::vector<io_context_ptr> io_contexts_;
/// The work that keeps the io_contexts running.
- std::vector<io_context_work> work_;
+ std::list<io_context_work> work_;
/// The next io_context to use for a connection.
std::size_t next_io_context_;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/main.cpp
index 2d224c5bac1..5b6a9a36cb3 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,8 +11,6 @@
#include <iostream>
#include <string>
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/lexical_cast.hpp>
#include "server.hpp"
int main(int argc, char* argv[])
@@ -31,7 +29,7 @@ int main(int argc, char* argv[])
}
// Initialise the server.
- std::size_t num_threads = boost::lexical_cast<std::size_t>(argv[3]);
+ std::size_t num_threads = std::stoi(argv[3]);
http::server2::server s(argv[1], argv[2], argv[4], num_threads);
// Run the server until stopped.
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.cpp
index 640f3aedc44..03079331e93 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.hpp
index 57d1412b7b1..32985c18e59 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/reply.cpp
index 958577b2ce4..d48bfd9e463 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,6 @@
#include "reply.hpp"
#include <string>
-#include <boost/lexical_cast.hpp>
namespace http {
namespace server2 {
@@ -246,7 +245,7 @@ reply reply::stock_reply(reply::status_type status)
rep.content = stock_replies::to_string(status);
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = "text/html";
return rep;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/reply.hpp
index 17f11e7dde3..f4be7ca94fe 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/request.hpp
index 39070ee2f84..b0000b00967 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request.hpp
@@ -2,7 +2,7 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.cpp
index 9369c107166..c57fa9757f5 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.cpp
@@ -2,7 +2,7 @@
// request_handler.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <string>
-#include <boost/lexical_cast.hpp>
#include "mime_types.hpp"
#include "reply.hpp"
#include "request.hpp"
@@ -74,7 +73,7 @@ void request_handler::handle_request(const request& req, reply& rep)
rep.content.append(buf, is.gcount());
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = mime_types::extension_to_type(extension);
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.hpp
index 8d24686fa54..c9e9ebf418f 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.hpp
@@ -2,7 +2,7 @@
// request_handler.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,6 @@
#define HTTP_SERVER2_REQUEST_HANDLER_HPP
#include <string>
-#include <boost/noncopyable.hpp>
namespace http {
namespace server2 {
@@ -22,9 +21,11 @@ struct request;
/// The common handler for all incoming requests.
class request_handler
- : private boost::noncopyable
{
public:
+ request_handler(const request_handler&) = delete;
+ request_handler& operator=(const request_handler&) = delete;
+
/// Construct with a directory containing files to be served.
explicit request_handler(const std::string& doc_root);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.cpp
index ae80b20f784..2cd8ac00b47 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,90 +24,90 @@ void request_parser::reset()
state_ = method_start;
}
-boost::tribool request_parser::consume(request& req, char input)
+request_parser::result_type request_parser::consume(request& req, char input)
{
switch (state_)
{
case method_start:
if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
state_ = method;
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case method:
if (input == ' ')
{
state_ = uri;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case uri:
if (input == ' ')
{
state_ = http_version_h;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.uri.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case http_version_h:
if (input == 'H')
{
state_ = http_version_t_1;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_1:
if (input == 'T')
{
state_ = http_version_t_2;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_2:
if (input == 'T')
{
state_ = http_version_p;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_p:
if (input == 'P')
{
state_ = http_version_slash;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_slash:
if (input == '/')
@@ -115,170 +115,170 @@ boost::tribool request_parser::consume(request& req, char input)
req.http_version_major = 0;
req.http_version_minor = 0;
state_ = http_version_major_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major_start:
if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
state_ = http_version_major;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major:
if (input == '.')
{
state_ = http_version_minor_start;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor_start:
if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
state_ = http_version_minor;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor:
if (input == '\r')
{
state_ = expecting_newline_1;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_1:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = header_name;
- return boost::indeterminate;
+ return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (input == ' ' || input == '\t')
{
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case header_name:
if (input == ':')
{
state_ = space_before_header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().name.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case space_before_header_value:
if (input == ' ')
{
state_ = header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_value:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case expecting_newline_2:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_3:
- return (input == '\n');
+ return (input == '\n') ? good : bad;
default:
- return false;
+ return bad;
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.hpp
index 133a6492058..1d11168b72d 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.hpp
@@ -2,7 +2,7 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,8 +11,7 @@
#ifndef HTTP_SERVER2_REQUEST_PARSER_HPP
#define HTTP_SERVER2_REQUEST_PARSER_HPP
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
namespace http {
namespace server2 {
@@ -29,27 +28,29 @@ public:
/// Reset to initial parser state.
void reset();
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
+ /// Result of parse.
+ enum result_type { good, bad, indeterminate };
+
+ /// Parse some data. The enum return value is good when a complete request has
+ /// been parsed, bad if the data is invalid, indeterminate when more data is
+ /// required. The InputIterator return value indicates how much of the input
+ /// has been consumed.
template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
+ std::tuple<result_type, InputIterator> parse(request& req,
InputIterator begin, InputIterator end)
{
while (begin != end)
{
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
+ result_type result = consume(req, *begin++);
+ if (result == good || result == bad)
+ return std::make_tuple(result, begin);
}
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
+ return std::make_tuple(indeterminate, begin);
}
private:
/// Handle the next character of input.
- boost::tribool consume(request& req, char input);
+ result_type consume(request& req, char input);
/// Check if a byte is an HTTP character.
static bool is_char(int c);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/server.cpp
index 75d3a48aa84..2ae733086a5 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/server.cpp
@@ -2,14 +2,16 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include "server.hpp"
-#include <boost/bind.hpp>
+#include <signal.h>
+#include <utility>
+#include "connection.hpp"
namespace http {
namespace server2 {
@@ -19,7 +21,6 @@ server::server(const std::string& address, const std::string& port,
: io_context_pool_(io_context_pool_size),
signals_(io_context_pool_.get_io_context()),
acceptor_(io_context_pool_.get_io_context()),
- new_connection_(),
request_handler_(doc_root)
{
// Register to handle the signals that indicate when the server should exit.
@@ -30,10 +31,11 @@ server::server(const std::string& address, const std::string& port,
#if defined(SIGQUIT)
signals_.add(SIGQUIT);
#endif // defined(SIGQUIT)
- signals_.async_wait(boost::bind(&server::handle_stop, this));
+
+ do_await_stop();
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
- asio::ip::tcp::resolver resolver(acceptor_.get_executor().context());
+ asio::ip::tcp::resolver resolver(acceptor_.get_executor());
asio::ip::tcp::endpoint endpoint =
*resolver.resolve(address, port).begin();
acceptor_.open(endpoint.protocol());
@@ -41,7 +43,7 @@ server::server(const std::string& address, const std::string& port,
acceptor_.bind(endpoint);
acceptor_.listen();
- start_accept();
+ do_accept();
}
void server::run()
@@ -49,28 +51,35 @@ void server::run()
io_context_pool_.run();
}
-void server::start_accept()
+void server::do_accept()
{
- new_connection_.reset(new connection(
- io_context_pool_.get_io_context(), request_handler_));
- acceptor_.async_accept(new_connection_->socket(),
- boost::bind(&server::handle_accept, this,
- asio::placeholders::error));
-}
+ acceptor_.async_accept(io_context_pool_.get_io_context(),
+ [this](std::error_code ec, asio::ip::tcp::socket socket)
+ {
+ // Check whether the server was stopped by a signal before this
+ // completion handler had a chance to run.
+ if (!acceptor_.is_open())
+ {
+ return;
+ }
-void server::handle_accept(const asio::error_code& e)
-{
- if (!e)
- {
- new_connection_->start();
- }
+ if (!ec)
+ {
+ std::make_shared<connection>(
+ std::move(socket), request_handler_)->start();
+ }
- start_accept();
+ do_accept();
+ });
}
-void server::handle_stop()
+void server::do_await_stop()
{
- io_context_pool_.stop();
+ signals_.async_wait(
+ [this](std::error_code /*ec*/, int /*signo*/)
+ {
+ io_context_pool_.stop();
+ });
}
} // namespace server2
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/server.hpp
index 6a742a8220a..9d34a77ed7c 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -13,10 +13,6 @@
#include <asio.hpp>
#include <string>
-#include <vector>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include "connection.hpp"
#include "io_context_pool.hpp"
#include "request_handler.hpp"
@@ -25,9 +21,11 @@ namespace server2 {
/// The top-level class of the HTTP server.
class server
- : private boost::noncopyable
{
public:
+ server(const server&) = delete;
+ server& operator=(const server&) = delete;
+
/// Construct the server to listen on the specified TCP address and port, and
/// serve up files from the given directory.
explicit server(const std::string& address, const std::string& port,
@@ -37,14 +35,11 @@ public:
void run();
private:
- /// Initiate an asynchronous accept operation.
- void start_accept();
-
- /// Handle completion of an asynchronous accept operation.
- void handle_accept(const asio::error_code& e);
+ /// Perform an asynchronous accept operation.
+ void do_accept();
- /// Handle a request to stop the server.
- void handle_stop();
+ /// Wait for a request to stop the server.
+ void do_await_stop();
/// The pool of io_context objects used to perform asynchronous operations.
io_context_pool io_context_pool_;
@@ -55,9 +50,6 @@ private:
/// Acceptor used to listen for incoming connections.
asio::ip::tcp::acceptor acceptor_;
- /// The next connection to be accepted.
- connection_ptr new_connection_;
-
/// The handler for all incoming requests.
request_handler request_handler_;
};
diff --git a/3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp
new file mode 100644
index 00000000000..d4070364fb4
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp
@@ -0,0 +1,89 @@
+//
+// connection.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "connection.hpp"
+#include <utility>
+#include "request_handler.hpp"
+
+namespace http {
+namespace server3 {
+
+connection::connection(asio::ip::tcp::socket socket,
+ request_handler& handler)
+ : socket_(std::move(socket)),
+ request_handler_(handler)
+{
+}
+
+void connection::start()
+{
+ do_read();
+}
+
+void connection::do_read()
+{
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(buffer_),
+ [this, self](std::error_code ec, std::size_t bytes_transferred)
+ {
+ if (!ec)
+ {
+ request_parser::result_type result;
+ std::tie(result, std::ignore) = request_parser_.parse(
+ request_, buffer_.data(), buffer_.data() + bytes_transferred);
+
+ if (result == request_parser::good)
+ {
+ request_handler_.handle_request(request_, reply_);
+ do_write();
+ }
+ else if (result == request_parser::bad)
+ {
+ reply_ = reply::stock_reply(reply::bad_request);
+ do_write();
+ }
+ else
+ {
+ do_read();
+ }
+ }
+
+ // If an error occurs then no new asynchronous operations are
+ // started. This means that all shared_ptr references to the
+ // connection object will disappear and the object will be
+ // destroyed automatically after this handler returns. The
+ // connection class's destructor closes the socket.
+ });
+}
+
+void connection::do_write()
+{
+ auto self(shared_from_this());
+ asio::async_write(socket_, reply_.to_buffers(),
+ [this, self](std::error_code ec, std::size_t)
+ {
+ if (!ec)
+ {
+ // Initiate graceful connection closure.
+ std::error_code ignored_ec;
+ socket_.shutdown(asio::ip::tcp::socket::shutdown_both,
+ ignored_ec);
+ }
+
+ // No new asynchronous operations are started. This means that
+ // all shared_ptr references to the connection object will
+ // disappear and the object will be destroyed automatically after
+ // this handler returns. The connection class's destructor closes
+ // the socket.
+ });
+}
+
+} // namespace server3
+} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/connection.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/connection.hpp
index 2aac1a5c7ae..878cd45d366 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,10 +12,8 @@
#define HTTP_SERVER3_CONNECTION_HPP
#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
+#include <array>
+#include <memory>
#include "reply.hpp"
#include "request.hpp"
#include "request_handler.hpp"
@@ -26,30 +24,25 @@ namespace server3 {
/// Represents a single connection from a client.
class connection
- : public boost::enable_shared_from_this<connection>,
- private boost::noncopyable
+ : public std::enable_shared_from_this<connection>
{
public:
- /// Construct a connection with the given io_context.
- explicit connection(asio::io_context& io_context,
- request_handler& handler);
+ connection(const connection&) = delete;
+ connection& operator=(const connection&) = delete;
- /// Get the socket associated with the connection.
- asio::ip::tcp::socket& socket();
+ /// Construct a connection with the given socket.
+ explicit connection(asio::ip::tcp::socket socket,
+ request_handler& handler);
/// Start the first asynchronous operation for the connection.
void start();
private:
- /// Handle completion of a read operation.
- void handle_read(const asio::error_code& e,
- std::size_t bytes_transferred);
-
- /// Handle completion of a write operation.
- void handle_write(const asio::error_code& e);
+ /// Perform an asynchronous read operation.
+ void do_read();
- /// Strand to ensure the connection's handlers are not called concurrently.
- asio::io_context::strand strand_;
+ /// Perform an asynchronous write operation.
+ void do_write();
/// Socket for the connection.
asio::ip::tcp::socket socket_;
@@ -58,7 +51,7 @@ private:
request_handler& request_handler_;
/// Buffer for incoming data.
- boost::array<char, 8192> buffer_;
+ std::array<char, 8192> buffer_;
/// The incoming request.
request request_;
@@ -70,7 +63,7 @@ private:
reply reply_;
};
-typedef boost::shared_ptr<connection> connection_ptr;
+typedef std::shared_ptr<connection> connection_ptr;
} // namespace server3
} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/header.hpp
index 207c6290784..8ab5d145a6d 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/main.cpp
index 367efad729f..243de69bc75 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,8 +11,6 @@
#include <iostream>
#include <string>
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/lexical_cast.hpp>
#include "server.hpp"
int main(int argc, char* argv[])
@@ -31,7 +29,7 @@ int main(int argc, char* argv[])
}
// Initialise the server.
- std::size_t num_threads = boost::lexical_cast<std::size_t>(argv[3]);
+ std::size_t num_threads = std::stoi(argv[3]);
http::server3::server s(argv[1], argv[2], argv[4], num_threads);
// Run the server until stopped.
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.cpp
index 0b0c66e3ce4..d0d804c7caa 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.hpp
index 502766aa5ab..a144c8677e6 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/reply.cpp
index 79790a1df77..4695d4a8da2 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,6 @@
#include "reply.hpp"
#include <string>
-#include <boost/lexical_cast.hpp>
namespace http {
namespace server3 {
@@ -246,7 +245,7 @@ reply reply::stock_reply(reply::status_type status)
rep.content = stock_replies::to_string(status);
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = "text/html";
return rep;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/reply.hpp
index 9b057ca351d..fd9c7ed9ed5 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/request.hpp
index a5b34e03f8a..89a2f285b7a 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request.hpp
@@ -2,7 +2,7 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.cpp
index 9feb1cf1e3c..bdc6bd60892 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.cpp
@@ -2,7 +2,7 @@
// request_handler.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <string>
-#include <boost/lexical_cast.hpp>
#include "mime_types.hpp"
#include "reply.hpp"
#include "request.hpp"
@@ -74,7 +73,7 @@ void request_handler::handle_request(const request& req, reply& rep)
rep.content.append(buf, is.gcount());
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = mime_types::extension_to_type(extension);
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.hpp
index bb94cad0d1d..e3fe84ed0cb 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.hpp
@@ -2,7 +2,7 @@
// request_handler.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,6 @@
#define HTTP_SERVER3_REQUEST_HANDLER_HPP
#include <string>
-#include <boost/noncopyable.hpp>
namespace http {
namespace server3 {
@@ -22,9 +21,11 @@ struct request;
/// The common handler for all incoming requests.
class request_handler
- : private boost::noncopyable
{
public:
+ request_handler(const request_handler&) = delete;
+ request_handler& operator=(const request_handler&) = delete;
+
/// Construct with a directory containing files to be served.
explicit request_handler(const std::string& doc_root);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.cpp
index 98f91286fe8..9fb6424fad7 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -24,90 +24,90 @@ void request_parser::reset()
state_ = method_start;
}
-boost::tribool request_parser::consume(request& req, char input)
+request_parser::result_type request_parser::consume(request& req, char input)
{
switch (state_)
{
case method_start:
if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
state_ = method;
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case method:
if (input == ' ')
{
state_ = uri;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case uri:
if (input == ' ')
{
state_ = http_version_h;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.uri.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case http_version_h:
if (input == 'H')
{
state_ = http_version_t_1;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_1:
if (input == 'T')
{
state_ = http_version_t_2;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_2:
if (input == 'T')
{
state_ = http_version_p;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_p:
if (input == 'P')
{
state_ = http_version_slash;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_slash:
if (input == '/')
@@ -115,170 +115,170 @@ boost::tribool request_parser::consume(request& req, char input)
req.http_version_major = 0;
req.http_version_minor = 0;
state_ = http_version_major_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major_start:
if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
state_ = http_version_major;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major:
if (input == '.')
{
state_ = http_version_minor_start;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor_start:
if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
state_ = http_version_minor;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor:
if (input == '\r')
{
state_ = expecting_newline_1;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_1:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = header_name;
- return boost::indeterminate;
+ return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (input == ' ' || input == '\t')
{
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case header_name:
if (input == ':')
{
state_ = space_before_header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().name.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case space_before_header_value:
if (input == ' ')
{
state_ = header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_value:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case expecting_newline_2:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_3:
- return (input == '\n');
+ return (input == '\n') ? good : bad;
default:
- return false;
+ return bad;
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.hpp
index b680eee037b..a8334ed13ee 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.hpp
@@ -2,7 +2,7 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,8 +11,7 @@
#ifndef HTTP_SERVER3_REQUEST_PARSER_HPP
#define HTTP_SERVER3_REQUEST_PARSER_HPP
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
namespace http {
namespace server3 {
@@ -29,27 +28,29 @@ public:
/// Reset to initial parser state.
void reset();
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
+ /// Result of parse.
+ enum result_type { good, bad, indeterminate };
+
+ /// Parse some data. The enum return value is good when a complete request has
+ /// been parsed, bad if the data is invalid, indeterminate when more data is
+ /// required. The InputIterator return value indicates how much of the input
+ /// has been consumed.
template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
+ std::tuple<result_type, InputIterator> parse(request& req,
InputIterator begin, InputIterator end)
{
while (begin != end)
{
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
+ result_type result = consume(req, *begin++);
+ if (result == good || result == bad)
+ return std::make_tuple(result, begin);
}
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
+ return std::make_tuple(indeterminate, begin);
}
private:
/// Handle the next character of input.
- boost::tribool consume(request& req, char input);
+ result_type consume(request& req, char input);
/// Check if a byte is an HTTP character.
static bool is_char(int c);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/server.cpp
index 2a78bc9719e..c8da4b4f4db 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/server.cpp
@@ -2,16 +2,18 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include "server.hpp"
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
+#include <signal.h>
+#include <thread>
+#include <utility>
#include <vector>
+#include "connection.hpp"
namespace http {
namespace server3 {
@@ -21,7 +23,6 @@ server::server(const std::string& address, const std::string& port,
: thread_pool_size_(thread_pool_size),
signals_(io_context_),
acceptor_(io_context_),
- new_connection_(),
request_handler_(doc_root)
{
// Register to handle the signals that indicate when the server should exit.
@@ -32,7 +33,8 @@ server::server(const std::string& address, const std::string& port,
#if defined(SIGQUIT)
signals_.add(SIGQUIT);
#endif // defined(SIGQUIT)
- signals_.async_wait(boost::bind(&server::handle_stop, this));
+
+ do_await_stop();
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
asio::ip::tcp::resolver resolver(io_context_);
@@ -43,46 +45,52 @@ server::server(const std::string& address, const std::string& port,
acceptor_.bind(endpoint);
acceptor_.listen();
- start_accept();
+ do_accept();
}
void server::run()
{
- // Create a pool of threads to run all of the io_contexts.
- std::vector<boost::shared_ptr<asio::thread> > threads;
+ // Create a pool of threads to run the io_context.
+ std::vector<std::thread> threads;
for (std::size_t i = 0; i < thread_pool_size_; ++i)
- {
- boost::shared_ptr<asio::thread> thread(new asio::thread(
- boost::bind(&asio::io_context::run, &io_context_)));
- threads.push_back(thread);
- }
+ threads.emplace_back([this]{ io_context_.run(); });
// Wait for all threads in the pool to exit.
for (std::size_t i = 0; i < threads.size(); ++i)
- threads[i]->join();
+ threads[i].join();
}
-void server::start_accept()
+void server::do_accept()
{
- new_connection_.reset(new connection(io_context_, request_handler_));
- acceptor_.async_accept(new_connection_->socket(),
- boost::bind(&server::handle_accept, this,
- asio::placeholders::error));
-}
+ // The newly accepted socket is put into its own strand to ensure that all
+ // completion handlers associated with the connection do not run concurrently.
+ acceptor_.async_accept(asio::make_strand(io_context_),
+ [this](std::error_code ec, asio::ip::tcp::socket socket)
+ {
+ // Check whether the server was stopped by a signal before this
+ // completion handler had a chance to run.
+ if (!acceptor_.is_open())
+ {
+ return;
+ }
-void server::handle_accept(const asio::error_code& e)
-{
- if (!e)
- {
- new_connection_->start();
- }
+ if (!ec)
+ {
+ std::make_shared<connection>(
+ std::move(socket), request_handler_)->start();
+ }
- start_accept();
+ do_accept();
+ });
}
-void server::handle_stop()
+void server::do_await_stop()
{
- io_context_.stop();
+ signals_.async_wait(
+ [this](std::error_code /*ec*/, int /*signo*/)
+ {
+ io_context_.stop();
+ });
}
} // namespace server3
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/server.hpp
index c58c2433f65..2948cadbf17 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -13,10 +13,6 @@
#include <asio.hpp>
#include <string>
-#include <vector>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include "connection.hpp"
#include "request_handler.hpp"
namespace http {
@@ -24,9 +20,11 @@ namespace server3 {
/// The top-level class of the HTTP server.
class server
- : private boost::noncopyable
{
public:
+ server(const server&) = delete;
+ server& operator=(const server&) = delete;
+
/// Construct the server to listen on the specified TCP address and port, and
/// serve up files from the given directory.
explicit server(const std::string& address, const std::string& port,
@@ -36,14 +34,11 @@ public:
void run();
private:
- /// Initiate an asynchronous accept operation.
- void start_accept();
-
- /// Handle completion of an asynchronous accept operation.
- void handle_accept(const asio::error_code& e);
+ /// Perform an asynchronous accept operation.
+ void do_accept();
- /// Handle a request to stop the server.
- void handle_stop();
+ /// Wait for a request to stop the server.
+ void do_await_stop();
/// The number of threads that will call io_context::run().
std::size_t thread_pool_size_;
@@ -57,9 +52,6 @@ private:
/// Acceptor used to listen for incoming connections.
asio::ip::tcp::acceptor acceptor_;
- /// The next connection to be accepted.
- connection_ptr new_connection_;
-
/// The handler for all incoming requests.
request_handler request_handler_;
};
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.cpp
index a4ac912b155..ad982e58b26 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.cpp
@@ -2,7 +2,7 @@
// file_handler.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <string>
-#include <boost/lexical_cast.hpp>
#include "mime_types.hpp"
#include "reply.hpp"
#include "request.hpp"
@@ -74,7 +73,7 @@ void file_handler::operator()(const request& req, reply& rep)
rep.content.append(buf, is.gcount());
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = mime_types::extension_to_type(extension);
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.hpp
index 22055dbcb1b..a16e5b6905c 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.hpp
@@ -2,7 +2,7 @@
// file_handler.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/header.hpp
index 9c9b89cca06..a4148e5d910 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/main.cpp
index 0ebe535ad17..29706e6a335 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,6 @@
#include <iostream>
#include <asio.hpp>
-#include <boost/bind.hpp>
#include <signal.h>
#include "server.hpp"
#include "file_handler.hpp"
@@ -43,8 +42,11 @@ int main(int argc, char* argv[])
#if defined(SIGQUIT)
signals.add(SIGQUIT);
#endif // defined(SIGQUIT)
- signals.async_wait(boost::bind(
- &asio::io_context::stop, &io_context));
+ signals.async_wait(
+ [&io_context](std::error_code, int)
+ {
+ io_context.stop();
+ });
// Run the server.
io_context.run();
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.cpp
index 903dffca59e..6cf11e383d8 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.hpp
index f702c6f859b..6086fce22eb 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/reply.cpp
index f508a46765f..4e5752ea7d0 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,6 @@
#include "reply.hpp"
#include <string>
-#include <boost/lexical_cast.hpp>
namespace http {
namespace server4 {
@@ -246,7 +245,7 @@ reply reply::stock_reply(reply::status_type status)
rep.content = stock_replies::to_string(status);
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = "text/html";
return rep;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/reply.hpp
index 02743a549be..d08579a3339 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/request.hpp
index 129a3990b3d..8b20c4db0db 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/request.hpp
@@ -2,21 +2,21 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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 HTTP_REQUEST_HPP
-#define HTTP_REQUEST_HPP
+#ifndef HTTP_SERVER4_REQUEST_HPP
+#define HTTP_SERVER4_REQUEST_HPP
#include <string>
#include <vector>
#include "header.hpp"
namespace http {
-namespace server {
+namespace server4 {
/// A request received from a client.
struct request
@@ -28,7 +28,7 @@ struct request
std::vector<header> headers;
};
-} // namespace server
+} // namespace server4
} // namespace http
-#endif // HTTP_REQUEST_HPP
+#endif // HTTP_SERVER4_REQUEST_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.cpp
index 80644eea529..ec557fccdd6 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,7 @@
#include "request.hpp"
namespace http {
-namespace server {
+namespace server4 {
request_parser::request_parser()
: state_(method_start)
@@ -24,90 +24,90 @@ void request_parser::reset()
state_ = method_start;
}
-boost::tribool request_parser::consume(request& req, char input)
+request_parser::result_type request_parser::consume(request& req, char input)
{
switch (state_)
{
case method_start:
if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
state_ = method;
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case method:
if (input == ' ')
{
state_ = uri;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case uri:
if (input == ' ')
{
state_ = http_version_h;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.uri.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case http_version_h:
if (input == 'H')
{
state_ = http_version_t_1;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_1:
if (input == 'T')
{
state_ = http_version_t_2;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_2:
if (input == 'T')
{
state_ = http_version_p;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_p:
if (input == 'P')
{
state_ = http_version_slash;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_slash:
if (input == '/')
@@ -115,170 +115,170 @@ boost::tribool request_parser::consume(request& req, char input)
req.http_version_major = 0;
req.http_version_minor = 0;
state_ = http_version_major_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major_start:
if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
state_ = http_version_major;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major:
if (input == '.')
{
state_ = http_version_minor_start;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor_start:
if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
state_ = http_version_minor;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor:
if (input == '\r')
{
state_ = expecting_newline_1;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_1:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = header_name;
- return boost::indeterminate;
+ return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (input == ' ' || input == '\t')
{
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case header_name:
if (input == ':')
{
state_ = space_before_header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().name.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case space_before_header_value:
if (input == ' ')
{
state_ = header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_value:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case expecting_newline_2:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_3:
- return (input == '\n');
+ return (input == '\n') ? good : bad;
default:
- return false;
+ return bad;
}
}
@@ -311,5 +311,5 @@ bool request_parser::is_digit(int c)
return c >= '0' && c <= '9';
}
-} // namespace server
+} // namespace server4
} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.hpp
index d7da53cf030..4129c489b51 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.hpp
@@ -2,20 +2,19 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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 HTTP_REQUEST_PARSER_HPP
-#define HTTP_REQUEST_PARSER_HPP
+#ifndef HTTP_SERVER4_REQUEST_PARSER_HPP
+#define HTTP_SERVER4_REQUEST_PARSER_HPP
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
namespace http {
-namespace server {
+namespace server4 {
struct request;
@@ -29,27 +28,29 @@ public:
/// Reset to initial parser state.
void reset();
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
+ /// Result of parse.
+ enum result_type { good, bad, indeterminate };
+
+ /// Parse some data. The enum return value is good when a complete request has
+ /// been parsed, bad if the data is invalid, indeterminate when more data is
+ /// required. The InputIterator return value indicates how much of the input
+ /// has been consumed.
template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
+ std::tuple<result_type, InputIterator> parse(request& req,
InputIterator begin, InputIterator end)
{
while (begin != end)
{
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
+ result_type result = consume(req, *begin++);
+ if (result == good || result == bad)
+ return std::make_tuple(result, begin);
}
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
+ return std::make_tuple(indeterminate, begin);
}
private:
/// Handle the next character of input.
- boost::tribool consume(request& req, char input);
+ result_type consume(request& req, char input);
/// Check if a byte is an HTTP character.
static bool is_char(int c);
@@ -89,7 +90,7 @@ private:
} state_;
};
-} // namespace server
+} // namespace server4
} // namespace http
-#endif // HTTP_REQUEST_PARSER_HPP
+#endif // HTTP_SERVER4_REQUEST_PARSER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/server.cpp
index 04d81a984b6..9c75f75e982 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,7 +17,7 @@ namespace server4 {
server::server(asio::io_context& io_context,
const std::string& address, const std::string& port,
- boost::function<void(const request&, reply&)> request_handler)
+ std::function<void(const request&, reply&)> request_handler)
: request_handler_(request_handler)
{
tcp::resolver resolver(io_context);
@@ -29,7 +29,7 @@ server::server(asio::io_context& io_context,
// Enable the pseudo-keywords reenter, yield and fork.
#include <asio/yield.hpp>
-void server::operator()(asio::error_code ec, std::size_t length)
+void server::operator()(std::error_code ec, std::size_t length)
{
// In this example we keep the error handling code in one place by
// hoisting it outside the coroutine. An alternative approach would be to
@@ -45,7 +45,7 @@ void server::operator()(asio::error_code ec, std::size_t length)
do
{
// Create a new socket for the next incoming connection.
- socket_.reset(new tcp::socket(acceptor_->get_executor().context()));
+ socket_.reset(new tcp::socket(acceptor_->get_executor()));
// Accept a new connection. The "yield" pseudo-keyword saves the current
// line number and exits the coroutine's "reenter" block. We use the
@@ -67,7 +67,7 @@ void server::operator()(asio::error_code ec, std::size_t length)
} while (is_parent());
// Create the objects needed to receive a request on the connection.
- buffer_.reset(new boost::array<char, 8192>);
+ buffer_.reset(new std::array<char, 8192>);
request_.reset(new request);
// Loop until a complete request (or an invalid one) has been received.
@@ -79,17 +79,17 @@ void server::operator()(asio::error_code ec, std::size_t length)
yield socket_->async_read_some(asio::buffer(*buffer_), *this);
// Parse the data we just received.
- boost::tie(valid_request_, boost::tuples::ignore)
+ std::tie(parse_result_, std::ignore)
= request_parser_.parse(*request_,
buffer_->data(), buffer_->data() + length);
// An indeterminate result means we need more data, so keep looping.
- } while (boost::indeterminate(valid_request_));
+ } while (parse_result_ == request_parser::indeterminate);
// Create the reply object that will be sent back to the client.
reply_.reset(new reply);
- if (valid_request_)
+ if (parse_result_ == request_parser::good)
{
// A valid request was received. Call the user-supplied function object
// to process the request and compose a reply.
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/server.hpp
index 580ece5e097..54d67832ba6 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,10 +12,10 @@
#define HTTP_SERVER4_SERVER_HPP
#include <asio.hpp>
+#include <array>
+#include <functional>
+#include <memory>
#include <string>
-#include <boost/array.hpp>
-#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
#include "request_parser.hpp"
namespace http {
@@ -32,39 +32,39 @@ public:
/// serve up files from the given directory.
explicit server(asio::io_context& io_context,
const std::string& address, const std::string& port,
- boost::function<void(const request&, reply&)> request_handler);
+ std::function<void(const request&, reply&)> request_handler);
/// Perform work associated with the server.
void operator()(
- asio::error_code ec = asio::error_code(),
+ std::error_code ec = std::error_code(),
std::size_t length = 0);
private:
typedef asio::ip::tcp tcp;
/// The user-supplied handler for all incoming requests.
- boost::function<void(const request&, reply&)> request_handler_;
+ std::function<void(const request&, reply&)> request_handler_;
/// Acceptor used to listen for incoming connections.
- boost::shared_ptr<tcp::acceptor> acceptor_;
+ std::shared_ptr<tcp::acceptor> acceptor_;
/// The current connection from a client.
- boost::shared_ptr<tcp::socket> socket_;
+ std::shared_ptr<tcp::socket> socket_;
/// Buffer for incoming data.
- boost::shared_ptr<boost::array<char, 8192> > buffer_;
+ std::shared_ptr<std::array<char, 8192>> buffer_;
/// The incoming request.
- boost::shared_ptr<request> request_;
+ std::shared_ptr<request> request_;
/// Whether the request is valid or not.
- boost::tribool valid_request_;
+ request_parser::result_type parse_result_;
/// The parser for the incoming request.
request_parser request_parser_;
/// The reply to be sent back to the client.
- boost::shared_ptr<reply> reply_;
+ std::shared_ptr<reply> reply_;
};
} // namespace server4
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/icmp_header.hpp b/3rdparty/asio/src/examples/cpp11/icmp/icmp_header.hpp
index 3b7b4bf5032..369511c6267 100644
--- a/3rdparty/asio/src/examples/cpp03/icmp/icmp_header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/icmp/icmp_header.hpp
@@ -2,7 +2,7 @@
// icmp_header.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/ipv4_header.hpp b/3rdparty/asio/src/examples/cpp11/icmp/ipv4_header.hpp
index 6785fd74d6c..d296571938f 100644
--- a/3rdparty/asio/src/examples/cpp03/icmp/ipv4_header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/icmp/ipv4_header.hpp
@@ -2,7 +2,7 @@
// ipv4_header.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/ping.cpp b/3rdparty/asio/src/examples/cpp11/icmp/ping.cpp
index 3a1d278415d..f179ea3461b 100644
--- a/3rdparty/asio/src/examples/cpp03/icmp/ping.cpp
+++ b/3rdparty/asio/src/examples/cpp11/icmp/ping.cpp
@@ -2,14 +2,13 @@
// ping.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <asio.hpp>
-#include <boost/bind.hpp>
#include <istream>
#include <iostream>
#include <ostream>
@@ -18,8 +17,8 @@
#include "ipv4_header.hpp"
using asio::ip::icmp;
-using asio::deadline_timer;
-namespace posix_time = boost::posix_time;
+using asio::steady_timer;
+namespace chrono = asio::chrono;
class pinger
{
@@ -53,13 +52,13 @@ private:
os << echo_request << body;
// Send the request.
- time_sent_ = posix_time::microsec_clock::universal_time();
+ time_sent_ = steady_timer::clock_type::now();
socket_.send_to(request_buffer.data(), destination_);
// Wait up to five seconds for a reply.
num_replies_ = 0;
- timer_.expires_at(time_sent_ + posix_time::seconds(5));
- timer_.async_wait(boost::bind(&pinger::handle_timeout, this));
+ timer_.expires_at(time_sent_ + chrono::seconds(5));
+ timer_.async_wait(std::bind(&pinger::handle_timeout, this));
}
void handle_timeout()
@@ -68,8 +67,8 @@ private:
std::cout << "Request timed out" << std::endl;
// Requests must be sent no less than one second apart.
- timer_.expires_at(time_sent_ + posix_time::seconds(1));
- timer_.async_wait(boost::bind(&pinger::start_send, this));
+ timer_.expires_at(time_sent_ + chrono::seconds(1));
+ timer_.async_wait(std::bind(&pinger::start_send, this));
}
void start_receive()
@@ -79,7 +78,7 @@ private:
// Wait for a reply. We prepare the buffer to receive up to 64KB.
socket_.async_receive(reply_buffer_.prepare(65536),
- boost::bind(&pinger::handle_receive, this, _2));
+ std::bind(&pinger::handle_receive, this, std::placeholders::_2));
}
void handle_receive(std::size_t length)
@@ -106,12 +105,14 @@ private:
timer_.cancel();
// Print out some information about the reply packet.
- posix_time::ptime now = posix_time::microsec_clock::universal_time();
+ chrono::steady_clock::time_point now = chrono::steady_clock::now();
+ chrono::steady_clock::duration elapsed = now - time_sent_;
std::cout << length - ipv4_hdr.header_length()
<< " bytes from " << ipv4_hdr.source_address()
<< ": icmp_seq=" << icmp_hdr.sequence_number()
<< ", ttl=" << ipv4_hdr.time_to_live()
- << ", time=" << (now - time_sent_).total_milliseconds() << " ms"
+ << ", time="
+ << chrono::duration_cast<chrono::milliseconds>(elapsed).count()
<< std::endl;
}
@@ -130,9 +131,9 @@ private:
icmp::resolver resolver_;
icmp::endpoint destination_;
icmp::socket socket_;
- deadline_timer timer_;
+ steady_timer timer_;
unsigned short sequence_number_;
- posix_time::ptime time_sent_;
+ chrono::steady_clock::time_point time_sent_;
asio::streambuf reply_buffer_;
std::size_t num_replies_;
};
diff --git a/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp b/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp
new file mode 100644
index 00000000000..533bfd06861
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp
@@ -0,0 +1,202 @@
+//
+// prioritised_handlers.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio.hpp"
+#include <iostream>
+#include <memory>
+#include <queue>
+
+using asio::ip::tcp;
+
+class handler_priority_queue : public asio::execution_context
+{
+public:
+ template <typename Function>
+ void add(int priority, Function function)
+ {
+ std::unique_ptr<queued_handler_base> handler(
+ new queued_handler<Function>(
+ priority, std::move(function)));
+
+ handlers_.push(std::move(handler));
+ }
+
+ void execute_all()
+ {
+ while (!handlers_.empty())
+ {
+ handlers_.top()->execute();
+ handlers_.pop();
+ }
+ }
+
+ class executor
+ {
+ public:
+ executor(handler_priority_queue& q, int p)
+ : context_(q), priority_(p)
+ {
+ }
+
+ handler_priority_queue& context() const noexcept
+ {
+ return context_;
+ }
+
+ template <typename Function, typename Allocator>
+ void dispatch(Function f, const Allocator&) const
+ {
+ context_.add(priority_, std::move(f));
+ }
+
+ template <typename Function, typename Allocator>
+ void post(Function f, const Allocator&) const
+ {
+ context_.add(priority_, std::move(f));
+ }
+
+ template <typename Function, typename Allocator>
+ void defer(Function f, const Allocator&) const
+ {
+ context_.add(priority_, std::move(f));
+ }
+
+ void on_work_started() const noexcept {}
+ void on_work_finished() const noexcept {}
+
+ bool operator==(const executor& other) const noexcept
+ {
+ return &context_ == &other.context_ && priority_ == other.priority_;
+ }
+
+ bool operator!=(const executor& other) const noexcept
+ {
+ return !operator==(other);
+ }
+
+ private:
+ handler_priority_queue& context_;
+ int priority_;
+ };
+
+ template <typename Handler>
+ asio::executor_binder<Handler, executor>
+ wrap(int priority, Handler handler)
+ {
+ return asio::bind_executor(
+ executor(*this, priority), std::move(handler));
+ }
+
+private:
+ class queued_handler_base
+ {
+ public:
+ queued_handler_base(int p)
+ : priority_(p)
+ {
+ }
+
+ virtual ~queued_handler_base()
+ {
+ }
+
+ virtual void execute() = 0;
+
+ friend bool operator<(const std::unique_ptr<queued_handler_base>& a,
+ const std::unique_ptr<queued_handler_base>& b) noexcept
+ {
+ return a->priority_ < b->priority_;
+ }
+
+ private:
+ int priority_;
+ };
+
+ template <typename Function>
+ class queued_handler : public queued_handler_base
+ {
+ public:
+ queued_handler(int p, Function f)
+ : queued_handler_base(p), function_(std::move(f))
+ {
+ }
+
+ void execute() override
+ {
+ function_();
+ }
+
+ private:
+ Function function_;
+ };
+
+ std::priority_queue<std::unique_ptr<queued_handler_base>> handlers_;
+};
+
+//----------------------------------------------------------------------
+
+void high_priority_handler(const std::error_code& /*ec*/,
+ tcp::socket /*socket*/)
+{
+ std::cout << "High priority handler\n";
+}
+
+void middle_priority_handler(const std::error_code& /*ec*/)
+{
+ std::cout << "Middle priority handler\n";
+}
+
+struct low_priority_handler
+{
+ // Make the handler a move-only type.
+ low_priority_handler() = default;
+ low_priority_handler(const low_priority_handler&) = delete;
+ low_priority_handler(low_priority_handler&&) = default;
+
+ void operator()()
+ {
+ std::cout << "Low priority handler\n";
+ }
+};
+
+int main()
+{
+ asio::io_context io_context;
+
+ handler_priority_queue pri_queue;
+
+ // Post a completion handler to be run immediately.
+ asio::post(io_context, pri_queue.wrap(0, low_priority_handler()));
+
+ // Start an asynchronous accept that will complete immediately.
+ tcp::endpoint endpoint(asio::ip::address_v4::loopback(), 0);
+ tcp::acceptor acceptor(io_context, endpoint);
+ tcp::socket server_socket(io_context);
+ acceptor.async_accept(pri_queue.wrap(100, high_priority_handler));
+ tcp::socket client_socket(io_context);
+ client_socket.connect(acceptor.local_endpoint());
+
+ // Set a deadline timer to expire immediately.
+ asio::steady_timer timer(io_context);
+ timer.expires_at(asio::steady_timer::clock_type::time_point::min());
+ timer.async_wait(pri_queue.wrap(42, middle_priority_handler));
+
+ while (io_context.run_one())
+ {
+ // The custom invocation hook adds the handlers to the priority queue
+ // rather than executing them from within the poll_one() call.
+ while (io_context.poll_one())
+ ;
+
+ pri_queue.execute_all();
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/iostreams/.gitignore b/3rdparty/asio/src/examples/cpp11/iostreams/.gitignore
deleted file mode 100644
index bc2b4f8f7fe..00000000000
--- a/3rdparty/asio/src/examples/cpp11/iostreams/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_client
-*_server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_client.cpp b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_client.cpp
index 4d0f68ca989..0c8df192534 100644
--- a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_client.cpp
@@ -2,7 +2,7 @@
// daytime_client.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_server.cpp b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_server.cpp
index ed3f94b0505..1e644085ef1 100644
--- a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_server.cpp
@@ -2,7 +2,7 @@
// daytime_server.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -34,7 +34,7 @@ int main()
for (;;)
{
tcp::iostream stream;
- asio::error_code ec;
+ std::error_code ec;
acceptor.accept(stream.socket(), ec);
if (!ec)
{
diff --git a/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp b/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp
index 7972a67ecf9..313f177bce4 100644
--- a/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
// http_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp b/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp
new file mode 100644
index 00000000000..50d0a06712c
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp
@@ -0,0 +1,129 @@
+//
+// connect_pair.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <array>
+#include <iostream>
+#include <string>
+#include <cctype>
+#include <asio.hpp>
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS)
+
+using asio::local::stream_protocol;
+
+class uppercase_filter
+{
+public:
+ uppercase_filter(stream_protocol::socket sock)
+ : socket_(std::move(sock))
+ {
+ read();
+ }
+
+private:
+ void read()
+ {
+ socket_.async_read_some(asio::buffer(data_),
+ [this](std::error_code ec, std::size_t size)
+ {
+ if (!ec)
+ {
+ // Compute result.
+ for (std::size_t i = 0; i < size; ++i)
+ data_[i] = std::toupper(data_[i]);
+
+ // Send result.
+ write(size);
+ }
+ else
+ {
+ throw std::system_error(ec);
+ }
+ });
+ }
+
+ void write(std::size_t size)
+ {
+ asio::async_write(socket_, asio::buffer(data_, size),
+ [this](std::error_code ec, std::size_t /*size*/)
+ {
+ if (!ec)
+ {
+ // Wait for request.
+ read();
+ }
+ else
+ {
+ throw std::system_error(ec);
+ }
+ });
+ }
+
+ stream_protocol::socket socket_;
+ std::array<char, 512> data_;
+};
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context;
+
+ // Create a connected pair and pass one end to a filter.
+ stream_protocol::socket socket(io_context);
+ stream_protocol::socket filter_socket(io_context);
+ asio::local::connect_pair(socket, filter_socket);
+ uppercase_filter filter(std::move(filter_socket));
+
+ // The io_context runs in a background thread to perform filtering.
+ asio::thread thread(
+ [&io_context]()
+ {
+ try
+ {
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception in thread: " << e.what() << "\n";
+ std::exit(1);
+ }
+ });
+
+ for (;;)
+ {
+ // Collect request from user.
+ std::cout << "Enter a string: ";
+ std::string request;
+ std::getline(std::cin, request);
+
+ // Send request to filter.
+ asio::write(socket, asio::buffer(request));
+
+ // Wait for reply from filter.
+ std::vector<char> reply(request.size());
+ asio::read(socket, asio::buffer(reply));
+
+ // Show reply to user.
+ std::cout << "Result: ";
+ std::cout.write(&reply[0], request.size());
+ std::cout << std::endl;
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ std::exit(1);
+ }
+}
+
+#else // defined(ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp
new file mode 100644
index 00000000000..229509f1c14
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp
@@ -0,0 +1,102 @@
+//
+// fd_passing_stream_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2021 Heiko Hund (heiko at openvpn dot net)
+//
+// 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)
+//
+
+// Demonstrates how to pass file descriptors between processes with Asio.
+// The client send a file name (destfile) to the server. The server opens
+// the file and the associated file descriptor back to the client.
+
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS)
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+using asio::local::stream_protocol;
+
+constexpr std::size_t max_length = 1024;
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: fd_passing_stream_client <serversocket>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ stream_protocol::socket s(io_context);
+ s.connect(stream_protocol::endpoint(argv[1]));
+
+ std::cout << "Enter path to write to: ";
+ char request[max_length];
+ std::cin.getline(request, max_length);
+ size_t request_length = std::strlen(request);
+ asio::write(s, asio::buffer(request, request_length));
+
+ char reply[max_length];
+ struct msghdr msg = {};
+ struct iovec iov = { reply, sizeof(reply) };
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ union
+ {
+ struct cmsghdr align;
+ char buf[CMSG_SPACE(sizeof(int))];
+ } cmsgu;
+ msg.msg_control = cmsgu.buf;
+ msg.msg_controllen = sizeof(cmsgu.buf);
+
+ ::recvmsg(s.native_handle(), &msg, 0);
+
+ int fd = -1;
+ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
+ while (cmsg != NULL)
+ {
+ if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS)
+ {
+ std::memcpy(&fd, CMSG_DATA(cmsg), sizeof(fd));
+ break;
+ }
+ cmsg = CMSG_NXTHDR(&msg, cmsg);
+ }
+
+ if (fd != -1)
+ {
+ std::cout << "File descriptor received is: " << fd << "\n";
+ FILE* f(::fdopen(fd, "w+"));
+ if (f)
+ {
+ ::fprintf(f, "stream_client writing to received fd #%d\n", fd);
+ ::fclose(f);
+ }
+ else
+ ::close(fd);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp
new file mode 100644
index 00000000000..5082185e75c
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp
@@ -0,0 +1,160 @@
+//
+// fd_passing_stream_server.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2021 Heiko Hund (heiko at openvpn dot net)
+//
+// 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)
+//
+
+// Demonstrates how to pass file descriptors between processes with Asio.
+// The client sends a file name to the server. The server opens the file and
+// passes the associated file descriptor back to the client.
+
+#include <array>
+#include <cstdio>
+#include <cassert>
+#include <iostream>
+#include <memory>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS)
+
+using asio::local::stream_protocol;
+
+class session
+ : public std::enable_shared_from_this<session>
+{
+public:
+ session(stream_protocol::socket sock)
+ : socket_(std::move(sock))
+ {
+ }
+
+ void start()
+ {
+ do_read();
+ }
+
+private:
+ void do_read()
+ {
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(data_),
+ [this, self](std::error_code ec, std::size_t length)
+ {
+ if (ec)
+ return;
+
+ assert(length < data_.size());
+ data_[length] = 0;
+ do_write(data_.data());
+ });
+ }
+
+ void do_write(const char* filename)
+ {
+ auto self(shared_from_this());
+ socket_.async_wait(stream_protocol::socket::wait_write,
+ [this, self, filename](std::error_code ec)
+ {
+ if (ec)
+ return;
+
+ FILE* f(::fopen(filename, "w+"));
+ if (!f)
+ return;
+
+ struct msghdr msg = {};
+ char buf[] = { 0 };
+ struct iovec iov = { buf, sizeof(buf) };
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ union
+ {
+ struct cmsghdr align;
+ char buf[CMSG_SPACE(sizeof(int))];
+ } cmsgu;
+ msg.msg_control = cmsgu.buf;
+ msg.msg_controllen = sizeof(cmsgu.buf);
+
+ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
+ cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+ cmsg->cmsg_level = SOL_SOCKET;
+ cmsg->cmsg_type = SCM_RIGHTS;
+ int fd = ::fileno(f);
+ std::memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
+
+ ssize_t s(::sendmsg(socket_.native_handle(), &msg, 0));
+ ::fclose(f);
+ if (s != -1)
+ do_read();
+ });
+ }
+
+ // The socket used to communicate with the client.
+ stream_protocol::socket socket_;
+
+ // Buffer used to store data received from the client.
+ std::array<char, 1024> data_;
+};
+
+class server
+{
+public:
+ server(asio::io_context& io_context, const std::string& file)
+ : acceptor_(io_context, stream_protocol::endpoint(file))
+ {
+ do_accept();
+ }
+
+private:
+ void do_accept()
+ {
+ acceptor_.async_accept(
+ [this](std::error_code ec, stream_protocol::socket socket)
+ {
+ if (!ec)
+ {
+ std::make_shared<session>(std::move(socket))->start();
+ }
+
+ do_accept();
+ });
+ }
+
+ stream_protocol::acceptor acceptor_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: fd_passing_stream_server <socketfile>\n";
+ std::cerr << "*** WARNING: existing file is removed ***\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ std::remove(argv[1]);
+ server s(io_context, argv[1]);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp b/3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp
index d28d29e88c1..932f29d3459 100644
--- a/3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp
@@ -2,7 +2,7 @@
// stream_client.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,7 +16,7 @@
using asio::local::stream_protocol;
-enum { max_length = 1024 };
+constexpr std::size_t max_length = 1024;
int main(int argc, char* argv[])
{
@@ -36,11 +36,10 @@ int main(int argc, char* argv[])
return 1;
}
- using namespace std; // For strlen.
std::cout << "Enter message: ";
char request[max_length];
std::cin.getline(request, max_length);
- size_t length = strlen(request);
+ size_t length = std::strlen(request);
s << request;
char reply[max_length];
diff --git a/3rdparty/asio/src/examples/cpp03/local/stream_client.cpp b/3rdparty/asio/src/examples/cpp11/local/stream_client.cpp
index 6374f8fb534..32f408933ca 100644
--- a/3rdparty/asio/src/examples/cpp03/local/stream_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/local/stream_client.cpp
@@ -2,7 +2,7 @@
// stream_client.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,7 +17,7 @@
using asio::local::stream_protocol;
-enum { max_length = 1024 };
+constexpr std::size_t max_length = 1024;
int main(int argc, char* argv[])
{
@@ -34,11 +34,10 @@ int main(int argc, char* argv[])
stream_protocol::socket s(io_context);
s.connect(stream_protocol::endpoint(argv[1]));
- using namespace std; // For strlen.
std::cout << "Enter message: ";
char request[max_length];
std::cin.getline(request, max_length);
- size_t request_length = strlen(request);
+ size_t request_length = std::strlen(request);
asio::write(s, asio::buffer(request, request_length));
char reply[max_length];
diff --git a/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp b/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp
new file mode 100644
index 00000000000..85cd58f87d6
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp
@@ -0,0 +1,121 @@
+//
+// stream_server.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <array>
+#include <cstdio>
+#include <iostream>
+#include <memory>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS)
+
+using asio::local::stream_protocol;
+
+class session
+ : public std::enable_shared_from_this<session>
+{
+public:
+ session(stream_protocol::socket sock)
+ : socket_(std::move(sock))
+ {
+ }
+
+ void start()
+ {
+ do_read();
+ }
+
+private:
+ void do_read()
+ {
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(data_),
+ [this, self](std::error_code ec, std::size_t length)
+ {
+ if (!ec)
+ do_write(length);
+ });
+ }
+
+ void do_write(std::size_t length)
+ {
+ auto self(shared_from_this());
+ asio::async_write(socket_,
+ asio::buffer(data_, length),
+ [this, self](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ do_read();
+ });
+ }
+
+ // The socket used to communicate with the client.
+ stream_protocol::socket socket_;
+
+ // Buffer used to store data received from the client.
+ std::array<char, 1024> data_;
+};
+
+class server
+{
+public:
+ server(asio::io_context& io_context, const std::string& file)
+ : acceptor_(io_context, stream_protocol::endpoint(file))
+ {
+ do_accept();
+ }
+
+private:
+ void do_accept()
+ {
+ acceptor_.async_accept(
+ [this](std::error_code ec, stream_protocol::socket socket)
+ {
+ if (!ec)
+ {
+ std::make_shared<session>(std::move(socket))->start();
+ }
+
+ do_accept();
+ });
+ }
+
+ stream_protocol::acceptor acceptor_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: stream_server <file>\n";
+ std::cerr << "*** WARNING: existing file is removed ***\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ std::remove(argv[1]);
+ server s(io_context, argv[1]);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp b/3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp
index 5937050b0a8..5973bede5bb 100644
--- a/3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp
+++ b/3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp
@@ -2,18 +2,18 @@
// receiver.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <iostream>
#include <string>
#include "asio.hpp"
-#include "boost/bind.hpp"
-const short multicast_port = 30001;
+constexpr short multicast_port = 30001;
class receiver
{
@@ -34,34 +34,29 @@ public:
socket_.set_option(
asio::ip::multicast::join_group(multicast_address));
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&receiver::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
+ do_receive();
}
- void handle_receive_from(const asio::error_code& error,
- size_t bytes_recvd)
+private:
+ void do_receive()
{
- if (!error)
- {
- std::cout.write(data_, bytes_recvd);
- std::cout << std::endl;
+ socket_.async_receive_from(
+ asio::buffer(data_), sender_endpoint_,
+ [this](std::error_code ec, std::size_t length)
+ {
+ if (!ec)
+ {
+ std::cout.write(data_.data(), length);
+ std::cout << std::endl;
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&receiver::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
+ do_receive();
+ }
+ });
}
-private:
asio::ip::udp::socket socket_;
asio::ip::udp::endpoint sender_endpoint_;
- enum { max_length = 1024 };
- char data_[max_length];
+ std::array<char, 1024> data_;
};
int main(int argc, char* argv[])
diff --git a/3rdparty/asio/src/examples/cpp03/multicast/sender.cpp b/3rdparty/asio/src/examples/cpp11/multicast/sender.cpp
index 995f05aa48e..dc3cf7fd0e7 100644
--- a/3rdparty/asio/src/examples/cpp03/multicast/sender.cpp
+++ b/3rdparty/asio/src/examples/cpp11/multicast/sender.cpp
@@ -2,7 +2,7 @@
// sender.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,11 +12,9 @@
#include <sstream>
#include <string>
#include "asio.hpp"
-#include "boost/bind.hpp"
-#include "boost/date_time/posix_time/posix_time_types.hpp"
-const short multicast_port = 30001;
-const int max_message_count = 10;
+constexpr short multicast_port = 30001;
+constexpr int max_message_count = 10;
class sender
{
@@ -28,46 +26,40 @@ public:
timer_(io_context),
message_count_(0)
{
+ do_send();
+ }
+
+private:
+ void do_send()
+ {
std::ostringstream os;
os << "Message " << message_count_++;
message_ = os.str();
socket_.async_send_to(
asio::buffer(message_), endpoint_,
- boost::bind(&sender::handle_send_to, this,
- asio::placeholders::error));
- }
-
- void handle_send_to(const asio::error_code& error)
- {
- if (!error && message_count_ < max_message_count)
- {
- timer_.expires_from_now(boost::posix_time::seconds(1));
- timer_.async_wait(
- boost::bind(&sender::handle_timeout, this,
- asio::placeholders::error));
- }
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec && message_count_ < max_message_count)
+ do_timeout();
+ });
}
- void handle_timeout(const asio::error_code& error)
+ void do_timeout()
{
- if (!error)
- {
- std::ostringstream os;
- os << "Message " << message_count_++;
- message_ = os.str();
-
- socket_.async_send_to(
- asio::buffer(message_), endpoint_,
- boost::bind(&sender::handle_send_to, this,
- asio::placeholders::error));
- }
+ timer_.expires_after(std::chrono::seconds(1));
+ timer_.async_wait(
+ [this](std::error_code ec)
+ {
+ if (!ec)
+ do_send();
+ });
}
private:
asio::ip::udp::endpoint endpoint_;
asio::ip::udp::socket socket_;
- asio::deadline_timer timer_;
+ asio::steady_timer timer_;
int message_count_;
std::string message_;
};
diff --git a/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp b/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp
new file mode 100644
index 00000000000..7239a598532
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp
@@ -0,0 +1,212 @@
+//
+// third_party_lib.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <array>
+#include <iostream>
+#include <memory>
+
+using asio::ip::tcp;
+
+namespace third_party_lib {
+
+// Simulation of a third party library that wants to perform read and write
+// operations directly on a socket. It needs to be polled to determine whether
+// it requires a read or write operation, and notified when the socket is ready
+// for reading or writing.
+class session
+{
+public:
+ session(tcp::socket& socket)
+ : socket_(socket)
+ {
+ }
+
+ // Returns true if the third party library wants to be notified when the
+ // socket is ready for reading.
+ bool want_read() const
+ {
+ return state_ == reading;
+ }
+
+ // Notify that third party library that it should perform its read operation.
+ void do_read(std::error_code& ec)
+ {
+ if (std::size_t len = socket_.read_some(asio::buffer(data_), ec))
+ {
+ write_buffer_ = asio::buffer(data_, len);
+ state_ = writing;
+ }
+ }
+
+ // Returns true if the third party library wants to be notified when the
+ // socket is ready for writing.
+ bool want_write() const
+ {
+ return state_ == writing;
+ }
+
+ // Notify that third party library that it should perform its write operation.
+ void do_write(std::error_code& ec)
+ {
+ if (std::size_t len = socket_.write_some(
+ asio::buffer(write_buffer_), ec))
+ {
+ write_buffer_ = write_buffer_ + len;
+ state_ = asio::buffer_size(write_buffer_) > 0 ? writing : reading;
+ }
+ }
+
+private:
+ tcp::socket& socket_;
+ enum { reading, writing } state_ = reading;
+ std::array<char, 128> data_;
+ asio::const_buffer write_buffer_;
+};
+
+} // namespace third_party_lib
+
+// The glue between asio's sockets and the third party library.
+class connection
+ : public std::enable_shared_from_this<connection>
+{
+public:
+ connection(tcp::socket socket)
+ : socket_(std::move(socket))
+ {
+ }
+
+ void start()
+ {
+ // Put the socket into non-blocking mode.
+ socket_.non_blocking(true);
+
+ do_operations();
+ }
+
+private:
+ void do_operations()
+ {
+ auto self(shared_from_this());
+
+ // Start a read operation if the third party library wants one.
+ if (session_impl_.want_read() && !read_in_progress_)
+ {
+ read_in_progress_ = true;
+ socket_.async_wait(tcp::socket::wait_read,
+ [this, self](std::error_code ec)
+ {
+ read_in_progress_ = false;
+
+ // Notify third party library that it can perform a read.
+ if (!ec)
+ session_impl_.do_read(ec);
+
+ // The third party library successfully performed a read on the
+ // socket. Start new read or write operations based on what it now
+ // wants.
+ if (!ec || ec == asio::error::would_block)
+ do_operations();
+
+ // Otherwise, an error occurred. Closing the socket cancels any
+ // outstanding asynchronous read or write operations. The
+ // connection object will be destroyed automatically once those
+ // outstanding operations complete.
+ else
+ socket_.close();
+ });
+ }
+
+ // Start a write operation if the third party library wants one.
+ if (session_impl_.want_write() && !write_in_progress_)
+ {
+ write_in_progress_ = true;
+ socket_.async_wait(tcp::socket::wait_write,
+ [this, self](std::error_code ec)
+ {
+ write_in_progress_ = false;
+
+ // Notify third party library that it can perform a write.
+ if (!ec)
+ session_impl_.do_write(ec);
+
+ // The third party library successfully performed a write on the
+ // socket. Start new read or write operations based on what it now
+ // wants.
+ if (!ec || ec == asio::error::would_block)
+ do_operations();
+
+ // Otherwise, an error occurred. Closing the socket cancels any
+ // outstanding asynchronous read or write operations. The
+ // connection object will be destroyed automatically once those
+ // outstanding operations complete.
+ else
+ socket_.close();
+ });
+ }
+ }
+
+private:
+ tcp::socket socket_;
+ third_party_lib::session session_impl_{socket_};
+ bool read_in_progress_ = false;
+ bool write_in_progress_ = false;
+};
+
+class server
+{
+public:
+ server(asio::io_context& io_context, unsigned short port)
+ : acceptor_(io_context, {tcp::v4(), port})
+ {
+ do_accept();
+ }
+
+private:
+ void do_accept()
+ {
+ acceptor_.async_accept(
+ [this](std::error_code ec, tcp::socket socket)
+ {
+ if (!ec)
+ {
+ std::make_shared<connection>(std::move(socket))->start();
+ }
+
+ do_accept();
+ });
+ }
+
+ tcp::acceptor acceptor_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: third_party_lib <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ server s(io_context, std::atoi(argv[1]));
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp
new file mode 100644
index 00000000000..054dbdbbc88
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp
@@ -0,0 +1,159 @@
+//
+// composed_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+//------------------------------------------------------------------------------
+
+// This is the simplest example of a composed asynchronous operation, where we
+// simply repackage an existing operation. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In this example we are trivially delegating to an underlying asynchronous
+ // operation, so we can deduce the return type from that.
+ -> decltype(
+ asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionToken>(token)))
+{
+ // When delegating to the underlying operation we must take care to perfectly
+ // forward the completion token. This ensures that our operation works
+ // correctly with move-only function objects as callbacks, as well as other
+ // completion token types.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionToken>(token));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp
new file mode 100644
index 00000000000..306d4b343b4
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp
@@ -0,0 +1,229 @@
+//
+// composed_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This next simplest example of a composed asynchronous operation involves
+// repackaging multiple operations but choosing to invoke just one of them. All
+// of these underlying operations have the same completion signature. The
+// asynchronous operation requirements are met by delegating responsibility to
+// the underlying operations.
+
+// In addition to determining the mechanism by which an asynchronous operation
+// delivers its result, a completion token also determines the time when the
+// operation commences. For example, when the completion token is a simple
+// callback the operation commences before the initiating function returns.
+// However, if the completion token's delivery mechanism uses a future, we
+// might instead want to defer initiation of the operation until the returned
+// future object is waited upon.
+//
+// To enable this, when implementing an asynchronous operation we must package
+// the initiation step as a function object.
+struct async_write_message_initiation
+{
+ // The initiation function object's call operator is passed the concrete
+ // completion handler produced by the completion token. This completion
+ // handler matches the asynchronous operation's completion handler signature,
+ // which in this example is:
+ //
+ // void(std::error_code error, std::size_t)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments as members in the initiaton function object. However, we should
+ // prefer to propagate them as function call arguments as this allows the
+ // completion token to optimise how they are passed. For example, a lazy
+ // future which defers initiation would need to make a decay-copy of the
+ // arguments, but when using a simple callback the arguments can be trivially
+ // forwarded straight through.)
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& completion_handler, tcp::socket& socket,
+ const char* message, bool allow_partial_write) const
+ {
+ if (allow_partial_write)
+ {
+ // When delegating to an underlying operation we must take care to
+ // perfectly forward the completion handler. This ensures that our
+ // operation works correctly with move-only function objects as
+ // callbacks.
+ return socket.async_write_some(
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionHandler>(completion_handler));
+ }
+ else
+ {
+ // As above, we must perfectly forward the completion handler when calling
+ // the alternate underlying operation.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionHandler>(completion_handler));
+ }
+ }
+};
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, bool allow_partial_write,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message, allow_partial_write))
+{
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message, allow_partial_write);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n", false,
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", false, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", false, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp
new file mode 100644
index 00000000000..e0b5ddca85b
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp
@@ -0,0 +1,238 @@
+//
+// composed_3.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+// In addition to determining the mechanism by which an asynchronous operation
+// delivers its result, a completion token also determines the time when the
+// operation commences. For example, when the completion token is a simple
+// callback the operation commences before the initiating function returns.
+// However, if the completion token's delivery mechanism uses a future, we
+// might instead want to defer initiation of the operation until the returned
+// future object is waited upon.
+//
+// To enable this, when implementing an asynchronous operation we must package
+// the initiation step as a function object.
+struct async_write_message_initiation
+{
+ // The initiation function object's call operator is passed the concrete
+ // completion handler produced by the completion token. This completion
+ // handler matches the asynchronous operation's completion handler signature,
+ // which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments as members in the initiaton function object. However, we should
+ // prefer to propagate them as function call arguments as this allows the
+ // completion token to optimise how they are passed. For example, a lazy
+ // future which defers initiation would need to make a decay-copy of the
+ // arguments, but when using a simple callback the arguments can be trivially
+ // forwarded straight through.)
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& completion_handler,
+ tcp::socket& socket, const char* message) const
+ {
+ // The async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // This differs from our operation's signature in that it is also passed
+ // the number of bytes transferred as an argument of type std::size_t. We
+ // will adapt our completion handler to async_write's completion handler
+ // signature by using std::bind, which drops the additional argument.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ asio::bind_executor(executor,
+ std::bind(std::forward<CompletionHandler>(
+ completion_handler), std::placeholders::_1)));
+ }
+};
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message))
+{
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ // Get the result of the operation.
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp
new file mode 100644
index 00000000000..29fe26966e5
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp
@@ -0,0 +1,252 @@
+//
+// composed_4.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. We will also intercept an empty
+// message as an invalid argument, and propagate the corresponding error to the
+// user. The asynchronous operation requirements are met by delegating
+// responsibility to the underlying operation.
+
+// In addition to determining the mechanism by which an asynchronous operation
+// delivers its result, a completion token also determines the time when the
+// operation commences. For example, when the completion token is a simple
+// callback the operation commences before the initiating function returns.
+// However, if the completion token's delivery mechanism uses a future, we
+// might instead want to defer initiation of the operation until the returned
+// future object is waited upon.
+//
+// To enable this, when implementing an asynchronous operation we must package
+// the initiation step as a function object.
+struct async_write_message_initiation
+{
+ // The initiation function object's call operator is passed the concrete
+ // completion handler produced by the completion token. This completion
+ // handler matches the asynchronous operation's completion handler signature,
+ // which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments as members in the initiaton function object. However, we should
+ // prefer to propagate them as function call arguments as this allows the
+ // completion token to optimise how they are passed. For example, a lazy
+ // future which defers initiation would need to make a decay-copy of the
+ // arguments, but when using a simple callback the arguments can be trivially
+ // forwarded straight through.)
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& completion_handler,
+ tcp::socket& socket, const char* message) const
+ {
+ // The post operation has a completion handler signature of:
+ //
+ // void()
+ //
+ // and the async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // Both of these operations' completion handler signatures differ from our
+ // operation's completion handler signature. We will adapt our completion
+ // handler to these signatures by using std::bind, which drops the
+ // additional arguments.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ std::size_t length = std::strlen(message);
+ if (length == 0)
+ {
+ asio::post(
+ asio::bind_executor(executor,
+ std::bind(std::forward<CompletionHandler>(completion_handler),
+ asio::error::invalid_argument)));
+ }
+ else
+ {
+ asio::async_write(socket,
+ asio::buffer(message, length),
+ asio::bind_executor(executor,
+ std::bind(std::forward<CompletionHandler>(completion_handler),
+ std::placeholders::_1)));
+ }
+ }
+};
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message))
+{
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket, "", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp
new file mode 100644
index 00000000000..06a7af40f41
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp
@@ -0,0 +1,289 @@
+//
+// composed_5.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation automatically serialises a message, using its I/O
+// streams insertion operator, before sending it on the socket. To do this, it
+// must allocate a buffer for the encoded message and ensure this buffer's
+// validity until the underlying async_write operation completes.
+
+// In addition to determining the mechanism by which an asynchronous operation
+// delivers its result, a completion token also determines the time when the
+// operation commences. For example, when the completion token is a simple
+// callback the operation commences before the initiating function returns.
+// However, if the completion token's delivery mechanism uses a future, we
+// might instead want to defer initiation of the operation until the returned
+// future object is waited upon.
+//
+// To enable this, when implementing an asynchronous operation we must package
+// the initiation step as a function object.
+struct async_write_message_initiation
+{
+ // The initiation function object's call operator is passed the concrete
+ // completion handler produced by the completion token. This completion
+ // handler matches the asynchronous operation's completion handler signature,
+ // which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments as members in the initiaton function object. However, we should
+ // prefer to propagate them as function call arguments as this allows the
+ // completion token to optimise how they are passed. For example, a lazy
+ // future which defers initiation would need to make a decay-copy of the
+ // arguments, but when using a simple callback the arguments can be trivially
+ // forwarded straight through.)
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& completion_handler,
+ tcp::socket& socket, std::unique_ptr<std::string> encoded_message) const
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object, rather than
+ // using a lambda or std::bind.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket so
+ // that it can obtain the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The user-supplied completion handler.
+ typename std::decay<CompletionHandler>::type handler_;
+
+ // The function call operator matches the completion signature of the
+ // async_write operation.
+ void operator()(const std::error_code& error, std::size_t /*n*/)
+ {
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ // The arguments must match the completion signature of our composed
+ // operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<CompletionHandler>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<CompletionHandler>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{socket, std::move(encoded_message),
+ std::forward<CompletionHandler>(completion_handler)});
+ }
+};
+
+template <typename T, typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const T& message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(), token,
+ std::ref(socket), std::declval<std::unique_ptr<std::string>>()))
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(), token,
+ std::ref(socket), std::move(encoded_message));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, 123456,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ std::string("abcdef"), asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, 654.321, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp
new file mode 100644
index 00000000000..b948758d83a
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp
@@ -0,0 +1,349 @@
+//
+// composed_6.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/executor_work_guard.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+// In addition to determining the mechanism by which an asynchronous operation
+// delivers its result, a completion token also determines the time when the
+// operation commences. For example, when the completion token is a simple
+// callback the operation commences before the initiating function returns.
+// However, if the completion token's delivery mechanism uses a future, we
+// might instead want to defer initiation of the operation until the returned
+// future object is waited upon.
+//
+// To enable this, when implementing an asynchronous operation we must package
+// the initiation step as a function object.
+struct async_write_message_initiation
+{
+ // The initiation function object's call operator is passed the concrete
+ // completion handler produced by the completion token. This completion
+ // handler matches the asynchronous operation's completion handler signature,
+ // which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments as members in the initiaton function object. However, we should
+ // prefer to propagate them as function call arguments as this allows the
+ // completion token to optimise how they are passed. For example, a lazy
+ // future which defers initiation would need to make a decay-copy of the
+ // arguments, but when using a simple callback the arguments can be trivially
+ // forwarded straight through.)
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& completion_handler, tcp::socket& socket,
+ std::unique_ptr<std::string> encoded_message, std::size_t repeat_count,
+ std::unique_ptr<asio::steady_timer> delay_timer) const
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket as
+ // it is used for multiple async_write operations, as well as for
+ // obtaining the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The repeat count remaining.
+ std::size_t repeat_count_;
+
+ // A steady timer used for introducing a delay.
+ std::unique_ptr<asio::steady_timer> delay_timer_;
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our intermediate completion handler is implemented as a
+ // state machine.
+ enum { starting, waiting, writing } state_;
+
+ // As our composed operation performs multiple underlying I/O operations,
+ // we should maintain a work object against the I/O executor. This tells
+ // the I/O executor that there is still more work to come in the future.
+ asio::executor_work_guard<tcp::socket::executor_type> io_work_;
+
+ // The user-supplied completion handler, called once only on completion
+ // of the entire composed operation.
+ typename std::decay<CompletionHandler>::type handler_;
+
+ // By having a default value for the second argument, this function call
+ // operator matches the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ void operator()(const std::error_code& error, std::size_t = 0)
+ {
+ if (!error)
+ {
+ switch (state_)
+ {
+ case starting:
+ case writing:
+ if (repeat_count_ > 0)
+ {
+ --repeat_count_;
+ state_ = waiting;
+ delay_timer_->expires_after(std::chrono::seconds(1));
+ delay_timer_->async_wait(std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state_ = writing;
+ asio::async_write(socket_,
+ asio::buffer(*encoded_message_), std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // We no longer have any future work coming for the I/O executor.
+ io_work_.reset();
+
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<CompletionHandler>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<CompletionHandler>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{
+ socket, std::move(encoded_message),
+ repeat_count, std::move(delay_timer),
+ intermediate_completion_handler::starting,
+ asio::make_work_guard(socket.get_executor()),
+ std::forward<CompletionHandler>(completion_handler)});
+ }
+};
+
+template <typename T, typename CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(), token, std::ref(socket),
+ std::declval<std::unique_ptr<std::string>>(), repeat_count,
+ std::declval<std::unique_ptr<asio::steady_timer>>()))
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(), token, std::ref(socket),
+ std::move(encoded_message), repeat_count, std::move(delay_timer));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp
new file mode 100644
index 00000000000..8eb83dc7679
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp
@@ -0,0 +1,268 @@
+//
+// composed_7.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+// In this example, the composed operation's logic is implemented as a state
+// machine within a hand-crafted function object.
+struct async_write_messages_implementation
+{
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr smart
+ // pointer is move-only, and as a consequence our implementation is also
+ // move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The repeat count remaining.
+ std::size_t repeat_count_;
+
+ // A steady timer used for introducing a delay.
+ std::unique_ptr<asio::steady_timer> delay_timer_;
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ enum { starting, waiting, writing } state_;
+
+ // The first argument to our function object's call operator is a reference
+ // to the enclosing intermediate completion handler. This intermediate
+ // completion handler is provided for us by the asio::async_compose
+ // function, and takes care of all the details required to implement a
+ // conforming asynchronous operation. When calling an underlying asynchronous
+ // operation, we pass it this enclosing intermediate completion handler
+ // as the completion token.
+ //
+ // All arguments after the first must be defaulted to allow the state machine
+ // to be started, as well as to allow the completion handler to match the
+ // completion signature of both the async_write and steady_timer::async_wait
+ // operations.
+ template <typename Self>
+ void operator()(Self& self,
+ const std::error_code& error = std::error_code(),
+ std::size_t = 0)
+ {
+ if (!error)
+ {
+ switch (state_)
+ {
+ case starting:
+ case writing:
+ if (repeat_count_ > 0)
+ {
+ --repeat_count_;
+ state_ = waiting;
+ delay_timer_->expires_after(std::chrono::seconds(1));
+ delay_timer_->async_wait(std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state_ = writing;
+ asio::async_write(socket_,
+ asio::buffer(*encoded_message_), std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message_.reset();
+ delay_timer_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ }
+};
+
+template <typename T, typename CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_compose.
+ -> decltype(
+ asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ std::declval<async_write_messages_implementation>(),
+ token, socket))
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation in an intermediate completion handler
+ // that meets the requirements of a conforming asynchronous operation. This
+ // includes tracking outstanding work against the I/O executors associated
+ // with the operation (in this example, this is the socket's executor).
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ async_write_messages_implementation{
+ socket, std::move(encoded_message),
+ repeat_count, std::move(delay_timer),
+ async_write_messages_implementation::starting},
+ token, socket);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp
new file mode 100644
index 00000000000..ce22a5b418d
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp
@@ -0,0 +1,263 @@
+//
+// composed_8.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations,
+// using asio's stackless coroutines support to express the flow of control. It
+// automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+#include <asio/yield.hpp>
+
+// In this example, the composed operation's logic is implemented as a state
+// machine within a hand-crafted function object.
+struct async_write_messages_implementation
+{
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr smart
+ // pointer is move-only, and as a consequence our implementation is also
+ // move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The repeat count remaining.
+ std::size_t repeat_count_;
+
+ // A steady timer used for introducing a delay.
+ std::unique_ptr<asio::steady_timer> delay_timer_;
+
+ // The coroutine state.
+ asio::coroutine coro_;
+
+ // The first argument to our function object's call operator is a reference
+ // to the enclosing intermediate completion handler. This intermediate
+ // completion handler is provided for us by the asio::async_compose
+ // function, and takes care of all the details required to implement a
+ // conforming asynchronous operation. When calling an underlying asynchronous
+ // operation, we pass it this enclosing intermediate completion handler
+ // as the completion token.
+ //
+ // All arguments after the first must be defaulted to allow the state machine
+ // to be started, as well as to allow the completion handler to match the
+ // completion signature of both the async_write and steady_timer::async_wait
+ // operations.
+ template <typename Self>
+ void operator()(Self& self,
+ const std::error_code& error = std::error_code(),
+ std::size_t = 0)
+ {
+ reenter (coro_)
+ {
+ while (repeat_count_ > 0)
+ {
+ --repeat_count_;
+
+ delay_timer_->expires_after(std::chrono::seconds(1));
+ yield delay_timer_->async_wait(std::move(self));
+ if (error)
+ break;
+
+ yield asio::async_write(socket_,
+ asio::buffer(*encoded_message_), std::move(self));
+ if (error)
+ break;
+ }
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message_.reset();
+ delay_timer_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ }
+ }
+};
+
+#include <asio/unyield.hpp>
+
+template <typename T, typename CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_compose.
+ -> decltype(
+ asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ std::declval<async_write_messages_implementation>(),
+ token, socket))
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation in an intermediate completion handler
+ // that meets the requirements of a conforming asynchronous operation. This
+ // includes tracking outstanding work against the I/O executors associated
+ // with the operation (in this example, this is the socket's executor).
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ async_write_messages_implementation{socket,
+ std::move(encoded_message), repeat_count,
+ std::move(delay_timer), asio::coroutine()},
+ token, socket);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp
new file mode 100644
index 00000000000..18772884072
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp
@@ -0,0 +1,70 @@
+//
+// ranged_wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+#include <vector>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor out(ctx, ::dup(STDOUT_FILENO));
+ asio::posix::stream_descriptor err(ctx, ::dup(STDERR_FILENO));
+
+ using op_type = decltype(
+ out.async_write_some(
+ asio::buffer("", 0),
+ asio::deferred
+ )
+ );
+
+ std::vector<op_type> ops;
+
+ ops.push_back(
+ out.async_write_some(
+ asio::buffer("first\r\n", 7),
+ asio::deferred
+ )
+ );
+
+ ops.push_back(
+ err.async_write_some(
+ asio::buffer("second\r\n", 8),
+ asio::deferred
+ )
+ );
+
+ asio::experimental::make_parallel_group(ops).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::vector<std::size_t> completion_order,
+ std::vector<std::error_code> ec,
+ std::vector<std::size_t> n
+ )
+ {
+ for (std::size_t i = 0; i < completion_order.size(); ++i)
+ {
+ std::size_t idx = completion_order[i];
+ std::cout << "operation " << idx << " finished: ";
+ std::cout << ec[idx] << ", " << n[idx] << "\n";
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp
new file mode 100644
index 00000000000..a489a2966da
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp
new file mode 100644
index 00000000000..499684af69f
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_one.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_one(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp
new file mode 100644
index 00000000000..f6e52d6ca0e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_one_error.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_one_error(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp
new file mode 100644
index 00000000000..16fd2130ab8
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_one_error.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_one_success(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/client.cpp b/3rdparty/asio/src/examples/cpp11/porthopper/client.cpp
index 15d8e4803c1..e0936128d72 100644
--- a/3rdparty/asio/src/examples/cpp03/porthopper/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/porthopper/client.cpp
@@ -2,25 +2,22 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <asio.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/lambda/if.hpp>
-#include <boost/shared_ptr.hpp>
#include <algorithm>
#include <cstdlib>
#include <exception>
#include <iostream>
+#include <memory>
#include <string>
+#include <utility>
#include "protocol.hpp"
-using namespace boost;
using asio::ip::tcp;
using asio::ip::udp;
@@ -48,11 +45,10 @@ int main(int argc, char* argv[])
control_socket.connect(remote_endpoint);
// Create a datagram socket to receive data from the server.
- boost::shared_ptr<udp::socket> data_socket(
- new udp::socket(io_context, udp::endpoint(udp::v4(), 0)));
+ udp::socket data_socket(io_context, udp::endpoint(udp::v4(), 0));
// Determine what port we will receive data on.
- udp::endpoint data_endpoint = data_socket->local_endpoint();
+ udp::endpoint data_endpoint = data_socket.local_endpoint();
// Ask the server to start sending us data.
control_request start = control_request::start(data_endpoint.port());
@@ -66,7 +62,7 @@ int main(int argc, char* argv[])
{
// Receive a frame from the server.
frame f;
- data_socket->receive(f.to_buffers(), 0);
+ data_socket.receive(f.to_buffers(), 0);
if (f.number() > last_frame_number)
{
last_frame_number = f.number();
@@ -80,20 +76,20 @@ int main(int argc, char* argv[])
std::cout << " Starting renegotiation";
// Create the new data socket.
- boost::shared_ptr<udp::socket> new_data_socket(
- new udp::socket(io_context, udp::endpoint(udp::v4(), 0)));
+ udp::socket new_data_socket(io_context, udp::endpoint(udp::v4(), 0));
// Determine the new port we will use to receive data.
- udp::endpoint new_data_endpoint = new_data_socket->local_endpoint();
+ udp::endpoint new_data_endpoint = new_data_socket.local_endpoint();
// Ask the server to switch over to the new port.
control_request change = control_request::change(
data_endpoint.port(), new_data_endpoint.port());
- asio::error_code control_result;
+ std::error_code control_result;
asio::async_write(control_socket, change.to_buffers(),
- (
- lambda::var(control_result) = lambda::_1
- ));
+ [&](std::error_code ec, std::size_t /*length*/)
+ {
+ control_result = ec;
+ });
// Try to receive a frame from the server on the new data socket. If we
// successfully receive a frame on this new data socket we can consider
@@ -101,20 +97,19 @@ int main(int argc, char* argv[])
// socket, which will cause any outstanding receive operation on it to be
// cancelled.
frame f1;
- asio::error_code new_data_socket_result;
- new_data_socket->async_receive(f1.to_buffers(),
- (
- // Note: lambda::_1 is the first argument to the callback handler,
- // which in this case is the error code for the operation.
- lambda::var(new_data_socket_result) = lambda::_1,
- lambda::if_(!lambda::_1)
- [
+ std::error_code new_data_socket_result;
+ new_data_socket.async_receive(f1.to_buffers(),
+ [&](std::error_code ec, std::size_t /*length*/)
+ {
+ new_data_socket_result = ec;
+ if (!ec)
+ {
// We have successfully received a frame on the new data socket,
// so we can close the old data socket. This will cancel any
// outstanding receive operation on the old data socket.
- lambda::var(data_socket) = boost::shared_ptr<udp::socket>()
- ]
- ));
+ data_socket.close();
+ }
+ });
// This loop will continue until we have successfully completed the
// renegotiation (i.e. received a frame on the new data socket), or some
@@ -130,18 +125,19 @@ int main(int argc, char* argv[])
// complete.
frame f2;
done = true; // Let's be optimistic.
- if (data_socket) // Might have been closed by new_data_socket's handler.
+ if (data_socket.is_open()) // May have been closed by receive handler.
{
- data_socket->async_receive(f2.to_buffers(), 0,
- (
- lambda::if_(!lambda::_1)
- [
+ data_socket.async_receive(f2.to_buffers(), 0,
+ [&](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
// We have successfully received a frame on the old data
// socket. Stop the io_context so that we can print it.
- lambda::bind(&asio::io_context::stop, &io_context),
- lambda::var(done) = false
- ]
- ));
+ io_context.stop();
+ done = false;
+ }
+ });
}
// Run the operations in parallel. This will block until all operations
@@ -166,15 +162,15 @@ int main(int argc, char* argv[])
// the renegotation, or an error has occurred. First we'll check for
// errors.
if (control_result)
- throw asio::system_error(control_result);
+ throw std::system_error(control_result);
if (new_data_socket_result)
- throw asio::system_error(new_data_socket_result);
+ throw std::system_error(new_data_socket_result);
// If we get here it means we have successfully started receiving data on
// the new data socket. This new data socket will be used from now on
// (until the next time we renegotiate).
std::cout << " Renegotiation complete";
- data_socket = new_data_socket;
+ data_socket = std::move(new_data_socket);
data_endpoint = new_data_endpoint;
if (f1.number() > last_frame_number)
{
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/protocol.hpp b/3rdparty/asio/src/examples/cpp11/porthopper/protocol.hpp
index c79bc6b49f4..46f9938cad5 100644
--- a/3rdparty/asio/src/examples/cpp03/porthopper/protocol.hpp
+++ b/3rdparty/asio/src/examples/cpp11/porthopper/protocol.hpp
@@ -2,7 +2,7 @@
// protocol.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,8 +11,8 @@
#ifndef PORTHOPPER_PROTOCOL_HPP
#define PORTHOPPER_PROTOCOL_HPP
-#include <boost/array.hpp>
#include <asio.hpp>
+#include <array>
#include <cstring>
#include <iomanip>
#include <string>
@@ -69,9 +69,9 @@ public:
}
// Obtain buffers for reading from or writing to a socket.
- boost::array<asio::mutable_buffer, 1> to_buffers()
+ std::array<asio::mutable_buffer, 1> to_buffers()
{
- boost::array<asio::mutable_buffer, 1> buffers
+ std::array<asio::mutable_buffer, 1> buffers
= { { asio::buffer(data_) } };
return buffers;
}
@@ -134,9 +134,9 @@ public:
}
// Obtain buffers for reading from or writing to a socket.
- boost::array<asio::mutable_buffer, 1> to_buffers()
+ std::array<asio::mutable_buffer, 1> to_buffers()
{
- boost::array<asio::mutable_buffer, 1> buffers
+ std::array<asio::mutable_buffer, 1> buffers
= { { asio::buffer(data_) } };
return buffers;
}
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/server.cpp b/3rdparty/asio/src/examples/cpp11/porthopper/server.cpp
index b98a7d4b24d..4a77622e593 100644
--- a/3rdparty/asio/src/examples/cpp03/porthopper/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/porthopper/server.cpp
@@ -2,28 +2,28 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
#include <cmath>
#include <cstdlib>
#include <exception>
+#include <functional>
#include <iostream>
+#include <memory>
#include <set>
#include "protocol.hpp"
using asio::ip::tcp;
using asio::ip::udp;
-typedef boost::shared_ptr<tcp::socket> tcp_socket_ptr;
-typedef boost::shared_ptr<asio::deadline_timer> timer_ptr;
-typedef boost::shared_ptr<control_request> control_request_ptr;
+typedef std::shared_ptr<tcp::socket> tcp_socket_ptr;
+typedef std::shared_ptr<asio::steady_timer> timer_ptr;
+typedef std::shared_ptr<control_request> control_request_ptr;
class server
{
@@ -36,49 +36,47 @@ public:
next_frame_number_(1)
{
// Start waiting for a new control connection.
- tcp_socket_ptr new_socket(
- new tcp::socket(acceptor_.get_executor().context()));
+ tcp_socket_ptr new_socket(new tcp::socket(acceptor_.get_executor()));
acceptor_.async_accept(*new_socket,
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_socket));
// Start the timer used to generate outgoing frames.
- timer_.expires_from_now(boost::posix_time::milliseconds(100));
- timer_.async_wait(boost::bind(&server::handle_timer, this));
+ timer_.expires_after(asio::chrono::milliseconds(100));
+ timer_.async_wait(std::bind(&server::handle_timer, this));
}
// Handle a new control connection.
- void handle_accept(const asio::error_code& ec, tcp_socket_ptr socket)
+ void handle_accept(const std::error_code& ec, tcp_socket_ptr socket)
{
if (!ec)
{
// Start receiving control requests on the connection.
control_request_ptr request(new control_request);
asio::async_read(*socket, request->to_buffers(),
- boost::bind(&server::handle_control_request, this,
+ std::bind(&server::handle_control_request, this,
asio::placeholders::error, socket, request));
}
// Start waiting for a new control connection.
- tcp_socket_ptr new_socket(
- new tcp::socket(acceptor_.get_executor().context()));
+ tcp_socket_ptr new_socket(new tcp::socket(acceptor_.get_executor()));
acceptor_.async_accept(*new_socket,
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_socket));
}
// Handle a new control request.
- void handle_control_request(const asio::error_code& ec,
+ void handle_control_request(const std::error_code& ec,
tcp_socket_ptr socket, control_request_ptr request)
{
if (!ec)
{
// Delay handling of the control request to simulate network latency.
timer_ptr delay_timer(
- new asio::deadline_timer(acceptor_.get_executor().context()));
- delay_timer->expires_from_now(boost::posix_time::seconds(2));
+ new asio::steady_timer(acceptor_.get_executor()));
+ delay_timer->expires_after(asio::chrono::seconds(2));
delay_timer->async_wait(
- boost::bind(&server::handle_control_request_timer, this,
+ std::bind(&server::handle_control_request_timer, this,
socket, request, delay_timer));
}
}
@@ -90,7 +88,7 @@ public:
// subscriptions must be stored on the server as a complete endpoint, not
// just a port. We use the non-throwing overload of remote_endpoint() since
// it may fail if the socket is no longer connected.
- asio::error_code ec;
+ std::error_code ec;
tcp::endpoint remote_endpoint = socket->remote_endpoint(ec);
if (!ec)
{
@@ -113,7 +111,7 @@ public:
// Wait for next control request on this connection.
asio::async_read(*socket, request->to_buffers(),
- boost::bind(&server::handle_control_request, this,
+ std::bind(&server::handle_control_request, this,
asio::placeholders::error, socket, request));
}
@@ -137,13 +135,13 @@ public:
std::set<udp::endpoint>::iterator j;
for (j = subscribers_.begin(); j != subscribers_.end(); ++j)
{
- asio::error_code ec;
+ std::error_code ec;
udp_socket_.send_to(f.to_buffers(), *j, 0, ec);
}
// Wait for next timeout.
- timer_.expires_from_now(boost::posix_time::milliseconds(100));
- timer_.async_wait(boost::bind(&server::handle_timer, this));
+ timer_.expires_after(asio::chrono::milliseconds(100));
+ timer_.async_wait(std::bind(&server::handle_timer, this));
}
private:
@@ -151,7 +149,7 @@ private:
tcp::acceptor acceptor_;
// The timer used for generating data.
- asio::deadline_timer timer_;
+ asio::steady_timer timer_;
// The socket used to send data to subscribers.
udp::socket udp_socket_;
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/client.cpp b/3rdparty/asio/src/examples/cpp11/serialization/client.cpp
index 8b83de284f4..10ec87f6da4 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/client.cpp
@@ -2,14 +2,14 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <asio.hpp>
-#include <boost/bind.hpp>
+#include <functional>
#include <iostream>
#include <vector>
#include "connection.hpp" // Must come before boost/serialization headers.
@@ -25,7 +25,7 @@ public:
/// Constructor starts the asynchronous connect operation.
client(asio::io_context& io_context,
const std::string& host, const std::string& service)
- : connection_(io_context)
+ : connection_(io_context.get_executor())
{
// Resolve the host name into an IP address.
asio::ip::tcp::resolver resolver(io_context);
@@ -35,7 +35,7 @@ public:
// Start an asynchronous connect operation.
asio::async_connect(connection_.socket(), endpoint_iterator,
- boost::bind(&client::handle_connect, this,
+ std::bind(&client::handle_connect, this,
asio::placeholders::error));
}
@@ -48,7 +48,7 @@ public:
// of stocks. The connection::async_read() function will automatically
// decode the data that is read from the underlying socket.
connection_.async_read(stocks_,
- boost::bind(&client::handle_read, this,
+ std::bind(&client::handle_read, this,
asio::placeholders::error));
}
else
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/connection.hpp b/3rdparty/asio/src/examples/cpp11/serialization/connection.hpp
index a1fa2a19e8e..14d96f7597b 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#include <asio.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <functional>
#include <iomanip>
+#include <memory>
#include <string>
#include <sstream>
+#include <tuple>
#include <vector>
namespace s11n_example {
@@ -35,8 +35,8 @@ class connection
{
public:
/// Constructor.
- connection(asio::io_context& io_context)
- : socket_(io_context)
+ connection(const asio::any_io_executor& ex)
+ : socket_(ex)
{
}
@@ -64,8 +64,8 @@ public:
if (!header_stream || header_stream.str().size() != header_length)
{
// Something went wrong, inform the caller.
- asio::error_code error(asio::error::invalid_argument);
- socket_.get_io_context().post(boost::bind(handler, error));
+ std::error_code error(asio::error::invalid_argument);
+ asio::post(socket_.get_executor(), std::bind(handler, error));
return;
}
outbound_header_ = header_stream.str();
@@ -83,26 +83,22 @@ public:
void async_read(T& t, Handler handler)
{
// Issue a read operation to read exactly the number of bytes in a header.
- void (connection::*f)(
- const asio::error_code&,
- T&, boost::tuple<Handler>)
+ void (connection::*f)(const std::error_code&, T&, std::tuple<Handler>)
= &connection::handle_read_header<T, Handler>;
asio::async_read(socket_, asio::buffer(inbound_header_),
- boost::bind(f,
- this, asio::placeholders::error, boost::ref(t),
- boost::make_tuple(handler)));
+ std::bind(f,
+ this, asio::placeholders::error, std::ref(t),
+ std::make_tuple(handler)));
}
- /// Handle a completed read of a message header. The handler is passed using
- /// a tuple since boost::bind seems to have trouble binding a function object
- /// created using boost::bind as a parameter.
+ /// Handle a completed read of a message header.
template <typename T, typename Handler>
- void handle_read_header(const asio::error_code& e,
- T& t, boost::tuple<Handler> handler)
+ void handle_read_header(const std::error_code& e,
+ T& t, std::tuple<Handler> handler)
{
if (e)
{
- boost::get<0>(handler)(e);
+ std::get<0>(handler)(e);
}
else
{
@@ -112,31 +108,31 @@ public:
if (!(is >> std::hex >> inbound_data_size))
{
// Header doesn't seem to be valid. Inform the caller.
- asio::error_code error(asio::error::invalid_argument);
- boost::get<0>(handler)(error);
+ std::error_code error(asio::error::invalid_argument);
+ std::get<0>(handler)(error);
return;
}
// Start an asynchronous call to receive the data.
inbound_data_.resize(inbound_data_size);
void (connection::*f)(
- const asio::error_code&,
- T&, boost::tuple<Handler>)
+ const std::error_code&,
+ T&, std::tuple<Handler>)
= &connection::handle_read_data<T, Handler>;
asio::async_read(socket_, asio::buffer(inbound_data_),
- boost::bind(f, this,
- asio::placeholders::error, boost::ref(t), handler));
+ std::bind(f, this,
+ asio::placeholders::error, std::ref(t), handler));
}
}
/// Handle a completed read of message data.
template <typename T, typename Handler>
- void handle_read_data(const asio::error_code& e,
- T& t, boost::tuple<Handler> handler)
+ void handle_read_data(const std::error_code& e,
+ T& t, std::tuple<Handler> handler)
{
if (e)
{
- boost::get<0>(handler)(e);
+ std::get<0>(handler)(e);
}
else
{
@@ -151,13 +147,13 @@ public:
catch (std::exception& e)
{
// Unable to decode data.
- asio::error_code error(asio::error::invalid_argument);
- boost::get<0>(handler)(error);
+ std::error_code error(asio::error::invalid_argument);
+ std::get<0>(handler)(error);
return;
}
// Inform caller that data has been received ok.
- boost::get<0>(handler)(e);
+ std::get<0>(handler)(e);
}
}
@@ -181,7 +177,7 @@ private:
std::vector<char> inbound_data_;
};
-typedef boost::shared_ptr<connection> connection_ptr;
+typedef std::shared_ptr<connection> connection_ptr;
} // namespace s11n_example
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/server.cpp b/3rdparty/asio/src/examples/cpp11/serialization/server.cpp
index b81b1a424da..a032e86dc78 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/server.cpp
@@ -2,15 +2,14 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/lexical_cast.hpp>
+#include <functional>
#include <iostream>
#include <vector>
#include "connection.hpp" // Must come before boost/serialization headers.
@@ -55,14 +54,14 @@ public:
stocks_.push_back(s);
// Start an accept operation for a new connection.
- connection_ptr new_conn(new connection(acceptor_.get_io_context()));
+ connection_ptr new_conn(new connection(acceptor_.get_executor()));
acceptor_.async_accept(new_conn->socket(),
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_conn));
}
/// Handle completion of a accept operation.
- void handle_accept(const asio::error_code& e, connection_ptr conn)
+ void handle_accept(const std::error_code& e, connection_ptr conn)
{
if (!e)
{
@@ -70,19 +69,19 @@ public:
// client. The connection::async_write() function will automatically
// serialize the data structure for us.
conn->async_write(stocks_,
- boost::bind(&server::handle_write, this,
+ std::bind(&server::handle_write, this,
asio::placeholders::error, conn));
}
// Start an accept operation for a new connection.
- connection_ptr new_conn(new connection(acceptor_.get_io_context()));
+ connection_ptr new_conn(new connection(acceptor_.get_executor()));
acceptor_.async_accept(new_conn->socket(),
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_conn));
}
/// Handle completion of a write operation.
- void handle_write(const asio::error_code& e, connection_ptr conn)
+ void handle_write(const std::error_code& e, connection_ptr conn)
{
// Nothing to do. The socket will be closed automatically when the last
// reference to the connection object goes away.
@@ -108,7 +107,7 @@ int main(int argc, char* argv[])
std::cerr << "Usage: server <port>" << std::endl;
return 1;
}
- unsigned short port = boost::lexical_cast<unsigned short>(argv[1]);
+ unsigned short port = std::stoi(argv[1]);
asio::io_context io_context;
s11n_example::server server(io_context, port);
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/stock.hpp b/3rdparty/asio/src/examples/cpp11/serialization/stock.hpp
index 1acbca5a7a6..bb305518cae 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/stock.hpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/stock.hpp
@@ -2,7 +2,7 @@
// stock.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/services/basic_logger.hpp b/3rdparty/asio/src/examples/cpp11/services/basic_logger.hpp
index 876086a2ecf..6e4d7a0b05d 100644
--- a/3rdparty/asio/src/examples/cpp03/services/basic_logger.hpp
+++ b/3rdparty/asio/src/examples/cpp11/services/basic_logger.hpp
@@ -2,7 +2,7 @@
// basic_logger.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,7 +12,6 @@
#define SERVICES_BASIC_LOGGER_HPP
#include <asio.hpp>
-#include <boost/noncopyable.hpp>
#include <string>
namespace services {
@@ -21,7 +20,6 @@ namespace services {
/// typedef.
template <typename Service>
class basic_logger
- : private boost::noncopyable
{
public:
/// The type of the service that will be used to provide timer operations.
@@ -34,30 +32,27 @@ public:
/**
* This constructor creates a logger.
*
- * @param io_context The io_context object used to locate the logger service.
+ * @param context The execution context used to locate the logger service.
*
* @param identifier An identifier for this logger.
*/
- explicit basic_logger(asio::io_context& io_context,
+ explicit basic_logger(asio::execution_context& context,
const std::string& identifier)
- : service_(asio::use_service<Service>(io_context)),
+ : service_(asio::use_service<Service>(context)),
impl_(service_.null())
{
service_.create(impl_, identifier);
}
+ basic_logger(const basic_logger&) = delete;
+ basic_logger& operator=(basic_logger&) = delete;
+
/// Destructor.
~basic_logger()
{
service_.destroy(impl_);
}
- /// Get the io_context associated with the object.
- asio::io_context& get_io_context()
- {
- return service_.get_io_context();
- }
-
/// Set the output file for all logger instances.
void use_file(const std::string& file)
{
diff --git a/3rdparty/asio/src/examples/cpp03/services/daytime_client.cpp b/3rdparty/asio/src/examples/cpp11/services/daytime_client.cpp
index e0a6af9df6f..360134f64c2 100644
--- a/3rdparty/asio/src/examples/cpp03/services/daytime_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/services/daytime_client.cpp
@@ -2,14 +2,14 @@
// daytime_client.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <asio.hpp>
-#include <boost/bind.hpp>
+#include <functional>
#include <iostream>
#include "logger.hpp"
@@ -25,12 +25,14 @@ void read_handler(const asio::error_code& e,
std::cout.write(read_buffer, bytes_transferred);
s->async_read_some(asio::buffer(read_buffer),
- boost::bind(read_handler, asio::placeholders::error,
+ std::bind(read_handler, asio::placeholders::error,
asio::placeholders::bytes_transferred, s));
}
else
{
- services::logger logger(s->get_executor().context(), "read_handler");
+ asio::execution_context& context = asio::query(
+ s->get_executor(), asio::execution::context);
+ services::logger logger(context, "read_handler");
std::string msg = "Read error: ";
msg += e.message();
@@ -40,14 +42,16 @@ void read_handler(const asio::error_code& e,
void connect_handler(const asio::error_code& e, tcp::socket* s)
{
- services::logger logger(s->get_executor().context(), "connect_handler");
+ asio::execution_context& context = asio::query(
+ s->get_executor(), asio::execution::context);
+ services::logger logger(context, "connect_handler");
if (!e)
{
logger.log("Connection established");
s->async_read_some(asio::buffer(read_buffer),
- boost::bind(read_handler, asio::placeholders::error,
+ std::bind(read_handler, asio::placeholders::error,
asio::placeholders::bytes_transferred, s));
}
else
@@ -82,7 +86,7 @@ int main(int argc, char* argv[])
// Start an asynchronous connect.
tcp::socket socket(io_context);
asio::async_connect(socket, endpoints,
- boost::bind(connect_handler,
+ std::bind(connect_handler,
asio::placeholders::error, &socket));
// Run the io_context until all operations have finished.
diff --git a/3rdparty/asio/src/examples/cpp03/services/logger.hpp b/3rdparty/asio/src/examples/cpp11/services/logger.hpp
index 41d17e6de10..2ab366c83c6 100644
--- a/3rdparty/asio/src/examples/cpp03/services/logger.hpp
+++ b/3rdparty/asio/src/examples/cpp11/services/logger.hpp
@@ -2,7 +2,7 @@
// logger.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp03/services/logger_service.cpp b/3rdparty/asio/src/examples/cpp11/services/logger_service.cpp
index c3543e47f5a..74d67c75241 100644
--- a/3rdparty/asio/src/examples/cpp03/services/logger_service.cpp
+++ b/3rdparty/asio/src/examples/cpp11/services/logger_service.cpp
@@ -2,16 +2,10 @@
// logger_service.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include "logger_service.hpp"
-
-namespace services {
-
-asio::io_context::id logger_service::id;
-
-} // namespace services
diff --git a/3rdparty/asio/src/examples/cpp03/services/logger_service.hpp b/3rdparty/asio/src/examples/cpp11/services/logger_service.hpp
index 9f175dffba3..d0beaf1d6c2 100644
--- a/3rdparty/asio/src/examples/cpp03/services/logger_service.hpp
+++ b/3rdparty/asio/src/examples/cpp11/services/logger_service.hpp
@@ -2,7 +2,7 @@
// logger_service.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,23 +12,21 @@
#define SERVICES_LOGGER_SERVICE_HPP
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <functional>
#include <fstream>
#include <sstream>
#include <string>
+#include <thread>
namespace services {
/// Service implementation for the logger.
class logger_service
- : public asio::io_context::service
+ : public asio::execution_context::service
{
public:
- /// The unique service identifier.
- static asio::io_context::id id;
+ /// The type used to identify this service in the execution context.
+ typedef logger_service key_type;
/// The backend implementation of a logger.
struct logger_impl
@@ -41,27 +39,29 @@ public:
typedef logger_impl* impl_type;
/// Constructor creates a thread to run a private io_context.
- logger_service(asio::io_context& io_context)
- : asio::io_context::service(io_context),
+ logger_service(asio::execution_context& context)
+ : asio::execution_context::service(context),
work_io_context_(),
work_(asio::make_work_guard(work_io_context_)),
- work_thread_(new asio::thread(
- boost::bind(&asio::io_context::run, &work_io_context_)))
+ work_thread_([this]{ work_io_context_.run(); })
{
}
+ logger_service(const logger_service&) = delete;
+ logger_service& operator=(const logger_service&) = delete;;
+
/// Destructor shuts down the private io_context.
~logger_service()
{
/// Indicate that we have finished with the private io_context. Its
/// io_context::run() function will exit once all other work has completed.
work_.reset();
- if (work_thread_)
- work_thread_->join();
+ if (work_thread_.joinable())
+ work_thread_.join();
}
/// Destroy all user-defined handler objects owned by the service.
- void shutdown_service()
+ void shutdown()
{
}
@@ -91,8 +91,8 @@ public:
void use_file(impl_type& /*impl*/, const std::string& file)
{
// Pass the work of opening the file to the background thread.
- asio::post(work_io_context_, boost::bind(
- &logger_service::use_file_impl, this, file));
+ asio::post(work_io_context_,
+ std::bind(&logger_service::use_file_impl, this, file));
}
/// Log a message.
@@ -102,9 +102,9 @@ public:
std::ostringstream os;
os << impl->identifier << ": " << message;
- // Pass the work of opening the file to the background thread.
- asio::post(work_io_context_, boost::bind(
- &logger_service::log_impl, this, os.str()));
+ // Pass the work of writing to the file to the background thread.
+ asio::post(work_io_context_,
+ std::bind(&logger_service::log_impl, this, os.str()));
}
private:
@@ -134,7 +134,7 @@ private:
asio::io_context::executor_type> work_;
/// Thread used for running the work io_context's run loop.
- boost::scoped_ptr<asio::thread> work_thread_;
+ std::thread work_thread_;
/// The file to which log messages will be written.
std::ofstream ofstream_;
diff --git a/3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp b/3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp
index c5558756558..ed7994021fc 100644
--- a/3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp
+++ b/3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp
@@ -2,7 +2,7 @@
// socks4.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,9 +11,10 @@
#ifndef SOCKS4_HPP
#define SOCKS4_HPP
+#include <array>
#include <string>
-#include <asio.hpp>
-#include <boost/array.hpp>
+#include <asio/buffer.hpp>
+#include <asio/ip/tcp.hpp>
namespace socks4 {
@@ -38,7 +39,7 @@ public:
// Only IPv4 is supported by the SOCKS 4 protocol.
if (endpoint.protocol() != asio::ip::tcp::v4())
{
- throw asio::system_error(
+ throw std::system_error(
asio::error::address_family_not_supported);
}
@@ -51,9 +52,9 @@ public:
address_ = endpoint.address().to_v4().to_bytes();
}
- boost::array<asio::const_buffer, 7> buffers() const
+ std::array<asio::const_buffer, 7> buffers() const
{
- boost::array<asio::const_buffer, 7> bufs =
+ return
{
{
asio::buffer(&version_, 1),
@@ -65,7 +66,6 @@ public:
asio::buffer(&null_byte_, 1)
}
};
- return bufs;
}
private:
@@ -95,9 +95,9 @@ public:
{
}
- boost::array<asio::mutable_buffer, 5> buffers()
+ std::array<asio::mutable_buffer, 5> buffers()
{
- boost::array<asio::mutable_buffer, 5> bufs =
+ return
{
{
asio::buffer(&null_byte_, 1),
@@ -107,7 +107,6 @@ public:
asio::buffer(address_)
}
};
- return bufs;
}
bool success() const
diff --git a/3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp b/3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp
index 7b82564ab53..f661aca8da5 100644
--- a/3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp
@@ -2,18 +2,18 @@
// sync_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <iostream>
#include <iomanip>
#include <ostream>
#include <string>
#include <asio.hpp>
-#include <boost/array.hpp>
#include "socks4.hpp"
using asio::ip::tcp;
@@ -35,7 +35,7 @@ int main(int argc, char* argv[])
// Get a list of endpoints corresponding to the SOCKS 4 server name.
tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
+ auto endpoints = resolver.resolve(argv[1], argv[2]);
// Try each endpoint until we successfully establish a connection to the
// SOCKS 4 server.
@@ -44,7 +44,7 @@ int main(int argc, char* argv[])
// Get an endpoint for the Boost website. This will be passed to the SOCKS
// 4 server. Explicitly specify IPv4 since SOCKS 4 does not support IPv6.
- tcp::endpoint http_endpoint =
+ auto http_endpoint =
*resolver.resolve(tcp::v4(), "www.boost.org", "http").begin();
// Send the request to the SOCKS 4 server.
@@ -77,13 +77,13 @@ int main(int argc, char* argv[])
asio::write(socket, asio::buffer(request));
// Read until EOF, writing data to output as we go.
- boost::array<char, 512> response;
- asio::error_code error;
+ std::array<char, 512> response;
+ std::error_code error;
while (std::size_t s = socket.read_some(
asio::buffer(response), error))
std::cout.write(response.data(), s);
if (error != asio::error::eof)
- throw asio::system_error(error);
+ throw std::system_error(error);
}
catch (std::exception& e)
{
diff --git a/3rdparty/asio/src/examples/cpp11/spawn/.gitignore b/3rdparty/asio/src/examples/cpp11/spawn/.gitignore
deleted file mode 100644
index 6b8a121e099..00000000000
--- a/3rdparty/asio/src/examples/cpp11/spawn/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.dirstamp
-parallel_grep
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp b/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp
index 5397a4efe22..ae949d60bef 100644
--- a/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp
@@ -2,12 +2,13 @@
// echo_server.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <asio/detached.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/spawn.hpp>
@@ -21,10 +22,10 @@ using asio::ip::tcp;
class session : public std::enable_shared_from_this<session>
{
public:
- explicit session(tcp::socket socket)
+ explicit session(asio::io_context& io_context, tcp::socket socket)
: socket_(std::move(socket)),
- timer_(socket_.get_io_context()),
- strand_(socket_.get_io_context())
+ timer_(io_context),
+ strand_(io_context.get_executor())
{
}
@@ -39,7 +40,7 @@ public:
char data[128];
for (;;)
{
- timer_.expires_from_now(std::chrono::seconds(10));
+ timer_.expires_after(std::chrono::seconds(10));
std::size_t n = socket_.async_read_some(asio::buffer(data), yield);
asio::async_write(socket_, asio::buffer(data, n), yield);
}
@@ -49,25 +50,25 @@ public:
socket_.close();
timer_.cancel();
}
- });
+ }, asio::detached);
asio::spawn(strand_,
[this, self](asio::yield_context yield)
{
while (socket_.is_open())
{
- asio::error_code ignored_ec;
+ std::error_code ignored_ec;
timer_.async_wait(yield[ignored_ec]);
- if (timer_.expires_from_now() <= std::chrono::seconds(0))
+ if (timer_.expiry() <= asio::steady_timer::clock_type::now())
socket_.close();
}
- });
+ }, asio::detached);
}
private:
tcp::socket socket_;
asio::steady_timer timer_;
- asio::io_context::strand strand_;
+ asio::strand<asio::io_context::executor_type> strand_;
};
int main(int argc, char* argv[])
@@ -90,11 +91,19 @@ int main(int argc, char* argv[])
for (;;)
{
- asio::error_code ec;
+ std::error_code ec;
tcp::socket socket(io_context);
acceptor.async_accept(socket, yield[ec]);
- if (!ec) std::make_shared<session>(std::move(socket))->go();
+ if (!ec)
+ {
+ std::make_shared<session>(io_context, std::move(socket))->go();
+ }
}
+ },
+ [](std::exception_ptr e)
+ {
+ if (e)
+ std::rethrow_exception(e);
});
io_context.run();
diff --git a/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp b/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
index 954d9472bbe..f4a5b1136dc 100644
--- a/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
+++ b/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
@@ -2,12 +2,13 @@
// parallel_grep.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <asio/detached.hpp>
#include <asio/dispatch.hpp>
#include <asio/post.hpp>
#include <asio/spawn.hpp>
@@ -17,6 +18,7 @@
#include <iostream>
#include <string>
+using asio::detached;
using asio::dispatch;
using asio::spawn;
using asio::strand;
@@ -69,7 +71,7 @@ int main(int argc, char* argv[])
if (++line_num % 10 == 0)
post(yield);
}
- });
+ }, detached);
}
// Join the thread pool to wait for all the spawned tasks to complete.
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/README b/3rdparty/asio/src/examples/cpp11/ssl/README
index 8d94105be5b..8304d0603b6 100644
--- a/3rdparty/asio/src/examples/cpp03/ssl/README
+++ b/3rdparty/asio/src/examples/cpp11/ssl/README
@@ -2,7 +2,7 @@ The passphrase for both the CA and server private keys is "test".
-------------------------------------------------------------------------------
-Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/ca.pem b/3rdparty/asio/src/examples/cpp11/ssl/ca.pem
new file mode 100644
index 00000000000..4580bc11bcf
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/ca.pem
@@ -0,0 +1,50 @@
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIUX3cVQ47QyJp7SOy0RPzP743W9MwwDQYJKoZIhvcNAQEL
+BQAwOzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5
+MQ0wCwYDVQQKDARhc2lvMB4XDTIxMTExMTIxMTA1MloXDTI2MTExMDIxMTA1Mlow
+OzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5MQ0w
+CwYDVQQKDARhc2lvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyURD
+LjKxTCkapmWhY0bP1NaaOPzIJTTB0dzREOlmRmBmiHpW7DaRx7qBm6jYDKQ7OCbz
+30/j8K4TjHOLIwxzXhXMYTJOcN2giPHNUBvm9oEuDAhYgltArJQnBBEH+3C1hCIv
+1+uhTWo0HpGXTeJnvboTZ1YgmbOgr6lMhNiu9QmPX885DxWf6sDq8mRgCDX2x8sk
+Ls0HuLSo88Osjx532yEhnrZgexsByhoRD3yrKHV5mWpaunk5BMsP/XMuQHayFmbO
+siqnHJoL1znGVH003PcBGmEDmoIUqhLiBi2gWGu1pmckP9loqQUTEn0aLOVclHf4
+slWq344zh4tJCpQMfQIDAQABo1AwTjAdBgNVHQ4EFgQUfiX1CMQrGDi9mIBAg9cg
+m0RwLJUwHwYDVR0jBBgwFoAUfiX1CMQrGDi9mIBAg9cgm0RwLJUwDAYDVR0TBAUw
+AwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAnDnVNSb8z/pNFaZ6YAZ+ukfNT3jjbGm1
+10BOLqJj8s5A8/JkwjaWhky/DuGXDywgEvzXC18aNAxASeqO8h9pAZtszu6NWB4s
+h3r+dEQakMacxrZ+jBL/cYLrUv9r3KMPKxaDnplkamqFA/9eNmoV7vDyGtGPZuD6
+oTROtQqqDSrxthCkqnibAfusi7RmlCdvJa0kVK7krKJZAhi8W9f32+lBPv9oq3Ns
+dAxnOj/D3UnhNoIt0EdjqUdLo2U39dt5s5Syj2rFUAgfbc02Rwx65kq8AjTRlW/M
+KDpGsifwIB8b7wActMUO8c3GptptNVWmFm5+Mmk54P//P3tIAx9KXw==
+-----END CERTIFICATE-----
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIPcVUeQ7ZElgCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECGKlFVN6/gIlBIIEyJPeknsA5dvV
+WK27AZzs4wM6WrsD6ba+kPJyZTpon5pn4eoTiw4UCvo7C+21G9jCqbIbDrgTWHwH
+zu6YrBFTZgRUpdLkLsyUsp4UJrZ8xJ7N/jWlG763CyluFE5oBFLz2Vt/DSDSaWdA
+sKdxua/1kvw+KYoDqlObMFIspM5TrndcMnWkOgyvQAvnH0NZXFFBa4QGFrwWDrCo
+m12CzMLwaPMrNFBffCTqZnL1AajT+EYqPTi+cQ5mkRpZ2cuzhdug2eki1KkD12ZN
+3d8Ehl8bfbLEqRE/HnggleRRt7ia1xkzruqQp14JA2UsrioGMF5nvWgWrbyHfpui
+KrCsDwDelrArW/GCki53QBQMuH8Q1YmoNrRZwlG257eA1LiJvmxRyIjKYu0RP+Q8
+EOldycy51VsPVPApUbv9r4IJldrIJiwlmRxxM36uKtFhfojnsWzJORDYI8C37uKi
+UEPiD4GSEH6C0lGO94IoZPjl9z/rZ0qZx1VRHl3nxZc0AQvvj9bWMbyRwsgb6wod
+P8JSy6uEib9UxuenNHzTd48GcNhJbhOqd4IV0XKhi8W1Kil3mMdc3QAwKaLTx12/
+1GrbMui061uyeM6Rf6Xao0PApDnUNmxcFSTsoarG0yH7Q0WZMgKTDCCGhhtZKlE6
+x7pRsnxiFaIpoh32EVIRI+ZXh2rXBcwa2ew0aEccRXtPFvcmdjevkrHuCggc+M+Y
+seFqTHVGWf8eS6o08w095DboD0vFpZXZMRfycTbA7BiE4NYE/uc7v5cH3Ax9l2ef
+zG7o9idDt+/RX7OcetxDFw4eQbq7PfjvrfXS1DcRUEyJ04emh7oxlkAUUNsFtabN
+T0ggvHxcQWkYRE5oPlkbgpwKpK4LDcApXKFwCDKPur2W5Q7KHRfDLtSvZvYarJum
+8j2pGpEis/bdTih29ofNsX6a0Yo5Tlj+9+1c/6/Xi7XvRk/Vbgkoa3iVQ3ckdCuZ
+vO7cRYZBBs6W/Ti3hWFzPEX9FfcnSUp9bEnH4ASnmUcp8PDBJYeaI6HqpO3XbkbF
+l70eDNakd2cDNjQzkFpBT7HO+HtqU3xNt9K0z2gMB7iTDVFyIzh26joCR2O8tiqS
+wUJFkoLPb74GSB7WzE+gb4jXX6n9609PUoR3f896mM34uX3CsY8lA+/0ZGpHnFDA
+ToKdmz6WKIAw0E20nyzLuLwPZgj7HLcR7zza4raipe9QxIdyJr5O+jzGt+OjSM9b
+K1agibRE5DChqQ+P+ikOc6nG7UNyn+lKSjGEbwuzi8F0iugMgcTc/vYO8OWDNGpd
+D1euA5OuVPdfatFa16Fyr4MJJIfE83C4/kSj05fdoyb6pJkOjHhUppVMe+ES5kwl
+YI8RES2XVJzUSxnWsIM613YlMgIZ9xgcuIADnO7gaKJ4RQG+9wJ853Uo4+n89K7F
+Y6KzihuYAUkbAw1pPo1TODom7A/gB9stqRUSQlZWmIgtnJ8wPjt/we0gzPM8LQzb
+ye4KOLjH5iquFc4MU4TtN3gvp9P5R9UFrGeMImS5eMUmBQHckDNdIAtMj7M1wUpR
+JVrzDXWDjC21sLn95NtNMPb+FRlt/biTV3IE3ZmX0kbuCRoH7b7hhR41Zpoajwl0
+FqYigB5gnVodGUWuBgDUqA==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/client.cpp b/3rdparty/asio/src/examples/cpp11/ssl/client.cpp
new file mode 100644
index 00000000000..6799d2a98e1
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/client.cpp
@@ -0,0 +1,165 @@
+//
+// client.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <cstdlib>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include "asio.hpp"
+#include "asio/ssl.hpp"
+
+using asio::ip::tcp;
+using std::placeholders::_1;
+using std::placeholders::_2;
+
+enum { max_length = 1024 };
+
+class client
+{
+public:
+ client(asio::io_context& io_context,
+ asio::ssl::context& context,
+ const tcp::resolver::results_type& endpoints)
+ : socket_(io_context, context)
+ {
+ socket_.set_verify_mode(asio::ssl::verify_peer);
+ socket_.set_verify_callback(
+ std::bind(&client::verify_certificate, this, _1, _2));
+
+ connect(endpoints);
+ }
+
+private:
+ bool verify_certificate(bool preverified,
+ asio::ssl::verify_context& ctx)
+ {
+ // The verify callback can be used to check whether the certificate that is
+ // being presented is valid for the peer. For example, RFC 2818 describes
+ // the steps involved in doing this for HTTPS. Consult the OpenSSL
+ // documentation for more details. Note that the callback is called once
+ // for each certificate in the certificate chain, starting from the root
+ // certificate authority.
+
+ // In this example we will simply print the certificate's subject name.
+ char subject_name[256];
+ X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
+ X509_NAME_oneline(X509_get_subject_name(cert), subject_name, 256);
+ std::cout << "Verifying " << subject_name << "\n";
+
+ return preverified;
+ }
+
+ void connect(const tcp::resolver::results_type& endpoints)
+ {
+ asio::async_connect(socket_.lowest_layer(), endpoints,
+ [this](const std::error_code& error,
+ const tcp::endpoint& /*endpoint*/)
+ {
+ if (!error)
+ {
+ handshake();
+ }
+ else
+ {
+ std::cout << "Connect failed: " << error.message() << "\n";
+ }
+ });
+ }
+
+ void handshake()
+ {
+ socket_.async_handshake(asio::ssl::stream_base::client,
+ [this](const std::error_code& error)
+ {
+ if (!error)
+ {
+ send_request();
+ }
+ else
+ {
+ std::cout << "Handshake failed: " << error.message() << "\n";
+ }
+ });
+ }
+
+ void send_request()
+ {
+ std::cout << "Enter message: ";
+ std::cin.getline(request_, max_length);
+ size_t request_length = std::strlen(request_);
+
+ asio::async_write(socket_,
+ asio::buffer(request_, request_length),
+ [this](const std::error_code& error, std::size_t length)
+ {
+ if (!error)
+ {
+ receive_response(length);
+ }
+ else
+ {
+ std::cout << "Write failed: " << error.message() << "\n";
+ }
+ });
+ }
+
+ void receive_response(std::size_t length)
+ {
+ asio::async_read(socket_,
+ asio::buffer(reply_, length),
+ [this](const std::error_code& error, std::size_t length)
+ {
+ if (!error)
+ {
+ std::cout << "Reply: ";
+ std::cout.write(reply_, length);
+ std::cout << "\n";
+ }
+ else
+ {
+ std::cout << "Read failed: " << error.message() << "\n";
+ }
+ });
+ }
+
+ asio::ssl::stream<tcp::socket> socket_;
+ char request_[max_length];
+ char reply_[max_length];
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: client <host> <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ tcp::resolver resolver(io_context);
+ auto endpoints = resolver.resolve(argv[1], argv[2]);
+
+ asio::ssl::context ctx(asio::ssl::context::sslv23);
+ ctx.load_verify_file("ca.pem");
+
+ client c(io_context, ctx, endpoints);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem b/3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem
new file mode 100644
index 00000000000..dc2559c5f82
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem
@@ -0,0 +1,25 @@
+-----BEGIN X9.42 DH PARAMETERS-----
+MIIELQKCAgEA8eEBgatlTk0QKIwUqHsteHJXzEr0xAW7RLeNid8DdGjTnFw68eV+
+s1YbipEqQVTFG+VZPaof9v0CH2KOdbgWD0KRPC49HB8O/wARFKpy5eJltVe1r07w
++V1Vjciqkh/vGq/yFQsbqwyWJy6AelsbHdSC9Bg9pmu4+pbVGW15zK7PkfjfoO9V
+JYbhdqFIPg+9NRRWsl/U9UoyeeIGImI9I4k3fqtv311C6VVErFZylCj7nn45L7IY
+GfPcCO5E8FD6EqBv5WnhMNYHMJu9brRvOoAyAyWprqR+aVzHd+DFamDQdsuQjKTk
+3+r07znWJfjp6FVTzR5SvjrKg1knK5TibIksoKOlsFZ06bGkFWHjqXNAKhnSpCiU
+GJd0qe7pTD+TGQJGWskJpoph+tkICUa+6MyzP9+U6T9hISIY/BpVuWn/iwdLqsvV
+s5bg2RjRraww/4Rjm0NyEOTk2MxaLB9gcyu6zcrhX5XRiMgt+jhKwEMwJCEJYkxn
+C0yv08A5v6RceFm1jY+8FT0IzRqsWIGV7beNdqtE0B4LBTuN1yQ6x8CKEb6mbIHG
+d0XLGppELhD8QUwAr5HiVGTAsS9JlMGgXVkyDtxrVSeS1zHWt77skRQ9UlfJfYMm
+5wxHj5QCdQ7ma3oMMZBZutNlkevMzYHIxwqhZstf4ud0j0VMftwZ3GMCggIBAJL7
+cU6/YSxzYDGUcPc6WGT+FAghR0LdhT3Q3Xz1rQRBwSSMPm9NZhyJC3fb+hBl/44X
+AHOu1/3dYIWlXPMuHZZdtlt+hkD/sIob16By20Z0p81Kvh3HQglVDJGlFzTmQbTd
+CM/EP8eJFiNeMcJB0RgeKyzikRsV4r/acZZM56swTlsRvSDFMh3v9YyYTZbCTwxm
+PIVOsxI8uBoWRCzY3yWzjmlZ2u5TR+Z0IVonmNqk6XAKRgxV12YfQVXzzpPZQA9S
+GHoD/NQoMdBAi3p4pLEYJ5qMRLYPQbBfSNu5eP9e5uZOiBp/28bVnzEelDGuFupr
+lvywkZEVL1KaYtZ/dGkPFXt+A7mNsw5xeDTRjgL4uUJvCNIkjgVEfIrLdUf5IVsU
+V8BgunAvgfH+Hy6Tx89v/QGsUWJPhjkSZnXwJ7Ipcsm+Zg0zAZwKDZEQtDLXVPRL
+OfCfXMXvlw2u6OHlhSbqO69zZG3dJTlcnjy06n4JYcUim7Mj3Kduige6VWofeEk9
+M/kHrPqNdFE5tHLh2nHcw9yExKHN+l/OUGAvNDfOVS+S+fNSKT0RfC9dMpHLN+Ok
+fGuskGzLQAVYF+DYEcnJ++0LEFtd0J381ndSc0iJuH60rKDTqxoRqv7lcdwLFlEV
+sQSRoas8s+y+b3FfSu7j0p44qLG9oxZ/WFcWnuUyAiEAjvAD9p3bw8AH0s7dUrX/
+RT1Ge+J/n0tlsgw+LY3zafE=
+-----END X9.42 DH PARAMETERS-----
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/server.cpp b/3rdparty/asio/src/examples/cpp11/ssl/server.cpp
new file mode 100644
index 00000000000..15e0d9eaf03
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/server.cpp
@@ -0,0 +1,145 @@
+//
+// server.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <cstdlib>
+#include <functional>
+#include <iostream>
+#include "asio.hpp"
+#include "asio/ssl.hpp"
+
+using asio::ip::tcp;
+
+class session : public std::enable_shared_from_this<session>
+{
+public:
+ session(asio::ssl::stream<tcp::socket> socket)
+ : socket_(std::move(socket))
+ {
+ }
+
+ void start()
+ {
+ do_handshake();
+ }
+
+private:
+ void do_handshake()
+ {
+ auto self(shared_from_this());
+ socket_.async_handshake(asio::ssl::stream_base::server,
+ [this, self](const std::error_code& error)
+ {
+ if (!error)
+ {
+ do_read();
+ }
+ });
+ }
+
+ void do_read()
+ {
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(data_),
+ [this, self](const std::error_code& ec, std::size_t length)
+ {
+ if (!ec)
+ {
+ do_write(length);
+ }
+ });
+ }
+
+ void do_write(std::size_t length)
+ {
+ auto self(shared_from_this());
+ asio::async_write(socket_, asio::buffer(data_, length),
+ [this, self](const std::error_code& ec,
+ std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_read();
+ }
+ });
+ }
+
+ asio::ssl::stream<tcp::socket> socket_;
+ char data_[1024];
+};
+
+class server
+{
+public:
+ server(asio::io_context& io_context, unsigned short port)
+ : acceptor_(io_context, tcp::endpoint(tcp::v4(), port)),
+ context_(asio::ssl::context::sslv23)
+ {
+ context_.set_options(
+ asio::ssl::context::default_workarounds
+ | asio::ssl::context::no_sslv2
+ | asio::ssl::context::single_dh_use);
+ context_.set_password_callback(std::bind(&server::get_password, this));
+ context_.use_certificate_chain_file("server.pem");
+ context_.use_private_key_file("server.pem", asio::ssl::context::pem);
+ context_.use_tmp_dh_file("dh4096.pem");
+
+ do_accept();
+ }
+
+private:
+ std::string get_password() const
+ {
+ return "test";
+ }
+
+ void do_accept()
+ {
+ acceptor_.async_accept(
+ [this](const std::error_code& error, tcp::socket socket)
+ {
+ if (!error)
+ {
+ std::make_shared<session>(
+ asio::ssl::stream<tcp::socket>(
+ std::move(socket), context_))->start();
+ }
+
+ do_accept();
+ });
+ }
+
+ tcp::acceptor acceptor_;
+ asio::ssl::context context_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: server <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ using namespace std; // For atoi.
+ server s(io_context, atoi(argv[1]));
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/server.pem b/3rdparty/asio/src/examples/cpp11/ssl/server.pem
new file mode 100644
index 00000000000..a7bcba738a0
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/server.pem
@@ -0,0 +1,99 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAfYCFGGcJXlIeQHiq/qOakbISU5cihPvMA0GCSqGSIb3DQEBCwUAMDsx
+CzAJBgNVBAYTAkFVMQwwCgYDVQQIDANOU1cxDzANBgNVBAcMBlN5ZG5leTENMAsG
+A1UECgwEYXNpbzAeFw0yMTExMTEyMTExNDRaFw0yNjExMTAyMTExNDRaMEwxCzAJ
+BgNVBAYTAkFVMQwwCgYDVQQIDANOU1cxDzANBgNVBAcMBlN5ZG5leTENMAsGA1UE
+CgwEYXNpbzEPMA0GA1UECwwGc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAu67TzZCFNTZ5c1gKwXfdTH3bP0OB5n6dqXGK6jkPb699dyM4oPtY
+2f+OyxJspk8D5pX6HuZ+hLGAsHxfCN+A3RegVZJCR/gXrrMPl/6PfDxtkeFXWy+6
+NAPxqppMj8gbX/czTdNFwgW4J8/RLyH53utjAGQtCRr97EbBOsTSeOmyAxbw4mRt
+EvHjacKFcSZzJDlyxCia37791MulZ4lwOZZlke5NzoOqkBIAusQgg7fMWDvH27PD
+T+taIyBsYTVJWHf5kMklAlWYXZvNjZp/QGt13lDORg2aSc/P2pE4iLyhbZcpuW+W
+nHB7IY1wjDL55/ORCjz3VlNIAMXHP5YQxwIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
+AQC3iiwQTgDP4ixulisYIGlJb8iuhxH9G41hm8dF/1qlIfXWxsbjb+g7M5U/3JCb
+fwCGoz7uBdj/CKkIb5wx83GVC1yVLbNSvCIS827qxic4GACEYGGAy4Ub5tUCQrLr
+JUQTP1WVJcgiKvk7OAcXdA+k/CcNXH153gUPDZz+/BedXe2VbM6LDsqPeSxXfbZN
+AWXARAuly7cQk/xkYkPldRRhx4htNCbnkG1qyEqNcYQN1SY9Qhbrm2HkAUntzQ7G
+umo4JdbIX6MJ5fYNs+yN/lJB7PiJP8Mz1AtOz4x9JxcLyuB6sapT8Tj53n9g/+m1
+Tqd8lHpWe6oM0sgdWfzdBNir
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,9E0E6B9970E055F1
+
+oFvN3t50B2TSeNsRo1vwhVYlMmt0w3MD3Ar75fti4fRhBrWoH4rBPrSouWK4OMDK
+CakfVhzJIEvaMav843grS4V+ooAsfnAtiQiQj+5xjZ8PlCuWir5gyjgqeN4zN6ZT
+2s/oEy5Kx7Ru5AWMkv+NPW5l3iS3c+Hupfb/auITwECSCCsCBxgNtJ8z0iXjv9Dr
+hqvqcI+4F5DSiol3QhitbpQ/k2PKu92AZhPcr9e5HrqeUD7aqfX2q3i+tnJvxC93
+0mvy133bX2ZAGAKMheW/GuzcETfwU80wvmrwHXI9rnuAUaJhrDiIZQ79gubZ0Pcm
+w4Y6Z5xxeErb7zKBi+pHKst8MJ7rfSz/N878su6cpESRC/w1paVX7m8/q61kzBkj
++h2qe9DupXBejQkriN+Z858nFtBKbWlFsmAg1FLZonworTUfV2c7S9yzMV/29VOE
+T0Bt8BU1Hp+bCjreF4JGbnUJnRQoASpisfUkrD6Ar4GI56Edkkx6hkF0cXdcvfCN
+qyhxzcvf/aV1M2kcpBRX9mIfjoFMFNz7uRIxyqPLaDkigwJemoaBo3n9/W5F7N7B
+AGNEZ3QhUlc8EyWpGRZRzMevu5wdz1b2+MqItOhPXUo2XcLEj2iFkVDdbj/d9jQH
+9ZIe4hQTSf784tAzt2Jp2RHmm22390GB1jdzG/CzbGlAKmaTTEe4FJcd/eLOEZuD
+4+iFsEb/bWcCyXkBKkdEoDDMJW8xi5d/1ezJM03nqhvkekDqyhJUJPCbmY1SCX1X
+4AO40jJmWQxwj26Pnnncacz4tuecZNqovz+POpKQSIctrQSV4wgf35137KBt7/O7
+EU0N7Qj4xTigyGkEHCZt7BgD8fFrxiP1OkUmFRHEE7Dxiagz6omJV8ien+p9wIgS
+QcqkJlgKMwVepjuCuEyvg5oIkAPvp24yhePSJkEvvoDLvM2Kub/CM+UkN8dSgsZk
++ZBE9Oi62AWWow8/ib8Um5DNIEZsq+5CQLeBG7f5kTIBAoA9UceaEgbxzOVUCBcX
+L7QsJ3pZ/ei1qx/9tChO/OXa9tleXcjGg7/q/6i6pUyZuqZlt+hk+3HtFmTXIjsM
+chbUSMEJ2isv9MDamTtunt9N92A6OxUkAs68kCO/bzotldXMKZVjOohNnML5q/3U
+vpsuN8NNwaNHCAM7pjols4V7ebX1lDZFR1hbj+szKMhVKzFfig1lRHafgRrR6H6P
+mUK16lKzUbmvwv2IU/3wck+4UNeB/+lRmfAfBasQytnbt+5fwwNkVSrDY2Kxe0nz
+2k3eIYST+ygxGuNrW9rnFbBpTJb0OE5cpgun8xxDE91AmL550AcZff+9ulDBhZg1
+eMoKUALlEdDNPffVTH8Iupn0jMnJsjXynztcEVhx4h2aA5X6/2i035uEybCn33qP
+J7g30oe2C69BSC0YmkT3MjF6Wrhy+M8dU0dDggRhY6JSS8wESvwGenaPi7SZlbxb
+Elmc44bHros1YfGl/xDdhju134/aMBG1GlZlReI+Rwnp9DCp04xiiJb9YKyUNaGY
+7BTGWyie/WYYKbX1ZlxqWA9jxow8PM1XYHuanau1/aYT16L7E83HG3qkyuFIlLJh
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIUX3cVQ47QyJp7SOy0RPzP743W9MwwDQYJKoZIhvcNAQEL
+BQAwOzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5
+MQ0wCwYDVQQKDARhc2lvMB4XDTIxMTExMTIxMTA1MloXDTI2MTExMDIxMTA1Mlow
+OzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5MQ0w
+CwYDVQQKDARhc2lvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyURD
+LjKxTCkapmWhY0bP1NaaOPzIJTTB0dzREOlmRmBmiHpW7DaRx7qBm6jYDKQ7OCbz
+30/j8K4TjHOLIwxzXhXMYTJOcN2giPHNUBvm9oEuDAhYgltArJQnBBEH+3C1hCIv
+1+uhTWo0HpGXTeJnvboTZ1YgmbOgr6lMhNiu9QmPX885DxWf6sDq8mRgCDX2x8sk
+Ls0HuLSo88Osjx532yEhnrZgexsByhoRD3yrKHV5mWpaunk5BMsP/XMuQHayFmbO
+siqnHJoL1znGVH003PcBGmEDmoIUqhLiBi2gWGu1pmckP9loqQUTEn0aLOVclHf4
+slWq344zh4tJCpQMfQIDAQABo1AwTjAdBgNVHQ4EFgQUfiX1CMQrGDi9mIBAg9cg
+m0RwLJUwHwYDVR0jBBgwFoAUfiX1CMQrGDi9mIBAg9cgm0RwLJUwDAYDVR0TBAUw
+AwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAnDnVNSb8z/pNFaZ6YAZ+ukfNT3jjbGm1
+10BOLqJj8s5A8/JkwjaWhky/DuGXDywgEvzXC18aNAxASeqO8h9pAZtszu6NWB4s
+h3r+dEQakMacxrZ+jBL/cYLrUv9r3KMPKxaDnplkamqFA/9eNmoV7vDyGtGPZuD6
+oTROtQqqDSrxthCkqnibAfusi7RmlCdvJa0kVK7krKJZAhi8W9f32+lBPv9oq3Ns
+dAxnOj/D3UnhNoIt0EdjqUdLo2U39dt5s5Syj2rFUAgfbc02Rwx65kq8AjTRlW/M
+KDpGsifwIB8b7wActMUO8c3GptptNVWmFm5+Mmk54P//P3tIAx9KXw==
+-----END CERTIFICATE-----
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIPcVUeQ7ZElgCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECGKlFVN6/gIlBIIEyJPeknsA5dvV
+WK27AZzs4wM6WrsD6ba+kPJyZTpon5pn4eoTiw4UCvo7C+21G9jCqbIbDrgTWHwH
+zu6YrBFTZgRUpdLkLsyUsp4UJrZ8xJ7N/jWlG763CyluFE5oBFLz2Vt/DSDSaWdA
+sKdxua/1kvw+KYoDqlObMFIspM5TrndcMnWkOgyvQAvnH0NZXFFBa4QGFrwWDrCo
+m12CzMLwaPMrNFBffCTqZnL1AajT+EYqPTi+cQ5mkRpZ2cuzhdug2eki1KkD12ZN
+3d8Ehl8bfbLEqRE/HnggleRRt7ia1xkzruqQp14JA2UsrioGMF5nvWgWrbyHfpui
+KrCsDwDelrArW/GCki53QBQMuH8Q1YmoNrRZwlG257eA1LiJvmxRyIjKYu0RP+Q8
+EOldycy51VsPVPApUbv9r4IJldrIJiwlmRxxM36uKtFhfojnsWzJORDYI8C37uKi
+UEPiD4GSEH6C0lGO94IoZPjl9z/rZ0qZx1VRHl3nxZc0AQvvj9bWMbyRwsgb6wod
+P8JSy6uEib9UxuenNHzTd48GcNhJbhOqd4IV0XKhi8W1Kil3mMdc3QAwKaLTx12/
+1GrbMui061uyeM6Rf6Xao0PApDnUNmxcFSTsoarG0yH7Q0WZMgKTDCCGhhtZKlE6
+x7pRsnxiFaIpoh32EVIRI+ZXh2rXBcwa2ew0aEccRXtPFvcmdjevkrHuCggc+M+Y
+seFqTHVGWf8eS6o08w095DboD0vFpZXZMRfycTbA7BiE4NYE/uc7v5cH3Ax9l2ef
+zG7o9idDt+/RX7OcetxDFw4eQbq7PfjvrfXS1DcRUEyJ04emh7oxlkAUUNsFtabN
+T0ggvHxcQWkYRE5oPlkbgpwKpK4LDcApXKFwCDKPur2W5Q7KHRfDLtSvZvYarJum
+8j2pGpEis/bdTih29ofNsX6a0Yo5Tlj+9+1c/6/Xi7XvRk/Vbgkoa3iVQ3ckdCuZ
+vO7cRYZBBs6W/Ti3hWFzPEX9FfcnSUp9bEnH4ASnmUcp8PDBJYeaI6HqpO3XbkbF
+l70eDNakd2cDNjQzkFpBT7HO+HtqU3xNt9K0z2gMB7iTDVFyIzh26joCR2O8tiqS
+wUJFkoLPb74GSB7WzE+gb4jXX6n9609PUoR3f896mM34uX3CsY8lA+/0ZGpHnFDA
+ToKdmz6WKIAw0E20nyzLuLwPZgj7HLcR7zza4raipe9QxIdyJr5O+jzGt+OjSM9b
+K1agibRE5DChqQ+P+ikOc6nG7UNyn+lKSjGEbwuzi8F0iugMgcTc/vYO8OWDNGpd
+D1euA5OuVPdfatFa16Fyr4MJJIfE83C4/kSj05fdoyb6pJkOjHhUppVMe+ES5kwl
+YI8RES2XVJzUSxnWsIM613YlMgIZ9xgcuIADnO7gaKJ4RQG+9wJ853Uo4+n89K7F
+Y6KzihuYAUkbAw1pPo1TODom7A/gB9stqRUSQlZWmIgtnJ8wPjt/we0gzPM8LQzb
+ye4KOLjH5iquFc4MU4TtN3gvp9P5R9UFrGeMImS5eMUmBQHckDNdIAtMj7M1wUpR
+JVrzDXWDjC21sLn95NtNMPb+FRlt/biTV3IE3ZmX0kbuCRoH7b7hhR41Zpoajwl0
+FqYigB5gnVodGUWuBgDUqA==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp
index 98b90e9a1b3..b8f2cbe77d2 100644
--- a/3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp
@@ -2,23 +2,26 @@
// async_tcp_client.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
-#include "asio/deadline_timer.hpp"
+#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
#include "asio/ip/tcp.hpp"
#include "asio/read_until.hpp"
-#include "asio/streambuf.hpp"
+#include "asio/steady_timer.hpp"
#include "asio/write.hpp"
-#include <boost/bind.hpp>
+#include <functional>
#include <iostream>
+#include <string>
-using asio::deadline_timer;
+using asio::steady_timer;
using asio::ip::tcp;
+using std::placeholders::_1;
+using std::placeholders::_2;
//
// This class manages socket timeouts by applying the concept of a deadline.
@@ -78,14 +81,13 @@ using asio::ip::tcp;
//
// The heartbeat actor sends a heartbeat (a message that consists of a single
// newline character) every 10 seconds. In this example, no deadline is applied
-// message sending.
+// to message sending.
//
class client
{
public:
client(asio::io_context& io_context)
- : stopped_(false),
- socket_(io_context),
+ : socket_(io_context),
deadline_(io_context),
heartbeat_timer_(io_context)
{
@@ -102,7 +104,7 @@ public:
// Start the deadline actor. You will note that we're not setting any
// particular deadline here. Instead, the connect and input actors will
// update the deadline prior to each asynchronous operation.
- deadline_.async_wait(boost::bind(&client::check_deadline, this));
+ deadline_.async_wait(std::bind(&client::check_deadline, this));
}
// This function terminates all the actors to shut down the connection. It
@@ -111,8 +113,8 @@ public:
void stop()
{
stopped_ = true;
- asio::error_code ignored_ec;
- socket_.close(ignored_ec);
+ std::error_code ignored_error;
+ socket_.close(ignored_error);
deadline_.cancel();
heartbeat_timer_.cancel();
}
@@ -125,11 +127,11 @@ private:
std::cout << "Trying " << endpoint_iter->endpoint() << "...\n";
// Set a deadline for the connect operation.
- deadline_.expires_from_now(boost::posix_time::seconds(60));
+ deadline_.expires_after(std::chrono::seconds(60));
// Start the asynchronous connect operation.
socket_.async_connect(endpoint_iter->endpoint(),
- boost::bind(&client::handle_connect,
+ std::bind(&client::handle_connect,
this, _1, endpoint_iter));
}
else
@@ -139,7 +141,7 @@ private:
}
}
- void handle_connect(const asio::error_code& ec,
+ void handle_connect(const std::error_code& error,
tcp::resolver::results_type::iterator endpoint_iter)
{
if (stopped_)
@@ -157,9 +159,9 @@ private:
}
// Check if the connect operation failed before the deadline expired.
- else if (ec)
+ else if (error)
{
- std::cout << "Connect error: " << ec.message() << "\n";
+ std::cout << "Connect error: " << error.message() << "\n";
// We need to close the socket used in the previous connection attempt
// before starting a new one.
@@ -185,24 +187,24 @@ private:
void start_read()
{
// Set a deadline for the read operation.
- deadline_.expires_from_now(boost::posix_time::seconds(30));
+ deadline_.expires_after(std::chrono::seconds(30));
// Start an asynchronous operation to read a newline-delimited message.
- asio::async_read_until(socket_, input_buffer_, '\n',
- boost::bind(&client::handle_read, this, _1));
+ asio::async_read_until(socket_,
+ asio::dynamic_buffer(input_buffer_), '\n',
+ std::bind(&client::handle_read, this, _1, _2));
}
- void handle_read(const asio::error_code& ec)
+ void handle_read(const std::error_code& error, std::size_t n)
{
if (stopped_)
return;
- if (!ec)
+ if (!error)
{
// Extract the newline-delimited message from the buffer.
- std::string line;
- std::istream is(&input_buffer_);
- std::getline(is, line);
+ std::string line(input_buffer_.substr(0, n - 1));
+ input_buffer_.erase(0, n);
// Empty messages are heartbeats and so ignored.
if (!line.empty())
@@ -214,7 +216,7 @@ private:
}
else
{
- std::cout << "Error on receive: " << ec.message() << "\n";
+ std::cout << "Error on receive: " << error.message() << "\n";
stop();
}
@@ -227,23 +229,23 @@ private:
// Start an asynchronous operation to send a heartbeat message.
asio::async_write(socket_, asio::buffer("\n", 1),
- boost::bind(&client::handle_write, this, _1));
+ std::bind(&client::handle_write, this, _1));
}
- void handle_write(const asio::error_code& ec)
+ void handle_write(const std::error_code& error)
{
if (stopped_)
return;
- if (!ec)
+ if (!error)
{
// Wait 10 seconds before sending the next heartbeat.
- heartbeat_timer_.expires_from_now(boost::posix_time::seconds(10));
- heartbeat_timer_.async_wait(boost::bind(&client::start_write, this));
+ heartbeat_timer_.expires_after(std::chrono::seconds(10));
+ heartbeat_timer_.async_wait(std::bind(&client::start_write, this));
}
else
{
- std::cout << "Error on heartbeat: " << ec.message() << "\n";
+ std::cout << "Error on heartbeat: " << error.message() << "\n";
stop();
}
@@ -257,28 +259,29 @@ private:
// Check whether the deadline has passed. We compare the deadline against
// the current time since a new asynchronous operation may have moved the
// deadline before this actor had a chance to run.
- if (deadline_.expires_at() <= deadline_timer::traits_type::now())
+ if (deadline_.expiry() <= steady_timer::clock_type::now())
{
// The deadline has passed. The socket is closed so that any outstanding
// asynchronous operations are cancelled.
socket_.close();
- // There is no longer an active deadline. The expiry is set to positive
- // infinity so that the actor takes no action until a new deadline is set.
- deadline_.expires_at(boost::posix_time::pos_infin);
+ // There is no longer an active deadline. The expiry is set to the
+ // maximum time point so that the actor takes no action until a new
+ // deadline is set.
+ deadline_.expires_at(steady_timer::time_point::max());
}
// Put the actor back to sleep.
- deadline_.async_wait(boost::bind(&client::check_deadline, this));
+ deadline_.async_wait(std::bind(&client::check_deadline, this));
}
private:
- bool stopped_;
+ bool stopped_ = false;
tcp::resolver::results_type endpoints_;
tcp::socket socket_;
- asio::streambuf input_buffer_;
- deadline_timer deadline_;
- deadline_timer heartbeat_timer_;
+ std::string input_buffer_;
+ steady_timer deadline_;
+ steady_timer heartbeat_timer_;
};
int main(int argc, char* argv[])
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp
new file mode 100644
index 00000000000..e29edc2895f
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp
@@ -0,0 +1,192 @@
+//
+// blocking_tcp_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/buffer.hpp"
+#include "asio/connect.hpp"
+#include "asio/io_context.hpp"
+#include "asio/ip/tcp.hpp"
+#include "asio/read_until.hpp"
+#include "asio/system_error.hpp"
+#include "asio/write.hpp"
+#include <cstdlib>
+#include <iostream>
+#include <string>
+
+using asio::ip::tcp;
+
+//----------------------------------------------------------------------
+
+//
+// This class manages socket timeouts by running the io_context using the timed
+// io_context::run_for() member function. Each asynchronous operation is given
+// a timeout within which it must complete. The socket operations themselves
+// use lambdas as completion handlers. For a given socket operation, the client
+// object runs the io_context to block thread execution until the operation
+// completes or the timeout is reached. If the io_context::run_for() function
+// times out, the socket is closed and the outstanding asynchronous operation
+// is cancelled.
+//
+class client
+{
+public:
+ void connect(const std::string& host, const std::string& service,
+ std::chrono::steady_clock::duration timeout)
+ {
+ // Resolve the host name and service to a list of endpoints.
+ auto endpoints = tcp::resolver(io_context_).resolve(host, service);
+
+ // Start the asynchronous operation itself. The lambda that is used as a
+ // callback will update the error variable when the operation completes.
+ // The blocking_udp_client.cpp example shows how you can use std::bind
+ // rather than a lambda.
+ std::error_code error;
+ asio::async_connect(socket_, endpoints,
+ [&](const std::error_code& result_error,
+ const tcp::endpoint& /*result_endpoint*/)
+ {
+ error = result_error;
+ });
+
+ // Run the operation until it completes, or until the timeout.
+ run(timeout);
+
+ // Determine whether a connection was successfully established.
+ if (error)
+ throw std::system_error(error);
+ }
+
+ std::string read_line(std::chrono::steady_clock::duration timeout)
+ {
+ // Start the asynchronous operation. The lambda that is used as a callback
+ // will update the error and n variables when the operation completes. The
+ // blocking_udp_client.cpp example shows how you can use std::bind rather
+ // than a lambda.
+ std::error_code error;
+ std::size_t n = 0;
+ asio::async_read_until(socket_,
+ asio::dynamic_buffer(input_buffer_), '\n',
+ [&](const std::error_code& result_error,
+ std::size_t result_n)
+ {
+ error = result_error;
+ n = result_n;
+ });
+
+ // Run the operation until it completes, or until the timeout.
+ run(timeout);
+
+ // Determine whether the read completed successfully.
+ if (error)
+ throw std::system_error(error);
+
+ std::string line(input_buffer_.substr(0, n - 1));
+ input_buffer_.erase(0, n);
+ return line;
+ }
+
+ void write_line(const std::string& line,
+ std::chrono::steady_clock::duration timeout)
+ {
+ std::string data = line + "\n";
+
+ // Start the asynchronous operation itself. The lambda that is used as a
+ // callback will update the error variable when the operation completes.
+ // The blocking_udp_client.cpp example shows how you can use std::bind
+ // rather than a lambda.
+ std::error_code error;
+ asio::async_write(socket_, asio::buffer(data),
+ [&](const std::error_code& result_error,
+ std::size_t /*result_n*/)
+ {
+ error = result_error;
+ });
+
+ // Run the operation until it completes, or until the timeout.
+ run(timeout);
+
+ // Determine whether the read completed successfully.
+ if (error)
+ throw std::system_error(error);
+ }
+
+private:
+ void run(std::chrono::steady_clock::duration timeout)
+ {
+ // Restart the io_context, as it may have been left in the "stopped" state
+ // by a previous operation.
+ io_context_.restart();
+
+ // Block until the asynchronous operation has completed, or timed out. If
+ // the pending asynchronous operation is a composed operation, the deadline
+ // applies to the entire operation, rather than individual operations on
+ // the socket.
+ io_context_.run_for(timeout);
+
+ // If the asynchronous operation completed successfully then the io_context
+ // would have been stopped due to running out of work. If it was not
+ // stopped, then the io_context::run_for call must have timed out.
+ if (!io_context_.stopped())
+ {
+ // Close the socket to cancel the outstanding asynchronous operation.
+ socket_.close();
+
+ // Run the io_context again until the operation completes.
+ io_context_.run();
+ }
+ }
+
+ asio::io_context io_context_;
+ tcp::socket socket_{io_context_};
+ std::string input_buffer_;
+};
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 4)
+ {
+ std::cerr << "Usage: blocking_tcp_client <host> <port> <message>\n";
+ return 1;
+ }
+
+ client c;
+ c.connect(argv[1], argv[2], std::chrono::seconds(10));
+
+ auto time_sent = std::chrono::steady_clock::now();
+
+ c.write_line(argv[3], std::chrono::seconds(10));
+
+ for (;;)
+ {
+ std::string line = c.read_line(std::chrono::seconds(10));
+
+ // Keep going until we get back the line that was sent.
+ if (line == argv[3])
+ break;
+ }
+
+ auto time_received = std::chrono::steady_clock::now();
+
+ std::cout << "Round trip time: ";
+ std::cout << std::chrono::duration_cast<
+ std::chrono::microseconds>(
+ time_received - time_sent).count();
+ std::cout << " microseconds\n";
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp
new file mode 100644
index 00000000000..085570d8b78
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp
@@ -0,0 +1,171 @@
+//
+// blocking_token_tcp_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/connect.hpp"
+#include "asio/io_context.hpp"
+#include "asio/ip/tcp.hpp"
+#include "asio/read_until.hpp"
+#include "asio/streambuf.hpp"
+#include "asio/system_error.hpp"
+#include "asio/write.hpp"
+#include <cstdlib>
+#include <iostream>
+#include <memory>
+#include <string>
+
+using asio::ip::tcp;
+
+// NOTE: This example uses the new form of the asio::async_result trait.
+// For an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+// We will use our sockets only with an io_context.
+using tcp_socket = asio::basic_stream_socket<
+ tcp, asio::io_context::executor_type>;
+
+//----------------------------------------------------------------------
+
+// A custom completion token that makes asynchronous operations behave as
+// though they are blocking calls with a timeout.
+struct close_after
+{
+ close_after(std::chrono::steady_clock::duration t, tcp_socket& s)
+ : timeout_(t), socket_(s)
+ {
+ }
+
+ // The maximum time to wait for an asynchronous operation to complete.
+ std::chrono::steady_clock::duration timeout_;
+
+ // The socket to be closed if the operation does not complete in time.
+ tcp_socket& socket_;
+};
+
+namespace asio {
+
+// The async_result template is specialised to allow the close_after token to
+// be used with asynchronous operations that have a completion signature of
+// void(error_code, T). Generalising this for all completion signature forms is
+// left as an exercise for the reader.
+template <typename T>
+class async_result<close_after, void(std::error_code, T)>
+{
+public:
+ // The initiate() function is used to launch the asynchronous operation by
+ // calling the operation's initiation function object. For the close_after
+ // completion token, we use this function to run the io_context until the
+ // operation is complete.
+ template <typename Init, typename... Args>
+ static T initiate(Init init, close_after token, Args&&... args)
+ {
+ asio::io_context& io_context = asio::query(
+ token.socket_.get_executor(), asio::execution::context);
+
+ // Call the operation's initiation function object to start the operation.
+ // A lambda is supplied as the completion handler, to be called when the
+ // operation completes.
+ std::error_code error;
+ T result;
+ init([&](std::error_code e, T t)
+ {
+ error = e;
+ result = t;
+ }, std::forward<Args>(args)...);
+
+ // Restart the io_context, as it may have been left in the "stopped" state
+ // by a previous operation.
+ io_context.restart();
+
+ // Block until the asynchronous operation has completed, or timed out. If
+ // the pending asynchronous operation is a composed operation, the deadline
+ // applies to the entire operation, rather than individual operations on
+ // the socket.
+ io_context.run_for(token.timeout_);
+
+ // If the asynchronous operation completed successfully then the io_context
+ // would have been stopped due to running out of work. If it was not
+ // stopped, then the io_context::run_for call must have timed out and the
+ // operation is still incomplete.
+ if (!io_context.stopped())
+ {
+ // Close the socket to cancel the outstanding asynchronous operation.
+ token.socket_.close();
+
+ // Run the io_context again until the operation completes.
+ io_context.run();
+ }
+
+ // If the operation failed, throw an exception. Otherwise return the result.
+ return error ? throw std::system_error(error) : result;
+ }
+};
+
+} // namespace asio
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 4)
+ {
+ std::cerr << "Usage: blocking_tcp_client <host> <port> <message>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ // Resolve the host name and service to a list of endpoints.
+ auto endpoints = tcp::resolver(io_context).resolve(argv[1], argv[2]);
+
+ tcp_socket socket(io_context);
+
+ // Run an asynchronous connect operation with a timeout.
+ asio::async_connect(socket, endpoints,
+ close_after(std::chrono::seconds(10), socket));
+
+ auto time_sent = std::chrono::steady_clock::now();
+
+ // Run an asynchronous write operation with a timeout.
+ std::string msg = argv[3] + std::string("\n");
+ asio::async_write(socket, asio::buffer(msg),
+ close_after(std::chrono::seconds(10), socket));
+
+ for (std::string input_buffer;;)
+ {
+ // Run an asynchronous read operation with a timeout.
+ std::size_t n = asio::async_read_until(socket,
+ asio::dynamic_buffer(input_buffer), '\n',
+ close_after(std::chrono::seconds(10), socket));
+
+ std::string line(input_buffer.substr(0, n - 1));
+ input_buffer.erase(0, n);
+
+ // Keep going until we get back the line that was sent.
+ if (line == argv[3])
+ break;
+ }
+
+ auto time_received = std::chrono::steady_clock::now();
+
+ std::cout << "Round trip time: ";
+ std::cout << std::chrono::duration_cast<
+ std::chrono::microseconds>(
+ time_received - time_sent).count();
+ std::cout << " microseconds\n";
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp
new file mode 100644
index 00000000000..312f21ab656
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp
@@ -0,0 +1,155 @@
+//
+// blocking_udp_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/buffer.hpp"
+#include "asio/io_context.hpp"
+#include "asio/ip/udp.hpp"
+#include <cstdlib>
+#include <functional>
+#include <iostream>
+
+using asio::ip::udp;
+using std::placeholders::_1;
+using std::placeholders::_2;
+
+//----------------------------------------------------------------------
+
+//
+// This class manages socket timeouts by running the io_context using the timed
+// io_context::run_for() member function. Each asynchronous operation is given
+// a timeout within which it must complete. The socket operations themselves
+// use std::bind to specify the completion handler:
+//
+// +---------------+
+// | |
+// | receive |
+// | |
+// +---------------+
+// |
+// async_- | +----------------+
+// receive() | | |
+// +--->| handle_receive |
+// | |
+// +----------------+
+//
+// For a given socket operation, the client object runs the io_context to block
+// thread execution until the operation completes or the timeout is reached. If
+// the io_context::run_for() function times out, the socket is closed and the
+// outstanding asynchronous operation is cancelled.
+//
+class client
+{
+public:
+ client(const udp::endpoint& listen_endpoint)
+ : socket_(io_context_, listen_endpoint)
+ {
+ }
+
+ std::size_t receive(const asio::mutable_buffer& buffer,
+ std::chrono::steady_clock::duration timeout,
+ std::error_code& error)
+ {
+ // Start the asynchronous operation. The handle_receive function used as a
+ // callback will update the error and length variables.
+ std::size_t length = 0;
+ socket_.async_receive(asio::buffer(buffer),
+ std::bind(&client::handle_receive, _1, _2, &error, &length));
+
+ // Run the operation until it completes, or until the timeout.
+ run(timeout);
+
+ return length;
+ }
+
+private:
+ void run(std::chrono::steady_clock::duration timeout)
+ {
+ // Restart the io_context, as it may have been left in the "stopped" state
+ // by a previous operation.
+ io_context_.restart();
+
+ // Block until the asynchronous operation has completed, or timed out. If
+ // the pending asynchronous operation is a composed operation, the deadline
+ // applies to the entire operation, rather than individual operations on
+ // the socket.
+ io_context_.run_for(timeout);
+
+ // If the asynchronous operation completed successfully then the io_context
+ // would have been stopped due to running out of work. If it was not
+ // stopped, then the io_context::run_for call must have timed out.
+ if (!io_context_.stopped())
+ {
+ // Cancel the outstanding asynchronous operation.
+ socket_.cancel();
+
+ // Run the io_context again until the operation completes.
+ io_context_.run();
+ }
+ }
+
+ static void handle_receive(
+ const std::error_code& error, std::size_t length,
+ std::error_code* out_error, std::size_t* out_length)
+ {
+ *out_error = error;
+ *out_length = length;
+ }
+
+private:
+ asio::io_context io_context_;
+ udp::socket socket_;
+};
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ using namespace std; // For atoi.
+
+ if (argc != 3)
+ {
+ std::cerr << "Usage: blocking_udp_client <listen_addr> <listen_port>\n";
+ return 1;
+ }
+
+ udp::endpoint listen_endpoint(
+ asio::ip::make_address(argv[1]),
+ std::atoi(argv[2]));
+
+ client c(listen_endpoint);
+
+ for (;;)
+ {
+ char data[1024];
+ std::error_code error;
+ std::size_t n = c.receive(asio::buffer(data),
+ std::chrono::seconds(10), error);
+
+ if (error)
+ {
+ std::cout << "Receive error: " << error.message() << "\n";
+ }
+ else
+ {
+ std::cout << "Received: ";
+ std::cout.write(data, n);
+ std::cout << "\n";
+ }
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp
new file mode 100644
index 00000000000..6e18fc60c2b
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp
@@ -0,0 +1,433 @@
+//
+// server.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <algorithm>
+#include <cstdlib>
+#include <deque>
+#include <iostream>
+#include <memory>
+#include <set>
+#include <string>
+#include "asio/buffer.hpp"
+#include "asio/io_context.hpp"
+#include "asio/ip/tcp.hpp"
+#include "asio/ip/udp.hpp"
+#include "asio/read_until.hpp"
+#include "asio/steady_timer.hpp"
+#include "asio/write.hpp"
+
+using asio::steady_timer;
+using asio::ip::tcp;
+using asio::ip::udp;
+
+//----------------------------------------------------------------------
+
+class subscriber
+{
+public:
+ virtual ~subscriber() = default;
+ virtual void deliver(const std::string& msg) = 0;
+};
+
+typedef std::shared_ptr<subscriber> subscriber_ptr;
+
+//----------------------------------------------------------------------
+
+class channel
+{
+public:
+ void join(subscriber_ptr subscriber)
+ {
+ subscribers_.insert(subscriber);
+ }
+
+ void leave(subscriber_ptr subscriber)
+ {
+ subscribers_.erase(subscriber);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ for (const auto& s : subscribers_)
+ {
+ s->deliver(msg);
+ }
+ }
+
+private:
+ std::set<subscriber_ptr> subscribers_;
+};
+
+//----------------------------------------------------------------------
+
+//
+// This class manages socket timeouts by applying the concept of a deadline.
+// Some asynchronous operations are given deadlines by which they must complete.
+// Deadlines are enforced by two "actors" that persist for the lifetime of the
+// session object, one for input and one for output:
+//
+// +----------------+ +----------------+
+// | | | |
+// | check_deadline |<-------+ | check_deadline |<-------+
+// | | | | | |
+// +----------------+ | +----------------+ |
+// | | | |
+// async_wait() | +----------------+ async_wait() | +----------------+
+// on input | | lambda | on output | | lambda |
+// deadline +--->| in | deadline +--->| in |
+// | check_deadline | | check_deadline |
+// +----------------+ +----------------+
+//
+// If either deadline actor determines that the corresponding deadline has
+// expired, the socket is closed and any outstanding operations are cancelled.
+//
+// The input actor reads messages from the socket, where messages are delimited
+// by the newline character:
+//
+// +-------------+
+// | |
+// | read_line |<----+
+// | | |
+// +-------------+ |
+// | |
+// async_- | +-------------+
+// read_- | | lambda |
+// until() +--->| in |
+// | read_line |
+// +-------------+
+//
+// The deadline for receiving a complete message is 30 seconds. If a non-empty
+// message is received, it is delivered to all subscribers. If a heartbeat (a
+// message that consists of a single newline character) is received, a heartbeat
+// is enqueued for the client, provided there are no other messages waiting to
+// be sent.
+//
+// The output actor is responsible for sending messages to the client:
+//
+// +----------------+
+// | |<---------------------+
+// | await_output | |
+// | |<-------+ |
+// +----------------+ | |
+// | | | |
+// | async_- | +----------------+ |
+// | wait() | | lambda | |
+// | +->| in | |
+// | | await_output | |
+// | +----------------+ |
+// V |
+// +--------------+ +--------------+
+// | | async_write() | lambda |
+// | write_line |-------------->| in |
+// | | | write_line |
+// +--------------+ +--------------+
+//
+// The output actor first waits for an output message to be enqueued. It does
+// this by using a steady_timer as an asynchronous condition variable. The
+// steady_timer will be signalled whenever the output queue is non-empty.
+//
+// Once a message is available, it is sent to the client. The deadline for
+// sending a complete message is 30 seconds. After the message is successfully
+// sent, the output actor again waits for the output queue to become non-empty.
+//
+class tcp_session
+ : public subscriber,
+ public std::enable_shared_from_this<tcp_session>
+{
+public:
+ tcp_session(tcp::socket socket, channel& ch)
+ : channel_(ch),
+ socket_(std::move(socket))
+ {
+ input_deadline_.expires_at(steady_timer::time_point::max());
+ output_deadline_.expires_at(steady_timer::time_point::max());
+
+ // The non_empty_output_queue_ steady_timer is set to the maximum time
+ // point whenever the output queue is empty. This ensures that the output
+ // actor stays asleep until a message is put into the queue.
+ non_empty_output_queue_.expires_at(steady_timer::time_point::max());
+ }
+
+ // Called by the server object to initiate the four actors.
+ void start()
+ {
+ channel_.join(shared_from_this());
+
+ read_line();
+ check_deadline(input_deadline_);
+
+ await_output();
+ check_deadline(output_deadline_);
+ }
+
+private:
+ void stop()
+ {
+ channel_.leave(shared_from_this());
+
+ std::error_code ignored_error;
+ socket_.close(ignored_error);
+ input_deadline_.cancel();
+ non_empty_output_queue_.cancel();
+ output_deadline_.cancel();
+ }
+
+ bool stopped() const
+ {
+ return !socket_.is_open();
+ }
+
+ void deliver(const std::string& msg) override
+ {
+ output_queue_.push_back(msg + "\n");
+
+ // Signal that the output queue contains messages. Modifying the expiry
+ // will wake the output actor, if it is waiting on the timer.
+ non_empty_output_queue_.expires_at(steady_timer::time_point::min());
+ }
+
+ void read_line()
+ {
+ // Set a deadline for the read operation.
+ input_deadline_.expires_after(std::chrono::seconds(30));
+
+ // Start an asynchronous operation to read a newline-delimited message.
+ auto self(shared_from_this());
+ asio::async_read_until(socket_,
+ asio::dynamic_buffer(input_buffer_), '\n',
+ [this, self](const std::error_code& error, std::size_t n)
+ {
+ // Check if the session was stopped while the operation was pending.
+ if (stopped())
+ return;
+
+ if (!error)
+ {
+ // Extract the newline-delimited message from the buffer.
+ std::string msg(input_buffer_.substr(0, n - 1));
+ input_buffer_.erase(0, n);
+
+ if (!msg.empty())
+ {
+ channel_.deliver(msg);
+ }
+ else
+ {
+
+ // We received a heartbeat message from the client. If there's
+ // nothing else being sent or ready to be sent, send a heartbeat
+ // right back.
+ if (output_queue_.empty())
+ {
+ output_queue_.push_back("\n");
+
+ // Signal that the output queue contains messages. Modifying
+ // the expiry will wake the output actor, if it is waiting on
+ // the timer.
+ non_empty_output_queue_.expires_at(
+ steady_timer::time_point::min());
+ }
+ }
+
+ read_line();
+ }
+ else
+ {
+ stop();
+ }
+ });
+ }
+
+ void await_output()
+ {
+ auto self(shared_from_this());
+ non_empty_output_queue_.async_wait(
+ [this, self](const std::error_code& /*error*/)
+ {
+ // Check if the session was stopped while the operation was pending.
+ if (stopped())
+ return;
+
+ if (output_queue_.empty())
+ {
+ // There are no messages that are ready to be sent. The actor goes
+ // to sleep by waiting on the non_empty_output_queue_ timer. When a
+ // new message is added, the timer will be modified and the actor
+ // will wake.
+ non_empty_output_queue_.expires_at(steady_timer::time_point::max());
+ await_output();
+ }
+ else
+ {
+ write_line();
+ }
+ });
+ }
+
+ void write_line()
+ {
+ // Set a deadline for the write operation.
+ output_deadline_.expires_after(std::chrono::seconds(30));
+
+ // Start an asynchronous operation to send a message.
+ auto self(shared_from_this());
+ asio::async_write(socket_,
+ asio::buffer(output_queue_.front()),
+ [this, self](const std::error_code& error, std::size_t /*n*/)
+ {
+ // Check if the session was stopped while the operation was pending.
+ if (stopped())
+ return;
+
+ if (!error)
+ {
+ output_queue_.pop_front();
+
+ await_output();
+ }
+ else
+ {
+ stop();
+ }
+ });
+ }
+
+ void check_deadline(steady_timer& deadline)
+ {
+ auto self(shared_from_this());
+ deadline.async_wait(
+ [this, self, &deadline](const std::error_code& /*error*/)
+ {
+ // Check if the session was stopped while the operation was pending.
+ if (stopped())
+ return;
+
+ // Check whether the deadline has passed. We compare the deadline
+ // against the current time since a new asynchronous operation may
+ // have moved the deadline before this actor had a chance to run.
+ if (deadline.expiry() <= steady_timer::clock_type::now())
+ {
+ // The deadline has passed. Stop the session. The other actors will
+ // terminate as soon as possible.
+ stop();
+ }
+ else
+ {
+ // Put the actor back to sleep.
+ check_deadline(deadline);
+ }
+ });
+ }
+
+ channel& channel_;
+ tcp::socket socket_;
+ std::string input_buffer_;
+ steady_timer input_deadline_{socket_.get_executor()};
+ std::deque<std::string> output_queue_;
+ steady_timer non_empty_output_queue_{socket_.get_executor()};
+ steady_timer output_deadline_{socket_.get_executor()};
+};
+
+typedef std::shared_ptr<tcp_session> tcp_session_ptr;
+
+//----------------------------------------------------------------------
+
+class udp_broadcaster
+ : public subscriber
+{
+public:
+ udp_broadcaster(asio::io_context& io_context,
+ const udp::endpoint& broadcast_endpoint)
+ : socket_(io_context)
+ {
+ socket_.connect(broadcast_endpoint);
+ socket_.set_option(udp::socket::broadcast(true));
+ }
+
+private:
+ void deliver(const std::string& msg)
+ {
+ std::error_code ignored_error;
+ socket_.send(asio::buffer(msg), 0, ignored_error);
+ }
+
+ udp::socket socket_;
+};
+
+//----------------------------------------------------------------------
+
+class server
+{
+public:
+ server(asio::io_context& io_context,
+ const tcp::endpoint& listen_endpoint,
+ const udp::endpoint& broadcast_endpoint)
+ : io_context_(io_context),
+ acceptor_(io_context, listen_endpoint)
+ {
+ channel_.join(
+ std::make_shared<udp_broadcaster>(
+ io_context_, broadcast_endpoint));
+
+ accept();
+ }
+
+private:
+ void accept()
+ {
+ acceptor_.async_accept(
+ [this](const std::error_code& error, tcp::socket socket)
+ {
+ if (!error)
+ {
+ std::make_shared<tcp_session>(std::move(socket), channel_)->start();
+ }
+
+ accept();
+ });
+ }
+
+ asio::io_context& io_context_;
+ tcp::acceptor acceptor_;
+ channel channel_;
+};
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ using namespace std; // For atoi.
+
+ if (argc != 4)
+ {
+ std::cerr << "Usage: server <listen_port> <bcast_address> <bcast_port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ tcp::endpoint listen_endpoint(tcp::v4(), atoi(argv[1]));
+
+ udp::endpoint broadcast_endpoint(
+ asio::ip::make_address(argv[2]), atoi(argv[3]));
+
+ server s(io_context, listen_endpoint, broadcast_endpoint);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp b/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp
new file mode 100644
index 00000000000..bca436d31e7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp
@@ -0,0 +1,106 @@
+//
+// time_t_timer.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <ctime>
+#include <chrono>
+#include <iostream>
+
+// A custom implementation of the Clock concept from the standard C++ library.
+struct time_t_clock
+{
+ // The duration type.
+ typedef std::chrono::steady_clock::duration duration;
+
+ // The duration's underlying arithmetic representation.
+ typedef duration::rep rep;
+
+ // The ratio representing the duration's tick period.
+ typedef duration::period period;
+
+ // An absolute time point represented using the clock.
+ typedef std::chrono::time_point<time_t_clock> time_point;
+
+ // The clock is not monotonically increasing.
+ static constexpr bool is_steady = false;
+
+ // Get the current time.
+ static time_point now() noexcept
+ {
+ return time_point() + std::chrono::seconds(std::time(0));
+ }
+};
+
+// The asio::basic_waitable_timer template accepts an optional WaitTraits
+// template parameter. The underlying time_t clock has one-second granularity,
+// so these traits may be customised to reduce the latency between the clock
+// ticking over and a wait operation's completion. When the timeout is near
+// (less than one second away) we poll the clock more frequently to detect the
+// time change closer to when it occurs. The user can select the appropriate
+// trade off between accuracy and the increased CPU cost of polling. In extreme
+// cases, a zero duration may be returned to make the timers as accurate as
+// possible, albeit with 100% CPU usage.
+struct time_t_wait_traits
+{
+ // Determine how long until the clock should be next polled to determine
+ // whether the duration has elapsed.
+ static time_t_clock::duration to_wait_duration(
+ const time_t_clock::duration& d)
+ {
+ if (d > std::chrono::seconds(1))
+ return d - std::chrono::seconds(1);
+ else if (d > std::chrono::seconds(0))
+ return std::chrono::milliseconds(10);
+ else
+ return std::chrono::seconds(0);
+ }
+
+ // Determine how long until the clock should be next polled to determine
+ // whether the absoluate time has been reached.
+ static time_t_clock::duration to_wait_duration(
+ const time_t_clock::time_point& t)
+ {
+ return to_wait_duration(t - time_t_clock::now());
+ }
+};
+
+typedef asio::basic_waitable_timer<
+ time_t_clock, time_t_wait_traits> time_t_timer;
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context;
+
+ time_t_timer timer(io_context);
+
+ timer.expires_after(std::chrono::seconds(5));
+ std::cout << "Starting synchronous wait\n";
+ timer.wait();
+ std::cout << "Finished synchronous wait\n";
+
+ timer.expires_after(std::chrono::seconds(5));
+ std::cout << "Starting asynchronous wait\n";
+ timer.async_wait(
+ [](const std::error_code& /*error*/)
+ {
+ std::cout << "timeout\n";
+ });
+ io_context.run();
+ std::cout << "Finished asynchronous wait\n";
+ }
+ catch (std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/client.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime1/client.cpp
index 9784d48a6fb..9d927759f5c 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime1/client.cpp
@@ -2,14 +2,14 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <iostream>
-#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::tcp;
@@ -35,15 +35,15 @@ int main(int argc, char* argv[])
for (;;)
{
- boost::array<char, 128> buf;
- asio::error_code error;
+ std::array<char, 128> buf;
+ std::error_code error;
size_t len = socket.read_some(asio::buffer(buf), error);
if (error == asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
- throw asio::system_error(error); // Some other error.
+ throw std::system_error(error); // Some other error.
std::cout.write(buf.data(), len);
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime2/server.cpp
index f662ed246c4..971149d6e8d 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime2/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -37,7 +37,7 @@ int main()
std::string message = make_daytime_string();
- asio::error_code ignored_error;
+ std::error_code ignored_error;
asio::write(socket, asio::buffer(message), ignored_error);
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime3/server.cpp
index cb2c9480594..339de72d4a7 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime3/server.cpp
@@ -2,18 +2,17 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <asio.hpp>
using asio::ip::tcp;
@@ -26,10 +25,10 @@ std::string make_daytime_string()
}
class tcp_connection
- : public boost::enable_shared_from_this<tcp_connection>
+ : public std::enable_shared_from_this<tcp_connection>
{
public:
- typedef boost::shared_ptr<tcp_connection> pointer;
+ typedef std::shared_ptr<tcp_connection> pointer;
static pointer create(asio::io_context& io_context)
{
@@ -46,7 +45,7 @@ public:
message_ = make_daytime_string();
asio::async_write(socket_, asio::buffer(message_),
- boost::bind(&tcp_connection::handle_write, shared_from_this(),
+ std::bind(&tcp_connection::handle_write, shared_from_this(),
asio::placeholders::error,
asio::placeholders::bytes_transferred));
}
@@ -57,7 +56,7 @@ private:
{
}
- void handle_write(const asio::error_code& /*error*/,
+ void handle_write(const std::error_code& /*error*/,
size_t /*bytes_transferred*/)
{
}
@@ -70,7 +69,8 @@ class tcp_server
{
public:
tcp_server(asio::io_context& io_context)
- : acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
+ : io_context_(io_context),
+ acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
{
start_accept();
}
@@ -79,15 +79,15 @@ private:
void start_accept()
{
tcp_connection::pointer new_connection =
- tcp_connection::create(acceptor_.get_executor().context());
+ tcp_connection::create(io_context_);
acceptor_.async_accept(new_connection->socket(),
- boost::bind(&tcp_server::handle_accept, this, new_connection,
+ std::bind(&tcp_server::handle_accept, this, new_connection,
asio::placeholders::error));
}
void handle_accept(tcp_connection::pointer new_connection,
- const asio::error_code& error)
+ const std::error_code& error)
{
if (!error)
{
@@ -97,6 +97,7 @@ private:
start_accept();
}
+ asio::io_context& io_context_;
tcp::acceptor acceptor_;
};
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/client.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime4/client.cpp
index da3b651d56d..15f3d5d4e98 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime4/client.cpp
@@ -2,14 +2,14 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <iostream>
-#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::udp;
@@ -33,10 +33,10 @@ int main(int argc, char* argv[])
udp::socket socket(io_context);
socket.open(udp::v4());
- boost::array<char, 1> send_buf = {{ 0 }};
+ std::array<char, 1> send_buf = {{ 0 }};
socket.send_to(asio::buffer(send_buf), receiver_endpoint);
- boost::array<char, 128> recv_buf;
+ std::array<char, 128> recv_buf;
udp::endpoint sender_endpoint;
size_t len = socket.receive_from(
asio::buffer(recv_buf), sender_endpoint);
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime5/server.cpp
index fdf452562d2..f47c9fa713b 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime5/server.cpp
@@ -2,16 +2,16 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <ctime>
#include <iostream>
#include <string>
-#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::udp;
@@ -33,18 +33,13 @@ int main()
for (;;)
{
- boost::array<char, 1> recv_buf;
+ std::array<char, 1> recv_buf;
udp::endpoint remote_endpoint;
- asio::error_code error;
- socket.receive_from(asio::buffer(recv_buf),
- remote_endpoint, 0, error);
-
- if (error && error != asio::error::message_size)
- throw asio::system_error(error);
+ socket.receive_from(asio::buffer(recv_buf), remote_endpoint);
std::string message = make_daytime_string();
- asio::error_code ignored_error;
+ std::error_code ignored_error;
socket.send_to(asio::buffer(message),
remote_endpoint, 0, ignored_error);
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime6/server.cpp
index d67045ff990..42c80795a9e 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime6/server.cpp
@@ -2,18 +2,18 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
#include <asio.hpp>
using asio::ip::udp;
@@ -39,21 +39,21 @@ private:
{
socket_.async_receive_from(
asio::buffer(recv_buffer_), remote_endpoint_,
- boost::bind(&udp_server::handle_receive, this,
+ std::bind(&udp_server::handle_receive, this,
asio::placeholders::error,
asio::placeholders::bytes_transferred));
}
- void handle_receive(const asio::error_code& error,
+ void handle_receive(const std::error_code& error,
std::size_t /*bytes_transferred*/)
{
- if (!error || error == asio::error::message_size)
+ if (!error)
{
- boost::shared_ptr<std::string> message(
+ std::shared_ptr<std::string> message(
new std::string(make_daytime_string()));
socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- boost::bind(&udp_server::handle_send, this, message,
+ std::bind(&udp_server::handle_send, this, message,
asio::placeholders::error,
asio::placeholders::bytes_transferred));
@@ -61,15 +61,15 @@ private:
}
}
- void handle_send(boost::shared_ptr<std::string> /*message*/,
- const asio::error_code& /*error*/,
+ void handle_send(std::shared_ptr<std::string> /*message*/,
+ const std::error_code& /*error*/,
std::size_t /*bytes_transferred*/)
{
}
udp::socket socket_;
udp::endpoint remote_endpoint_;
- boost::array<char, 1> recv_buffer_;
+ std::array<char, 1> recv_buffer_;
};
int main()
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime7/server.cpp
index b9dc60558c9..9c9c22edeb2 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime7/server.cpp
@@ -2,19 +2,18 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <array>
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/array.hpp>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <asio.hpp>
using asio::ip::tcp;
@@ -28,10 +27,10 @@ std::string make_daytime_string()
}
class tcp_connection
- : public boost::enable_shared_from_this<tcp_connection>
+ : public std::enable_shared_from_this<tcp_connection>
{
public:
- typedef boost::shared_ptr<tcp_connection> pointer;
+ typedef std::shared_ptr<tcp_connection> pointer;
static pointer create(asio::io_context& io_context)
{
@@ -48,7 +47,7 @@ public:
message_ = make_daytime_string();
asio::async_write(socket_, asio::buffer(message_),
- boost::bind(&tcp_connection::handle_write, shared_from_this()));
+ std::bind(&tcp_connection::handle_write, shared_from_this()));
}
private:
@@ -69,7 +68,8 @@ class tcp_server
{
public:
tcp_server(asio::io_context& io_context)
- : acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
+ : io_context_(io_context),
+ acceptor_(io_context, tcp::endpoint(tcp::v4(), 13))
{
start_accept();
}
@@ -78,15 +78,15 @@ private:
void start_accept()
{
tcp_connection::pointer new_connection =
- tcp_connection::create(acceptor_.get_executor().context());
+ tcp_connection::create(io_context_);
acceptor_.async_accept(new_connection->socket(),
- boost::bind(&tcp_server::handle_accept, this, new_connection,
+ std::bind(&tcp_server::handle_accept, this, new_connection,
asio::placeholders::error));
}
void handle_accept(tcp_connection::pointer new_connection,
- const asio::error_code& error)
+ const std::error_code& error)
{
if (!error)
{
@@ -96,6 +96,7 @@ private:
start_accept();
}
+ asio::io_context& io_context_;
tcp::acceptor acceptor_;
};
@@ -113,31 +114,31 @@ private:
{
socket_.async_receive_from(
asio::buffer(recv_buffer_), remote_endpoint_,
- boost::bind(&udp_server::handle_receive, this,
+ std::bind(&udp_server::handle_receive, this,
asio::placeholders::error));
}
- void handle_receive(const asio::error_code& error)
+ void handle_receive(const std::error_code& error)
{
- if (!error || error == asio::error::message_size)
+ if (!error)
{
- boost::shared_ptr<std::string> message(
+ std::shared_ptr<std::string> message(
new std::string(make_daytime_string()));
socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- boost::bind(&udp_server::handle_send, this, message));
+ std::bind(&udp_server::handle_send, this, message));
start_receive();
}
}
- void handle_send(boost::shared_ptr<std::string> /*message*/)
+ void handle_send(std::shared_ptr<std::string> /*message*/)
{
}
udp::socket socket_;
udp::endpoint remote_endpoint_;
- boost::array<char, 1> recv_buffer_;
+ std::array<char, 1> recv_buffer_;
};
int main()
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer1/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer1/timer.cpp
index 79ddf918261..37577dcb65f 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer1/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer1/timer.cpp
@@ -2,7 +2,7 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,13 +10,12 @@
#include <iostream>
#include <asio.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
int main()
{
asio::io_context io;
- asio::deadline_timer t(io, boost::posix_time::seconds(5));
+ asio::steady_timer t(io, asio::chrono::seconds(5));
t.wait();
std::cout << "Hello, world!" << std::endl;
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer2/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer2/timer.cpp
index 3275c22c2f6..c1620d78fa5 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer2/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer2/timer.cpp
@@ -2,7 +2,7 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,9 +10,8 @@
#include <iostream>
#include <asio.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-void print(const asio::error_code& /*e*/)
+void print(const std::error_code& /*e*/)
{
std::cout << "Hello, world!" << std::endl;
}
@@ -21,7 +20,7 @@ int main()
{
asio::io_context io;
- asio::deadline_timer t(io, boost::posix_time::seconds(5));
+ asio::steady_timer t(io, asio::chrono::seconds(5));
t.async_wait(&print);
io.run();
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer3/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer3/timer.cpp
index dfbf7d660a0..990ea069739 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer3/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer3/timer.cpp
@@ -2,27 +2,26 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <functional>
#include <iostream>
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-void print(const asio::error_code& /*e*/,
- asio::deadline_timer* t, int* count)
+void print(const std::error_code& /*e*/,
+ asio::steady_timer* t, int* count)
{
if (*count < 5)
{
std::cout << *count << std::endl;
++(*count);
- t->expires_at(t->expires_at() + boost::posix_time::seconds(1));
- t->async_wait(boost::bind(print,
+ t->expires_at(t->expiry() + asio::chrono::seconds(1));
+ t->async_wait(std::bind(print,
asio::placeholders::error, t, count));
}
}
@@ -32,8 +31,8 @@ int main()
asio::io_context io;
int count = 0;
- asio::deadline_timer t(io, boost::posix_time::seconds(1));
- t.async_wait(boost::bind(print,
+ asio::steady_timer t(io, asio::chrono::seconds(1));
+ t.async_wait(std::bind(print,
asio::placeholders::error, &t, &count));
io.run();
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer4/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer4/timer.cpp
index cbea70d26fa..7bfdd3e43a8 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer4/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer4/timer.cpp
@@ -2,25 +2,24 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <functional>
#include <iostream>
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
class printer
{
public:
printer(asio::io_context& io)
- : timer_(io, boost::posix_time::seconds(1)),
+ : timer_(io, asio::chrono::seconds(1)),
count_(0)
{
- timer_.async_wait(boost::bind(&printer::print, this));
+ timer_.async_wait(std::bind(&printer::print, this));
}
~printer()
@@ -35,13 +34,13 @@ public:
std::cout << count_ << std::endl;
++count_;
- timer_.expires_at(timer_.expires_at() + boost::posix_time::seconds(1));
- timer_.async_wait(boost::bind(&printer::print, this));
+ timer_.expires_at(timer_.expiry() + asio::chrono::seconds(1));
+ timer_.async_wait(std::bind(&printer::print, this));
}
}
private:
- asio::deadline_timer timer_;
+ asio::steady_timer timer_;
int count_;
};
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer5/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer5/timer.cpp
index a798e85aacf..61830691e7a 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer5/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer5/timer.cpp
@@ -2,31 +2,31 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
+#include <functional>
#include <iostream>
+#include <thread>
#include <asio.hpp>
-#include <boost/bind.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
class printer
{
public:
printer(asio::io_context& io)
- : strand_(io),
- timer1_(io, boost::posix_time::seconds(1)),
- timer2_(io, boost::posix_time::seconds(1)),
+ : strand_(asio::make_strand(io)),
+ timer1_(io, asio::chrono::seconds(1)),
+ timer2_(io, asio::chrono::seconds(1)),
count_(0)
{
timer1_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print1, this)));
+ std::bind(&printer::print1, this)));
timer2_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print2, this)));
+ std::bind(&printer::print2, this)));
}
~printer()
@@ -41,10 +41,10 @@ public:
std::cout << "Timer 1: " << count_ << std::endl;
++count_;
- timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
+ timer1_.expires_at(timer1_.expiry() + asio::chrono::seconds(1));
timer1_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print1, this)));
+ std::bind(&printer::print1, this)));
}
}
@@ -55,17 +55,17 @@ public:
std::cout << "Timer 2: " << count_ << std::endl;
++count_;
- timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
+ timer2_.expires_at(timer2_.expiry() + asio::chrono::seconds(1));
timer2_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print2, this)));
+ std::bind(&printer::print2, this)));
}
}
private:
- asio::io_context::strand strand_;
- asio::deadline_timer timer1_;
- asio::deadline_timer timer2_;
+ asio::strand<asio::io_context::executor_type> strand_;
+ asio::steady_timer timer1_;
+ asio::steady_timer timer2_;
int count_;
};
@@ -73,7 +73,7 @@ int main()
{
asio::io_context io;
printer p(io);
- asio::thread t(boost::bind(&asio::io_context::run, &io));
+ std::thread t([&]{ io.run(); });
io.run();
t.join();
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp b/3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp
new file mode 100644
index 00000000000..87f05486b79
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp
@@ -0,0 +1,48 @@
+//
+// line_reader.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 LINE_READER_HPP
+#define LINE_READER_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <string>
+
+class line_reader
+{
+private:
+ virtual void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(std::error_code, std::string)> handler) = 0;
+
+ struct initiate_read_line
+ {
+ template <typename Handler>
+ void operator()(Handler handler, line_reader* self, std::string prompt)
+ {
+ self->async_read_line_impl(std::move(prompt), std::move(handler));
+ }
+ };
+
+public:
+ virtual ~line_reader() {}
+
+ template <typename CompletionToken>
+ auto async_read_line(std::string prompt, CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, void(std::error_code, std::string)>(
+ initiate_read_line(), token, this, prompt))
+ {
+ return asio::async_initiate<CompletionToken, void(std::error_code, std::string)>(
+ initiate_read_line(), token, this, prompt);
+ }
+};
+
+#endif // LINE_READER_HPP
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp b/3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp
new file mode 100644
index 00000000000..2111de6853b
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp
@@ -0,0 +1,60 @@
+//
+// main.cpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "line_reader.hpp"
+#include "sleep.hpp"
+#include "stdin_line_reader.hpp"
+#include <asio/coroutine.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/use_awaitable.hpp>
+#include <iostream>
+
+#include <asio/yield.hpp>
+
+class read_loop : asio::coroutine
+{
+public:
+ read_loop(asio::any_io_executor e, line_reader& r)
+ : executor(std::move(e)),
+ reader(r)
+ {
+ }
+
+ void operator()(std::error_code ec = {}, std::string line = {})
+ {
+ reenter (this)
+ {
+ for (i = 0; i < 10; ++i)
+ {
+ yield reader.async_read_line("Enter something: ", *this);
+ if (ec) break;
+ std::cout << line;
+ yield async_sleep(executor, std::chrono::seconds(1), *this);
+ if (ec) break;
+ }
+ }
+ }
+
+private:
+ asio::any_io_executor executor;
+ line_reader& reader;
+ int i;
+};
+
+#include <asio/unyield.hpp>
+
+int main()
+{
+ asio::io_context ctx{1};
+ stdin_line_reader reader{ctx.get_executor()};
+ read_loop(ctx.get_executor(), reader)();
+ ctx.run();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp
new file mode 100644
index 00000000000..b605866ebd7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp
@@ -0,0 +1,22 @@
+//
+// sleep.cpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "sleep.hpp"
+#include <asio/consign.hpp>
+#include <asio/steady_timer.hpp>
+#include <memory>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration)
+{
+ auto timer = std::make_shared<asio::steady_timer>(ex, duration);
+ timer->async_wait(asio::consign(std::move(handler), timer));
+}
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp
new file mode 100644
index 00000000000..299397a833c
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp
@@ -0,0 +1,35 @@
+//
+// sleep.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 SLEEP_HPP
+#define SLEEP_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/any_io_executor.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <chrono>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration);
+
+template <typename CompletionToken>
+inline auto async_sleep(asio::any_io_executor ex,
+ std::chrono::nanoseconds duration, CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, void(std::error_code)>(
+ async_sleep_impl, token, std::move(ex), duration))
+{
+ return asio::async_initiate<CompletionToken, void(std::error_code)>(
+ async_sleep_impl, token, std::move(ex), duration);
+}
+
+#endif // SLEEP_HPP
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp
new file mode 100644
index 00000000000..d2e25e437a6
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp
@@ -0,0 +1,44 @@
+//
+// stdin_line_reader.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "stdin_line_reader.hpp"
+#include <asio/deferred.hpp>
+#include <asio/read_until.hpp>
+#include <iostream>
+
+stdin_line_reader::stdin_line_reader(asio::any_io_executor ex)
+ : stdin_(ex, ::dup(STDIN_FILENO))
+{
+}
+
+void stdin_line_reader::async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(std::error_code, std::string)> handler)
+{
+ std::cout << prompt;
+ std::cout.flush();
+
+ asio::async_read_until(stdin_, asio::dynamic_buffer(buffer_), '\n',
+ asio::deferred(
+ [this](std::error_code ec, std::size_t n)
+ {
+ if (!ec)
+ {
+ std::string result = buffer_.substr(0, n);
+ buffer_.erase(0, n);
+ return asio::deferred.values(ec, std::move(result));
+ }
+ else
+ {
+ return asio::deferred.values(ec, std::string{});
+ }
+ }
+ )
+ )(std::move(handler));
+}
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp
new file mode 100644
index 00000000000..43e67424367
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp
@@ -0,0 +1,30 @@
+//
+// stdin_line_reader.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 STDIN_LINE_READER_HPP
+#define STDIN_LINE_READER_HPP
+
+#include "line_reader.hpp"
+#include <asio/posix/stream_descriptor.hpp>
+
+class stdin_line_reader : public line_reader
+{
+public:
+ explicit stdin_line_reader(asio::any_io_executor ex);
+
+private:
+ void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(std::error_code, std::string)> handler) override;
+
+ asio::posix::stream_descriptor stdin_;
+ std::string buffer_;
+};
+
+#endif
diff --git a/3rdparty/asio/src/examples/cpp03/windows/transmit_file.cpp b/3rdparty/asio/src/examples/cpp11/windows/transmit_file.cpp
index 8ca9e1790fc..0ffd0486c43 100644
--- a/3rdparty/asio/src/examples/cpp03/windows/transmit_file.cpp
+++ b/3rdparty/asio/src/examples/cpp11/windows/transmit_file.cpp
@@ -2,18 +2,17 @@
// transmit_file.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include "asio.hpp"
#if defined(ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
@@ -22,9 +21,15 @@ using asio::ip::tcp;
using asio::windows::overlapped_ptr;
using asio::windows::random_access_handle;
+typedef asio::basic_stream_socket<tcp,
+ asio::io_context::executor_type> tcp_socket;
+
+typedef asio::basic_socket_acceptor<tcp,
+ asio::io_context::executor_type> tcp_acceptor;
+
// A wrapper for the TransmitFile overlapped I/O operation.
template <typename Handler>
-void transmit_file(tcp::socket& socket,
+void transmit_file(tcp_socket& socket,
random_access_handle& file, Handler handler)
{
// Construct an OVERLAPPED-derived object to contain the handler.
@@ -41,7 +46,7 @@ void transmit_file(tcp::socket& socket,
// The operation completed immediately, so a completion notification needs
// to be posted. When complete() is called, ownership of the OVERLAPPED-
// derived object passes to the io_context.
- asio::error_code ec(last_error,
+ std::error_code ec(last_error,
asio::error::get_system_category());
overlapped.complete(ec, 0);
}
@@ -54,10 +59,10 @@ void transmit_file(tcp::socket& socket,
}
class connection
- : public boost::enable_shared_from_this<connection>
+ : public std::enable_shared_from_this<connection>
{
public:
- typedef boost::shared_ptr<connection> pointer;
+ typedef std::shared_ptr<connection> pointer;
static pointer create(asio::io_context& io_context,
const std::string& filename)
@@ -65,20 +70,20 @@ public:
return pointer(new connection(io_context, filename));
}
- tcp::socket& socket()
+ tcp_socket& socket()
{
return socket_;
}
void start()
{
- asio::error_code ec;
+ std::error_code ec;
file_.assign(::CreateFile(filename_.c_str(), GENERIC_READ, 0, 0,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, 0), ec);
if (file_.is_open())
{
transmit_file(socket_, file_,
- boost::bind(&connection::handle_write, shared_from_this(),
+ std::bind(&connection::handle_write, shared_from_this(),
asio::placeholders::error,
asio::placeholders::bytes_transferred));
}
@@ -92,14 +97,14 @@ private:
{
}
- void handle_write(const asio::error_code& /*error*/,
+ void handle_write(const std::error_code& /*error*/,
size_t /*bytes_transferred*/)
{
- asio::error_code ignored_ec;
- socket_.shutdown(tcp::socket::shutdown_both, ignored_ec);
+ std::error_code ignored_ec;
+ socket_.shutdown(tcp_socket::shutdown_both, ignored_ec);
}
- tcp::socket socket_;
+ tcp_socket socket_;
std::string filename_;
random_access_handle file_;
};
@@ -122,12 +127,12 @@ private:
connection::create(acceptor_.get_executor().context(), filename_);
acceptor_.async_accept(new_connection->socket(),
- boost::bind(&server::handle_accept, this, new_connection,
+ std::bind(&server::handle_accept, this, new_connection,
asio::placeholders::error));
}
void handle_accept(connection::pointer new_connection,
- const asio::error_code& error)
+ const std::error_code& error)
{
if (!error)
{
@@ -137,7 +142,7 @@ private:
start_accept();
}
- tcp::acceptor acceptor_;
+ tcp_acceptor acceptor_;
std::string filename_;
};
diff --git a/3rdparty/asio/src/examples/cpp14/Makefile.am b/3rdparty/asio/src/examples/cpp14/Makefile.am
index fb8c35689c6..2ddf12a8a2f 100644
--- a/3rdparty/asio/src/examples/cpp14/Makefile.am
+++ b/3rdparty/asio/src/examples/cpp14/Makefile.am
@@ -10,6 +10,13 @@ LDADD = libasio.a
endif
noinst_PROGRAMS = \
+ deferred/deferred_1 \
+ deferred/deferred_2 \
+ deferred/deferred_3 \
+ deferred/deferred_4 \
+ deferred/deferred_5 \
+ deferred/deferred_6 \
+ deferred/deferred_7 \
echo/async_tcp_echo_server \
echo/async_udp_echo_server \
echo/blocking_tcp_echo_client \
@@ -24,10 +31,34 @@ noinst_PROGRAMS = \
executors/fork_join \
executors/pipeline \
executors/priority_scheduler \
- iostreams/http_client
+ iostreams/http_client \
+ operations/c_callback_wrapper \
+ operations/callback_wrapper \
+ operations/composed_1 \
+ operations/composed_1 \
+ operations/composed_2 \
+ operations/composed_3 \
+ operations/composed_4 \
+ operations/composed_5 \
+ operations/composed_6 \
+ operations/composed_7 \
+ operations/composed_8 \
+ parallel_group/parallel_sort \
+ parallel_group/ranged_wait_for_all \
+ parallel_group/wait_for_all \
+ parallel_group/wait_for_one \
+ parallel_group/wait_for_one_error \
+ parallel_group/wait_for_one_success
AM_CXXFLAGS = -I$(srcdir)/../../../include
+deferred_deferred_1_SOURCES = deferred/deferred_1.cpp
+deferred_deferred_2_SOURCES = deferred/deferred_2.cpp
+deferred_deferred_3_SOURCES = deferred/deferred_3.cpp
+deferred_deferred_4_SOURCES = deferred/deferred_4.cpp
+deferred_deferred_5_SOURCES = deferred/deferred_5.cpp
+deferred_deferred_6_SOURCES = deferred/deferred_6.cpp
+deferred_deferred_7_SOURCES = deferred/deferred_7.cpp
echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
@@ -43,6 +74,22 @@ executors_fork_join_SOURCES = executors/fork_join.cpp
executors_pipeline_SOURCES = executors/pipeline.cpp
executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
iostreams_http_client_SOURCES = iostreams/http_client.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+parallel_group_parallel_sort_SOURCES = parallel_group/parallel_sort.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
+parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
+parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
+parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
+parallel_group_wait_for_one_success_SOURCES = parallel_group/wait_for_one_success.cpp
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp14/Makefile.in b/3rdparty/asio/src/examples/cpp14/Makefile.in
new file mode 100644
index 00000000000..23fdb3fc1e2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/Makefile.in
@@ -0,0 +1,1378 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
+noinst_PROGRAMS = deferred/deferred_1$(EXEEXT) \
+ deferred/deferred_2$(EXEEXT) deferred/deferred_3$(EXEEXT) \
+ deferred/deferred_4$(EXEEXT) deferred/deferred_5$(EXEEXT) \
+ deferred/deferred_6$(EXEEXT) deferred/deferred_7$(EXEEXT) \
+ echo/async_tcp_echo_server$(EXEEXT) \
+ echo/async_udp_echo_server$(EXEEXT) \
+ echo/blocking_tcp_echo_client$(EXEEXT) \
+ echo/blocking_tcp_echo_server$(EXEEXT) \
+ echo/blocking_udp_echo_client$(EXEEXT) \
+ echo/blocking_udp_echo_server$(EXEEXT) \
+ executors/actor$(EXEEXT) executors/async_1$(EXEEXT) \
+ executors/async_2$(EXEEXT) executors/bank_account_1$(EXEEXT) \
+ executors/bank_account_2$(EXEEXT) executors/fork_join$(EXEEXT) \
+ executors/pipeline$(EXEEXT) \
+ executors/priority_scheduler$(EXEEXT) \
+ iostreams/http_client$(EXEEXT) \
+ operations/c_callback_wrapper$(EXEEXT) \
+ operations/callback_wrapper$(EXEEXT) \
+ operations/composed_1$(EXEEXT) operations/composed_1$(EXEEXT) \
+ operations/composed_2$(EXEEXT) operations/composed_3$(EXEEXT) \
+ operations/composed_4$(EXEEXT) operations/composed_5$(EXEEXT) \
+ operations/composed_6$(EXEEXT) operations/composed_7$(EXEEXT) \
+ operations/composed_8$(EXEEXT) \
+ parallel_group/parallel_sort$(EXEEXT) \
+ parallel_group/ranged_wait_for_all$(EXEEXT) \
+ parallel_group/wait_for_all$(EXEEXT) \
+ parallel_group/wait_for_one$(EXEEXT) \
+ parallel_group/wait_for_one_error$(EXEEXT) \
+ parallel_group/wait_for_one_success$(EXEEXT)
+subdir = src/examples/cpp14
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libasio_a_AR = $(AR) $(ARFLAGS)
+libasio_a_LIBADD =
+am__libasio_a_SOURCES_DIST = ../../asio.cpp ../../asio_ssl.cpp
+am__dirstamp = $(am__leading_dot)dirstamp
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../../asio_ssl.$(OBJEXT)
+@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = \
+@SEPARATE_COMPILATION_TRUE@ ../../asio.$(OBJEXT) \
+@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
+libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
+am_deferred_deferred_1_OBJECTS = deferred/deferred_1.$(OBJEXT)
+deferred_deferred_1_OBJECTS = $(am_deferred_deferred_1_OBJECTS)
+deferred_deferred_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_2_OBJECTS = deferred/deferred_2.$(OBJEXT)
+deferred_deferred_2_OBJECTS = $(am_deferred_deferred_2_OBJECTS)
+deferred_deferred_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_3_OBJECTS = deferred/deferred_3.$(OBJEXT)
+deferred_deferred_3_OBJECTS = $(am_deferred_deferred_3_OBJECTS)
+deferred_deferred_3_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_3_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_4_OBJECTS = deferred/deferred_4.$(OBJEXT)
+deferred_deferred_4_OBJECTS = $(am_deferred_deferred_4_OBJECTS)
+deferred_deferred_4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_5_OBJECTS = deferred/deferred_5.$(OBJEXT)
+deferred_deferred_5_OBJECTS = $(am_deferred_deferred_5_OBJECTS)
+deferred_deferred_5_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_5_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_6_OBJECTS = deferred/deferred_6.$(OBJEXT)
+deferred_deferred_6_OBJECTS = $(am_deferred_deferred_6_OBJECTS)
+deferred_deferred_6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_7_OBJECTS = deferred/deferred_7.$(OBJEXT)
+deferred_deferred_7_OBJECTS = $(am_deferred_deferred_7_OBJECTS)
+deferred_deferred_7_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_7_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_async_tcp_echo_server_OBJECTS = \
+ echo/async_tcp_echo_server.$(OBJEXT)
+echo_async_tcp_echo_server_OBJECTS = \
+ $(am_echo_async_tcp_echo_server_OBJECTS)
+echo_async_tcp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_async_tcp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_async_udp_echo_server_OBJECTS = \
+ echo/async_udp_echo_server.$(OBJEXT)
+echo_async_udp_echo_server_OBJECTS = \
+ $(am_echo_async_udp_echo_server_OBJECTS)
+echo_async_udp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_async_udp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_tcp_echo_client_OBJECTS = \
+ echo/blocking_tcp_echo_client.$(OBJEXT)
+echo_blocking_tcp_echo_client_OBJECTS = \
+ $(am_echo_blocking_tcp_echo_client_OBJECTS)
+echo_blocking_tcp_echo_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_tcp_echo_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_tcp_echo_server_OBJECTS = \
+ echo/blocking_tcp_echo_server.$(OBJEXT)
+echo_blocking_tcp_echo_server_OBJECTS = \
+ $(am_echo_blocking_tcp_echo_server_OBJECTS)
+echo_blocking_tcp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_tcp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_udp_echo_client_OBJECTS = \
+ echo/blocking_udp_echo_client.$(OBJEXT)
+echo_blocking_udp_echo_client_OBJECTS = \
+ $(am_echo_blocking_udp_echo_client_OBJECTS)
+echo_blocking_udp_echo_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_udp_echo_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_echo_blocking_udp_echo_server_OBJECTS = \
+ echo/blocking_udp_echo_server.$(OBJEXT)
+echo_blocking_udp_echo_server_OBJECTS = \
+ $(am_echo_blocking_udp_echo_server_OBJECTS)
+echo_blocking_udp_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@echo_blocking_udp_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_actor_OBJECTS = executors/actor.$(OBJEXT)
+executors_actor_OBJECTS = $(am_executors_actor_OBJECTS)
+executors_actor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_actor_DEPENDENCIES = libasio.a
+am_executors_async_1_OBJECTS = executors/async_1.$(OBJEXT)
+executors_async_1_OBJECTS = $(am_executors_async_1_OBJECTS)
+executors_async_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_async_1_DEPENDENCIES = libasio.a
+am_executors_async_2_OBJECTS = executors/async_2.$(OBJEXT)
+executors_async_2_OBJECTS = $(am_executors_async_2_OBJECTS)
+executors_async_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_async_2_DEPENDENCIES = libasio.a
+am_executors_bank_account_1_OBJECTS = \
+ executors/bank_account_1.$(OBJEXT)
+executors_bank_account_1_OBJECTS = \
+ $(am_executors_bank_account_1_OBJECTS)
+executors_bank_account_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_bank_account_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_bank_account_2_OBJECTS = \
+ executors/bank_account_2.$(OBJEXT)
+executors_bank_account_2_OBJECTS = \
+ $(am_executors_bank_account_2_OBJECTS)
+executors_bank_account_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_bank_account_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_fork_join_OBJECTS = executors/fork_join.$(OBJEXT)
+executors_fork_join_OBJECTS = $(am_executors_fork_join_OBJECTS)
+executors_fork_join_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_fork_join_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_pipeline_OBJECTS = executors/pipeline.$(OBJEXT)
+executors_pipeline_OBJECTS = $(am_executors_pipeline_OBJECTS)
+executors_pipeline_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_pipeline_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_executors_priority_scheduler_OBJECTS = \
+ executors/priority_scheduler.$(OBJEXT)
+executors_priority_scheduler_OBJECTS = \
+ $(am_executors_priority_scheduler_OBJECTS)
+executors_priority_scheduler_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@executors_priority_scheduler_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_iostreams_http_client_OBJECTS = iostreams/http_client.$(OBJEXT)
+iostreams_http_client_OBJECTS = $(am_iostreams_http_client_OBJECTS)
+iostreams_http_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@iostreams_http_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_c_callback_wrapper_OBJECTS = \
+ operations/c_callback_wrapper.$(OBJEXT)
+operations_c_callback_wrapper_OBJECTS = \
+ $(am_operations_c_callback_wrapper_OBJECTS)
+operations_c_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_c_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_callback_wrapper_OBJECTS = \
+ operations/callback_wrapper.$(OBJEXT)
+operations_callback_wrapper_OBJECTS = \
+ $(am_operations_callback_wrapper_OBJECTS)
+operations_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_1_OBJECTS = operations/composed_1.$(OBJEXT)
+operations_composed_1_OBJECTS = $(am_operations_composed_1_OBJECTS)
+operations_composed_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_2_OBJECTS = operations/composed_2.$(OBJEXT)
+operations_composed_2_OBJECTS = $(am_operations_composed_2_OBJECTS)
+operations_composed_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_3_OBJECTS = operations/composed_3.$(OBJEXT)
+operations_composed_3_OBJECTS = $(am_operations_composed_3_OBJECTS)
+operations_composed_3_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_3_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_4_OBJECTS = operations/composed_4.$(OBJEXT)
+operations_composed_4_OBJECTS = $(am_operations_composed_4_OBJECTS)
+operations_composed_4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_5_OBJECTS = operations/composed_5.$(OBJEXT)
+operations_composed_5_OBJECTS = $(am_operations_composed_5_OBJECTS)
+operations_composed_5_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_5_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_6_OBJECTS = operations/composed_6.$(OBJEXT)
+operations_composed_6_OBJECTS = $(am_operations_composed_6_OBJECTS)
+operations_composed_6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_7_OBJECTS = operations/composed_7.$(OBJEXT)
+operations_composed_7_OBJECTS = $(am_operations_composed_7_OBJECTS)
+operations_composed_7_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_7_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_8_OBJECTS = operations/composed_8.$(OBJEXT)
+operations_composed_8_OBJECTS = $(am_operations_composed_8_OBJECTS)
+operations_composed_8_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_8_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_parallel_sort_OBJECTS = \
+ parallel_group/parallel_sort.$(OBJEXT)
+parallel_group_parallel_sort_OBJECTS = \
+ $(am_parallel_group_parallel_sort_OBJECTS)
+parallel_group_parallel_sort_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_parallel_sort_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_ranged_wait_for_all_OBJECTS = \
+ parallel_group/ranged_wait_for_all.$(OBJEXT)
+parallel_group_ranged_wait_for_all_OBJECTS = \
+ $(am_parallel_group_ranged_wait_for_all_OBJECTS)
+parallel_group_ranged_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_ranged_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_all_OBJECTS = \
+ parallel_group/wait_for_all.$(OBJEXT)
+parallel_group_wait_for_all_OBJECTS = \
+ $(am_parallel_group_wait_for_all_OBJECTS)
+parallel_group_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_OBJECTS = \
+ parallel_group/wait_for_one.$(OBJEXT)
+parallel_group_wait_for_one_OBJECTS = \
+ $(am_parallel_group_wait_for_one_OBJECTS)
+parallel_group_wait_for_one_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_error_OBJECTS = \
+ parallel_group/wait_for_one_error.$(OBJEXT)
+parallel_group_wait_for_one_error_OBJECTS = \
+ $(am_parallel_group_wait_for_one_error_OBJECTS)
+parallel_group_wait_for_one_error_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_error_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_success_OBJECTS = \
+ parallel_group/wait_for_one_success.$(OBJEXT)
+parallel_group_wait_for_one_success_OBJECTS = \
+ $(am_parallel_group_wait_for_one_success_OBJECTS)
+parallel_group_wait_for_one_success_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_success_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
+ ../../$(DEPDIR)/asio_ssl.Po deferred/$(DEPDIR)/deferred_1.Po \
+ deferred/$(DEPDIR)/deferred_2.Po \
+ deferred/$(DEPDIR)/deferred_3.Po \
+ deferred/$(DEPDIR)/deferred_4.Po \
+ deferred/$(DEPDIR)/deferred_5.Po \
+ deferred/$(DEPDIR)/deferred_6.Po \
+ deferred/$(DEPDIR)/deferred_7.Po \
+ echo/$(DEPDIR)/async_tcp_echo_server.Po \
+ echo/$(DEPDIR)/async_udp_echo_server.Po \
+ echo/$(DEPDIR)/blocking_tcp_echo_client.Po \
+ echo/$(DEPDIR)/blocking_tcp_echo_server.Po \
+ echo/$(DEPDIR)/blocking_udp_echo_client.Po \
+ echo/$(DEPDIR)/blocking_udp_echo_server.Po \
+ executors/$(DEPDIR)/actor.Po executors/$(DEPDIR)/async_1.Po \
+ executors/$(DEPDIR)/async_2.Po \
+ executors/$(DEPDIR)/bank_account_1.Po \
+ executors/$(DEPDIR)/bank_account_2.Po \
+ executors/$(DEPDIR)/fork_join.Po \
+ executors/$(DEPDIR)/pipeline.Po \
+ executors/$(DEPDIR)/priority_scheduler.Po \
+ iostreams/$(DEPDIR)/http_client.Po \
+ operations/$(DEPDIR)/c_callback_wrapper.Po \
+ operations/$(DEPDIR)/callback_wrapper.Po \
+ operations/$(DEPDIR)/composed_1.Po \
+ operations/$(DEPDIR)/composed_2.Po \
+ operations/$(DEPDIR)/composed_3.Po \
+ operations/$(DEPDIR)/composed_4.Po \
+ operations/$(DEPDIR)/composed_5.Po \
+ operations/$(DEPDIR)/composed_6.Po \
+ operations/$(DEPDIR)/composed_7.Po \
+ operations/$(DEPDIR)/composed_8.Po \
+ parallel_group/$(DEPDIR)/parallel_sort.Po \
+ parallel_group/$(DEPDIR)/ranged_wait_for_all.Po \
+ parallel_group/$(DEPDIR)/wait_for_all.Po \
+ parallel_group/$(DEPDIR)/wait_for_one.Po \
+ parallel_group/$(DEPDIR)/wait_for_one_error.Po \
+ parallel_group/$(DEPDIR)/wait_for_one_success.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libasio_a_SOURCES) $(deferred_deferred_1_SOURCES) \
+ $(deferred_deferred_2_SOURCES) $(deferred_deferred_3_SOURCES) \
+ $(deferred_deferred_4_SOURCES) $(deferred_deferred_5_SOURCES) \
+ $(deferred_deferred_6_SOURCES) $(deferred_deferred_7_SOURCES) \
+ $(echo_async_tcp_echo_server_SOURCES) \
+ $(echo_async_udp_echo_server_SOURCES) \
+ $(echo_blocking_tcp_echo_client_SOURCES) \
+ $(echo_blocking_tcp_echo_server_SOURCES) \
+ $(echo_blocking_udp_echo_client_SOURCES) \
+ $(echo_blocking_udp_echo_server_SOURCES) \
+ $(executors_actor_SOURCES) $(executors_async_1_SOURCES) \
+ $(executors_async_2_SOURCES) \
+ $(executors_bank_account_1_SOURCES) \
+ $(executors_bank_account_2_SOURCES) \
+ $(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
+ $(executors_priority_scheduler_SOURCES) \
+ $(iostreams_http_client_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(parallel_group_parallel_sort_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_one_SOURCES) \
+ $(parallel_group_wait_for_one_error_SOURCES) \
+ $(parallel_group_wait_for_one_success_SOURCES)
+DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
+ $(deferred_deferred_1_SOURCES) $(deferred_deferred_2_SOURCES) \
+ $(deferred_deferred_3_SOURCES) $(deferred_deferred_4_SOURCES) \
+ $(deferred_deferred_5_SOURCES) $(deferred_deferred_6_SOURCES) \
+ $(deferred_deferred_7_SOURCES) \
+ $(echo_async_tcp_echo_server_SOURCES) \
+ $(echo_async_udp_echo_server_SOURCES) \
+ $(echo_blocking_tcp_echo_client_SOURCES) \
+ $(echo_blocking_tcp_echo_server_SOURCES) \
+ $(echo_blocking_udp_echo_client_SOURCES) \
+ $(echo_blocking_udp_echo_server_SOURCES) \
+ $(executors_actor_SOURCES) $(executors_async_1_SOURCES) \
+ $(executors_async_2_SOURCES) \
+ $(executors_bank_account_1_SOURCES) \
+ $(executors_bank_account_2_SOURCES) \
+ $(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
+ $(executors_priority_scheduler_SOURCES) \
+ $(iostreams_http_client_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(parallel_group_parallel_sort_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_one_SOURCES) \
+ $(parallel_group_wait_for_one_error_SOURCES) \
+ $(parallel_group_wait_for_one_success_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
+@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../../asio.cpp \
+@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
+@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+deferred_deferred_1_SOURCES = deferred/deferred_1.cpp
+deferred_deferred_2_SOURCES = deferred/deferred_2.cpp
+deferred_deferred_3_SOURCES = deferred/deferred_3.cpp
+deferred_deferred_4_SOURCES = deferred/deferred_4.cpp
+deferred_deferred_5_SOURCES = deferred/deferred_5.cpp
+deferred_deferred_6_SOURCES = deferred/deferred_6.cpp
+deferred_deferred_7_SOURCES = deferred/deferred_7.cpp
+echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
+echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
+echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
+echo_blocking_tcp_echo_server_SOURCES = echo/blocking_tcp_echo_server.cpp
+echo_blocking_udp_echo_client_SOURCES = echo/blocking_udp_echo_client.cpp
+echo_blocking_udp_echo_server_SOURCES = echo/blocking_udp_echo_server.cpp
+executors_actor_SOURCES = executors/actor.cpp
+executors_async_1_SOURCES = executors/async_1.cpp
+executors_async_2_SOURCES = executors/async_2.cpp
+executors_bank_account_1_SOURCES = executors/bank_account_1.cpp
+executors_bank_account_2_SOURCES = executors/bank_account_2.cpp
+executors_fork_join_SOURCES = executors/fork_join.cpp
+executors_pipeline_SOURCES = executors/pipeline.cpp
+executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
+iostreams_http_client_SOURCES = iostreams/http_client.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+parallel_group_parallel_sort_SOURCES = parallel_group/parallel_sort.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
+parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
+parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
+parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
+parallel_group_wait_for_one_success_SOURCES = parallel_group/wait_for_one_success.cpp
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/cpp14/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/examples/cpp14/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../../$(am__dirstamp):
+ @$(MKDIR_P) ../..
+ @: > ../../$(am__dirstamp)
+../../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../../$(DEPDIR)
+ @: > ../../$(DEPDIR)/$(am__dirstamp)
+../../asio.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+../../asio_ssl.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+
+libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libasio.a
+ $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libasio.a
+deferred/$(am__dirstamp):
+ @$(MKDIR_P) deferred
+ @: > deferred/$(am__dirstamp)
+deferred/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) deferred/$(DEPDIR)
+ @: > deferred/$(DEPDIR)/$(am__dirstamp)
+deferred/deferred_1.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_1$(EXEEXT): $(deferred_deferred_1_OBJECTS) $(deferred_deferred_1_DEPENDENCIES) $(EXTRA_deferred_deferred_1_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_1_OBJECTS) $(deferred_deferred_1_LDADD) $(LIBS)
+deferred/deferred_2.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_2$(EXEEXT): $(deferred_deferred_2_OBJECTS) $(deferred_deferred_2_DEPENDENCIES) $(EXTRA_deferred_deferred_2_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_2_OBJECTS) $(deferred_deferred_2_LDADD) $(LIBS)
+deferred/deferred_3.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_3$(EXEEXT): $(deferred_deferred_3_OBJECTS) $(deferred_deferred_3_DEPENDENCIES) $(EXTRA_deferred_deferred_3_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_3$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_3_OBJECTS) $(deferred_deferred_3_LDADD) $(LIBS)
+deferred/deferred_4.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_4$(EXEEXT): $(deferred_deferred_4_OBJECTS) $(deferred_deferred_4_DEPENDENCIES) $(EXTRA_deferred_deferred_4_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_4_OBJECTS) $(deferred_deferred_4_LDADD) $(LIBS)
+deferred/deferred_5.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_5$(EXEEXT): $(deferred_deferred_5_OBJECTS) $(deferred_deferred_5_DEPENDENCIES) $(EXTRA_deferred_deferred_5_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_5$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_5_OBJECTS) $(deferred_deferred_5_LDADD) $(LIBS)
+deferred/deferred_6.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_6$(EXEEXT): $(deferred_deferred_6_OBJECTS) $(deferred_deferred_6_DEPENDENCIES) $(EXTRA_deferred_deferred_6_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_6_OBJECTS) $(deferred_deferred_6_LDADD) $(LIBS)
+deferred/deferred_7.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_7$(EXEEXT): $(deferred_deferred_7_OBJECTS) $(deferred_deferred_7_DEPENDENCIES) $(EXTRA_deferred_deferred_7_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_7$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_7_OBJECTS) $(deferred_deferred_7_LDADD) $(LIBS)
+echo/$(am__dirstamp):
+ @$(MKDIR_P) echo
+ @: > echo/$(am__dirstamp)
+echo/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) echo/$(DEPDIR)
+ @: > echo/$(DEPDIR)/$(am__dirstamp)
+echo/async_tcp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/async_tcp_echo_server$(EXEEXT): $(echo_async_tcp_echo_server_OBJECTS) $(echo_async_tcp_echo_server_DEPENDENCIES) $(EXTRA_echo_async_tcp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/async_tcp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_async_tcp_echo_server_OBJECTS) $(echo_async_tcp_echo_server_LDADD) $(LIBS)
+echo/async_udp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/async_udp_echo_server$(EXEEXT): $(echo_async_udp_echo_server_OBJECTS) $(echo_async_udp_echo_server_DEPENDENCIES) $(EXTRA_echo_async_udp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/async_udp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_async_udp_echo_server_OBJECTS) $(echo_async_udp_echo_server_LDADD) $(LIBS)
+echo/blocking_tcp_echo_client.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_tcp_echo_client$(EXEEXT): $(echo_blocking_tcp_echo_client_OBJECTS) $(echo_blocking_tcp_echo_client_DEPENDENCIES) $(EXTRA_echo_blocking_tcp_echo_client_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_tcp_echo_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_tcp_echo_client_OBJECTS) $(echo_blocking_tcp_echo_client_LDADD) $(LIBS)
+echo/blocking_tcp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_tcp_echo_server$(EXEEXT): $(echo_blocking_tcp_echo_server_OBJECTS) $(echo_blocking_tcp_echo_server_DEPENDENCIES) $(EXTRA_echo_blocking_tcp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_tcp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_tcp_echo_server_OBJECTS) $(echo_blocking_tcp_echo_server_LDADD) $(LIBS)
+echo/blocking_udp_echo_client.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_udp_echo_client$(EXEEXT): $(echo_blocking_udp_echo_client_OBJECTS) $(echo_blocking_udp_echo_client_DEPENDENCIES) $(EXTRA_echo_blocking_udp_echo_client_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_udp_echo_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_udp_echo_client_OBJECTS) $(echo_blocking_udp_echo_client_LDADD) $(LIBS)
+echo/blocking_udp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
+ echo/$(DEPDIR)/$(am__dirstamp)
+
+echo/blocking_udp_echo_server$(EXEEXT): $(echo_blocking_udp_echo_server_OBJECTS) $(echo_blocking_udp_echo_server_DEPENDENCIES) $(EXTRA_echo_blocking_udp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
+ @rm -f echo/blocking_udp_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_udp_echo_server_OBJECTS) $(echo_blocking_udp_echo_server_LDADD) $(LIBS)
+executors/$(am__dirstamp):
+ @$(MKDIR_P) executors
+ @: > executors/$(am__dirstamp)
+executors/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) executors/$(DEPDIR)
+ @: > executors/$(DEPDIR)/$(am__dirstamp)
+executors/actor.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/actor$(EXEEXT): $(executors_actor_OBJECTS) $(executors_actor_DEPENDENCIES) $(EXTRA_executors_actor_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/actor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_actor_OBJECTS) $(executors_actor_LDADD) $(LIBS)
+executors/async_1.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/async_1$(EXEEXT): $(executors_async_1_OBJECTS) $(executors_async_1_DEPENDENCIES) $(EXTRA_executors_async_1_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/async_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_async_1_OBJECTS) $(executors_async_1_LDADD) $(LIBS)
+executors/async_2.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/async_2$(EXEEXT): $(executors_async_2_OBJECTS) $(executors_async_2_DEPENDENCIES) $(EXTRA_executors_async_2_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/async_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_async_2_OBJECTS) $(executors_async_2_LDADD) $(LIBS)
+executors/bank_account_1.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/bank_account_1$(EXEEXT): $(executors_bank_account_1_OBJECTS) $(executors_bank_account_1_DEPENDENCIES) $(EXTRA_executors_bank_account_1_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/bank_account_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_bank_account_1_OBJECTS) $(executors_bank_account_1_LDADD) $(LIBS)
+executors/bank_account_2.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/bank_account_2$(EXEEXT): $(executors_bank_account_2_OBJECTS) $(executors_bank_account_2_DEPENDENCIES) $(EXTRA_executors_bank_account_2_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/bank_account_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_bank_account_2_OBJECTS) $(executors_bank_account_2_LDADD) $(LIBS)
+executors/fork_join.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/fork_join$(EXEEXT): $(executors_fork_join_OBJECTS) $(executors_fork_join_DEPENDENCIES) $(EXTRA_executors_fork_join_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/fork_join$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_fork_join_OBJECTS) $(executors_fork_join_LDADD) $(LIBS)
+executors/pipeline.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/pipeline$(EXEEXT): $(executors_pipeline_OBJECTS) $(executors_pipeline_DEPENDENCIES) $(EXTRA_executors_pipeline_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/pipeline$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_pipeline_OBJECTS) $(executors_pipeline_LDADD) $(LIBS)
+executors/priority_scheduler.$(OBJEXT): executors/$(am__dirstamp) \
+ executors/$(DEPDIR)/$(am__dirstamp)
+
+executors/priority_scheduler$(EXEEXT): $(executors_priority_scheduler_OBJECTS) $(executors_priority_scheduler_DEPENDENCIES) $(EXTRA_executors_priority_scheduler_DEPENDENCIES) executors/$(am__dirstamp)
+ @rm -f executors/priority_scheduler$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(executors_priority_scheduler_OBJECTS) $(executors_priority_scheduler_LDADD) $(LIBS)
+iostreams/$(am__dirstamp):
+ @$(MKDIR_P) iostreams
+ @: > iostreams/$(am__dirstamp)
+iostreams/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) iostreams/$(DEPDIR)
+ @: > iostreams/$(DEPDIR)/$(am__dirstamp)
+iostreams/http_client.$(OBJEXT): iostreams/$(am__dirstamp) \
+ iostreams/$(DEPDIR)/$(am__dirstamp)
+
+iostreams/http_client$(EXEEXT): $(iostreams_http_client_OBJECTS) $(iostreams_http_client_DEPENDENCIES) $(EXTRA_iostreams_http_client_DEPENDENCIES) iostreams/$(am__dirstamp)
+ @rm -f iostreams/http_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(iostreams_http_client_OBJECTS) $(iostreams_http_client_LDADD) $(LIBS)
+operations/$(am__dirstamp):
+ @$(MKDIR_P) operations
+ @: > operations/$(am__dirstamp)
+operations/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) operations/$(DEPDIR)
+ @: > operations/$(DEPDIR)/$(am__dirstamp)
+operations/c_callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/c_callback_wrapper$(EXEEXT): $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_c_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/c_callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_LDADD) $(LIBS)
+operations/callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/callback_wrapper$(EXEEXT): $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_LDADD) $(LIBS)
+operations/composed_1.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_1$(EXEEXT): $(operations_composed_1_OBJECTS) $(operations_composed_1_DEPENDENCIES) $(EXTRA_operations_composed_1_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_1_OBJECTS) $(operations_composed_1_LDADD) $(LIBS)
+operations/composed_2.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_2$(EXEEXT): $(operations_composed_2_OBJECTS) $(operations_composed_2_DEPENDENCIES) $(EXTRA_operations_composed_2_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_2_OBJECTS) $(operations_composed_2_LDADD) $(LIBS)
+operations/composed_3.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_3$(EXEEXT): $(operations_composed_3_OBJECTS) $(operations_composed_3_DEPENDENCIES) $(EXTRA_operations_composed_3_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_3$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_3_OBJECTS) $(operations_composed_3_LDADD) $(LIBS)
+operations/composed_4.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_4$(EXEEXT): $(operations_composed_4_OBJECTS) $(operations_composed_4_DEPENDENCIES) $(EXTRA_operations_composed_4_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_4_OBJECTS) $(operations_composed_4_LDADD) $(LIBS)
+operations/composed_5.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_5$(EXEEXT): $(operations_composed_5_OBJECTS) $(operations_composed_5_DEPENDENCIES) $(EXTRA_operations_composed_5_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_5$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_5_OBJECTS) $(operations_composed_5_LDADD) $(LIBS)
+operations/composed_6.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_6$(EXEEXT): $(operations_composed_6_OBJECTS) $(operations_composed_6_DEPENDENCIES) $(EXTRA_operations_composed_6_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_6_OBJECTS) $(operations_composed_6_LDADD) $(LIBS)
+operations/composed_7.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_7$(EXEEXT): $(operations_composed_7_OBJECTS) $(operations_composed_7_DEPENDENCIES) $(EXTRA_operations_composed_7_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_7$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_7_OBJECTS) $(operations_composed_7_LDADD) $(LIBS)
+operations/composed_8.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_8$(EXEEXT): $(operations_composed_8_OBJECTS) $(operations_composed_8_DEPENDENCIES) $(EXTRA_operations_composed_8_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_8$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_8_OBJECTS) $(operations_composed_8_LDADD) $(LIBS)
+parallel_group/$(am__dirstamp):
+ @$(MKDIR_P) parallel_group
+ @: > parallel_group/$(am__dirstamp)
+parallel_group/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) parallel_group/$(DEPDIR)
+ @: > parallel_group/$(DEPDIR)/$(am__dirstamp)
+parallel_group/parallel_sort.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/parallel_sort$(EXEEXT): $(parallel_group_parallel_sort_OBJECTS) $(parallel_group_parallel_sort_DEPENDENCIES) $(EXTRA_parallel_group_parallel_sort_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/parallel_sort$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_parallel_sort_OBJECTS) $(parallel_group_parallel_sort_LDADD) $(LIBS)
+parallel_group/ranged_wait_for_all.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/ranged_wait_for_all$(EXEEXT): $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_ranged_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/ranged_wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_LDADD) $(LIBS)
+parallel_group/wait_for_all.$(OBJEXT): parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_all$(EXEEXT): $(parallel_group_wait_for_all_OBJECTS) $(parallel_group_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_all_OBJECTS) $(parallel_group_wait_for_all_LDADD) $(LIBS)
+parallel_group/wait_for_one.$(OBJEXT): parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one$(EXEEXT): $(parallel_group_wait_for_one_OBJECTS) $(parallel_group_wait_for_one_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_OBJECTS) $(parallel_group_wait_for_one_LDADD) $(LIBS)
+parallel_group/wait_for_one_error.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one_error$(EXEEXT): $(parallel_group_wait_for_one_error_OBJECTS) $(parallel_group_wait_for_one_error_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_error_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one_error$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_error_OBJECTS) $(parallel_group_wait_for_one_error_LDADD) $(LIBS)
+parallel_group/wait_for_one_success.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one_success$(EXEEXT): $(parallel_group_wait_for_one_success_OBJECTS) $(parallel_group_wait_for_one_success_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_success_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one_success$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_success_OBJECTS) $(parallel_group_wait_for_one_success_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ../../*.$(OBJEXT)
+ -rm -f deferred/*.$(OBJEXT)
+ -rm -f echo/*.$(OBJEXT)
+ -rm -f executors/*.$(OBJEXT)
+ -rm -f iostreams/*.$(OBJEXT)
+ -rm -f operations/*.$(OBJEXT)
+ -rm -f parallel_group/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_7.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_tcp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_udp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_udp_echo_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_udp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/actor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/async_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/async_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/bank_account_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/bank_account_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/fork_join.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/pipeline.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/priority_scheduler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/http_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/c_callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_7.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_8.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/parallel_sort.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/ranged_wait_for_all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_success.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../../$(am__dirstamp)
+ -rm -f deferred/$(DEPDIR)/$(am__dirstamp)
+ -rm -f deferred/$(am__dirstamp)
+ -rm -f echo/$(DEPDIR)/$(am__dirstamp)
+ -rm -f echo/$(am__dirstamp)
+ -rm -f executors/$(DEPDIR)/$(am__dirstamp)
+ -rm -f executors/$(am__dirstamp)
+ -rm -f iostreams/$(DEPDIR)/$(am__dirstamp)
+ -rm -f iostreams/$(am__dirstamp)
+ -rm -f operations/$(DEPDIR)/$(am__dirstamp)
+ -rm -f operations/$(am__dirstamp)
+ -rm -f parallel_group/$(DEPDIR)/$(am__dirstamp)
+ -rm -f parallel_group/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f deferred/$(DEPDIR)/deferred_1.Po
+ -rm -f deferred/$(DEPDIR)/deferred_2.Po
+ -rm -f deferred/$(DEPDIR)/deferred_3.Po
+ -rm -f deferred/$(DEPDIR)/deferred_4.Po
+ -rm -f deferred/$(DEPDIR)/deferred_5.Po
+ -rm -f deferred/$(DEPDIR)/deferred_6.Po
+ -rm -f deferred/$(DEPDIR)/deferred_7.Po
+ -rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_server.Po
+ -rm -f executors/$(DEPDIR)/actor.Po
+ -rm -f executors/$(DEPDIR)/async_1.Po
+ -rm -f executors/$(DEPDIR)/async_2.Po
+ -rm -f executors/$(DEPDIR)/bank_account_1.Po
+ -rm -f executors/$(DEPDIR)/bank_account_2.Po
+ -rm -f executors/$(DEPDIR)/fork_join.Po
+ -rm -f executors/$(DEPDIR)/pipeline.Po
+ -rm -f executors/$(DEPDIR)/priority_scheduler.Po
+ -rm -f iostreams/$(DEPDIR)/http_client.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f parallel_group/$(DEPDIR)/parallel_sort.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_success.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f deferred/$(DEPDIR)/deferred_1.Po
+ -rm -f deferred/$(DEPDIR)/deferred_2.Po
+ -rm -f deferred/$(DEPDIR)/deferred_3.Po
+ -rm -f deferred/$(DEPDIR)/deferred_4.Po
+ -rm -f deferred/$(DEPDIR)/deferred_5.Po
+ -rm -f deferred/$(DEPDIR)/deferred_6.Po
+ -rm -f deferred/$(DEPDIR)/deferred_7.Po
+ -rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_tcp_echo_server.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_client.Po
+ -rm -f echo/$(DEPDIR)/blocking_udp_echo_server.Po
+ -rm -f executors/$(DEPDIR)/actor.Po
+ -rm -f executors/$(DEPDIR)/async_1.Po
+ -rm -f executors/$(DEPDIR)/async_2.Po
+ -rm -f executors/$(DEPDIR)/bank_account_1.Po
+ -rm -f executors/$(DEPDIR)/bank_account_2.Po
+ -rm -f executors/$(DEPDIR)/fork_join.Po
+ -rm -f executors/$(DEPDIR)/pipeline.Po
+ -rm -f executors/$(DEPDIR)/priority_scheduler.Po
+ -rm -f iostreams/$(DEPDIR)/http_client.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f parallel_group/$(DEPDIR)/parallel_sort.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_success.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp
new file mode 100644
index 00000000000..db9213eb3be
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp
@@ -0,0 +1,35 @@
+//
+// deferred_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ auto deferred_op = timer.async_wait(deferred);
+
+ std::move(deferred_op)(
+ [](std::error_code ec)
+ {
+ std::cout << "timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp
new file mode 100644
index 00000000000..07528282de5
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp
@@ -0,0 +1,44 @@
+//
+// deferred_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ auto deferred_op = timer.async_wait(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer.expires_after(std::chrono::seconds(1));
+ return timer.async_wait(deferred);
+ }
+ )
+ );
+
+ std::move(deferred_op)(
+ [](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp
new file mode 100644
index 00000000000..396e40840a1
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp
@@ -0,0 +1,51 @@
+//
+// deferred_3.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+template <typename CompletionToken>
+auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
+{
+ return timer.async_wait(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer.expires_after(std::chrono::seconds(1));
+ return timer.async_wait(deferred);
+ }
+ )
+ )(
+ std::forward<CompletionToken>(token)
+ );
+}
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ async_wait_twice(
+ timer,
+ [](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp
new file mode 100644
index 00000000000..a8ea73336d2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp
@@ -0,0 +1,59 @@
+//
+// deferred_4.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+template <typename CompletionToken>
+auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
+{
+ return timer.async_wait(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer.expires_after(std::chrono::seconds(1));
+ return timer.async_wait(deferred);
+ }
+ )
+ )(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ return deferred.values(42);
+ }
+ )
+ )(
+ std::forward<CompletionToken>(token)
+ );
+}
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ async_wait_twice(
+ timer,
+ [](int result)
+ {
+ std::cout << "result is " << result << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp
new file mode 100644
index 00000000000..d262b977811
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp
@@ -0,0 +1,66 @@
+//
+// deferred_5.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+template <typename CompletionToken>
+auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
+{
+ return timer.async_wait(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer.expires_after(std::chrono::seconds(1));
+ return deferred.when(!ec)
+ .then(timer.async_wait(deferred))
+ .otherwise(deferred.values(ec));
+ }
+ )
+ )(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ return deferred.when(!ec)
+ .then(deferred.values(42))
+ .otherwise(deferred.values(0));
+ }
+ )
+ )(
+ std::forward<CompletionToken>(token)
+ );
+}
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ async_wait_twice(
+ timer,
+ [](int result)
+ {
+ std::cout << "result is " << result << "\n";
+ }
+ );
+
+ // Uncomment the following line to trigger an error in async_wait_twice.
+ //timer.cancel();
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp
new file mode 100644
index 00000000000..7ccef58cc5c
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp
@@ -0,0 +1,75 @@
+//
+// deferred_6.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::append;
+using asio::deferred;
+
+template <typename CompletionToken>
+auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
+{
+ return deferred.values(&timer)(
+ deferred(
+ [](asio::steady_timer* timer)
+ {
+ timer->expires_after(std::chrono::seconds(1));
+ return timer->async_wait(append(deferred, timer));
+ }
+ )
+ )(
+ deferred(
+ [](std::error_code ec, asio::steady_timer* timer)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer->expires_after(std::chrono::seconds(1));
+ return deferred.when(!ec)
+ .then(timer->async_wait(deferred))
+ .otherwise(deferred.values(ec));
+ }
+ )
+ )(
+ deferred(
+ [](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ return deferred.when(!ec)
+ .then(deferred.values(42))
+ .otherwise(deferred.values(0));
+ }
+ )
+ )(
+ std::forward<CompletionToken>(token)
+ );
+}
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ async_wait_twice(
+ timer,
+ [](int result)
+ {
+ std::cout << "result is " << result << "\n";
+ }
+ );
+
+ // Uncomment the following line to trigger an error in async_wait_twice.
+ //timer.cancel();
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp
new file mode 100644
index 00000000000..b0734542c79
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp
@@ -0,0 +1,71 @@
+//
+// deferred_7.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::append;
+using asio::deferred;
+
+template <typename CompletionToken>
+auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
+{
+ return deferred.values(&timer)
+ | deferred(
+ [](asio::steady_timer* timer)
+ {
+ timer->expires_after(std::chrono::seconds(1));
+ return timer->async_wait(append(deferred, timer));
+ }
+ )
+ | deferred(
+ [](std::error_code ec, asio::steady_timer* timer)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer->expires_after(std::chrono::seconds(1));
+ return deferred.when(!ec)
+ .then(timer->async_wait(deferred))
+ .otherwise(deferred.values(ec));
+ }
+ )
+ | deferred(
+ [](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ return deferred.when(!ec)
+ .then(deferred.values(42))
+ .otherwise(deferred.values(0));
+ }
+ )
+ | std::forward<CompletionToken>(token);
+}
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ async_wait_twice(
+ timer,
+ [](int result)
+ {
+ std::cout << "result is " << result << "\n";
+ }
+ );
+
+ // Uncomment the following line to trigger an error in async_wait_twice.
+ //timer.cancel();
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp14/echo/.gitignore b/3rdparty/asio/src/examples/cpp14/echo/.gitignore
deleted file mode 100644
index 0882fa6ced3..00000000000
--- a/3rdparty/asio/src/examples/cpp14/echo/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_server
-*_client
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
index c6004c0a0e5..9bd1b727500 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
index fee8aed6e66..b059af95b82 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
index c7c648df97f..8a281203f89 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
index d9a4f075a8d..2116712616a 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
index 603a591f47a..4c8a2849d5b 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
index 646fd136649..c3098bdb8fc 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/executors/.gitignore b/3rdparty/asio/src/examples/cpp14/executors/.gitignore
deleted file mode 100644
index d51d7f00295..00000000000
--- a/3rdparty/asio/src/examples/cpp14/executors/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-actor
-async_[0-9]
-bank_account_[0-9]
-fork_join
-pipeline
-priority_scheduler
diff --git a/3rdparty/asio/src/examples/cpp14/executors/actor.cpp b/3rdparty/asio/src/examples/cpp14/executors/actor.cpp
index 26d2fb4bf11..a46caf45a68 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/actor.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/actor.cpp
@@ -1,4 +1,8 @@
-#include <asio/ts/executor.hpp>
+#include <asio/any_io_executor.hpp>
+#include <asio/defer.hpp>
+#include <asio/post.hpp>
+#include <asio/strand.hpp>
+#include <asio/system_executor.hpp>
#include <condition_variable>
#include <deque>
#include <memory>
@@ -6,8 +10,8 @@
#include <typeinfo>
#include <vector>
+using asio::any_io_executor;
using asio::defer;
-using asio::executor;
using asio::post;
using asio::strand;
using asio::system_executor;
@@ -94,7 +98,7 @@ public:
{
// Execute the message handler in the context of the target's executor.
post(to->executor_,
- [=, msg=std::move(msg)]
+ [=, msg=std::move(msg)]() mutable
{
to->call_handler(std::move(msg), from);
});
@@ -102,7 +106,7 @@ public:
protected:
// Construct the actor to use the specified executor for all message handlers.
- actor(executor e)
+ actor(any_io_executor e)
: executor_(std::move(e))
{
}
@@ -120,7 +124,7 @@ protected:
template <class Actor, class Message>
void deregister_handler(void (Actor::* mf)(Message, actor_address))
{
- const std::type_info& id = typeid(message_handler<Message>);
+ const std::type_info& id = typeid(Message);
for (auto iter = handlers_.begin(); iter != handlers_.end(); ++iter)
{
if ((*iter)->message_id() == id)
@@ -166,7 +170,7 @@ private:
// All messages associated with a single actor object should be processed
// non-concurrently. We use a strand to ensure non-concurrent execution even
// if the underlying executor may use multiple threads.
- strand<executor> executor_;
+ strand<any_io_executor> executor_;
std::vector<std::shared_ptr<message_handler_base>> handlers_;
};
@@ -216,7 +220,7 @@ using asio::thread_pool;
class member : public actor
{
public:
- explicit member(executor e)
+ explicit member(any_io_executor e)
: actor(std::move(e))
{
register_handler(&member::init_handler);
diff --git a/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp b/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
index d282b74f206..0d1bdfcb8bd 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
@@ -1,29 +1,33 @@
-#include <asio/ts/executor.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/associated_executor.hpp>
+#include <asio/bind_executor.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
#include <string>
using asio::bind_executor;
-using asio::dispatch;
-using asio::make_work_guard;
-using asio::post;
-using asio::thread_pool;
+using asio::get_associated_executor;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// A function to asynchronously read a single line from an input stream.
-template <class Handler>
-void async_getline(std::istream& is, Handler handler)
+template <class IoExecutor, class Handler>
+void async_getline(IoExecutor io_ex, std::istream& is, Handler handler)
{
- // Create executor_work for the handler's associated executor.
- auto work = make_work_guard(handler);
+ // Track work for the handler's associated executor.
+ auto work_ex = asio::prefer(
+ get_associated_executor(handler, io_ex),
+ execution::outstanding_work.tracked);
// Post a function object to do the work asynchronously.
- post([&is, work, handler=std::move(handler)]() mutable
+ asio::require(io_ex, execution::blocking.never).execute(
+ [&is, work_ex, handler=std::move(handler)]() mutable
{
std::string line;
std::getline(is, line);
// Pass the result to the handler, via the associated executor.
- dispatch(work.get_executor(),
+ asio::prefer(work_ex, execution::blocking.possibly).execute(
[line=std::move(line), handler=std::move(handler)]() mutable
{
handler(std::move(line));
@@ -33,15 +37,18 @@ void async_getline(std::istream& is, Handler handler)
int main()
{
- thread_pool pool;
+ static_thread_pool io_pool(1);
+ static_thread_pool completion_pool(1);
std::cout << "Enter a line: ";
- async_getline(std::cin,
- bind_executor(pool, [](std::string line)
+ async_getline(io_pool.executor(), std::cin,
+ bind_executor(completion_pool.executor(),
+ [](std::string line)
{
std::cout << "Line: " << line << "\n";
}));
- pool.join();
+ io_pool.wait();
+ completion_pool.wait();
}
diff --git a/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp b/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp
index b39156dcb23..ee4a72e80c3 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp
@@ -1,30 +1,33 @@
-#include <asio/ts/executor.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/associated_executor.hpp>
+#include <asio/bind_executor.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
#include <string>
using asio::bind_executor;
-using asio::dispatch;
using asio::get_associated_executor;
-using asio::make_work_guard;
-using asio::post;
-using asio::thread_pool;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// A function to asynchronously read a single line from an input stream.
-template <class Handler>
-void async_getline(std::istream& is, Handler handler)
+template <class IoExecutor, class Handler>
+void async_getline(IoExecutor io_ex, std::istream& is, Handler handler)
{
- // Create executor_work for the handler's associated executor.
- auto work = make_work_guard(handler);
+ // Track work for the handler's associated executor.
+ auto work_ex = asio::prefer(
+ get_associated_executor(handler, io_ex),
+ execution::outstanding_work.tracked);
// Post a function object to do the work asynchronously.
- post([&is, work, handler=std::move(handler)]() mutable
+ asio::require(io_ex, execution::blocking.never).execute(
+ [&is, work_ex, handler=std::move(handler)]() mutable
{
std::string line;
std::getline(is, line);
// Pass the result to the handler, via the associated executor.
- dispatch(work.get_executor(),
+ asio::prefer(work_ex, execution::blocking.possibly).execute(
[line=std::move(line), handler=std::move(handler)]() mutable
{
handler(std::move(line));
@@ -33,36 +36,44 @@ void async_getline(std::istream& is, Handler handler)
}
// A function to asynchronously read multiple lines from an input stream.
-template <class Handler>
-void async_getlines(std::istream& is, std::string init, Handler handler)
+template <class IoExecutor, class Handler>
+void async_getlines(IoExecutor io_ex, std::istream& is, std::string init, Handler handler)
{
- // Get the final handler's associated executor.
- auto ex = get_associated_executor(handler);
+ // Track work for the I/O executor.
+ auto io_work_ex = asio::prefer(io_ex,
+ execution::outstanding_work.tracked);
+
+ // Track work for the handler's associated executor.
+ auto handler_work_ex = asio::prefer(
+ get_associated_executor(handler, io_ex),
+ execution::outstanding_work.tracked);
// Use the associated executor for each operation in the composition.
- async_getline(is,
- bind_executor(ex,
- [&is, lines=std::move(init), handler=std::move(handler)]
+ async_getline(io_work_ex, is,
+ bind_executor(handler_work_ex,
+ [io_work_ex, &is, lines=std::move(init), handler=std::move(handler)]
(std::string line) mutable
{
if (line.empty())
handler(lines);
else
- async_getlines(is, lines + line + "\n", std::move(handler));
+ async_getlines(io_work_ex, is, lines + line + "\n", std::move(handler));
}));
}
int main()
{
- thread_pool pool;
+ static_thread_pool io_pool(1);
+ static_thread_pool completion_pool(1);
std::cout << "Enter text, terminating with a blank line:\n";
- async_getlines(std::cin, "",
- bind_executor(pool, [](std::string lines)
+ async_getlines(io_pool.executor(), std::cin, "",
+ bind_executor(completion_pool.executor(), [](std::string lines)
{
std::cout << "Lines:\n" << lines << "\n";
}));
- pool.join();
+ io_pool.wait();
+ completion_pool.wait();
}
diff --git a/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp b/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp
index f85a1852b56..a63d7fc059b 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp
@@ -1,9 +1,9 @@
-#include <asio/ts/executor.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
-using asio::post;
-using asio::thread_pool;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// Traditional active object pattern.
// Member functions do not block.
@@ -11,37 +11,40 @@ using asio::thread_pool;
class bank_account
{
int balance_ = 0;
- mutable thread_pool pool_{1};
+ mutable static_thread_pool pool_{1};
public:
void deposit(int amount)
{
- post(pool_, [=]
- {
- balance_ += amount;
- });
+ pool_.executor().execute(
+ [this, amount]
+ {
+ balance_ += amount;
+ });
}
void withdraw(int amount)
{
- post(pool_, [=]
- {
- if (balance_ >= amount)
- balance_ -= amount;
- });
+ pool_.executor().execute(
+ [this, amount]
+ {
+ if (balance_ >= amount)
+ balance_ -= amount;
+ });
}
void print_balance() const
{
- post(pool_, [=]
- {
- std::cout << "balance = " << balance_ << "\n";
- });
+ pool_.executor().execute(
+ [this]
+ {
+ std::cout << "balance = " << balance_ << "\n";
+ });
}
~bank_account()
{
- pool_.join();
+ pool_.wait();
}
};
diff --git a/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp b/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp
index 5233e77dec3..c2de05156e8 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp
@@ -1,10 +1,9 @@
-#include <asio/ts/executor.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
-using asio::post;
-using asio::thread_pool;
-using asio::use_future;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// Traditional active object pattern.
// Member functions block until operation is finished.
@@ -12,35 +11,38 @@ using asio::use_future;
class bank_account
{
int balance_ = 0;
- mutable thread_pool pool_{1};
+ mutable static_thread_pool pool_{1};
public:
void deposit(int amount)
{
- post(pool_,
- use_future([=]
+ asio::require(pool_.executor(), execution::blocking.always).execute(
+ [this, amount]
{
balance_ += amount;
- })).get();
+ });
}
void withdraw(int amount)
{
- post(pool_,
- use_future([=]
+ asio::require(pool_.executor(),
+ execution::blocking.always).execute(
+ [this, amount]
{
if (balance_ >= amount)
balance_ -= amount;
- })).get();
+ });
}
int balance() const
{
- return post(pool_,
- use_future([=]
+ int result = 0;
+ asio::require(pool_.executor(), execution::blocking.always).execute(
+ [this, &result]
{
- return balance_;
- })).get();
+ result = balance_;
+ });
+ return result;
}
};
diff --git a/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp b/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp
index fe6746ad7e0..7e8a827356d 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp
@@ -1,19 +1,20 @@
-#include <asio/ts/executor.hpp>
-#include <asio/thread_pool.hpp>
+#include <asio/execution.hpp>
+#include <asio/static_thread_pool.hpp>
+#include <algorithm>
#include <condition_variable>
#include <memory>
#include <mutex>
#include <queue>
#include <thread>
+#include <numeric>
-using asio::dispatch;
-using asio::execution_context;
-using asio::thread_pool;
+using asio::static_thread_pool;
+namespace execution = asio::execution;
// A fixed-size thread pool used to implement fork/join semantics. Functions
// are scheduled using a simple FIFO queue. Implementing work stealing, or
// using a queue based on atomic operations, are left as tasks for the reader.
-class fork_join_pool : public execution_context
+class fork_join_pool
{
public:
// The constructor starts a thread pool with the specified number of threads.
@@ -21,7 +22,7 @@ public:
// Additional threads may temporarily be added to the pool if they join a
// fork_executor.
explicit fork_join_pool(
- std::size_t thread_count = std::thread::hardware_concurrency() * 2)
+ std::size_t thread_count = std::max(std::thread::hardware_concurrency(), 1u) * 2)
: use_count_(1),
threads_(thread_count)
{
@@ -31,7 +32,8 @@ public:
// it is time to shut down, i.e. the use count is zero.
for (thread_count_ = 0; thread_count_ < thread_count; ++thread_count_)
{
- dispatch(threads_, [&]
+ threads_.executor().execute(
+ [this]
{
std::unique_lock<std::mutex> lock(mutex_);
while (use_count_ > 0)
@@ -43,7 +45,7 @@ public:
catch (...)
{
stop_threads();
- threads_.join();
+ threads_.wait();
throw;
}
}
@@ -52,7 +54,7 @@ public:
~fork_join_pool()
{
stop_threads();
- threads_.join();
+ threads_.wait();
}
private:
@@ -116,7 +118,7 @@ private:
// Dispatch a function, executing it immediately if the queue is already
// loaded. Otherwise adds the function to the queue and wakes a thread.
- void do_dispatch(std::shared_ptr<function_base> p,
+ void do_execute(std::shared_ptr<function_base> p,
const std::shared_ptr<std::size_t>& work_count)
{
std::unique_lock<std::mutex> lock(mutex_);
@@ -134,16 +136,6 @@ private:
}
}
- // Add a function to the queue and wake a thread.
- void do_post(std::shared_ptr<function_base> p,
- const std::shared_ptr<std::size_t>& work_count)
- {
- std::lock_guard<std::mutex> lock(mutex_);
- queue_.push(p);
- do_work_started(work_count);
- condition_.notify_one();
- }
-
// Ask all threads to shut down.
void stop_threads()
{
@@ -157,7 +149,7 @@ private:
std::queue<std::shared_ptr<function_base>> queue_;
std::size_t use_count_;
std::size_t thread_count_;
- thread_pool threads_;
+ static_thread_pool threads_;
};
// A class that satisfies the Executor requirements. Every function or piece of
@@ -171,45 +163,16 @@ public:
{
}
- fork_join_pool& context() const noexcept
+ fork_join_pool& query(execution::context_t) const noexcept
{
return context_;
}
- void on_work_started() const noexcept
- {
- std::lock_guard<std::mutex> lock(context_.mutex_);
- context_.do_work_started(work_count_);
- }
-
- void on_work_finished() const noexcept
- {
- std::lock_guard<std::mutex> lock(context_.mutex_);
- context_.do_work_finished(work_count_);
- }
-
- template <class Func, class Alloc>
- void dispatch(Func&& f, const Alloc& a) const
- {
- auto p(std::allocate_shared<function<Func>>(
- typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
- std::move(f), work_count_));
- context_.do_dispatch(p, work_count_);
- }
-
- template <class Func, class Alloc>
- void post(Func f, const Alloc& a) const
- {
- auto p(std::allocate_shared<function<Func>>(
- typename std::allocator_traits<Alloc>::template rebind_alloc<char>(a),
- std::move(f), work_count_));
- context_.do_post(p, work_count_);
- }
-
- template <class Func, class Alloc>
- void defer(Func&& f, const Alloc& a) const
+ template <class Func>
+ void execute(Func f) const
{
- post(std::forward<Func>(f), a);
+ auto p(std::make_shared<function<Func>>(std::move(f), work_count_));
+ context_.do_execute(p, work_count_);
}
friend bool operator==(const fork_executor& a,
@@ -288,8 +251,8 @@ void fork_join_sort(Iterator begin, Iterator end)
{
fork_executor fork(pool);
join_guard join(fork);
- dispatch(fork, [=]{ fork_join_sort(begin, begin + n / 2); });
- dispatch(fork, [=]{ fork_join_sort(begin + n / 2, end); });
+ fork.execute([=]{ fork_join_sort(begin, begin + n / 2); });
+ fork.execute([=]{ fork_join_sort(begin + n / 2, end); });
}
std::inplace_merge(begin, begin + n / 2, end);
}
diff --git a/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp b/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp
index c66e283fcbc..9754a27d425 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp
@@ -1,4 +1,6 @@
-#include <asio/ts/executor.hpp>
+#include <asio/associated_executor.hpp>
+#include <asio/bind_executor.hpp>
+#include <asio/execution.hpp>
#include <condition_variable>
#include <future>
#include <memory>
@@ -6,30 +8,21 @@
#include <queue>
#include <thread>
#include <vector>
+#include <cctype>
-using asio::execution_context;
using asio::executor_binder;
using asio::get_associated_executor;
-using asio::post;
-using asio::system_executor;
-using asio::use_future;
-using asio::use_service;
+namespace execution = asio::execution;
// An executor that launches a new thread for each function submitted to it.
-// This class satisfies the Executor requirements.
+// This class satisfies the executor requirements.
class thread_executor
{
private:
- // Service to track all threads started through a thread_executor.
- class thread_bag : public execution_context::service
+ // Singleton execution context that manages threads launched by the new_thread_executor.
+ class thread_bag
{
- public:
- typedef thread_bag key_type;
-
- explicit thread_bag(execution_context& ctx)
- : execution_context::service(ctx)
- {
- }
+ friend class thread_executor;
void add_thread(std::thread&& t)
{
@@ -37,8 +30,9 @@ private:
threads_.push_back(std::move(t));
}
- private:
- virtual void shutdown()
+ thread_bag() = default;
+
+ ~thread_bag()
{
for (auto& t : threads_)
t.join();
@@ -49,40 +43,24 @@ private:
};
public:
- execution_context& context() const noexcept
+ static thread_bag& query(execution::context_t)
{
- return system_executor().context();
+ static thread_bag threads;
+ return threads;
}
- void on_work_started() const noexcept
+ static constexpr auto query(execution::blocking_t)
{
- // This executor doesn't count work.
+ return execution::blocking.never;
}
- void on_work_finished() const noexcept
+ template <class Func>
+ void execute(Func f) const
{
- // This executor doesn't count work.
- }
-
- template <class Func, class Alloc>
- void dispatch(Func&& f, const Alloc& a) const
- {
- post(std::forward<Func>(f), a);
- }
-
- template <class Func, class Alloc>
- void post(Func f, const Alloc&) const
- {
- thread_bag& bag = use_service<thread_bag>(context());
+ thread_bag& bag = query(execution::context);
bag.add_thread(std::thread(std::move(f)));
}
- template <class Func, class Alloc>
- void defer(Func&& f, const Alloc& a) const
- {
- post(std::forward<Func>(f), a);
- }
-
friend bool operator==(const thread_executor&,
const thread_executor&) noexcept
{
@@ -185,7 +163,14 @@ std::future<void> pipeline(queue_back<T> in, F f)
// Run the function, and as we're the last stage return a future so that the
// caller can wait for the pipeline to finish.
- return post(ex, use_future([in, f = std::move(f)]() mutable { f(in); }));
+ std::packaged_task<void()> task(
+ [in, f = std::move(f)]() mutable
+ {
+ f(in);
+ });
+ std::future<void> fut = task.get_future();
+ asio::require(ex, execution::blocking.never).execute(std::move(task));
+ return fut;
}
// Launch an intermediate stage in a pipeline.
@@ -204,7 +189,8 @@ std::future<void> pipeline(queue_back<T> in, F f, Tail... t)
auto ex = get_associated_executor(f, thread_executor());
// Run the function.
- post(ex, [in, out, f = std::move(f)]() mutable
+ asio::require(ex, execution::blocking.never).execute(
+ [in, out, f = std::move(f)]() mutable
{
f(in, out);
out.stop();
@@ -230,7 +216,8 @@ std::future<void> pipeline(F f, Tail... t)
auto ex = get_associated_executor(f, thread_executor());
// Run the function.
- post(ex, [out, f = std::move(f)]() mutable
+ asio::require(ex, execution::blocking.never).execute(
+ [out, f = std::move(f)]() mutable
{
f(out);
out.stop();
@@ -242,12 +229,12 @@ std::future<void> pipeline(F f, Tail... t)
//------------------------------------------------------------------------------
-#include <asio/thread_pool.hpp>
+#include <asio/static_thread_pool.hpp>
#include <iostream>
#include <string>
using asio::bind_executor;
-using asio::thread_pool;
+using asio::static_thread_pool;
void reader(queue_front<std::string> out)
{
@@ -286,8 +273,8 @@ void writer(queue_back<std::string> in)
int main()
{
- thread_pool pool;
+ static_thread_pool pool(1);
- auto f = pipeline(reader, filter, bind_executor(pool, upper), writer);
+ auto f = pipeline(reader, filter, bind_executor(pool.executor(), upper), writer);
f.wait();
}
diff --git a/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp b/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp
index 3b28af1eec0..20d36db933a 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp
@@ -1,66 +1,74 @@
-#include <asio/ts/executor.hpp>
+#include <asio/execution.hpp>
#include <condition_variable>
#include <iostream>
#include <memory>
#include <mutex>
#include <queue>
-using asio::dispatch;
-using asio::execution_context;
+namespace execution = asio::execution;
-class priority_scheduler : public execution_context
+namespace custom_props {
+
+ struct priority
+ {
+ template <typename T>
+ static constexpr bool is_applicable_property_v =
+ execution::is_executor<T>::value;
+
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
+
+ using polymorphic_query_result_type = int;
+
+ int value() const { return value_; }
+
+ int value_ = 1;
+ };
+
+ constexpr priority low_priority{0};
+ constexpr priority normal_priority{1};
+ constexpr priority high_priority{2};
+
+} // namespace custom_props
+
+class priority_scheduler
{
public:
// A class that satisfies the Executor requirements.
class executor_type
{
public:
- executor_type(priority_scheduler& ctx, int pri) noexcept
- : context_(ctx), priority_(pri)
+ executor_type(priority_scheduler& ctx) noexcept
+ : context_(ctx), priority_(custom_props::normal_priority.value())
{
}
- priority_scheduler& context() const noexcept
+ priority_scheduler& query(execution::context_t) const noexcept
{
return context_;
}
- void on_work_started() const noexcept
- {
- // This executor doesn't count work. Instead, the scheduler simply runs
- // until explicitly stopped.
- }
-
- void on_work_finished() const noexcept
+ int query(custom_props::priority) const noexcept
{
- // This executor doesn't count work. Instead, the scheduler simply runs
- // until explicitly stopped.
+ return priority_;
}
- template <class Func, class Alloc>
- void dispatch(Func&& f, const Alloc& a) const
+ executor_type require(custom_props::priority pri) const
{
- post(std::forward<Func>(f), a);
+ executor_type new_ex(*this);
+ new_ex.priority_ = pri.value();
+ return new_ex;
}
- template <class Func, class Alloc>
- void post(Func f, const Alloc& a) const
+ template <class Func>
+ void execute(Func f) const
{
- auto p(std::allocate_shared<item<Func>>(
- typename std::allocator_traits<
- Alloc>::template rebind_alloc<char>(a),
- priority_, std::move(f)));
+ auto p(std::make_shared<item<Func>>(priority_, std::move(f)));
std::lock_guard<std::mutex> lock(context_.mutex_);
context_.queue_.push(p);
context_.condition_.notify_one();
}
- template <class Func, class Alloc>
- void defer(Func&& f, const Alloc& a) const
- {
- post(std::forward<Func>(f), a);
- }
-
friend bool operator==(const executor_type& a,
const executor_type& b) noexcept
{
@@ -78,9 +86,9 @@ public:
int priority_;
};
- executor_type get_executor(int pri = 0) noexcept
+ executor_type executor() noexcept
{
- return executor_type(*const_cast<priority_scheduler*>(this), pri);
+ return executor_type(*const_cast<priority_scheduler*>(this));
}
void run()
@@ -152,16 +160,22 @@ private:
int main()
{
priority_scheduler sched;
- auto low = sched.get_executor(0);
- auto med = sched.get_executor(1);
- auto high = sched.get_executor(2);
- dispatch(low, []{ std::cout << "1\n"; });
- dispatch(low, []{ std::cout << "11\n"; });
- dispatch(med, []{ std::cout << "2\n"; });
- dispatch(med, []{ std::cout << "22\n"; });
- dispatch(high, []{ std::cout << "3\n"; });
- dispatch(high, []{ std::cout << "33\n"; });
- dispatch(high, []{ std::cout << "333\n"; });
- dispatch(sched.get_executor(-1), [&]{ sched.stop(); });
+ auto ex = sched.executor();
+ auto prefer_low = asio::prefer(ex, custom_props::low_priority);
+ auto low = asio::require(ex, custom_props::low_priority);
+ auto med = asio::require(ex, custom_props::normal_priority);
+ auto high = asio::require(ex, custom_props::high_priority);
+ execution::any_executor<custom_props::priority> poly_high(high);
+ prefer_low.execute([]{ std::cout << "1\n"; });
+ low.execute([]{ std::cout << "11\n"; });
+ low.execute([]{ std::cout << "111\n"; });
+ med.execute([]{ std::cout << "2\n"; });
+ med.execute([]{ std::cout << "22\n"; });
+ high.execute([]{ std::cout << "3\n"; });
+ high.execute([]{ std::cout << "33\n"; });
+ high.execute([]{ std::cout << "333\n"; });
+ poly_high.execute([]{ std::cout << "3333\n"; });
+ asio::require(ex, custom_props::priority{-1}).execute([&]{ sched.stop(); });
sched.run();
+ std::cout << "polymorphic query result = " << asio::query(poly_high, custom_props::priority{}) << "\n";
}
diff --git a/3rdparty/asio/src/examples/cpp14/iostreams/.gitignore b/3rdparty/asio/src/examples/cpp14/iostreams/.gitignore
deleted file mode 100644
index bc2b4f8f7fe..00000000000
--- a/3rdparty/asio/src/examples/cpp14/iostreams/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_client
-*_server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp b/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp
index 36f14b459e5..3ae02e4f825 100644
--- a/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp
+++ b/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
// http_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp
new file mode 100644
index 00000000000..33b1c26e8ae
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp
@@ -0,0 +1,230 @@
+//
+// c_callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+#include <memory>
+#include <new>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of a C-based API that uses the function pointer
+// plus void* context idiom for exposing a callback.
+
+void read_input(const char* prompt, void (*cb)(void*, const char*), void* arg)
+{
+ std::thread(
+ [prompt = std::string(prompt), cb, arg]
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ cb(arg, line.c_str());
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the C-based API.
+
+// To map our completion handler into a function pointer / void* callback, we
+// need to allocate some state that will live for the duration of the
+// operation. A pointer to this state will be passed to the C-based API.
+template <typename Handler>
+class read_input_state
+{
+public:
+ read_input_state(Handler&& handler)
+ : handler_(std::move(handler)),
+ work_(asio::make_work_guard(handler_))
+ {
+ }
+
+ // Create the state using the handler's associated allocator.
+ static read_input_state* create(Handler&& handler)
+ {
+ // A unique_ptr deleter that is used to destroy uninitialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(handler,
+ asio::recycling_allocator<void>())};
+
+ // Allocate memory for the state.
+ std::unique_ptr<read_input_state, deleter> uninit_ptr(
+ std::allocator_traits<decltype(d.alloc)>::allocate(d.alloc, 1), d);
+
+ // Construct the state into the newly allocated memory. This might throw.
+ read_input_state* ptr =
+ new (uninit_ptr.get()) read_input_state(std::move(handler));
+
+ // Release ownership of the memory and return the newly allocated state.
+ uninit_ptr.release();
+ return ptr;
+ }
+
+ static void callback(void* arg, const char* result)
+ {
+ read_input_state* self = static_cast<read_input_state*>(arg);
+
+ // A unique_ptr deleter that is used to destroy initialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, ptr);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(self->handler_,
+ asio::recycling_allocator<void>())};
+
+ // To conform to the rules regarding asynchronous operations and memory
+ // allocation, we must make a copy of the state and deallocate the memory
+ // before dispatching the completion handler.
+ std::unique_ptr<read_input_state, deleter> state_ptr(self, d);
+ read_input_state state(std::move(*self));
+ state_ptr.reset();
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(state.work_.get_executor(),
+ asio::bind_allocator(d.alloc,
+ [
+ handler = std::move(state.handler_),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ }
+
+private:
+ Handler handler_;
+
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ asio::executor_work_guard<
+ asio::associated_executor_t<Handler>> work_;
+};
+
+// The initiating function for the asynchronous operation.
+template <typename CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](auto handler, const std::string& prompt)
+ {
+ // The body of the initiation function object creates the long-lived state
+ // and passes it to the C-based API, along with the function pointer.
+ using state_type = read_input_state<decltype(handler)>;
+ read_input(prompt.c_str(), &state_type::callback,
+ state_type::create(std::move(handler)));
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp
new file mode 100644
index 00000000000..3d5774c7421
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp
@@ -0,0 +1,152 @@
+//
+// callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of an API that uses a move-only function object
+// for exposing a callback. The callback has the signature void(std::string).
+
+template <typename Callback>
+void read_input(const std::string& prompt, Callback cb)
+{
+ std::thread(
+ [prompt, cb = std::move(cb)]() mutable
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ std::move(cb)(std::move(line));
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the callback-based API.
+
+// The initiating function for the asynchronous operation.
+template <typename CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](auto handler, const std::string& prompt)
+ {
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ auto work = asio::make_work_guard(handler);
+
+ // Launch the operation with a callback that will receive the result and
+ // pass it through to the asynchronous operation's completion handler.
+ read_input(prompt,
+ [
+ handler = std::move(handler),
+ work = std::move(work)
+ ](std::string result) mutable
+ {
+ // Get the handler's associated allocator. If the handler does not
+ // specify an allocator, use the recycling allocator as the default.
+ auto alloc = asio::get_associated_allocator(
+ handler, asio::recycling_allocator<void>());
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(work.get_executor(),
+ asio::bind_allocator(alloc,
+ [
+ handler = std::move(handler),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ });
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to specify an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp
new file mode 100644
index 00000000000..80eaceddf71
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp
@@ -0,0 +1,155 @@
+//
+// composed_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+//------------------------------------------------------------------------------
+
+// This is the simplest example of a composed asynchronous operation, where we
+// simply repackage an existing operation. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of our underlying asynchronous operation.
+{
+ // When delegating to the underlying operation we must take care to perfectly
+ // forward the completion token. This ensures that our operation works
+ // correctly with move-only function objects as callbacks, as well as other
+ // completion token types.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionToken>(token));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp
new file mode 100644
index 00000000000..18086bd0627
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp
@@ -0,0 +1,219 @@
+//
+// composed_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This next simplest example of a composed asynchronous operation involves
+// repackaging multiple operations but choosing to invoke just one of them. All
+// of these underlying operations have the same completion signature. The
+// asynchronous operation requirements are met by delegating responsibility to
+// the underlying operations.
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, bool allow_partial_write,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error, std::size_t)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](auto&& completion_handler, tcp::socket& socket,
+ const char* message, bool allow_partial_write)
+ {
+ if (allow_partial_write)
+ {
+ // When delegating to an underlying operation we must take care to
+ // perfectly forward the completion handler. This ensures that our
+ // operation works correctly with move-only function objects as
+ // callbacks.
+ return socket.async_write_some(
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ else
+ {
+ // As above, we must perfectly forward the completion handler when calling
+ // the alternate underlying operation.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ initiation, token, std::ref(socket), message, allow_partial_write);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n", false,
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", false, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", false, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp
new file mode 100644
index 00000000000..7b347944768
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp
@@ -0,0 +1,228 @@
+//
+// composed_3.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](auto&& completion_handler,
+ tcp::socket& socket, const char* message)
+ {
+ // The async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // This differs from our operation's signature in that it is also passed
+ // the number of bytes transferred as an argument of type std::size_t. We
+ // will adapt our completion handler to async_write's completion handler
+ // signature by using std::bind, which drops the additional argument.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), std::placeholders::_1)));
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ // Get the result of the operation.
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp
new file mode 100644
index 00000000000..808a179e2d3
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp
@@ -0,0 +1,242 @@
+//
+// composed_4.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. We will also intercept an empty
+// message as an invalid argument, and propagate the corresponding error to the
+// user. The asynchronous operation requirements are met by delegating
+// responsibility to the underlying operation.
+
+template <typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](auto&& completion_handler,
+ tcp::socket& socket, const char* message)
+ {
+ // The post operation has a completion handler signature of:
+ //
+ // void()
+ //
+ // and the async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // Both of these operations' completion handler signatures differ from our
+ // operation's completion handler signature. We will adapt our completion
+ // handler to these signatures by using std::bind, which drops the
+ // additional arguments.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ std::size_t length = std::strlen(message);
+ if (length == 0)
+ {
+ asio::post(
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), asio::error::invalid_argument)));
+ }
+ else
+ {
+ asio::async_write(socket,
+ asio::buffer(message, length),
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), std::placeholders::_1)));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket, "", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp
new file mode 100644
index 00000000000..c28cc8af129
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp
@@ -0,0 +1,280 @@
+//
+// composed_5.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation automatically serialises a message, using its I/O
+// streams insertion operator, before sending it on the socket. To do this, it
+// must allocate a buffer for the encoded message and ensure this buffer's
+// validity until the underlying async_write operation completes.
+
+template <typename T, typename CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const T& message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](auto&& completion_handler,
+ tcp::socket& socket, std::unique_ptr<std::string> encoded_message)
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object, rather than
+ // using a lambda or std::bind.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket so
+ // that it can obtain the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The user-supplied completion handler.
+ typename std::decay<decltype(completion_handler)>::type handler_;
+
+ // The function call operator matches the completion signature of the
+ // async_write operation.
+ void operator()(const std::error_code& error, std::size_t /*n*/)
+ {
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ // The arguments must match the completion signature of our composed
+ // operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{socket, std::move(encoded_message),
+ std::forward<decltype(completion_handler)>(completion_handler)});
+ };
+
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket),
+ std::move(encoded_message));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, 123456,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ std::string("abcdef"), asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, 654.321, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp
new file mode 100644
index 00000000000..82c0cd72237
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp
@@ -0,0 +1,340 @@
+//
+// composed_6.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/executor_work_guard.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+template <typename T, typename CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](auto&& completion_handler, tcp::socket& socket,
+ std::unique_ptr<std::string> encoded_message, std::size_t repeat_count,
+ std::unique_ptr<asio::steady_timer> delay_timer)
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket as
+ // it is used for multiple async_write operations, as well as for
+ // obtaining the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The repeat count remaining.
+ std::size_t repeat_count_;
+
+ // A steady timer used for introducing a delay.
+ std::unique_ptr<asio::steady_timer> delay_timer_;
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our intermediate completion handler is implemented as a
+ // state machine.
+ enum { starting, waiting, writing } state_;
+
+ // As our composed operation performs multiple underlying I/O operations,
+ // we should maintain a work object against the I/O executor. This tells
+ // the I/O executor that there is still more work to come in the future.
+ asio::executor_work_guard<tcp::socket::executor_type> io_work_;
+
+ // The user-supplied completion handler, called once only on completion
+ // of the entire composed operation.
+ typename std::decay<decltype(completion_handler)>::type handler_;
+
+ // By having a default value for the second argument, this function call
+ // operator matches the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ void operator()(const std::error_code& error, std::size_t = 0)
+ {
+ if (!error)
+ {
+ switch (state_)
+ {
+ case starting:
+ case writing:
+ if (repeat_count_ > 0)
+ {
+ --repeat_count_;
+ state_ = waiting;
+ delay_timer_->expires_after(std::chrono::seconds(1));
+ delay_timer_->async_wait(std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state_ = writing;
+ asio::async_write(socket_,
+ asio::buffer(*encoded_message_), std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // We no longer have any future work coming for the I/O executor.
+ io_work_.reset();
+
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{
+ socket, std::move(encoded_message),
+ repeat_count, std::move(delay_timer),
+ intermediate_completion_handler::starting,
+ asio::make_work_guard(socket.get_executor()),
+ std::forward<decltype(completion_handler)>(completion_handler)});
+ };
+
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket),
+ std::move(encoded_message), repeat_count,
+ std::move(delay_timer));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp
new file mode 100644
index 00000000000..841249bef5b
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp
@@ -0,0 +1,261 @@
+//
+// composed_7.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+template <typename T, typename CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_compose.
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ enum { starting, waiting, writing };
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation, which is implemented here as a state
+ // machine in a lambda, in an intermediate completion handler that meets the
+ // requirements of a conforming asynchronous operation. This includes
+ // tracking outstanding work against the I/O executors associated with the
+ // operation (in this example, this is the socket's executor).
+ //
+ // The first argument to our lambda is a reference to the enclosing
+ // intermediate completion handler. This intermediate completion handler is
+ // provided for us by the asio::async_compose function, and takes care
+ // of all the details required to implement a conforming asynchronous
+ // operation. When calling an underlying asynchronous operation, we pass it
+ // this enclosing intermediate completion handler as the completion token.
+ //
+ // All arguments to our lambda after the first must be defaulted to allow the
+ // state machine to be started, as well as to allow the completion handler to
+ // match the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ [
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ &socket,
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our lambda
+ // implementation is also move-only.
+ encoded_message = std::move(encoded_message),
+
+ // The repeat count remaining.
+ repeat_count,
+
+ // A steady timer used for introducing a delay.
+ delay_timer = std::move(delay_timer),
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ state = starting
+ ]
+ (
+ auto& self,
+ const std::error_code& error = {},
+ std::size_t = 0
+ ) mutable
+ {
+ if (!error)
+ {
+ switch (state)
+ {
+ case starting:
+ case writing:
+ if (repeat_count > 0)
+ {
+ --repeat_count;
+ state = waiting;
+ delay_timer->expires_after(std::chrono::seconds(1));
+ delay_timer->async_wait(std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state = writing;
+ asio::async_write(socket,
+ asio::buffer(*encoded_message), std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message.reset();
+ delay_timer.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ },
+ token, socket);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp
new file mode 100644
index 00000000000..d1f46ddce54
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp
@@ -0,0 +1,254 @@
+//
+// composed_8.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/coroutine.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations,
+// using asio's stackless coroutines support to express the flow of control. It
+// automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+#include <asio/yield.hpp>
+
+template <typename T, typename CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++14 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_compose.
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation, which is implemented here as a stackless
+ // coroutine in a lambda, in an intermediate completion handler that meets the
+ // requirements of a conforming asynchronous operation. This includes
+ // tracking outstanding work against the I/O executors associated with the
+ // operation (in this example, this is the socket's executor).
+ //
+ // The first argument to our lambda is a reference to the enclosing
+ // intermediate completion handler. This intermediate completion handler is
+ // provided for us by the asio::async_compose function, and takes care
+ // of all the details required to implement a conforming asynchronous
+ // operation. When calling an underlying asynchronous operation, we pass it
+ // this enclosing intermediate completion handler as the completion token.
+ //
+ // All arguments to our lambda after the first must be defaulted to allow the
+ // state machine to be started, as well as to allow the completion handler to
+ // match the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ [
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ &socket,
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our lambda
+ // implementation is also move-only.
+ encoded_message = std::move(encoded_message),
+
+ // The repeat count remaining.
+ repeat_count,
+
+ // A steady timer used for introducing a delay.
+ delay_timer = std::move(delay_timer),
+
+ // The coroutine state.
+ coro = asio::coroutine()
+ ]
+ (
+ auto& self,
+ const std::error_code& error = {},
+ std::size_t = 0
+ ) mutable
+ {
+ reenter (coro)
+ {
+ while (repeat_count > 0)
+ {
+ --repeat_count;
+
+ delay_timer->expires_after(std::chrono::seconds(1));
+ yield delay_timer->async_wait(std::move(self));
+ if (error)
+ break;
+
+ yield asio::async_write(socket,
+ asio::buffer(*encoded_message), std::move(self));
+ if (error)
+ break;
+ }
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message.reset();
+ delay_timer.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ }
+ },
+ token, socket);
+}
+
+#include <asio/unyield.hpp>
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp
new file mode 100644
index 00000000000..8bb7cdfd719
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp
@@ -0,0 +1,133 @@
+//
+// parallel_sort.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <algorithm>
+#include <chrono>
+#include <functional>
+#include <iostream>
+#include <random>
+
+template <
+ typename Executor,
+ typename RandomAccessIterator,
+ ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
+auto parallel_sort(
+ Executor executor,
+ RandomAccessIterator begin,
+ RandomAccessIterator end,
+ CompletionToken&& token);
+
+template <
+ typename Executor,
+ typename RandomAccessIterator>
+void parallel_sort_impl(
+ Executor executor,
+ RandomAccessIterator begin,
+ RandomAccessIterator end,
+ std::function<void()> continuation)
+{
+ std::size_t n = end - begin;
+ if (n <= 16384)
+ {
+ asio::post(executor,
+ [=]
+ {
+ std::sort(begin, end);
+ continuation();
+ }
+ );
+ }
+ else
+ {
+ asio::experimental::make_parallel_group(
+ [=](auto token)
+ {
+ return parallel_sort(executor, begin, begin + n / 2, token);
+ },
+ [=](auto token)
+ {
+ return parallel_sort(executor, begin + n / 2, end, token);
+ }
+ ).async_wait(
+ asio::experimental::wait_for_all(),
+ [=](std::array<std::size_t, 2>)
+ {
+ std::inplace_merge(begin, begin + n / 2, end);
+ continuation();
+ }
+ );
+ }
+}
+
+template <
+ typename Executor,
+ typename RandomAccessIterator,
+ ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
+auto parallel_sort(
+ Executor executor,
+ RandomAccessIterator begin,
+ RandomAccessIterator end,
+ CompletionToken&& token)
+{
+ return asio::async_compose<CompletionToken, void()>(
+ [=](auto& self, auto... args)
+ {
+ if (sizeof...(args) == 0)
+ {
+ using self_type = std::decay_t<decltype(self)>;
+ parallel_sort_impl(executor, begin, end,
+ [self = std::make_shared<self_type>(std::move(self))]
+ {
+ asio::dispatch(
+ asio::append(
+ std::move(*self), 0));
+ }
+ );
+ }
+ else
+ {
+ self.complete();
+ }
+ },
+ token
+ );
+}
+
+int main()
+{
+ asio::thread_pool pool(4);
+
+ std::vector<int> values(100'000'000);
+
+ std::random_device random_device;
+ std::mt19937 rng(random_device());
+ std::uniform_int_distribution<int> dist(1, 1'000'000);
+ std::generate(values.begin(), values.end(), [&]{ return dist(rng); });
+
+ std::cout << "starting sort\n";
+
+ auto begin = std::chrono::high_resolution_clock::now();
+
+ parallel_sort(
+ pool.get_executor(),
+ values.begin(),
+ values.end(),
+ asio::use_future
+ ).get();
+
+ auto end = std::chrono::high_resolution_clock::now();
+
+ auto duration = end - begin;
+ std::cout << "sort took "
+ << std::chrono::duration_cast<std::chrono::microseconds>(duration).count()
+ << " microseconds\n";
+}
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp
new file mode 100644
index 00000000000..18772884072
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp
@@ -0,0 +1,70 @@
+//
+// ranged_wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+#include <vector>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor out(ctx, ::dup(STDOUT_FILENO));
+ asio::posix::stream_descriptor err(ctx, ::dup(STDERR_FILENO));
+
+ using op_type = decltype(
+ out.async_write_some(
+ asio::buffer("", 0),
+ asio::deferred
+ )
+ );
+
+ std::vector<op_type> ops;
+
+ ops.push_back(
+ out.async_write_some(
+ asio::buffer("first\r\n", 7),
+ asio::deferred
+ )
+ );
+
+ ops.push_back(
+ err.async_write_some(
+ asio::buffer("second\r\n", 8),
+ asio::deferred
+ )
+ );
+
+ asio::experimental::make_parallel_group(ops).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::vector<std::size_t> completion_order,
+ std::vector<std::error_code> ec,
+ std::vector<std::size_t> n
+ )
+ {
+ for (std::size_t i = 0; i < completion_order.size(); ++i)
+ {
+ std::size_t idx = completion_order[i];
+ std::cout << "operation " << idx << " finished: ";
+ std::cout << ec[idx] << ", " << n[idx] << "\n";
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp
new file mode 100644
index 00000000000..f007326326b
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp
@@ -0,0 +1,64 @@
+//
+// wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ [&](auto token)
+ {
+ return in.async_read_some(asio::buffer(data), token);
+ },
+ [&](auto token)
+ {
+ return timer.async_wait(token);
+ }
+ ).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp
new file mode 100644
index 00000000000..7b25e26d678
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp
@@ -0,0 +1,64 @@
+//
+// wait_for_one.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ [&](auto token)
+ {
+ return in.async_read_some(asio::buffer(data), token);
+ },
+ [&](auto token)
+ {
+ return timer.async_wait(token);
+ }
+ ).async_wait(
+ asio::experimental::wait_for_one(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp
new file mode 100644
index 00000000000..c157d0b3355
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp
@@ -0,0 +1,64 @@
+//
+// wait_for_one_error.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ [&](auto token)
+ {
+ return in.async_read_some(asio::buffer(data), token);
+ },
+ [&](auto token)
+ {
+ return timer.async_wait(token);
+ }
+ ).async_wait(
+ asio::experimental::wait_for_one_error(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp
new file mode 100644
index 00000000000..a328600a9fc
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp
@@ -0,0 +1,64 @@
+//
+// wait_for_one_error.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ [&](auto token)
+ {
+ return in.async_read_some(asio::buffer(data), token);
+ },
+ [&](auto token)
+ {
+ return timer.async_wait(token);
+ }
+ ).async_wait(
+ asio::experimental::wait_for_one_success(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::error_code ec2
+ )
+ {
+ switch (completion_order[0])
+ {
+ case 0:
+ {
+ std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
+ }
+ break;
+ case 1:
+ {
+ std::cout << "timer finished: " << ec2 << "\n";
+ }
+ break;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp17/Makefile.am b/3rdparty/asio/src/examples/cpp17/Makefile.am
new file mode 100644
index 00000000000..c3a571c02f4
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/Makefile.am
@@ -0,0 +1,37 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
+if SEPARATE_COMPILATION
+noinst_LIBRARIES = libasio.a
+libasio_a_SOURCES = ../../asio.cpp
+if HAVE_OPENSSL
+libasio_a_SOURCES += ../../asio_ssl.cpp
+endif
+LDADD = libasio.a
+endif
+
+if HAVE_COROUTINES
+noinst_PROGRAMS = \
+ coroutines_ts/chat_server \
+ coroutines_ts/echo_server \
+ coroutines_ts/echo_server_with_default \
+ coroutines_ts/echo_server_with_as_single_default \
+ coroutines_ts/echo_server_with_as_tuple_default \
+ coroutines_ts/refactored_echo_server
+endif
+
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+
+if HAVE_COROUTINES
+coroutines_ts_chat_server_SOURCES = coroutines_ts/chat_server.cpp
+coroutines_ts_echo_server_SOURCES = coroutines_ts/echo_server.cpp
+coroutines_ts_echo_server_with_default_SOURCES = coroutines_ts/echo_server_with_default.cpp
+coroutines_ts_echo_server_with_as_single_default_SOURCES = coroutines_ts/echo_server_with_as_single_default.cpp
+coroutines_ts_echo_server_with_as_tuple_default_SOURCES = coroutines_ts/echo_server_with_as_tuple_default.cpp
+coroutines_ts_refactored_echo_server_SOURCES = coroutines_ts/refactored_echo_server.cpp
+endif
+
+EXTRA_DIST = \
+ coroutines_ts/range_based_for.cpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp17/Makefile.in b/3rdparty/asio/src/examples/cpp17/Makefile.in
new file mode 100644
index 00000000000..db35ec4f320
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/Makefile.in
@@ -0,0 +1,738 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
+@HAVE_COROUTINES_TRUE@noinst_PROGRAMS = \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/chat_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/echo_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/echo_server_with_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/echo_server_with_as_single_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/echo_server_with_as_tuple_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/refactored_echo_server$(EXEEXT)
+subdir = src/examples/cpp17
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libasio_a_AR = $(AR) $(ARFLAGS)
+libasio_a_LIBADD =
+am__libasio_a_SOURCES_DIST = ../../asio.cpp ../../asio_ssl.cpp
+am__dirstamp = $(am__leading_dot)dirstamp
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../../asio_ssl.$(OBJEXT)
+@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = \
+@SEPARATE_COMPILATION_TRUE@ ../../asio.$(OBJEXT) \
+@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
+libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
+am__coroutines_ts_chat_server_SOURCES_DIST = \
+ coroutines_ts/chat_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_ts_chat_server_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/chat_server.$(OBJEXT)
+coroutines_ts_chat_server_OBJECTS = \
+ $(am_coroutines_ts_chat_server_OBJECTS)
+coroutines_ts_chat_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_ts_chat_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_ts_echo_server_SOURCES_DIST = \
+ coroutines_ts/echo_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_ts_echo_server_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines_ts/echo_server.$(OBJEXT)
+coroutines_ts_echo_server_OBJECTS = \
+ $(am_coroutines_ts_echo_server_OBJECTS)
+coroutines_ts_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_ts_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_ts_echo_server_with_as_single_default_SOURCES_DIST = \
+ coroutines_ts/echo_server_with_as_single_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_ts_echo_server_with_as_single_default_OBJECTS = coroutines_ts/echo_server_with_as_single_default.$(OBJEXT)
+coroutines_ts_echo_server_with_as_single_default_OBJECTS = $(am_coroutines_ts_echo_server_with_as_single_default_OBJECTS)
+coroutines_ts_echo_server_with_as_single_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_ts_echo_server_with_as_single_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_ts_echo_server_with_as_tuple_default_SOURCES_DIST = \
+ coroutines_ts/echo_server_with_as_tuple_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_ts_echo_server_with_as_tuple_default_OBJECTS = coroutines_ts/echo_server_with_as_tuple_default.$(OBJEXT)
+coroutines_ts_echo_server_with_as_tuple_default_OBJECTS = \
+ $(am_coroutines_ts_echo_server_with_as_tuple_default_OBJECTS)
+coroutines_ts_echo_server_with_as_tuple_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_ts_echo_server_with_as_tuple_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_ts_echo_server_with_default_SOURCES_DIST = \
+ coroutines_ts/echo_server_with_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_ts_echo_server_with_default_OBJECTS = coroutines_ts/echo_server_with_default.$(OBJEXT)
+coroutines_ts_echo_server_with_default_OBJECTS = \
+ $(am_coroutines_ts_echo_server_with_default_OBJECTS)
+coroutines_ts_echo_server_with_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_ts_echo_server_with_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_ts_refactored_echo_server_SOURCES_DIST = \
+ coroutines_ts/refactored_echo_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_ts_refactored_echo_server_OBJECTS = coroutines_ts/refactored_echo_server.$(OBJEXT)
+coroutines_ts_refactored_echo_server_OBJECTS = \
+ $(am_coroutines_ts_refactored_echo_server_OBJECTS)
+coroutines_ts_refactored_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_ts_refactored_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
+ ../../$(DEPDIR)/asio_ssl.Po \
+ coroutines_ts/$(DEPDIR)/chat_server.Po \
+ coroutines_ts/$(DEPDIR)/echo_server.Po \
+ coroutines_ts/$(DEPDIR)/echo_server_with_as_single_default.Po \
+ coroutines_ts/$(DEPDIR)/echo_server_with_as_tuple_default.Po \
+ coroutines_ts/$(DEPDIR)/echo_server_with_default.Po \
+ coroutines_ts/$(DEPDIR)/refactored_echo_server.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libasio_a_SOURCES) $(coroutines_ts_chat_server_SOURCES) \
+ $(coroutines_ts_echo_server_SOURCES) \
+ $(coroutines_ts_echo_server_with_as_single_default_SOURCES) \
+ $(coroutines_ts_echo_server_with_as_tuple_default_SOURCES) \
+ $(coroutines_ts_echo_server_with_default_SOURCES) \
+ $(coroutines_ts_refactored_echo_server_SOURCES)
+DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
+ $(am__coroutines_ts_chat_server_SOURCES_DIST) \
+ $(am__coroutines_ts_echo_server_SOURCES_DIST) \
+ $(am__coroutines_ts_echo_server_with_as_single_default_SOURCES_DIST) \
+ $(am__coroutines_ts_echo_server_with_as_tuple_default_SOURCES_DIST) \
+ $(am__coroutines_ts_echo_server_with_default_SOURCES_DIST) \
+ $(am__coroutines_ts_refactored_echo_server_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
+@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../../asio.cpp \
+@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
+@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+@HAVE_COROUTINES_TRUE@coroutines_ts_chat_server_SOURCES = coroutines_ts/chat_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_ts_echo_server_SOURCES = coroutines_ts/echo_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_ts_echo_server_with_default_SOURCES = coroutines_ts/echo_server_with_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_ts_echo_server_with_as_single_default_SOURCES = coroutines_ts/echo_server_with_as_single_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_ts_echo_server_with_as_tuple_default_SOURCES = coroutines_ts/echo_server_with_as_tuple_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_ts_refactored_echo_server_SOURCES = coroutines_ts/refactored_echo_server.cpp
+EXTRA_DIST = \
+ coroutines_ts/range_based_for.cpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/cpp17/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/examples/cpp17/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../../$(am__dirstamp):
+ @$(MKDIR_P) ../..
+ @: > ../../$(am__dirstamp)
+../../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../../$(DEPDIR)
+ @: > ../../$(DEPDIR)/$(am__dirstamp)
+../../asio.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+../../asio_ssl.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+
+libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libasio.a
+ $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libasio.a
+coroutines_ts/$(am__dirstamp):
+ @$(MKDIR_P) coroutines_ts
+ @: > coroutines_ts/$(am__dirstamp)
+coroutines_ts/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) coroutines_ts/$(DEPDIR)
+ @: > coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+coroutines_ts/chat_server.$(OBJEXT): coroutines_ts/$(am__dirstamp) \
+ coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+
+coroutines_ts/chat_server$(EXEEXT): $(coroutines_ts_chat_server_OBJECTS) $(coroutines_ts_chat_server_DEPENDENCIES) $(EXTRA_coroutines_ts_chat_server_DEPENDENCIES) coroutines_ts/$(am__dirstamp)
+ @rm -f coroutines_ts/chat_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_ts_chat_server_OBJECTS) $(coroutines_ts_chat_server_LDADD) $(LIBS)
+coroutines_ts/echo_server.$(OBJEXT): coroutines_ts/$(am__dirstamp) \
+ coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+
+coroutines_ts/echo_server$(EXEEXT): $(coroutines_ts_echo_server_OBJECTS) $(coroutines_ts_echo_server_DEPENDENCIES) $(EXTRA_coroutines_ts_echo_server_DEPENDENCIES) coroutines_ts/$(am__dirstamp)
+ @rm -f coroutines_ts/echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_ts_echo_server_OBJECTS) $(coroutines_ts_echo_server_LDADD) $(LIBS)
+coroutines_ts/echo_server_with_as_single_default.$(OBJEXT): \
+ coroutines_ts/$(am__dirstamp) \
+ coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+
+coroutines_ts/echo_server_with_as_single_default$(EXEEXT): $(coroutines_ts_echo_server_with_as_single_default_OBJECTS) $(coroutines_ts_echo_server_with_as_single_default_DEPENDENCIES) $(EXTRA_coroutines_ts_echo_server_with_as_single_default_DEPENDENCIES) coroutines_ts/$(am__dirstamp)
+ @rm -f coroutines_ts/echo_server_with_as_single_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_ts_echo_server_with_as_single_default_OBJECTS) $(coroutines_ts_echo_server_with_as_single_default_LDADD) $(LIBS)
+coroutines_ts/echo_server_with_as_tuple_default.$(OBJEXT): \
+ coroutines_ts/$(am__dirstamp) \
+ coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+
+coroutines_ts/echo_server_with_as_tuple_default$(EXEEXT): $(coroutines_ts_echo_server_with_as_tuple_default_OBJECTS) $(coroutines_ts_echo_server_with_as_tuple_default_DEPENDENCIES) $(EXTRA_coroutines_ts_echo_server_with_as_tuple_default_DEPENDENCIES) coroutines_ts/$(am__dirstamp)
+ @rm -f coroutines_ts/echo_server_with_as_tuple_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_ts_echo_server_with_as_tuple_default_OBJECTS) $(coroutines_ts_echo_server_with_as_tuple_default_LDADD) $(LIBS)
+coroutines_ts/echo_server_with_default.$(OBJEXT): \
+ coroutines_ts/$(am__dirstamp) \
+ coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+
+coroutines_ts/echo_server_with_default$(EXEEXT): $(coroutines_ts_echo_server_with_default_OBJECTS) $(coroutines_ts_echo_server_with_default_DEPENDENCIES) $(EXTRA_coroutines_ts_echo_server_with_default_DEPENDENCIES) coroutines_ts/$(am__dirstamp)
+ @rm -f coroutines_ts/echo_server_with_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_ts_echo_server_with_default_OBJECTS) $(coroutines_ts_echo_server_with_default_LDADD) $(LIBS)
+coroutines_ts/refactored_echo_server.$(OBJEXT): \
+ coroutines_ts/$(am__dirstamp) \
+ coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+
+coroutines_ts/refactored_echo_server$(EXEEXT): $(coroutines_ts_refactored_echo_server_OBJECTS) $(coroutines_ts_refactored_echo_server_DEPENDENCIES) $(EXTRA_coroutines_ts_refactored_echo_server_DEPENDENCIES) coroutines_ts/$(am__dirstamp)
+ @rm -f coroutines_ts/refactored_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_ts_refactored_echo_server_OBJECTS) $(coroutines_ts_refactored_echo_server_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ../../*.$(OBJEXT)
+ -rm -f coroutines_ts/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines_ts/$(DEPDIR)/chat_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines_ts/$(DEPDIR)/echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines_ts/$(DEPDIR)/echo_server_with_as_single_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines_ts/$(DEPDIR)/echo_server_with_as_tuple_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines_ts/$(DEPDIR)/echo_server_with_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines_ts/$(DEPDIR)/refactored_echo_server.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../../$(am__dirstamp)
+ -rm -f coroutines_ts/$(DEPDIR)/$(am__dirstamp)
+ -rm -f coroutines_ts/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f coroutines_ts/$(DEPDIR)/chat_server.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server_with_as_single_default.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server_with_as_tuple_default.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server_with_default.Po
+ -rm -f coroutines_ts/$(DEPDIR)/refactored_echo_server.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f coroutines_ts/$(DEPDIR)/chat_server.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server_with_as_single_default.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server_with_as_tuple_default.Po
+ -rm -f coroutines_ts/$(DEPDIR)/echo_server_with_default.Po
+ -rm -f coroutines_ts/$(DEPDIR)/refactored_echo_server.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp
new file mode 100644
index 00000000000..cd5fba32486
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp
@@ -0,0 +1,222 @@
+//
+// chat_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <cstdlib>
+#include <deque>
+#include <iostream>
+#include <list>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <asio/awaitable.hpp>
+#include <asio/detached.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/read_until.hpp>
+#include <asio/redirect_error.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_awaitable.hpp>
+#include <asio/write.hpp>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::redirect_error;
+using asio::use_awaitable;
+
+//----------------------------------------------------------------------
+
+class chat_participant
+{
+public:
+ virtual ~chat_participant() {}
+ virtual void deliver(const std::string& msg) = 0;
+};
+
+typedef std::shared_ptr<chat_participant> chat_participant_ptr;
+
+//----------------------------------------------------------------------
+
+class chat_room
+{
+public:
+ void join(chat_participant_ptr participant)
+ {
+ participants_.insert(participant);
+ for (auto msg: recent_msgs_)
+ participant->deliver(msg);
+ }
+
+ void leave(chat_participant_ptr participant)
+ {
+ participants_.erase(participant);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ recent_msgs_.push_back(msg);
+ while (recent_msgs_.size() > max_recent_msgs)
+ recent_msgs_.pop_front();
+
+ for (auto participant: participants_)
+ participant->deliver(msg);
+ }
+
+private:
+ std::set<chat_participant_ptr> participants_;
+ enum { max_recent_msgs = 100 };
+ std::deque<std::string> recent_msgs_;
+};
+
+//----------------------------------------------------------------------
+
+class chat_session
+ : public chat_participant,
+ public std::enable_shared_from_this<chat_session>
+{
+public:
+ chat_session(tcp::socket socket, chat_room& room)
+ : socket_(std::move(socket)),
+ timer_(socket_.get_executor()),
+ room_(room)
+ {
+ timer_.expires_at(std::chrono::steady_clock::time_point::max());
+ }
+
+ void start()
+ {
+ room_.join(shared_from_this());
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->reader(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->writer(); },
+ detached);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ write_msgs_.push_back(msg);
+ timer_.cancel_one();
+ }
+
+private:
+ awaitable<void> reader()
+ {
+ try
+ {
+ for (std::string read_msg;;)
+ {
+ std::size_t n = co_await asio::async_read_until(socket_,
+ asio::dynamic_buffer(read_msg, 1024), "\n", use_awaitable);
+
+ room_.deliver(read_msg.substr(0, n));
+ read_msg.erase(0, n);
+ }
+ }
+ catch (std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> writer()
+ {
+ try
+ {
+ while (socket_.is_open())
+ {
+ if (write_msgs_.empty())
+ {
+ asio::error_code ec;
+ co_await timer_.async_wait(redirect_error(use_awaitable, ec));
+ }
+ else
+ {
+ co_await asio::async_write(socket_,
+ asio::buffer(write_msgs_.front()), use_awaitable);
+ write_msgs_.pop_front();
+ }
+ }
+ }
+ catch (std::exception&)
+ {
+ stop();
+ }
+ }
+
+ void stop()
+ {
+ room_.leave(shared_from_this());
+ socket_.close();
+ timer_.cancel();
+ }
+
+ tcp::socket socket_;
+ asio::steady_timer timer_;
+ chat_room& room_;
+ std::deque<std::string> write_msgs_;
+};
+
+//----------------------------------------------------------------------
+
+awaitable<void> listener(tcp::acceptor acceptor)
+{
+ chat_room room;
+
+ for (;;)
+ {
+ std::make_shared<chat_session>(
+ co_await acceptor.async_accept(use_awaitable),
+ room
+ )->start();
+ }
+}
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc < 2)
+ {
+ std::cerr << "Usage: chat_server <port> [<port> ...]\n";
+ return 1;
+ }
+
+ asio::io_context io_context(1);
+
+ for (int i = 1; i < argc; ++i)
+ {
+ unsigned short port = std::atoi(argv[i]);
+ co_spawn(io_context,
+ listener(tcp::acceptor(io_context, {tcp::v4(), port})),
+ detached);
+ }
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp
new file mode 100644
index 00000000000..a9532459f77
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp
@@ -0,0 +1,76 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# define use_awaitable \
+ asio::use_awaitable_t(__FILE__, __LINE__, __PRETTY_FUNCTION__)
+#endif
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), use_awaitable);
+ co_await async_write(socket, asio::buffer(data, n), use_awaitable);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(use_awaitable);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
new file mode 100644
index 00000000000..4a692acc872
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
@@ -0,0 +1,71 @@
+//
+// echo_server_with_as_single_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/experimental/as_single.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::experimental::as_single_t;
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using default_token = as_single_t<use_awaitable_t<>>;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ char data[1024];
+ for (;;)
+ {
+ auto [e1, nread] = co_await socket.async_read_some(asio::buffer(data));
+ if (nread == 0) break;
+ auto [e2, nwritten] = co_await async_write(socket, asio::buffer(data, nread));
+ if (nwritten != nread) break;
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ if (auto [e, socket] = co_await acceptor.async_accept(); socket.is_open())
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp
new file mode 100644
index 00000000000..de162cad78e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp
@@ -0,0 +1,71 @@
+//
+// echo_server_with_as_tuple_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/as_tuple.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::as_tuple_t;
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using default_token = as_tuple_t<use_awaitable_t<>>;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ char data[1024];
+ for (;;)
+ {
+ auto [e1, nread] = co_await socket.async_read_some(asio::buffer(data));
+ if (nread == 0) break;
+ auto [e2, nwritten] = co_await async_write(socket, asio::buffer(data, nread));
+ if (nwritten != nread) break;
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ if (auto [e, socket] = co_await acceptor.async_accept(); socket.is_open())
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp
new file mode 100644
index 00000000000..54344d94d56
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp
@@ -0,0 +1,73 @@
+//
+// echo_server_with_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using tcp_acceptor = use_awaitable_t<>::as_default_on_t<tcp::acceptor>;
+using tcp_socket = use_awaitable_t<>::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data));
+ co_await async_write(socket, asio::buffer(data, n));
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ auto socket = co_await acceptor.async_accept();
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp
new file mode 100644
index 00000000000..599ed80cd3f
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp
@@ -0,0 +1,102 @@
+//
+// range_based_for.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+
+class connection_iter
+{
+ friend class connections;
+ tcp::acceptor* acceptor_ = nullptr;
+ tcp::socket socket_;
+
+ connection_iter(tcp::acceptor& a, tcp::socket s)
+ : acceptor_(&a), socket_(std::move(s)) {}
+
+public:
+ tcp::socket operator*()
+ {
+ return std::move(socket_);
+ }
+
+ awaitable<void> operator++()
+ {
+ socket_ = co_await acceptor_->async_accept(use_awaitable);
+ }
+
+ bool operator==(const connection_iter&) const noexcept
+ {
+ return false;
+ }
+
+ bool operator!=(const connection_iter&) const noexcept
+ {
+ return true;
+ }
+};
+
+class connections
+{
+ tcp::acceptor& acceptor_;
+
+public:
+ explicit connections(tcp::acceptor& a) : acceptor_(a) {}
+
+ awaitable<connection_iter> begin()
+ {
+ tcp::socket s = co_await acceptor_.async_accept(use_awaitable);
+ co_return connection_iter(acceptor_, std::move(s));
+ }
+
+ connection_iter end()
+ {
+ return connection_iter(acceptor_,
+ tcp::socket(acceptor_.get_executor()));
+ }
+};
+
+awaitable<void> listener(tcp::acceptor acceptor)
+{
+ for co_await (tcp::socket s : connections(acceptor))
+ {
+ co_await asio::async_write(s, asio::buffer("hello\r\n", 7), use_awaitable);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ co_spawn(io_context, listener(std::move(acceptor)), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp
new file mode 100644
index 00000000000..dc7b03d86e2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp
@@ -0,0 +1,80 @@
+//
+// refactored_echo_server.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo_once(tcp::socket& socket)
+{
+ char data[128];
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), use_awaitable);
+ co_await async_write(socket, asio::buffer(data, n), use_awaitable);
+}
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ for (;;)
+ {
+ // The asynchronous operations to echo a single chunk of data have been
+ // refactored into a separate function. When this function is called, the
+ // operations are still performed in the context of the current
+ // coroutine, and the behaviour is functionally equivalent.
+ co_await echo_once(socket);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(use_awaitable);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/Makefile.am b/3rdparty/asio/src/examples/cpp20/Makefile.am
new file mode 100644
index 00000000000..619893c208e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/Makefile.am
@@ -0,0 +1,79 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
+if SEPARATE_COMPILATION
+noinst_LIBRARIES = libasio.a
+libasio_a_SOURCES = ../../asio.cpp
+if HAVE_OPENSSL
+libasio_a_SOURCES += ../../asio_ssl.cpp
+endif
+LDADD = libasio.a
+endif
+
+noinst_PROGRAMS = \
+ invocation/completion_executor \
+ operations/c_callback_wrapper \
+ operations/callback_wrapper \
+ operations/composed_1 \
+ operations/composed_1 \
+ operations/composed_2 \
+ operations/composed_3 \
+ operations/composed_4 \
+ operations/composed_5 \
+ operations/composed_6 \
+ operations/composed_7 \
+ operations/composed_8
+
+if HAVE_COROUTINES
+noinst_PROGRAMS += \
+ channels/mutual_exclusion_1 \
+ channels/mutual_exclusion_2 \
+ channels/throttling_proxy \
+ coroutines/chat_server \
+ coroutines/echo_server \
+ coroutines/echo_server_with_default \
+ coroutines/echo_server_with_deferred \
+ coroutines/echo_server_with_deferred_default \
+ coroutines/echo_server_with_as_single_default \
+ coroutines/echo_server_with_as_tuple_default \
+ coroutines/refactored_echo_server \
+ coroutines/timeout \
+ type_erasure/type_erasure
+endif
+
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+
+invocation_completion_executor_SOURCES = invocation/completion_executor.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+
+if HAVE_COROUTINES
+channels_mutual_exclusion_1_SOURCES = channels/mutual_exclusion_1.cpp
+channels_mutual_exclusion_2_SOURCES = channels/mutual_exclusion_2.cpp
+channels_throttling_proxy_SOURCES = channels/throttling_proxy.cpp
+coroutines_chat_server_SOURCES = coroutines/chat_server.cpp
+coroutines_echo_server_SOURCES = coroutines/echo_server.cpp
+coroutines_echo_server_with_default_SOURCES = coroutines/echo_server_with_default.cpp
+coroutines_echo_server_with_deferred_SOURCES = coroutines/echo_server_with_deferred.cpp
+coroutines_echo_server_with_deferred_default_SOURCES = coroutines/echo_server_with_deferred_default.cpp
+coroutines_echo_server_with_as_single_default_SOURCES = coroutines/echo_server_with_as_single_default.cpp
+coroutines_echo_server_with_as_tuple_default_SOURCES = coroutines/echo_server_with_as_tuple_default.cpp
+coroutines_refactored_echo_server_SOURCES = coroutines/refactored_echo_server.cpp
+coroutines_timeout_SOURCES = coroutines/timeout.cpp
+type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+endif
+
+EXTRA_DIST = \
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp20/Makefile.in b/3rdparty/asio/src/examples/cpp20/Makefile.in
new file mode 100644
index 00000000000..87311465ece
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/Makefile.in
@@ -0,0 +1,1173 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
+noinst_PROGRAMS = invocation/completion_executor$(EXEEXT) \
+ operations/c_callback_wrapper$(EXEEXT) \
+ operations/callback_wrapper$(EXEEXT) \
+ operations/composed_1$(EXEEXT) operations/composed_1$(EXEEXT) \
+ operations/composed_2$(EXEEXT) operations/composed_3$(EXEEXT) \
+ operations/composed_4$(EXEEXT) operations/composed_5$(EXEEXT) \
+ operations/composed_6$(EXEEXT) operations/composed_7$(EXEEXT) \
+ operations/composed_8$(EXEEXT) $(am__EXEEXT_1)
+@HAVE_COROUTINES_TRUE@am__append_2 = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_1 \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_2 \
+@HAVE_COROUTINES_TRUE@ channels/throttling_proxy \
+@HAVE_COROUTINES_TRUE@ coroutines/chat_server \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_default \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred_default \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_single_default \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_tuple_default \
+@HAVE_COROUTINES_TRUE@ coroutines/refactored_echo_server \
+@HAVE_COROUTINES_TRUE@ coroutines/timeout \
+@HAVE_COROUTINES_TRUE@ type_erasure/type_erasure
+
+subdir = src/examples/cpp20
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_COROUTINES_TRUE@am__EXEEXT_1 = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_1$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_2$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ channels/throttling_proxy$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/chat_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_single_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_tuple_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/refactored_echo_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/timeout$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ type_erasure/type_erasure$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libasio_a_AR = $(AR) $(ARFLAGS)
+libasio_a_LIBADD =
+am__libasio_a_SOURCES_DIST = ../../asio.cpp ../../asio_ssl.cpp
+am__dirstamp = $(am__leading_dot)dirstamp
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../../asio_ssl.$(OBJEXT)
+@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = \
+@SEPARATE_COMPILATION_TRUE@ ../../asio.$(OBJEXT) \
+@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
+libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
+am__channels_mutual_exclusion_1_SOURCES_DIST = \
+ channels/mutual_exclusion_1.cpp
+@HAVE_COROUTINES_TRUE@am_channels_mutual_exclusion_1_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_1.$(OBJEXT)
+channels_mutual_exclusion_1_OBJECTS = \
+ $(am_channels_mutual_exclusion_1_OBJECTS)
+channels_mutual_exclusion_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@channels_mutual_exclusion_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__channels_mutual_exclusion_2_SOURCES_DIST = \
+ channels/mutual_exclusion_2.cpp
+@HAVE_COROUTINES_TRUE@am_channels_mutual_exclusion_2_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_2.$(OBJEXT)
+channels_mutual_exclusion_2_OBJECTS = \
+ $(am_channels_mutual_exclusion_2_OBJECTS)
+channels_mutual_exclusion_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@channels_mutual_exclusion_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__channels_throttling_proxy_SOURCES_DIST = \
+ channels/throttling_proxy.cpp
+@HAVE_COROUTINES_TRUE@am_channels_throttling_proxy_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ channels/throttling_proxy.$(OBJEXT)
+channels_throttling_proxy_OBJECTS = \
+ $(am_channels_throttling_proxy_OBJECTS)
+channels_throttling_proxy_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@channels_throttling_proxy_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_chat_server_SOURCES_DIST = coroutines/chat_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_chat_server_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines/chat_server.$(OBJEXT)
+coroutines_chat_server_OBJECTS = $(am_coroutines_chat_server_OBJECTS)
+coroutines_chat_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_chat_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_SOURCES_DIST = coroutines/echo_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server.$(OBJEXT)
+coroutines_echo_server_OBJECTS = $(am_coroutines_echo_server_OBJECTS)
+coroutines_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_as_single_default_SOURCES_DIST = \
+ coroutines/echo_server_with_as_single_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_as_single_default_OBJECTS = coroutines/echo_server_with_as_single_default.$(OBJEXT)
+coroutines_echo_server_with_as_single_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_as_single_default_OBJECTS)
+coroutines_echo_server_with_as_single_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_as_single_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_as_tuple_default_SOURCES_DIST = \
+ coroutines/echo_server_with_as_tuple_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_as_tuple_default_OBJECTS = coroutines/echo_server_with_as_tuple_default.$(OBJEXT)
+coroutines_echo_server_with_as_tuple_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_as_tuple_default_OBJECTS)
+coroutines_echo_server_with_as_tuple_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_as_tuple_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_default_SOURCES_DIST = \
+ coroutines/echo_server_with_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_default_OBJECTS = coroutines/echo_server_with_default.$(OBJEXT)
+coroutines_echo_server_with_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_default_OBJECTS)
+coroutines_echo_server_with_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_deferred_SOURCES_DIST = \
+ coroutines/echo_server_with_deferred.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_deferred_OBJECTS = coroutines/echo_server_with_deferred.$(OBJEXT)
+coroutines_echo_server_with_deferred_OBJECTS = \
+ $(am_coroutines_echo_server_with_deferred_OBJECTS)
+coroutines_echo_server_with_deferred_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_deferred_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_deferred_default_SOURCES_DIST = \
+ coroutines/echo_server_with_deferred_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_deferred_default_OBJECTS = coroutines/echo_server_with_deferred_default.$(OBJEXT)
+coroutines_echo_server_with_deferred_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_deferred_default_OBJECTS)
+coroutines_echo_server_with_deferred_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_deferred_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_refactored_echo_server_SOURCES_DIST = \
+ coroutines/refactored_echo_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_refactored_echo_server_OBJECTS = coroutines/refactored_echo_server.$(OBJEXT)
+coroutines_refactored_echo_server_OBJECTS = \
+ $(am_coroutines_refactored_echo_server_OBJECTS)
+coroutines_refactored_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_refactored_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_timeout_SOURCES_DIST = coroutines/timeout.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_timeout_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines/timeout.$(OBJEXT)
+coroutines_timeout_OBJECTS = $(am_coroutines_timeout_OBJECTS)
+coroutines_timeout_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_timeout_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_invocation_completion_executor_OBJECTS = \
+ invocation/completion_executor.$(OBJEXT)
+invocation_completion_executor_OBJECTS = \
+ $(am_invocation_completion_executor_OBJECTS)
+invocation_completion_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@invocation_completion_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_c_callback_wrapper_OBJECTS = \
+ operations/c_callback_wrapper.$(OBJEXT)
+operations_c_callback_wrapper_OBJECTS = \
+ $(am_operations_c_callback_wrapper_OBJECTS)
+operations_c_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_c_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_callback_wrapper_OBJECTS = \
+ operations/callback_wrapper.$(OBJEXT)
+operations_callback_wrapper_OBJECTS = \
+ $(am_operations_callback_wrapper_OBJECTS)
+operations_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_1_OBJECTS = operations/composed_1.$(OBJEXT)
+operations_composed_1_OBJECTS = $(am_operations_composed_1_OBJECTS)
+operations_composed_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_2_OBJECTS = operations/composed_2.$(OBJEXT)
+operations_composed_2_OBJECTS = $(am_operations_composed_2_OBJECTS)
+operations_composed_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_3_OBJECTS = operations/composed_3.$(OBJEXT)
+operations_composed_3_OBJECTS = $(am_operations_composed_3_OBJECTS)
+operations_composed_3_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_3_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_4_OBJECTS = operations/composed_4.$(OBJEXT)
+operations_composed_4_OBJECTS = $(am_operations_composed_4_OBJECTS)
+operations_composed_4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_5_OBJECTS = operations/composed_5.$(OBJEXT)
+operations_composed_5_OBJECTS = $(am_operations_composed_5_OBJECTS)
+operations_composed_5_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_5_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_6_OBJECTS = operations/composed_6.$(OBJEXT)
+operations_composed_6_OBJECTS = $(am_operations_composed_6_OBJECTS)
+operations_composed_6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_7_OBJECTS = operations/composed_7.$(OBJEXT)
+operations_composed_7_OBJECTS = $(am_operations_composed_7_OBJECTS)
+operations_composed_7_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_7_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_8_OBJECTS = operations/composed_8.$(OBJEXT)
+operations_composed_8_OBJECTS = $(am_operations_composed_8_OBJECTS)
+operations_composed_8_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_8_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__type_erasure_type_erasure_SOURCES_DIST = type_erasure/main.cpp \
+ type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+@HAVE_COROUTINES_TRUE@am_type_erasure_type_erasure_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ type_erasure/main.$(OBJEXT) \
+@HAVE_COROUTINES_TRUE@ type_erasure/stdin_line_reader.$(OBJEXT) \
+@HAVE_COROUTINES_TRUE@ type_erasure/sleep.$(OBJEXT)
+type_erasure_type_erasure_OBJECTS = \
+ $(am_type_erasure_type_erasure_OBJECTS)
+type_erasure_type_erasure_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@type_erasure_type_erasure_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
+ ../../$(DEPDIR)/asio_ssl.Po \
+ channels/$(DEPDIR)/mutual_exclusion_1.Po \
+ channels/$(DEPDIR)/mutual_exclusion_2.Po \
+ channels/$(DEPDIR)/throttling_proxy.Po \
+ coroutines/$(DEPDIR)/chat_server.Po \
+ coroutines/$(DEPDIR)/echo_server.Po \
+ coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po \
+ coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po \
+ coroutines/$(DEPDIR)/echo_server_with_default.Po \
+ coroutines/$(DEPDIR)/echo_server_with_deferred.Po \
+ coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po \
+ coroutines/$(DEPDIR)/refactored_echo_server.Po \
+ coroutines/$(DEPDIR)/timeout.Po \
+ invocation/$(DEPDIR)/completion_executor.Po \
+ operations/$(DEPDIR)/c_callback_wrapper.Po \
+ operations/$(DEPDIR)/callback_wrapper.Po \
+ operations/$(DEPDIR)/composed_1.Po \
+ operations/$(DEPDIR)/composed_2.Po \
+ operations/$(DEPDIR)/composed_3.Po \
+ operations/$(DEPDIR)/composed_4.Po \
+ operations/$(DEPDIR)/composed_5.Po \
+ operations/$(DEPDIR)/composed_6.Po \
+ operations/$(DEPDIR)/composed_7.Po \
+ operations/$(DEPDIR)/composed_8.Po \
+ type_erasure/$(DEPDIR)/main.Po type_erasure/$(DEPDIR)/sleep.Po \
+ type_erasure/$(DEPDIR)/stdin_line_reader.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libasio_a_SOURCES) $(channels_mutual_exclusion_1_SOURCES) \
+ $(channels_mutual_exclusion_2_SOURCES) \
+ $(channels_throttling_proxy_SOURCES) \
+ $(coroutines_chat_server_SOURCES) \
+ $(coroutines_echo_server_SOURCES) \
+ $(coroutines_echo_server_with_as_single_default_SOURCES) \
+ $(coroutines_echo_server_with_as_tuple_default_SOURCES) \
+ $(coroutines_echo_server_with_default_SOURCES) \
+ $(coroutines_echo_server_with_deferred_SOURCES) \
+ $(coroutines_echo_server_with_deferred_default_SOURCES) \
+ $(coroutines_refactored_echo_server_SOURCES) \
+ $(coroutines_timeout_SOURCES) \
+ $(invocation_completion_executor_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(type_erasure_type_erasure_SOURCES)
+DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
+ $(am__channels_mutual_exclusion_1_SOURCES_DIST) \
+ $(am__channels_mutual_exclusion_2_SOURCES_DIST) \
+ $(am__channels_throttling_proxy_SOURCES_DIST) \
+ $(am__coroutines_chat_server_SOURCES_DIST) \
+ $(am__coroutines_echo_server_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_as_single_default_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_as_tuple_default_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_default_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_deferred_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_deferred_default_SOURCES_DIST) \
+ $(am__coroutines_refactored_echo_server_SOURCES_DIST) \
+ $(am__coroutines_timeout_SOURCES_DIST) \
+ $(invocation_completion_executor_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(am__type_erasure_type_erasure_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
+@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../../asio.cpp \
+@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
+@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+invocation_completion_executor_SOURCES = invocation/completion_executor.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+@HAVE_COROUTINES_TRUE@channels_mutual_exclusion_1_SOURCES = channels/mutual_exclusion_1.cpp
+@HAVE_COROUTINES_TRUE@channels_mutual_exclusion_2_SOURCES = channels/mutual_exclusion_2.cpp
+@HAVE_COROUTINES_TRUE@channels_throttling_proxy_SOURCES = channels/throttling_proxy.cpp
+@HAVE_COROUTINES_TRUE@coroutines_chat_server_SOURCES = coroutines/chat_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_SOURCES = coroutines/echo_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_default_SOURCES = coroutines/echo_server_with_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_deferred_SOURCES = coroutines/echo_server_with_deferred.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_deferred_default_SOURCES = coroutines/echo_server_with_deferred_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_as_single_default_SOURCES = coroutines/echo_server_with_as_single_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_as_tuple_default_SOURCES = coroutines/echo_server_with_as_tuple_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_refactored_echo_server_SOURCES = coroutines/refactored_echo_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_timeout_SOURCES = coroutines/timeout.cpp
+@HAVE_COROUTINES_TRUE@type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+EXTRA_DIST = \
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/cpp20/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/examples/cpp20/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../../$(am__dirstamp):
+ @$(MKDIR_P) ../..
+ @: > ../../$(am__dirstamp)
+../../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../../$(DEPDIR)
+ @: > ../../$(DEPDIR)/$(am__dirstamp)
+../../asio.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+../../asio_ssl.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+
+libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libasio.a
+ $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libasio.a
+channels/$(am__dirstamp):
+ @$(MKDIR_P) channels
+ @: > channels/$(am__dirstamp)
+channels/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) channels/$(DEPDIR)
+ @: > channels/$(DEPDIR)/$(am__dirstamp)
+channels/mutual_exclusion_1.$(OBJEXT): channels/$(am__dirstamp) \
+ channels/$(DEPDIR)/$(am__dirstamp)
+
+channels/mutual_exclusion_1$(EXEEXT): $(channels_mutual_exclusion_1_OBJECTS) $(channels_mutual_exclusion_1_DEPENDENCIES) $(EXTRA_channels_mutual_exclusion_1_DEPENDENCIES) channels/$(am__dirstamp)
+ @rm -f channels/mutual_exclusion_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(channels_mutual_exclusion_1_OBJECTS) $(channels_mutual_exclusion_1_LDADD) $(LIBS)
+channels/mutual_exclusion_2.$(OBJEXT): channels/$(am__dirstamp) \
+ channels/$(DEPDIR)/$(am__dirstamp)
+
+channels/mutual_exclusion_2$(EXEEXT): $(channels_mutual_exclusion_2_OBJECTS) $(channels_mutual_exclusion_2_DEPENDENCIES) $(EXTRA_channels_mutual_exclusion_2_DEPENDENCIES) channels/$(am__dirstamp)
+ @rm -f channels/mutual_exclusion_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(channels_mutual_exclusion_2_OBJECTS) $(channels_mutual_exclusion_2_LDADD) $(LIBS)
+channels/throttling_proxy.$(OBJEXT): channels/$(am__dirstamp) \
+ channels/$(DEPDIR)/$(am__dirstamp)
+
+channels/throttling_proxy$(EXEEXT): $(channels_throttling_proxy_OBJECTS) $(channels_throttling_proxy_DEPENDENCIES) $(EXTRA_channels_throttling_proxy_DEPENDENCIES) channels/$(am__dirstamp)
+ @rm -f channels/throttling_proxy$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(channels_throttling_proxy_OBJECTS) $(channels_throttling_proxy_LDADD) $(LIBS)
+coroutines/$(am__dirstamp):
+ @$(MKDIR_P) coroutines
+ @: > coroutines/$(am__dirstamp)
+coroutines/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) coroutines/$(DEPDIR)
+ @: > coroutines/$(DEPDIR)/$(am__dirstamp)
+coroutines/chat_server.$(OBJEXT): coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/chat_server$(EXEEXT): $(coroutines_chat_server_OBJECTS) $(coroutines_chat_server_DEPENDENCIES) $(EXTRA_coroutines_chat_server_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/chat_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_chat_server_OBJECTS) $(coroutines_chat_server_LDADD) $(LIBS)
+coroutines/echo_server.$(OBJEXT): coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server$(EXEEXT): $(coroutines_echo_server_OBJECTS) $(coroutines_echo_server_DEPENDENCIES) $(EXTRA_coroutines_echo_server_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_OBJECTS) $(coroutines_echo_server_LDADD) $(LIBS)
+coroutines/echo_server_with_as_single_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_as_single_default$(EXEEXT): $(coroutines_echo_server_with_as_single_default_OBJECTS) $(coroutines_echo_server_with_as_single_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_as_single_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_as_single_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_as_single_default_OBJECTS) $(coroutines_echo_server_with_as_single_default_LDADD) $(LIBS)
+coroutines/echo_server_with_as_tuple_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_as_tuple_default$(EXEEXT): $(coroutines_echo_server_with_as_tuple_default_OBJECTS) $(coroutines_echo_server_with_as_tuple_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_as_tuple_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_as_tuple_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_as_tuple_default_OBJECTS) $(coroutines_echo_server_with_as_tuple_default_LDADD) $(LIBS)
+coroutines/echo_server_with_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_default$(EXEEXT): $(coroutines_echo_server_with_default_OBJECTS) $(coroutines_echo_server_with_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_default_OBJECTS) $(coroutines_echo_server_with_default_LDADD) $(LIBS)
+coroutines/echo_server_with_deferred.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_deferred$(EXEEXT): $(coroutines_echo_server_with_deferred_OBJECTS) $(coroutines_echo_server_with_deferred_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_deferred_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_deferred$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_deferred_OBJECTS) $(coroutines_echo_server_with_deferred_LDADD) $(LIBS)
+coroutines/echo_server_with_deferred_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_deferred_default$(EXEEXT): $(coroutines_echo_server_with_deferred_default_OBJECTS) $(coroutines_echo_server_with_deferred_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_deferred_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_deferred_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_deferred_default_OBJECTS) $(coroutines_echo_server_with_deferred_default_LDADD) $(LIBS)
+coroutines/refactored_echo_server.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/refactored_echo_server$(EXEEXT): $(coroutines_refactored_echo_server_OBJECTS) $(coroutines_refactored_echo_server_DEPENDENCIES) $(EXTRA_coroutines_refactored_echo_server_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/refactored_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_refactored_echo_server_OBJECTS) $(coroutines_refactored_echo_server_LDADD) $(LIBS)
+coroutines/timeout.$(OBJEXT): coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/timeout$(EXEEXT): $(coroutines_timeout_OBJECTS) $(coroutines_timeout_DEPENDENCIES) $(EXTRA_coroutines_timeout_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/timeout$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_timeout_OBJECTS) $(coroutines_timeout_LDADD) $(LIBS)
+invocation/$(am__dirstamp):
+ @$(MKDIR_P) invocation
+ @: > invocation/$(am__dirstamp)
+invocation/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) invocation/$(DEPDIR)
+ @: > invocation/$(DEPDIR)/$(am__dirstamp)
+invocation/completion_executor.$(OBJEXT): invocation/$(am__dirstamp) \
+ invocation/$(DEPDIR)/$(am__dirstamp)
+
+invocation/completion_executor$(EXEEXT): $(invocation_completion_executor_OBJECTS) $(invocation_completion_executor_DEPENDENCIES) $(EXTRA_invocation_completion_executor_DEPENDENCIES) invocation/$(am__dirstamp)
+ @rm -f invocation/completion_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(invocation_completion_executor_OBJECTS) $(invocation_completion_executor_LDADD) $(LIBS)
+operations/$(am__dirstamp):
+ @$(MKDIR_P) operations
+ @: > operations/$(am__dirstamp)
+operations/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) operations/$(DEPDIR)
+ @: > operations/$(DEPDIR)/$(am__dirstamp)
+operations/c_callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/c_callback_wrapper$(EXEEXT): $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_c_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/c_callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_LDADD) $(LIBS)
+operations/callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/callback_wrapper$(EXEEXT): $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_LDADD) $(LIBS)
+operations/composed_1.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_1$(EXEEXT): $(operations_composed_1_OBJECTS) $(operations_composed_1_DEPENDENCIES) $(EXTRA_operations_composed_1_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_1_OBJECTS) $(operations_composed_1_LDADD) $(LIBS)
+operations/composed_2.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_2$(EXEEXT): $(operations_composed_2_OBJECTS) $(operations_composed_2_DEPENDENCIES) $(EXTRA_operations_composed_2_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_2_OBJECTS) $(operations_composed_2_LDADD) $(LIBS)
+operations/composed_3.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_3$(EXEEXT): $(operations_composed_3_OBJECTS) $(operations_composed_3_DEPENDENCIES) $(EXTRA_operations_composed_3_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_3$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_3_OBJECTS) $(operations_composed_3_LDADD) $(LIBS)
+operations/composed_4.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_4$(EXEEXT): $(operations_composed_4_OBJECTS) $(operations_composed_4_DEPENDENCIES) $(EXTRA_operations_composed_4_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_4_OBJECTS) $(operations_composed_4_LDADD) $(LIBS)
+operations/composed_5.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_5$(EXEEXT): $(operations_composed_5_OBJECTS) $(operations_composed_5_DEPENDENCIES) $(EXTRA_operations_composed_5_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_5$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_5_OBJECTS) $(operations_composed_5_LDADD) $(LIBS)
+operations/composed_6.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_6$(EXEEXT): $(operations_composed_6_OBJECTS) $(operations_composed_6_DEPENDENCIES) $(EXTRA_operations_composed_6_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_6_OBJECTS) $(operations_composed_6_LDADD) $(LIBS)
+operations/composed_7.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_7$(EXEEXT): $(operations_composed_7_OBJECTS) $(operations_composed_7_DEPENDENCIES) $(EXTRA_operations_composed_7_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_7$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_7_OBJECTS) $(operations_composed_7_LDADD) $(LIBS)
+operations/composed_8.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_8$(EXEEXT): $(operations_composed_8_OBJECTS) $(operations_composed_8_DEPENDENCIES) $(EXTRA_operations_composed_8_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_8$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_8_OBJECTS) $(operations_composed_8_LDADD) $(LIBS)
+type_erasure/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure
+ @: > type_erasure/$(am__dirstamp)
+type_erasure/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure/$(DEPDIR)
+ @: > type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/main.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/stdin_line_reader.$(OBJEXT): \
+ type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/sleep.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+
+type_erasure/type_erasure$(EXEEXT): $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_DEPENDENCIES) $(EXTRA_type_erasure_type_erasure_DEPENDENCIES) type_erasure/$(am__dirstamp)
+ @rm -f type_erasure/type_erasure$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ../../*.$(OBJEXT)
+ -rm -f channels/*.$(OBJEXT)
+ -rm -f coroutines/*.$(OBJEXT)
+ -rm -f invocation/*.$(OBJEXT)
+ -rm -f operations/*.$(OBJEXT)
+ -rm -f type_erasure/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@channels/$(DEPDIR)/mutual_exclusion_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@channels/$(DEPDIR)/mutual_exclusion_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@channels/$(DEPDIR)/throttling_proxy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/chat_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_deferred.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/refactored_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/timeout.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@invocation/$(DEPDIR)/completion_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/c_callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_7.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_8.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/stdin_line_reader.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../../$(am__dirstamp)
+ -rm -f channels/$(DEPDIR)/$(am__dirstamp)
+ -rm -f channels/$(am__dirstamp)
+ -rm -f coroutines/$(DEPDIR)/$(am__dirstamp)
+ -rm -f coroutines/$(am__dirstamp)
+ -rm -f invocation/$(DEPDIR)/$(am__dirstamp)
+ -rm -f invocation/$(am__dirstamp)
+ -rm -f operations/$(DEPDIR)/$(am__dirstamp)
+ -rm -f operations/$(am__dirstamp)
+ -rm -f type_erasure/$(DEPDIR)/$(am__dirstamp)
+ -rm -f type_erasure/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_1.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_2.Po
+ -rm -f channels/$(DEPDIR)/throttling_proxy.Po
+ -rm -f coroutines/$(DEPDIR)/chat_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po
+ -rm -f coroutines/$(DEPDIR)/refactored_echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/timeout.Po
+ -rm -f invocation/$(DEPDIR)/completion_executor.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_1.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_2.Po
+ -rm -f channels/$(DEPDIR)/throttling_proxy.Po
+ -rm -f coroutines/$(DEPDIR)/chat_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po
+ -rm -f coroutines/$(DEPDIR)/refactored_echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/timeout.Po
+ -rm -f invocation/$(DEPDIR)/completion_executor.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp
new file mode 100644
index 00000000000..79654f1e8f1
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp
@@ -0,0 +1,182 @@
+//
+// mutual_exclusion_1.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/channel.hpp>
+#include <iostream>
+#include <memory>
+
+using asio::as_tuple;
+using asio::awaitable;
+using asio::dynamic_buffer;
+using asio::co_spawn;
+using asio::deferred;
+using asio::detached;
+using asio::experimental::channel;
+using asio::io_context;
+using asio::ip::tcp;
+using asio::steady_timer;
+using namespace asio::buffer_literals;
+using namespace std::literals::chrono_literals;
+
+// This class implements a simple line-based protocol:
+//
+// * For event line that is received from the client, the session sends a
+// message header followed by the content of the line as the message body.
+//
+// * The session generates heartbeat messages once a second.
+//
+// This protocol is implemented using two actors, handle_messages() and
+// send_heartbeats(), each written as a coroutine.
+class line_based_echo_session :
+ public std::enable_shared_from_this<line_based_echo_session>
+{
+ // The socket used to read from and write to the client. This socket is a
+ // data member as it is shared between the two actors.
+ tcp::socket socket_;
+
+ // As both of the actors will write to the socket, we need a lock to prevent
+ // these writes from overlapping. To achieve this, we use a channel with a
+ // buffer size of one. The lock is claimed by sending a message to the
+ // channel, and then released by receiving this message back again. If the
+ // lock is not held then the channel's buffer is empty, and the send will
+ // complete without delay. Otherwise, if the lock is held by the other actor,
+ // then the send operation will not complete until the lock is released.
+ channel<void()> write_lock_{socket_.get_executor(), 1};
+
+public:
+ line_based_echo_session(tcp::socket socket)
+ : socket_{std::move(socket)}
+ {
+ socket_.set_option(tcp::no_delay(true));
+ }
+
+ void start()
+ {
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->handle_messages(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->send_heartbeats(); },
+ detached);
+ }
+
+private:
+ void stop()
+ {
+ socket_.close();
+ write_lock_.cancel();
+ }
+
+ awaitable<void> handle_messages()
+ {
+ try
+ {
+ constexpr std::size_t max_line_length = 1024;
+ std::string data;
+ for (;;)
+ {
+ // Read an entire line from the client.
+ std::size_t length = co_await async_read_until(socket_,
+ dynamic_buffer(data, max_line_length), '\n', deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself.
+ co_await write_lock_.async_send(deferred);
+
+ // Respond to the client with a message, echoing the line they sent.
+ co_await async_write(socket_, "<line>"_buf, deferred);
+ co_await async_write(socket_, dynamic_buffer(data, length), deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> send_heartbeats()
+ {
+ steady_timer timer{socket_.get_executor()};
+ try
+ {
+ for (;;)
+ {
+ // Wait one second before trying to send the next heartbeat.
+ timer.expires_after(1s);
+ co_await timer.async_wait(deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself.
+ co_await write_lock_.async_send(deferred);
+
+ // Send a heartbeat to the client. As the content of the heartbeat
+ // message never varies, a buffer literal can be used to specify the
+ // bytes of the message. The memory associated with a buffer literal is
+ // valid for the lifetime of the program, which mean that the buffer
+ // can be safely passed as-is to the asynchronous operation.
+ co_await async_write(socket_, "<heartbeat>\n"_buf, deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+};
+
+awaitable<void> listen(tcp::acceptor& acceptor)
+{
+ for (;;)
+ {
+ auto [e, socket] = co_await acceptor.async_accept(as_tuple(deferred));
+ if (!e)
+ {
+ std::make_shared<line_based_echo_session>(std::move(socket))->start();
+ }
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: mutual_exclusion_1";
+ std::cerr << " <listen_address> <listen_port>\n";
+ return 1;
+ }
+
+ io_context ctx;
+
+ auto listen_endpoint =
+ *tcp::resolver(ctx).resolve(argv[1], argv[2],
+ tcp::resolver::passive).begin();
+
+ tcp::acceptor acceptor(ctx, listen_endpoint);
+ co_spawn(ctx, listen(acceptor), detached);
+ ctx.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp
new file mode 100644
index 00000000000..46cfeb647a2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp
@@ -0,0 +1,192 @@
+//
+// mutual_exclusion_2.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/channel.hpp>
+#include <iostream>
+#include <memory>
+
+using asio::as_tuple;
+using asio::awaitable;
+using asio::dynamic_buffer;
+using asio::co_spawn;
+using asio::deferred;
+using asio::detached;
+using asio::experimental::channel;
+using asio::io_context;
+using asio::ip::tcp;
+using asio::steady_timer;
+using namespace asio::buffer_literals;
+using namespace std::literals::chrono_literals;
+
+// This class implements a simple line-based protocol:
+//
+// * For event line that is received from the client, the session sends a
+// message header followed by the content of the line as the message body.
+//
+// * The session generates heartbeat messages once a second.
+//
+// This protocol is implemented using two actors, handle_messages() and
+// send_heartbeats(), each written as a coroutine.
+class line_based_echo_session :
+ public std::enable_shared_from_this<line_based_echo_session>
+{
+ // The socket used to read from and write to the client. This socket is a
+ // data member as it is shared between the two actors.
+ tcp::socket socket_;
+
+ // As both of the actors will write to the socket, we need a lock to prevent
+ // these writes from overlapping. To achieve this, we use a channel with a
+ // buffer size of one. The lock is claimed by sending a message to the
+ // channel, and then released by receiving this message back again. If the
+ // lock is not held then the channel's buffer is empty, and the send will
+ // complete without delay. Otherwise, if the lock is held by the other actor,
+ // then the send operation will not complete until the lock is released.
+ channel<void()> write_lock_{socket_.get_executor(), 1};
+
+public:
+ line_based_echo_session(tcp::socket socket)
+ : socket_{std::move(socket)}
+ {
+ socket_.set_option(tcp::no_delay(true));
+ }
+
+ void start()
+ {
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->handle_messages(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->send_heartbeats(); },
+ detached);
+ }
+
+private:
+ void stop()
+ {
+ socket_.close();
+ write_lock_.cancel();
+ }
+
+ awaitable<void> handle_messages()
+ {
+ try
+ {
+ constexpr std::size_t max_line_length = 1024;
+ std::string data;
+ for (;;)
+ {
+ // Read an entire line from the client.
+ std::size_t length = co_await async_read_until(socket_,
+ dynamic_buffer(data, max_line_length), '\n', deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself. In this example we optimise for the common case,
+ // where the lock is not held by the other actor, by first trying a
+ // non-blocking send.
+ if (!write_lock_.try_send())
+ {
+ co_await write_lock_.async_send(deferred);
+ }
+
+ // Respond to the client with a message, echoing the line they sent.
+ co_await async_write(socket_, "<line>"_buf, deferred);
+ co_await async_write(socket_, dynamic_buffer(data, length), deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> send_heartbeats()
+ {
+ steady_timer timer{socket_.get_executor()};
+ try
+ {
+ for (;;)
+ {
+ // Wait one second before trying to send the next heartbeat.
+ timer.expires_after(1s);
+ co_await timer.async_wait(deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself. In this example we optimise for the common case,
+ // where the lock is not held by the other actor, by first trying a
+ // non-blocking send.
+ if (!write_lock_.try_send())
+ {
+ co_await write_lock_.async_send(deferred);
+ }
+
+ // Send a heartbeat to the client. As the content of the heartbeat
+ // message never varies, a buffer literal can be used to specify the
+ // bytes of the message. The memory associated with a buffer literal is
+ // valid for the lifetime of the program, which mean that the buffer
+ // can be safely passed as-is to the asynchronous operation.
+ co_await async_write(socket_, "<heartbeat>\n"_buf, deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+};
+
+awaitable<void> listen(tcp::acceptor& acceptor)
+{
+ for (;;)
+ {
+ auto [e, socket] = co_await acceptor.async_accept(as_tuple(deferred));
+ if (!e)
+ {
+ std::make_shared<line_based_echo_session>(std::move(socket))->start();
+ }
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: mutual_exclusion_1";
+ std::cerr << " <listen_address> <listen_port>\n";
+ return 1;
+ }
+
+ io_context ctx;
+
+ auto listen_endpoint =
+ *tcp::resolver(ctx).resolve(argv[1], argv[2],
+ tcp::resolver::passive).begin();
+
+ tcp::acceptor acceptor(ctx, listen_endpoint);
+ co_spawn(ctx, listen(acceptor), detached);
+ ctx.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp b/3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp
new file mode 100644
index 00000000000..c54d2986af7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp
@@ -0,0 +1,135 @@
+//
+// throttling_proxy.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/awaitable_operators.hpp>
+#include <asio/experimental/channel.hpp>
+#include <iostream>
+
+using asio::as_tuple;
+using asio::awaitable;
+using asio::buffer;
+using asio::co_spawn;
+using asio::detached;
+using asio::experimental::channel;
+using asio::io_context;
+using asio::ip::tcp;
+using asio::steady_timer;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+using namespace asio::experimental::awaitable_operators;
+using namespace std::literals::chrono_literals;
+
+using token_channel = channel<void(asio::error_code, std::size_t)>;
+
+awaitable<void> produce_tokens(std::size_t bytes_per_token,
+ steady_timer::duration token_interval, token_channel& tokens)
+{
+ steady_timer timer(co_await this_coro::executor);
+ for (;;)
+ {
+ co_await tokens.async_send(
+ asio::error_code{}, bytes_per_token,
+ use_awaitable);
+
+ timer.expires_after(token_interval);
+ co_await timer.async_wait(use_awaitable);
+ }
+}
+
+awaitable<void> transfer(tcp::socket& from,
+ tcp::socket& to, token_channel& tokens)
+{
+ std::array<unsigned char, 4096> data;
+ for (;;)
+ {
+ std::size_t bytes_available = co_await tokens.async_receive(use_awaitable);
+ while (bytes_available > 0)
+ {
+ std::size_t n = co_await from.async_read_some(
+ buffer(data, bytes_available), use_awaitable);
+
+ co_await async_write(to, buffer(data, n), use_awaitable);
+
+ bytes_available -= n;
+ }
+ }
+}
+
+awaitable<void> proxy(tcp::socket client, tcp::endpoint target)
+{
+ constexpr std::size_t number_of_tokens = 100;
+ constexpr size_t bytes_per_token = 20 * 1024;
+ constexpr steady_timer::duration token_interval = 100ms;
+
+ auto ex = client.get_executor();
+ tcp::socket server(ex);
+ token_channel client_tokens(ex, number_of_tokens);
+ token_channel server_tokens(ex, number_of_tokens);
+
+ co_await server.async_connect(target, use_awaitable);
+ co_await (
+ produce_tokens(bytes_per_token, token_interval, client_tokens) &&
+ transfer(client, server, client_tokens) &&
+ produce_tokens(bytes_per_token, token_interval, server_tokens) &&
+ transfer(server, client, server_tokens)
+ );
+}
+
+awaitable<void> listen(tcp::acceptor& acceptor, tcp::endpoint target)
+{
+ for (;;)
+ {
+ auto [e, client] = co_await acceptor.async_accept(as_tuple(use_awaitable));
+ if (!e)
+ {
+ auto ex = client.get_executor();
+ co_spawn(ex, proxy(std::move(client), target), detached);
+ }
+ else
+ {
+ std::cerr << "Accept failed: " << e.message() << "\n";
+ steady_timer timer(co_await this_coro::executor);
+ timer.expires_after(100ms);
+ co_await timer.async_wait(use_awaitable);
+ }
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 5)
+ {
+ std::cerr << "Usage: throttling_proxy";
+ std::cerr << " <listen_address> <listen_port>";
+ std::cerr << " <target_address> <target_port>\n";
+ return 1;
+ }
+
+ io_context ctx;
+
+ auto listen_endpoint =
+ *tcp::resolver(ctx).resolve(argv[1], argv[2],
+ tcp::resolver::passive).begin();
+
+ auto target_endpoint =
+ *tcp::resolver(ctx).resolve(argv[3], argv[4]).begin();
+
+ tcp::acceptor acceptor(ctx, listen_endpoint);
+ co_spawn(ctx, listen(acceptor, target_endpoint), detached);
+ ctx.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp
new file mode 100644
index 00000000000..cd5fba32486
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp
@@ -0,0 +1,222 @@
+//
+// chat_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <cstdlib>
+#include <deque>
+#include <iostream>
+#include <list>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <asio/awaitable.hpp>
+#include <asio/detached.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/read_until.hpp>
+#include <asio/redirect_error.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_awaitable.hpp>
+#include <asio/write.hpp>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::redirect_error;
+using asio::use_awaitable;
+
+//----------------------------------------------------------------------
+
+class chat_participant
+{
+public:
+ virtual ~chat_participant() {}
+ virtual void deliver(const std::string& msg) = 0;
+};
+
+typedef std::shared_ptr<chat_participant> chat_participant_ptr;
+
+//----------------------------------------------------------------------
+
+class chat_room
+{
+public:
+ void join(chat_participant_ptr participant)
+ {
+ participants_.insert(participant);
+ for (auto msg: recent_msgs_)
+ participant->deliver(msg);
+ }
+
+ void leave(chat_participant_ptr participant)
+ {
+ participants_.erase(participant);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ recent_msgs_.push_back(msg);
+ while (recent_msgs_.size() > max_recent_msgs)
+ recent_msgs_.pop_front();
+
+ for (auto participant: participants_)
+ participant->deliver(msg);
+ }
+
+private:
+ std::set<chat_participant_ptr> participants_;
+ enum { max_recent_msgs = 100 };
+ std::deque<std::string> recent_msgs_;
+};
+
+//----------------------------------------------------------------------
+
+class chat_session
+ : public chat_participant,
+ public std::enable_shared_from_this<chat_session>
+{
+public:
+ chat_session(tcp::socket socket, chat_room& room)
+ : socket_(std::move(socket)),
+ timer_(socket_.get_executor()),
+ room_(room)
+ {
+ timer_.expires_at(std::chrono::steady_clock::time_point::max());
+ }
+
+ void start()
+ {
+ room_.join(shared_from_this());
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->reader(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->writer(); },
+ detached);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ write_msgs_.push_back(msg);
+ timer_.cancel_one();
+ }
+
+private:
+ awaitable<void> reader()
+ {
+ try
+ {
+ for (std::string read_msg;;)
+ {
+ std::size_t n = co_await asio::async_read_until(socket_,
+ asio::dynamic_buffer(read_msg, 1024), "\n", use_awaitable);
+
+ room_.deliver(read_msg.substr(0, n));
+ read_msg.erase(0, n);
+ }
+ }
+ catch (std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> writer()
+ {
+ try
+ {
+ while (socket_.is_open())
+ {
+ if (write_msgs_.empty())
+ {
+ asio::error_code ec;
+ co_await timer_.async_wait(redirect_error(use_awaitable, ec));
+ }
+ else
+ {
+ co_await asio::async_write(socket_,
+ asio::buffer(write_msgs_.front()), use_awaitable);
+ write_msgs_.pop_front();
+ }
+ }
+ }
+ catch (std::exception&)
+ {
+ stop();
+ }
+ }
+
+ void stop()
+ {
+ room_.leave(shared_from_this());
+ socket_.close();
+ timer_.cancel();
+ }
+
+ tcp::socket socket_;
+ asio::steady_timer timer_;
+ chat_room& room_;
+ std::deque<std::string> write_msgs_;
+};
+
+//----------------------------------------------------------------------
+
+awaitable<void> listener(tcp::acceptor acceptor)
+{
+ chat_room room;
+
+ for (;;)
+ {
+ std::make_shared<chat_session>(
+ co_await acceptor.async_accept(use_awaitable),
+ room
+ )->start();
+ }
+}
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc < 2)
+ {
+ std::cerr << "Usage: chat_server <port> [<port> ...]\n";
+ return 1;
+ }
+
+ asio::io_context io_context(1);
+
+ for (int i = 1; i < argc; ++i)
+ {
+ unsigned short port = std::atoi(argv[i]);
+ co_spawn(io_context,
+ listener(tcp::acceptor(io_context, {tcp::v4(), port})),
+ detached);
+ }
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp
new file mode 100644
index 00000000000..a9532459f77
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp
@@ -0,0 +1,76 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# define use_awaitable \
+ asio::use_awaitable_t(__FILE__, __LINE__, __PRETTY_FUNCTION__)
+#endif
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), use_awaitable);
+ co_await async_write(socket, asio::buffer(data, n), use_awaitable);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(use_awaitable);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp
new file mode 100644
index 00000000000..4a692acc872
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp
@@ -0,0 +1,71 @@
+//
+// echo_server_with_as_single_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/experimental/as_single.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::experimental::as_single_t;
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using default_token = as_single_t<use_awaitable_t<>>;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ char data[1024];
+ for (;;)
+ {
+ auto [e1, nread] = co_await socket.async_read_some(asio::buffer(data));
+ if (nread == 0) break;
+ auto [e2, nwritten] = co_await async_write(socket, asio::buffer(data, nread));
+ if (nwritten != nread) break;
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ if (auto [e, socket] = co_await acceptor.async_accept(); socket.is_open())
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp
new file mode 100644
index 00000000000..de162cad78e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp
@@ -0,0 +1,71 @@
+//
+// echo_server_with_as_tuple_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/as_tuple.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::as_tuple_t;
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using default_token = as_tuple_t<use_awaitable_t<>>;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ char data[1024];
+ for (;;)
+ {
+ auto [e1, nread] = co_await socket.async_read_some(asio::buffer(data));
+ if (nread == 0) break;
+ auto [e2, nwritten] = co_await async_write(socket, asio::buffer(data, nread));
+ if (nwritten != nread) break;
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ if (auto [e, socket] = co_await acceptor.async_accept(); socket.is_open())
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp
new file mode 100644
index 00000000000..54344d94d56
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp
@@ -0,0 +1,73 @@
+//
+// echo_server_with_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using tcp_acceptor = use_awaitable_t<>::as_default_on_t<tcp::acceptor>;
+using tcp_socket = use_awaitable_t<>::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data));
+ co_await async_write(socket, asio::buffer(data, n));
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ auto socket = co_await acceptor.async_accept();
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp
new file mode 100644
index 00000000000..54469ba7aba
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp
@@ -0,0 +1,72 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/deferred.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::deferred;
+using asio::detached;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), deferred);
+ co_await async_write(socket, asio::buffer(data, n), deferred);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(deferred);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp
new file mode 100644
index 00000000000..33c383311d2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp
@@ -0,0 +1,74 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/deferred.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using default_token = asio::deferred_t;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data));
+ co_await async_write(socket, asio::buffer(data, n));
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept();
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp
new file mode 100644
index 00000000000..dc7b03d86e2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp
@@ -0,0 +1,80 @@
+//
+// refactored_echo_server.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo_once(tcp::socket& socket)
+{
+ char data[128];
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), use_awaitable);
+ co_await async_write(socket, asio::buffer(data, n), use_awaitable);
+}
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ for (;;)
+ {
+ // The asynchronous operations to echo a single chunk of data have been
+ // refactored into a separate function. When this function is called, the
+ // operations are still performed in the context of the current
+ // coroutine, and the behaviour is functionally equivalent.
+ co_await echo_once(socket);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(use_awaitable);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp
new file mode 100644
index 00000000000..2ffcab7ad35
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp
@@ -0,0 +1,66 @@
+//
+// timeout.cpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/awaitable_operators.hpp>
+
+using namespace asio;
+using namespace asio::experimental::awaitable_operators;
+using time_point = std::chrono::steady_clock::time_point;
+using ip::tcp;
+
+awaitable<void> echo(tcp::socket& sock, time_point& deadline)
+{
+ char data[4196];
+ for (;;)
+ {
+ deadline = std::chrono::steady_clock::now() + std::chrono::seconds(10);
+ auto n = co_await sock.async_read_some(buffer(data), use_awaitable);
+ co_await async_write(sock, buffer(data, n), use_awaitable);
+ }
+}
+
+awaitable<void> watchdog(time_point& deadline)
+{
+ steady_timer timer(co_await this_coro::executor);
+ auto now = std::chrono::steady_clock::now();
+ while (deadline > now)
+ {
+ timer.expires_at(deadline);
+ co_await timer.async_wait(use_awaitable);
+ now = std::chrono::steady_clock::now();
+ }
+ throw std::system_error(std::make_error_code(std::errc::timed_out));
+}
+
+awaitable<void> handle_connection(tcp::socket sock)
+{
+ time_point deadline{};
+ co_await (echo(sock, deadline) && watchdog(deadline));
+}
+
+awaitable<void> listen(tcp::acceptor& acceptor)
+{
+ for (;;)
+ {
+ co_spawn(
+ acceptor.get_executor(),
+ handle_connection(co_await acceptor.async_accept(use_awaitable)),
+ detached);
+ }
+}
+
+int main()
+{
+ io_context ctx;
+ tcp::acceptor acceptor(ctx, {tcp::v4(), 54321});
+ co_spawn(ctx, listen(acceptor), detached);
+ ctx.run();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp b/3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp
new file mode 100644
index 00000000000..409be96d0f4
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp
@@ -0,0 +1,83 @@
+//
+// completion_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio.hpp"
+#include <concepts>
+#include <iostream>
+
+using asio::ip::tcp;
+
+//----------------------------------------------------------------------
+
+// The logging_executor class implements a minimal executor that satisfies the
+// requirements for use as a completion executor. This means it may be bound to
+// a handler using bind_executor.
+class logging_executor
+{
+public:
+ // All executors must be no-throw equality comparable.
+ bool operator==(const logging_executor&) const noexcept = default;
+
+ // All executors must provide a const member function execute().
+ void execute(std::invocable auto handler) const
+ {
+ try
+ {
+ std::cout << "handler invocation starting\n";
+ std::move(handler)();
+ std::cout << "handler invocation complete\n";
+ }
+ catch (...)
+ {
+ std::cout << "handler invocation completed with exception\n";
+ throw;
+ }
+ }
+};
+
+// Confirm that a logging_executor satisfies the executor requirements.
+static_assert(asio::execution::executor<logging_executor>);
+
+// Confirm that a logging_executor can be used as a completion executor.
+static_assert(std::convertible_to<
+ logging_executor, asio::any_completion_executor>);
+
+//----------------------------------------------------------------------
+
+int main()
+{
+ asio::io_context io_context(1);
+
+ // Post a completion handler to be run immediately.
+ asio::post(io_context,
+ asio::bind_executor(logging_executor{},
+ []{ std::cout << "post complete\n"; }));
+
+ // Start an asynchronous accept that will complete immediately.
+ tcp::endpoint endpoint(asio::ip::address_v4::loopback(), 0);
+ tcp::acceptor acceptor(io_context, endpoint);
+ tcp::socket server_socket(io_context);
+ acceptor.async_accept(
+ asio::bind_executor(logging_executor{},
+ [](auto...){ std::cout << "async_accept complete\n"; }));
+ tcp::socket client_socket(io_context);
+ client_socket.connect(acceptor.local_endpoint());
+
+ // Set a timer to expire immediately.
+ asio::steady_timer timer(io_context);
+ timer.expires_at(asio::steady_timer::clock_type::time_point::min());
+ timer.async_wait(
+ asio::bind_executor(logging_executor{},
+ [](auto){ std::cout << "async_wait complete\n"; }));
+
+ io_context.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp
new file mode 100644
index 00000000000..f4fbe2617ea
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp
@@ -0,0 +1,232 @@
+//
+// c_callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+#include <memory>
+#include <new>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of a C-based API that uses the function pointer
+// plus void* context idiom for exposing a callback.
+
+void read_input(const char* prompt, void (*cb)(void*, const char*), void* arg)
+{
+ std::thread(
+ [prompt = std::string(prompt), cb, arg]
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ cb(arg, line.c_str());
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the C-based API.
+
+// To map our completion handler into a function pointer / void* callback, we
+// need to allocate some state that will live for the duration of the
+// operation. A pointer to this state will be passed to the C-based API.
+template <asio::completion_handler_for<void(std::string)> Handler>
+class read_input_state
+{
+public:
+ read_input_state(Handler&& handler)
+ : handler_(std::move(handler)),
+ work_(asio::make_work_guard(handler_))
+ {
+ }
+
+ // Create the state using the handler's associated allocator.
+ static read_input_state* create(Handler&& handler)
+ {
+ // A unique_ptr deleter that is used to destroy uninitialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(handler,
+ asio::recycling_allocator<void>())};
+
+ // Allocate memory for the state.
+ std::unique_ptr<read_input_state, deleter> uninit_ptr(
+ std::allocator_traits<decltype(d.alloc)>::allocate(d.alloc, 1), d);
+
+ // Construct the state into the newly allocated memory. This might throw.
+ read_input_state* ptr =
+ new (uninit_ptr.get()) read_input_state(std::move(handler));
+
+ // Release ownership of the memory and return the newly allocated state.
+ uninit_ptr.release();
+ return ptr;
+ }
+
+ static void callback(void* arg, const char* result)
+ {
+ read_input_state* self = static_cast<read_input_state*>(arg);
+
+ // A unique_ptr deleter that is used to destroy initialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, ptr);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(self->handler_,
+ asio::recycling_allocator<void>())};
+
+ // To conform to the rules regarding asynchronous operations and memory
+ // allocation, we must make a copy of the state and deallocate the memory
+ // before dispatching the completion handler.
+ std::unique_ptr<read_input_state, deleter> state_ptr(self, d);
+ read_input_state state(std::move(*self));
+ state_ptr.reset();
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(state.work_.get_executor(),
+ asio::bind_allocator(d.alloc,
+ [
+ handler = std::move(state.handler_),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ }
+
+private:
+ Handler handler_;
+
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ asio::executor_work_guard<
+ asio::associated_executor_t<Handler>> work_;
+};
+
+// The initiating function for the asynchronous operation.
+template <asio::completion_token_for<void(std::string)> CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](
+ asio::completion_handler_for<void(std::string)> auto handler,
+ const std::string& prompt)
+ {
+ // The body of the initiation function object creates the long-lived state
+ // and passes it to the C-based API, along with the function pointer.
+ using state_type = read_input_state<decltype(handler)>;
+ read_input(prompt.c_str(), &state_type::callback,
+ state_type::create(std::move(handler)));
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp
new file mode 100644
index 00000000000..f8f37b48944
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp
@@ -0,0 +1,154 @@
+//
+// callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of an API that uses a move-only function object
+// for exposing a callback. The callback has the signature void(std::string).
+
+template <typename Callback>
+void read_input(const std::string& prompt, Callback cb)
+{
+ std::thread(
+ [prompt, cb = std::move(cb)]() mutable
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ std::move(cb)(std::move(line));
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the callback-based API.
+
+// The initiating function for the asynchronous operation.
+template <asio::completion_token_for<void(std::string)> CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](
+ asio::completion_handler_for<void(std::string)> auto handler,
+ const std::string& prompt)
+ {
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ auto work = asio::make_work_guard(handler);
+
+ // Launch the operation with a callback that will receive the result and
+ // pass it through to the asynchronous operation's completion handler.
+ read_input(prompt,
+ [
+ handler = std::move(handler),
+ work = std::move(work)
+ ](std::string result) mutable
+ {
+ // Get the handler's associated allocator. If the handler does not
+ // specify an allocator, use the recycling allocator as the default.
+ auto alloc = asio::get_associated_allocator(
+ handler, asio::recycling_allocator<void>());
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(work.get_executor(),
+ asio::bind_allocator(alloc,
+ [
+ handler = std::move(handler),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ });
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to specify an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp
new file mode 100644
index 00000000000..e7f795e1756
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp
@@ -0,0 +1,157 @@
+//
+// composed_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+//------------------------------------------------------------------------------
+
+// This is the simplest example of a composed asynchronous operation, where we
+// simply repackage an existing operation. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <
+ asio::completion_token_for<void(std::error_code, std::size_t)>
+ CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of our underlying asynchronous operation.
+{
+ // When delegating to the underlying operation we must take care to perfectly
+ // forward the completion token. This ensures that our operation works
+ // correctly with move-only function objects as callbacks, as well as other
+ // completion token types.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionToken>(token));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp
new file mode 100644
index 00000000000..ada029d38f0
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp
@@ -0,0 +1,225 @@
+//
+// composed_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This next simplest example of a composed asynchronous operation involves
+// repackaging multiple operations but choosing to invoke just one of them. All
+// of these underlying operations have the same completion signature. The
+// asynchronous operation requirements are met by delegating responsibility to
+// the underlying operations.
+
+template <
+ asio::completion_token_for<void(std::error_code, std::size_t)>
+ CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, bool allow_partial_write,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error, std::size_t)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code, std::size_t)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ const char* message,
+ bool allow_partial_write)
+ {
+ if (allow_partial_write)
+ {
+ // When delegating to an underlying operation we must take care to
+ // perfectly forward the completion handler. This ensures that our
+ // operation works correctly with move-only function objects as
+ // callbacks.
+ return socket.async_write_some(
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ else
+ {
+ // As above, we must perfectly forward the completion handler when calling
+ // the alternate underlying operation.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ initiation, token, std::ref(socket), message, allow_partial_write);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n", false,
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, "Testing deferred\r\n", false, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", false, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp
new file mode 100644
index 00000000000..46436a68e28
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp
@@ -0,0 +1,232 @@
+//
+// composed_3.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ const char* message)
+ {
+ // The async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // This differs from our operation's signature in that it is also passed
+ // the number of bytes transferred as an argument of type std::size_t. We
+ // will adapt our completion handler to async_write's completion handler
+ // signature by using std::bind, which drops the additional argument.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), std::placeholders::_1)));
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ // Get the result of the operation.
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp
new file mode 100644
index 00000000000..069f57ce1ac
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp
@@ -0,0 +1,247 @@
+//
+// composed_4.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. We will also intercept an empty
+// message as an invalid argument, and propagate the corresponding error to the
+// user. The asynchronous operation requirements are met by delegating
+// responsibility to the underlying operation.
+
+template <
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ const char* message)
+ {
+ // The post operation has a completion handler signature of:
+ //
+ // void()
+ //
+ // and the async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // Both of these operations' completion handler signatures differ from our
+ // operation's completion handler signature. We will adapt our completion
+ // handler to these signatures by using std::bind, which drops the
+ // additional arguments.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ std::size_t length = std::strlen(message);
+ if (length == 0)
+ {
+ asio::post(
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), asio::error::invalid_argument)));
+ }
+ else
+ {
+ asio::async_write(socket,
+ asio::buffer(message, length),
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), std::placeholders::_1)));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op =
+ async_write_message(socket, "", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp
new file mode 100644
index 00000000000..bec83ec3a59
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp
@@ -0,0 +1,284 @@
+//
+// composed_5.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation automatically serialises a message, using its I/O
+// streams insertion operator, before sending it on the socket. To do this, it
+// must allocate a buffer for the encoded message and ensure this buffer's
+// validity until the underlying async_write operation completes.
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const T& message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ std::unique_ptr<std::string> encoded_message)
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object, rather than
+ // using a lambda or std::bind.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket so
+ // that it can obtain the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The user-supplied completion handler.
+ typename std::decay<decltype(completion_handler)>::type handler_;
+
+ // The function call operator matches the completion signature of the
+ // async_write operation.
+ void operator()(const std::error_code& error, std::size_t /*n*/)
+ {
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ // The arguments must match the completion signature of our composed
+ // operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{socket, std::move(encoded_message),
+ std::forward<decltype(completion_handler)>(completion_handler)});
+ };
+
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket),
+ std::move(encoded_message));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, 123456,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, std::string("abcdef"), asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, 654.321, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp
new file mode 100644
index 00000000000..77e2f50f93e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp
@@ -0,0 +1,345 @@
+//
+// composed_6.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/executor_work_guard.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ std::unique_ptr<std::string> encoded_message,
+ std::size_t repeat_count,
+ std::unique_ptr<asio::steady_timer> delay_timer)
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket as
+ // it is used for multiple async_write operations, as well as for
+ // obtaining the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The repeat count remaining.
+ std::size_t repeat_count_;
+
+ // A steady timer used for introducing a delay.
+ std::unique_ptr<asio::steady_timer> delay_timer_;
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our intermediate completion handler is implemented as a
+ // state machine.
+ enum { starting, waiting, writing } state_;
+
+ // As our composed operation performs multiple underlying I/O operations,
+ // we should maintain a work object against the I/O executor. This tells
+ // the I/O executor that there is still more work to come in the future.
+ asio::executor_work_guard<tcp::socket::executor_type> io_work_;
+
+ // The user-supplied completion handler, called once only on completion
+ // of the entire composed operation.
+ typename std::decay<decltype(completion_handler)>::type handler_;
+
+ // By having a default value for the second argument, this function call
+ // operator matches the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ void operator()(const std::error_code& error, std::size_t = 0)
+ {
+ if (!error)
+ {
+ switch (state_)
+ {
+ case starting:
+ case writing:
+ if (repeat_count_ > 0)
+ {
+ --repeat_count_;
+ state_ = waiting;
+ delay_timer_->expires_after(std::chrono::seconds(1));
+ delay_timer_->async_wait(std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state_ = writing;
+ asio::async_write(socket_,
+ asio::buffer(*encoded_message_), std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // We no longer have any future work coming for the I/O executor.
+ io_work_.reset();
+
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{
+ socket, std::move(encoded_message),
+ repeat_count, std::move(delay_timer),
+ intermediate_completion_handler::starting,
+ asio::make_work_guard(socket.get_executor()),
+ std::forward<decltype(completion_handler)>(completion_handler)});
+ };
+
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket),
+ std::move(encoded_message), repeat_count,
+ std::move(delay_timer));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_messages(
+ socket, "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp
new file mode 100644
index 00000000000..9ae44c797fb
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp
@@ -0,0 +1,262 @@
+//
+// composed_7.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_compose.
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ enum { starting, waiting, writing };
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation, which is implemented here as a state
+ // machine in a lambda, in an intermediate completion handler that meets the
+ // requirements of a conforming asynchronous operation. This includes
+ // tracking outstanding work against the I/O executors associated with the
+ // operation (in this example, this is the socket's executor).
+ //
+ // The first argument to our lambda is a reference to the enclosing
+ // intermediate completion handler. This intermediate completion handler is
+ // provided for us by the asio::async_compose function, and takes care
+ // of all the details required to implement a conforming asynchronous
+ // operation. When calling an underlying asynchronous operation, we pass it
+ // this enclosing intermediate completion handler as the completion token.
+ //
+ // All arguments to our lambda after the first must be defaulted to allow the
+ // state machine to be started, as well as to allow the completion handler to
+ // match the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ [
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ &socket,
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our lambda
+ // implementation is also move-only.
+ encoded_message = std::move(encoded_message),
+
+ // The repeat count remaining.
+ repeat_count,
+
+ // A steady timer used for introducing a delay.
+ delay_timer = std::move(delay_timer),
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ state = starting
+ ]
+ (
+ auto& self,
+ const std::error_code& error = {},
+ std::size_t = 0
+ ) mutable
+ {
+ if (!error)
+ {
+ switch (state)
+ {
+ case starting:
+ case writing:
+ if (repeat_count > 0)
+ {
+ --repeat_count;
+ state = waiting;
+ delay_timer->expires_after(std::chrono::seconds(1));
+ delay_timer->async_wait(std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state = writing;
+ asio::async_write(socket,
+ asio::buffer(*encoded_message), std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message.reset();
+ delay_timer.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ },
+ token, socket);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_messages(
+ socket, "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp
new file mode 100644
index 00000000000..2735d74d047
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp
@@ -0,0 +1,255 @@
+//
+// composed_8.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/coroutine.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations,
+// using asio's stackless coroutines support to express the flow of control. It
+// automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+#include <asio/yield.hpp>
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_compose.
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation, which is implemented here as a stackless
+ // coroutine in a lambda, in an intermediate completion handler that meets the
+ // requirements of a conforming asynchronous operation. This includes
+ // tracking outstanding work against the I/O executors associated with the
+ // operation (in this example, this is the socket's executor).
+ //
+ // The first argument to our lambda is a reference to the enclosing
+ // intermediate completion handler. This intermediate completion handler is
+ // provided for us by the asio::async_compose function, and takes care
+ // of all the details required to implement a conforming asynchronous
+ // operation. When calling an underlying asynchronous operation, we pass it
+ // this enclosing intermediate completion handler as the completion token.
+ //
+ // All arguments to our lambda after the first must be defaulted to allow the
+ // state machine to be started, as well as to allow the completion handler to
+ // match the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ [
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ &socket,
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our lambda
+ // implementation is also move-only.
+ encoded_message = std::move(encoded_message),
+
+ // The repeat count remaining.
+ repeat_count,
+
+ // A steady timer used for introducing a delay.
+ delay_timer = std::move(delay_timer),
+
+ // The coroutine state.
+ coro = asio::coroutine()
+ ]
+ (
+ auto& self,
+ const std::error_code& error = {},
+ std::size_t = 0
+ ) mutable
+ {
+ reenter (coro)
+ {
+ while (repeat_count > 0)
+ {
+ --repeat_count;
+
+ delay_timer->expires_after(std::chrono::seconds(1));
+ yield delay_timer->async_wait(std::move(self));
+ if (error)
+ break;
+
+ yield asio::async_write(socket,
+ asio::buffer(*encoded_message), std::move(self));
+ if (error)
+ break;
+ }
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message.reset();
+ delay_timer.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ }
+ },
+ token, socket);
+}
+
+#include <asio/unyield.hpp>
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_messages(
+ socket, "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp b/3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp
new file mode 100644
index 00000000000..fa19aec6b13
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp
@@ -0,0 +1,39 @@
+//
+// line_reader.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 LINE_READER_HPP
+#define LINE_READER_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <string>
+
+class line_reader
+{
+public:
+ virtual ~line_reader() {}
+
+ template <typename CompletionToken>
+ auto async_read_line(std::string prompt, CompletionToken&& token)
+ {
+ return asio::async_initiate<CompletionToken, void(asio::error_code, std::string)>(
+ [](auto handler, line_reader* self, std::string prompt)
+ {
+ self->async_read_line_impl(std::move(prompt), std::move(handler));
+ }, token, this, prompt);
+ }
+
+private:
+ virtual void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(asio::error_code, std::string)> handler) = 0;
+};
+
+#endif // LINE_READER_HPP
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp b/3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp
new file mode 100644
index 00000000000..1b80dcd23ee
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp
@@ -0,0 +1,35 @@
+//
+// main.cpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "line_reader.hpp"
+#include "sleep.hpp"
+#include "stdin_line_reader.hpp"
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/use_awaitable.hpp>
+#include <iostream>
+
+asio::awaitable<void> do_read(line_reader& reader)
+{
+ for (int i = 0; i < 10; ++i)
+ {
+ std::cout << co_await reader.async_read_line("Enter something: ", asio::use_awaitable);
+ co_await async_sleep(co_await asio::this_coro::executor, std::chrono::seconds(1), asio::use_awaitable);
+ }
+}
+
+int main()
+{
+ asio::io_context ctx{1};
+ stdin_line_reader reader{ctx.get_executor()};
+ co_spawn(ctx, do_read(reader), asio::detached);
+ ctx.run();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp
new file mode 100644
index 00000000000..b605866ebd7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp
@@ -0,0 +1,22 @@
+//
+// sleep.cpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "sleep.hpp"
+#include <asio/consign.hpp>
+#include <asio/steady_timer.hpp>
+#include <memory>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration)
+{
+ auto timer = std::make_shared<asio::steady_timer>(ex, duration);
+ timer->async_wait(asio::consign(std::move(handler), timer));
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp
new file mode 100644
index 00000000000..7e057fc5862
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp
@@ -0,0 +1,32 @@
+//
+// sleep.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 SLEEP_HPP
+#define SLEEP_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/any_io_executor.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <chrono>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration);
+
+template <typename CompletionToken>
+inline auto async_sleep(asio::any_io_executor ex,
+ std::chrono::nanoseconds duration, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(std::error_code)>(
+ async_sleep_impl, token, std::move(ex), duration);
+}
+
+#endif // SLEEP_HPP
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp
new file mode 100644
index 00000000000..7467e820e7a
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp
@@ -0,0 +1,44 @@
+//
+// stdin_line_reader.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "stdin_line_reader.hpp"
+#include <asio/deferred.hpp>
+#include <asio/read_until.hpp>
+#include <iostream>
+
+stdin_line_reader::stdin_line_reader(asio::any_io_executor ex)
+ : stdin_(ex, ::dup(STDIN_FILENO))
+{
+}
+
+void stdin_line_reader::async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(asio::error_code, std::string)> handler)
+{
+ std::cout << prompt;
+ std::cout.flush();
+
+ asio::async_read_until(stdin_, asio::dynamic_buffer(buffer_), '\n',
+ asio::deferred(
+ [this](asio::error_code ec, std::size_t n)
+ {
+ if (!ec)
+ {
+ std::string result = buffer_.substr(0, n);
+ buffer_.erase(0, n);
+ return asio::deferred.values(ec, std::move(result));
+ }
+ else
+ {
+ return asio::deferred.values(ec, std::string{});
+ }
+ }
+ )
+ )(std::move(handler));
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp
new file mode 100644
index 00000000000..fd54f707da0
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp
@@ -0,0 +1,30 @@
+//
+// stdin_line_reader.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 STDIN_LINE_READER_HPP
+#define STDIN_LINE_READER_HPP
+
+#include "line_reader.hpp"
+#include <asio/posix/stream_descriptor.hpp>
+
+class stdin_line_reader : public line_reader
+{
+public:
+ explicit stdin_line_reader(asio::any_io_executor ex);
+
+private:
+ void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(asio::error_code, std::string)> handler) override;
+
+ asio::posix::stream_descriptor stdin_;
+ std::string buffer_;
+};
+
+#endif
diff --git a/3rdparty/asio/src/tests/.gitignore b/3rdparty/asio/src/tests/.gitignore
deleted file mode 100644
index a35502b4e5d..00000000000
--- a/3rdparty/asio/src/tests/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*_test
-*.ilk
-*.manifest
-*.pdb
-*.tds
-*.winmd
diff --git a/3rdparty/asio/src/tests/Makefile.am b/3rdparty/asio/src/tests/Makefile.am
index 381377f2288..04f8a03a4ec 100644
--- a/3rdparty/asio/src/tests/Makefile.am
+++ b/3rdparty/asio/src/tests/Makefile.am
@@ -9,38 +9,77 @@ endif
LDADD = libasio.a
endif
+SUBDIRS = properties
+
check_PROGRAMS = \
+ unit/any_completion_executor \
+ unit/any_completion_handler \
+ unit/any_io_executor \
+ unit/append \
+ unit/as_tuple \
unit/associated_allocator \
+ unit/associated_cancellation_slot \
unit/associated_executor \
+ unit/associated_immediate_executor \
+ unit/associator \
unit/async_result \
+ unit/awaitable \
unit/basic_datagram_socket \
unit/basic_deadline_timer \
+ unit/basic_file \
+ unit/basic_random_access_file \
unit/basic_raw_socket \
+ unit/basic_readable_pipe \
unit/basic_seq_packet_socket \
unit/basic_serial_port \
unit/basic_signal_set \
+ unit/basic_socket \
unit/basic_socket_acceptor \
+ unit/basic_stream_file \
unit/basic_stream_socket \
unit/basic_streambuf \
unit/basic_waitable_timer \
+ unit/basic_writable_pipe \
+ unit/bind_allocator \
+ unit/bind_cancellation_slot \
unit/bind_executor \
+ unit/bind_immediate_executor \
unit/buffered_read_stream \
unit/buffered_stream \
unit/buffered_write_stream \
unit/buffer \
+ unit/buffer_registration \
unit/buffers_iterator \
+ unit/cancellation_signal \
+ unit/cancellation_state \
+ unit/cancellation_type \
+ unit/co_spawn \
unit/completion_condition \
+ unit/compose \
unit/connect \
+ unit/connect_pipe \
+ unit/consign \
unit/coroutine \
- unit/datagram_socket_service \
- unit/deadline_timer_service \
unit/deadline_timer \
unit/defer \
+ unit/deferred \
+ unit/detached \
unit/dispatch \
unit/error \
+ unit/execution/any_executor \
+ unit/execution/blocking \
+ unit/execution/blocking_adaptation \
+ unit/execution/context_as \
+ unit/execution/executor \
+ unit/execution/invocable_archetype \
+ unit/execution/mapping \
+ unit/execution/outstanding_work \
+ unit/execution/prefer_only \
+ unit/execution/relationship \
unit/execution_context \
unit/executor \
unit/executor_work_guard \
+ unit/file_base \
unit/generic/basic_endpoint \
unit/generic/datagram_protocol \
unit/generic/raw_protocol \
@@ -48,6 +87,7 @@ check_PROGRAMS = \
unit/generic/stream_protocol \
unit/high_resolution_timer \
unit/io_context \
+ unit/io_context_strand \
unit/ip/address \
unit/ip/address_v4 \
unit/ip/address_v4_iterator \
@@ -66,7 +106,6 @@ check_PROGRAMS = \
unit/ip/network_v4 \
unit/ip/network_v6 \
unit/ip/resolver_query_base \
- unit/ip/resolver_service \
unit/ip/tcp \
unit/ip/udp \
unit/ip/unicast \
@@ -76,6 +115,7 @@ check_PROGRAMS = \
unit/local/basic_endpoint \
unit/local/connect_pair \
unit/local/datagram_protocol \
+ unit/local/seq_packet_protocol \
unit/local/stream_protocol \
unit/packaged_task \
unit/placeholders \
@@ -84,43 +124,55 @@ check_PROGRAMS = \
unit/posix/descriptor \
unit/posix/descriptor_base \
unit/posix/stream_descriptor \
- unit/posix/stream_descriptor_service \
unit/post \
- unit/raw_socket_service \
+ unit/prepend \
+ unit/random_access_file \
unit/read \
unit/read_at \
unit/read_until \
- unit/seq_packet_socket_service \
+ unit/readable_pipe \
+ unit/recycling_allocator \
+ unit/redirect_error \
+ unit/registered_buffer \
unit/serial_port \
unit/serial_port_base \
- unit/serial_port_service \
unit/signal_set \
- unit/signal_set_service \
- unit/socket_acceptor_service \
+ unit/signal_set_base \
unit/socket_base \
+ unit/static_thread_pool \
unit/steady_timer \
unit/strand \
- unit/stream_socket_service \
+ unit/stream_file \
unit/streambuf \
+ unit/system_context \
+ unit/system_executor \
unit/system_timer \
+ unit/this_coro \
unit/thread \
+ unit/thread_pool \
unit/time_traits \
+ unit/ts/buffer \
+ unit/ts/executor \
+ unit/ts/internet \
+ unit/ts/io_context \
+ unit/ts/net \
+ unit/ts/netfwd \
+ unit/ts/socket \
+ unit/ts/timer \
+ unit/use_awaitable \
unit/use_future \
unit/uses_executor \
unit/wait_traits \
- unit/waitable_timer_service \
- unit/windows/basic_handle \
unit/windows/basic_object_handle \
+ unit/windows/basic_overlapped_handle \
unit/windows/basic_random_access_handle \
unit/windows/basic_stream_handle \
unit/windows/object_handle \
- unit/windows/object_handle_service \
unit/windows/overlapped_handle \
unit/windows/overlapped_ptr \
unit/windows/random_access_handle \
- unit/windows/random_access_handle_service \
unit/windows/stream_handle \
- unit/windows/stream_handle_service \
+ unit/writable_pipe \
unit/write \
unit/write_at
@@ -134,48 +186,118 @@ noinst_PROGRAMS = \
performance/server
endif
+if HAVE_CXX11
+check_PROGRAMS += \
+ unit/experimental/basic_channel \
+ unit/experimental/basic_concurrent_channel \
+ unit/experimental/channel \
+ unit/experimental/channel_traits \
+ unit/experimental/concurrent_channel \
+ unit/experimental/parallel_group
+endif
+
+if HAVE_CXX20
+check_PROGRAMS += \
+ unit/experimental/promise
+
+if HAVE_COROUTINES
+check_PROGRAMS += \
+ unit/experimental/awaitable_operators \
+ unit/experimental/co_composed \
+ unit/experimental/coro/allocator \
+ unit/experimental/coro/cancel \
+ unit/experimental/coro/co_spawn \
+ unit/experimental/coro/exception \
+ unit/experimental/coro/executor \
+ unit/experimental/coro/partial \
+ unit/experimental/coro/simple_test \
+ unit/experimental/coro/stack_test \
+ unit/experimental/coro/use_coro
+endif
+endif
+
if HAVE_OPENSSL
check_PROGRAMS += \
unit/ssl/context_base \
unit/ssl/context \
+ unit/ssl/error \
+ unit/ssl/host_name_verification \
unit/ssl/rfc2818_verification \
unit/ssl/stream_base \
unit/ssl/stream
endif
TESTS = \
+ unit/any_completion_executor \
+ unit/any_completion_handler \
+ unit/any_io_executor \
+ unit/append \
+ unit/as_tuple \
unit/associated_allocator \
+ unit/associated_cancellation_slot \
unit/associated_executor \
+ unit/associated_immediate_executor \
+ unit/associator \
unit/async_result \
+ unit/awaitable \
unit/basic_datagram_socket \
unit/basic_deadline_timer \
+ unit/basic_file \
+ unit/basic_random_access_file \
unit/basic_raw_socket \
+ unit/basic_readable_pipe \
unit/basic_seq_packet_socket \
unit/basic_serial_port \
unit/basic_signal_set \
+ unit/basic_socket \
unit/basic_socket_acceptor \
+ unit/basic_stream_file \
unit/basic_stream_socket \
unit/basic_streambuf \
unit/basic_waitable_timer \
+ unit/basic_writable_pipe \
+ unit/bind_allocator \
+ unit/bind_cancellation_slot \
unit/bind_executor \
+ unit/bind_immediate_executor \
unit/buffered_read_stream \
unit/buffered_stream \
unit/buffered_write_stream \
unit/buffer \
+ unit/buffer_registration \
unit/buffers_iterator \
+ unit/cancellation_signal \
+ unit/cancellation_state \
+ unit/cancellation_type \
+ unit/co_spawn \
unit/completion_condition \
+ unit/compose \
unit/connect \
- unit/datagram_socket_service \
- unit/deadline_timer_service \
+ unit/connect_pipe \
+ unit/consign \
unit/deadline_timer \
unit/defer \
+ unit/deferred \
+ unit/detached \
unit/dispatch \
unit/error \
+ unit/execution/any_executor \
+ unit/execution/blocking \
+ unit/execution/blocking_adaptation \
+ unit/execution/context_as \
+ unit/execution/executor \
+ unit/execution/invocable_archetype \
+ unit/execution/mapping \
+ unit/execution/outstanding_work \
+ unit/execution/prefer_only \
+ unit/execution/relationship \
unit/execution_context \
unit/executor \
unit/executor_work_guard \
+ unit/file_base \
unit/high_resolution_timer \
unit/io_context \
+ unit/io_context_strand \
unit/ip/address \
unit/ip/address_v4 \
unit/ip/address_v4_iterator \
@@ -194,7 +316,6 @@ TESTS = \
unit/ip/network_v4 \
unit/ip/network_v6 \
unit/ip/resolver_query_base \
- unit/ip/resolver_service \
unit/ip/tcp \
unit/ip/udp \
unit/ip/unicast \
@@ -204,68 +325,110 @@ TESTS = \
unit/local/basic_endpoint \
unit/local/connect_pair \
unit/local/datagram_protocol \
+ unit/local/seq_packet_protocol \
unit/local/stream_protocol \
unit/packaged_task \
unit/placeholders \
- unit/posix/basic_descriptor \
- unit/posix/basic_stream_descriptor \
+ unit/posix/basic_descriptor\
+ unit/posix/basic_stream_descriptor\
unit/posix/descriptor\
unit/posix/descriptor_base \
unit/posix/stream_descriptor \
- unit/posix/stream_descriptor_service \
unit/post \
- unit/raw_socket_service \
+ unit/prepend \
+ unit/random_access_file \
unit/read \
unit/read_at \
unit/read_until \
- unit/seq_packet_socket_service \
+ unit/readable_pipe \
+ unit/recycling_allocator \
+ unit/redirect_error \
+ unit/registered_buffer \
unit/serial_port \
unit/serial_port_base \
- unit/serial_port_service \
unit/signal_set \
- unit/signal_set_service \
- unit/socket_acceptor_service \
+ unit/signal_set_base \
unit/socket_base \
+ unit/static_thread_pool \
unit/steady_timer \
unit/strand \
- unit/stream_socket_service \
+ unit/stream_file \
unit/streambuf \
+ unit/system_context \
+ unit/system_executor \
unit/system_timer \
+ unit/this_coro \
unit/thread \
+ unit/thread_pool \
unit/time_traits \
+ unit/ts/buffer \
+ unit/ts/executor \
+ unit/ts/internet \
+ unit/ts/io_context \
+ unit/ts/net \
+ unit/ts/netfwd \
+ unit/ts/socket \
+ unit/ts/timer \
+ unit/use_awaitable \
unit/use_future \
unit/uses_executor \
unit/wait_traits \
- unit/waitable_timer_service \
- unit/windows/basic_handle \
unit/windows/basic_object_handle \
+ unit/windows/basic_overlapped_handle \
unit/windows/basic_random_access_handle \
unit/windows/basic_stream_handle \
unit/windows/object_handle \
- unit/windows/object_handle_service \
unit/windows/overlapped_handle \
unit/windows/overlapped_ptr \
unit/windows/random_access_handle \
- unit/windows/random_access_handle_service \
unit/windows/stream_handle \
- unit/windows/stream_handle_service \
+ unit/writable_pipe \
unit/write \
unit/write_at
+if HAVE_CXX11
+TESTS += \
+ unit/experimental/basic_channel \
+ unit/experimental/basic_concurrent_channel \
+ unit/experimental/channel \
+ unit/experimental/channel_traits \
+ unit/experimental/concurrent_channel \
+ unit/experimental/parallel_group
+endif
+
+if HAVE_CXX20
+TESTS += \
+ unit/experimental/promise
+
+if HAVE_COROUTINES
+TESTS += \
+ unit/experimental/awaitable_operators \
+ unit/experimental/co_composed \
+ unit/experimental/coro/allocator \
+ unit/experimental/coro/cancel \
+ unit/experimental/coro/co_spawn \
+ unit/experimental/coro/exception \
+ unit/experimental/coro/executor \
+ unit/experimental/coro/partial \
+ unit/experimental/coro/simple_test \
+ unit/experimental/coro/stack_test \
+ unit/experimental/coro/use_coro
+endif
+endif
+
if HAVE_OPENSSL
TESTS += \
unit/ssl/context_base \
unit/ssl/context \
+ unit/ssl/error \
+ unit/ssl/host_name_verification \
unit/ssl/rfc2818_verification \
unit/ssl/stream_base \
unit/ssl/stream
endif
noinst_HEADERS = \
- latency/coroutine.hpp \
latency/high_res_clock.hpp \
- latency/unyield.hpp \
- latency/yield.hpp \
unit/unit_test.hpp
AM_CXXFLAGS = -I$(srcdir)/../../include
@@ -279,37 +442,74 @@ performance_client_SOURCES = performance/client.cpp
performance_server_SOURCES = performance/server.cpp
endif
+unit_any_completion_executor_SOURCES = unit/any_completion_executor.cpp
+unit_any_completion_handler_SOURCES = unit/any_completion_handler.cpp
+unit_any_io_executor_SOURCES = unit/any_io_executor.cpp
+unit_append_SOURCES = unit/append.cpp
+unit_as_tuple_SOURCES = unit/as_tuple.cpp
unit_associated_allocator_SOURCES = unit/associated_allocator.cpp
+unit_associated_cancellation_slot_SOURCES = unit/associated_cancellation_slot.cpp
unit_associated_executor_SOURCES = unit/associated_executor.cpp
+unit_associated_immediate_executor_SOURCES = unit/associated_immediate_executor.cpp
+unit_associator_SOURCES = unit/associator.cpp
unit_async_result_SOURCES = unit/async_result.cpp
+unit_awaitable_SOURCES = unit/awaitable.cpp
unit_basic_datagram_socket_SOURCES = unit/basic_datagram_socket.cpp
unit_basic_deadline_timer_SOURCES = unit/basic_deadline_timer.cpp
+unit_basic_file_SOURCES = unit/basic_file.cpp
+unit_basic_random_access_file_SOURCES = unit/basic_random_access_file.cpp
unit_basic_raw_socket_SOURCES = unit/basic_raw_socket.cpp
+unit_basic_readable_pipe_SOURCES = unit/basic_readable_pipe.cpp
unit_basic_seq_packet_socket_SOURCES = unit/basic_seq_packet_socket.cpp
unit_basic_serial_port_SOURCES = unit/basic_serial_port.cpp
unit_basic_signal_set_SOURCES = unit/basic_signal_set.cpp
+unit_basic_socket_SOURCES = unit/basic_socket.cpp
unit_basic_socket_acceptor_SOURCES = unit/basic_socket_acceptor.cpp
+unit_basic_stream_file_SOURCES = unit/basic_stream_file.cpp
unit_basic_stream_socket_SOURCES = unit/basic_stream_socket.cpp
unit_basic_streambuf_SOURCES = unit/basic_streambuf.cpp
unit_basic_waitable_timer_SOURCES = unit/basic_waitable_timer.cpp
+unit_basic_writable_pipe_SOURCES = unit/basic_writable_pipe.cpp
+unit_bind_allocator_SOURCES = unit/bind_allocator.cpp
+unit_bind_cancellation_slot_SOURCES = unit/bind_cancellation_slot.cpp
unit_bind_executor_SOURCES = unit/bind_executor.cpp
+unit_bind_immediate_executor_SOURCES = unit/bind_immediate_executor.cpp
unit_buffer_SOURCES = unit/buffer.cpp
+unit_buffer_registration_SOURCES = unit/buffer_registration.cpp
unit_buffers_iterator_SOURCES = unit/buffers_iterator.cpp
unit_buffered_read_stream_SOURCES = unit/buffered_read_stream.cpp
unit_buffered_stream_SOURCES = unit/buffered_stream.cpp
unit_buffered_write_stream_SOURCES = unit/buffered_write_stream.cpp
+unit_cancellation_signal_SOURCES = unit/cancellation_signal.cpp
+unit_cancellation_state_SOURCES = unit/cancellation_state.cpp
+unit_cancellation_type_SOURCES = unit/cancellation_type.cpp
+unit_co_spawn_SOURCES = unit/co_spawn.cpp
unit_completion_condition_SOURCES = unit/completion_condition.cpp
+unit_compose_SOURCES = unit/compose.cpp
unit_connect_SOURCES = unit/connect.cpp
+unit_connect_pipe_SOURCES = unit/connect_pipe.cpp
+unit_consign_SOURCES = unit/consign.cpp
unit_coroutine_SOURCES = unit/coroutine.cpp
-unit_datagram_socket_service_SOURCES = unit/datagram_socket_service.cpp
-unit_deadline_timer_service_SOURCES = unit/deadline_timer_service.cpp
unit_deadline_timer_SOURCES = unit/deadline_timer.cpp
unit_defer_SOURCES = unit/defer.cpp
+unit_deferred_SOURCES = unit/deferred.cpp
+unit_detached_SOURCES = unit/detached.cpp
unit_dispatch_SOURCES = unit/dispatch.cpp
unit_error_SOURCES = unit/error.cpp
+unit_execution_any_executor_SOURCES = unit/execution/any_executor.cpp
+unit_execution_blocking_SOURCES = unit/execution/blocking.cpp
+unit_execution_blocking_adaptation_SOURCES = unit/execution/blocking_adaptation.cpp
+unit_execution_context_as_SOURCES = unit/execution/context_as.cpp
+unit_execution_executor_SOURCES = unit/execution/executor.cpp
+unit_execution_invocable_archetype_SOURCES = unit/execution/invocable_archetype.cpp
+unit_execution_mapping_SOURCES = unit/execution/mapping.cpp
+unit_execution_outstanding_work_SOURCES = unit/execution/outstanding_work.cpp
+unit_execution_prefer_only_SOURCES = unit/execution/prefer_only.cpp
+unit_execution_relationship_SOURCES = unit/execution/relationship.cpp
unit_execution_context_SOURCES = unit/execution_context.cpp
unit_executor_SOURCES = unit/executor.cpp
unit_executor_work_guard_SOURCES = unit/executor_work_guard.cpp
+unit_file_base_SOURCES = unit/file_base.cpp
unit_generic_basic_endpoint_SOURCES = unit/generic/basic_endpoint.cpp
unit_generic_datagram_protocol_SOURCES = unit/generic/datagram_protocol.cpp
unit_generic_raw_protocol_SOURCES = unit/generic/raw_protocol.cpp
@@ -317,6 +517,7 @@ unit_generic_seq_packet_protocol_SOURCES = unit/generic/seq_packet_protocol.cpp
unit_generic_stream_protocol_SOURCES = unit/generic/stream_protocol.cpp
unit_high_resolution_timer_SOURCES = unit/high_resolution_timer.cpp
unit_io_context_SOURCES = unit/io_context.cpp
+unit_io_context_strand_SOURCES = unit/io_context_strand.cpp
unit_ip_address_SOURCES = unit/ip/address.cpp
unit_ip_address_v4_SOURCES = unit/ip/address_v4.cpp
unit_ip_address_v4_iterator_SOURCES = unit/ip/address_v4_iterator.cpp
@@ -335,7 +536,6 @@ unit_ip_multicast_SOURCES = unit/ip/multicast.cpp
unit_ip_network_v4_SOURCES = unit/ip/network_v4.cpp
unit_ip_network_v6_SOURCES = unit/ip/network_v6.cpp
unit_ip_resolver_query_base_SOURCES = unit/ip/resolver_query_base.cpp
-unit_ip_resolver_service_SOURCES = unit/ip/resolver_service.cpp
unit_ip_tcp_SOURCES = unit/ip/tcp.cpp
unit_ip_udp_SOURCES = unit/ip/udp.cpp
unit_ip_unicast_SOURCES = unit/ip/unicast.cpp
@@ -345,6 +545,7 @@ unit_is_write_buffered_SOURCES = unit/is_write_buffered.cpp
unit_local_basic_endpoint_SOURCES = unit/local/basic_endpoint.cpp
unit_local_connect_pair_SOURCES = unit/local/connect_pair.cpp
unit_local_datagram_protocol_SOURCES = unit/local/datagram_protocol.cpp
+unit_local_seq_packet_protocol_SOURCES = unit/local/seq_packet_protocol.cpp
unit_local_stream_protocol_SOURCES = unit/local/stream_protocol.cpp
unit_packaged_task_SOURCES = unit/packaged_task.cpp
unit_placeholders_SOURCES = unit/placeholders.cpp
@@ -353,50 +554,91 @@ unit_posix_basic_stream_descriptor_SOURCES = unit/posix/basic_stream_descriptor.
unit_posix_descriptor_SOURCES = unit/posix/descriptor.cpp
unit_posix_descriptor_base_SOURCES = unit/posix/descriptor_base.cpp
unit_posix_stream_descriptor_SOURCES = unit/posix/stream_descriptor.cpp
-unit_posix_stream_descriptor_service_SOURCES = unit/posix/stream_descriptor_service.cpp
unit_post_SOURCES = unit/post.cpp
-unit_raw_socket_service_SOURCES = unit/raw_socket_service.cpp
+unit_prepend_SOURCES = unit/prepend.cpp
+unit_random_access_file_SOURCES = unit/random_access_file.cpp
unit_read_SOURCES = unit/read.cpp
unit_read_at_SOURCES = unit/read_at.cpp
unit_read_until_SOURCES = unit/read_until.cpp
-unit_seq_packet_socket_service_SOURCES = unit/seq_packet_socket_service.cpp
+unit_readable_pipe_SOURCES = unit/readable_pipe.cpp
+unit_recycling_allocator_SOURCES = unit/recycling_allocator.cpp
+unit_redirect_error_SOURCES = unit/redirect_error.cpp
+unit_registered_buffer_SOURCES = unit/registered_buffer.cpp
unit_serial_port_SOURCES = unit/serial_port.cpp
unit_serial_port_base_SOURCES = unit/serial_port_base.cpp
-unit_serial_port_service_SOURCES = unit/serial_port_service.cpp
unit_signal_set_SOURCES = unit/signal_set.cpp
-unit_signal_set_service_SOURCES = unit/signal_set_service.cpp
-unit_socket_acceptor_service_SOURCES = unit/socket_acceptor_service.cpp
+unit_signal_set_base_SOURCES = unit/signal_set_base.cpp
unit_socket_base_SOURCES = unit/socket_base.cpp
+unit_static_thread_pool_SOURCES = unit/static_thread_pool.cpp
unit_steady_timer_SOURCES = unit/steady_timer.cpp
unit_strand_SOURCES = unit/strand.cpp
-unit_stream_socket_service_SOURCES = unit/stream_socket_service.cpp
+unit_stream_file_SOURCES = unit/stream_file.cpp
unit_streambuf_SOURCES = unit/streambuf.cpp
+unit_system_context_SOURCES = unit/system_context.cpp
+unit_system_executor_SOURCES = unit/system_executor.cpp
unit_system_timer_SOURCES = unit/system_timer.cpp
+unit_this_coro_SOURCES = unit/this_coro.cpp
unit_thread_SOURCES = unit/thread.cpp
+unit_thread_pool_SOURCES = unit/thread_pool.cpp
unit_time_traits_SOURCES = unit/time_traits.cpp
+unit_ts_buffer_SOURCES = unit/ts/buffer.cpp
+unit_ts_executor_SOURCES = unit/ts/executor.cpp
+unit_ts_internet_SOURCES = unit/ts/internet.cpp
+unit_ts_io_context_SOURCES = unit/ts/io_context.cpp
+unit_ts_net_SOURCES = unit/ts/net.cpp
+unit_ts_netfwd_SOURCES = unit/ts/netfwd.cpp
+unit_ts_socket_SOURCES = unit/ts/socket.cpp
+unit_ts_timer_SOURCES = unit/ts/timer.cpp
+unit_use_awaitable_SOURCES = unit/use_awaitable.cpp
unit_use_future_SOURCES = unit/use_future.cpp
unit_uses_executor_SOURCES = unit/uses_executor.cpp
unit_wait_traits_SOURCES = unit/wait_traits.cpp
-unit_waitable_timer_service_SOURCES = unit/waitable_timer_service.cpp
-unit_windows_basic_handle_SOURCES = unit/windows/basic_handle.cpp
unit_windows_basic_object_handle_SOURCES = unit/windows/basic_object_handle.cpp
+unit_windows_basic_overlapped_handle_SOURCES = unit/windows/basic_overlapped_handle.cpp
unit_windows_basic_random_access_handle_SOURCES = unit/windows/basic_random_access_handle.cpp
unit_windows_basic_stream_handle_SOURCES = unit/windows/basic_stream_handle.cpp
unit_windows_object_handle_SOURCES = unit/windows/object_handle.cpp
-unit_windows_object_handle_service_SOURCES = unit/windows/object_handle_service.cpp
unit_windows_overlapped_handle_SOURCES = unit/windows/overlapped_handle.cpp
unit_windows_overlapped_ptr_SOURCES = unit/windows/overlapped_ptr.cpp
unit_windows_random_access_handle_SOURCES = unit/windows/random_access_handle.cpp
-unit_windows_random_access_handle_service_SOURCES = unit/windows/random_access_handle_service.cpp
unit_windows_stream_handle_SOURCES = unit/windows/stream_handle.cpp
-unit_windows_stream_handle_service_SOURCES = unit/windows/stream_handle_service.cpp
+unit_writable_pipe_SOURCES = unit/writable_pipe.cpp
unit_write_SOURCES = unit/write.cpp
unit_write_at_SOURCES = unit/write_at.cpp
+if HAVE_CXX11
+unit_experimental_basic_channel_SOURCES = unit/experimental/basic_channel.cpp
+unit_experimental_basic_concurrent_channel_SOURCES = unit/experimental/basic_concurrent_channel.cpp
+unit_experimental_channel_SOURCES = unit/experimental/channel.cpp
+unit_experimental_channel_traits_SOURCES = unit/experimental/channel_traits.cpp
+unit_experimental_concurrent_channel_SOURCES = unit/experimental/concurrent_channel.cpp
+unit_experimental_parallel_group_SOURCES = unit/experimental/parallel_group.cpp
+endif
+
+if HAVE_CXX20
+unit_experimental_promise_SOURCES = unit/experimental/promise.cpp
+
+if HAVE_COROUTINES
+unit_experimental_awaitable_operators_SOURCES = unit/experimental/awaitable_operators.cpp
+unit_experimental_co_composed_SOURCES = unit/experimental/co_composed.cpp
+unit_experimental_coro_allocator_SOURCES = unit/experimental/coro/allocator.cpp
+unit_experimental_coro_cancel_SOURCES = unit/experimental/coro/cancel.cpp
+unit_experimental_coro_co_spawn_SOURCES = unit/experimental/coro/co_spawn.cpp
+unit_experimental_coro_exception_SOURCES = unit/experimental/coro/exception.cpp
+unit_experimental_coro_executor_SOURCES = unit/experimental/coro/executor.cpp
+unit_experimental_coro_partial_SOURCES = unit/experimental/coro/partial.cpp
+unit_experimental_coro_simple_test_SOURCES = unit/experimental/coro/simple_test.cpp
+unit_experimental_coro_stack_test_SOURCES = unit/experimental/coro/stack_test.cpp
+unit_experimental_coro_use_coro_SOURCES = unit/experimental/coro/use_coro.cpp
+endif
+endif
+
if HAVE_OPENSSL
unit_ssl_context_base_SOURCES = unit/ssl/context_base.cpp
unit_ssl_context_SOURCES = unit/ssl/context.cpp
+unit_ssl_error_SOURCES = unit/ssl/error.cpp
unit_ssl_stream_base_SOURCES = unit/ssl/stream_base.cpp
+unit_ssl_host_name_verification_SOURCES = unit/ssl/host_name_verification.cpp
unit_ssl_rfc2818_verification_SOURCES = unit/ssl/rfc2818_verification.cpp
unit_ssl_stream_SOURCES = unit/ssl/stream.cpp
endif
@@ -406,8 +648,6 @@ EXTRA_DIST = \
performance/handler_allocator.hpp \
unit/archetypes/async_ops.hpp \
unit/archetypes/async_result.hpp \
- unit/archetypes/deprecated_async_result.hpp \
- unit/archetypes/deprecated_async_ops.hpp \
unit/archetypes/gettable_socket_option.hpp \
unit/archetypes/io_control_command.hpp \
unit/archetypes/settable_socket_option.hpp
diff --git a/3rdparty/asio/src/tests/Makefile.in b/3rdparty/asio/src/tests/Makefile.in
new file mode 100644
index 00000000000..a88bd89fec5
--- /dev/null
+++ b/3rdparty/asio/src/tests/Makefile.in
@@ -0,0 +1,6367 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../asio_ssl.cpp
+check_PROGRAMS = unit/any_completion_executor$(EXEEXT) \
+ unit/any_completion_handler$(EXEEXT) \
+ unit/any_io_executor$(EXEEXT) unit/append$(EXEEXT) \
+ unit/as_tuple$(EXEEXT) unit/associated_allocator$(EXEEXT) \
+ unit/associated_cancellation_slot$(EXEEXT) \
+ unit/associated_executor$(EXEEXT) \
+ unit/associated_immediate_executor$(EXEEXT) \
+ unit/associator$(EXEEXT) unit/async_result$(EXEEXT) \
+ unit/awaitable$(EXEEXT) unit/basic_datagram_socket$(EXEEXT) \
+ unit/basic_deadline_timer$(EXEEXT) unit/basic_file$(EXEEXT) \
+ unit/basic_random_access_file$(EXEEXT) \
+ unit/basic_raw_socket$(EXEEXT) \
+ unit/basic_readable_pipe$(EXEEXT) \
+ unit/basic_seq_packet_socket$(EXEEXT) \
+ unit/basic_serial_port$(EXEEXT) unit/basic_signal_set$(EXEEXT) \
+ unit/basic_socket$(EXEEXT) unit/basic_socket_acceptor$(EXEEXT) \
+ unit/basic_stream_file$(EXEEXT) \
+ unit/basic_stream_socket$(EXEEXT) \
+ unit/basic_streambuf$(EXEEXT) \
+ unit/basic_waitable_timer$(EXEEXT) \
+ unit/basic_writable_pipe$(EXEEXT) unit/bind_allocator$(EXEEXT) \
+ unit/bind_cancellation_slot$(EXEEXT) \
+ unit/bind_executor$(EXEEXT) \
+ unit/bind_immediate_executor$(EXEEXT) \
+ unit/buffered_read_stream$(EXEEXT) \
+ unit/buffered_stream$(EXEEXT) \
+ unit/buffered_write_stream$(EXEEXT) unit/buffer$(EXEEXT) \
+ unit/buffer_registration$(EXEEXT) \
+ unit/buffers_iterator$(EXEEXT) \
+ unit/cancellation_signal$(EXEEXT) \
+ unit/cancellation_state$(EXEEXT) \
+ unit/cancellation_type$(EXEEXT) unit/co_spawn$(EXEEXT) \
+ unit/completion_condition$(EXEEXT) unit/compose$(EXEEXT) \
+ unit/connect$(EXEEXT) unit/connect_pipe$(EXEEXT) \
+ unit/consign$(EXEEXT) unit/coroutine$(EXEEXT) \
+ unit/deadline_timer$(EXEEXT) unit/defer$(EXEEXT) \
+ unit/deferred$(EXEEXT) unit/detached$(EXEEXT) \
+ unit/dispatch$(EXEEXT) unit/error$(EXEEXT) \
+ unit/execution/any_executor$(EXEEXT) \
+ unit/execution/blocking$(EXEEXT) \
+ unit/execution/blocking_adaptation$(EXEEXT) \
+ unit/execution/context_as$(EXEEXT) \
+ unit/execution/executor$(EXEEXT) \
+ unit/execution/invocable_archetype$(EXEEXT) \
+ unit/execution/mapping$(EXEEXT) \
+ unit/execution/outstanding_work$(EXEEXT) \
+ unit/execution/prefer_only$(EXEEXT) \
+ unit/execution/relationship$(EXEEXT) \
+ unit/execution_context$(EXEEXT) unit/executor$(EXEEXT) \
+ unit/executor_work_guard$(EXEEXT) unit/file_base$(EXEEXT) \
+ unit/generic/basic_endpoint$(EXEEXT) \
+ unit/generic/datagram_protocol$(EXEEXT) \
+ unit/generic/raw_protocol$(EXEEXT) \
+ unit/generic/seq_packet_protocol$(EXEEXT) \
+ unit/generic/stream_protocol$(EXEEXT) \
+ unit/high_resolution_timer$(EXEEXT) unit/io_context$(EXEEXT) \
+ unit/io_context_strand$(EXEEXT) unit/ip/address$(EXEEXT) \
+ unit/ip/address_v4$(EXEEXT) \
+ unit/ip/address_v4_iterator$(EXEEXT) \
+ unit/ip/address_v4_range$(EXEEXT) unit/ip/address_v6$(EXEEXT) \
+ unit/ip/address_v6_iterator$(EXEEXT) \
+ unit/ip/address_v6_range$(EXEEXT) \
+ unit/ip/basic_endpoint$(EXEEXT) \
+ unit/ip/basic_resolver$(EXEEXT) \
+ unit/ip/basic_resolver_entry$(EXEEXT) \
+ unit/ip/basic_resolver_iterator$(EXEEXT) \
+ unit/ip/basic_resolver_query$(EXEEXT) \
+ unit/ip/host_name$(EXEEXT) unit/ip/icmp$(EXEEXT) \
+ unit/ip/multicast$(EXEEXT) unit/ip/network_v4$(EXEEXT) \
+ unit/ip/network_v6$(EXEEXT) \
+ unit/ip/resolver_query_base$(EXEEXT) unit/ip/tcp$(EXEEXT) \
+ unit/ip/udp$(EXEEXT) unit/ip/unicast$(EXEEXT) \
+ unit/ip/v6_only$(EXEEXT) unit/is_read_buffered$(EXEEXT) \
+ unit/is_write_buffered$(EXEEXT) \
+ unit/local/basic_endpoint$(EXEEXT) \
+ unit/local/connect_pair$(EXEEXT) \
+ unit/local/datagram_protocol$(EXEEXT) \
+ unit/local/seq_packet_protocol$(EXEEXT) \
+ unit/local/stream_protocol$(EXEEXT) \
+ unit/packaged_task$(EXEEXT) unit/placeholders$(EXEEXT) \
+ unit/posix/basic_descriptor$(EXEEXT) \
+ unit/posix/basic_stream_descriptor$(EXEEXT) \
+ unit/posix/descriptor$(EXEEXT) \
+ unit/posix/descriptor_base$(EXEEXT) \
+ unit/posix/stream_descriptor$(EXEEXT) unit/post$(EXEEXT) \
+ unit/prepend$(EXEEXT) unit/random_access_file$(EXEEXT) \
+ unit/read$(EXEEXT) unit/read_at$(EXEEXT) \
+ unit/read_until$(EXEEXT) unit/readable_pipe$(EXEEXT) \
+ unit/recycling_allocator$(EXEEXT) unit/redirect_error$(EXEEXT) \
+ unit/registered_buffer$(EXEEXT) unit/serial_port$(EXEEXT) \
+ unit/serial_port_base$(EXEEXT) unit/signal_set$(EXEEXT) \
+ unit/signal_set_base$(EXEEXT) unit/socket_base$(EXEEXT) \
+ unit/static_thread_pool$(EXEEXT) unit/steady_timer$(EXEEXT) \
+ unit/strand$(EXEEXT) unit/stream_file$(EXEEXT) \
+ unit/streambuf$(EXEEXT) unit/system_context$(EXEEXT) \
+ unit/system_executor$(EXEEXT) unit/system_timer$(EXEEXT) \
+ unit/this_coro$(EXEEXT) unit/thread$(EXEEXT) \
+ unit/thread_pool$(EXEEXT) unit/time_traits$(EXEEXT) \
+ unit/ts/buffer$(EXEEXT) unit/ts/executor$(EXEEXT) \
+ unit/ts/internet$(EXEEXT) unit/ts/io_context$(EXEEXT) \
+ unit/ts/net$(EXEEXT) unit/ts/netfwd$(EXEEXT) \
+ unit/ts/socket$(EXEEXT) unit/ts/timer$(EXEEXT) \
+ unit/use_awaitable$(EXEEXT) unit/use_future$(EXEEXT) \
+ unit/uses_executor$(EXEEXT) unit/wait_traits$(EXEEXT) \
+ unit/windows/basic_object_handle$(EXEEXT) \
+ unit/windows/basic_overlapped_handle$(EXEEXT) \
+ unit/windows/basic_random_access_handle$(EXEEXT) \
+ unit/windows/basic_stream_handle$(EXEEXT) \
+ unit/windows/object_handle$(EXEEXT) \
+ unit/windows/overlapped_handle$(EXEEXT) \
+ unit/windows/overlapped_ptr$(EXEEXT) \
+ unit/windows/random_access_handle$(EXEEXT) \
+ unit/windows/stream_handle$(EXEEXT) \
+ unit/writable_pipe$(EXEEXT) unit/write$(EXEEXT) \
+ unit/write_at$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
+ $(am__EXEEXT_3) $(am__EXEEXT_4)
+@STANDALONE_FALSE@noinst_PROGRAMS = latency/tcp_client$(EXEEXT) \
+@STANDALONE_FALSE@ latency/tcp_server$(EXEEXT) \
+@STANDALONE_FALSE@ latency/udp_client$(EXEEXT) \
+@STANDALONE_FALSE@ latency/udp_server$(EXEEXT) \
+@STANDALONE_FALSE@ performance/client$(EXEEXT) \
+@STANDALONE_FALSE@ performance/server$(EXEEXT)
+@HAVE_CXX11_TRUE@am__append_2 = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits \
+@HAVE_CXX11_TRUE@ unit/experimental/concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group
+
+@HAVE_CXX20_TRUE@am__append_3 = \
+@HAVE_CXX20_TRUE@ unit/experimental/promise
+
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am__append_4 = \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/awaitable_operators \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/co_composed \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/allocator \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/cancel \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/co_spawn \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/exception \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/executor \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/partial \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/simple_test \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/stack_test \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/use_coro
+
+@HAVE_OPENSSL_TRUE@am__append_5 = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context_base \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context \
+@HAVE_OPENSSL_TRUE@ unit/ssl/error \
+@HAVE_OPENSSL_TRUE@ unit/ssl/host_name_verification \
+@HAVE_OPENSSL_TRUE@ unit/ssl/rfc2818_verification \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream_base \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream
+
+TESTS = unit/any_completion_executor$(EXEEXT) \
+ unit/any_completion_handler$(EXEEXT) \
+ unit/any_io_executor$(EXEEXT) unit/append$(EXEEXT) \
+ unit/as_tuple$(EXEEXT) unit/associated_allocator$(EXEEXT) \
+ unit/associated_cancellation_slot$(EXEEXT) \
+ unit/associated_executor$(EXEEXT) \
+ unit/associated_immediate_executor$(EXEEXT) \
+ unit/associator$(EXEEXT) unit/async_result$(EXEEXT) \
+ unit/awaitable$(EXEEXT) unit/basic_datagram_socket$(EXEEXT) \
+ unit/basic_deadline_timer$(EXEEXT) unit/basic_file$(EXEEXT) \
+ unit/basic_random_access_file$(EXEEXT) \
+ unit/basic_raw_socket$(EXEEXT) \
+ unit/basic_readable_pipe$(EXEEXT) \
+ unit/basic_seq_packet_socket$(EXEEXT) \
+ unit/basic_serial_port$(EXEEXT) unit/basic_signal_set$(EXEEXT) \
+ unit/basic_socket$(EXEEXT) unit/basic_socket_acceptor$(EXEEXT) \
+ unit/basic_stream_file$(EXEEXT) \
+ unit/basic_stream_socket$(EXEEXT) \
+ unit/basic_streambuf$(EXEEXT) \
+ unit/basic_waitable_timer$(EXEEXT) \
+ unit/basic_writable_pipe$(EXEEXT) unit/bind_allocator$(EXEEXT) \
+ unit/bind_cancellation_slot$(EXEEXT) \
+ unit/bind_executor$(EXEEXT) \
+ unit/bind_immediate_executor$(EXEEXT) \
+ unit/buffered_read_stream$(EXEEXT) \
+ unit/buffered_stream$(EXEEXT) \
+ unit/buffered_write_stream$(EXEEXT) unit/buffer$(EXEEXT) \
+ unit/buffer_registration$(EXEEXT) \
+ unit/buffers_iterator$(EXEEXT) \
+ unit/cancellation_signal$(EXEEXT) \
+ unit/cancellation_state$(EXEEXT) \
+ unit/cancellation_type$(EXEEXT) unit/co_spawn$(EXEEXT) \
+ unit/completion_condition$(EXEEXT) unit/compose$(EXEEXT) \
+ unit/connect$(EXEEXT) unit/connect_pipe$(EXEEXT) \
+ unit/consign$(EXEEXT) unit/deadline_timer$(EXEEXT) \
+ unit/defer$(EXEEXT) unit/deferred$(EXEEXT) \
+ unit/detached$(EXEEXT) unit/dispatch$(EXEEXT) \
+ unit/error$(EXEEXT) unit/execution/any_executor$(EXEEXT) \
+ unit/execution/blocking$(EXEEXT) \
+ unit/execution/blocking_adaptation$(EXEEXT) \
+ unit/execution/context_as$(EXEEXT) \
+ unit/execution/executor$(EXEEXT) \
+ unit/execution/invocable_archetype$(EXEEXT) \
+ unit/execution/mapping$(EXEEXT) \
+ unit/execution/outstanding_work$(EXEEXT) \
+ unit/execution/prefer_only$(EXEEXT) \
+ unit/execution/relationship$(EXEEXT) \
+ unit/execution_context$(EXEEXT) unit/executor$(EXEEXT) \
+ unit/executor_work_guard$(EXEEXT) unit/file_base$(EXEEXT) \
+ unit/high_resolution_timer$(EXEEXT) unit/io_context$(EXEEXT) \
+ unit/io_context_strand$(EXEEXT) unit/ip/address$(EXEEXT) \
+ unit/ip/address_v4$(EXEEXT) \
+ unit/ip/address_v4_iterator$(EXEEXT) \
+ unit/ip/address_v4_range$(EXEEXT) unit/ip/address_v6$(EXEEXT) \
+ unit/ip/address_v6_iterator$(EXEEXT) \
+ unit/ip/address_v6_range$(EXEEXT) \
+ unit/ip/basic_endpoint$(EXEEXT) \
+ unit/ip/basic_resolver$(EXEEXT) \
+ unit/ip/basic_resolver_entry$(EXEEXT) \
+ unit/ip/basic_resolver_iterator$(EXEEXT) \
+ unit/ip/basic_resolver_query$(EXEEXT) \
+ unit/ip/host_name$(EXEEXT) unit/ip/icmp$(EXEEXT) \
+ unit/ip/multicast$(EXEEXT) unit/ip/network_v4$(EXEEXT) \
+ unit/ip/network_v6$(EXEEXT) \
+ unit/ip/resolver_query_base$(EXEEXT) unit/ip/tcp$(EXEEXT) \
+ unit/ip/udp$(EXEEXT) unit/ip/unicast$(EXEEXT) \
+ unit/ip/v6_only$(EXEEXT) unit/is_read_buffered$(EXEEXT) \
+ unit/is_write_buffered$(EXEEXT) \
+ unit/local/basic_endpoint$(EXEEXT) \
+ unit/local/connect_pair$(EXEEXT) \
+ unit/local/datagram_protocol$(EXEEXT) \
+ unit/local/seq_packet_protocol$(EXEEXT) \
+ unit/local/stream_protocol$(EXEEXT) \
+ unit/packaged_task$(EXEEXT) unit/placeholders$(EXEEXT) \
+ unit/posix/basic_descriptor$(EXEEXT) \
+ unit/posix/basic_stream_descriptor$(EXEEXT) \
+ unit/posix/descriptor$(EXEEXT) \
+ unit/posix/descriptor_base$(EXEEXT) \
+ unit/posix/stream_descriptor$(EXEEXT) unit/post$(EXEEXT) \
+ unit/prepend$(EXEEXT) unit/random_access_file$(EXEEXT) \
+ unit/read$(EXEEXT) unit/read_at$(EXEEXT) \
+ unit/read_until$(EXEEXT) unit/readable_pipe$(EXEEXT) \
+ unit/recycling_allocator$(EXEEXT) unit/redirect_error$(EXEEXT) \
+ unit/registered_buffer$(EXEEXT) unit/serial_port$(EXEEXT) \
+ unit/serial_port_base$(EXEEXT) unit/signal_set$(EXEEXT) \
+ unit/signal_set_base$(EXEEXT) unit/socket_base$(EXEEXT) \
+ unit/static_thread_pool$(EXEEXT) unit/steady_timer$(EXEEXT) \
+ unit/strand$(EXEEXT) unit/stream_file$(EXEEXT) \
+ unit/streambuf$(EXEEXT) unit/system_context$(EXEEXT) \
+ unit/system_executor$(EXEEXT) unit/system_timer$(EXEEXT) \
+ unit/this_coro$(EXEEXT) unit/thread$(EXEEXT) \
+ unit/thread_pool$(EXEEXT) unit/time_traits$(EXEEXT) \
+ unit/ts/buffer$(EXEEXT) unit/ts/executor$(EXEEXT) \
+ unit/ts/internet$(EXEEXT) unit/ts/io_context$(EXEEXT) \
+ unit/ts/net$(EXEEXT) unit/ts/netfwd$(EXEEXT) \
+ unit/ts/socket$(EXEEXT) unit/ts/timer$(EXEEXT) \
+ unit/use_awaitable$(EXEEXT) unit/use_future$(EXEEXT) \
+ unit/uses_executor$(EXEEXT) unit/wait_traits$(EXEEXT) \
+ unit/windows/basic_object_handle$(EXEEXT) \
+ unit/windows/basic_overlapped_handle$(EXEEXT) \
+ unit/windows/basic_random_access_handle$(EXEEXT) \
+ unit/windows/basic_stream_handle$(EXEEXT) \
+ unit/windows/object_handle$(EXEEXT) \
+ unit/windows/overlapped_handle$(EXEEXT) \
+ unit/windows/overlapped_ptr$(EXEEXT) \
+ unit/windows/random_access_handle$(EXEEXT) \
+ unit/windows/stream_handle$(EXEEXT) \
+ unit/writable_pipe$(EXEEXT) unit/write$(EXEEXT) \
+ unit/write_at$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
+ $(am__EXEEXT_3) $(am__EXEEXT_4)
+@HAVE_CXX11_TRUE@am__append_6 = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits \
+@HAVE_CXX11_TRUE@ unit/experimental/concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group
+
+@HAVE_CXX20_TRUE@am__append_7 = \
+@HAVE_CXX20_TRUE@ unit/experimental/promise
+
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am__append_8 = \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/awaitable_operators \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/co_composed \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/allocator \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/cancel \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/co_spawn \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/exception \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/executor \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/partial \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/simple_test \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/stack_test \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/use_coro
+
+@HAVE_OPENSSL_TRUE@am__append_9 = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context_base \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context \
+@HAVE_OPENSSL_TRUE@ unit/ssl/error \
+@HAVE_OPENSSL_TRUE@ unit/ssl/host_name_verification \
+@HAVE_OPENSSL_TRUE@ unit/ssl/rfc2818_verification \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream_base \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream
+
+subdir = src/tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_CXX11_TRUE@am__EXEEXT_1 = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_concurrent_channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/concurrent_channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group$(EXEEXT)
+@HAVE_CXX20_TRUE@am__EXEEXT_2 = unit/experimental/promise$(EXEEXT)
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am__EXEEXT_3 = unit/experimental/awaitable_operators$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/co_composed$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/allocator$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/cancel$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/co_spawn$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/exception$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/executor$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/partial$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/simple_test$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/stack_test$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/use_coro$(EXEEXT)
+@HAVE_OPENSSL_TRUE@am__EXEEXT_4 = unit/ssl/context_base$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ unit/ssl/error$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ unit/ssl/host_name_verification$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ unit/ssl/rfc2818_verification$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream_base$(EXEEXT) \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libasio_a_AR = $(AR) $(ARFLAGS)
+libasio_a_LIBADD =
+am__libasio_a_SOURCES_DIST = ../asio.cpp ../asio_ssl.cpp
+am__dirstamp = $(am__leading_dot)dirstamp
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../asio_ssl.$(OBJEXT)
+@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = ../asio.$(OBJEXT) \
+@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
+libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
+am__latency_tcp_client_SOURCES_DIST = latency/tcp_client.cpp
+@STANDALONE_FALSE@am_latency_tcp_client_OBJECTS = \
+@STANDALONE_FALSE@ latency/tcp_client.$(OBJEXT)
+latency_tcp_client_OBJECTS = $(am_latency_tcp_client_OBJECTS)
+latency_tcp_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@latency_tcp_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__latency_tcp_server_SOURCES_DIST = latency/tcp_server.cpp
+@STANDALONE_FALSE@am_latency_tcp_server_OBJECTS = \
+@STANDALONE_FALSE@ latency/tcp_server.$(OBJEXT)
+latency_tcp_server_OBJECTS = $(am_latency_tcp_server_OBJECTS)
+latency_tcp_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@latency_tcp_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__latency_udp_client_SOURCES_DIST = latency/udp_client.cpp
+@STANDALONE_FALSE@am_latency_udp_client_OBJECTS = \
+@STANDALONE_FALSE@ latency/udp_client.$(OBJEXT)
+latency_udp_client_OBJECTS = $(am_latency_udp_client_OBJECTS)
+latency_udp_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@latency_udp_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__latency_udp_server_SOURCES_DIST = latency/udp_server.cpp
+@STANDALONE_FALSE@am_latency_udp_server_OBJECTS = \
+@STANDALONE_FALSE@ latency/udp_server.$(OBJEXT)
+latency_udp_server_OBJECTS = $(am_latency_udp_server_OBJECTS)
+latency_udp_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@latency_udp_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__performance_client_SOURCES_DIST = performance/client.cpp
+@STANDALONE_FALSE@am_performance_client_OBJECTS = \
+@STANDALONE_FALSE@ performance/client.$(OBJEXT)
+performance_client_OBJECTS = $(am_performance_client_OBJECTS)
+performance_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@performance_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__performance_server_SOURCES_DIST = performance/server.cpp
+@STANDALONE_FALSE@am_performance_server_OBJECTS = \
+@STANDALONE_FALSE@ performance/server.$(OBJEXT)
+performance_server_OBJECTS = $(am_performance_server_OBJECTS)
+performance_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@performance_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_any_completion_executor_OBJECTS = \
+ unit/any_completion_executor.$(OBJEXT)
+unit_any_completion_executor_OBJECTS = \
+ $(am_unit_any_completion_executor_OBJECTS)
+unit_any_completion_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_any_completion_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_any_completion_handler_OBJECTS = \
+ unit/any_completion_handler.$(OBJEXT)
+unit_any_completion_handler_OBJECTS = \
+ $(am_unit_any_completion_handler_OBJECTS)
+unit_any_completion_handler_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_any_completion_handler_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_any_io_executor_OBJECTS = unit/any_io_executor.$(OBJEXT)
+unit_any_io_executor_OBJECTS = $(am_unit_any_io_executor_OBJECTS)
+unit_any_io_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_any_io_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_append_OBJECTS = unit/append.$(OBJEXT)
+unit_append_OBJECTS = $(am_unit_append_OBJECTS)
+unit_append_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_append_DEPENDENCIES = libasio.a
+am_unit_as_tuple_OBJECTS = unit/as_tuple.$(OBJEXT)
+unit_as_tuple_OBJECTS = $(am_unit_as_tuple_OBJECTS)
+unit_as_tuple_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_as_tuple_DEPENDENCIES = libasio.a
+am_unit_associated_allocator_OBJECTS = \
+ unit/associated_allocator.$(OBJEXT)
+unit_associated_allocator_OBJECTS = \
+ $(am_unit_associated_allocator_OBJECTS)
+unit_associated_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_associated_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_associated_cancellation_slot_OBJECTS = \
+ unit/associated_cancellation_slot.$(OBJEXT)
+unit_associated_cancellation_slot_OBJECTS = \
+ $(am_unit_associated_cancellation_slot_OBJECTS)
+unit_associated_cancellation_slot_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_associated_cancellation_slot_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_associated_executor_OBJECTS = \
+ unit/associated_executor.$(OBJEXT)
+unit_associated_executor_OBJECTS = \
+ $(am_unit_associated_executor_OBJECTS)
+unit_associated_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_associated_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_associated_immediate_executor_OBJECTS = \
+ unit/associated_immediate_executor.$(OBJEXT)
+unit_associated_immediate_executor_OBJECTS = \
+ $(am_unit_associated_immediate_executor_OBJECTS)
+unit_associated_immediate_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_associated_immediate_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_associator_OBJECTS = unit/associator.$(OBJEXT)
+unit_associator_OBJECTS = $(am_unit_associator_OBJECTS)
+unit_associator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_associator_DEPENDENCIES = libasio.a
+am_unit_async_result_OBJECTS = unit/async_result.$(OBJEXT)
+unit_async_result_OBJECTS = $(am_unit_async_result_OBJECTS)
+unit_async_result_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_async_result_DEPENDENCIES = libasio.a
+am_unit_awaitable_OBJECTS = unit/awaitable.$(OBJEXT)
+unit_awaitable_OBJECTS = $(am_unit_awaitable_OBJECTS)
+unit_awaitable_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_awaitable_DEPENDENCIES = libasio.a
+am_unit_basic_datagram_socket_OBJECTS = \
+ unit/basic_datagram_socket.$(OBJEXT)
+unit_basic_datagram_socket_OBJECTS = \
+ $(am_unit_basic_datagram_socket_OBJECTS)
+unit_basic_datagram_socket_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_datagram_socket_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_deadline_timer_OBJECTS = \
+ unit/basic_deadline_timer.$(OBJEXT)
+unit_basic_deadline_timer_OBJECTS = \
+ $(am_unit_basic_deadline_timer_OBJECTS)
+unit_basic_deadline_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_deadline_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_file_OBJECTS = unit/basic_file.$(OBJEXT)
+unit_basic_file_OBJECTS = $(am_unit_basic_file_OBJECTS)
+unit_basic_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_file_DEPENDENCIES = libasio.a
+am_unit_basic_random_access_file_OBJECTS = \
+ unit/basic_random_access_file.$(OBJEXT)
+unit_basic_random_access_file_OBJECTS = \
+ $(am_unit_basic_random_access_file_OBJECTS)
+unit_basic_random_access_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_random_access_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_raw_socket_OBJECTS = unit/basic_raw_socket.$(OBJEXT)
+unit_basic_raw_socket_OBJECTS = $(am_unit_basic_raw_socket_OBJECTS)
+unit_basic_raw_socket_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_raw_socket_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_readable_pipe_OBJECTS = \
+ unit/basic_readable_pipe.$(OBJEXT)
+unit_basic_readable_pipe_OBJECTS = \
+ $(am_unit_basic_readable_pipe_OBJECTS)
+unit_basic_readable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_readable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_seq_packet_socket_OBJECTS = \
+ unit/basic_seq_packet_socket.$(OBJEXT)
+unit_basic_seq_packet_socket_OBJECTS = \
+ $(am_unit_basic_seq_packet_socket_OBJECTS)
+unit_basic_seq_packet_socket_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_seq_packet_socket_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_serial_port_OBJECTS = unit/basic_serial_port.$(OBJEXT)
+unit_basic_serial_port_OBJECTS = $(am_unit_basic_serial_port_OBJECTS)
+unit_basic_serial_port_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_serial_port_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_signal_set_OBJECTS = unit/basic_signal_set.$(OBJEXT)
+unit_basic_signal_set_OBJECTS = $(am_unit_basic_signal_set_OBJECTS)
+unit_basic_signal_set_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_signal_set_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_socket_OBJECTS = unit/basic_socket.$(OBJEXT)
+unit_basic_socket_OBJECTS = $(am_unit_basic_socket_OBJECTS)
+unit_basic_socket_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_socket_DEPENDENCIES = libasio.a
+am_unit_basic_socket_acceptor_OBJECTS = \
+ unit/basic_socket_acceptor.$(OBJEXT)
+unit_basic_socket_acceptor_OBJECTS = \
+ $(am_unit_basic_socket_acceptor_OBJECTS)
+unit_basic_socket_acceptor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_socket_acceptor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_stream_file_OBJECTS = unit/basic_stream_file.$(OBJEXT)
+unit_basic_stream_file_OBJECTS = $(am_unit_basic_stream_file_OBJECTS)
+unit_basic_stream_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_stream_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_stream_socket_OBJECTS = \
+ unit/basic_stream_socket.$(OBJEXT)
+unit_basic_stream_socket_OBJECTS = \
+ $(am_unit_basic_stream_socket_OBJECTS)
+unit_basic_stream_socket_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_stream_socket_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_streambuf_OBJECTS = unit/basic_streambuf.$(OBJEXT)
+unit_basic_streambuf_OBJECTS = $(am_unit_basic_streambuf_OBJECTS)
+unit_basic_streambuf_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_streambuf_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_waitable_timer_OBJECTS = \
+ unit/basic_waitable_timer.$(OBJEXT)
+unit_basic_waitable_timer_OBJECTS = \
+ $(am_unit_basic_waitable_timer_OBJECTS)
+unit_basic_waitable_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_waitable_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_writable_pipe_OBJECTS = \
+ unit/basic_writable_pipe.$(OBJEXT)
+unit_basic_writable_pipe_OBJECTS = \
+ $(am_unit_basic_writable_pipe_OBJECTS)
+unit_basic_writable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_writable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_bind_allocator_OBJECTS = unit/bind_allocator.$(OBJEXT)
+unit_bind_allocator_OBJECTS = $(am_unit_bind_allocator_OBJECTS)
+unit_bind_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_bind_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_bind_cancellation_slot_OBJECTS = \
+ unit/bind_cancellation_slot.$(OBJEXT)
+unit_bind_cancellation_slot_OBJECTS = \
+ $(am_unit_bind_cancellation_slot_OBJECTS)
+unit_bind_cancellation_slot_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_bind_cancellation_slot_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_bind_executor_OBJECTS = unit/bind_executor.$(OBJEXT)
+unit_bind_executor_OBJECTS = $(am_unit_bind_executor_OBJECTS)
+unit_bind_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_bind_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_bind_immediate_executor_OBJECTS = \
+ unit/bind_immediate_executor.$(OBJEXT)
+unit_bind_immediate_executor_OBJECTS = \
+ $(am_unit_bind_immediate_executor_OBJECTS)
+unit_bind_immediate_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_bind_immediate_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_buffer_OBJECTS = unit/buffer.$(OBJEXT)
+unit_buffer_OBJECTS = $(am_unit_buffer_OBJECTS)
+unit_buffer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffer_DEPENDENCIES = libasio.a
+am_unit_buffer_registration_OBJECTS = \
+ unit/buffer_registration.$(OBJEXT)
+unit_buffer_registration_OBJECTS = \
+ $(am_unit_buffer_registration_OBJECTS)
+unit_buffer_registration_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffer_registration_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_buffered_read_stream_OBJECTS = \
+ unit/buffered_read_stream.$(OBJEXT)
+unit_buffered_read_stream_OBJECTS = \
+ $(am_unit_buffered_read_stream_OBJECTS)
+unit_buffered_read_stream_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffered_read_stream_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_buffered_stream_OBJECTS = unit/buffered_stream.$(OBJEXT)
+unit_buffered_stream_OBJECTS = $(am_unit_buffered_stream_OBJECTS)
+unit_buffered_stream_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffered_stream_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_buffered_write_stream_OBJECTS = \
+ unit/buffered_write_stream.$(OBJEXT)
+unit_buffered_write_stream_OBJECTS = \
+ $(am_unit_buffered_write_stream_OBJECTS)
+unit_buffered_write_stream_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffered_write_stream_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_buffers_iterator_OBJECTS = unit/buffers_iterator.$(OBJEXT)
+unit_buffers_iterator_OBJECTS = $(am_unit_buffers_iterator_OBJECTS)
+unit_buffers_iterator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffers_iterator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_cancellation_signal_OBJECTS = \
+ unit/cancellation_signal.$(OBJEXT)
+unit_cancellation_signal_OBJECTS = \
+ $(am_unit_cancellation_signal_OBJECTS)
+unit_cancellation_signal_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_cancellation_signal_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_cancellation_state_OBJECTS = \
+ unit/cancellation_state.$(OBJEXT)
+unit_cancellation_state_OBJECTS = \
+ $(am_unit_cancellation_state_OBJECTS)
+unit_cancellation_state_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_cancellation_state_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_cancellation_type_OBJECTS = unit/cancellation_type.$(OBJEXT)
+unit_cancellation_type_OBJECTS = $(am_unit_cancellation_type_OBJECTS)
+unit_cancellation_type_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_cancellation_type_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_co_spawn_OBJECTS = unit/co_spawn.$(OBJEXT)
+unit_co_spawn_OBJECTS = $(am_unit_co_spawn_OBJECTS)
+unit_co_spawn_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_co_spawn_DEPENDENCIES = libasio.a
+am_unit_completion_condition_OBJECTS = \
+ unit/completion_condition.$(OBJEXT)
+unit_completion_condition_OBJECTS = \
+ $(am_unit_completion_condition_OBJECTS)
+unit_completion_condition_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_completion_condition_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_compose_OBJECTS = unit/compose.$(OBJEXT)
+unit_compose_OBJECTS = $(am_unit_compose_OBJECTS)
+unit_compose_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_compose_DEPENDENCIES = libasio.a
+am_unit_connect_OBJECTS = unit/connect.$(OBJEXT)
+unit_connect_OBJECTS = $(am_unit_connect_OBJECTS)
+unit_connect_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_connect_DEPENDENCIES = libasio.a
+am_unit_connect_pipe_OBJECTS = unit/connect_pipe.$(OBJEXT)
+unit_connect_pipe_OBJECTS = $(am_unit_connect_pipe_OBJECTS)
+unit_connect_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_connect_pipe_DEPENDENCIES = libasio.a
+am_unit_consign_OBJECTS = unit/consign.$(OBJEXT)
+unit_consign_OBJECTS = $(am_unit_consign_OBJECTS)
+unit_consign_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_consign_DEPENDENCIES = libasio.a
+am_unit_coroutine_OBJECTS = unit/coroutine.$(OBJEXT)
+unit_coroutine_OBJECTS = $(am_unit_coroutine_OBJECTS)
+unit_coroutine_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_coroutine_DEPENDENCIES = libasio.a
+am_unit_deadline_timer_OBJECTS = unit/deadline_timer.$(OBJEXT)
+unit_deadline_timer_OBJECTS = $(am_unit_deadline_timer_OBJECTS)
+unit_deadline_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_deadline_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_defer_OBJECTS = unit/defer.$(OBJEXT)
+unit_defer_OBJECTS = $(am_unit_defer_OBJECTS)
+unit_defer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_defer_DEPENDENCIES = libasio.a
+am_unit_deferred_OBJECTS = unit/deferred.$(OBJEXT)
+unit_deferred_OBJECTS = $(am_unit_deferred_OBJECTS)
+unit_deferred_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_deferred_DEPENDENCIES = libasio.a
+am_unit_detached_OBJECTS = unit/detached.$(OBJEXT)
+unit_detached_OBJECTS = $(am_unit_detached_OBJECTS)
+unit_detached_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_detached_DEPENDENCIES = libasio.a
+am_unit_dispatch_OBJECTS = unit/dispatch.$(OBJEXT)
+unit_dispatch_OBJECTS = $(am_unit_dispatch_OBJECTS)
+unit_dispatch_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_dispatch_DEPENDENCIES = libasio.a
+am_unit_error_OBJECTS = unit/error.$(OBJEXT)
+unit_error_OBJECTS = $(am_unit_error_OBJECTS)
+unit_error_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_error_DEPENDENCIES = libasio.a
+am_unit_execution_any_executor_OBJECTS = \
+ unit/execution/any_executor.$(OBJEXT)
+unit_execution_any_executor_OBJECTS = \
+ $(am_unit_execution_any_executor_OBJECTS)
+unit_execution_any_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_any_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_blocking_OBJECTS = \
+ unit/execution/blocking.$(OBJEXT)
+unit_execution_blocking_OBJECTS = \
+ $(am_unit_execution_blocking_OBJECTS)
+unit_execution_blocking_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_blocking_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_blocking_adaptation_OBJECTS = \
+ unit/execution/blocking_adaptation.$(OBJEXT)
+unit_execution_blocking_adaptation_OBJECTS = \
+ $(am_unit_execution_blocking_adaptation_OBJECTS)
+unit_execution_blocking_adaptation_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_blocking_adaptation_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_context_as_OBJECTS = \
+ unit/execution/context_as.$(OBJEXT)
+unit_execution_context_as_OBJECTS = \
+ $(am_unit_execution_context_as_OBJECTS)
+unit_execution_context_as_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_context_as_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_executor_OBJECTS = \
+ unit/execution/executor.$(OBJEXT)
+unit_execution_executor_OBJECTS = \
+ $(am_unit_execution_executor_OBJECTS)
+unit_execution_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_invocable_archetype_OBJECTS = \
+ unit/execution/invocable_archetype.$(OBJEXT)
+unit_execution_invocable_archetype_OBJECTS = \
+ $(am_unit_execution_invocable_archetype_OBJECTS)
+unit_execution_invocable_archetype_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_invocable_archetype_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_mapping_OBJECTS = unit/execution/mapping.$(OBJEXT)
+unit_execution_mapping_OBJECTS = $(am_unit_execution_mapping_OBJECTS)
+unit_execution_mapping_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_mapping_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_outstanding_work_OBJECTS = \
+ unit/execution/outstanding_work.$(OBJEXT)
+unit_execution_outstanding_work_OBJECTS = \
+ $(am_unit_execution_outstanding_work_OBJECTS)
+unit_execution_outstanding_work_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_outstanding_work_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_prefer_only_OBJECTS = \
+ unit/execution/prefer_only.$(OBJEXT)
+unit_execution_prefer_only_OBJECTS = \
+ $(am_unit_execution_prefer_only_OBJECTS)
+unit_execution_prefer_only_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_prefer_only_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_relationship_OBJECTS = \
+ unit/execution/relationship.$(OBJEXT)
+unit_execution_relationship_OBJECTS = \
+ $(am_unit_execution_relationship_OBJECTS)
+unit_execution_relationship_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_relationship_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_execution_context_OBJECTS = unit/execution_context.$(OBJEXT)
+unit_execution_context_OBJECTS = $(am_unit_execution_context_OBJECTS)
+unit_execution_context_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_execution_context_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_executor_OBJECTS = unit/executor.$(OBJEXT)
+unit_executor_OBJECTS = $(am_unit_executor_OBJECTS)
+unit_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_executor_DEPENDENCIES = libasio.a
+am_unit_executor_work_guard_OBJECTS = \
+ unit/executor_work_guard.$(OBJEXT)
+unit_executor_work_guard_OBJECTS = \
+ $(am_unit_executor_work_guard_OBJECTS)
+unit_executor_work_guard_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_executor_work_guard_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_awaitable_operators_SOURCES_DIST = \
+ unit/experimental/awaitable_operators.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_awaitable_operators_OBJECTS = unit/experimental/awaitable_operators.$(OBJEXT)
+unit_experimental_awaitable_operators_OBJECTS = \
+ $(am_unit_experimental_awaitable_operators_OBJECTS)
+unit_experimental_awaitable_operators_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_awaitable_operators_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_basic_channel_SOURCES_DIST = \
+ unit/experimental/basic_channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_basic_channel_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel.$(OBJEXT)
+unit_experimental_basic_channel_OBJECTS = \
+ $(am_unit_experimental_basic_channel_OBJECTS)
+unit_experimental_basic_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_basic_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_basic_concurrent_channel_SOURCES_DIST = \
+ unit/experimental/basic_concurrent_channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_basic_concurrent_channel_OBJECTS = unit/experimental/basic_concurrent_channel.$(OBJEXT)
+unit_experimental_basic_concurrent_channel_OBJECTS = \
+ $(am_unit_experimental_basic_concurrent_channel_OBJECTS)
+unit_experimental_basic_concurrent_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_basic_concurrent_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_channel_SOURCES_DIST = \
+ unit/experimental/channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_channel_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/channel.$(OBJEXT)
+unit_experimental_channel_OBJECTS = \
+ $(am_unit_experimental_channel_OBJECTS)
+unit_experimental_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_channel_traits_SOURCES_DIST = \
+ unit/experimental/channel_traits.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_channel_traits_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits.$(OBJEXT)
+unit_experimental_channel_traits_OBJECTS = \
+ $(am_unit_experimental_channel_traits_OBJECTS)
+unit_experimental_channel_traits_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_channel_traits_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_co_composed_SOURCES_DIST = \
+ unit/experimental/co_composed.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_co_composed_OBJECTS = unit/experimental/co_composed.$(OBJEXT)
+unit_experimental_co_composed_OBJECTS = \
+ $(am_unit_experimental_co_composed_OBJECTS)
+unit_experimental_co_composed_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_co_composed_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_concurrent_channel_SOURCES_DIST = \
+ unit/experimental/concurrent_channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_concurrent_channel_OBJECTS = unit/experimental/concurrent_channel.$(OBJEXT)
+unit_experimental_concurrent_channel_OBJECTS = \
+ $(am_unit_experimental_concurrent_channel_OBJECTS)
+unit_experimental_concurrent_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_concurrent_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_allocator_SOURCES_DIST = \
+ unit/experimental/coro/allocator.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_allocator_OBJECTS = unit/experimental/coro/allocator.$(OBJEXT)
+unit_experimental_coro_allocator_OBJECTS = \
+ $(am_unit_experimental_coro_allocator_OBJECTS)
+unit_experimental_coro_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_cancel_SOURCES_DIST = \
+ unit/experimental/coro/cancel.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_cancel_OBJECTS = unit/experimental/coro/cancel.$(OBJEXT)
+unit_experimental_coro_cancel_OBJECTS = \
+ $(am_unit_experimental_coro_cancel_OBJECTS)
+unit_experimental_coro_cancel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_cancel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_co_spawn_SOURCES_DIST = \
+ unit/experimental/coro/co_spawn.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_co_spawn_OBJECTS = unit/experimental/coro/co_spawn.$(OBJEXT)
+unit_experimental_coro_co_spawn_OBJECTS = \
+ $(am_unit_experimental_coro_co_spawn_OBJECTS)
+unit_experimental_coro_co_spawn_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_co_spawn_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_exception_SOURCES_DIST = \
+ unit/experimental/coro/exception.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_exception_OBJECTS = unit/experimental/coro/exception.$(OBJEXT)
+unit_experimental_coro_exception_OBJECTS = \
+ $(am_unit_experimental_coro_exception_OBJECTS)
+unit_experimental_coro_exception_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_exception_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_executor_SOURCES_DIST = \
+ unit/experimental/coro/executor.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_executor_OBJECTS = unit/experimental/coro/executor.$(OBJEXT)
+unit_experimental_coro_executor_OBJECTS = \
+ $(am_unit_experimental_coro_executor_OBJECTS)
+unit_experimental_coro_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_partial_SOURCES_DIST = \
+ unit/experimental/coro/partial.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_partial_OBJECTS = unit/experimental/coro/partial.$(OBJEXT)
+unit_experimental_coro_partial_OBJECTS = \
+ $(am_unit_experimental_coro_partial_OBJECTS)
+unit_experimental_coro_partial_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_partial_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_simple_test_SOURCES_DIST = \
+ unit/experimental/coro/simple_test.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_simple_test_OBJECTS = unit/experimental/coro/simple_test.$(OBJEXT)
+unit_experimental_coro_simple_test_OBJECTS = \
+ $(am_unit_experimental_coro_simple_test_OBJECTS)
+unit_experimental_coro_simple_test_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_simple_test_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_stack_test_SOURCES_DIST = \
+ unit/experimental/coro/stack_test.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_stack_test_OBJECTS = unit/experimental/coro/stack_test.$(OBJEXT)
+unit_experimental_coro_stack_test_OBJECTS = \
+ $(am_unit_experimental_coro_stack_test_OBJECTS)
+unit_experimental_coro_stack_test_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_stack_test_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_use_coro_SOURCES_DIST = \
+ unit/experimental/coro/use_coro.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_use_coro_OBJECTS = unit/experimental/coro/use_coro.$(OBJEXT)
+unit_experimental_coro_use_coro_OBJECTS = \
+ $(am_unit_experimental_coro_use_coro_OBJECTS)
+unit_experimental_coro_use_coro_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_use_coro_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_parallel_group_SOURCES_DIST = \
+ unit/experimental/parallel_group.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_parallel_group_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group.$(OBJEXT)
+unit_experimental_parallel_group_OBJECTS = \
+ $(am_unit_experimental_parallel_group_OBJECTS)
+unit_experimental_parallel_group_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_parallel_group_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_promise_SOURCES_DIST = \
+ unit/experimental/promise.cpp
+@HAVE_CXX20_TRUE@am_unit_experimental_promise_OBJECTS = \
+@HAVE_CXX20_TRUE@ unit/experimental/promise.$(OBJEXT)
+unit_experimental_promise_OBJECTS = \
+ $(am_unit_experimental_promise_OBJECTS)
+unit_experimental_promise_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_promise_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_file_base_OBJECTS = unit/file_base.$(OBJEXT)
+unit_file_base_OBJECTS = $(am_unit_file_base_OBJECTS)
+unit_file_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_file_base_DEPENDENCIES = libasio.a
+am_unit_generic_basic_endpoint_OBJECTS = \
+ unit/generic/basic_endpoint.$(OBJEXT)
+unit_generic_basic_endpoint_OBJECTS = \
+ $(am_unit_generic_basic_endpoint_OBJECTS)
+unit_generic_basic_endpoint_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_generic_basic_endpoint_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_generic_datagram_protocol_OBJECTS = \
+ unit/generic/datagram_protocol.$(OBJEXT)
+unit_generic_datagram_protocol_OBJECTS = \
+ $(am_unit_generic_datagram_protocol_OBJECTS)
+unit_generic_datagram_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_generic_datagram_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_generic_raw_protocol_OBJECTS = \
+ unit/generic/raw_protocol.$(OBJEXT)
+unit_generic_raw_protocol_OBJECTS = \
+ $(am_unit_generic_raw_protocol_OBJECTS)
+unit_generic_raw_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_generic_raw_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_generic_seq_packet_protocol_OBJECTS = \
+ unit/generic/seq_packet_protocol.$(OBJEXT)
+unit_generic_seq_packet_protocol_OBJECTS = \
+ $(am_unit_generic_seq_packet_protocol_OBJECTS)
+unit_generic_seq_packet_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_generic_seq_packet_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_generic_stream_protocol_OBJECTS = \
+ unit/generic/stream_protocol.$(OBJEXT)
+unit_generic_stream_protocol_OBJECTS = \
+ $(am_unit_generic_stream_protocol_OBJECTS)
+unit_generic_stream_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_generic_stream_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_high_resolution_timer_OBJECTS = \
+ unit/high_resolution_timer.$(OBJEXT)
+unit_high_resolution_timer_OBJECTS = \
+ $(am_unit_high_resolution_timer_OBJECTS)
+unit_high_resolution_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_high_resolution_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_io_context_OBJECTS = unit/io_context.$(OBJEXT)
+unit_io_context_OBJECTS = $(am_unit_io_context_OBJECTS)
+unit_io_context_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_io_context_DEPENDENCIES = libasio.a
+am_unit_io_context_strand_OBJECTS = unit/io_context_strand.$(OBJEXT)
+unit_io_context_strand_OBJECTS = $(am_unit_io_context_strand_OBJECTS)
+unit_io_context_strand_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_io_context_strand_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_address_OBJECTS = unit/ip/address.$(OBJEXT)
+unit_ip_address_OBJECTS = $(am_unit_ip_address_OBJECTS)
+unit_ip_address_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_DEPENDENCIES = libasio.a
+am_unit_ip_address_v4_OBJECTS = unit/ip/address_v4.$(OBJEXT)
+unit_ip_address_v4_OBJECTS = $(am_unit_ip_address_v4_OBJECTS)
+unit_ip_address_v4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_v4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_address_v4_iterator_OBJECTS = \
+ unit/ip/address_v4_iterator.$(OBJEXT)
+unit_ip_address_v4_iterator_OBJECTS = \
+ $(am_unit_ip_address_v4_iterator_OBJECTS)
+unit_ip_address_v4_iterator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_v4_iterator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_address_v4_range_OBJECTS = \
+ unit/ip/address_v4_range.$(OBJEXT)
+unit_ip_address_v4_range_OBJECTS = \
+ $(am_unit_ip_address_v4_range_OBJECTS)
+unit_ip_address_v4_range_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_v4_range_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_address_v6_OBJECTS = unit/ip/address_v6.$(OBJEXT)
+unit_ip_address_v6_OBJECTS = $(am_unit_ip_address_v6_OBJECTS)
+unit_ip_address_v6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_v6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_address_v6_iterator_OBJECTS = \
+ unit/ip/address_v6_iterator.$(OBJEXT)
+unit_ip_address_v6_iterator_OBJECTS = \
+ $(am_unit_ip_address_v6_iterator_OBJECTS)
+unit_ip_address_v6_iterator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_v6_iterator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_address_v6_range_OBJECTS = \
+ unit/ip/address_v6_range.$(OBJEXT)
+unit_ip_address_v6_range_OBJECTS = \
+ $(am_unit_ip_address_v6_range_OBJECTS)
+unit_ip_address_v6_range_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_address_v6_range_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_basic_endpoint_OBJECTS = unit/ip/basic_endpoint.$(OBJEXT)
+unit_ip_basic_endpoint_OBJECTS = $(am_unit_ip_basic_endpoint_OBJECTS)
+unit_ip_basic_endpoint_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_basic_endpoint_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_basic_resolver_OBJECTS = unit/ip/basic_resolver.$(OBJEXT)
+unit_ip_basic_resolver_OBJECTS = $(am_unit_ip_basic_resolver_OBJECTS)
+unit_ip_basic_resolver_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_basic_resolver_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_basic_resolver_entry_OBJECTS = \
+ unit/ip/basic_resolver_entry.$(OBJEXT)
+unit_ip_basic_resolver_entry_OBJECTS = \
+ $(am_unit_ip_basic_resolver_entry_OBJECTS)
+unit_ip_basic_resolver_entry_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_basic_resolver_entry_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_basic_resolver_iterator_OBJECTS = \
+ unit/ip/basic_resolver_iterator.$(OBJEXT)
+unit_ip_basic_resolver_iterator_OBJECTS = \
+ $(am_unit_ip_basic_resolver_iterator_OBJECTS)
+unit_ip_basic_resolver_iterator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_basic_resolver_iterator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_basic_resolver_query_OBJECTS = \
+ unit/ip/basic_resolver_query.$(OBJEXT)
+unit_ip_basic_resolver_query_OBJECTS = \
+ $(am_unit_ip_basic_resolver_query_OBJECTS)
+unit_ip_basic_resolver_query_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_basic_resolver_query_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_host_name_OBJECTS = unit/ip/host_name.$(OBJEXT)
+unit_ip_host_name_OBJECTS = $(am_unit_ip_host_name_OBJECTS)
+unit_ip_host_name_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_host_name_DEPENDENCIES = libasio.a
+am_unit_ip_icmp_OBJECTS = unit/ip/icmp.$(OBJEXT)
+unit_ip_icmp_OBJECTS = $(am_unit_ip_icmp_OBJECTS)
+unit_ip_icmp_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_icmp_DEPENDENCIES = libasio.a
+am_unit_ip_multicast_OBJECTS = unit/ip/multicast.$(OBJEXT)
+unit_ip_multicast_OBJECTS = $(am_unit_ip_multicast_OBJECTS)
+unit_ip_multicast_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_multicast_DEPENDENCIES = libasio.a
+am_unit_ip_network_v4_OBJECTS = unit/ip/network_v4.$(OBJEXT)
+unit_ip_network_v4_OBJECTS = $(am_unit_ip_network_v4_OBJECTS)
+unit_ip_network_v4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_network_v4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_network_v6_OBJECTS = unit/ip/network_v6.$(OBJEXT)
+unit_ip_network_v6_OBJECTS = $(am_unit_ip_network_v6_OBJECTS)
+unit_ip_network_v6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_network_v6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_resolver_query_base_OBJECTS = \
+ unit/ip/resolver_query_base.$(OBJEXT)
+unit_ip_resolver_query_base_OBJECTS = \
+ $(am_unit_ip_resolver_query_base_OBJECTS)
+unit_ip_resolver_query_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_resolver_query_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ip_tcp_OBJECTS = unit/ip/tcp.$(OBJEXT)
+unit_ip_tcp_OBJECTS = $(am_unit_ip_tcp_OBJECTS)
+unit_ip_tcp_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_tcp_DEPENDENCIES = libasio.a
+am_unit_ip_udp_OBJECTS = unit/ip/udp.$(OBJEXT)
+unit_ip_udp_OBJECTS = $(am_unit_ip_udp_OBJECTS)
+unit_ip_udp_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_udp_DEPENDENCIES = libasio.a
+am_unit_ip_unicast_OBJECTS = unit/ip/unicast.$(OBJEXT)
+unit_ip_unicast_OBJECTS = $(am_unit_ip_unicast_OBJECTS)
+unit_ip_unicast_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_unicast_DEPENDENCIES = libasio.a
+am_unit_ip_v6_only_OBJECTS = unit/ip/v6_only.$(OBJEXT)
+unit_ip_v6_only_OBJECTS = $(am_unit_ip_v6_only_OBJECTS)
+unit_ip_v6_only_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ip_v6_only_DEPENDENCIES = libasio.a
+am_unit_is_read_buffered_OBJECTS = unit/is_read_buffered.$(OBJEXT)
+unit_is_read_buffered_OBJECTS = $(am_unit_is_read_buffered_OBJECTS)
+unit_is_read_buffered_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_is_read_buffered_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_is_write_buffered_OBJECTS = unit/is_write_buffered.$(OBJEXT)
+unit_is_write_buffered_OBJECTS = $(am_unit_is_write_buffered_OBJECTS)
+unit_is_write_buffered_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_is_write_buffered_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_local_basic_endpoint_OBJECTS = \
+ unit/local/basic_endpoint.$(OBJEXT)
+unit_local_basic_endpoint_OBJECTS = \
+ $(am_unit_local_basic_endpoint_OBJECTS)
+unit_local_basic_endpoint_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_local_basic_endpoint_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_local_connect_pair_OBJECTS = \
+ unit/local/connect_pair.$(OBJEXT)
+unit_local_connect_pair_OBJECTS = \
+ $(am_unit_local_connect_pair_OBJECTS)
+unit_local_connect_pair_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_local_connect_pair_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_local_datagram_protocol_OBJECTS = \
+ unit/local/datagram_protocol.$(OBJEXT)
+unit_local_datagram_protocol_OBJECTS = \
+ $(am_unit_local_datagram_protocol_OBJECTS)
+unit_local_datagram_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_local_datagram_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_local_seq_packet_protocol_OBJECTS = \
+ unit/local/seq_packet_protocol.$(OBJEXT)
+unit_local_seq_packet_protocol_OBJECTS = \
+ $(am_unit_local_seq_packet_protocol_OBJECTS)
+unit_local_seq_packet_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_local_seq_packet_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_local_stream_protocol_OBJECTS = \
+ unit/local/stream_protocol.$(OBJEXT)
+unit_local_stream_protocol_OBJECTS = \
+ $(am_unit_local_stream_protocol_OBJECTS)
+unit_local_stream_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_local_stream_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_packaged_task_OBJECTS = unit/packaged_task.$(OBJEXT)
+unit_packaged_task_OBJECTS = $(am_unit_packaged_task_OBJECTS)
+unit_packaged_task_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_packaged_task_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_placeholders_OBJECTS = unit/placeholders.$(OBJEXT)
+unit_placeholders_OBJECTS = $(am_unit_placeholders_OBJECTS)
+unit_placeholders_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_placeholders_DEPENDENCIES = libasio.a
+am_unit_posix_basic_descriptor_OBJECTS = \
+ unit/posix/basic_descriptor.$(OBJEXT)
+unit_posix_basic_descriptor_OBJECTS = \
+ $(am_unit_posix_basic_descriptor_OBJECTS)
+unit_posix_basic_descriptor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_posix_basic_descriptor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_posix_basic_stream_descriptor_OBJECTS = \
+ unit/posix/basic_stream_descriptor.$(OBJEXT)
+unit_posix_basic_stream_descriptor_OBJECTS = \
+ $(am_unit_posix_basic_stream_descriptor_OBJECTS)
+unit_posix_basic_stream_descriptor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_posix_basic_stream_descriptor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_posix_descriptor_OBJECTS = unit/posix/descriptor.$(OBJEXT)
+unit_posix_descriptor_OBJECTS = $(am_unit_posix_descriptor_OBJECTS)
+unit_posix_descriptor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_posix_descriptor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_posix_descriptor_base_OBJECTS = \
+ unit/posix/descriptor_base.$(OBJEXT)
+unit_posix_descriptor_base_OBJECTS = \
+ $(am_unit_posix_descriptor_base_OBJECTS)
+unit_posix_descriptor_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_posix_descriptor_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_posix_stream_descriptor_OBJECTS = \
+ unit/posix/stream_descriptor.$(OBJEXT)
+unit_posix_stream_descriptor_OBJECTS = \
+ $(am_unit_posix_stream_descriptor_OBJECTS)
+unit_posix_stream_descriptor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_posix_stream_descriptor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_post_OBJECTS = unit/post.$(OBJEXT)
+unit_post_OBJECTS = $(am_unit_post_OBJECTS)
+unit_post_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_post_DEPENDENCIES = libasio.a
+am_unit_prepend_OBJECTS = unit/prepend.$(OBJEXT)
+unit_prepend_OBJECTS = $(am_unit_prepend_OBJECTS)
+unit_prepend_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_prepend_DEPENDENCIES = libasio.a
+am_unit_random_access_file_OBJECTS = \
+ unit/random_access_file.$(OBJEXT)
+unit_random_access_file_OBJECTS = \
+ $(am_unit_random_access_file_OBJECTS)
+unit_random_access_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_random_access_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_read_OBJECTS = unit/read.$(OBJEXT)
+unit_read_OBJECTS = $(am_unit_read_OBJECTS)
+unit_read_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_read_DEPENDENCIES = libasio.a
+am_unit_read_at_OBJECTS = unit/read_at.$(OBJEXT)
+unit_read_at_OBJECTS = $(am_unit_read_at_OBJECTS)
+unit_read_at_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_read_at_DEPENDENCIES = libasio.a
+am_unit_read_until_OBJECTS = unit/read_until.$(OBJEXT)
+unit_read_until_OBJECTS = $(am_unit_read_until_OBJECTS)
+unit_read_until_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_read_until_DEPENDENCIES = libasio.a
+am_unit_readable_pipe_OBJECTS = unit/readable_pipe.$(OBJEXT)
+unit_readable_pipe_OBJECTS = $(am_unit_readable_pipe_OBJECTS)
+unit_readable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_readable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_recycling_allocator_OBJECTS = \
+ unit/recycling_allocator.$(OBJEXT)
+unit_recycling_allocator_OBJECTS = \
+ $(am_unit_recycling_allocator_OBJECTS)
+unit_recycling_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_recycling_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_redirect_error_OBJECTS = unit/redirect_error.$(OBJEXT)
+unit_redirect_error_OBJECTS = $(am_unit_redirect_error_OBJECTS)
+unit_redirect_error_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_redirect_error_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_registered_buffer_OBJECTS = unit/registered_buffer.$(OBJEXT)
+unit_registered_buffer_OBJECTS = $(am_unit_registered_buffer_OBJECTS)
+unit_registered_buffer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_registered_buffer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_serial_port_OBJECTS = unit/serial_port.$(OBJEXT)
+unit_serial_port_OBJECTS = $(am_unit_serial_port_OBJECTS)
+unit_serial_port_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_serial_port_DEPENDENCIES = libasio.a
+am_unit_serial_port_base_OBJECTS = unit/serial_port_base.$(OBJEXT)
+unit_serial_port_base_OBJECTS = $(am_unit_serial_port_base_OBJECTS)
+unit_serial_port_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_serial_port_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_signal_set_OBJECTS = unit/signal_set.$(OBJEXT)
+unit_signal_set_OBJECTS = $(am_unit_signal_set_OBJECTS)
+unit_signal_set_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_signal_set_DEPENDENCIES = libasio.a
+am_unit_signal_set_base_OBJECTS = unit/signal_set_base.$(OBJEXT)
+unit_signal_set_base_OBJECTS = $(am_unit_signal_set_base_OBJECTS)
+unit_signal_set_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_signal_set_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_socket_base_OBJECTS = unit/socket_base.$(OBJEXT)
+unit_socket_base_OBJECTS = $(am_unit_socket_base_OBJECTS)
+unit_socket_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_socket_base_DEPENDENCIES = libasio.a
+am__unit_ssl_context_SOURCES_DIST = unit/ssl/context.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_context_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context.$(OBJEXT)
+unit_ssl_context_OBJECTS = $(am_unit_ssl_context_OBJECTS)
+unit_ssl_context_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_context_DEPENDENCIES = libasio.a
+am__unit_ssl_context_base_SOURCES_DIST = unit/ssl/context_base.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_context_base_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/context_base.$(OBJEXT)
+unit_ssl_context_base_OBJECTS = $(am_unit_ssl_context_base_OBJECTS)
+unit_ssl_context_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_context_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_ssl_error_SOURCES_DIST = unit/ssl/error.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_error_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/error.$(OBJEXT)
+unit_ssl_error_OBJECTS = $(am_unit_ssl_error_OBJECTS)
+unit_ssl_error_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_error_DEPENDENCIES = libasio.a
+am__unit_ssl_host_name_verification_SOURCES_DIST = \
+ unit/ssl/host_name_verification.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_host_name_verification_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/host_name_verification.$(OBJEXT)
+unit_ssl_host_name_verification_OBJECTS = \
+ $(am_unit_ssl_host_name_verification_OBJECTS)
+unit_ssl_host_name_verification_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_host_name_verification_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_ssl_rfc2818_verification_SOURCES_DIST = \
+ unit/ssl/rfc2818_verification.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_rfc2818_verification_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/rfc2818_verification.$(OBJEXT)
+unit_ssl_rfc2818_verification_OBJECTS = \
+ $(am_unit_ssl_rfc2818_verification_OBJECTS)
+unit_ssl_rfc2818_verification_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_rfc2818_verification_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_ssl_stream_SOURCES_DIST = unit/ssl/stream.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_stream_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream.$(OBJEXT)
+unit_ssl_stream_OBJECTS = $(am_unit_ssl_stream_OBJECTS)
+unit_ssl_stream_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_stream_DEPENDENCIES = libasio.a
+am__unit_ssl_stream_base_SOURCES_DIST = unit/ssl/stream_base.cpp
+@HAVE_OPENSSL_TRUE@am_unit_ssl_stream_base_OBJECTS = \
+@HAVE_OPENSSL_TRUE@ unit/ssl/stream_base.$(OBJEXT)
+unit_ssl_stream_base_OBJECTS = $(am_unit_ssl_stream_base_OBJECTS)
+unit_ssl_stream_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ssl_stream_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_static_thread_pool_OBJECTS = \
+ unit/static_thread_pool.$(OBJEXT)
+unit_static_thread_pool_OBJECTS = \
+ $(am_unit_static_thread_pool_OBJECTS)
+unit_static_thread_pool_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_static_thread_pool_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_steady_timer_OBJECTS = unit/steady_timer.$(OBJEXT)
+unit_steady_timer_OBJECTS = $(am_unit_steady_timer_OBJECTS)
+unit_steady_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_steady_timer_DEPENDENCIES = libasio.a
+am_unit_strand_OBJECTS = unit/strand.$(OBJEXT)
+unit_strand_OBJECTS = $(am_unit_strand_OBJECTS)
+unit_strand_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_strand_DEPENDENCIES = libasio.a
+am_unit_stream_file_OBJECTS = unit/stream_file.$(OBJEXT)
+unit_stream_file_OBJECTS = $(am_unit_stream_file_OBJECTS)
+unit_stream_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_stream_file_DEPENDENCIES = libasio.a
+am_unit_streambuf_OBJECTS = unit/streambuf.$(OBJEXT)
+unit_streambuf_OBJECTS = $(am_unit_streambuf_OBJECTS)
+unit_streambuf_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_streambuf_DEPENDENCIES = libasio.a
+am_unit_system_context_OBJECTS = unit/system_context.$(OBJEXT)
+unit_system_context_OBJECTS = $(am_unit_system_context_OBJECTS)
+unit_system_context_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_system_context_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_system_executor_OBJECTS = unit/system_executor.$(OBJEXT)
+unit_system_executor_OBJECTS = $(am_unit_system_executor_OBJECTS)
+unit_system_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_system_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_system_timer_OBJECTS = unit/system_timer.$(OBJEXT)
+unit_system_timer_OBJECTS = $(am_unit_system_timer_OBJECTS)
+unit_system_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_system_timer_DEPENDENCIES = libasio.a
+am_unit_this_coro_OBJECTS = unit/this_coro.$(OBJEXT)
+unit_this_coro_OBJECTS = $(am_unit_this_coro_OBJECTS)
+unit_this_coro_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_this_coro_DEPENDENCIES = libasio.a
+am_unit_thread_OBJECTS = unit/thread.$(OBJEXT)
+unit_thread_OBJECTS = $(am_unit_thread_OBJECTS)
+unit_thread_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_thread_DEPENDENCIES = libasio.a
+am_unit_thread_pool_OBJECTS = unit/thread_pool.$(OBJEXT)
+unit_thread_pool_OBJECTS = $(am_unit_thread_pool_OBJECTS)
+unit_thread_pool_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_thread_pool_DEPENDENCIES = libasio.a
+am_unit_time_traits_OBJECTS = unit/time_traits.$(OBJEXT)
+unit_time_traits_OBJECTS = $(am_unit_time_traits_OBJECTS)
+unit_time_traits_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_time_traits_DEPENDENCIES = libasio.a
+am_unit_ts_buffer_OBJECTS = unit/ts/buffer.$(OBJEXT)
+unit_ts_buffer_OBJECTS = $(am_unit_ts_buffer_OBJECTS)
+unit_ts_buffer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_buffer_DEPENDENCIES = libasio.a
+am_unit_ts_executor_OBJECTS = unit/ts/executor.$(OBJEXT)
+unit_ts_executor_OBJECTS = $(am_unit_ts_executor_OBJECTS)
+unit_ts_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_executor_DEPENDENCIES = libasio.a
+am_unit_ts_internet_OBJECTS = unit/ts/internet.$(OBJEXT)
+unit_ts_internet_OBJECTS = $(am_unit_ts_internet_OBJECTS)
+unit_ts_internet_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_internet_DEPENDENCIES = libasio.a
+am_unit_ts_io_context_OBJECTS = unit/ts/io_context.$(OBJEXT)
+unit_ts_io_context_OBJECTS = $(am_unit_ts_io_context_OBJECTS)
+unit_ts_io_context_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_io_context_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_ts_net_OBJECTS = unit/ts/net.$(OBJEXT)
+unit_ts_net_OBJECTS = $(am_unit_ts_net_OBJECTS)
+unit_ts_net_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_net_DEPENDENCIES = libasio.a
+am_unit_ts_netfwd_OBJECTS = unit/ts/netfwd.$(OBJEXT)
+unit_ts_netfwd_OBJECTS = $(am_unit_ts_netfwd_OBJECTS)
+unit_ts_netfwd_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_netfwd_DEPENDENCIES = libasio.a
+am_unit_ts_socket_OBJECTS = unit/ts/socket.$(OBJEXT)
+unit_ts_socket_OBJECTS = $(am_unit_ts_socket_OBJECTS)
+unit_ts_socket_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_socket_DEPENDENCIES = libasio.a
+am_unit_ts_timer_OBJECTS = unit/ts/timer.$(OBJEXT)
+unit_ts_timer_OBJECTS = $(am_unit_ts_timer_OBJECTS)
+unit_ts_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_ts_timer_DEPENDENCIES = libasio.a
+am_unit_use_awaitable_OBJECTS = unit/use_awaitable.$(OBJEXT)
+unit_use_awaitable_OBJECTS = $(am_unit_use_awaitable_OBJECTS)
+unit_use_awaitable_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_use_awaitable_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_use_future_OBJECTS = unit/use_future.$(OBJEXT)
+unit_use_future_OBJECTS = $(am_unit_use_future_OBJECTS)
+unit_use_future_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_use_future_DEPENDENCIES = libasio.a
+am_unit_uses_executor_OBJECTS = unit/uses_executor.$(OBJEXT)
+unit_uses_executor_OBJECTS = $(am_unit_uses_executor_OBJECTS)
+unit_uses_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_uses_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_wait_traits_OBJECTS = unit/wait_traits.$(OBJEXT)
+unit_wait_traits_OBJECTS = $(am_unit_wait_traits_OBJECTS)
+unit_wait_traits_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_wait_traits_DEPENDENCIES = libasio.a
+am_unit_windows_basic_object_handle_OBJECTS = \
+ unit/windows/basic_object_handle.$(OBJEXT)
+unit_windows_basic_object_handle_OBJECTS = \
+ $(am_unit_windows_basic_object_handle_OBJECTS)
+unit_windows_basic_object_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_basic_object_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_basic_overlapped_handle_OBJECTS = \
+ unit/windows/basic_overlapped_handle.$(OBJEXT)
+unit_windows_basic_overlapped_handle_OBJECTS = \
+ $(am_unit_windows_basic_overlapped_handle_OBJECTS)
+unit_windows_basic_overlapped_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_basic_overlapped_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_basic_random_access_handle_OBJECTS = \
+ unit/windows/basic_random_access_handle.$(OBJEXT)
+unit_windows_basic_random_access_handle_OBJECTS = \
+ $(am_unit_windows_basic_random_access_handle_OBJECTS)
+unit_windows_basic_random_access_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_basic_random_access_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_basic_stream_handle_OBJECTS = \
+ unit/windows/basic_stream_handle.$(OBJEXT)
+unit_windows_basic_stream_handle_OBJECTS = \
+ $(am_unit_windows_basic_stream_handle_OBJECTS)
+unit_windows_basic_stream_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_basic_stream_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_object_handle_OBJECTS = \
+ unit/windows/object_handle.$(OBJEXT)
+unit_windows_object_handle_OBJECTS = \
+ $(am_unit_windows_object_handle_OBJECTS)
+unit_windows_object_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_object_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_overlapped_handle_OBJECTS = \
+ unit/windows/overlapped_handle.$(OBJEXT)
+unit_windows_overlapped_handle_OBJECTS = \
+ $(am_unit_windows_overlapped_handle_OBJECTS)
+unit_windows_overlapped_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_overlapped_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_overlapped_ptr_OBJECTS = \
+ unit/windows/overlapped_ptr.$(OBJEXT)
+unit_windows_overlapped_ptr_OBJECTS = \
+ $(am_unit_windows_overlapped_ptr_OBJECTS)
+unit_windows_overlapped_ptr_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_overlapped_ptr_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_random_access_handle_OBJECTS = \
+ unit/windows/random_access_handle.$(OBJEXT)
+unit_windows_random_access_handle_OBJECTS = \
+ $(am_unit_windows_random_access_handle_OBJECTS)
+unit_windows_random_access_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_random_access_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_windows_stream_handle_OBJECTS = \
+ unit/windows/stream_handle.$(OBJEXT)
+unit_windows_stream_handle_OBJECTS = \
+ $(am_unit_windows_stream_handle_OBJECTS)
+unit_windows_stream_handle_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_windows_stream_handle_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_writable_pipe_OBJECTS = unit/writable_pipe.$(OBJEXT)
+unit_writable_pipe_OBJECTS = $(am_unit_writable_pipe_OBJECTS)
+unit_writable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_writable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_write_OBJECTS = unit/write.$(OBJEXT)
+unit_write_OBJECTS = $(am_unit_write_OBJECTS)
+unit_write_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_write_DEPENDENCIES = libasio.a
+am_unit_write_at_OBJECTS = unit/write_at.$(OBJEXT)
+unit_write_at_OBJECTS = $(am_unit_write_at_OBJECTS)
+unit_write_at_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_write_at_DEPENDENCIES = libasio.a
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ../$(DEPDIR)/asio.Po ../$(DEPDIR)/asio_ssl.Po \
+ latency/$(DEPDIR)/tcp_client.Po \
+ latency/$(DEPDIR)/tcp_server.Po \
+ latency/$(DEPDIR)/udp_client.Po \
+ latency/$(DEPDIR)/udp_server.Po \
+ performance/$(DEPDIR)/client.Po \
+ performance/$(DEPDIR)/server.Po \
+ unit/$(DEPDIR)/any_completion_executor.Po \
+ unit/$(DEPDIR)/any_completion_handler.Po \
+ unit/$(DEPDIR)/any_io_executor.Po unit/$(DEPDIR)/append.Po \
+ unit/$(DEPDIR)/as_tuple.Po \
+ unit/$(DEPDIR)/associated_allocator.Po \
+ unit/$(DEPDIR)/associated_cancellation_slot.Po \
+ unit/$(DEPDIR)/associated_executor.Po \
+ unit/$(DEPDIR)/associated_immediate_executor.Po \
+ unit/$(DEPDIR)/associator.Po unit/$(DEPDIR)/async_result.Po \
+ unit/$(DEPDIR)/awaitable.Po \
+ unit/$(DEPDIR)/basic_datagram_socket.Po \
+ unit/$(DEPDIR)/basic_deadline_timer.Po \
+ unit/$(DEPDIR)/basic_file.Po \
+ unit/$(DEPDIR)/basic_random_access_file.Po \
+ unit/$(DEPDIR)/basic_raw_socket.Po \
+ unit/$(DEPDIR)/basic_readable_pipe.Po \
+ unit/$(DEPDIR)/basic_seq_packet_socket.Po \
+ unit/$(DEPDIR)/basic_serial_port.Po \
+ unit/$(DEPDIR)/basic_signal_set.Po \
+ unit/$(DEPDIR)/basic_socket.Po \
+ unit/$(DEPDIR)/basic_socket_acceptor.Po \
+ unit/$(DEPDIR)/basic_stream_file.Po \
+ unit/$(DEPDIR)/basic_stream_socket.Po \
+ unit/$(DEPDIR)/basic_streambuf.Po \
+ unit/$(DEPDIR)/basic_waitable_timer.Po \
+ unit/$(DEPDIR)/basic_writable_pipe.Po \
+ unit/$(DEPDIR)/bind_allocator.Po \
+ unit/$(DEPDIR)/bind_cancellation_slot.Po \
+ unit/$(DEPDIR)/bind_executor.Po \
+ unit/$(DEPDIR)/bind_immediate_executor.Po \
+ unit/$(DEPDIR)/buffer.Po unit/$(DEPDIR)/buffer_registration.Po \
+ unit/$(DEPDIR)/buffered_read_stream.Po \
+ unit/$(DEPDIR)/buffered_stream.Po \
+ unit/$(DEPDIR)/buffered_write_stream.Po \
+ unit/$(DEPDIR)/buffers_iterator.Po \
+ unit/$(DEPDIR)/cancellation_signal.Po \
+ unit/$(DEPDIR)/cancellation_state.Po \
+ unit/$(DEPDIR)/cancellation_type.Po unit/$(DEPDIR)/co_spawn.Po \
+ unit/$(DEPDIR)/completion_condition.Po \
+ unit/$(DEPDIR)/compose.Po unit/$(DEPDIR)/connect.Po \
+ unit/$(DEPDIR)/connect_pipe.Po unit/$(DEPDIR)/consign.Po \
+ unit/$(DEPDIR)/coroutine.Po unit/$(DEPDIR)/deadline_timer.Po \
+ unit/$(DEPDIR)/defer.Po unit/$(DEPDIR)/deferred.Po \
+ unit/$(DEPDIR)/detached.Po unit/$(DEPDIR)/dispatch.Po \
+ unit/$(DEPDIR)/error.Po unit/$(DEPDIR)/execution_context.Po \
+ unit/$(DEPDIR)/executor.Po \
+ unit/$(DEPDIR)/executor_work_guard.Po \
+ unit/$(DEPDIR)/file_base.Po \
+ unit/$(DEPDIR)/high_resolution_timer.Po \
+ unit/$(DEPDIR)/io_context.Po \
+ unit/$(DEPDIR)/io_context_strand.Po \
+ unit/$(DEPDIR)/is_read_buffered.Po \
+ unit/$(DEPDIR)/is_write_buffered.Po \
+ unit/$(DEPDIR)/packaged_task.Po unit/$(DEPDIR)/placeholders.Po \
+ unit/$(DEPDIR)/post.Po unit/$(DEPDIR)/prepend.Po \
+ unit/$(DEPDIR)/random_access_file.Po unit/$(DEPDIR)/read.Po \
+ unit/$(DEPDIR)/read_at.Po unit/$(DEPDIR)/read_until.Po \
+ unit/$(DEPDIR)/readable_pipe.Po \
+ unit/$(DEPDIR)/recycling_allocator.Po \
+ unit/$(DEPDIR)/redirect_error.Po \
+ unit/$(DEPDIR)/registered_buffer.Po \
+ unit/$(DEPDIR)/serial_port.Po \
+ unit/$(DEPDIR)/serial_port_base.Po \
+ unit/$(DEPDIR)/signal_set.Po unit/$(DEPDIR)/signal_set_base.Po \
+ unit/$(DEPDIR)/socket_base.Po \
+ unit/$(DEPDIR)/static_thread_pool.Po \
+ unit/$(DEPDIR)/steady_timer.Po unit/$(DEPDIR)/strand.Po \
+ unit/$(DEPDIR)/stream_file.Po unit/$(DEPDIR)/streambuf.Po \
+ unit/$(DEPDIR)/system_context.Po \
+ unit/$(DEPDIR)/system_executor.Po \
+ unit/$(DEPDIR)/system_timer.Po unit/$(DEPDIR)/this_coro.Po \
+ unit/$(DEPDIR)/thread.Po unit/$(DEPDIR)/thread_pool.Po \
+ unit/$(DEPDIR)/time_traits.Po unit/$(DEPDIR)/use_awaitable.Po \
+ unit/$(DEPDIR)/use_future.Po unit/$(DEPDIR)/uses_executor.Po \
+ unit/$(DEPDIR)/wait_traits.Po unit/$(DEPDIR)/writable_pipe.Po \
+ unit/$(DEPDIR)/write.Po unit/$(DEPDIR)/write_at.Po \
+ unit/execution/$(DEPDIR)/any_executor.Po \
+ unit/execution/$(DEPDIR)/blocking.Po \
+ unit/execution/$(DEPDIR)/blocking_adaptation.Po \
+ unit/execution/$(DEPDIR)/context_as.Po \
+ unit/execution/$(DEPDIR)/executor.Po \
+ unit/execution/$(DEPDIR)/invocable_archetype.Po \
+ unit/execution/$(DEPDIR)/mapping.Po \
+ unit/execution/$(DEPDIR)/outstanding_work.Po \
+ unit/execution/$(DEPDIR)/prefer_only.Po \
+ unit/execution/$(DEPDIR)/relationship.Po \
+ unit/experimental/$(DEPDIR)/awaitable_operators.Po \
+ unit/experimental/$(DEPDIR)/basic_channel.Po \
+ unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po \
+ unit/experimental/$(DEPDIR)/channel.Po \
+ unit/experimental/$(DEPDIR)/channel_traits.Po \
+ unit/experimental/$(DEPDIR)/co_composed.Po \
+ unit/experimental/$(DEPDIR)/concurrent_channel.Po \
+ unit/experimental/$(DEPDIR)/parallel_group.Po \
+ unit/experimental/$(DEPDIR)/promise.Po \
+ unit/experimental/coro/$(DEPDIR)/allocator.Po \
+ unit/experimental/coro/$(DEPDIR)/cancel.Po \
+ unit/experimental/coro/$(DEPDIR)/co_spawn.Po \
+ unit/experimental/coro/$(DEPDIR)/exception.Po \
+ unit/experimental/coro/$(DEPDIR)/executor.Po \
+ unit/experimental/coro/$(DEPDIR)/partial.Po \
+ unit/experimental/coro/$(DEPDIR)/simple_test.Po \
+ unit/experimental/coro/$(DEPDIR)/stack_test.Po \
+ unit/experimental/coro/$(DEPDIR)/use_coro.Po \
+ unit/generic/$(DEPDIR)/basic_endpoint.Po \
+ unit/generic/$(DEPDIR)/datagram_protocol.Po \
+ unit/generic/$(DEPDIR)/raw_protocol.Po \
+ unit/generic/$(DEPDIR)/seq_packet_protocol.Po \
+ unit/generic/$(DEPDIR)/stream_protocol.Po \
+ unit/ip/$(DEPDIR)/address.Po unit/ip/$(DEPDIR)/address_v4.Po \
+ unit/ip/$(DEPDIR)/address_v4_iterator.Po \
+ unit/ip/$(DEPDIR)/address_v4_range.Po \
+ unit/ip/$(DEPDIR)/address_v6.Po \
+ unit/ip/$(DEPDIR)/address_v6_iterator.Po \
+ unit/ip/$(DEPDIR)/address_v6_range.Po \
+ unit/ip/$(DEPDIR)/basic_endpoint.Po \
+ unit/ip/$(DEPDIR)/basic_resolver.Po \
+ unit/ip/$(DEPDIR)/basic_resolver_entry.Po \
+ unit/ip/$(DEPDIR)/basic_resolver_iterator.Po \
+ unit/ip/$(DEPDIR)/basic_resolver_query.Po \
+ unit/ip/$(DEPDIR)/host_name.Po unit/ip/$(DEPDIR)/icmp.Po \
+ unit/ip/$(DEPDIR)/multicast.Po unit/ip/$(DEPDIR)/network_v4.Po \
+ unit/ip/$(DEPDIR)/network_v6.Po \
+ unit/ip/$(DEPDIR)/resolver_query_base.Po \
+ unit/ip/$(DEPDIR)/tcp.Po unit/ip/$(DEPDIR)/udp.Po \
+ unit/ip/$(DEPDIR)/unicast.Po unit/ip/$(DEPDIR)/v6_only.Po \
+ unit/local/$(DEPDIR)/basic_endpoint.Po \
+ unit/local/$(DEPDIR)/connect_pair.Po \
+ unit/local/$(DEPDIR)/datagram_protocol.Po \
+ unit/local/$(DEPDIR)/seq_packet_protocol.Po \
+ unit/local/$(DEPDIR)/stream_protocol.Po \
+ unit/posix/$(DEPDIR)/basic_descriptor.Po \
+ unit/posix/$(DEPDIR)/basic_stream_descriptor.Po \
+ unit/posix/$(DEPDIR)/descriptor.Po \
+ unit/posix/$(DEPDIR)/descriptor_base.Po \
+ unit/posix/$(DEPDIR)/stream_descriptor.Po \
+ unit/ssl/$(DEPDIR)/context.Po \
+ unit/ssl/$(DEPDIR)/context_base.Po unit/ssl/$(DEPDIR)/error.Po \
+ unit/ssl/$(DEPDIR)/host_name_verification.Po \
+ unit/ssl/$(DEPDIR)/rfc2818_verification.Po \
+ unit/ssl/$(DEPDIR)/stream.Po unit/ssl/$(DEPDIR)/stream_base.Po \
+ unit/ts/$(DEPDIR)/buffer.Po unit/ts/$(DEPDIR)/executor.Po \
+ unit/ts/$(DEPDIR)/internet.Po unit/ts/$(DEPDIR)/io_context.Po \
+ unit/ts/$(DEPDIR)/net.Po unit/ts/$(DEPDIR)/netfwd.Po \
+ unit/ts/$(DEPDIR)/socket.Po unit/ts/$(DEPDIR)/timer.Po \
+ unit/windows/$(DEPDIR)/basic_object_handle.Po \
+ unit/windows/$(DEPDIR)/basic_overlapped_handle.Po \
+ unit/windows/$(DEPDIR)/basic_random_access_handle.Po \
+ unit/windows/$(DEPDIR)/basic_stream_handle.Po \
+ unit/windows/$(DEPDIR)/object_handle.Po \
+ unit/windows/$(DEPDIR)/overlapped_handle.Po \
+ unit/windows/$(DEPDIR)/overlapped_ptr.Po \
+ unit/windows/$(DEPDIR)/random_access_handle.Po \
+ unit/windows/$(DEPDIR)/stream_handle.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
+ $(latency_tcp_server_SOURCES) $(latency_udp_client_SOURCES) \
+ $(latency_udp_server_SOURCES) $(performance_client_SOURCES) \
+ $(performance_server_SOURCES) \
+ $(unit_any_completion_executor_SOURCES) \
+ $(unit_any_completion_handler_SOURCES) \
+ $(unit_any_io_executor_SOURCES) $(unit_append_SOURCES) \
+ $(unit_as_tuple_SOURCES) $(unit_associated_allocator_SOURCES) \
+ $(unit_associated_cancellation_slot_SOURCES) \
+ $(unit_associated_executor_SOURCES) \
+ $(unit_associated_immediate_executor_SOURCES) \
+ $(unit_associator_SOURCES) $(unit_async_result_SOURCES) \
+ $(unit_awaitable_SOURCES) \
+ $(unit_basic_datagram_socket_SOURCES) \
+ $(unit_basic_deadline_timer_SOURCES) \
+ $(unit_basic_file_SOURCES) \
+ $(unit_basic_random_access_file_SOURCES) \
+ $(unit_basic_raw_socket_SOURCES) \
+ $(unit_basic_readable_pipe_SOURCES) \
+ $(unit_basic_seq_packet_socket_SOURCES) \
+ $(unit_basic_serial_port_SOURCES) \
+ $(unit_basic_signal_set_SOURCES) $(unit_basic_socket_SOURCES) \
+ $(unit_basic_socket_acceptor_SOURCES) \
+ $(unit_basic_stream_file_SOURCES) \
+ $(unit_basic_stream_socket_SOURCES) \
+ $(unit_basic_streambuf_SOURCES) \
+ $(unit_basic_waitable_timer_SOURCES) \
+ $(unit_basic_writable_pipe_SOURCES) \
+ $(unit_bind_allocator_SOURCES) \
+ $(unit_bind_cancellation_slot_SOURCES) \
+ $(unit_bind_executor_SOURCES) \
+ $(unit_bind_immediate_executor_SOURCES) $(unit_buffer_SOURCES) \
+ $(unit_buffer_registration_SOURCES) \
+ $(unit_buffered_read_stream_SOURCES) \
+ $(unit_buffered_stream_SOURCES) \
+ $(unit_buffered_write_stream_SOURCES) \
+ $(unit_buffers_iterator_SOURCES) \
+ $(unit_cancellation_signal_SOURCES) \
+ $(unit_cancellation_state_SOURCES) \
+ $(unit_cancellation_type_SOURCES) $(unit_co_spawn_SOURCES) \
+ $(unit_completion_condition_SOURCES) $(unit_compose_SOURCES) \
+ $(unit_connect_SOURCES) $(unit_connect_pipe_SOURCES) \
+ $(unit_consign_SOURCES) $(unit_coroutine_SOURCES) \
+ $(unit_deadline_timer_SOURCES) $(unit_defer_SOURCES) \
+ $(unit_deferred_SOURCES) $(unit_detached_SOURCES) \
+ $(unit_dispatch_SOURCES) $(unit_error_SOURCES) \
+ $(unit_execution_any_executor_SOURCES) \
+ $(unit_execution_blocking_SOURCES) \
+ $(unit_execution_blocking_adaptation_SOURCES) \
+ $(unit_execution_context_as_SOURCES) \
+ $(unit_execution_executor_SOURCES) \
+ $(unit_execution_invocable_archetype_SOURCES) \
+ $(unit_execution_mapping_SOURCES) \
+ $(unit_execution_outstanding_work_SOURCES) \
+ $(unit_execution_prefer_only_SOURCES) \
+ $(unit_execution_relationship_SOURCES) \
+ $(unit_execution_context_SOURCES) $(unit_executor_SOURCES) \
+ $(unit_executor_work_guard_SOURCES) \
+ $(unit_experimental_awaitable_operators_SOURCES) \
+ $(unit_experimental_basic_channel_SOURCES) \
+ $(unit_experimental_basic_concurrent_channel_SOURCES) \
+ $(unit_experimental_channel_SOURCES) \
+ $(unit_experimental_channel_traits_SOURCES) \
+ $(unit_experimental_co_composed_SOURCES) \
+ $(unit_experimental_concurrent_channel_SOURCES) \
+ $(unit_experimental_coro_allocator_SOURCES) \
+ $(unit_experimental_coro_cancel_SOURCES) \
+ $(unit_experimental_coro_co_spawn_SOURCES) \
+ $(unit_experimental_coro_exception_SOURCES) \
+ $(unit_experimental_coro_executor_SOURCES) \
+ $(unit_experimental_coro_partial_SOURCES) \
+ $(unit_experimental_coro_simple_test_SOURCES) \
+ $(unit_experimental_coro_stack_test_SOURCES) \
+ $(unit_experimental_coro_use_coro_SOURCES) \
+ $(unit_experimental_parallel_group_SOURCES) \
+ $(unit_experimental_promise_SOURCES) $(unit_file_base_SOURCES) \
+ $(unit_generic_basic_endpoint_SOURCES) \
+ $(unit_generic_datagram_protocol_SOURCES) \
+ $(unit_generic_raw_protocol_SOURCES) \
+ $(unit_generic_seq_packet_protocol_SOURCES) \
+ $(unit_generic_stream_protocol_SOURCES) \
+ $(unit_high_resolution_timer_SOURCES) \
+ $(unit_io_context_SOURCES) $(unit_io_context_strand_SOURCES) \
+ $(unit_ip_address_SOURCES) $(unit_ip_address_v4_SOURCES) \
+ $(unit_ip_address_v4_iterator_SOURCES) \
+ $(unit_ip_address_v4_range_SOURCES) \
+ $(unit_ip_address_v6_SOURCES) \
+ $(unit_ip_address_v6_iterator_SOURCES) \
+ $(unit_ip_address_v6_range_SOURCES) \
+ $(unit_ip_basic_endpoint_SOURCES) \
+ $(unit_ip_basic_resolver_SOURCES) \
+ $(unit_ip_basic_resolver_entry_SOURCES) \
+ $(unit_ip_basic_resolver_iterator_SOURCES) \
+ $(unit_ip_basic_resolver_query_SOURCES) \
+ $(unit_ip_host_name_SOURCES) $(unit_ip_icmp_SOURCES) \
+ $(unit_ip_multicast_SOURCES) $(unit_ip_network_v4_SOURCES) \
+ $(unit_ip_network_v6_SOURCES) \
+ $(unit_ip_resolver_query_base_SOURCES) $(unit_ip_tcp_SOURCES) \
+ $(unit_ip_udp_SOURCES) $(unit_ip_unicast_SOURCES) \
+ $(unit_ip_v6_only_SOURCES) $(unit_is_read_buffered_SOURCES) \
+ $(unit_is_write_buffered_SOURCES) \
+ $(unit_local_basic_endpoint_SOURCES) \
+ $(unit_local_connect_pair_SOURCES) \
+ $(unit_local_datagram_protocol_SOURCES) \
+ $(unit_local_seq_packet_protocol_SOURCES) \
+ $(unit_local_stream_protocol_SOURCES) \
+ $(unit_packaged_task_SOURCES) $(unit_placeholders_SOURCES) \
+ $(unit_posix_basic_descriptor_SOURCES) \
+ $(unit_posix_basic_stream_descriptor_SOURCES) \
+ $(unit_posix_descriptor_SOURCES) \
+ $(unit_posix_descriptor_base_SOURCES) \
+ $(unit_posix_stream_descriptor_SOURCES) $(unit_post_SOURCES) \
+ $(unit_prepend_SOURCES) $(unit_random_access_file_SOURCES) \
+ $(unit_read_SOURCES) $(unit_read_at_SOURCES) \
+ $(unit_read_until_SOURCES) $(unit_readable_pipe_SOURCES) \
+ $(unit_recycling_allocator_SOURCES) \
+ $(unit_redirect_error_SOURCES) \
+ $(unit_registered_buffer_SOURCES) $(unit_serial_port_SOURCES) \
+ $(unit_serial_port_base_SOURCES) $(unit_signal_set_SOURCES) \
+ $(unit_signal_set_base_SOURCES) $(unit_socket_base_SOURCES) \
+ $(unit_ssl_context_SOURCES) $(unit_ssl_context_base_SOURCES) \
+ $(unit_ssl_error_SOURCES) \
+ $(unit_ssl_host_name_verification_SOURCES) \
+ $(unit_ssl_rfc2818_verification_SOURCES) \
+ $(unit_ssl_stream_SOURCES) $(unit_ssl_stream_base_SOURCES) \
+ $(unit_static_thread_pool_SOURCES) \
+ $(unit_steady_timer_SOURCES) $(unit_strand_SOURCES) \
+ $(unit_stream_file_SOURCES) $(unit_streambuf_SOURCES) \
+ $(unit_system_context_SOURCES) $(unit_system_executor_SOURCES) \
+ $(unit_system_timer_SOURCES) $(unit_this_coro_SOURCES) \
+ $(unit_thread_SOURCES) $(unit_thread_pool_SOURCES) \
+ $(unit_time_traits_SOURCES) $(unit_ts_buffer_SOURCES) \
+ $(unit_ts_executor_SOURCES) $(unit_ts_internet_SOURCES) \
+ $(unit_ts_io_context_SOURCES) $(unit_ts_net_SOURCES) \
+ $(unit_ts_netfwd_SOURCES) $(unit_ts_socket_SOURCES) \
+ $(unit_ts_timer_SOURCES) $(unit_use_awaitable_SOURCES) \
+ $(unit_use_future_SOURCES) $(unit_uses_executor_SOURCES) \
+ $(unit_wait_traits_SOURCES) \
+ $(unit_windows_basic_object_handle_SOURCES) \
+ $(unit_windows_basic_overlapped_handle_SOURCES) \
+ $(unit_windows_basic_random_access_handle_SOURCES) \
+ $(unit_windows_basic_stream_handle_SOURCES) \
+ $(unit_windows_object_handle_SOURCES) \
+ $(unit_windows_overlapped_handle_SOURCES) \
+ $(unit_windows_overlapped_ptr_SOURCES) \
+ $(unit_windows_random_access_handle_SOURCES) \
+ $(unit_windows_stream_handle_SOURCES) \
+ $(unit_writable_pipe_SOURCES) $(unit_write_SOURCES) \
+ $(unit_write_at_SOURCES)
+DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
+ $(am__latency_tcp_client_SOURCES_DIST) \
+ $(am__latency_tcp_server_SOURCES_DIST) \
+ $(am__latency_udp_client_SOURCES_DIST) \
+ $(am__latency_udp_server_SOURCES_DIST) \
+ $(am__performance_client_SOURCES_DIST) \
+ $(am__performance_server_SOURCES_DIST) \
+ $(unit_any_completion_executor_SOURCES) \
+ $(unit_any_completion_handler_SOURCES) \
+ $(unit_any_io_executor_SOURCES) $(unit_append_SOURCES) \
+ $(unit_as_tuple_SOURCES) $(unit_associated_allocator_SOURCES) \
+ $(unit_associated_cancellation_slot_SOURCES) \
+ $(unit_associated_executor_SOURCES) \
+ $(unit_associated_immediate_executor_SOURCES) \
+ $(unit_associator_SOURCES) $(unit_async_result_SOURCES) \
+ $(unit_awaitable_SOURCES) \
+ $(unit_basic_datagram_socket_SOURCES) \
+ $(unit_basic_deadline_timer_SOURCES) \
+ $(unit_basic_file_SOURCES) \
+ $(unit_basic_random_access_file_SOURCES) \
+ $(unit_basic_raw_socket_SOURCES) \
+ $(unit_basic_readable_pipe_SOURCES) \
+ $(unit_basic_seq_packet_socket_SOURCES) \
+ $(unit_basic_serial_port_SOURCES) \
+ $(unit_basic_signal_set_SOURCES) $(unit_basic_socket_SOURCES) \
+ $(unit_basic_socket_acceptor_SOURCES) \
+ $(unit_basic_stream_file_SOURCES) \
+ $(unit_basic_stream_socket_SOURCES) \
+ $(unit_basic_streambuf_SOURCES) \
+ $(unit_basic_waitable_timer_SOURCES) \
+ $(unit_basic_writable_pipe_SOURCES) \
+ $(unit_bind_allocator_SOURCES) \
+ $(unit_bind_cancellation_slot_SOURCES) \
+ $(unit_bind_executor_SOURCES) \
+ $(unit_bind_immediate_executor_SOURCES) $(unit_buffer_SOURCES) \
+ $(unit_buffer_registration_SOURCES) \
+ $(unit_buffered_read_stream_SOURCES) \
+ $(unit_buffered_stream_SOURCES) \
+ $(unit_buffered_write_stream_SOURCES) \
+ $(unit_buffers_iterator_SOURCES) \
+ $(unit_cancellation_signal_SOURCES) \
+ $(unit_cancellation_state_SOURCES) \
+ $(unit_cancellation_type_SOURCES) $(unit_co_spawn_SOURCES) \
+ $(unit_completion_condition_SOURCES) $(unit_compose_SOURCES) \
+ $(unit_connect_SOURCES) $(unit_connect_pipe_SOURCES) \
+ $(unit_consign_SOURCES) $(unit_coroutine_SOURCES) \
+ $(unit_deadline_timer_SOURCES) $(unit_defer_SOURCES) \
+ $(unit_deferred_SOURCES) $(unit_detached_SOURCES) \
+ $(unit_dispatch_SOURCES) $(unit_error_SOURCES) \
+ $(unit_execution_any_executor_SOURCES) \
+ $(unit_execution_blocking_SOURCES) \
+ $(unit_execution_blocking_adaptation_SOURCES) \
+ $(unit_execution_context_as_SOURCES) \
+ $(unit_execution_executor_SOURCES) \
+ $(unit_execution_invocable_archetype_SOURCES) \
+ $(unit_execution_mapping_SOURCES) \
+ $(unit_execution_outstanding_work_SOURCES) \
+ $(unit_execution_prefer_only_SOURCES) \
+ $(unit_execution_relationship_SOURCES) \
+ $(unit_execution_context_SOURCES) $(unit_executor_SOURCES) \
+ $(unit_executor_work_guard_SOURCES) \
+ $(am__unit_experimental_awaitable_operators_SOURCES_DIST) \
+ $(am__unit_experimental_basic_channel_SOURCES_DIST) \
+ $(am__unit_experimental_basic_concurrent_channel_SOURCES_DIST) \
+ $(am__unit_experimental_channel_SOURCES_DIST) \
+ $(am__unit_experimental_channel_traits_SOURCES_DIST) \
+ $(am__unit_experimental_co_composed_SOURCES_DIST) \
+ $(am__unit_experimental_concurrent_channel_SOURCES_DIST) \
+ $(am__unit_experimental_coro_allocator_SOURCES_DIST) \
+ $(am__unit_experimental_coro_cancel_SOURCES_DIST) \
+ $(am__unit_experimental_coro_co_spawn_SOURCES_DIST) \
+ $(am__unit_experimental_coro_exception_SOURCES_DIST) \
+ $(am__unit_experimental_coro_executor_SOURCES_DIST) \
+ $(am__unit_experimental_coro_partial_SOURCES_DIST) \
+ $(am__unit_experimental_coro_simple_test_SOURCES_DIST) \
+ $(am__unit_experimental_coro_stack_test_SOURCES_DIST) \
+ $(am__unit_experimental_coro_use_coro_SOURCES_DIST) \
+ $(am__unit_experimental_parallel_group_SOURCES_DIST) \
+ $(am__unit_experimental_promise_SOURCES_DIST) \
+ $(unit_file_base_SOURCES) \
+ $(unit_generic_basic_endpoint_SOURCES) \
+ $(unit_generic_datagram_protocol_SOURCES) \
+ $(unit_generic_raw_protocol_SOURCES) \
+ $(unit_generic_seq_packet_protocol_SOURCES) \
+ $(unit_generic_stream_protocol_SOURCES) \
+ $(unit_high_resolution_timer_SOURCES) \
+ $(unit_io_context_SOURCES) $(unit_io_context_strand_SOURCES) \
+ $(unit_ip_address_SOURCES) $(unit_ip_address_v4_SOURCES) \
+ $(unit_ip_address_v4_iterator_SOURCES) \
+ $(unit_ip_address_v4_range_SOURCES) \
+ $(unit_ip_address_v6_SOURCES) \
+ $(unit_ip_address_v6_iterator_SOURCES) \
+ $(unit_ip_address_v6_range_SOURCES) \
+ $(unit_ip_basic_endpoint_SOURCES) \
+ $(unit_ip_basic_resolver_SOURCES) \
+ $(unit_ip_basic_resolver_entry_SOURCES) \
+ $(unit_ip_basic_resolver_iterator_SOURCES) \
+ $(unit_ip_basic_resolver_query_SOURCES) \
+ $(unit_ip_host_name_SOURCES) $(unit_ip_icmp_SOURCES) \
+ $(unit_ip_multicast_SOURCES) $(unit_ip_network_v4_SOURCES) \
+ $(unit_ip_network_v6_SOURCES) \
+ $(unit_ip_resolver_query_base_SOURCES) $(unit_ip_tcp_SOURCES) \
+ $(unit_ip_udp_SOURCES) $(unit_ip_unicast_SOURCES) \
+ $(unit_ip_v6_only_SOURCES) $(unit_is_read_buffered_SOURCES) \
+ $(unit_is_write_buffered_SOURCES) \
+ $(unit_local_basic_endpoint_SOURCES) \
+ $(unit_local_connect_pair_SOURCES) \
+ $(unit_local_datagram_protocol_SOURCES) \
+ $(unit_local_seq_packet_protocol_SOURCES) \
+ $(unit_local_stream_protocol_SOURCES) \
+ $(unit_packaged_task_SOURCES) $(unit_placeholders_SOURCES) \
+ $(unit_posix_basic_descriptor_SOURCES) \
+ $(unit_posix_basic_stream_descriptor_SOURCES) \
+ $(unit_posix_descriptor_SOURCES) \
+ $(unit_posix_descriptor_base_SOURCES) \
+ $(unit_posix_stream_descriptor_SOURCES) $(unit_post_SOURCES) \
+ $(unit_prepend_SOURCES) $(unit_random_access_file_SOURCES) \
+ $(unit_read_SOURCES) $(unit_read_at_SOURCES) \
+ $(unit_read_until_SOURCES) $(unit_readable_pipe_SOURCES) \
+ $(unit_recycling_allocator_SOURCES) \
+ $(unit_redirect_error_SOURCES) \
+ $(unit_registered_buffer_SOURCES) $(unit_serial_port_SOURCES) \
+ $(unit_serial_port_base_SOURCES) $(unit_signal_set_SOURCES) \
+ $(unit_signal_set_base_SOURCES) $(unit_socket_base_SOURCES) \
+ $(am__unit_ssl_context_SOURCES_DIST) \
+ $(am__unit_ssl_context_base_SOURCES_DIST) \
+ $(am__unit_ssl_error_SOURCES_DIST) \
+ $(am__unit_ssl_host_name_verification_SOURCES_DIST) \
+ $(am__unit_ssl_rfc2818_verification_SOURCES_DIST) \
+ $(am__unit_ssl_stream_SOURCES_DIST) \
+ $(am__unit_ssl_stream_base_SOURCES_DIST) \
+ $(unit_static_thread_pool_SOURCES) \
+ $(unit_steady_timer_SOURCES) $(unit_strand_SOURCES) \
+ $(unit_stream_file_SOURCES) $(unit_streambuf_SOURCES) \
+ $(unit_system_context_SOURCES) $(unit_system_executor_SOURCES) \
+ $(unit_system_timer_SOURCES) $(unit_this_coro_SOURCES) \
+ $(unit_thread_SOURCES) $(unit_thread_pool_SOURCES) \
+ $(unit_time_traits_SOURCES) $(unit_ts_buffer_SOURCES) \
+ $(unit_ts_executor_SOURCES) $(unit_ts_internet_SOURCES) \
+ $(unit_ts_io_context_SOURCES) $(unit_ts_net_SOURCES) \
+ $(unit_ts_netfwd_SOURCES) $(unit_ts_socket_SOURCES) \
+ $(unit_ts_timer_SOURCES) $(unit_use_awaitable_SOURCES) \
+ $(unit_use_future_SOURCES) $(unit_uses_executor_SOURCES) \
+ $(unit_wait_traits_SOURCES) \
+ $(unit_windows_basic_object_handle_SOURCES) \
+ $(unit_windows_basic_overlapped_handle_SOURCES) \
+ $(unit_windows_basic_random_access_handle_SOURCES) \
+ $(unit_windows_basic_stream_handle_SOURCES) \
+ $(unit_windows_object_handle_SOURCES) \
+ $(unit_windows_overlapped_handle_SOURCES) \
+ $(unit_windows_overlapped_ptr_SOURCES) \
+ $(unit_windows_random_access_handle_SOURCES) \
+ $(unit_windows_stream_handle_SOURCES) \
+ $(unit_writable_pipe_SOURCES) $(unit_write_SOURCES) \
+ $(unit_write_at_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir distdir-am
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
+@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../asio.cpp \
+@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
+@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
+SUBDIRS = properties
+noinst_HEADERS = \
+ latency/high_res_clock.hpp \
+ unit/unit_test.hpp
+
+AM_CXXFLAGS = -I$(srcdir)/../../include
+@STANDALONE_FALSE@latency_tcp_client_SOURCES = latency/tcp_client.cpp
+@STANDALONE_FALSE@latency_tcp_server_SOURCES = latency/tcp_server.cpp
+@STANDALONE_FALSE@latency_udp_client_SOURCES = latency/udp_client.cpp
+@STANDALONE_FALSE@latency_udp_server_SOURCES = latency/udp_server.cpp
+@STANDALONE_FALSE@performance_client_SOURCES = performance/client.cpp
+@STANDALONE_FALSE@performance_server_SOURCES = performance/server.cpp
+unit_any_completion_executor_SOURCES = unit/any_completion_executor.cpp
+unit_any_completion_handler_SOURCES = unit/any_completion_handler.cpp
+unit_any_io_executor_SOURCES = unit/any_io_executor.cpp
+unit_append_SOURCES = unit/append.cpp
+unit_as_tuple_SOURCES = unit/as_tuple.cpp
+unit_associated_allocator_SOURCES = unit/associated_allocator.cpp
+unit_associated_cancellation_slot_SOURCES = unit/associated_cancellation_slot.cpp
+unit_associated_executor_SOURCES = unit/associated_executor.cpp
+unit_associated_immediate_executor_SOURCES = unit/associated_immediate_executor.cpp
+unit_associator_SOURCES = unit/associator.cpp
+unit_async_result_SOURCES = unit/async_result.cpp
+unit_awaitable_SOURCES = unit/awaitable.cpp
+unit_basic_datagram_socket_SOURCES = unit/basic_datagram_socket.cpp
+unit_basic_deadline_timer_SOURCES = unit/basic_deadline_timer.cpp
+unit_basic_file_SOURCES = unit/basic_file.cpp
+unit_basic_random_access_file_SOURCES = unit/basic_random_access_file.cpp
+unit_basic_raw_socket_SOURCES = unit/basic_raw_socket.cpp
+unit_basic_readable_pipe_SOURCES = unit/basic_readable_pipe.cpp
+unit_basic_seq_packet_socket_SOURCES = unit/basic_seq_packet_socket.cpp
+unit_basic_serial_port_SOURCES = unit/basic_serial_port.cpp
+unit_basic_signal_set_SOURCES = unit/basic_signal_set.cpp
+unit_basic_socket_SOURCES = unit/basic_socket.cpp
+unit_basic_socket_acceptor_SOURCES = unit/basic_socket_acceptor.cpp
+unit_basic_stream_file_SOURCES = unit/basic_stream_file.cpp
+unit_basic_stream_socket_SOURCES = unit/basic_stream_socket.cpp
+unit_basic_streambuf_SOURCES = unit/basic_streambuf.cpp
+unit_basic_waitable_timer_SOURCES = unit/basic_waitable_timer.cpp
+unit_basic_writable_pipe_SOURCES = unit/basic_writable_pipe.cpp
+unit_bind_allocator_SOURCES = unit/bind_allocator.cpp
+unit_bind_cancellation_slot_SOURCES = unit/bind_cancellation_slot.cpp
+unit_bind_executor_SOURCES = unit/bind_executor.cpp
+unit_bind_immediate_executor_SOURCES = unit/bind_immediate_executor.cpp
+unit_buffer_SOURCES = unit/buffer.cpp
+unit_buffer_registration_SOURCES = unit/buffer_registration.cpp
+unit_buffers_iterator_SOURCES = unit/buffers_iterator.cpp
+unit_buffered_read_stream_SOURCES = unit/buffered_read_stream.cpp
+unit_buffered_stream_SOURCES = unit/buffered_stream.cpp
+unit_buffered_write_stream_SOURCES = unit/buffered_write_stream.cpp
+unit_cancellation_signal_SOURCES = unit/cancellation_signal.cpp
+unit_cancellation_state_SOURCES = unit/cancellation_state.cpp
+unit_cancellation_type_SOURCES = unit/cancellation_type.cpp
+unit_co_spawn_SOURCES = unit/co_spawn.cpp
+unit_completion_condition_SOURCES = unit/completion_condition.cpp
+unit_compose_SOURCES = unit/compose.cpp
+unit_connect_SOURCES = unit/connect.cpp
+unit_connect_pipe_SOURCES = unit/connect_pipe.cpp
+unit_consign_SOURCES = unit/consign.cpp
+unit_coroutine_SOURCES = unit/coroutine.cpp
+unit_deadline_timer_SOURCES = unit/deadline_timer.cpp
+unit_defer_SOURCES = unit/defer.cpp
+unit_deferred_SOURCES = unit/deferred.cpp
+unit_detached_SOURCES = unit/detached.cpp
+unit_dispatch_SOURCES = unit/dispatch.cpp
+unit_error_SOURCES = unit/error.cpp
+unit_execution_any_executor_SOURCES = unit/execution/any_executor.cpp
+unit_execution_blocking_SOURCES = unit/execution/blocking.cpp
+unit_execution_blocking_adaptation_SOURCES = unit/execution/blocking_adaptation.cpp
+unit_execution_context_as_SOURCES = unit/execution/context_as.cpp
+unit_execution_executor_SOURCES = unit/execution/executor.cpp
+unit_execution_invocable_archetype_SOURCES = unit/execution/invocable_archetype.cpp
+unit_execution_mapping_SOURCES = unit/execution/mapping.cpp
+unit_execution_outstanding_work_SOURCES = unit/execution/outstanding_work.cpp
+unit_execution_prefer_only_SOURCES = unit/execution/prefer_only.cpp
+unit_execution_relationship_SOURCES = unit/execution/relationship.cpp
+unit_execution_context_SOURCES = unit/execution_context.cpp
+unit_executor_SOURCES = unit/executor.cpp
+unit_executor_work_guard_SOURCES = unit/executor_work_guard.cpp
+unit_file_base_SOURCES = unit/file_base.cpp
+unit_generic_basic_endpoint_SOURCES = unit/generic/basic_endpoint.cpp
+unit_generic_datagram_protocol_SOURCES = unit/generic/datagram_protocol.cpp
+unit_generic_raw_protocol_SOURCES = unit/generic/raw_protocol.cpp
+unit_generic_seq_packet_protocol_SOURCES = unit/generic/seq_packet_protocol.cpp
+unit_generic_stream_protocol_SOURCES = unit/generic/stream_protocol.cpp
+unit_high_resolution_timer_SOURCES = unit/high_resolution_timer.cpp
+unit_io_context_SOURCES = unit/io_context.cpp
+unit_io_context_strand_SOURCES = unit/io_context_strand.cpp
+unit_ip_address_SOURCES = unit/ip/address.cpp
+unit_ip_address_v4_SOURCES = unit/ip/address_v4.cpp
+unit_ip_address_v4_iterator_SOURCES = unit/ip/address_v4_iterator.cpp
+unit_ip_address_v4_range_SOURCES = unit/ip/address_v4_range.cpp
+unit_ip_address_v6_SOURCES = unit/ip/address_v6.cpp
+unit_ip_address_v6_iterator_SOURCES = unit/ip/address_v6_iterator.cpp
+unit_ip_address_v6_range_SOURCES = unit/ip/address_v6_range.cpp
+unit_ip_basic_endpoint_SOURCES = unit/ip/basic_endpoint.cpp
+unit_ip_basic_resolver_SOURCES = unit/ip/basic_resolver.cpp
+unit_ip_basic_resolver_entry_SOURCES = unit/ip/basic_resolver_entry.cpp
+unit_ip_basic_resolver_iterator_SOURCES = unit/ip/basic_resolver_iterator.cpp
+unit_ip_basic_resolver_query_SOURCES = unit/ip/basic_resolver_query.cpp
+unit_ip_host_name_SOURCES = unit/ip/host_name.cpp
+unit_ip_icmp_SOURCES = unit/ip/icmp.cpp
+unit_ip_multicast_SOURCES = unit/ip/multicast.cpp
+unit_ip_network_v4_SOURCES = unit/ip/network_v4.cpp
+unit_ip_network_v6_SOURCES = unit/ip/network_v6.cpp
+unit_ip_resolver_query_base_SOURCES = unit/ip/resolver_query_base.cpp
+unit_ip_tcp_SOURCES = unit/ip/tcp.cpp
+unit_ip_udp_SOURCES = unit/ip/udp.cpp
+unit_ip_unicast_SOURCES = unit/ip/unicast.cpp
+unit_ip_v6_only_SOURCES = unit/ip/v6_only.cpp
+unit_is_read_buffered_SOURCES = unit/is_read_buffered.cpp
+unit_is_write_buffered_SOURCES = unit/is_write_buffered.cpp
+unit_local_basic_endpoint_SOURCES = unit/local/basic_endpoint.cpp
+unit_local_connect_pair_SOURCES = unit/local/connect_pair.cpp
+unit_local_datagram_protocol_SOURCES = unit/local/datagram_protocol.cpp
+unit_local_seq_packet_protocol_SOURCES = unit/local/seq_packet_protocol.cpp
+unit_local_stream_protocol_SOURCES = unit/local/stream_protocol.cpp
+unit_packaged_task_SOURCES = unit/packaged_task.cpp
+unit_placeholders_SOURCES = unit/placeholders.cpp
+unit_posix_basic_descriptor_SOURCES = unit/posix/basic_descriptor.cpp
+unit_posix_basic_stream_descriptor_SOURCES = unit/posix/basic_stream_descriptor.cpp
+unit_posix_descriptor_SOURCES = unit/posix/descriptor.cpp
+unit_posix_descriptor_base_SOURCES = unit/posix/descriptor_base.cpp
+unit_posix_stream_descriptor_SOURCES = unit/posix/stream_descriptor.cpp
+unit_post_SOURCES = unit/post.cpp
+unit_prepend_SOURCES = unit/prepend.cpp
+unit_random_access_file_SOURCES = unit/random_access_file.cpp
+unit_read_SOURCES = unit/read.cpp
+unit_read_at_SOURCES = unit/read_at.cpp
+unit_read_until_SOURCES = unit/read_until.cpp
+unit_readable_pipe_SOURCES = unit/readable_pipe.cpp
+unit_recycling_allocator_SOURCES = unit/recycling_allocator.cpp
+unit_redirect_error_SOURCES = unit/redirect_error.cpp
+unit_registered_buffer_SOURCES = unit/registered_buffer.cpp
+unit_serial_port_SOURCES = unit/serial_port.cpp
+unit_serial_port_base_SOURCES = unit/serial_port_base.cpp
+unit_signal_set_SOURCES = unit/signal_set.cpp
+unit_signal_set_base_SOURCES = unit/signal_set_base.cpp
+unit_socket_base_SOURCES = unit/socket_base.cpp
+unit_static_thread_pool_SOURCES = unit/static_thread_pool.cpp
+unit_steady_timer_SOURCES = unit/steady_timer.cpp
+unit_strand_SOURCES = unit/strand.cpp
+unit_stream_file_SOURCES = unit/stream_file.cpp
+unit_streambuf_SOURCES = unit/streambuf.cpp
+unit_system_context_SOURCES = unit/system_context.cpp
+unit_system_executor_SOURCES = unit/system_executor.cpp
+unit_system_timer_SOURCES = unit/system_timer.cpp
+unit_this_coro_SOURCES = unit/this_coro.cpp
+unit_thread_SOURCES = unit/thread.cpp
+unit_thread_pool_SOURCES = unit/thread_pool.cpp
+unit_time_traits_SOURCES = unit/time_traits.cpp
+unit_ts_buffer_SOURCES = unit/ts/buffer.cpp
+unit_ts_executor_SOURCES = unit/ts/executor.cpp
+unit_ts_internet_SOURCES = unit/ts/internet.cpp
+unit_ts_io_context_SOURCES = unit/ts/io_context.cpp
+unit_ts_net_SOURCES = unit/ts/net.cpp
+unit_ts_netfwd_SOURCES = unit/ts/netfwd.cpp
+unit_ts_socket_SOURCES = unit/ts/socket.cpp
+unit_ts_timer_SOURCES = unit/ts/timer.cpp
+unit_use_awaitable_SOURCES = unit/use_awaitable.cpp
+unit_use_future_SOURCES = unit/use_future.cpp
+unit_uses_executor_SOURCES = unit/uses_executor.cpp
+unit_wait_traits_SOURCES = unit/wait_traits.cpp
+unit_windows_basic_object_handle_SOURCES = unit/windows/basic_object_handle.cpp
+unit_windows_basic_overlapped_handle_SOURCES = unit/windows/basic_overlapped_handle.cpp
+unit_windows_basic_random_access_handle_SOURCES = unit/windows/basic_random_access_handle.cpp
+unit_windows_basic_stream_handle_SOURCES = unit/windows/basic_stream_handle.cpp
+unit_windows_object_handle_SOURCES = unit/windows/object_handle.cpp
+unit_windows_overlapped_handle_SOURCES = unit/windows/overlapped_handle.cpp
+unit_windows_overlapped_ptr_SOURCES = unit/windows/overlapped_ptr.cpp
+unit_windows_random_access_handle_SOURCES = unit/windows/random_access_handle.cpp
+unit_windows_stream_handle_SOURCES = unit/windows/stream_handle.cpp
+unit_writable_pipe_SOURCES = unit/writable_pipe.cpp
+unit_write_SOURCES = unit/write.cpp
+unit_write_at_SOURCES = unit/write_at.cpp
+@HAVE_CXX11_TRUE@unit_experimental_basic_channel_SOURCES = unit/experimental/basic_channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_basic_concurrent_channel_SOURCES = unit/experimental/basic_concurrent_channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_channel_SOURCES = unit/experimental/channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_channel_traits_SOURCES = unit/experimental/channel_traits.cpp
+@HAVE_CXX11_TRUE@unit_experimental_concurrent_channel_SOURCES = unit/experimental/concurrent_channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_parallel_group_SOURCES = unit/experimental/parallel_group.cpp
+@HAVE_CXX20_TRUE@unit_experimental_promise_SOURCES = unit/experimental/promise.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_awaitable_operators_SOURCES = unit/experimental/awaitable_operators.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_co_composed_SOURCES = unit/experimental/co_composed.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_allocator_SOURCES = unit/experimental/coro/allocator.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_cancel_SOURCES = unit/experimental/coro/cancel.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_co_spawn_SOURCES = unit/experimental/coro/co_spawn.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_exception_SOURCES = unit/experimental/coro/exception.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_executor_SOURCES = unit/experimental/coro/executor.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_partial_SOURCES = unit/experimental/coro/partial.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_simple_test_SOURCES = unit/experimental/coro/simple_test.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_stack_test_SOURCES = unit/experimental/coro/stack_test.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_use_coro_SOURCES = unit/experimental/coro/use_coro.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_context_base_SOURCES = unit/ssl/context_base.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_context_SOURCES = unit/ssl/context.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_error_SOURCES = unit/ssl/error.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_stream_base_SOURCES = unit/ssl/stream_base.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_host_name_verification_SOURCES = unit/ssl/host_name_verification.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_rfc2818_verification_SOURCES = unit/ssl/rfc2818_verification.cpp
+@HAVE_OPENSSL_TRUE@unit_ssl_stream_SOURCES = unit/ssl/stream.cpp
+EXTRA_DIST = \
+ latency/allocator.hpp \
+ performance/handler_allocator.hpp \
+ unit/archetypes/async_ops.hpp \
+ unit/archetypes/async_result.hpp \
+ unit/archetypes/gettable_socket_option.hpp \
+ unit/archetypes/io_control_command.hpp \
+ unit/archetypes/settable_socket_option.hpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/tests/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../$(am__dirstamp):
+ @$(MKDIR_P) ..
+ @: > ../$(am__dirstamp)
+../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../$(DEPDIR)
+ @: > ../$(DEPDIR)/$(am__dirstamp)
+../asio.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
+../asio_ssl.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
+
+libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libasio.a
+ $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libasio.a
+latency/$(am__dirstamp):
+ @$(MKDIR_P) latency
+ @: > latency/$(am__dirstamp)
+latency/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) latency/$(DEPDIR)
+ @: > latency/$(DEPDIR)/$(am__dirstamp)
+latency/tcp_client.$(OBJEXT): latency/$(am__dirstamp) \
+ latency/$(DEPDIR)/$(am__dirstamp)
+
+latency/tcp_client$(EXEEXT): $(latency_tcp_client_OBJECTS) $(latency_tcp_client_DEPENDENCIES) $(EXTRA_latency_tcp_client_DEPENDENCIES) latency/$(am__dirstamp)
+ @rm -f latency/tcp_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(latency_tcp_client_OBJECTS) $(latency_tcp_client_LDADD) $(LIBS)
+latency/tcp_server.$(OBJEXT): latency/$(am__dirstamp) \
+ latency/$(DEPDIR)/$(am__dirstamp)
+
+latency/tcp_server$(EXEEXT): $(latency_tcp_server_OBJECTS) $(latency_tcp_server_DEPENDENCIES) $(EXTRA_latency_tcp_server_DEPENDENCIES) latency/$(am__dirstamp)
+ @rm -f latency/tcp_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(latency_tcp_server_OBJECTS) $(latency_tcp_server_LDADD) $(LIBS)
+latency/udp_client.$(OBJEXT): latency/$(am__dirstamp) \
+ latency/$(DEPDIR)/$(am__dirstamp)
+
+latency/udp_client$(EXEEXT): $(latency_udp_client_OBJECTS) $(latency_udp_client_DEPENDENCIES) $(EXTRA_latency_udp_client_DEPENDENCIES) latency/$(am__dirstamp)
+ @rm -f latency/udp_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(latency_udp_client_OBJECTS) $(latency_udp_client_LDADD) $(LIBS)
+latency/udp_server.$(OBJEXT): latency/$(am__dirstamp) \
+ latency/$(DEPDIR)/$(am__dirstamp)
+
+latency/udp_server$(EXEEXT): $(latency_udp_server_OBJECTS) $(latency_udp_server_DEPENDENCIES) $(EXTRA_latency_udp_server_DEPENDENCIES) latency/$(am__dirstamp)
+ @rm -f latency/udp_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(latency_udp_server_OBJECTS) $(latency_udp_server_LDADD) $(LIBS)
+performance/$(am__dirstamp):
+ @$(MKDIR_P) performance
+ @: > performance/$(am__dirstamp)
+performance/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) performance/$(DEPDIR)
+ @: > performance/$(DEPDIR)/$(am__dirstamp)
+performance/client.$(OBJEXT): performance/$(am__dirstamp) \
+ performance/$(DEPDIR)/$(am__dirstamp)
+
+performance/client$(EXEEXT): $(performance_client_OBJECTS) $(performance_client_DEPENDENCIES) $(EXTRA_performance_client_DEPENDENCIES) performance/$(am__dirstamp)
+ @rm -f performance/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(performance_client_OBJECTS) $(performance_client_LDADD) $(LIBS)
+performance/server.$(OBJEXT): performance/$(am__dirstamp) \
+ performance/$(DEPDIR)/$(am__dirstamp)
+
+performance/server$(EXEEXT): $(performance_server_OBJECTS) $(performance_server_DEPENDENCIES) $(EXTRA_performance_server_DEPENDENCIES) performance/$(am__dirstamp)
+ @rm -f performance/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(performance_server_OBJECTS) $(performance_server_LDADD) $(LIBS)
+unit/$(am__dirstamp):
+ @$(MKDIR_P) unit
+ @: > unit/$(am__dirstamp)
+unit/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/$(DEPDIR)
+ @: > unit/$(DEPDIR)/$(am__dirstamp)
+unit/any_completion_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/any_completion_executor$(EXEEXT): $(unit_any_completion_executor_OBJECTS) $(unit_any_completion_executor_DEPENDENCIES) $(EXTRA_unit_any_completion_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/any_completion_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_any_completion_executor_OBJECTS) $(unit_any_completion_executor_LDADD) $(LIBS)
+unit/any_completion_handler.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/any_completion_handler$(EXEEXT): $(unit_any_completion_handler_OBJECTS) $(unit_any_completion_handler_DEPENDENCIES) $(EXTRA_unit_any_completion_handler_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/any_completion_handler$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_any_completion_handler_OBJECTS) $(unit_any_completion_handler_LDADD) $(LIBS)
+unit/any_io_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/any_io_executor$(EXEEXT): $(unit_any_io_executor_OBJECTS) $(unit_any_io_executor_DEPENDENCIES) $(EXTRA_unit_any_io_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/any_io_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_any_io_executor_OBJECTS) $(unit_any_io_executor_LDADD) $(LIBS)
+unit/append.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/append$(EXEEXT): $(unit_append_OBJECTS) $(unit_append_DEPENDENCIES) $(EXTRA_unit_append_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/append$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_append_OBJECTS) $(unit_append_LDADD) $(LIBS)
+unit/as_tuple.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/as_tuple$(EXEEXT): $(unit_as_tuple_OBJECTS) $(unit_as_tuple_DEPENDENCIES) $(EXTRA_unit_as_tuple_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/as_tuple$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_as_tuple_OBJECTS) $(unit_as_tuple_LDADD) $(LIBS)
+unit/associated_allocator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/associated_allocator$(EXEEXT): $(unit_associated_allocator_OBJECTS) $(unit_associated_allocator_DEPENDENCIES) $(EXTRA_unit_associated_allocator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/associated_allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_associated_allocator_OBJECTS) $(unit_associated_allocator_LDADD) $(LIBS)
+unit/associated_cancellation_slot.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/associated_cancellation_slot$(EXEEXT): $(unit_associated_cancellation_slot_OBJECTS) $(unit_associated_cancellation_slot_DEPENDENCIES) $(EXTRA_unit_associated_cancellation_slot_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/associated_cancellation_slot$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_associated_cancellation_slot_OBJECTS) $(unit_associated_cancellation_slot_LDADD) $(LIBS)
+unit/associated_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/associated_executor$(EXEEXT): $(unit_associated_executor_OBJECTS) $(unit_associated_executor_DEPENDENCIES) $(EXTRA_unit_associated_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/associated_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_associated_executor_OBJECTS) $(unit_associated_executor_LDADD) $(LIBS)
+unit/associated_immediate_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/associated_immediate_executor$(EXEEXT): $(unit_associated_immediate_executor_OBJECTS) $(unit_associated_immediate_executor_DEPENDENCIES) $(EXTRA_unit_associated_immediate_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/associated_immediate_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_associated_immediate_executor_OBJECTS) $(unit_associated_immediate_executor_LDADD) $(LIBS)
+unit/associator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/associator$(EXEEXT): $(unit_associator_OBJECTS) $(unit_associator_DEPENDENCIES) $(EXTRA_unit_associator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/associator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_associator_OBJECTS) $(unit_associator_LDADD) $(LIBS)
+unit/async_result.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/async_result$(EXEEXT): $(unit_async_result_OBJECTS) $(unit_async_result_DEPENDENCIES) $(EXTRA_unit_async_result_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/async_result$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_async_result_OBJECTS) $(unit_async_result_LDADD) $(LIBS)
+unit/awaitable.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/awaitable$(EXEEXT): $(unit_awaitable_OBJECTS) $(unit_awaitable_DEPENDENCIES) $(EXTRA_unit_awaitable_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/awaitable$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_awaitable_OBJECTS) $(unit_awaitable_LDADD) $(LIBS)
+unit/basic_datagram_socket.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_datagram_socket$(EXEEXT): $(unit_basic_datagram_socket_OBJECTS) $(unit_basic_datagram_socket_DEPENDENCIES) $(EXTRA_unit_basic_datagram_socket_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_datagram_socket$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_datagram_socket_OBJECTS) $(unit_basic_datagram_socket_LDADD) $(LIBS)
+unit/basic_deadline_timer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_deadline_timer$(EXEEXT): $(unit_basic_deadline_timer_OBJECTS) $(unit_basic_deadline_timer_DEPENDENCIES) $(EXTRA_unit_basic_deadline_timer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_deadline_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_deadline_timer_OBJECTS) $(unit_basic_deadline_timer_LDADD) $(LIBS)
+unit/basic_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_file$(EXEEXT): $(unit_basic_file_OBJECTS) $(unit_basic_file_DEPENDENCIES) $(EXTRA_unit_basic_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_file_OBJECTS) $(unit_basic_file_LDADD) $(LIBS)
+unit/basic_random_access_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_random_access_file$(EXEEXT): $(unit_basic_random_access_file_OBJECTS) $(unit_basic_random_access_file_DEPENDENCIES) $(EXTRA_unit_basic_random_access_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_random_access_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_random_access_file_OBJECTS) $(unit_basic_random_access_file_LDADD) $(LIBS)
+unit/basic_raw_socket.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_raw_socket$(EXEEXT): $(unit_basic_raw_socket_OBJECTS) $(unit_basic_raw_socket_DEPENDENCIES) $(EXTRA_unit_basic_raw_socket_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_raw_socket$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_raw_socket_OBJECTS) $(unit_basic_raw_socket_LDADD) $(LIBS)
+unit/basic_readable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_readable_pipe$(EXEEXT): $(unit_basic_readable_pipe_OBJECTS) $(unit_basic_readable_pipe_DEPENDENCIES) $(EXTRA_unit_basic_readable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_readable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_readable_pipe_OBJECTS) $(unit_basic_readable_pipe_LDADD) $(LIBS)
+unit/basic_seq_packet_socket.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_seq_packet_socket$(EXEEXT): $(unit_basic_seq_packet_socket_OBJECTS) $(unit_basic_seq_packet_socket_DEPENDENCIES) $(EXTRA_unit_basic_seq_packet_socket_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_seq_packet_socket$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_seq_packet_socket_OBJECTS) $(unit_basic_seq_packet_socket_LDADD) $(LIBS)
+unit/basic_serial_port.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_serial_port$(EXEEXT): $(unit_basic_serial_port_OBJECTS) $(unit_basic_serial_port_DEPENDENCIES) $(EXTRA_unit_basic_serial_port_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_serial_port$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_serial_port_OBJECTS) $(unit_basic_serial_port_LDADD) $(LIBS)
+unit/basic_signal_set.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_signal_set$(EXEEXT): $(unit_basic_signal_set_OBJECTS) $(unit_basic_signal_set_DEPENDENCIES) $(EXTRA_unit_basic_signal_set_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_signal_set$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_signal_set_OBJECTS) $(unit_basic_signal_set_LDADD) $(LIBS)
+unit/basic_socket.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_socket$(EXEEXT): $(unit_basic_socket_OBJECTS) $(unit_basic_socket_DEPENDENCIES) $(EXTRA_unit_basic_socket_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_socket$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_socket_OBJECTS) $(unit_basic_socket_LDADD) $(LIBS)
+unit/basic_socket_acceptor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_socket_acceptor$(EXEEXT): $(unit_basic_socket_acceptor_OBJECTS) $(unit_basic_socket_acceptor_DEPENDENCIES) $(EXTRA_unit_basic_socket_acceptor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_socket_acceptor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_socket_acceptor_OBJECTS) $(unit_basic_socket_acceptor_LDADD) $(LIBS)
+unit/basic_stream_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_stream_file$(EXEEXT): $(unit_basic_stream_file_OBJECTS) $(unit_basic_stream_file_DEPENDENCIES) $(EXTRA_unit_basic_stream_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_stream_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_stream_file_OBJECTS) $(unit_basic_stream_file_LDADD) $(LIBS)
+unit/basic_stream_socket.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_stream_socket$(EXEEXT): $(unit_basic_stream_socket_OBJECTS) $(unit_basic_stream_socket_DEPENDENCIES) $(EXTRA_unit_basic_stream_socket_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_stream_socket$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_stream_socket_OBJECTS) $(unit_basic_stream_socket_LDADD) $(LIBS)
+unit/basic_streambuf.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_streambuf$(EXEEXT): $(unit_basic_streambuf_OBJECTS) $(unit_basic_streambuf_DEPENDENCIES) $(EXTRA_unit_basic_streambuf_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_streambuf$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_streambuf_OBJECTS) $(unit_basic_streambuf_LDADD) $(LIBS)
+unit/basic_waitable_timer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_waitable_timer$(EXEEXT): $(unit_basic_waitable_timer_OBJECTS) $(unit_basic_waitable_timer_DEPENDENCIES) $(EXTRA_unit_basic_waitable_timer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_waitable_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_waitable_timer_OBJECTS) $(unit_basic_waitable_timer_LDADD) $(LIBS)
+unit/basic_writable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_writable_pipe$(EXEEXT): $(unit_basic_writable_pipe_OBJECTS) $(unit_basic_writable_pipe_DEPENDENCIES) $(EXTRA_unit_basic_writable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_writable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_writable_pipe_OBJECTS) $(unit_basic_writable_pipe_LDADD) $(LIBS)
+unit/bind_allocator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/bind_allocator$(EXEEXT): $(unit_bind_allocator_OBJECTS) $(unit_bind_allocator_DEPENDENCIES) $(EXTRA_unit_bind_allocator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/bind_allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_bind_allocator_OBJECTS) $(unit_bind_allocator_LDADD) $(LIBS)
+unit/bind_cancellation_slot.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/bind_cancellation_slot$(EXEEXT): $(unit_bind_cancellation_slot_OBJECTS) $(unit_bind_cancellation_slot_DEPENDENCIES) $(EXTRA_unit_bind_cancellation_slot_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/bind_cancellation_slot$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_bind_cancellation_slot_OBJECTS) $(unit_bind_cancellation_slot_LDADD) $(LIBS)
+unit/bind_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/bind_executor$(EXEEXT): $(unit_bind_executor_OBJECTS) $(unit_bind_executor_DEPENDENCIES) $(EXTRA_unit_bind_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/bind_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_bind_executor_OBJECTS) $(unit_bind_executor_LDADD) $(LIBS)
+unit/bind_immediate_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/bind_immediate_executor$(EXEEXT): $(unit_bind_immediate_executor_OBJECTS) $(unit_bind_immediate_executor_DEPENDENCIES) $(EXTRA_unit_bind_immediate_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/bind_immediate_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_bind_immediate_executor_OBJECTS) $(unit_bind_immediate_executor_LDADD) $(LIBS)
+unit/buffer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffer$(EXEEXT): $(unit_buffer_OBJECTS) $(unit_buffer_DEPENDENCIES) $(EXTRA_unit_buffer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffer_OBJECTS) $(unit_buffer_LDADD) $(LIBS)
+unit/buffer_registration.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffer_registration$(EXEEXT): $(unit_buffer_registration_OBJECTS) $(unit_buffer_registration_DEPENDENCIES) $(EXTRA_unit_buffer_registration_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffer_registration$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffer_registration_OBJECTS) $(unit_buffer_registration_LDADD) $(LIBS)
+unit/buffered_read_stream.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffered_read_stream$(EXEEXT): $(unit_buffered_read_stream_OBJECTS) $(unit_buffered_read_stream_DEPENDENCIES) $(EXTRA_unit_buffered_read_stream_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffered_read_stream$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffered_read_stream_OBJECTS) $(unit_buffered_read_stream_LDADD) $(LIBS)
+unit/buffered_stream.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffered_stream$(EXEEXT): $(unit_buffered_stream_OBJECTS) $(unit_buffered_stream_DEPENDENCIES) $(EXTRA_unit_buffered_stream_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffered_stream$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffered_stream_OBJECTS) $(unit_buffered_stream_LDADD) $(LIBS)
+unit/buffered_write_stream.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffered_write_stream$(EXEEXT): $(unit_buffered_write_stream_OBJECTS) $(unit_buffered_write_stream_DEPENDENCIES) $(EXTRA_unit_buffered_write_stream_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffered_write_stream$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffered_write_stream_OBJECTS) $(unit_buffered_write_stream_LDADD) $(LIBS)
+unit/buffers_iterator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffers_iterator$(EXEEXT): $(unit_buffers_iterator_OBJECTS) $(unit_buffers_iterator_DEPENDENCIES) $(EXTRA_unit_buffers_iterator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffers_iterator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffers_iterator_OBJECTS) $(unit_buffers_iterator_LDADD) $(LIBS)
+unit/cancellation_signal.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/cancellation_signal$(EXEEXT): $(unit_cancellation_signal_OBJECTS) $(unit_cancellation_signal_DEPENDENCIES) $(EXTRA_unit_cancellation_signal_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/cancellation_signal$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_cancellation_signal_OBJECTS) $(unit_cancellation_signal_LDADD) $(LIBS)
+unit/cancellation_state.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/cancellation_state$(EXEEXT): $(unit_cancellation_state_OBJECTS) $(unit_cancellation_state_DEPENDENCIES) $(EXTRA_unit_cancellation_state_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/cancellation_state$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_cancellation_state_OBJECTS) $(unit_cancellation_state_LDADD) $(LIBS)
+unit/cancellation_type.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/cancellation_type$(EXEEXT): $(unit_cancellation_type_OBJECTS) $(unit_cancellation_type_DEPENDENCIES) $(EXTRA_unit_cancellation_type_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/cancellation_type$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_cancellation_type_OBJECTS) $(unit_cancellation_type_LDADD) $(LIBS)
+unit/co_spawn.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/co_spawn$(EXEEXT): $(unit_co_spawn_OBJECTS) $(unit_co_spawn_DEPENDENCIES) $(EXTRA_unit_co_spawn_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/co_spawn$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_co_spawn_OBJECTS) $(unit_co_spawn_LDADD) $(LIBS)
+unit/completion_condition.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/completion_condition$(EXEEXT): $(unit_completion_condition_OBJECTS) $(unit_completion_condition_DEPENDENCIES) $(EXTRA_unit_completion_condition_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/completion_condition$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_completion_condition_OBJECTS) $(unit_completion_condition_LDADD) $(LIBS)
+unit/compose.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/compose$(EXEEXT): $(unit_compose_OBJECTS) $(unit_compose_DEPENDENCIES) $(EXTRA_unit_compose_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/compose$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_compose_OBJECTS) $(unit_compose_LDADD) $(LIBS)
+unit/connect.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/connect$(EXEEXT): $(unit_connect_OBJECTS) $(unit_connect_DEPENDENCIES) $(EXTRA_unit_connect_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/connect$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_connect_OBJECTS) $(unit_connect_LDADD) $(LIBS)
+unit/connect_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/connect_pipe$(EXEEXT): $(unit_connect_pipe_OBJECTS) $(unit_connect_pipe_DEPENDENCIES) $(EXTRA_unit_connect_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/connect_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_connect_pipe_OBJECTS) $(unit_connect_pipe_LDADD) $(LIBS)
+unit/consign.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/consign$(EXEEXT): $(unit_consign_OBJECTS) $(unit_consign_DEPENDENCIES) $(EXTRA_unit_consign_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/consign$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_consign_OBJECTS) $(unit_consign_LDADD) $(LIBS)
+unit/coroutine.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/coroutine$(EXEEXT): $(unit_coroutine_OBJECTS) $(unit_coroutine_DEPENDENCIES) $(EXTRA_unit_coroutine_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/coroutine$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_coroutine_OBJECTS) $(unit_coroutine_LDADD) $(LIBS)
+unit/deadline_timer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/deadline_timer$(EXEEXT): $(unit_deadline_timer_OBJECTS) $(unit_deadline_timer_DEPENDENCIES) $(EXTRA_unit_deadline_timer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/deadline_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_deadline_timer_OBJECTS) $(unit_deadline_timer_LDADD) $(LIBS)
+unit/defer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/defer$(EXEEXT): $(unit_defer_OBJECTS) $(unit_defer_DEPENDENCIES) $(EXTRA_unit_defer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/defer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_defer_OBJECTS) $(unit_defer_LDADD) $(LIBS)
+unit/deferred.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/deferred$(EXEEXT): $(unit_deferred_OBJECTS) $(unit_deferred_DEPENDENCIES) $(EXTRA_unit_deferred_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/deferred$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_deferred_OBJECTS) $(unit_deferred_LDADD) $(LIBS)
+unit/detached.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/detached$(EXEEXT): $(unit_detached_OBJECTS) $(unit_detached_DEPENDENCIES) $(EXTRA_unit_detached_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/detached$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_detached_OBJECTS) $(unit_detached_LDADD) $(LIBS)
+unit/dispatch.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/dispatch$(EXEEXT): $(unit_dispatch_OBJECTS) $(unit_dispatch_DEPENDENCIES) $(EXTRA_unit_dispatch_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/dispatch$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_dispatch_OBJECTS) $(unit_dispatch_LDADD) $(LIBS)
+unit/error.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/error$(EXEEXT): $(unit_error_OBJECTS) $(unit_error_DEPENDENCIES) $(EXTRA_unit_error_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/error$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_error_OBJECTS) $(unit_error_LDADD) $(LIBS)
+unit/execution/$(am__dirstamp):
+ @$(MKDIR_P) unit/execution
+ @: > unit/execution/$(am__dirstamp)
+unit/execution/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/execution/$(DEPDIR)
+ @: > unit/execution/$(DEPDIR)/$(am__dirstamp)
+unit/execution/any_executor.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/any_executor$(EXEEXT): $(unit_execution_any_executor_OBJECTS) $(unit_execution_any_executor_DEPENDENCIES) $(EXTRA_unit_execution_any_executor_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/any_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_any_executor_OBJECTS) $(unit_execution_any_executor_LDADD) $(LIBS)
+unit/execution/blocking.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/blocking$(EXEEXT): $(unit_execution_blocking_OBJECTS) $(unit_execution_blocking_DEPENDENCIES) $(EXTRA_unit_execution_blocking_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/blocking$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_blocking_OBJECTS) $(unit_execution_blocking_LDADD) $(LIBS)
+unit/execution/blocking_adaptation.$(OBJEXT): \
+ unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/blocking_adaptation$(EXEEXT): $(unit_execution_blocking_adaptation_OBJECTS) $(unit_execution_blocking_adaptation_DEPENDENCIES) $(EXTRA_unit_execution_blocking_adaptation_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/blocking_adaptation$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_blocking_adaptation_OBJECTS) $(unit_execution_blocking_adaptation_LDADD) $(LIBS)
+unit/execution/context_as.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/context_as$(EXEEXT): $(unit_execution_context_as_OBJECTS) $(unit_execution_context_as_DEPENDENCIES) $(EXTRA_unit_execution_context_as_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/context_as$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_context_as_OBJECTS) $(unit_execution_context_as_LDADD) $(LIBS)
+unit/execution/executor.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/executor$(EXEEXT): $(unit_execution_executor_OBJECTS) $(unit_execution_executor_DEPENDENCIES) $(EXTRA_unit_execution_executor_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_executor_OBJECTS) $(unit_execution_executor_LDADD) $(LIBS)
+unit/execution/invocable_archetype.$(OBJEXT): \
+ unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/invocable_archetype$(EXEEXT): $(unit_execution_invocable_archetype_OBJECTS) $(unit_execution_invocable_archetype_DEPENDENCIES) $(EXTRA_unit_execution_invocable_archetype_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/invocable_archetype$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_invocable_archetype_OBJECTS) $(unit_execution_invocable_archetype_LDADD) $(LIBS)
+unit/execution/mapping.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/mapping$(EXEEXT): $(unit_execution_mapping_OBJECTS) $(unit_execution_mapping_DEPENDENCIES) $(EXTRA_unit_execution_mapping_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/mapping$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_mapping_OBJECTS) $(unit_execution_mapping_LDADD) $(LIBS)
+unit/execution/outstanding_work.$(OBJEXT): \
+ unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/outstanding_work$(EXEEXT): $(unit_execution_outstanding_work_OBJECTS) $(unit_execution_outstanding_work_DEPENDENCIES) $(EXTRA_unit_execution_outstanding_work_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/outstanding_work$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_outstanding_work_OBJECTS) $(unit_execution_outstanding_work_LDADD) $(LIBS)
+unit/execution/prefer_only.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/prefer_only$(EXEEXT): $(unit_execution_prefer_only_OBJECTS) $(unit_execution_prefer_only_DEPENDENCIES) $(EXTRA_unit_execution_prefer_only_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/prefer_only$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_prefer_only_OBJECTS) $(unit_execution_prefer_only_LDADD) $(LIBS)
+unit/execution/relationship.$(OBJEXT): unit/execution/$(am__dirstamp) \
+ unit/execution/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution/relationship$(EXEEXT): $(unit_execution_relationship_OBJECTS) $(unit_execution_relationship_DEPENDENCIES) $(EXTRA_unit_execution_relationship_DEPENDENCIES) unit/execution/$(am__dirstamp)
+ @rm -f unit/execution/relationship$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_relationship_OBJECTS) $(unit_execution_relationship_LDADD) $(LIBS)
+unit/execution_context.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/execution_context$(EXEEXT): $(unit_execution_context_OBJECTS) $(unit_execution_context_DEPENDENCIES) $(EXTRA_unit_execution_context_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/execution_context$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_context_OBJECTS) $(unit_execution_context_LDADD) $(LIBS)
+unit/executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/executor$(EXEEXT): $(unit_executor_OBJECTS) $(unit_executor_DEPENDENCIES) $(EXTRA_unit_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_executor_OBJECTS) $(unit_executor_LDADD) $(LIBS)
+unit/executor_work_guard.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/executor_work_guard$(EXEEXT): $(unit_executor_work_guard_OBJECTS) $(unit_executor_work_guard_DEPENDENCIES) $(EXTRA_unit_executor_work_guard_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/executor_work_guard$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_executor_work_guard_OBJECTS) $(unit_executor_work_guard_LDADD) $(LIBS)
+unit/experimental/$(am__dirstamp):
+ @$(MKDIR_P) unit/experimental
+ @: > unit/experimental/$(am__dirstamp)
+unit/experimental/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/experimental/$(DEPDIR)
+ @: > unit/experimental/$(DEPDIR)/$(am__dirstamp)
+unit/experimental/awaitable_operators.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/awaitable_operators$(EXEEXT): $(unit_experimental_awaitable_operators_OBJECTS) $(unit_experimental_awaitable_operators_DEPENDENCIES) $(EXTRA_unit_experimental_awaitable_operators_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/awaitable_operators$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_awaitable_operators_OBJECTS) $(unit_experimental_awaitable_operators_LDADD) $(LIBS)
+unit/experimental/basic_channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/basic_channel$(EXEEXT): $(unit_experimental_basic_channel_OBJECTS) $(unit_experimental_basic_channel_DEPENDENCIES) $(EXTRA_unit_experimental_basic_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/basic_channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_basic_channel_OBJECTS) $(unit_experimental_basic_channel_LDADD) $(LIBS)
+unit/experimental/basic_concurrent_channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/basic_concurrent_channel$(EXEEXT): $(unit_experimental_basic_concurrent_channel_OBJECTS) $(unit_experimental_basic_concurrent_channel_DEPENDENCIES) $(EXTRA_unit_experimental_basic_concurrent_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/basic_concurrent_channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_basic_concurrent_channel_OBJECTS) $(unit_experimental_basic_concurrent_channel_LDADD) $(LIBS)
+unit/experimental/channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/channel$(EXEEXT): $(unit_experimental_channel_OBJECTS) $(unit_experimental_channel_DEPENDENCIES) $(EXTRA_unit_experimental_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_channel_OBJECTS) $(unit_experimental_channel_LDADD) $(LIBS)
+unit/experimental/channel_traits.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/channel_traits$(EXEEXT): $(unit_experimental_channel_traits_OBJECTS) $(unit_experimental_channel_traits_DEPENDENCIES) $(EXTRA_unit_experimental_channel_traits_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/channel_traits$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_channel_traits_OBJECTS) $(unit_experimental_channel_traits_LDADD) $(LIBS)
+unit/experimental/co_composed.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/co_composed$(EXEEXT): $(unit_experimental_co_composed_OBJECTS) $(unit_experimental_co_composed_DEPENDENCIES) $(EXTRA_unit_experimental_co_composed_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/co_composed$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_co_composed_OBJECTS) $(unit_experimental_co_composed_LDADD) $(LIBS)
+unit/experimental/concurrent_channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/concurrent_channel$(EXEEXT): $(unit_experimental_concurrent_channel_OBJECTS) $(unit_experimental_concurrent_channel_DEPENDENCIES) $(EXTRA_unit_experimental_concurrent_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/concurrent_channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_concurrent_channel_OBJECTS) $(unit_experimental_concurrent_channel_LDADD) $(LIBS)
+unit/experimental/coro/$(am__dirstamp):
+ @$(MKDIR_P) unit/experimental/coro
+ @: > unit/experimental/coro/$(am__dirstamp)
+unit/experimental/coro/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/experimental/coro/$(DEPDIR)
+ @: > unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+unit/experimental/coro/allocator.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/allocator$(EXEEXT): $(unit_experimental_coro_allocator_OBJECTS) $(unit_experimental_coro_allocator_DEPENDENCIES) $(EXTRA_unit_experimental_coro_allocator_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_allocator_OBJECTS) $(unit_experimental_coro_allocator_LDADD) $(LIBS)
+unit/experimental/coro/cancel.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/cancel$(EXEEXT): $(unit_experimental_coro_cancel_OBJECTS) $(unit_experimental_coro_cancel_DEPENDENCIES) $(EXTRA_unit_experimental_coro_cancel_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/cancel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_cancel_OBJECTS) $(unit_experimental_coro_cancel_LDADD) $(LIBS)
+unit/experimental/coro/co_spawn.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/co_spawn$(EXEEXT): $(unit_experimental_coro_co_spawn_OBJECTS) $(unit_experimental_coro_co_spawn_DEPENDENCIES) $(EXTRA_unit_experimental_coro_co_spawn_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/co_spawn$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_co_spawn_OBJECTS) $(unit_experimental_coro_co_spawn_LDADD) $(LIBS)
+unit/experimental/coro/exception.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/exception$(EXEEXT): $(unit_experimental_coro_exception_OBJECTS) $(unit_experimental_coro_exception_DEPENDENCIES) $(EXTRA_unit_experimental_coro_exception_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/exception$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_exception_OBJECTS) $(unit_experimental_coro_exception_LDADD) $(LIBS)
+unit/experimental/coro/executor.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/executor$(EXEEXT): $(unit_experimental_coro_executor_OBJECTS) $(unit_experimental_coro_executor_DEPENDENCIES) $(EXTRA_unit_experimental_coro_executor_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_executor_OBJECTS) $(unit_experimental_coro_executor_LDADD) $(LIBS)
+unit/experimental/coro/partial.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/partial$(EXEEXT): $(unit_experimental_coro_partial_OBJECTS) $(unit_experimental_coro_partial_DEPENDENCIES) $(EXTRA_unit_experimental_coro_partial_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/partial$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_partial_OBJECTS) $(unit_experimental_coro_partial_LDADD) $(LIBS)
+unit/experimental/coro/simple_test.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/simple_test$(EXEEXT): $(unit_experimental_coro_simple_test_OBJECTS) $(unit_experimental_coro_simple_test_DEPENDENCIES) $(EXTRA_unit_experimental_coro_simple_test_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/simple_test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_simple_test_OBJECTS) $(unit_experimental_coro_simple_test_LDADD) $(LIBS)
+unit/experimental/coro/stack_test.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/stack_test$(EXEEXT): $(unit_experimental_coro_stack_test_OBJECTS) $(unit_experimental_coro_stack_test_DEPENDENCIES) $(EXTRA_unit_experimental_coro_stack_test_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/stack_test$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_stack_test_OBJECTS) $(unit_experimental_coro_stack_test_LDADD) $(LIBS)
+unit/experimental/coro/use_coro.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/use_coro$(EXEEXT): $(unit_experimental_coro_use_coro_OBJECTS) $(unit_experimental_coro_use_coro_DEPENDENCIES) $(EXTRA_unit_experimental_coro_use_coro_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/use_coro$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_use_coro_OBJECTS) $(unit_experimental_coro_use_coro_LDADD) $(LIBS)
+unit/experimental/parallel_group.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/parallel_group$(EXEEXT): $(unit_experimental_parallel_group_OBJECTS) $(unit_experimental_parallel_group_DEPENDENCIES) $(EXTRA_unit_experimental_parallel_group_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/parallel_group$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_parallel_group_OBJECTS) $(unit_experimental_parallel_group_LDADD) $(LIBS)
+unit/experimental/promise.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/promise$(EXEEXT): $(unit_experimental_promise_OBJECTS) $(unit_experimental_promise_DEPENDENCIES) $(EXTRA_unit_experimental_promise_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/promise$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_promise_OBJECTS) $(unit_experimental_promise_LDADD) $(LIBS)
+unit/file_base.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/file_base$(EXEEXT): $(unit_file_base_OBJECTS) $(unit_file_base_DEPENDENCIES) $(EXTRA_unit_file_base_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/file_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_file_base_OBJECTS) $(unit_file_base_LDADD) $(LIBS)
+unit/generic/$(am__dirstamp):
+ @$(MKDIR_P) unit/generic
+ @: > unit/generic/$(am__dirstamp)
+unit/generic/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/generic/$(DEPDIR)
+ @: > unit/generic/$(DEPDIR)/$(am__dirstamp)
+unit/generic/basic_endpoint.$(OBJEXT): unit/generic/$(am__dirstamp) \
+ unit/generic/$(DEPDIR)/$(am__dirstamp)
+
+unit/generic/basic_endpoint$(EXEEXT): $(unit_generic_basic_endpoint_OBJECTS) $(unit_generic_basic_endpoint_DEPENDENCIES) $(EXTRA_unit_generic_basic_endpoint_DEPENDENCIES) unit/generic/$(am__dirstamp)
+ @rm -f unit/generic/basic_endpoint$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_generic_basic_endpoint_OBJECTS) $(unit_generic_basic_endpoint_LDADD) $(LIBS)
+unit/generic/datagram_protocol.$(OBJEXT): \
+ unit/generic/$(am__dirstamp) \
+ unit/generic/$(DEPDIR)/$(am__dirstamp)
+
+unit/generic/datagram_protocol$(EXEEXT): $(unit_generic_datagram_protocol_OBJECTS) $(unit_generic_datagram_protocol_DEPENDENCIES) $(EXTRA_unit_generic_datagram_protocol_DEPENDENCIES) unit/generic/$(am__dirstamp)
+ @rm -f unit/generic/datagram_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_generic_datagram_protocol_OBJECTS) $(unit_generic_datagram_protocol_LDADD) $(LIBS)
+unit/generic/raw_protocol.$(OBJEXT): unit/generic/$(am__dirstamp) \
+ unit/generic/$(DEPDIR)/$(am__dirstamp)
+
+unit/generic/raw_protocol$(EXEEXT): $(unit_generic_raw_protocol_OBJECTS) $(unit_generic_raw_protocol_DEPENDENCIES) $(EXTRA_unit_generic_raw_protocol_DEPENDENCIES) unit/generic/$(am__dirstamp)
+ @rm -f unit/generic/raw_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_generic_raw_protocol_OBJECTS) $(unit_generic_raw_protocol_LDADD) $(LIBS)
+unit/generic/seq_packet_protocol.$(OBJEXT): \
+ unit/generic/$(am__dirstamp) \
+ unit/generic/$(DEPDIR)/$(am__dirstamp)
+
+unit/generic/seq_packet_protocol$(EXEEXT): $(unit_generic_seq_packet_protocol_OBJECTS) $(unit_generic_seq_packet_protocol_DEPENDENCIES) $(EXTRA_unit_generic_seq_packet_protocol_DEPENDENCIES) unit/generic/$(am__dirstamp)
+ @rm -f unit/generic/seq_packet_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_generic_seq_packet_protocol_OBJECTS) $(unit_generic_seq_packet_protocol_LDADD) $(LIBS)
+unit/generic/stream_protocol.$(OBJEXT): unit/generic/$(am__dirstamp) \
+ unit/generic/$(DEPDIR)/$(am__dirstamp)
+
+unit/generic/stream_protocol$(EXEEXT): $(unit_generic_stream_protocol_OBJECTS) $(unit_generic_stream_protocol_DEPENDENCIES) $(EXTRA_unit_generic_stream_protocol_DEPENDENCIES) unit/generic/$(am__dirstamp)
+ @rm -f unit/generic/stream_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_generic_stream_protocol_OBJECTS) $(unit_generic_stream_protocol_LDADD) $(LIBS)
+unit/high_resolution_timer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/high_resolution_timer$(EXEEXT): $(unit_high_resolution_timer_OBJECTS) $(unit_high_resolution_timer_DEPENDENCIES) $(EXTRA_unit_high_resolution_timer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/high_resolution_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_high_resolution_timer_OBJECTS) $(unit_high_resolution_timer_LDADD) $(LIBS)
+unit/io_context.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/io_context$(EXEEXT): $(unit_io_context_OBJECTS) $(unit_io_context_DEPENDENCIES) $(EXTRA_unit_io_context_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/io_context$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_io_context_OBJECTS) $(unit_io_context_LDADD) $(LIBS)
+unit/io_context_strand.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/io_context_strand$(EXEEXT): $(unit_io_context_strand_OBJECTS) $(unit_io_context_strand_DEPENDENCIES) $(EXTRA_unit_io_context_strand_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/io_context_strand$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_io_context_strand_OBJECTS) $(unit_io_context_strand_LDADD) $(LIBS)
+unit/ip/$(am__dirstamp):
+ @$(MKDIR_P) unit/ip
+ @: > unit/ip/$(am__dirstamp)
+unit/ip/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/ip/$(DEPDIR)
+ @: > unit/ip/$(DEPDIR)/$(am__dirstamp)
+unit/ip/address.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address$(EXEEXT): $(unit_ip_address_OBJECTS) $(unit_ip_address_DEPENDENCIES) $(EXTRA_unit_ip_address_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_OBJECTS) $(unit_ip_address_LDADD) $(LIBS)
+unit/ip/address_v4.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address_v4$(EXEEXT): $(unit_ip_address_v4_OBJECTS) $(unit_ip_address_v4_DEPENDENCIES) $(EXTRA_unit_ip_address_v4_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address_v4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_v4_OBJECTS) $(unit_ip_address_v4_LDADD) $(LIBS)
+unit/ip/address_v4_iterator.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address_v4_iterator$(EXEEXT): $(unit_ip_address_v4_iterator_OBJECTS) $(unit_ip_address_v4_iterator_DEPENDENCIES) $(EXTRA_unit_ip_address_v4_iterator_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address_v4_iterator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_v4_iterator_OBJECTS) $(unit_ip_address_v4_iterator_LDADD) $(LIBS)
+unit/ip/address_v4_range.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address_v4_range$(EXEEXT): $(unit_ip_address_v4_range_OBJECTS) $(unit_ip_address_v4_range_DEPENDENCIES) $(EXTRA_unit_ip_address_v4_range_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address_v4_range$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_v4_range_OBJECTS) $(unit_ip_address_v4_range_LDADD) $(LIBS)
+unit/ip/address_v6.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address_v6$(EXEEXT): $(unit_ip_address_v6_OBJECTS) $(unit_ip_address_v6_DEPENDENCIES) $(EXTRA_unit_ip_address_v6_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address_v6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_v6_OBJECTS) $(unit_ip_address_v6_LDADD) $(LIBS)
+unit/ip/address_v6_iterator.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address_v6_iterator$(EXEEXT): $(unit_ip_address_v6_iterator_OBJECTS) $(unit_ip_address_v6_iterator_DEPENDENCIES) $(EXTRA_unit_ip_address_v6_iterator_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address_v6_iterator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_v6_iterator_OBJECTS) $(unit_ip_address_v6_iterator_LDADD) $(LIBS)
+unit/ip/address_v6_range.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/address_v6_range$(EXEEXT): $(unit_ip_address_v6_range_OBJECTS) $(unit_ip_address_v6_range_DEPENDENCIES) $(EXTRA_unit_ip_address_v6_range_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/address_v6_range$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_address_v6_range_OBJECTS) $(unit_ip_address_v6_range_LDADD) $(LIBS)
+unit/ip/basic_endpoint.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/basic_endpoint$(EXEEXT): $(unit_ip_basic_endpoint_OBJECTS) $(unit_ip_basic_endpoint_DEPENDENCIES) $(EXTRA_unit_ip_basic_endpoint_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/basic_endpoint$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_basic_endpoint_OBJECTS) $(unit_ip_basic_endpoint_LDADD) $(LIBS)
+unit/ip/basic_resolver.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/basic_resolver$(EXEEXT): $(unit_ip_basic_resolver_OBJECTS) $(unit_ip_basic_resolver_DEPENDENCIES) $(EXTRA_unit_ip_basic_resolver_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/basic_resolver$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_basic_resolver_OBJECTS) $(unit_ip_basic_resolver_LDADD) $(LIBS)
+unit/ip/basic_resolver_entry.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/basic_resolver_entry$(EXEEXT): $(unit_ip_basic_resolver_entry_OBJECTS) $(unit_ip_basic_resolver_entry_DEPENDENCIES) $(EXTRA_unit_ip_basic_resolver_entry_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/basic_resolver_entry$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_basic_resolver_entry_OBJECTS) $(unit_ip_basic_resolver_entry_LDADD) $(LIBS)
+unit/ip/basic_resolver_iterator.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/basic_resolver_iterator$(EXEEXT): $(unit_ip_basic_resolver_iterator_OBJECTS) $(unit_ip_basic_resolver_iterator_DEPENDENCIES) $(EXTRA_unit_ip_basic_resolver_iterator_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/basic_resolver_iterator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_basic_resolver_iterator_OBJECTS) $(unit_ip_basic_resolver_iterator_LDADD) $(LIBS)
+unit/ip/basic_resolver_query.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/basic_resolver_query$(EXEEXT): $(unit_ip_basic_resolver_query_OBJECTS) $(unit_ip_basic_resolver_query_DEPENDENCIES) $(EXTRA_unit_ip_basic_resolver_query_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/basic_resolver_query$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_basic_resolver_query_OBJECTS) $(unit_ip_basic_resolver_query_LDADD) $(LIBS)
+unit/ip/host_name.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/host_name$(EXEEXT): $(unit_ip_host_name_OBJECTS) $(unit_ip_host_name_DEPENDENCIES) $(EXTRA_unit_ip_host_name_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/host_name$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_host_name_OBJECTS) $(unit_ip_host_name_LDADD) $(LIBS)
+unit/ip/icmp.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/icmp$(EXEEXT): $(unit_ip_icmp_OBJECTS) $(unit_ip_icmp_DEPENDENCIES) $(EXTRA_unit_ip_icmp_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/icmp$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_icmp_OBJECTS) $(unit_ip_icmp_LDADD) $(LIBS)
+unit/ip/multicast.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/multicast$(EXEEXT): $(unit_ip_multicast_OBJECTS) $(unit_ip_multicast_DEPENDENCIES) $(EXTRA_unit_ip_multicast_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/multicast$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_multicast_OBJECTS) $(unit_ip_multicast_LDADD) $(LIBS)
+unit/ip/network_v4.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/network_v4$(EXEEXT): $(unit_ip_network_v4_OBJECTS) $(unit_ip_network_v4_DEPENDENCIES) $(EXTRA_unit_ip_network_v4_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/network_v4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_network_v4_OBJECTS) $(unit_ip_network_v4_LDADD) $(LIBS)
+unit/ip/network_v6.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/network_v6$(EXEEXT): $(unit_ip_network_v6_OBJECTS) $(unit_ip_network_v6_DEPENDENCIES) $(EXTRA_unit_ip_network_v6_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/network_v6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_network_v6_OBJECTS) $(unit_ip_network_v6_LDADD) $(LIBS)
+unit/ip/resolver_query_base.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/resolver_query_base$(EXEEXT): $(unit_ip_resolver_query_base_OBJECTS) $(unit_ip_resolver_query_base_DEPENDENCIES) $(EXTRA_unit_ip_resolver_query_base_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/resolver_query_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_resolver_query_base_OBJECTS) $(unit_ip_resolver_query_base_LDADD) $(LIBS)
+unit/ip/tcp.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/tcp$(EXEEXT): $(unit_ip_tcp_OBJECTS) $(unit_ip_tcp_DEPENDENCIES) $(EXTRA_unit_ip_tcp_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/tcp$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_tcp_OBJECTS) $(unit_ip_tcp_LDADD) $(LIBS)
+unit/ip/udp.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/udp$(EXEEXT): $(unit_ip_udp_OBJECTS) $(unit_ip_udp_DEPENDENCIES) $(EXTRA_unit_ip_udp_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/udp$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_udp_OBJECTS) $(unit_ip_udp_LDADD) $(LIBS)
+unit/ip/unicast.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/unicast$(EXEEXT): $(unit_ip_unicast_OBJECTS) $(unit_ip_unicast_DEPENDENCIES) $(EXTRA_unit_ip_unicast_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/unicast$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_unicast_OBJECTS) $(unit_ip_unicast_LDADD) $(LIBS)
+unit/ip/v6_only.$(OBJEXT): unit/ip/$(am__dirstamp) \
+ unit/ip/$(DEPDIR)/$(am__dirstamp)
+
+unit/ip/v6_only$(EXEEXT): $(unit_ip_v6_only_OBJECTS) $(unit_ip_v6_only_DEPENDENCIES) $(EXTRA_unit_ip_v6_only_DEPENDENCIES) unit/ip/$(am__dirstamp)
+ @rm -f unit/ip/v6_only$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ip_v6_only_OBJECTS) $(unit_ip_v6_only_LDADD) $(LIBS)
+unit/is_read_buffered.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/is_read_buffered$(EXEEXT): $(unit_is_read_buffered_OBJECTS) $(unit_is_read_buffered_DEPENDENCIES) $(EXTRA_unit_is_read_buffered_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/is_read_buffered$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_is_read_buffered_OBJECTS) $(unit_is_read_buffered_LDADD) $(LIBS)
+unit/is_write_buffered.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/is_write_buffered$(EXEEXT): $(unit_is_write_buffered_OBJECTS) $(unit_is_write_buffered_DEPENDENCIES) $(EXTRA_unit_is_write_buffered_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/is_write_buffered$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_is_write_buffered_OBJECTS) $(unit_is_write_buffered_LDADD) $(LIBS)
+unit/local/$(am__dirstamp):
+ @$(MKDIR_P) unit/local
+ @: > unit/local/$(am__dirstamp)
+unit/local/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/local/$(DEPDIR)
+ @: > unit/local/$(DEPDIR)/$(am__dirstamp)
+unit/local/basic_endpoint.$(OBJEXT): unit/local/$(am__dirstamp) \
+ unit/local/$(DEPDIR)/$(am__dirstamp)
+
+unit/local/basic_endpoint$(EXEEXT): $(unit_local_basic_endpoint_OBJECTS) $(unit_local_basic_endpoint_DEPENDENCIES) $(EXTRA_unit_local_basic_endpoint_DEPENDENCIES) unit/local/$(am__dirstamp)
+ @rm -f unit/local/basic_endpoint$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_local_basic_endpoint_OBJECTS) $(unit_local_basic_endpoint_LDADD) $(LIBS)
+unit/local/connect_pair.$(OBJEXT): unit/local/$(am__dirstamp) \
+ unit/local/$(DEPDIR)/$(am__dirstamp)
+
+unit/local/connect_pair$(EXEEXT): $(unit_local_connect_pair_OBJECTS) $(unit_local_connect_pair_DEPENDENCIES) $(EXTRA_unit_local_connect_pair_DEPENDENCIES) unit/local/$(am__dirstamp)
+ @rm -f unit/local/connect_pair$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_local_connect_pair_OBJECTS) $(unit_local_connect_pair_LDADD) $(LIBS)
+unit/local/datagram_protocol.$(OBJEXT): unit/local/$(am__dirstamp) \
+ unit/local/$(DEPDIR)/$(am__dirstamp)
+
+unit/local/datagram_protocol$(EXEEXT): $(unit_local_datagram_protocol_OBJECTS) $(unit_local_datagram_protocol_DEPENDENCIES) $(EXTRA_unit_local_datagram_protocol_DEPENDENCIES) unit/local/$(am__dirstamp)
+ @rm -f unit/local/datagram_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_local_datagram_protocol_OBJECTS) $(unit_local_datagram_protocol_LDADD) $(LIBS)
+unit/local/seq_packet_protocol.$(OBJEXT): unit/local/$(am__dirstamp) \
+ unit/local/$(DEPDIR)/$(am__dirstamp)
+
+unit/local/seq_packet_protocol$(EXEEXT): $(unit_local_seq_packet_protocol_OBJECTS) $(unit_local_seq_packet_protocol_DEPENDENCIES) $(EXTRA_unit_local_seq_packet_protocol_DEPENDENCIES) unit/local/$(am__dirstamp)
+ @rm -f unit/local/seq_packet_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_local_seq_packet_protocol_OBJECTS) $(unit_local_seq_packet_protocol_LDADD) $(LIBS)
+unit/local/stream_protocol.$(OBJEXT): unit/local/$(am__dirstamp) \
+ unit/local/$(DEPDIR)/$(am__dirstamp)
+
+unit/local/stream_protocol$(EXEEXT): $(unit_local_stream_protocol_OBJECTS) $(unit_local_stream_protocol_DEPENDENCIES) $(EXTRA_unit_local_stream_protocol_DEPENDENCIES) unit/local/$(am__dirstamp)
+ @rm -f unit/local/stream_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_local_stream_protocol_OBJECTS) $(unit_local_stream_protocol_LDADD) $(LIBS)
+unit/packaged_task.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/packaged_task$(EXEEXT): $(unit_packaged_task_OBJECTS) $(unit_packaged_task_DEPENDENCIES) $(EXTRA_unit_packaged_task_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/packaged_task$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_packaged_task_OBJECTS) $(unit_packaged_task_LDADD) $(LIBS)
+unit/placeholders.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/placeholders$(EXEEXT): $(unit_placeholders_OBJECTS) $(unit_placeholders_DEPENDENCIES) $(EXTRA_unit_placeholders_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/placeholders$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_placeholders_OBJECTS) $(unit_placeholders_LDADD) $(LIBS)
+unit/posix/$(am__dirstamp):
+ @$(MKDIR_P) unit/posix
+ @: > unit/posix/$(am__dirstamp)
+unit/posix/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/posix/$(DEPDIR)
+ @: > unit/posix/$(DEPDIR)/$(am__dirstamp)
+unit/posix/basic_descriptor.$(OBJEXT): unit/posix/$(am__dirstamp) \
+ unit/posix/$(DEPDIR)/$(am__dirstamp)
+
+unit/posix/basic_descriptor$(EXEEXT): $(unit_posix_basic_descriptor_OBJECTS) $(unit_posix_basic_descriptor_DEPENDENCIES) $(EXTRA_unit_posix_basic_descriptor_DEPENDENCIES) unit/posix/$(am__dirstamp)
+ @rm -f unit/posix/basic_descriptor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_posix_basic_descriptor_OBJECTS) $(unit_posix_basic_descriptor_LDADD) $(LIBS)
+unit/posix/basic_stream_descriptor.$(OBJEXT): \
+ unit/posix/$(am__dirstamp) \
+ unit/posix/$(DEPDIR)/$(am__dirstamp)
+
+unit/posix/basic_stream_descriptor$(EXEEXT): $(unit_posix_basic_stream_descriptor_OBJECTS) $(unit_posix_basic_stream_descriptor_DEPENDENCIES) $(EXTRA_unit_posix_basic_stream_descriptor_DEPENDENCIES) unit/posix/$(am__dirstamp)
+ @rm -f unit/posix/basic_stream_descriptor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_posix_basic_stream_descriptor_OBJECTS) $(unit_posix_basic_stream_descriptor_LDADD) $(LIBS)
+unit/posix/descriptor.$(OBJEXT): unit/posix/$(am__dirstamp) \
+ unit/posix/$(DEPDIR)/$(am__dirstamp)
+
+unit/posix/descriptor$(EXEEXT): $(unit_posix_descriptor_OBJECTS) $(unit_posix_descriptor_DEPENDENCIES) $(EXTRA_unit_posix_descriptor_DEPENDENCIES) unit/posix/$(am__dirstamp)
+ @rm -f unit/posix/descriptor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_posix_descriptor_OBJECTS) $(unit_posix_descriptor_LDADD) $(LIBS)
+unit/posix/descriptor_base.$(OBJEXT): unit/posix/$(am__dirstamp) \
+ unit/posix/$(DEPDIR)/$(am__dirstamp)
+
+unit/posix/descriptor_base$(EXEEXT): $(unit_posix_descriptor_base_OBJECTS) $(unit_posix_descriptor_base_DEPENDENCIES) $(EXTRA_unit_posix_descriptor_base_DEPENDENCIES) unit/posix/$(am__dirstamp)
+ @rm -f unit/posix/descriptor_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_posix_descriptor_base_OBJECTS) $(unit_posix_descriptor_base_LDADD) $(LIBS)
+unit/posix/stream_descriptor.$(OBJEXT): unit/posix/$(am__dirstamp) \
+ unit/posix/$(DEPDIR)/$(am__dirstamp)
+
+unit/posix/stream_descriptor$(EXEEXT): $(unit_posix_stream_descriptor_OBJECTS) $(unit_posix_stream_descriptor_DEPENDENCIES) $(EXTRA_unit_posix_stream_descriptor_DEPENDENCIES) unit/posix/$(am__dirstamp)
+ @rm -f unit/posix/stream_descriptor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_posix_stream_descriptor_OBJECTS) $(unit_posix_stream_descriptor_LDADD) $(LIBS)
+unit/post.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/post$(EXEEXT): $(unit_post_OBJECTS) $(unit_post_DEPENDENCIES) $(EXTRA_unit_post_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/post$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_post_OBJECTS) $(unit_post_LDADD) $(LIBS)
+unit/prepend.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/prepend$(EXEEXT): $(unit_prepend_OBJECTS) $(unit_prepend_DEPENDENCIES) $(EXTRA_unit_prepend_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/prepend$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_prepend_OBJECTS) $(unit_prepend_LDADD) $(LIBS)
+unit/random_access_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/random_access_file$(EXEEXT): $(unit_random_access_file_OBJECTS) $(unit_random_access_file_DEPENDENCIES) $(EXTRA_unit_random_access_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/random_access_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_random_access_file_OBJECTS) $(unit_random_access_file_LDADD) $(LIBS)
+unit/read.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/read$(EXEEXT): $(unit_read_OBJECTS) $(unit_read_DEPENDENCIES) $(EXTRA_unit_read_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/read$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_read_OBJECTS) $(unit_read_LDADD) $(LIBS)
+unit/read_at.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/read_at$(EXEEXT): $(unit_read_at_OBJECTS) $(unit_read_at_DEPENDENCIES) $(EXTRA_unit_read_at_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/read_at$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_read_at_OBJECTS) $(unit_read_at_LDADD) $(LIBS)
+unit/read_until.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/read_until$(EXEEXT): $(unit_read_until_OBJECTS) $(unit_read_until_DEPENDENCIES) $(EXTRA_unit_read_until_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/read_until$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_read_until_OBJECTS) $(unit_read_until_LDADD) $(LIBS)
+unit/readable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/readable_pipe$(EXEEXT): $(unit_readable_pipe_OBJECTS) $(unit_readable_pipe_DEPENDENCIES) $(EXTRA_unit_readable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/readable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_readable_pipe_OBJECTS) $(unit_readable_pipe_LDADD) $(LIBS)
+unit/recycling_allocator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/recycling_allocator$(EXEEXT): $(unit_recycling_allocator_OBJECTS) $(unit_recycling_allocator_DEPENDENCIES) $(EXTRA_unit_recycling_allocator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/recycling_allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_recycling_allocator_OBJECTS) $(unit_recycling_allocator_LDADD) $(LIBS)
+unit/redirect_error.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/redirect_error$(EXEEXT): $(unit_redirect_error_OBJECTS) $(unit_redirect_error_DEPENDENCIES) $(EXTRA_unit_redirect_error_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/redirect_error$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_redirect_error_OBJECTS) $(unit_redirect_error_LDADD) $(LIBS)
+unit/registered_buffer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/registered_buffer$(EXEEXT): $(unit_registered_buffer_OBJECTS) $(unit_registered_buffer_DEPENDENCIES) $(EXTRA_unit_registered_buffer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/registered_buffer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_registered_buffer_OBJECTS) $(unit_registered_buffer_LDADD) $(LIBS)
+unit/serial_port.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/serial_port$(EXEEXT): $(unit_serial_port_OBJECTS) $(unit_serial_port_DEPENDENCIES) $(EXTRA_unit_serial_port_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/serial_port$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_serial_port_OBJECTS) $(unit_serial_port_LDADD) $(LIBS)
+unit/serial_port_base.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/serial_port_base$(EXEEXT): $(unit_serial_port_base_OBJECTS) $(unit_serial_port_base_DEPENDENCIES) $(EXTRA_unit_serial_port_base_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/serial_port_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_serial_port_base_OBJECTS) $(unit_serial_port_base_LDADD) $(LIBS)
+unit/signal_set.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/signal_set$(EXEEXT): $(unit_signal_set_OBJECTS) $(unit_signal_set_DEPENDENCIES) $(EXTRA_unit_signal_set_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/signal_set$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_signal_set_OBJECTS) $(unit_signal_set_LDADD) $(LIBS)
+unit/signal_set_base.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/signal_set_base$(EXEEXT): $(unit_signal_set_base_OBJECTS) $(unit_signal_set_base_DEPENDENCIES) $(EXTRA_unit_signal_set_base_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/signal_set_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_signal_set_base_OBJECTS) $(unit_signal_set_base_LDADD) $(LIBS)
+unit/socket_base.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/socket_base$(EXEEXT): $(unit_socket_base_OBJECTS) $(unit_socket_base_DEPENDENCIES) $(EXTRA_unit_socket_base_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/socket_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_socket_base_OBJECTS) $(unit_socket_base_LDADD) $(LIBS)
+unit/ssl/$(am__dirstamp):
+ @$(MKDIR_P) unit/ssl
+ @: > unit/ssl/$(am__dirstamp)
+unit/ssl/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/ssl/$(DEPDIR)
+ @: > unit/ssl/$(DEPDIR)/$(am__dirstamp)
+unit/ssl/context.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/context$(EXEEXT): $(unit_ssl_context_OBJECTS) $(unit_ssl_context_DEPENDENCIES) $(EXTRA_unit_ssl_context_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/context$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_context_OBJECTS) $(unit_ssl_context_LDADD) $(LIBS)
+unit/ssl/context_base.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/context_base$(EXEEXT): $(unit_ssl_context_base_OBJECTS) $(unit_ssl_context_base_DEPENDENCIES) $(EXTRA_unit_ssl_context_base_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/context_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_context_base_OBJECTS) $(unit_ssl_context_base_LDADD) $(LIBS)
+unit/ssl/error.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/error$(EXEEXT): $(unit_ssl_error_OBJECTS) $(unit_ssl_error_DEPENDENCIES) $(EXTRA_unit_ssl_error_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/error$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_error_OBJECTS) $(unit_ssl_error_LDADD) $(LIBS)
+unit/ssl/host_name_verification.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/host_name_verification$(EXEEXT): $(unit_ssl_host_name_verification_OBJECTS) $(unit_ssl_host_name_verification_DEPENDENCIES) $(EXTRA_unit_ssl_host_name_verification_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/host_name_verification$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_host_name_verification_OBJECTS) $(unit_ssl_host_name_verification_LDADD) $(LIBS)
+unit/ssl/rfc2818_verification.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/rfc2818_verification$(EXEEXT): $(unit_ssl_rfc2818_verification_OBJECTS) $(unit_ssl_rfc2818_verification_DEPENDENCIES) $(EXTRA_unit_ssl_rfc2818_verification_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/rfc2818_verification$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_rfc2818_verification_OBJECTS) $(unit_ssl_rfc2818_verification_LDADD) $(LIBS)
+unit/ssl/stream.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/stream$(EXEEXT): $(unit_ssl_stream_OBJECTS) $(unit_ssl_stream_DEPENDENCIES) $(EXTRA_unit_ssl_stream_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/stream$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_stream_OBJECTS) $(unit_ssl_stream_LDADD) $(LIBS)
+unit/ssl/stream_base.$(OBJEXT): unit/ssl/$(am__dirstamp) \
+ unit/ssl/$(DEPDIR)/$(am__dirstamp)
+
+unit/ssl/stream_base$(EXEEXT): $(unit_ssl_stream_base_OBJECTS) $(unit_ssl_stream_base_DEPENDENCIES) $(EXTRA_unit_ssl_stream_base_DEPENDENCIES) unit/ssl/$(am__dirstamp)
+ @rm -f unit/ssl/stream_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ssl_stream_base_OBJECTS) $(unit_ssl_stream_base_LDADD) $(LIBS)
+unit/static_thread_pool.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/static_thread_pool$(EXEEXT): $(unit_static_thread_pool_OBJECTS) $(unit_static_thread_pool_DEPENDENCIES) $(EXTRA_unit_static_thread_pool_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/static_thread_pool$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_static_thread_pool_OBJECTS) $(unit_static_thread_pool_LDADD) $(LIBS)
+unit/steady_timer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/steady_timer$(EXEEXT): $(unit_steady_timer_OBJECTS) $(unit_steady_timer_DEPENDENCIES) $(EXTRA_unit_steady_timer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/steady_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_steady_timer_OBJECTS) $(unit_steady_timer_LDADD) $(LIBS)
+unit/strand.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/strand$(EXEEXT): $(unit_strand_OBJECTS) $(unit_strand_DEPENDENCIES) $(EXTRA_unit_strand_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/strand$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_strand_OBJECTS) $(unit_strand_LDADD) $(LIBS)
+unit/stream_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/stream_file$(EXEEXT): $(unit_stream_file_OBJECTS) $(unit_stream_file_DEPENDENCIES) $(EXTRA_unit_stream_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/stream_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_stream_file_OBJECTS) $(unit_stream_file_LDADD) $(LIBS)
+unit/streambuf.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/streambuf$(EXEEXT): $(unit_streambuf_OBJECTS) $(unit_streambuf_DEPENDENCIES) $(EXTRA_unit_streambuf_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/streambuf$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_streambuf_OBJECTS) $(unit_streambuf_LDADD) $(LIBS)
+unit/system_context.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/system_context$(EXEEXT): $(unit_system_context_OBJECTS) $(unit_system_context_DEPENDENCIES) $(EXTRA_unit_system_context_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/system_context$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_system_context_OBJECTS) $(unit_system_context_LDADD) $(LIBS)
+unit/system_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/system_executor$(EXEEXT): $(unit_system_executor_OBJECTS) $(unit_system_executor_DEPENDENCIES) $(EXTRA_unit_system_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/system_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_system_executor_OBJECTS) $(unit_system_executor_LDADD) $(LIBS)
+unit/system_timer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/system_timer$(EXEEXT): $(unit_system_timer_OBJECTS) $(unit_system_timer_DEPENDENCIES) $(EXTRA_unit_system_timer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/system_timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_system_timer_OBJECTS) $(unit_system_timer_LDADD) $(LIBS)
+unit/this_coro.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/this_coro$(EXEEXT): $(unit_this_coro_OBJECTS) $(unit_this_coro_DEPENDENCIES) $(EXTRA_unit_this_coro_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/this_coro$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_this_coro_OBJECTS) $(unit_this_coro_LDADD) $(LIBS)
+unit/thread.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/thread$(EXEEXT): $(unit_thread_OBJECTS) $(unit_thread_DEPENDENCIES) $(EXTRA_unit_thread_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/thread$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_thread_OBJECTS) $(unit_thread_LDADD) $(LIBS)
+unit/thread_pool.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/thread_pool$(EXEEXT): $(unit_thread_pool_OBJECTS) $(unit_thread_pool_DEPENDENCIES) $(EXTRA_unit_thread_pool_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/thread_pool$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_thread_pool_OBJECTS) $(unit_thread_pool_LDADD) $(LIBS)
+unit/time_traits.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/time_traits$(EXEEXT): $(unit_time_traits_OBJECTS) $(unit_time_traits_DEPENDENCIES) $(EXTRA_unit_time_traits_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/time_traits$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_time_traits_OBJECTS) $(unit_time_traits_LDADD) $(LIBS)
+unit/ts/$(am__dirstamp):
+ @$(MKDIR_P) unit/ts
+ @: > unit/ts/$(am__dirstamp)
+unit/ts/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/ts/$(DEPDIR)
+ @: > unit/ts/$(DEPDIR)/$(am__dirstamp)
+unit/ts/buffer.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/buffer$(EXEEXT): $(unit_ts_buffer_OBJECTS) $(unit_ts_buffer_DEPENDENCIES) $(EXTRA_unit_ts_buffer_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/buffer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_buffer_OBJECTS) $(unit_ts_buffer_LDADD) $(LIBS)
+unit/ts/executor.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/executor$(EXEEXT): $(unit_ts_executor_OBJECTS) $(unit_ts_executor_DEPENDENCIES) $(EXTRA_unit_ts_executor_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_executor_OBJECTS) $(unit_ts_executor_LDADD) $(LIBS)
+unit/ts/internet.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/internet$(EXEEXT): $(unit_ts_internet_OBJECTS) $(unit_ts_internet_DEPENDENCIES) $(EXTRA_unit_ts_internet_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/internet$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_internet_OBJECTS) $(unit_ts_internet_LDADD) $(LIBS)
+unit/ts/io_context.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/io_context$(EXEEXT): $(unit_ts_io_context_OBJECTS) $(unit_ts_io_context_DEPENDENCIES) $(EXTRA_unit_ts_io_context_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/io_context$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_io_context_OBJECTS) $(unit_ts_io_context_LDADD) $(LIBS)
+unit/ts/net.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/net$(EXEEXT): $(unit_ts_net_OBJECTS) $(unit_ts_net_DEPENDENCIES) $(EXTRA_unit_ts_net_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/net$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_net_OBJECTS) $(unit_ts_net_LDADD) $(LIBS)
+unit/ts/netfwd.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/netfwd$(EXEEXT): $(unit_ts_netfwd_OBJECTS) $(unit_ts_netfwd_DEPENDENCIES) $(EXTRA_unit_ts_netfwd_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/netfwd$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_netfwd_OBJECTS) $(unit_ts_netfwd_LDADD) $(LIBS)
+unit/ts/socket.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/socket$(EXEEXT): $(unit_ts_socket_OBJECTS) $(unit_ts_socket_DEPENDENCIES) $(EXTRA_unit_ts_socket_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/socket$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_socket_OBJECTS) $(unit_ts_socket_LDADD) $(LIBS)
+unit/ts/timer.$(OBJEXT): unit/ts/$(am__dirstamp) \
+ unit/ts/$(DEPDIR)/$(am__dirstamp)
+
+unit/ts/timer$(EXEEXT): $(unit_ts_timer_OBJECTS) $(unit_ts_timer_DEPENDENCIES) $(EXTRA_unit_ts_timer_DEPENDENCIES) unit/ts/$(am__dirstamp)
+ @rm -f unit/ts/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_ts_timer_OBJECTS) $(unit_ts_timer_LDADD) $(LIBS)
+unit/use_awaitable.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/use_awaitable$(EXEEXT): $(unit_use_awaitable_OBJECTS) $(unit_use_awaitable_DEPENDENCIES) $(EXTRA_unit_use_awaitable_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/use_awaitable$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_use_awaitable_OBJECTS) $(unit_use_awaitable_LDADD) $(LIBS)
+unit/use_future.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/use_future$(EXEEXT): $(unit_use_future_OBJECTS) $(unit_use_future_DEPENDENCIES) $(EXTRA_unit_use_future_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/use_future$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_use_future_OBJECTS) $(unit_use_future_LDADD) $(LIBS)
+unit/uses_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/uses_executor$(EXEEXT): $(unit_uses_executor_OBJECTS) $(unit_uses_executor_DEPENDENCIES) $(EXTRA_unit_uses_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/uses_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_uses_executor_OBJECTS) $(unit_uses_executor_LDADD) $(LIBS)
+unit/wait_traits.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/wait_traits$(EXEEXT): $(unit_wait_traits_OBJECTS) $(unit_wait_traits_DEPENDENCIES) $(EXTRA_unit_wait_traits_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/wait_traits$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_wait_traits_OBJECTS) $(unit_wait_traits_LDADD) $(LIBS)
+unit/windows/$(am__dirstamp):
+ @$(MKDIR_P) unit/windows
+ @: > unit/windows/$(am__dirstamp)
+unit/windows/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) unit/windows/$(DEPDIR)
+ @: > unit/windows/$(DEPDIR)/$(am__dirstamp)
+unit/windows/basic_object_handle.$(OBJEXT): \
+ unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/basic_object_handle$(EXEEXT): $(unit_windows_basic_object_handle_OBJECTS) $(unit_windows_basic_object_handle_DEPENDENCIES) $(EXTRA_unit_windows_basic_object_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/basic_object_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_basic_object_handle_OBJECTS) $(unit_windows_basic_object_handle_LDADD) $(LIBS)
+unit/windows/basic_overlapped_handle.$(OBJEXT): \
+ unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/basic_overlapped_handle$(EXEEXT): $(unit_windows_basic_overlapped_handle_OBJECTS) $(unit_windows_basic_overlapped_handle_DEPENDENCIES) $(EXTRA_unit_windows_basic_overlapped_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/basic_overlapped_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_basic_overlapped_handle_OBJECTS) $(unit_windows_basic_overlapped_handle_LDADD) $(LIBS)
+unit/windows/basic_random_access_handle.$(OBJEXT): \
+ unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/basic_random_access_handle$(EXEEXT): $(unit_windows_basic_random_access_handle_OBJECTS) $(unit_windows_basic_random_access_handle_DEPENDENCIES) $(EXTRA_unit_windows_basic_random_access_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/basic_random_access_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_basic_random_access_handle_OBJECTS) $(unit_windows_basic_random_access_handle_LDADD) $(LIBS)
+unit/windows/basic_stream_handle.$(OBJEXT): \
+ unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/basic_stream_handle$(EXEEXT): $(unit_windows_basic_stream_handle_OBJECTS) $(unit_windows_basic_stream_handle_DEPENDENCIES) $(EXTRA_unit_windows_basic_stream_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/basic_stream_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_basic_stream_handle_OBJECTS) $(unit_windows_basic_stream_handle_LDADD) $(LIBS)
+unit/windows/object_handle.$(OBJEXT): unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/object_handle$(EXEEXT): $(unit_windows_object_handle_OBJECTS) $(unit_windows_object_handle_DEPENDENCIES) $(EXTRA_unit_windows_object_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/object_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_object_handle_OBJECTS) $(unit_windows_object_handle_LDADD) $(LIBS)
+unit/windows/overlapped_handle.$(OBJEXT): \
+ unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/overlapped_handle$(EXEEXT): $(unit_windows_overlapped_handle_OBJECTS) $(unit_windows_overlapped_handle_DEPENDENCIES) $(EXTRA_unit_windows_overlapped_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/overlapped_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_overlapped_handle_OBJECTS) $(unit_windows_overlapped_handle_LDADD) $(LIBS)
+unit/windows/overlapped_ptr.$(OBJEXT): unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/overlapped_ptr$(EXEEXT): $(unit_windows_overlapped_ptr_OBJECTS) $(unit_windows_overlapped_ptr_DEPENDENCIES) $(EXTRA_unit_windows_overlapped_ptr_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/overlapped_ptr$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_overlapped_ptr_OBJECTS) $(unit_windows_overlapped_ptr_LDADD) $(LIBS)
+unit/windows/random_access_handle.$(OBJEXT): \
+ unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/random_access_handle$(EXEEXT): $(unit_windows_random_access_handle_OBJECTS) $(unit_windows_random_access_handle_DEPENDENCIES) $(EXTRA_unit_windows_random_access_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/random_access_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_random_access_handle_OBJECTS) $(unit_windows_random_access_handle_LDADD) $(LIBS)
+unit/windows/stream_handle.$(OBJEXT): unit/windows/$(am__dirstamp) \
+ unit/windows/$(DEPDIR)/$(am__dirstamp)
+
+unit/windows/stream_handle$(EXEEXT): $(unit_windows_stream_handle_OBJECTS) $(unit_windows_stream_handle_DEPENDENCIES) $(EXTRA_unit_windows_stream_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
+ @rm -f unit/windows/stream_handle$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_windows_stream_handle_OBJECTS) $(unit_windows_stream_handle_LDADD) $(LIBS)
+unit/writable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/writable_pipe$(EXEEXT): $(unit_writable_pipe_OBJECTS) $(unit_writable_pipe_DEPENDENCIES) $(EXTRA_unit_writable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/writable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_writable_pipe_OBJECTS) $(unit_writable_pipe_LDADD) $(LIBS)
+unit/write.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/write$(EXEEXT): $(unit_write_OBJECTS) $(unit_write_DEPENDENCIES) $(EXTRA_unit_write_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/write$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_write_OBJECTS) $(unit_write_LDADD) $(LIBS)
+unit/write_at.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/write_at$(EXEEXT): $(unit_write_at_OBJECTS) $(unit_write_at_DEPENDENCIES) $(EXTRA_unit_write_at_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/write_at$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_write_at_OBJECTS) $(unit_write_at_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ../*.$(OBJEXT)
+ -rm -f latency/*.$(OBJEXT)
+ -rm -f performance/*.$(OBJEXT)
+ -rm -f unit/*.$(OBJEXT)
+ -rm -f unit/execution/*.$(OBJEXT)
+ -rm -f unit/experimental/*.$(OBJEXT)
+ -rm -f unit/experimental/coro/*.$(OBJEXT)
+ -rm -f unit/generic/*.$(OBJEXT)
+ -rm -f unit/ip/*.$(OBJEXT)
+ -rm -f unit/local/*.$(OBJEXT)
+ -rm -f unit/posix/*.$(OBJEXT)
+ -rm -f unit/ssl/*.$(OBJEXT)
+ -rm -f unit/ts/*.$(OBJEXT)
+ -rm -f unit/windows/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@latency/$(DEPDIR)/tcp_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@latency/$(DEPDIR)/tcp_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@latency/$(DEPDIR)/udp_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@latency/$(DEPDIR)/udp_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@performance/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@performance/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/any_completion_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/any_completion_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/any_io_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/append.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/as_tuple.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_allocator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_cancellation_slot.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_immediate_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/async_result.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/awaitable.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_datagram_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_deadline_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_random_access_file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_raw_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_readable_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_seq_packet_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_serial_port.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_signal_set.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_socket_acceptor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_stream_file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_stream_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_streambuf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_waitable_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_writable_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_allocator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_cancellation_slot.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_immediate_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffer_registration.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffered_read_stream.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffered_stream.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffered_write_stream.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffers_iterator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/cancellation_signal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/cancellation_state.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/cancellation_type.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/co_spawn.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/completion_condition.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/compose.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/connect.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/connect_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/consign.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/coroutine.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/deadline_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/defer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/deferred.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/detached.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/dispatch.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/execution_context.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/executor_work_guard.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/file_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/high_resolution_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/io_context.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/io_context_strand.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/is_read_buffered.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/is_write_buffered.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/packaged_task.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/placeholders.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/post.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/prepend.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/random_access_file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/read.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/read_at.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/read_until.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/readable_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/recycling_allocator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/redirect_error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/registered_buffer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/serial_port.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/serial_port_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/signal_set.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/signal_set_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/socket_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/static_thread_pool.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/steady_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/strand.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/stream_file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/streambuf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/system_context.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/system_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/system_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/this_coro.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/thread_pool.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/time_traits.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/use_awaitable.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/use_future.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/uses_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/wait_traits.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/writable_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/write.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/write_at.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/any_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/blocking.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/blocking_adaptation.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/context_as.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/invocable_archetype.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/mapping.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/outstanding_work.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/prefer_only.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/relationship.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/awaitable_operators.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/basic_channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/channel_traits.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/co_composed.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/concurrent_channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/parallel_group.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/promise.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/allocator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/cancel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/co_spawn.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/exception.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/partial.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/simple_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/stack_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/use_coro.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/generic/$(DEPDIR)/basic_endpoint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/generic/$(DEPDIR)/datagram_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/generic/$(DEPDIR)/raw_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/generic/$(DEPDIR)/seq_packet_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/generic/$(DEPDIR)/stream_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address_v4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address_v4_iterator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address_v4_range.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address_v6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address_v6_iterator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/address_v6_range.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/basic_endpoint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/basic_resolver.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/basic_resolver_entry.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/basic_resolver_iterator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/basic_resolver_query.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/host_name.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/icmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/multicast.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/network_v4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/network_v6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/resolver_query_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/tcp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/udp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/unicast.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ip/$(DEPDIR)/v6_only.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/basic_endpoint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/connect_pair.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/datagram_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/seq_packet_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/stream_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/basic_descriptor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/basic_stream_descriptor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/descriptor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/descriptor_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/stream_descriptor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/context.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/context_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/host_name_verification.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/rfc2818_verification.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/stream.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ssl/$(DEPDIR)/stream_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/buffer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/internet.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/io_context.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/net.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/netfwd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/ts/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/basic_object_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/basic_overlapped_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/basic_random_access_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/basic_stream_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/object_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/overlapped_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/overlapped_ptr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/random_access_handle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/windows/$(DEPDIR)/stream_handle.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS: $(check_PROGRAMS)
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+unit/any_completion_executor.log: unit/any_completion_executor$(EXEEXT)
+ @p='unit/any_completion_executor$(EXEEXT)'; \
+ b='unit/any_completion_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/any_completion_handler.log: unit/any_completion_handler$(EXEEXT)
+ @p='unit/any_completion_handler$(EXEEXT)'; \
+ b='unit/any_completion_handler'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/any_io_executor.log: unit/any_io_executor$(EXEEXT)
+ @p='unit/any_io_executor$(EXEEXT)'; \
+ b='unit/any_io_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/append.log: unit/append$(EXEEXT)
+ @p='unit/append$(EXEEXT)'; \
+ b='unit/append'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/as_tuple.log: unit/as_tuple$(EXEEXT)
+ @p='unit/as_tuple$(EXEEXT)'; \
+ b='unit/as_tuple'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/associated_allocator.log: unit/associated_allocator$(EXEEXT)
+ @p='unit/associated_allocator$(EXEEXT)'; \
+ b='unit/associated_allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/associated_cancellation_slot.log: unit/associated_cancellation_slot$(EXEEXT)
+ @p='unit/associated_cancellation_slot$(EXEEXT)'; \
+ b='unit/associated_cancellation_slot'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/associated_executor.log: unit/associated_executor$(EXEEXT)
+ @p='unit/associated_executor$(EXEEXT)'; \
+ b='unit/associated_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/associated_immediate_executor.log: unit/associated_immediate_executor$(EXEEXT)
+ @p='unit/associated_immediate_executor$(EXEEXT)'; \
+ b='unit/associated_immediate_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/associator.log: unit/associator$(EXEEXT)
+ @p='unit/associator$(EXEEXT)'; \
+ b='unit/associator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/async_result.log: unit/async_result$(EXEEXT)
+ @p='unit/async_result$(EXEEXT)'; \
+ b='unit/async_result'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/awaitable.log: unit/awaitable$(EXEEXT)
+ @p='unit/awaitable$(EXEEXT)'; \
+ b='unit/awaitable'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_datagram_socket.log: unit/basic_datagram_socket$(EXEEXT)
+ @p='unit/basic_datagram_socket$(EXEEXT)'; \
+ b='unit/basic_datagram_socket'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_deadline_timer.log: unit/basic_deadline_timer$(EXEEXT)
+ @p='unit/basic_deadline_timer$(EXEEXT)'; \
+ b='unit/basic_deadline_timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_file.log: unit/basic_file$(EXEEXT)
+ @p='unit/basic_file$(EXEEXT)'; \
+ b='unit/basic_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_random_access_file.log: unit/basic_random_access_file$(EXEEXT)
+ @p='unit/basic_random_access_file$(EXEEXT)'; \
+ b='unit/basic_random_access_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_raw_socket.log: unit/basic_raw_socket$(EXEEXT)
+ @p='unit/basic_raw_socket$(EXEEXT)'; \
+ b='unit/basic_raw_socket'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_readable_pipe.log: unit/basic_readable_pipe$(EXEEXT)
+ @p='unit/basic_readable_pipe$(EXEEXT)'; \
+ b='unit/basic_readable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_seq_packet_socket.log: unit/basic_seq_packet_socket$(EXEEXT)
+ @p='unit/basic_seq_packet_socket$(EXEEXT)'; \
+ b='unit/basic_seq_packet_socket'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_serial_port.log: unit/basic_serial_port$(EXEEXT)
+ @p='unit/basic_serial_port$(EXEEXT)'; \
+ b='unit/basic_serial_port'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_signal_set.log: unit/basic_signal_set$(EXEEXT)
+ @p='unit/basic_signal_set$(EXEEXT)'; \
+ b='unit/basic_signal_set'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_socket.log: unit/basic_socket$(EXEEXT)
+ @p='unit/basic_socket$(EXEEXT)'; \
+ b='unit/basic_socket'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_socket_acceptor.log: unit/basic_socket_acceptor$(EXEEXT)
+ @p='unit/basic_socket_acceptor$(EXEEXT)'; \
+ b='unit/basic_socket_acceptor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_stream_file.log: unit/basic_stream_file$(EXEEXT)
+ @p='unit/basic_stream_file$(EXEEXT)'; \
+ b='unit/basic_stream_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_stream_socket.log: unit/basic_stream_socket$(EXEEXT)
+ @p='unit/basic_stream_socket$(EXEEXT)'; \
+ b='unit/basic_stream_socket'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_streambuf.log: unit/basic_streambuf$(EXEEXT)
+ @p='unit/basic_streambuf$(EXEEXT)'; \
+ b='unit/basic_streambuf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_waitable_timer.log: unit/basic_waitable_timer$(EXEEXT)
+ @p='unit/basic_waitable_timer$(EXEEXT)'; \
+ b='unit/basic_waitable_timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_writable_pipe.log: unit/basic_writable_pipe$(EXEEXT)
+ @p='unit/basic_writable_pipe$(EXEEXT)'; \
+ b='unit/basic_writable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/bind_allocator.log: unit/bind_allocator$(EXEEXT)
+ @p='unit/bind_allocator$(EXEEXT)'; \
+ b='unit/bind_allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/bind_cancellation_slot.log: unit/bind_cancellation_slot$(EXEEXT)
+ @p='unit/bind_cancellation_slot$(EXEEXT)'; \
+ b='unit/bind_cancellation_slot'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/bind_executor.log: unit/bind_executor$(EXEEXT)
+ @p='unit/bind_executor$(EXEEXT)'; \
+ b='unit/bind_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/bind_immediate_executor.log: unit/bind_immediate_executor$(EXEEXT)
+ @p='unit/bind_immediate_executor$(EXEEXT)'; \
+ b='unit/bind_immediate_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffered_read_stream.log: unit/buffered_read_stream$(EXEEXT)
+ @p='unit/buffered_read_stream$(EXEEXT)'; \
+ b='unit/buffered_read_stream'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffered_stream.log: unit/buffered_stream$(EXEEXT)
+ @p='unit/buffered_stream$(EXEEXT)'; \
+ b='unit/buffered_stream'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffered_write_stream.log: unit/buffered_write_stream$(EXEEXT)
+ @p='unit/buffered_write_stream$(EXEEXT)'; \
+ b='unit/buffered_write_stream'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffer.log: unit/buffer$(EXEEXT)
+ @p='unit/buffer$(EXEEXT)'; \
+ b='unit/buffer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffer_registration.log: unit/buffer_registration$(EXEEXT)
+ @p='unit/buffer_registration$(EXEEXT)'; \
+ b='unit/buffer_registration'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffers_iterator.log: unit/buffers_iterator$(EXEEXT)
+ @p='unit/buffers_iterator$(EXEEXT)'; \
+ b='unit/buffers_iterator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/cancellation_signal.log: unit/cancellation_signal$(EXEEXT)
+ @p='unit/cancellation_signal$(EXEEXT)'; \
+ b='unit/cancellation_signal'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/cancellation_state.log: unit/cancellation_state$(EXEEXT)
+ @p='unit/cancellation_state$(EXEEXT)'; \
+ b='unit/cancellation_state'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/cancellation_type.log: unit/cancellation_type$(EXEEXT)
+ @p='unit/cancellation_type$(EXEEXT)'; \
+ b='unit/cancellation_type'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/co_spawn.log: unit/co_spawn$(EXEEXT)
+ @p='unit/co_spawn$(EXEEXT)'; \
+ b='unit/co_spawn'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/completion_condition.log: unit/completion_condition$(EXEEXT)
+ @p='unit/completion_condition$(EXEEXT)'; \
+ b='unit/completion_condition'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/compose.log: unit/compose$(EXEEXT)
+ @p='unit/compose$(EXEEXT)'; \
+ b='unit/compose'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/connect.log: unit/connect$(EXEEXT)
+ @p='unit/connect$(EXEEXT)'; \
+ b='unit/connect'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/connect_pipe.log: unit/connect_pipe$(EXEEXT)
+ @p='unit/connect_pipe$(EXEEXT)'; \
+ b='unit/connect_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/consign.log: unit/consign$(EXEEXT)
+ @p='unit/consign$(EXEEXT)'; \
+ b='unit/consign'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/deadline_timer.log: unit/deadline_timer$(EXEEXT)
+ @p='unit/deadline_timer$(EXEEXT)'; \
+ b='unit/deadline_timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/defer.log: unit/defer$(EXEEXT)
+ @p='unit/defer$(EXEEXT)'; \
+ b='unit/defer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/deferred.log: unit/deferred$(EXEEXT)
+ @p='unit/deferred$(EXEEXT)'; \
+ b='unit/deferred'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/detached.log: unit/detached$(EXEEXT)
+ @p='unit/detached$(EXEEXT)'; \
+ b='unit/detached'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/dispatch.log: unit/dispatch$(EXEEXT)
+ @p='unit/dispatch$(EXEEXT)'; \
+ b='unit/dispatch'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/error.log: unit/error$(EXEEXT)
+ @p='unit/error$(EXEEXT)'; \
+ b='unit/error'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/any_executor.log: unit/execution/any_executor$(EXEEXT)
+ @p='unit/execution/any_executor$(EXEEXT)'; \
+ b='unit/execution/any_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/blocking.log: unit/execution/blocking$(EXEEXT)
+ @p='unit/execution/blocking$(EXEEXT)'; \
+ b='unit/execution/blocking'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/blocking_adaptation.log: unit/execution/blocking_adaptation$(EXEEXT)
+ @p='unit/execution/blocking_adaptation$(EXEEXT)'; \
+ b='unit/execution/blocking_adaptation'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/context_as.log: unit/execution/context_as$(EXEEXT)
+ @p='unit/execution/context_as$(EXEEXT)'; \
+ b='unit/execution/context_as'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/executor.log: unit/execution/executor$(EXEEXT)
+ @p='unit/execution/executor$(EXEEXT)'; \
+ b='unit/execution/executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/invocable_archetype.log: unit/execution/invocable_archetype$(EXEEXT)
+ @p='unit/execution/invocable_archetype$(EXEEXT)'; \
+ b='unit/execution/invocable_archetype'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/mapping.log: unit/execution/mapping$(EXEEXT)
+ @p='unit/execution/mapping$(EXEEXT)'; \
+ b='unit/execution/mapping'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/outstanding_work.log: unit/execution/outstanding_work$(EXEEXT)
+ @p='unit/execution/outstanding_work$(EXEEXT)'; \
+ b='unit/execution/outstanding_work'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/prefer_only.log: unit/execution/prefer_only$(EXEEXT)
+ @p='unit/execution/prefer_only$(EXEEXT)'; \
+ b='unit/execution/prefer_only'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution/relationship.log: unit/execution/relationship$(EXEEXT)
+ @p='unit/execution/relationship$(EXEEXT)'; \
+ b='unit/execution/relationship'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/execution_context.log: unit/execution_context$(EXEEXT)
+ @p='unit/execution_context$(EXEEXT)'; \
+ b='unit/execution_context'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/executor.log: unit/executor$(EXEEXT)
+ @p='unit/executor$(EXEEXT)'; \
+ b='unit/executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/executor_work_guard.log: unit/executor_work_guard$(EXEEXT)
+ @p='unit/executor_work_guard$(EXEEXT)'; \
+ b='unit/executor_work_guard'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/file_base.log: unit/file_base$(EXEEXT)
+ @p='unit/file_base$(EXEEXT)'; \
+ b='unit/file_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/high_resolution_timer.log: unit/high_resolution_timer$(EXEEXT)
+ @p='unit/high_resolution_timer$(EXEEXT)'; \
+ b='unit/high_resolution_timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/io_context.log: unit/io_context$(EXEEXT)
+ @p='unit/io_context$(EXEEXT)'; \
+ b='unit/io_context'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/io_context_strand.log: unit/io_context_strand$(EXEEXT)
+ @p='unit/io_context_strand$(EXEEXT)'; \
+ b='unit/io_context_strand'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address.log: unit/ip/address$(EXEEXT)
+ @p='unit/ip/address$(EXEEXT)'; \
+ b='unit/ip/address'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address_v4.log: unit/ip/address_v4$(EXEEXT)
+ @p='unit/ip/address_v4$(EXEEXT)'; \
+ b='unit/ip/address_v4'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address_v4_iterator.log: unit/ip/address_v4_iterator$(EXEEXT)
+ @p='unit/ip/address_v4_iterator$(EXEEXT)'; \
+ b='unit/ip/address_v4_iterator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address_v4_range.log: unit/ip/address_v4_range$(EXEEXT)
+ @p='unit/ip/address_v4_range$(EXEEXT)'; \
+ b='unit/ip/address_v4_range'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address_v6.log: unit/ip/address_v6$(EXEEXT)
+ @p='unit/ip/address_v6$(EXEEXT)'; \
+ b='unit/ip/address_v6'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address_v6_iterator.log: unit/ip/address_v6_iterator$(EXEEXT)
+ @p='unit/ip/address_v6_iterator$(EXEEXT)'; \
+ b='unit/ip/address_v6_iterator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/address_v6_range.log: unit/ip/address_v6_range$(EXEEXT)
+ @p='unit/ip/address_v6_range$(EXEEXT)'; \
+ b='unit/ip/address_v6_range'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/basic_endpoint.log: unit/ip/basic_endpoint$(EXEEXT)
+ @p='unit/ip/basic_endpoint$(EXEEXT)'; \
+ b='unit/ip/basic_endpoint'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/basic_resolver.log: unit/ip/basic_resolver$(EXEEXT)
+ @p='unit/ip/basic_resolver$(EXEEXT)'; \
+ b='unit/ip/basic_resolver'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/basic_resolver_entry.log: unit/ip/basic_resolver_entry$(EXEEXT)
+ @p='unit/ip/basic_resolver_entry$(EXEEXT)'; \
+ b='unit/ip/basic_resolver_entry'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/basic_resolver_iterator.log: unit/ip/basic_resolver_iterator$(EXEEXT)
+ @p='unit/ip/basic_resolver_iterator$(EXEEXT)'; \
+ b='unit/ip/basic_resolver_iterator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/basic_resolver_query.log: unit/ip/basic_resolver_query$(EXEEXT)
+ @p='unit/ip/basic_resolver_query$(EXEEXT)'; \
+ b='unit/ip/basic_resolver_query'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/host_name.log: unit/ip/host_name$(EXEEXT)
+ @p='unit/ip/host_name$(EXEEXT)'; \
+ b='unit/ip/host_name'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/icmp.log: unit/ip/icmp$(EXEEXT)
+ @p='unit/ip/icmp$(EXEEXT)'; \
+ b='unit/ip/icmp'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/multicast.log: unit/ip/multicast$(EXEEXT)
+ @p='unit/ip/multicast$(EXEEXT)'; \
+ b='unit/ip/multicast'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/network_v4.log: unit/ip/network_v4$(EXEEXT)
+ @p='unit/ip/network_v4$(EXEEXT)'; \
+ b='unit/ip/network_v4'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/network_v6.log: unit/ip/network_v6$(EXEEXT)
+ @p='unit/ip/network_v6$(EXEEXT)'; \
+ b='unit/ip/network_v6'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/resolver_query_base.log: unit/ip/resolver_query_base$(EXEEXT)
+ @p='unit/ip/resolver_query_base$(EXEEXT)'; \
+ b='unit/ip/resolver_query_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/tcp.log: unit/ip/tcp$(EXEEXT)
+ @p='unit/ip/tcp$(EXEEXT)'; \
+ b='unit/ip/tcp'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/udp.log: unit/ip/udp$(EXEEXT)
+ @p='unit/ip/udp$(EXEEXT)'; \
+ b='unit/ip/udp'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/unicast.log: unit/ip/unicast$(EXEEXT)
+ @p='unit/ip/unicast$(EXEEXT)'; \
+ b='unit/ip/unicast'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ip/v6_only.log: unit/ip/v6_only$(EXEEXT)
+ @p='unit/ip/v6_only$(EXEEXT)'; \
+ b='unit/ip/v6_only'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/is_read_buffered.log: unit/is_read_buffered$(EXEEXT)
+ @p='unit/is_read_buffered$(EXEEXT)'; \
+ b='unit/is_read_buffered'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/is_write_buffered.log: unit/is_write_buffered$(EXEEXT)
+ @p='unit/is_write_buffered$(EXEEXT)'; \
+ b='unit/is_write_buffered'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/local/basic_endpoint.log: unit/local/basic_endpoint$(EXEEXT)
+ @p='unit/local/basic_endpoint$(EXEEXT)'; \
+ b='unit/local/basic_endpoint'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/local/connect_pair.log: unit/local/connect_pair$(EXEEXT)
+ @p='unit/local/connect_pair$(EXEEXT)'; \
+ b='unit/local/connect_pair'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/local/datagram_protocol.log: unit/local/datagram_protocol$(EXEEXT)
+ @p='unit/local/datagram_protocol$(EXEEXT)'; \
+ b='unit/local/datagram_protocol'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/local/seq_packet_protocol.log: unit/local/seq_packet_protocol$(EXEEXT)
+ @p='unit/local/seq_packet_protocol$(EXEEXT)'; \
+ b='unit/local/seq_packet_protocol'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/local/stream_protocol.log: unit/local/stream_protocol$(EXEEXT)
+ @p='unit/local/stream_protocol$(EXEEXT)'; \
+ b='unit/local/stream_protocol'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/packaged_task.log: unit/packaged_task$(EXEEXT)
+ @p='unit/packaged_task$(EXEEXT)'; \
+ b='unit/packaged_task'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/placeholders.log: unit/placeholders$(EXEEXT)
+ @p='unit/placeholders$(EXEEXT)'; \
+ b='unit/placeholders'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/posix/basic_descriptor.log: unit/posix/basic_descriptor$(EXEEXT)
+ @p='unit/posix/basic_descriptor$(EXEEXT)'; \
+ b='unit/posix/basic_descriptor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/posix/basic_stream_descriptor.log: unit/posix/basic_stream_descriptor$(EXEEXT)
+ @p='unit/posix/basic_stream_descriptor$(EXEEXT)'; \
+ b='unit/posix/basic_stream_descriptor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/posix/descriptor.log: unit/posix/descriptor$(EXEEXT)
+ @p='unit/posix/descriptor$(EXEEXT)'; \
+ b='unit/posix/descriptor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/posix/descriptor_base.log: unit/posix/descriptor_base$(EXEEXT)
+ @p='unit/posix/descriptor_base$(EXEEXT)'; \
+ b='unit/posix/descriptor_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/posix/stream_descriptor.log: unit/posix/stream_descriptor$(EXEEXT)
+ @p='unit/posix/stream_descriptor$(EXEEXT)'; \
+ b='unit/posix/stream_descriptor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/post.log: unit/post$(EXEEXT)
+ @p='unit/post$(EXEEXT)'; \
+ b='unit/post'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/prepend.log: unit/prepend$(EXEEXT)
+ @p='unit/prepend$(EXEEXT)'; \
+ b='unit/prepend'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/random_access_file.log: unit/random_access_file$(EXEEXT)
+ @p='unit/random_access_file$(EXEEXT)'; \
+ b='unit/random_access_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/read.log: unit/read$(EXEEXT)
+ @p='unit/read$(EXEEXT)'; \
+ b='unit/read'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/read_at.log: unit/read_at$(EXEEXT)
+ @p='unit/read_at$(EXEEXT)'; \
+ b='unit/read_at'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/read_until.log: unit/read_until$(EXEEXT)
+ @p='unit/read_until$(EXEEXT)'; \
+ b='unit/read_until'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/readable_pipe.log: unit/readable_pipe$(EXEEXT)
+ @p='unit/readable_pipe$(EXEEXT)'; \
+ b='unit/readable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/recycling_allocator.log: unit/recycling_allocator$(EXEEXT)
+ @p='unit/recycling_allocator$(EXEEXT)'; \
+ b='unit/recycling_allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/redirect_error.log: unit/redirect_error$(EXEEXT)
+ @p='unit/redirect_error$(EXEEXT)'; \
+ b='unit/redirect_error'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/registered_buffer.log: unit/registered_buffer$(EXEEXT)
+ @p='unit/registered_buffer$(EXEEXT)'; \
+ b='unit/registered_buffer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/serial_port.log: unit/serial_port$(EXEEXT)
+ @p='unit/serial_port$(EXEEXT)'; \
+ b='unit/serial_port'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/serial_port_base.log: unit/serial_port_base$(EXEEXT)
+ @p='unit/serial_port_base$(EXEEXT)'; \
+ b='unit/serial_port_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/signal_set.log: unit/signal_set$(EXEEXT)
+ @p='unit/signal_set$(EXEEXT)'; \
+ b='unit/signal_set'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/signal_set_base.log: unit/signal_set_base$(EXEEXT)
+ @p='unit/signal_set_base$(EXEEXT)'; \
+ b='unit/signal_set_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/socket_base.log: unit/socket_base$(EXEEXT)
+ @p='unit/socket_base$(EXEEXT)'; \
+ b='unit/socket_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/static_thread_pool.log: unit/static_thread_pool$(EXEEXT)
+ @p='unit/static_thread_pool$(EXEEXT)'; \
+ b='unit/static_thread_pool'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/steady_timer.log: unit/steady_timer$(EXEEXT)
+ @p='unit/steady_timer$(EXEEXT)'; \
+ b='unit/steady_timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/strand.log: unit/strand$(EXEEXT)
+ @p='unit/strand$(EXEEXT)'; \
+ b='unit/strand'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/stream_file.log: unit/stream_file$(EXEEXT)
+ @p='unit/stream_file$(EXEEXT)'; \
+ b='unit/stream_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/streambuf.log: unit/streambuf$(EXEEXT)
+ @p='unit/streambuf$(EXEEXT)'; \
+ b='unit/streambuf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/system_context.log: unit/system_context$(EXEEXT)
+ @p='unit/system_context$(EXEEXT)'; \
+ b='unit/system_context'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/system_executor.log: unit/system_executor$(EXEEXT)
+ @p='unit/system_executor$(EXEEXT)'; \
+ b='unit/system_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/system_timer.log: unit/system_timer$(EXEEXT)
+ @p='unit/system_timer$(EXEEXT)'; \
+ b='unit/system_timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/this_coro.log: unit/this_coro$(EXEEXT)
+ @p='unit/this_coro$(EXEEXT)'; \
+ b='unit/this_coro'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/thread.log: unit/thread$(EXEEXT)
+ @p='unit/thread$(EXEEXT)'; \
+ b='unit/thread'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/thread_pool.log: unit/thread_pool$(EXEEXT)
+ @p='unit/thread_pool$(EXEEXT)'; \
+ b='unit/thread_pool'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/time_traits.log: unit/time_traits$(EXEEXT)
+ @p='unit/time_traits$(EXEEXT)'; \
+ b='unit/time_traits'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/buffer.log: unit/ts/buffer$(EXEEXT)
+ @p='unit/ts/buffer$(EXEEXT)'; \
+ b='unit/ts/buffer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/executor.log: unit/ts/executor$(EXEEXT)
+ @p='unit/ts/executor$(EXEEXT)'; \
+ b='unit/ts/executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/internet.log: unit/ts/internet$(EXEEXT)
+ @p='unit/ts/internet$(EXEEXT)'; \
+ b='unit/ts/internet'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/io_context.log: unit/ts/io_context$(EXEEXT)
+ @p='unit/ts/io_context$(EXEEXT)'; \
+ b='unit/ts/io_context'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/net.log: unit/ts/net$(EXEEXT)
+ @p='unit/ts/net$(EXEEXT)'; \
+ b='unit/ts/net'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/netfwd.log: unit/ts/netfwd$(EXEEXT)
+ @p='unit/ts/netfwd$(EXEEXT)'; \
+ b='unit/ts/netfwd'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/socket.log: unit/ts/socket$(EXEEXT)
+ @p='unit/ts/socket$(EXEEXT)'; \
+ b='unit/ts/socket'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ts/timer.log: unit/ts/timer$(EXEEXT)
+ @p='unit/ts/timer$(EXEEXT)'; \
+ b='unit/ts/timer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/use_awaitable.log: unit/use_awaitable$(EXEEXT)
+ @p='unit/use_awaitable$(EXEEXT)'; \
+ b='unit/use_awaitable'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/use_future.log: unit/use_future$(EXEEXT)
+ @p='unit/use_future$(EXEEXT)'; \
+ b='unit/use_future'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/uses_executor.log: unit/uses_executor$(EXEEXT)
+ @p='unit/uses_executor$(EXEEXT)'; \
+ b='unit/uses_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/wait_traits.log: unit/wait_traits$(EXEEXT)
+ @p='unit/wait_traits$(EXEEXT)'; \
+ b='unit/wait_traits'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/basic_object_handle.log: unit/windows/basic_object_handle$(EXEEXT)
+ @p='unit/windows/basic_object_handle$(EXEEXT)'; \
+ b='unit/windows/basic_object_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/basic_overlapped_handle.log: unit/windows/basic_overlapped_handle$(EXEEXT)
+ @p='unit/windows/basic_overlapped_handle$(EXEEXT)'; \
+ b='unit/windows/basic_overlapped_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/basic_random_access_handle.log: unit/windows/basic_random_access_handle$(EXEEXT)
+ @p='unit/windows/basic_random_access_handle$(EXEEXT)'; \
+ b='unit/windows/basic_random_access_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/basic_stream_handle.log: unit/windows/basic_stream_handle$(EXEEXT)
+ @p='unit/windows/basic_stream_handle$(EXEEXT)'; \
+ b='unit/windows/basic_stream_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/object_handle.log: unit/windows/object_handle$(EXEEXT)
+ @p='unit/windows/object_handle$(EXEEXT)'; \
+ b='unit/windows/object_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/overlapped_handle.log: unit/windows/overlapped_handle$(EXEEXT)
+ @p='unit/windows/overlapped_handle$(EXEEXT)'; \
+ b='unit/windows/overlapped_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/overlapped_ptr.log: unit/windows/overlapped_ptr$(EXEEXT)
+ @p='unit/windows/overlapped_ptr$(EXEEXT)'; \
+ b='unit/windows/overlapped_ptr'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/random_access_handle.log: unit/windows/random_access_handle$(EXEEXT)
+ @p='unit/windows/random_access_handle$(EXEEXT)'; \
+ b='unit/windows/random_access_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/windows/stream_handle.log: unit/windows/stream_handle$(EXEEXT)
+ @p='unit/windows/stream_handle$(EXEEXT)'; \
+ b='unit/windows/stream_handle'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/writable_pipe.log: unit/writable_pipe$(EXEEXT)
+ @p='unit/writable_pipe$(EXEEXT)'; \
+ b='unit/writable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/write.log: unit/write$(EXEEXT)
+ @p='unit/write$(EXEEXT)'; \
+ b='unit/write'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/write_at.log: unit/write_at$(EXEEXT)
+ @p='unit/write_at$(EXEEXT)'; \
+ b='unit/write_at'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/basic_channel.log: unit/experimental/basic_channel$(EXEEXT)
+ @p='unit/experimental/basic_channel$(EXEEXT)'; \
+ b='unit/experimental/basic_channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/basic_concurrent_channel.log: unit/experimental/basic_concurrent_channel$(EXEEXT)
+ @p='unit/experimental/basic_concurrent_channel$(EXEEXT)'; \
+ b='unit/experimental/basic_concurrent_channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/channel.log: unit/experimental/channel$(EXEEXT)
+ @p='unit/experimental/channel$(EXEEXT)'; \
+ b='unit/experimental/channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/channel_traits.log: unit/experimental/channel_traits$(EXEEXT)
+ @p='unit/experimental/channel_traits$(EXEEXT)'; \
+ b='unit/experimental/channel_traits'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/concurrent_channel.log: unit/experimental/concurrent_channel$(EXEEXT)
+ @p='unit/experimental/concurrent_channel$(EXEEXT)'; \
+ b='unit/experimental/concurrent_channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/parallel_group.log: unit/experimental/parallel_group$(EXEEXT)
+ @p='unit/experimental/parallel_group$(EXEEXT)'; \
+ b='unit/experimental/parallel_group'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/promise.log: unit/experimental/promise$(EXEEXT)
+ @p='unit/experimental/promise$(EXEEXT)'; \
+ b='unit/experimental/promise'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/awaitable_operators.log: unit/experimental/awaitable_operators$(EXEEXT)
+ @p='unit/experimental/awaitable_operators$(EXEEXT)'; \
+ b='unit/experimental/awaitable_operators'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/co_composed.log: unit/experimental/co_composed$(EXEEXT)
+ @p='unit/experimental/co_composed$(EXEEXT)'; \
+ b='unit/experimental/co_composed'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/allocator.log: unit/experimental/coro/allocator$(EXEEXT)
+ @p='unit/experimental/coro/allocator$(EXEEXT)'; \
+ b='unit/experimental/coro/allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/cancel.log: unit/experimental/coro/cancel$(EXEEXT)
+ @p='unit/experimental/coro/cancel$(EXEEXT)'; \
+ b='unit/experimental/coro/cancel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/co_spawn.log: unit/experimental/coro/co_spawn$(EXEEXT)
+ @p='unit/experimental/coro/co_spawn$(EXEEXT)'; \
+ b='unit/experimental/coro/co_spawn'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/exception.log: unit/experimental/coro/exception$(EXEEXT)
+ @p='unit/experimental/coro/exception$(EXEEXT)'; \
+ b='unit/experimental/coro/exception'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/executor.log: unit/experimental/coro/executor$(EXEEXT)
+ @p='unit/experimental/coro/executor$(EXEEXT)'; \
+ b='unit/experimental/coro/executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/partial.log: unit/experimental/coro/partial$(EXEEXT)
+ @p='unit/experimental/coro/partial$(EXEEXT)'; \
+ b='unit/experimental/coro/partial'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/simple_test.log: unit/experimental/coro/simple_test$(EXEEXT)
+ @p='unit/experimental/coro/simple_test$(EXEEXT)'; \
+ b='unit/experimental/coro/simple_test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/stack_test.log: unit/experimental/coro/stack_test$(EXEEXT)
+ @p='unit/experimental/coro/stack_test$(EXEEXT)'; \
+ b='unit/experimental/coro/stack_test'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/use_coro.log: unit/experimental/coro/use_coro$(EXEEXT)
+ @p='unit/experimental/coro/use_coro$(EXEEXT)'; \
+ b='unit/experimental/coro/use_coro'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/context_base.log: unit/ssl/context_base$(EXEEXT)
+ @p='unit/ssl/context_base$(EXEEXT)'; \
+ b='unit/ssl/context_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/context.log: unit/ssl/context$(EXEEXT)
+ @p='unit/ssl/context$(EXEEXT)'; \
+ b='unit/ssl/context'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/error.log: unit/ssl/error$(EXEEXT)
+ @p='unit/ssl/error$(EXEEXT)'; \
+ b='unit/ssl/error'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/host_name_verification.log: unit/ssl/host_name_verification$(EXEEXT)
+ @p='unit/ssl/host_name_verification$(EXEEXT)'; \
+ b='unit/ssl/host_name_verification'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/rfc2818_verification.log: unit/ssl/rfc2818_verification$(EXEEXT)
+ @p='unit/ssl/rfc2818_verification$(EXEEXT)'; \
+ b='unit/ssl/rfc2818_verification'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/stream_base.log: unit/ssl/stream_base$(EXEEXT)
+ @p='unit/ssl/stream_base$(EXEEXT)'; \
+ b='unit/ssl/stream_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/ssl/stream.log: unit/ssl/stream$(EXEEXT)
+ @p='unit/ssl/stream$(EXEEXT)'; \
+ b='unit/ssl/stream'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../$(am__dirstamp)
+ -rm -f latency/$(DEPDIR)/$(am__dirstamp)
+ -rm -f latency/$(am__dirstamp)
+ -rm -f performance/$(DEPDIR)/$(am__dirstamp)
+ -rm -f performance/$(am__dirstamp)
+ -rm -f unit/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/$(am__dirstamp)
+ -rm -f unit/execution/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/execution/$(am__dirstamp)
+ -rm -f unit/experimental/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/experimental/$(am__dirstamp)
+ -rm -f unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/experimental/coro/$(am__dirstamp)
+ -rm -f unit/generic/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/generic/$(am__dirstamp)
+ -rm -f unit/ip/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/ip/$(am__dirstamp)
+ -rm -f unit/local/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/local/$(am__dirstamp)
+ -rm -f unit/posix/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/posix/$(am__dirstamp)
+ -rm -f unit/ssl/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/ssl/$(am__dirstamp)
+ -rm -f unit/ts/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/ts/$(am__dirstamp)
+ -rm -f unit/windows/$(DEPDIR)/$(am__dirstamp)
+ -rm -f unit/windows/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f ../$(DEPDIR)/asio.Po
+ -rm -f ../$(DEPDIR)/asio_ssl.Po
+ -rm -f latency/$(DEPDIR)/tcp_client.Po
+ -rm -f latency/$(DEPDIR)/tcp_server.Po
+ -rm -f latency/$(DEPDIR)/udp_client.Po
+ -rm -f latency/$(DEPDIR)/udp_server.Po
+ -rm -f performance/$(DEPDIR)/client.Po
+ -rm -f performance/$(DEPDIR)/server.Po
+ -rm -f unit/$(DEPDIR)/any_completion_executor.Po
+ -rm -f unit/$(DEPDIR)/any_completion_handler.Po
+ -rm -f unit/$(DEPDIR)/any_io_executor.Po
+ -rm -f unit/$(DEPDIR)/append.Po
+ -rm -f unit/$(DEPDIR)/as_tuple.Po
+ -rm -f unit/$(DEPDIR)/associated_allocator.Po
+ -rm -f unit/$(DEPDIR)/associated_cancellation_slot.Po
+ -rm -f unit/$(DEPDIR)/associated_executor.Po
+ -rm -f unit/$(DEPDIR)/associated_immediate_executor.Po
+ -rm -f unit/$(DEPDIR)/associator.Po
+ -rm -f unit/$(DEPDIR)/async_result.Po
+ -rm -f unit/$(DEPDIR)/awaitable.Po
+ -rm -f unit/$(DEPDIR)/basic_datagram_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_deadline_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_file.Po
+ -rm -f unit/$(DEPDIR)/basic_random_access_file.Po
+ -rm -f unit/$(DEPDIR)/basic_raw_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_readable_pipe.Po
+ -rm -f unit/$(DEPDIR)/basic_seq_packet_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_serial_port.Po
+ -rm -f unit/$(DEPDIR)/basic_signal_set.Po
+ -rm -f unit/$(DEPDIR)/basic_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_socket_acceptor.Po
+ -rm -f unit/$(DEPDIR)/basic_stream_file.Po
+ -rm -f unit/$(DEPDIR)/basic_stream_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_streambuf.Po
+ -rm -f unit/$(DEPDIR)/basic_waitable_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_writable_pipe.Po
+ -rm -f unit/$(DEPDIR)/bind_allocator.Po
+ -rm -f unit/$(DEPDIR)/bind_cancellation_slot.Po
+ -rm -f unit/$(DEPDIR)/bind_executor.Po
+ -rm -f unit/$(DEPDIR)/bind_immediate_executor.Po
+ -rm -f unit/$(DEPDIR)/buffer.Po
+ -rm -f unit/$(DEPDIR)/buffer_registration.Po
+ -rm -f unit/$(DEPDIR)/buffered_read_stream.Po
+ -rm -f unit/$(DEPDIR)/buffered_stream.Po
+ -rm -f unit/$(DEPDIR)/buffered_write_stream.Po
+ -rm -f unit/$(DEPDIR)/buffers_iterator.Po
+ -rm -f unit/$(DEPDIR)/cancellation_signal.Po
+ -rm -f unit/$(DEPDIR)/cancellation_state.Po
+ -rm -f unit/$(DEPDIR)/cancellation_type.Po
+ -rm -f unit/$(DEPDIR)/co_spawn.Po
+ -rm -f unit/$(DEPDIR)/completion_condition.Po
+ -rm -f unit/$(DEPDIR)/compose.Po
+ -rm -f unit/$(DEPDIR)/connect.Po
+ -rm -f unit/$(DEPDIR)/connect_pipe.Po
+ -rm -f unit/$(DEPDIR)/consign.Po
+ -rm -f unit/$(DEPDIR)/coroutine.Po
+ -rm -f unit/$(DEPDIR)/deadline_timer.Po
+ -rm -f unit/$(DEPDIR)/defer.Po
+ -rm -f unit/$(DEPDIR)/deferred.Po
+ -rm -f unit/$(DEPDIR)/detached.Po
+ -rm -f unit/$(DEPDIR)/dispatch.Po
+ -rm -f unit/$(DEPDIR)/error.Po
+ -rm -f unit/$(DEPDIR)/execution_context.Po
+ -rm -f unit/$(DEPDIR)/executor.Po
+ -rm -f unit/$(DEPDIR)/executor_work_guard.Po
+ -rm -f unit/$(DEPDIR)/file_base.Po
+ -rm -f unit/$(DEPDIR)/high_resolution_timer.Po
+ -rm -f unit/$(DEPDIR)/io_context.Po
+ -rm -f unit/$(DEPDIR)/io_context_strand.Po
+ -rm -f unit/$(DEPDIR)/is_read_buffered.Po
+ -rm -f unit/$(DEPDIR)/is_write_buffered.Po
+ -rm -f unit/$(DEPDIR)/packaged_task.Po
+ -rm -f unit/$(DEPDIR)/placeholders.Po
+ -rm -f unit/$(DEPDIR)/post.Po
+ -rm -f unit/$(DEPDIR)/prepend.Po
+ -rm -f unit/$(DEPDIR)/random_access_file.Po
+ -rm -f unit/$(DEPDIR)/read.Po
+ -rm -f unit/$(DEPDIR)/read_at.Po
+ -rm -f unit/$(DEPDIR)/read_until.Po
+ -rm -f unit/$(DEPDIR)/readable_pipe.Po
+ -rm -f unit/$(DEPDIR)/recycling_allocator.Po
+ -rm -f unit/$(DEPDIR)/redirect_error.Po
+ -rm -f unit/$(DEPDIR)/registered_buffer.Po
+ -rm -f unit/$(DEPDIR)/serial_port.Po
+ -rm -f unit/$(DEPDIR)/serial_port_base.Po
+ -rm -f unit/$(DEPDIR)/signal_set.Po
+ -rm -f unit/$(DEPDIR)/signal_set_base.Po
+ -rm -f unit/$(DEPDIR)/socket_base.Po
+ -rm -f unit/$(DEPDIR)/static_thread_pool.Po
+ -rm -f unit/$(DEPDIR)/steady_timer.Po
+ -rm -f unit/$(DEPDIR)/strand.Po
+ -rm -f unit/$(DEPDIR)/stream_file.Po
+ -rm -f unit/$(DEPDIR)/streambuf.Po
+ -rm -f unit/$(DEPDIR)/system_context.Po
+ -rm -f unit/$(DEPDIR)/system_executor.Po
+ -rm -f unit/$(DEPDIR)/system_timer.Po
+ -rm -f unit/$(DEPDIR)/this_coro.Po
+ -rm -f unit/$(DEPDIR)/thread.Po
+ -rm -f unit/$(DEPDIR)/thread_pool.Po
+ -rm -f unit/$(DEPDIR)/time_traits.Po
+ -rm -f unit/$(DEPDIR)/use_awaitable.Po
+ -rm -f unit/$(DEPDIR)/use_future.Po
+ -rm -f unit/$(DEPDIR)/uses_executor.Po
+ -rm -f unit/$(DEPDIR)/wait_traits.Po
+ -rm -f unit/$(DEPDIR)/writable_pipe.Po
+ -rm -f unit/$(DEPDIR)/write.Po
+ -rm -f unit/$(DEPDIR)/write_at.Po
+ -rm -f unit/execution/$(DEPDIR)/any_executor.Po
+ -rm -f unit/execution/$(DEPDIR)/blocking.Po
+ -rm -f unit/execution/$(DEPDIR)/blocking_adaptation.Po
+ -rm -f unit/execution/$(DEPDIR)/context_as.Po
+ -rm -f unit/execution/$(DEPDIR)/executor.Po
+ -rm -f unit/execution/$(DEPDIR)/invocable_archetype.Po
+ -rm -f unit/execution/$(DEPDIR)/mapping.Po
+ -rm -f unit/execution/$(DEPDIR)/outstanding_work.Po
+ -rm -f unit/execution/$(DEPDIR)/prefer_only.Po
+ -rm -f unit/execution/$(DEPDIR)/relationship.Po
+ -rm -f unit/experimental/$(DEPDIR)/awaitable_operators.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel_traits.Po
+ -rm -f unit/experimental/$(DEPDIR)/co_composed.Po
+ -rm -f unit/experimental/$(DEPDIR)/concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/parallel_group.Po
+ -rm -f unit/experimental/$(DEPDIR)/promise.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/allocator.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/cancel.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/co_spawn.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/exception.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/executor.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/partial.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/simple_test.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/stack_test.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/use_coro.Po
+ -rm -f unit/generic/$(DEPDIR)/basic_endpoint.Po
+ -rm -f unit/generic/$(DEPDIR)/datagram_protocol.Po
+ -rm -f unit/generic/$(DEPDIR)/raw_protocol.Po
+ -rm -f unit/generic/$(DEPDIR)/seq_packet_protocol.Po
+ -rm -f unit/generic/$(DEPDIR)/stream_protocol.Po
+ -rm -f unit/ip/$(DEPDIR)/address.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v4.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v4_iterator.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v4_range.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v6.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v6_iterator.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v6_range.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_endpoint.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver_entry.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver_iterator.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver_query.Po
+ -rm -f unit/ip/$(DEPDIR)/host_name.Po
+ -rm -f unit/ip/$(DEPDIR)/icmp.Po
+ -rm -f unit/ip/$(DEPDIR)/multicast.Po
+ -rm -f unit/ip/$(DEPDIR)/network_v4.Po
+ -rm -f unit/ip/$(DEPDIR)/network_v6.Po
+ -rm -f unit/ip/$(DEPDIR)/resolver_query_base.Po
+ -rm -f unit/ip/$(DEPDIR)/tcp.Po
+ -rm -f unit/ip/$(DEPDIR)/udp.Po
+ -rm -f unit/ip/$(DEPDIR)/unicast.Po
+ -rm -f unit/ip/$(DEPDIR)/v6_only.Po
+ -rm -f unit/local/$(DEPDIR)/basic_endpoint.Po
+ -rm -f unit/local/$(DEPDIR)/connect_pair.Po
+ -rm -f unit/local/$(DEPDIR)/datagram_protocol.Po
+ -rm -f unit/local/$(DEPDIR)/seq_packet_protocol.Po
+ -rm -f unit/local/$(DEPDIR)/stream_protocol.Po
+ -rm -f unit/posix/$(DEPDIR)/basic_descriptor.Po
+ -rm -f unit/posix/$(DEPDIR)/basic_stream_descriptor.Po
+ -rm -f unit/posix/$(DEPDIR)/descriptor.Po
+ -rm -f unit/posix/$(DEPDIR)/descriptor_base.Po
+ -rm -f unit/posix/$(DEPDIR)/stream_descriptor.Po
+ -rm -f unit/ssl/$(DEPDIR)/context.Po
+ -rm -f unit/ssl/$(DEPDIR)/context_base.Po
+ -rm -f unit/ssl/$(DEPDIR)/error.Po
+ -rm -f unit/ssl/$(DEPDIR)/host_name_verification.Po
+ -rm -f unit/ssl/$(DEPDIR)/rfc2818_verification.Po
+ -rm -f unit/ssl/$(DEPDIR)/stream.Po
+ -rm -f unit/ssl/$(DEPDIR)/stream_base.Po
+ -rm -f unit/ts/$(DEPDIR)/buffer.Po
+ -rm -f unit/ts/$(DEPDIR)/executor.Po
+ -rm -f unit/ts/$(DEPDIR)/internet.Po
+ -rm -f unit/ts/$(DEPDIR)/io_context.Po
+ -rm -f unit/ts/$(DEPDIR)/net.Po
+ -rm -f unit/ts/$(DEPDIR)/netfwd.Po
+ -rm -f unit/ts/$(DEPDIR)/socket.Po
+ -rm -f unit/ts/$(DEPDIR)/timer.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_object_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_overlapped_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_random_access_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_stream_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/object_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/overlapped_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/overlapped_ptr.Po
+ -rm -f unit/windows/$(DEPDIR)/random_access_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/stream_handle.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f ../$(DEPDIR)/asio.Po
+ -rm -f ../$(DEPDIR)/asio_ssl.Po
+ -rm -f latency/$(DEPDIR)/tcp_client.Po
+ -rm -f latency/$(DEPDIR)/tcp_server.Po
+ -rm -f latency/$(DEPDIR)/udp_client.Po
+ -rm -f latency/$(DEPDIR)/udp_server.Po
+ -rm -f performance/$(DEPDIR)/client.Po
+ -rm -f performance/$(DEPDIR)/server.Po
+ -rm -f unit/$(DEPDIR)/any_completion_executor.Po
+ -rm -f unit/$(DEPDIR)/any_completion_handler.Po
+ -rm -f unit/$(DEPDIR)/any_io_executor.Po
+ -rm -f unit/$(DEPDIR)/append.Po
+ -rm -f unit/$(DEPDIR)/as_tuple.Po
+ -rm -f unit/$(DEPDIR)/associated_allocator.Po
+ -rm -f unit/$(DEPDIR)/associated_cancellation_slot.Po
+ -rm -f unit/$(DEPDIR)/associated_executor.Po
+ -rm -f unit/$(DEPDIR)/associated_immediate_executor.Po
+ -rm -f unit/$(DEPDIR)/associator.Po
+ -rm -f unit/$(DEPDIR)/async_result.Po
+ -rm -f unit/$(DEPDIR)/awaitable.Po
+ -rm -f unit/$(DEPDIR)/basic_datagram_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_deadline_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_file.Po
+ -rm -f unit/$(DEPDIR)/basic_random_access_file.Po
+ -rm -f unit/$(DEPDIR)/basic_raw_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_readable_pipe.Po
+ -rm -f unit/$(DEPDIR)/basic_seq_packet_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_serial_port.Po
+ -rm -f unit/$(DEPDIR)/basic_signal_set.Po
+ -rm -f unit/$(DEPDIR)/basic_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_socket_acceptor.Po
+ -rm -f unit/$(DEPDIR)/basic_stream_file.Po
+ -rm -f unit/$(DEPDIR)/basic_stream_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_streambuf.Po
+ -rm -f unit/$(DEPDIR)/basic_waitable_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_writable_pipe.Po
+ -rm -f unit/$(DEPDIR)/bind_allocator.Po
+ -rm -f unit/$(DEPDIR)/bind_cancellation_slot.Po
+ -rm -f unit/$(DEPDIR)/bind_executor.Po
+ -rm -f unit/$(DEPDIR)/bind_immediate_executor.Po
+ -rm -f unit/$(DEPDIR)/buffer.Po
+ -rm -f unit/$(DEPDIR)/buffer_registration.Po
+ -rm -f unit/$(DEPDIR)/buffered_read_stream.Po
+ -rm -f unit/$(DEPDIR)/buffered_stream.Po
+ -rm -f unit/$(DEPDIR)/buffered_write_stream.Po
+ -rm -f unit/$(DEPDIR)/buffers_iterator.Po
+ -rm -f unit/$(DEPDIR)/cancellation_signal.Po
+ -rm -f unit/$(DEPDIR)/cancellation_state.Po
+ -rm -f unit/$(DEPDIR)/cancellation_type.Po
+ -rm -f unit/$(DEPDIR)/co_spawn.Po
+ -rm -f unit/$(DEPDIR)/completion_condition.Po
+ -rm -f unit/$(DEPDIR)/compose.Po
+ -rm -f unit/$(DEPDIR)/connect.Po
+ -rm -f unit/$(DEPDIR)/connect_pipe.Po
+ -rm -f unit/$(DEPDIR)/consign.Po
+ -rm -f unit/$(DEPDIR)/coroutine.Po
+ -rm -f unit/$(DEPDIR)/deadline_timer.Po
+ -rm -f unit/$(DEPDIR)/defer.Po
+ -rm -f unit/$(DEPDIR)/deferred.Po
+ -rm -f unit/$(DEPDIR)/detached.Po
+ -rm -f unit/$(DEPDIR)/dispatch.Po
+ -rm -f unit/$(DEPDIR)/error.Po
+ -rm -f unit/$(DEPDIR)/execution_context.Po
+ -rm -f unit/$(DEPDIR)/executor.Po
+ -rm -f unit/$(DEPDIR)/executor_work_guard.Po
+ -rm -f unit/$(DEPDIR)/file_base.Po
+ -rm -f unit/$(DEPDIR)/high_resolution_timer.Po
+ -rm -f unit/$(DEPDIR)/io_context.Po
+ -rm -f unit/$(DEPDIR)/io_context_strand.Po
+ -rm -f unit/$(DEPDIR)/is_read_buffered.Po
+ -rm -f unit/$(DEPDIR)/is_write_buffered.Po
+ -rm -f unit/$(DEPDIR)/packaged_task.Po
+ -rm -f unit/$(DEPDIR)/placeholders.Po
+ -rm -f unit/$(DEPDIR)/post.Po
+ -rm -f unit/$(DEPDIR)/prepend.Po
+ -rm -f unit/$(DEPDIR)/random_access_file.Po
+ -rm -f unit/$(DEPDIR)/read.Po
+ -rm -f unit/$(DEPDIR)/read_at.Po
+ -rm -f unit/$(DEPDIR)/read_until.Po
+ -rm -f unit/$(DEPDIR)/readable_pipe.Po
+ -rm -f unit/$(DEPDIR)/recycling_allocator.Po
+ -rm -f unit/$(DEPDIR)/redirect_error.Po
+ -rm -f unit/$(DEPDIR)/registered_buffer.Po
+ -rm -f unit/$(DEPDIR)/serial_port.Po
+ -rm -f unit/$(DEPDIR)/serial_port_base.Po
+ -rm -f unit/$(DEPDIR)/signal_set.Po
+ -rm -f unit/$(DEPDIR)/signal_set_base.Po
+ -rm -f unit/$(DEPDIR)/socket_base.Po
+ -rm -f unit/$(DEPDIR)/static_thread_pool.Po
+ -rm -f unit/$(DEPDIR)/steady_timer.Po
+ -rm -f unit/$(DEPDIR)/strand.Po
+ -rm -f unit/$(DEPDIR)/stream_file.Po
+ -rm -f unit/$(DEPDIR)/streambuf.Po
+ -rm -f unit/$(DEPDIR)/system_context.Po
+ -rm -f unit/$(DEPDIR)/system_executor.Po
+ -rm -f unit/$(DEPDIR)/system_timer.Po
+ -rm -f unit/$(DEPDIR)/this_coro.Po
+ -rm -f unit/$(DEPDIR)/thread.Po
+ -rm -f unit/$(DEPDIR)/thread_pool.Po
+ -rm -f unit/$(DEPDIR)/time_traits.Po
+ -rm -f unit/$(DEPDIR)/use_awaitable.Po
+ -rm -f unit/$(DEPDIR)/use_future.Po
+ -rm -f unit/$(DEPDIR)/uses_executor.Po
+ -rm -f unit/$(DEPDIR)/wait_traits.Po
+ -rm -f unit/$(DEPDIR)/writable_pipe.Po
+ -rm -f unit/$(DEPDIR)/write.Po
+ -rm -f unit/$(DEPDIR)/write_at.Po
+ -rm -f unit/execution/$(DEPDIR)/any_executor.Po
+ -rm -f unit/execution/$(DEPDIR)/blocking.Po
+ -rm -f unit/execution/$(DEPDIR)/blocking_adaptation.Po
+ -rm -f unit/execution/$(DEPDIR)/context_as.Po
+ -rm -f unit/execution/$(DEPDIR)/executor.Po
+ -rm -f unit/execution/$(DEPDIR)/invocable_archetype.Po
+ -rm -f unit/execution/$(DEPDIR)/mapping.Po
+ -rm -f unit/execution/$(DEPDIR)/outstanding_work.Po
+ -rm -f unit/execution/$(DEPDIR)/prefer_only.Po
+ -rm -f unit/execution/$(DEPDIR)/relationship.Po
+ -rm -f unit/experimental/$(DEPDIR)/awaitable_operators.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel_traits.Po
+ -rm -f unit/experimental/$(DEPDIR)/co_composed.Po
+ -rm -f unit/experimental/$(DEPDIR)/concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/parallel_group.Po
+ -rm -f unit/experimental/$(DEPDIR)/promise.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/allocator.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/cancel.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/co_spawn.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/exception.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/executor.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/partial.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/simple_test.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/stack_test.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/use_coro.Po
+ -rm -f unit/generic/$(DEPDIR)/basic_endpoint.Po
+ -rm -f unit/generic/$(DEPDIR)/datagram_protocol.Po
+ -rm -f unit/generic/$(DEPDIR)/raw_protocol.Po
+ -rm -f unit/generic/$(DEPDIR)/seq_packet_protocol.Po
+ -rm -f unit/generic/$(DEPDIR)/stream_protocol.Po
+ -rm -f unit/ip/$(DEPDIR)/address.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v4.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v4_iterator.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v4_range.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v6.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v6_iterator.Po
+ -rm -f unit/ip/$(DEPDIR)/address_v6_range.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_endpoint.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver_entry.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver_iterator.Po
+ -rm -f unit/ip/$(DEPDIR)/basic_resolver_query.Po
+ -rm -f unit/ip/$(DEPDIR)/host_name.Po
+ -rm -f unit/ip/$(DEPDIR)/icmp.Po
+ -rm -f unit/ip/$(DEPDIR)/multicast.Po
+ -rm -f unit/ip/$(DEPDIR)/network_v4.Po
+ -rm -f unit/ip/$(DEPDIR)/network_v6.Po
+ -rm -f unit/ip/$(DEPDIR)/resolver_query_base.Po
+ -rm -f unit/ip/$(DEPDIR)/tcp.Po
+ -rm -f unit/ip/$(DEPDIR)/udp.Po
+ -rm -f unit/ip/$(DEPDIR)/unicast.Po
+ -rm -f unit/ip/$(DEPDIR)/v6_only.Po
+ -rm -f unit/local/$(DEPDIR)/basic_endpoint.Po
+ -rm -f unit/local/$(DEPDIR)/connect_pair.Po
+ -rm -f unit/local/$(DEPDIR)/datagram_protocol.Po
+ -rm -f unit/local/$(DEPDIR)/seq_packet_protocol.Po
+ -rm -f unit/local/$(DEPDIR)/stream_protocol.Po
+ -rm -f unit/posix/$(DEPDIR)/basic_descriptor.Po
+ -rm -f unit/posix/$(DEPDIR)/basic_stream_descriptor.Po
+ -rm -f unit/posix/$(DEPDIR)/descriptor.Po
+ -rm -f unit/posix/$(DEPDIR)/descriptor_base.Po
+ -rm -f unit/posix/$(DEPDIR)/stream_descriptor.Po
+ -rm -f unit/ssl/$(DEPDIR)/context.Po
+ -rm -f unit/ssl/$(DEPDIR)/context_base.Po
+ -rm -f unit/ssl/$(DEPDIR)/error.Po
+ -rm -f unit/ssl/$(DEPDIR)/host_name_verification.Po
+ -rm -f unit/ssl/$(DEPDIR)/rfc2818_verification.Po
+ -rm -f unit/ssl/$(DEPDIR)/stream.Po
+ -rm -f unit/ssl/$(DEPDIR)/stream_base.Po
+ -rm -f unit/ts/$(DEPDIR)/buffer.Po
+ -rm -f unit/ts/$(DEPDIR)/executor.Po
+ -rm -f unit/ts/$(DEPDIR)/internet.Po
+ -rm -f unit/ts/$(DEPDIR)/io_context.Po
+ -rm -f unit/ts/$(DEPDIR)/net.Po
+ -rm -f unit/ts/$(DEPDIR)/netfwd.Po
+ -rm -f unit/ts/$(DEPDIR)/socket.Po
+ -rm -f unit/ts/$(DEPDIR)/timer.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_object_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_overlapped_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_random_access_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/basic_stream_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/object_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/overlapped_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/overlapped_ptr.Po
+ -rm -f unit/windows/$(DEPDIR)/random_access_handle.Po
+ -rm -f unit/windows/$(DEPDIR)/stream_handle.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \
+ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/tests/latency/.gitignore b/3rdparty/asio/src/tests/latency/.gitignore
deleted file mode 100644
index feea55d4d7f..00000000000
--- a/3rdparty/asio/src/tests/latency/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*client
-*server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/tests/latency/allocator.hpp b/3rdparty/asio/src/tests/latency/allocator.hpp
index 56a7af3ae9b..2b186aef8ec 100644
--- a/3rdparty/asio/src/tests/latency/allocator.hpp
+++ b/3rdparty/asio/src/tests/latency/allocator.hpp
@@ -2,7 +2,7 @@
// allocator.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/latency/coroutine.hpp b/3rdparty/asio/src/tests/latency/coroutine.hpp
deleted file mode 100644
index 74b515b843c..00000000000
--- a/3rdparty/asio/src/tests/latency/coroutine.hpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// coroutine.hpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 COROUTINE_HPP
-#define COROUTINE_HPP
-
-class coroutine
-{
-public:
- coroutine() : value_(0) {}
- bool is_child() const { return value_ < 0; }
- bool is_parent() const { return !is_child(); }
- bool is_complete() const { return value_ == -1; }
-private:
- friend class coroutine_ref;
- int value_;
-};
-
-class coroutine_ref
-{
-public:
- coroutine_ref(coroutine& c) : value_(c.value_), modified_(false) {}
- coroutine_ref(coroutine* c) : value_(c->value_), modified_(false) {}
- ~coroutine_ref() { if (!modified_) value_ = -1; }
- operator int() const { return value_; }
- int& operator=(int v) { modified_ = true; return value_ = v; }
-private:
- void operator=(const coroutine_ref&);
- int& value_;
- bool modified_;
-};
-
-#define CORO_REENTER(c) \
- switch (coroutine_ref _coro_value = c) \
- case -1: if (_coro_value) \
- { \
- goto terminate_coroutine; \
- terminate_coroutine: \
- _coro_value = -1; \
- goto bail_out_of_coroutine; \
- bail_out_of_coroutine: \
- break; \
- } \
- else case 0:
-
-#define CORO_YIELD_IMPL(n) \
- for (_coro_value = (n);;) \
- if (_coro_value == 0) \
- { \
- case (n): ; \
- break; \
- } \
- else \
- switch (_coro_value ? 0 : 1) \
- for (;;) \
- case -1: if (_coro_value) \
- goto terminate_coroutine; \
- else for (;;) \
- case 1: if (_coro_value) \
- goto bail_out_of_coroutine; \
- else case 0:
-
-#define CORO_FORK_IMPL(n) \
- for (_coro_value = -(n);; _coro_value = (n)) \
- if (_coro_value == (n)) \
- { \
- case -(n): ; \
- break; \
- } \
- else
-
-#if defined(_MSC_VER)
-# define CORO_YIELD CORO_YIELD_IMPL(__COUNTER__ + 1)
-# define CORO_FORK CORO_FORK_IMPL(__COUNTER__ + 1)
-#else // defined(_MSC_VER)
-# define CORO_YIELD CORO_YIELD_IMPL(__LINE__)
-# define CORO_FORK CORO_FORK_IMPL(__LINE__)
-#endif // defined(_MSC_VER)
-
-#endif // COROUTINE_HPP
diff --git a/3rdparty/asio/src/tests/latency/high_res_clock.hpp b/3rdparty/asio/src/tests/latency/high_res_clock.hpp
index 4756f52646b..a497834d6d8 100644
--- a/3rdparty/asio/src/tests/latency/high_res_clock.hpp
+++ b/3rdparty/asio/src/tests/latency/high_res_clock.hpp
@@ -2,7 +2,7 @@
// high_res_clock.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/latency/tcp_client.cpp b/3rdparty/asio/src/tests/latency/tcp_client.cpp
index ee1b6711f5d..2a4c5b7640f 100644
--- a/3rdparty/asio/src/tests/latency/tcp_client.cpp
+++ b/3rdparty/asio/src/tests/latency/tcp_client.cpp
@@ -2,7 +2,7 @@
// tcp_client.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/latency/tcp_server.cpp b/3rdparty/asio/src/tests/latency/tcp_server.cpp
index 2bbdfdc17b0..c26c8509a45 100644
--- a/3rdparty/asio/src/tests/latency/tcp_server.cpp
+++ b/3rdparty/asio/src/tests/latency/tcp_server.cpp
@@ -2,7 +2,7 @@
// tcp_server.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,14 +20,14 @@
using asio::ip::tcp;
-#include "yield.hpp"
+#include <asio/yield.hpp>
-class tcp_server : coroutine
+class tcp_server : asio::coroutine
{
public:
tcp_server(tcp::acceptor& acceptor, std::size_t buf_size) :
acceptor_(acceptor),
- socket_(acceptor_.get_executor().context()),
+ socket_(acceptor_.get_executor()),
buffer_(buf_size)
{
}
@@ -79,7 +79,7 @@ private:
tcp::endpoint sender_;
};
-#include "unyield.hpp"
+#include <asio/unyield.hpp>
int main(int argc, char* argv[])
{
diff --git a/3rdparty/asio/src/tests/latency/udp_client.cpp b/3rdparty/asio/src/tests/latency/udp_client.cpp
index cc2762971d0..484ba085cd8 100644
--- a/3rdparty/asio/src/tests/latency/udp_client.cpp
+++ b/3rdparty/asio/src/tests/latency/udp_client.cpp
@@ -2,7 +2,7 @@
// udp_client.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/latency/udp_server.cpp b/3rdparty/asio/src/tests/latency/udp_server.cpp
index a767f4c782a..13483fab76f 100644
--- a/3rdparty/asio/src/tests/latency/udp_server.cpp
+++ b/3rdparty/asio/src/tests/latency/udp_server.cpp
@@ -2,7 +2,7 @@
// udp_server.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,9 +19,9 @@
using asio::ip::udp;
-#include "yield.hpp"
+#include <asio/yield.hpp>
-class udp_server : coroutine
+class udp_server : asio::coroutine
{
public:
udp_server(asio::io_context& io_context,
@@ -90,7 +90,7 @@ private:
allocator allocator_;
};
-#include "unyield.hpp"
+#include <asio/unyield.hpp>
int main(int argc, char* argv[])
{
diff --git a/3rdparty/asio/src/tests/latency/unyield.hpp b/3rdparty/asio/src/tests/latency/unyield.hpp
deleted file mode 100644
index ccbb043547e..00000000000
--- a/3rdparty/asio/src/tests/latency/unyield.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// unyield.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#ifdef reenter
-# undef reenter
-#endif
-
-#ifdef yield
-# undef yield
-#endif
-
-#ifdef fork
-# undef fork
-#endif
diff --git a/3rdparty/asio/src/tests/latency/yield.hpp b/3rdparty/asio/src/tests/latency/yield.hpp
deleted file mode 100644
index bf4c6a8e13e..00000000000
--- a/3rdparty/asio/src/tests/latency/yield.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// yield.hpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-#include "coroutine.hpp"
-
-#ifndef reenter
-# define reenter(c) CORO_REENTER(c)
-#endif
-
-#ifndef yield
-# define yield CORO_YIELD
-#endif
-
-#ifndef fork
-# define fork CORO_FORK
-#endif
diff --git a/3rdparty/asio/src/tests/performance/.gitignore b/3rdparty/asio/src/tests/performance/.gitignore
deleted file mode 100644
index 692ea7e7e65..00000000000
--- a/3rdparty/asio/src/tests/performance/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-client
-server
-*.ilk
-*.manifest
-*.pdb
-*.tds
diff --git a/3rdparty/asio/src/tests/performance/client.cpp b/3rdparty/asio/src/tests/performance/client.cpp
index 6851d32fc9e..b42a6c50930 100644
--- a/3rdparty/asio/src/tests/performance/client.cpp
+++ b/3rdparty/asio/src/tests/performance/client.cpp
@@ -2,7 +2,7 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,7 @@
#include "asio.hpp"
#include <algorithm>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <boost/mem_fn.hpp>
#include <iostream>
#include <list>
@@ -51,7 +51,7 @@ class session
{
public:
session(asio::io_context& ioc, size_t block_size, stats& s)
- : strand_(ioc),
+ : strand_(ioc.get_executor()),
socket_(ioc),
block_size_(block_size),
read_data_(new char[block_size]),
@@ -173,7 +173,7 @@ private:
}
private:
- asio::io_context::strand strand_;
+ asio::strand<asio::io_context::executor_type> strand_;
asio::ip::tcp::socket socket_;
size_t block_size_;
char* read_data_;
@@ -198,7 +198,7 @@ public:
sessions_(),
stats_()
{
- stop_timer_.expires_from_now(boost::posix_time::seconds(timeout));
+ stop_timer_.expires_after(asio::chrono::seconds(timeout));
stop_timer_.async_wait(boost::bind(&client::handle_timeout, this));
for (size_t i = 0; i < session_count; ++i)
@@ -228,7 +228,7 @@ public:
private:
asio::io_context& io_context_;
- asio::deadline_timer stop_timer_;
+ asio::steady_timer stop_timer_;
std::list<session*> sessions_;
stats stats_;
};
diff --git a/3rdparty/asio/src/tests/performance/handler_allocator.hpp b/3rdparty/asio/src/tests/performance/handler_allocator.hpp
index b8609049728..6c1b98532ab 100644
--- a/3rdparty/asio/src/tests/performance/handler_allocator.hpp
+++ b/3rdparty/asio/src/tests/performance/handler_allocator.hpp
@@ -2,7 +2,7 @@
// handler_allocator.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/performance/server.cpp b/3rdparty/asio/src/tests/performance/server.cpp
index be8c3813ece..9de3c1294f8 100644
--- a/3rdparty/asio/src/tests/performance/server.cpp
+++ b/3rdparty/asio/src/tests/performance/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -10,7 +10,7 @@
#include "asio.hpp"
#include <algorithm>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <iostream>
#include <list>
#include "handler_allocator.hpp"
@@ -20,7 +20,7 @@ class session
public:
session(asio::io_context& ioc, size_t block_size)
: io_context_(ioc),
- strand_(ioc),
+ strand_(ioc.get_executor()),
socket_(ioc),
block_size_(block_size),
read_data_(new char[block_size]),
@@ -129,7 +129,7 @@ public:
private:
asio::io_context& io_context_;
- asio::io_context::strand strand_;
+ asio::strand<asio::io_context::executor_type> strand_;
asio::ip::tcp::socket socket_;
size_t block_size_;
char* read_data_;
diff --git a/3rdparty/asio/src/tests/properties/Makefile.am b/3rdparty/asio/src/tests/properties/Makefile.am
new file mode 100644
index 00000000000..688b3f48640
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/Makefile.am
@@ -0,0 +1,367 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
+check_PROGRAMS = \
+ cpp03/query_free \
+ cpp03/query_member \
+ cpp03/query_static \
+ cpp03/can_query_free \
+ cpp03/can_query_member \
+ cpp03/can_query_static \
+ cpp03/can_query_unsupported \
+ cpp03/can_query_not_applicable_free \
+ cpp03/can_query_not_applicable_member \
+ cpp03/can_query_not_applicable_static \
+ cpp03/can_query_not_applicable_unsupported \
+ cpp03/require_concept_free \
+ cpp03/require_concept_member \
+ cpp03/require_concept_static \
+ cpp03/can_require_concept_free \
+ cpp03/can_require_concept_member \
+ cpp03/can_require_concept_static \
+ cpp03/can_require_concept_unsupported \
+ cpp03/can_require_concept_not_applicable_free \
+ cpp03/can_require_concept_not_applicable_member \
+ cpp03/can_require_concept_not_applicable_static \
+ cpp03/can_require_concept_not_applicable_unsupported \
+ cpp03/require_free \
+ cpp03/require_member \
+ cpp03/require_static \
+ cpp03/can_require_free \
+ cpp03/can_require_member \
+ cpp03/can_require_static \
+ cpp03/can_require_unsupported \
+ cpp03/can_require_not_applicable_free \
+ cpp03/can_require_not_applicable_member \
+ cpp03/can_require_not_applicable_static \
+ cpp03/can_require_not_applicable_unsupported \
+ cpp03/prefer_free_prefer \
+ cpp03/prefer_member_prefer \
+ cpp03/prefer_free_require \
+ cpp03/prefer_member_require \
+ cpp03/prefer_static \
+ cpp03/prefer_unsupported \
+ cpp03/can_prefer_free_prefer \
+ cpp03/can_prefer_free_require \
+ cpp03/can_prefer_member_prefer \
+ cpp03/can_prefer_member_require \
+ cpp03/can_prefer_static \
+ cpp03/can_prefer_unsupported \
+ cpp03/can_prefer_not_applicable_free_prefer \
+ cpp03/can_prefer_not_applicable_free_require \
+ cpp03/can_prefer_not_applicable_member_prefer \
+ cpp03/can_prefer_not_applicable_member_require \
+ cpp03/can_prefer_not_applicable_static \
+ cpp03/can_prefer_not_applicable_unsupported \
+ cpp03/can_prefer_not_preferable_free_prefer \
+ cpp03/can_prefer_not_preferable_free_require \
+ cpp03/can_prefer_not_preferable_member_prefer \
+ cpp03/can_prefer_not_preferable_member_require \
+ cpp03/can_prefer_not_preferable_static \
+ cpp03/can_prefer_not_preferable_unsupported
+
+cpp03_query_free_SOURCES = cpp03/query_free.cpp
+cpp03_query_member_SOURCES = cpp03/query_member.cpp
+cpp03_query_static_SOURCES = cpp03/query_static.cpp
+cpp03_can_query_free_SOURCES = cpp03/can_query_free.cpp
+cpp03_can_query_member_SOURCES = cpp03/can_query_member.cpp
+cpp03_can_query_static_SOURCES = cpp03/can_query_static.cpp
+cpp03_can_query_unsupported_SOURCES = cpp03/can_query_unsupported.cpp
+cpp03_can_query_not_applicable_free_SOURCES = cpp03/can_query_not_applicable_free.cpp
+cpp03_can_query_not_applicable_member_SOURCES = cpp03/can_query_not_applicable_member.cpp
+cpp03_can_query_not_applicable_static_SOURCES = cpp03/can_query_not_applicable_static.cpp
+cpp03_can_query_not_applicable_unsupported_SOURCES = cpp03/can_query_not_applicable_unsupported.cpp
+cpp03_require_concept_free_SOURCES = cpp03/require_concept_free.cpp
+cpp03_require_concept_member_SOURCES = cpp03/require_concept_member.cpp
+cpp03_require_concept_static_SOURCES = cpp03/require_concept_static.cpp
+cpp03_can_require_concept_free_SOURCES = cpp03/can_require_concept_free.cpp
+cpp03_can_require_concept_member_SOURCES = cpp03/can_require_concept_member.cpp
+cpp03_can_require_concept_static_SOURCES = cpp03/can_require_concept_static.cpp
+cpp03_can_require_concept_unsupported_SOURCES = cpp03/can_require_concept_unsupported.cpp
+cpp03_can_require_concept_not_applicable_free_SOURCES = cpp03/can_require_concept_not_applicable_free.cpp
+cpp03_can_require_concept_not_applicable_member_SOURCES = cpp03/can_require_concept_not_applicable_member.cpp
+cpp03_can_require_concept_not_applicable_static_SOURCES = cpp03/can_require_concept_not_applicable_static.cpp
+cpp03_can_require_concept_not_applicable_unsupported_SOURCES = cpp03/can_require_concept_not_applicable_unsupported.cpp
+cpp03_require_free_SOURCES = cpp03/require_free.cpp
+cpp03_require_member_SOURCES = cpp03/require_member.cpp
+cpp03_require_static_SOURCES = cpp03/require_static.cpp
+cpp03_can_require_free_SOURCES = cpp03/can_require_free.cpp
+cpp03_can_require_member_SOURCES = cpp03/can_require_member.cpp
+cpp03_can_require_static_SOURCES = cpp03/can_require_static.cpp
+cpp03_can_require_unsupported_SOURCES = cpp03/can_require_unsupported.cpp
+cpp03_can_require_not_applicable_free_SOURCES = cpp03/can_require_not_applicable_free.cpp
+cpp03_can_require_not_applicable_member_SOURCES = cpp03/can_require_not_applicable_member.cpp
+cpp03_can_require_not_applicable_static_SOURCES = cpp03/can_require_not_applicable_static.cpp
+cpp03_can_require_not_applicable_unsupported_SOURCES = cpp03/can_require_not_applicable_unsupported.cpp
+cpp03_prefer_free_prefer_SOURCES = cpp03/prefer_free_prefer.cpp
+cpp03_prefer_free_require_SOURCES = cpp03/prefer_free_require.cpp
+cpp03_prefer_member_prefer_SOURCES = cpp03/prefer_member_prefer.cpp
+cpp03_prefer_member_require_SOURCES = cpp03/prefer_member_require.cpp
+cpp03_prefer_static_SOURCES = cpp03/prefer_static.cpp
+cpp03_prefer_unsupported_SOURCES = cpp03/prefer_unsupported.cpp
+cpp03_can_prefer_free_prefer_SOURCES = cpp03/can_prefer_free_prefer.cpp
+cpp03_can_prefer_free_require_SOURCES = cpp03/can_prefer_free_require.cpp
+cpp03_can_prefer_member_prefer_SOURCES = cpp03/can_prefer_member_prefer.cpp
+cpp03_can_prefer_member_require_SOURCES = cpp03/can_prefer_member_require.cpp
+cpp03_can_prefer_static_SOURCES = cpp03/can_prefer_static.cpp
+cpp03_can_prefer_unsupported_SOURCES = cpp03/can_prefer_unsupported.cpp
+cpp03_can_prefer_not_applicable_free_prefer_SOURCES = cpp03/can_prefer_not_applicable_free_prefer.cpp
+cpp03_can_prefer_not_applicable_free_require_SOURCES = cpp03/can_prefer_not_applicable_free_require.cpp
+cpp03_can_prefer_not_applicable_member_prefer_SOURCES = cpp03/can_prefer_not_applicable_member_prefer.cpp
+cpp03_can_prefer_not_applicable_member_require_SOURCES = cpp03/can_prefer_not_applicable_member_require.cpp
+cpp03_can_prefer_not_applicable_static_SOURCES = cpp03/can_prefer_not_applicable_static.cpp
+cpp03_can_prefer_not_applicable_unsupported_SOURCES = cpp03/can_prefer_not_applicable_unsupported.cpp
+cpp03_can_prefer_not_preferable_free_prefer_SOURCES = cpp03/can_prefer_not_preferable_free_prefer.cpp
+cpp03_can_prefer_not_preferable_free_require_SOURCES = cpp03/can_prefer_not_preferable_free_require.cpp
+cpp03_can_prefer_not_preferable_member_prefer_SOURCES = cpp03/can_prefer_not_preferable_member_prefer.cpp
+cpp03_can_prefer_not_preferable_member_require_SOURCES = cpp03/can_prefer_not_preferable_member_require.cpp
+cpp03_can_prefer_not_preferable_static_SOURCES = cpp03/can_prefer_not_preferable_static.cpp
+cpp03_can_prefer_not_preferable_unsupported_SOURCES = cpp03/can_prefer_not_preferable_unsupported.cpp
+
+if HAVE_CXX11
+
+check_PROGRAMS += \
+ cpp11/query_free \
+ cpp11/query_member \
+ cpp11/query_static \
+ cpp11/can_query_free \
+ cpp11/can_query_member \
+ cpp11/can_query_static \
+ cpp11/can_query_unsupported \
+ cpp11/can_query_not_applicable_free \
+ cpp11/can_query_not_applicable_member \
+ cpp11/can_query_not_applicable_static \
+ cpp11/can_query_not_applicable_unsupported \
+ cpp11/require_concept_free \
+ cpp11/require_concept_member \
+ cpp11/require_concept_static \
+ cpp11/can_require_concept_free \
+ cpp11/can_require_concept_member \
+ cpp11/can_require_concept_static \
+ cpp11/can_require_concept_unsupported \
+ cpp11/can_require_concept_not_applicable_free \
+ cpp11/can_require_concept_not_applicable_member \
+ cpp11/can_require_concept_not_applicable_static \
+ cpp11/can_require_concept_not_applicable_unsupported \
+ cpp11/require_free \
+ cpp11/require_member \
+ cpp11/require_static \
+ cpp11/can_require_free \
+ cpp11/can_require_member \
+ cpp11/can_require_static \
+ cpp11/can_require_unsupported \
+ cpp11/can_require_not_applicable_free \
+ cpp11/can_require_not_applicable_member \
+ cpp11/can_require_not_applicable_static \
+ cpp11/can_require_not_applicable_unsupported \
+ cpp11/prefer_free_prefer \
+ cpp11/prefer_member_prefer \
+ cpp11/prefer_free_require \
+ cpp11/prefer_member_require \
+ cpp11/prefer_static \
+ cpp11/prefer_unsupported \
+ cpp11/can_prefer_free_prefer \
+ cpp11/can_prefer_free_require \
+ cpp11/can_prefer_member_prefer \
+ cpp11/can_prefer_member_require \
+ cpp11/can_prefer_static \
+ cpp11/can_prefer_unsupported \
+ cpp11/can_prefer_not_applicable_free_prefer \
+ cpp11/can_prefer_not_applicable_free_require \
+ cpp11/can_prefer_not_applicable_member_prefer \
+ cpp11/can_prefer_not_applicable_member_require \
+ cpp11/can_prefer_not_applicable_static \
+ cpp11/can_prefer_not_applicable_unsupported \
+ cpp11/can_prefer_not_preferable_free_prefer \
+ cpp11/can_prefer_not_preferable_free_require \
+ cpp11/can_prefer_not_preferable_member_prefer \
+ cpp11/can_prefer_not_preferable_member_require \
+ cpp11/can_prefer_not_preferable_static \
+ cpp11/can_prefer_not_preferable_unsupported
+
+cpp11_query_free_SOURCES = cpp11/query_free.cpp
+cpp11_query_member_SOURCES = cpp11/query_member.cpp
+cpp11_query_static_SOURCES = cpp11/query_static.cpp
+cpp11_can_query_free_SOURCES = cpp11/can_query_free.cpp
+cpp11_can_query_member_SOURCES = cpp11/can_query_member.cpp
+cpp11_can_query_static_SOURCES = cpp11/can_query_static.cpp
+cpp11_can_query_unsupported_SOURCES = cpp11/can_query_unsupported.cpp
+cpp11_can_query_not_applicable_free_SOURCES = cpp11/can_query_not_applicable_free.cpp
+cpp11_can_query_not_applicable_member_SOURCES = cpp11/can_query_not_applicable_member.cpp
+cpp11_can_query_not_applicable_static_SOURCES = cpp11/can_query_not_applicable_static.cpp
+cpp11_can_query_not_applicable_unsupported_SOURCES = cpp11/can_query_not_applicable_unsupported.cpp
+cpp11_require_concept_free_SOURCES = cpp11/require_concept_free.cpp
+cpp11_require_concept_member_SOURCES = cpp11/require_concept_member.cpp
+cpp11_require_concept_static_SOURCES = cpp11/require_concept_static.cpp
+cpp11_can_require_concept_free_SOURCES = cpp11/can_require_concept_free.cpp
+cpp11_can_require_concept_member_SOURCES = cpp11/can_require_concept_member.cpp
+cpp11_can_require_concept_static_SOURCES = cpp11/can_require_concept_static.cpp
+cpp11_can_require_concept_unsupported_SOURCES = cpp11/can_require_concept_unsupported.cpp
+cpp11_can_require_concept_not_applicable_free_SOURCES = cpp11/can_require_concept_not_applicable_free.cpp
+cpp11_can_require_concept_not_applicable_member_SOURCES = cpp11/can_require_concept_not_applicable_member.cpp
+cpp11_can_require_concept_not_applicable_static_SOURCES = cpp11/can_require_concept_not_applicable_static.cpp
+cpp11_can_require_concept_not_applicable_unsupported_SOURCES = cpp11/can_require_concept_not_applicable_unsupported.cpp
+cpp11_require_free_SOURCES = cpp11/require_free.cpp
+cpp11_require_member_SOURCES = cpp11/require_member.cpp
+cpp11_require_static_SOURCES = cpp11/require_static.cpp
+cpp11_can_require_free_SOURCES = cpp11/can_require_free.cpp
+cpp11_can_require_member_SOURCES = cpp11/can_require_member.cpp
+cpp11_can_require_static_SOURCES = cpp11/can_require_static.cpp
+cpp11_can_require_unsupported_SOURCES = cpp11/can_require_unsupported.cpp
+cpp11_can_require_not_applicable_free_SOURCES = cpp11/can_require_not_applicable_free.cpp
+cpp11_can_require_not_applicable_member_SOURCES = cpp11/can_require_not_applicable_member.cpp
+cpp11_can_require_not_applicable_static_SOURCES = cpp11/can_require_not_applicable_static.cpp
+cpp11_can_require_not_applicable_unsupported_SOURCES = cpp11/can_require_not_applicable_unsupported.cpp
+cpp11_prefer_free_prefer_SOURCES = cpp11/prefer_free_prefer.cpp
+cpp11_prefer_free_require_SOURCES = cpp11/prefer_free_require.cpp
+cpp11_prefer_member_prefer_SOURCES = cpp11/prefer_member_prefer.cpp
+cpp11_prefer_member_require_SOURCES = cpp11/prefer_member_require.cpp
+cpp11_prefer_static_SOURCES = cpp11/prefer_static.cpp
+cpp11_prefer_unsupported_SOURCES = cpp11/prefer_unsupported.cpp
+cpp11_can_prefer_free_prefer_SOURCES = cpp11/can_prefer_free_prefer.cpp
+cpp11_can_prefer_free_require_SOURCES = cpp11/can_prefer_free_require.cpp
+cpp11_can_prefer_member_prefer_SOURCES = cpp11/can_prefer_member_prefer.cpp
+cpp11_can_prefer_member_require_SOURCES = cpp11/can_prefer_member_require.cpp
+cpp11_can_prefer_static_SOURCES = cpp11/can_prefer_static.cpp
+cpp11_can_prefer_unsupported_SOURCES = cpp11/can_prefer_unsupported.cpp
+cpp11_can_prefer_not_applicable_free_prefer_SOURCES = cpp11/can_prefer_not_applicable_free_prefer.cpp
+cpp11_can_prefer_not_applicable_free_require_SOURCES = cpp11/can_prefer_not_applicable_free_require.cpp
+cpp11_can_prefer_not_applicable_member_prefer_SOURCES = cpp11/can_prefer_not_applicable_member_prefer.cpp
+cpp11_can_prefer_not_applicable_member_require_SOURCES = cpp11/can_prefer_not_applicable_member_require.cpp
+cpp11_can_prefer_not_applicable_static_SOURCES = cpp11/can_prefer_not_applicable_static.cpp
+cpp11_can_prefer_not_applicable_unsupported_SOURCES = cpp11/can_prefer_not_applicable_unsupported.cpp
+cpp11_can_prefer_not_preferable_free_prefer_SOURCES = cpp11/can_prefer_not_preferable_free_prefer.cpp
+cpp11_can_prefer_not_preferable_free_require_SOURCES = cpp11/can_prefer_not_preferable_free_require.cpp
+cpp11_can_prefer_not_preferable_member_prefer_SOURCES = cpp11/can_prefer_not_preferable_member_prefer.cpp
+cpp11_can_prefer_not_preferable_member_require_SOURCES = cpp11/can_prefer_not_preferable_member_require.cpp
+cpp11_can_prefer_not_preferable_static_SOURCES = cpp11/can_prefer_not_preferable_static.cpp
+cpp11_can_prefer_not_preferable_unsupported_SOURCES = cpp11/can_prefer_not_preferable_unsupported.cpp
+
+endif
+
+if HAVE_CXX14
+
+check_PROGRAMS += \
+ cpp14/query_free \
+ cpp14/query_member \
+ cpp14/query_static \
+ cpp14/can_query_free \
+ cpp14/can_query_member \
+ cpp14/can_query_static \
+ cpp14/can_query_unsupported \
+ cpp14/can_query_not_applicable_free \
+ cpp14/can_query_not_applicable_member \
+ cpp14/can_query_not_applicable_static \
+ cpp14/can_query_not_applicable_unsupported \
+ cpp14/require_concept_free \
+ cpp14/require_concept_member \
+ cpp14/require_concept_static \
+ cpp14/can_require_concept_free \
+ cpp14/can_require_concept_member \
+ cpp14/can_require_concept_static \
+ cpp14/can_require_concept_unsupported \
+ cpp14/can_require_concept_not_applicable_free \
+ cpp14/can_require_concept_not_applicable_member \
+ cpp14/can_require_concept_not_applicable_static \
+ cpp14/can_require_concept_not_applicable_unsupported \
+ cpp14/require_free \
+ cpp14/require_member \
+ cpp14/require_static \
+ cpp14/can_require_free \
+ cpp14/can_require_member \
+ cpp14/can_require_static \
+ cpp14/can_require_unsupported \
+ cpp14/can_require_not_applicable_free \
+ cpp14/can_require_not_applicable_member \
+ cpp14/can_require_not_applicable_static \
+ cpp14/can_require_not_applicable_unsupported \
+ cpp14/prefer_free_prefer \
+ cpp14/prefer_member_prefer \
+ cpp14/prefer_free_require \
+ cpp14/prefer_member_require \
+ cpp14/prefer_static \
+ cpp14/prefer_unsupported \
+ cpp14/can_prefer_free_prefer \
+ cpp14/can_prefer_free_require \
+ cpp14/can_prefer_member_prefer \
+ cpp14/can_prefer_member_require \
+ cpp14/can_prefer_static \
+ cpp14/can_prefer_unsupported \
+ cpp14/can_prefer_not_applicable_free_prefer \
+ cpp14/can_prefer_not_applicable_free_require \
+ cpp14/can_prefer_not_applicable_member_prefer \
+ cpp14/can_prefer_not_applicable_member_require \
+ cpp14/can_prefer_not_applicable_static \
+ cpp14/can_prefer_not_applicable_unsupported \
+ cpp14/can_prefer_not_preferable_free_prefer \
+ cpp14/can_prefer_not_preferable_free_require \
+ cpp14/can_prefer_not_preferable_member_prefer \
+ cpp14/can_prefer_not_preferable_member_require \
+ cpp14/can_prefer_not_preferable_static \
+ cpp14/can_prefer_not_preferable_unsupported
+
+cpp14_query_free_SOURCES = cpp14/query_free.cpp
+cpp14_query_member_SOURCES = cpp14/query_member.cpp
+cpp14_query_static_SOURCES = cpp14/query_static.cpp
+cpp14_can_query_free_SOURCES = cpp14/can_query_free.cpp
+cpp14_can_query_member_SOURCES = cpp14/can_query_member.cpp
+cpp14_can_query_static_SOURCES = cpp14/can_query_static.cpp
+cpp14_can_query_unsupported_SOURCES = cpp14/can_query_unsupported.cpp
+cpp14_can_query_not_applicable_free_SOURCES = cpp14/can_query_not_applicable_free.cpp
+cpp14_can_query_not_applicable_member_SOURCES = cpp14/can_query_not_applicable_member.cpp
+cpp14_can_query_not_applicable_static_SOURCES = cpp14/can_query_not_applicable_static.cpp
+cpp14_can_query_not_applicable_unsupported_SOURCES = cpp14/can_query_not_applicable_unsupported.cpp
+cpp14_require_concept_free_SOURCES = cpp14/require_concept_free.cpp
+cpp14_require_concept_member_SOURCES = cpp14/require_concept_member.cpp
+cpp14_require_concept_static_SOURCES = cpp14/require_concept_static.cpp
+cpp14_can_require_concept_free_SOURCES = cpp14/can_require_concept_free.cpp
+cpp14_can_require_concept_member_SOURCES = cpp14/can_require_concept_member.cpp
+cpp14_can_require_concept_static_SOURCES = cpp14/can_require_concept_static.cpp
+cpp14_can_require_concept_unsupported_SOURCES = cpp14/can_require_concept_unsupported.cpp
+cpp14_can_require_concept_not_applicable_free_SOURCES = cpp14/can_require_concept_not_applicable_free.cpp
+cpp14_can_require_concept_not_applicable_member_SOURCES = cpp14/can_require_concept_not_applicable_member.cpp
+cpp14_can_require_concept_not_applicable_static_SOURCES = cpp14/can_require_concept_not_applicable_static.cpp
+cpp14_can_require_concept_not_applicable_unsupported_SOURCES = cpp14/can_require_concept_not_applicable_unsupported.cpp
+cpp14_require_free_SOURCES = cpp14/require_free.cpp
+cpp14_require_member_SOURCES = cpp14/require_member.cpp
+cpp14_require_static_SOURCES = cpp14/require_static.cpp
+cpp14_can_require_free_SOURCES = cpp14/can_require_free.cpp
+cpp14_can_require_member_SOURCES = cpp14/can_require_member.cpp
+cpp14_can_require_static_SOURCES = cpp14/can_require_static.cpp
+cpp14_can_require_unsupported_SOURCES = cpp14/can_require_unsupported.cpp
+cpp14_can_require_not_applicable_free_SOURCES = cpp14/can_require_not_applicable_free.cpp
+cpp14_can_require_not_applicable_member_SOURCES = cpp14/can_require_not_applicable_member.cpp
+cpp14_can_require_not_applicable_static_SOURCES = cpp14/can_require_not_applicable_static.cpp
+cpp14_can_require_not_applicable_unsupported_SOURCES = cpp14/can_require_not_applicable_unsupported.cpp
+cpp14_prefer_free_prefer_SOURCES = cpp14/prefer_free_prefer.cpp
+cpp14_prefer_free_require_SOURCES = cpp14/prefer_free_require.cpp
+cpp14_prefer_member_prefer_SOURCES = cpp14/prefer_member_prefer.cpp
+cpp14_prefer_member_require_SOURCES = cpp14/prefer_member_require.cpp
+cpp14_prefer_static_SOURCES = cpp14/prefer_static.cpp
+cpp14_prefer_unsupported_SOURCES = cpp14/prefer_unsupported.cpp
+cpp14_can_prefer_free_prefer_SOURCES = cpp14/can_prefer_free_prefer.cpp
+cpp14_can_prefer_free_require_SOURCES = cpp14/can_prefer_free_require.cpp
+cpp14_can_prefer_member_prefer_SOURCES = cpp14/can_prefer_member_prefer.cpp
+cpp14_can_prefer_member_require_SOURCES = cpp14/can_prefer_member_require.cpp
+cpp14_can_prefer_static_SOURCES = cpp14/can_prefer_static.cpp
+cpp14_can_prefer_unsupported_SOURCES = cpp14/can_prefer_unsupported.cpp
+cpp14_can_prefer_not_applicable_free_prefer_SOURCES = cpp14/can_prefer_not_applicable_free_prefer.cpp
+cpp14_can_prefer_not_applicable_free_require_SOURCES = cpp14/can_prefer_not_applicable_free_require.cpp
+cpp14_can_prefer_not_applicable_member_prefer_SOURCES = cpp14/can_prefer_not_applicable_member_prefer.cpp
+cpp14_can_prefer_not_applicable_member_require_SOURCES = cpp14/can_prefer_not_applicable_member_require.cpp
+cpp14_can_prefer_not_applicable_static_SOURCES = cpp14/can_prefer_not_applicable_static.cpp
+cpp14_can_prefer_not_applicable_unsupported_SOURCES = cpp14/can_prefer_not_applicable_unsupported.cpp
+cpp14_can_prefer_not_preferable_free_prefer_SOURCES = cpp14/can_prefer_not_preferable_free_prefer.cpp
+cpp14_can_prefer_not_preferable_free_require_SOURCES = cpp14/can_prefer_not_preferable_free_require.cpp
+cpp14_can_prefer_not_preferable_member_prefer_SOURCES = cpp14/can_prefer_not_preferable_member_prefer.cpp
+cpp14_can_prefer_not_preferable_member_require_SOURCES = cpp14/can_prefer_not_preferable_member_require.cpp
+cpp14_can_prefer_not_preferable_static_SOURCES = cpp14/can_prefer_not_preferable_static.cpp
+cpp14_can_prefer_not_preferable_unsupported_SOURCES = cpp14/can_prefer_not_preferable_unsupported.cpp
+
+endif
+
+TESTS = $(check_PROGRAMS)
+
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/tests/properties/Makefile.in b/3rdparty/asio/src/tests/properties/Makefile.in
new file mode 100644
index 00000000000..fb6b500f02e
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/Makefile.in
@@ -0,0 +1,5585 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = cpp03/query_free$(EXEEXT) cpp03/query_member$(EXEEXT) \
+ cpp03/query_static$(EXEEXT) cpp03/can_query_free$(EXEEXT) \
+ cpp03/can_query_member$(EXEEXT) \
+ cpp03/can_query_static$(EXEEXT) \
+ cpp03/can_query_unsupported$(EXEEXT) \
+ cpp03/can_query_not_applicable_free$(EXEEXT) \
+ cpp03/can_query_not_applicable_member$(EXEEXT) \
+ cpp03/can_query_not_applicable_static$(EXEEXT) \
+ cpp03/can_query_not_applicable_unsupported$(EXEEXT) \
+ cpp03/require_concept_free$(EXEEXT) \
+ cpp03/require_concept_member$(EXEEXT) \
+ cpp03/require_concept_static$(EXEEXT) \
+ cpp03/can_require_concept_free$(EXEEXT) \
+ cpp03/can_require_concept_member$(EXEEXT) \
+ cpp03/can_require_concept_static$(EXEEXT) \
+ cpp03/can_require_concept_unsupported$(EXEEXT) \
+ cpp03/can_require_concept_not_applicable_free$(EXEEXT) \
+ cpp03/can_require_concept_not_applicable_member$(EXEEXT) \
+ cpp03/can_require_concept_not_applicable_static$(EXEEXT) \
+ cpp03/can_require_concept_not_applicable_unsupported$(EXEEXT) \
+ cpp03/require_free$(EXEEXT) cpp03/require_member$(EXEEXT) \
+ cpp03/require_static$(EXEEXT) cpp03/can_require_free$(EXEEXT) \
+ cpp03/can_require_member$(EXEEXT) \
+ cpp03/can_require_static$(EXEEXT) \
+ cpp03/can_require_unsupported$(EXEEXT) \
+ cpp03/can_require_not_applicable_free$(EXEEXT) \
+ cpp03/can_require_not_applicable_member$(EXEEXT) \
+ cpp03/can_require_not_applicable_static$(EXEEXT) \
+ cpp03/can_require_not_applicable_unsupported$(EXEEXT) \
+ cpp03/prefer_free_prefer$(EXEEXT) \
+ cpp03/prefer_member_prefer$(EXEEXT) \
+ cpp03/prefer_free_require$(EXEEXT) \
+ cpp03/prefer_member_require$(EXEEXT) \
+ cpp03/prefer_static$(EXEEXT) cpp03/prefer_unsupported$(EXEEXT) \
+ cpp03/can_prefer_free_prefer$(EXEEXT) \
+ cpp03/can_prefer_free_require$(EXEEXT) \
+ cpp03/can_prefer_member_prefer$(EXEEXT) \
+ cpp03/can_prefer_member_require$(EXEEXT) \
+ cpp03/can_prefer_static$(EXEEXT) \
+ cpp03/can_prefer_unsupported$(EXEEXT) \
+ cpp03/can_prefer_not_applicable_free_prefer$(EXEEXT) \
+ cpp03/can_prefer_not_applicable_free_require$(EXEEXT) \
+ cpp03/can_prefer_not_applicable_member_prefer$(EXEEXT) \
+ cpp03/can_prefer_not_applicable_member_require$(EXEEXT) \
+ cpp03/can_prefer_not_applicable_static$(EXEEXT) \
+ cpp03/can_prefer_not_applicable_unsupported$(EXEEXT) \
+ cpp03/can_prefer_not_preferable_free_prefer$(EXEEXT) \
+ cpp03/can_prefer_not_preferable_free_require$(EXEEXT) \
+ cpp03/can_prefer_not_preferable_member_prefer$(EXEEXT) \
+ cpp03/can_prefer_not_preferable_member_require$(EXEEXT) \
+ cpp03/can_prefer_not_preferable_static$(EXEEXT) \
+ cpp03/can_prefer_not_preferable_unsupported$(EXEEXT) \
+ $(am__EXEEXT_1) $(am__EXEEXT_2)
+@HAVE_CXX11_TRUE@am__append_1 = \
+@HAVE_CXX11_TRUE@ cpp11/query_free \
+@HAVE_CXX11_TRUE@ cpp11/query_member \
+@HAVE_CXX11_TRUE@ cpp11/query_static \
+@HAVE_CXX11_TRUE@ cpp11/can_query_free \
+@HAVE_CXX11_TRUE@ cpp11/can_query_member \
+@HAVE_CXX11_TRUE@ cpp11/can_query_static \
+@HAVE_CXX11_TRUE@ cpp11/can_query_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_free \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_member \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_static \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_free \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_member \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_static \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_free \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_member \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_static \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_free \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_member \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_static \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/require_free \
+@HAVE_CXX11_TRUE@ cpp11/require_member \
+@HAVE_CXX11_TRUE@ cpp11/require_static \
+@HAVE_CXX11_TRUE@ cpp11/can_require_free \
+@HAVE_CXX11_TRUE@ cpp11/can_require_member \
+@HAVE_CXX11_TRUE@ cpp11/can_require_static \
+@HAVE_CXX11_TRUE@ cpp11/can_require_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_free \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_member \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_static \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/prefer_free_prefer \
+@HAVE_CXX11_TRUE@ cpp11/prefer_member_prefer \
+@HAVE_CXX11_TRUE@ cpp11/prefer_free_require \
+@HAVE_CXX11_TRUE@ cpp11/prefer_member_require \
+@HAVE_CXX11_TRUE@ cpp11/prefer_static \
+@HAVE_CXX11_TRUE@ cpp11/prefer_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_free_prefer \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_free_require \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_member_prefer \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_member_require \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_static \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_free_prefer \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_free_require \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_member_prefer \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_member_require \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_static \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_unsupported \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_free_prefer \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_free_require \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_member_prefer \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_member_require \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_static \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_unsupported
+
+@HAVE_CXX14_TRUE@am__append_2 = \
+@HAVE_CXX14_TRUE@ cpp14/query_free \
+@HAVE_CXX14_TRUE@ cpp14/query_member \
+@HAVE_CXX14_TRUE@ cpp14/query_static \
+@HAVE_CXX14_TRUE@ cpp14/can_query_free \
+@HAVE_CXX14_TRUE@ cpp14/can_query_member \
+@HAVE_CXX14_TRUE@ cpp14/can_query_static \
+@HAVE_CXX14_TRUE@ cpp14/can_query_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_free \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_member \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_static \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_free \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_member \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_static \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_free \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_member \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_static \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_free \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_member \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_static \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/require_free \
+@HAVE_CXX14_TRUE@ cpp14/require_member \
+@HAVE_CXX14_TRUE@ cpp14/require_static \
+@HAVE_CXX14_TRUE@ cpp14/can_require_free \
+@HAVE_CXX14_TRUE@ cpp14/can_require_member \
+@HAVE_CXX14_TRUE@ cpp14/can_require_static \
+@HAVE_CXX14_TRUE@ cpp14/can_require_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_free \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_member \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_static \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/prefer_free_prefer \
+@HAVE_CXX14_TRUE@ cpp14/prefer_member_prefer \
+@HAVE_CXX14_TRUE@ cpp14/prefer_free_require \
+@HAVE_CXX14_TRUE@ cpp14/prefer_member_require \
+@HAVE_CXX14_TRUE@ cpp14/prefer_static \
+@HAVE_CXX14_TRUE@ cpp14/prefer_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_free_prefer \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_free_require \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_member_prefer \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_member_require \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_static \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_free_prefer \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_free_require \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_member_prefer \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_member_require \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_static \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_unsupported \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_free_prefer \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_free_require \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_member_prefer \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_member_require \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_static \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_unsupported
+
+subdir = src/tests/properties
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_CXX11_TRUE@am__EXEEXT_1 = cpp11/query_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/query_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/query_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_query_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/require_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/require_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/require_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_free$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_member$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_require_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/prefer_free_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/prefer_member_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/prefer_free_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/prefer_member_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/prefer_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/prefer_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_free_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_free_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_member_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_member_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_free_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_free_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_member_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_member_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_free_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_free_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_member_prefer$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_member_require$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_static$(EXEEXT) \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_not_preferable_unsupported$(EXEEXT)
+@HAVE_CXX14_TRUE@am__EXEEXT_2 = cpp14/query_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/query_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/query_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_query_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/require_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/require_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/require_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_free$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_member$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_require_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/prefer_free_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/prefer_member_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/prefer_free_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/prefer_member_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/prefer_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/prefer_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_free_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_free_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_member_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_member_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_free_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_free_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_member_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_member_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_applicable_unsupported$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_free_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_free_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_member_prefer$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_member_require$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_static$(EXEEXT) \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_not_preferable_unsupported$(EXEEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_cpp03_can_prefer_free_prefer_OBJECTS = \
+ cpp03/can_prefer_free_prefer.$(OBJEXT)
+cpp03_can_prefer_free_prefer_OBJECTS = \
+ $(am_cpp03_can_prefer_free_prefer_OBJECTS)
+cpp03_can_prefer_free_prefer_LDADD = $(LDADD)
+am_cpp03_can_prefer_free_require_OBJECTS = \
+ cpp03/can_prefer_free_require.$(OBJEXT)
+cpp03_can_prefer_free_require_OBJECTS = \
+ $(am_cpp03_can_prefer_free_require_OBJECTS)
+cpp03_can_prefer_free_require_LDADD = $(LDADD)
+am_cpp03_can_prefer_member_prefer_OBJECTS = \
+ cpp03/can_prefer_member_prefer.$(OBJEXT)
+cpp03_can_prefer_member_prefer_OBJECTS = \
+ $(am_cpp03_can_prefer_member_prefer_OBJECTS)
+cpp03_can_prefer_member_prefer_LDADD = $(LDADD)
+am_cpp03_can_prefer_member_require_OBJECTS = \
+ cpp03/can_prefer_member_require.$(OBJEXT)
+cpp03_can_prefer_member_require_OBJECTS = \
+ $(am_cpp03_can_prefer_member_require_OBJECTS)
+cpp03_can_prefer_member_require_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_applicable_free_prefer_OBJECTS = \
+ cpp03/can_prefer_not_applicable_free_prefer.$(OBJEXT)
+cpp03_can_prefer_not_applicable_free_prefer_OBJECTS = \
+ $(am_cpp03_can_prefer_not_applicable_free_prefer_OBJECTS)
+cpp03_can_prefer_not_applicable_free_prefer_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_applicable_free_require_OBJECTS = \
+ cpp03/can_prefer_not_applicable_free_require.$(OBJEXT)
+cpp03_can_prefer_not_applicable_free_require_OBJECTS = \
+ $(am_cpp03_can_prefer_not_applicable_free_require_OBJECTS)
+cpp03_can_prefer_not_applicable_free_require_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_applicable_member_prefer_OBJECTS = \
+ cpp03/can_prefer_not_applicable_member_prefer.$(OBJEXT)
+cpp03_can_prefer_not_applicable_member_prefer_OBJECTS = \
+ $(am_cpp03_can_prefer_not_applicable_member_prefer_OBJECTS)
+cpp03_can_prefer_not_applicable_member_prefer_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_applicable_member_require_OBJECTS = \
+ cpp03/can_prefer_not_applicable_member_require.$(OBJEXT)
+cpp03_can_prefer_not_applicable_member_require_OBJECTS = \
+ $(am_cpp03_can_prefer_not_applicable_member_require_OBJECTS)
+cpp03_can_prefer_not_applicable_member_require_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_applicable_static_OBJECTS = \
+ cpp03/can_prefer_not_applicable_static.$(OBJEXT)
+cpp03_can_prefer_not_applicable_static_OBJECTS = \
+ $(am_cpp03_can_prefer_not_applicable_static_OBJECTS)
+cpp03_can_prefer_not_applicable_static_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_applicable_unsupported_OBJECTS = \
+ cpp03/can_prefer_not_applicable_unsupported.$(OBJEXT)
+cpp03_can_prefer_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp03_can_prefer_not_applicable_unsupported_OBJECTS)
+cpp03_can_prefer_not_applicable_unsupported_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_preferable_free_prefer_OBJECTS = \
+ cpp03/can_prefer_not_preferable_free_prefer.$(OBJEXT)
+cpp03_can_prefer_not_preferable_free_prefer_OBJECTS = \
+ $(am_cpp03_can_prefer_not_preferable_free_prefer_OBJECTS)
+cpp03_can_prefer_not_preferable_free_prefer_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_preferable_free_require_OBJECTS = \
+ cpp03/can_prefer_not_preferable_free_require.$(OBJEXT)
+cpp03_can_prefer_not_preferable_free_require_OBJECTS = \
+ $(am_cpp03_can_prefer_not_preferable_free_require_OBJECTS)
+cpp03_can_prefer_not_preferable_free_require_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_preferable_member_prefer_OBJECTS = \
+ cpp03/can_prefer_not_preferable_member_prefer.$(OBJEXT)
+cpp03_can_prefer_not_preferable_member_prefer_OBJECTS = \
+ $(am_cpp03_can_prefer_not_preferable_member_prefer_OBJECTS)
+cpp03_can_prefer_not_preferable_member_prefer_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_preferable_member_require_OBJECTS = \
+ cpp03/can_prefer_not_preferable_member_require.$(OBJEXT)
+cpp03_can_prefer_not_preferable_member_require_OBJECTS = \
+ $(am_cpp03_can_prefer_not_preferable_member_require_OBJECTS)
+cpp03_can_prefer_not_preferable_member_require_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_preferable_static_OBJECTS = \
+ cpp03/can_prefer_not_preferable_static.$(OBJEXT)
+cpp03_can_prefer_not_preferable_static_OBJECTS = \
+ $(am_cpp03_can_prefer_not_preferable_static_OBJECTS)
+cpp03_can_prefer_not_preferable_static_LDADD = $(LDADD)
+am_cpp03_can_prefer_not_preferable_unsupported_OBJECTS = \
+ cpp03/can_prefer_not_preferable_unsupported.$(OBJEXT)
+cpp03_can_prefer_not_preferable_unsupported_OBJECTS = \
+ $(am_cpp03_can_prefer_not_preferable_unsupported_OBJECTS)
+cpp03_can_prefer_not_preferable_unsupported_LDADD = $(LDADD)
+am_cpp03_can_prefer_static_OBJECTS = \
+ cpp03/can_prefer_static.$(OBJEXT)
+cpp03_can_prefer_static_OBJECTS = \
+ $(am_cpp03_can_prefer_static_OBJECTS)
+cpp03_can_prefer_static_LDADD = $(LDADD)
+am_cpp03_can_prefer_unsupported_OBJECTS = \
+ cpp03/can_prefer_unsupported.$(OBJEXT)
+cpp03_can_prefer_unsupported_OBJECTS = \
+ $(am_cpp03_can_prefer_unsupported_OBJECTS)
+cpp03_can_prefer_unsupported_LDADD = $(LDADD)
+am_cpp03_can_query_free_OBJECTS = cpp03/can_query_free.$(OBJEXT)
+cpp03_can_query_free_OBJECTS = $(am_cpp03_can_query_free_OBJECTS)
+cpp03_can_query_free_LDADD = $(LDADD)
+am_cpp03_can_query_member_OBJECTS = cpp03/can_query_member.$(OBJEXT)
+cpp03_can_query_member_OBJECTS = $(am_cpp03_can_query_member_OBJECTS)
+cpp03_can_query_member_LDADD = $(LDADD)
+am_cpp03_can_query_not_applicable_free_OBJECTS = \
+ cpp03/can_query_not_applicable_free.$(OBJEXT)
+cpp03_can_query_not_applicable_free_OBJECTS = \
+ $(am_cpp03_can_query_not_applicable_free_OBJECTS)
+cpp03_can_query_not_applicable_free_LDADD = $(LDADD)
+am_cpp03_can_query_not_applicable_member_OBJECTS = \
+ cpp03/can_query_not_applicable_member.$(OBJEXT)
+cpp03_can_query_not_applicable_member_OBJECTS = \
+ $(am_cpp03_can_query_not_applicable_member_OBJECTS)
+cpp03_can_query_not_applicable_member_LDADD = $(LDADD)
+am_cpp03_can_query_not_applicable_static_OBJECTS = \
+ cpp03/can_query_not_applicable_static.$(OBJEXT)
+cpp03_can_query_not_applicable_static_OBJECTS = \
+ $(am_cpp03_can_query_not_applicable_static_OBJECTS)
+cpp03_can_query_not_applicable_static_LDADD = $(LDADD)
+am_cpp03_can_query_not_applicable_unsupported_OBJECTS = \
+ cpp03/can_query_not_applicable_unsupported.$(OBJEXT)
+cpp03_can_query_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp03_can_query_not_applicable_unsupported_OBJECTS)
+cpp03_can_query_not_applicable_unsupported_LDADD = $(LDADD)
+am_cpp03_can_query_static_OBJECTS = cpp03/can_query_static.$(OBJEXT)
+cpp03_can_query_static_OBJECTS = $(am_cpp03_can_query_static_OBJECTS)
+cpp03_can_query_static_LDADD = $(LDADD)
+am_cpp03_can_query_unsupported_OBJECTS = \
+ cpp03/can_query_unsupported.$(OBJEXT)
+cpp03_can_query_unsupported_OBJECTS = \
+ $(am_cpp03_can_query_unsupported_OBJECTS)
+cpp03_can_query_unsupported_LDADD = $(LDADD)
+am_cpp03_can_require_concept_free_OBJECTS = \
+ cpp03/can_require_concept_free.$(OBJEXT)
+cpp03_can_require_concept_free_OBJECTS = \
+ $(am_cpp03_can_require_concept_free_OBJECTS)
+cpp03_can_require_concept_free_LDADD = $(LDADD)
+am_cpp03_can_require_concept_member_OBJECTS = \
+ cpp03/can_require_concept_member.$(OBJEXT)
+cpp03_can_require_concept_member_OBJECTS = \
+ $(am_cpp03_can_require_concept_member_OBJECTS)
+cpp03_can_require_concept_member_LDADD = $(LDADD)
+am_cpp03_can_require_concept_not_applicable_free_OBJECTS = \
+ cpp03/can_require_concept_not_applicable_free.$(OBJEXT)
+cpp03_can_require_concept_not_applicable_free_OBJECTS = \
+ $(am_cpp03_can_require_concept_not_applicable_free_OBJECTS)
+cpp03_can_require_concept_not_applicable_free_LDADD = $(LDADD)
+am_cpp03_can_require_concept_not_applicable_member_OBJECTS = \
+ cpp03/can_require_concept_not_applicable_member.$(OBJEXT)
+cpp03_can_require_concept_not_applicable_member_OBJECTS = \
+ $(am_cpp03_can_require_concept_not_applicable_member_OBJECTS)
+cpp03_can_require_concept_not_applicable_member_LDADD = $(LDADD)
+am_cpp03_can_require_concept_not_applicable_static_OBJECTS = \
+ cpp03/can_require_concept_not_applicable_static.$(OBJEXT)
+cpp03_can_require_concept_not_applicable_static_OBJECTS = \
+ $(am_cpp03_can_require_concept_not_applicable_static_OBJECTS)
+cpp03_can_require_concept_not_applicable_static_LDADD = $(LDADD)
+am_cpp03_can_require_concept_not_applicable_unsupported_OBJECTS = cpp03/can_require_concept_not_applicable_unsupported.$(OBJEXT)
+cpp03_can_require_concept_not_applicable_unsupported_OBJECTS = $(am_cpp03_can_require_concept_not_applicable_unsupported_OBJECTS)
+cpp03_can_require_concept_not_applicable_unsupported_LDADD = $(LDADD)
+am_cpp03_can_require_concept_static_OBJECTS = \
+ cpp03/can_require_concept_static.$(OBJEXT)
+cpp03_can_require_concept_static_OBJECTS = \
+ $(am_cpp03_can_require_concept_static_OBJECTS)
+cpp03_can_require_concept_static_LDADD = $(LDADD)
+am_cpp03_can_require_concept_unsupported_OBJECTS = \
+ cpp03/can_require_concept_unsupported.$(OBJEXT)
+cpp03_can_require_concept_unsupported_OBJECTS = \
+ $(am_cpp03_can_require_concept_unsupported_OBJECTS)
+cpp03_can_require_concept_unsupported_LDADD = $(LDADD)
+am_cpp03_can_require_free_OBJECTS = cpp03/can_require_free.$(OBJEXT)
+cpp03_can_require_free_OBJECTS = $(am_cpp03_can_require_free_OBJECTS)
+cpp03_can_require_free_LDADD = $(LDADD)
+am_cpp03_can_require_member_OBJECTS = \
+ cpp03/can_require_member.$(OBJEXT)
+cpp03_can_require_member_OBJECTS = \
+ $(am_cpp03_can_require_member_OBJECTS)
+cpp03_can_require_member_LDADD = $(LDADD)
+am_cpp03_can_require_not_applicable_free_OBJECTS = \
+ cpp03/can_require_not_applicable_free.$(OBJEXT)
+cpp03_can_require_not_applicable_free_OBJECTS = \
+ $(am_cpp03_can_require_not_applicable_free_OBJECTS)
+cpp03_can_require_not_applicable_free_LDADD = $(LDADD)
+am_cpp03_can_require_not_applicable_member_OBJECTS = \
+ cpp03/can_require_not_applicable_member.$(OBJEXT)
+cpp03_can_require_not_applicable_member_OBJECTS = \
+ $(am_cpp03_can_require_not_applicable_member_OBJECTS)
+cpp03_can_require_not_applicable_member_LDADD = $(LDADD)
+am_cpp03_can_require_not_applicable_static_OBJECTS = \
+ cpp03/can_require_not_applicable_static.$(OBJEXT)
+cpp03_can_require_not_applicable_static_OBJECTS = \
+ $(am_cpp03_can_require_not_applicable_static_OBJECTS)
+cpp03_can_require_not_applicable_static_LDADD = $(LDADD)
+am_cpp03_can_require_not_applicable_unsupported_OBJECTS = \
+ cpp03/can_require_not_applicable_unsupported.$(OBJEXT)
+cpp03_can_require_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp03_can_require_not_applicable_unsupported_OBJECTS)
+cpp03_can_require_not_applicable_unsupported_LDADD = $(LDADD)
+am_cpp03_can_require_static_OBJECTS = \
+ cpp03/can_require_static.$(OBJEXT)
+cpp03_can_require_static_OBJECTS = \
+ $(am_cpp03_can_require_static_OBJECTS)
+cpp03_can_require_static_LDADD = $(LDADD)
+am_cpp03_can_require_unsupported_OBJECTS = \
+ cpp03/can_require_unsupported.$(OBJEXT)
+cpp03_can_require_unsupported_OBJECTS = \
+ $(am_cpp03_can_require_unsupported_OBJECTS)
+cpp03_can_require_unsupported_LDADD = $(LDADD)
+am_cpp03_prefer_free_prefer_OBJECTS = \
+ cpp03/prefer_free_prefer.$(OBJEXT)
+cpp03_prefer_free_prefer_OBJECTS = \
+ $(am_cpp03_prefer_free_prefer_OBJECTS)
+cpp03_prefer_free_prefer_LDADD = $(LDADD)
+am_cpp03_prefer_free_require_OBJECTS = \
+ cpp03/prefer_free_require.$(OBJEXT)
+cpp03_prefer_free_require_OBJECTS = \
+ $(am_cpp03_prefer_free_require_OBJECTS)
+cpp03_prefer_free_require_LDADD = $(LDADD)
+am_cpp03_prefer_member_prefer_OBJECTS = \
+ cpp03/prefer_member_prefer.$(OBJEXT)
+cpp03_prefer_member_prefer_OBJECTS = \
+ $(am_cpp03_prefer_member_prefer_OBJECTS)
+cpp03_prefer_member_prefer_LDADD = $(LDADD)
+am_cpp03_prefer_member_require_OBJECTS = \
+ cpp03/prefer_member_require.$(OBJEXT)
+cpp03_prefer_member_require_OBJECTS = \
+ $(am_cpp03_prefer_member_require_OBJECTS)
+cpp03_prefer_member_require_LDADD = $(LDADD)
+am_cpp03_prefer_static_OBJECTS = cpp03/prefer_static.$(OBJEXT)
+cpp03_prefer_static_OBJECTS = $(am_cpp03_prefer_static_OBJECTS)
+cpp03_prefer_static_LDADD = $(LDADD)
+am_cpp03_prefer_unsupported_OBJECTS = \
+ cpp03/prefer_unsupported.$(OBJEXT)
+cpp03_prefer_unsupported_OBJECTS = \
+ $(am_cpp03_prefer_unsupported_OBJECTS)
+cpp03_prefer_unsupported_LDADD = $(LDADD)
+am_cpp03_query_free_OBJECTS = cpp03/query_free.$(OBJEXT)
+cpp03_query_free_OBJECTS = $(am_cpp03_query_free_OBJECTS)
+cpp03_query_free_LDADD = $(LDADD)
+am_cpp03_query_member_OBJECTS = cpp03/query_member.$(OBJEXT)
+cpp03_query_member_OBJECTS = $(am_cpp03_query_member_OBJECTS)
+cpp03_query_member_LDADD = $(LDADD)
+am_cpp03_query_static_OBJECTS = cpp03/query_static.$(OBJEXT)
+cpp03_query_static_OBJECTS = $(am_cpp03_query_static_OBJECTS)
+cpp03_query_static_LDADD = $(LDADD)
+am_cpp03_require_concept_free_OBJECTS = \
+ cpp03/require_concept_free.$(OBJEXT)
+cpp03_require_concept_free_OBJECTS = \
+ $(am_cpp03_require_concept_free_OBJECTS)
+cpp03_require_concept_free_LDADD = $(LDADD)
+am_cpp03_require_concept_member_OBJECTS = \
+ cpp03/require_concept_member.$(OBJEXT)
+cpp03_require_concept_member_OBJECTS = \
+ $(am_cpp03_require_concept_member_OBJECTS)
+cpp03_require_concept_member_LDADD = $(LDADD)
+am_cpp03_require_concept_static_OBJECTS = \
+ cpp03/require_concept_static.$(OBJEXT)
+cpp03_require_concept_static_OBJECTS = \
+ $(am_cpp03_require_concept_static_OBJECTS)
+cpp03_require_concept_static_LDADD = $(LDADD)
+am_cpp03_require_free_OBJECTS = cpp03/require_free.$(OBJEXT)
+cpp03_require_free_OBJECTS = $(am_cpp03_require_free_OBJECTS)
+cpp03_require_free_LDADD = $(LDADD)
+am_cpp03_require_member_OBJECTS = cpp03/require_member.$(OBJEXT)
+cpp03_require_member_OBJECTS = $(am_cpp03_require_member_OBJECTS)
+cpp03_require_member_LDADD = $(LDADD)
+am_cpp03_require_static_OBJECTS = cpp03/require_static.$(OBJEXT)
+cpp03_require_static_OBJECTS = $(am_cpp03_require_static_OBJECTS)
+cpp03_require_static_LDADD = $(LDADD)
+am__cpp11_can_prefer_free_prefer_SOURCES_DIST = \
+ cpp11/can_prefer_free_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_free_prefer_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_free_prefer.$(OBJEXT)
+cpp11_can_prefer_free_prefer_OBJECTS = \
+ $(am_cpp11_can_prefer_free_prefer_OBJECTS)
+cpp11_can_prefer_free_prefer_LDADD = $(LDADD)
+am__cpp11_can_prefer_free_require_SOURCES_DIST = \
+ cpp11/can_prefer_free_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_free_require_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_free_require.$(OBJEXT)
+cpp11_can_prefer_free_require_OBJECTS = \
+ $(am_cpp11_can_prefer_free_require_OBJECTS)
+cpp11_can_prefer_free_require_LDADD = $(LDADD)
+am__cpp11_can_prefer_member_prefer_SOURCES_DIST = \
+ cpp11/can_prefer_member_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_member_prefer_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_member_prefer.$(OBJEXT)
+cpp11_can_prefer_member_prefer_OBJECTS = \
+ $(am_cpp11_can_prefer_member_prefer_OBJECTS)
+cpp11_can_prefer_member_prefer_LDADD = $(LDADD)
+am__cpp11_can_prefer_member_require_SOURCES_DIST = \
+ cpp11/can_prefer_member_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_member_require_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_member_require.$(OBJEXT)
+cpp11_can_prefer_member_require_OBJECTS = \
+ $(am_cpp11_can_prefer_member_require_OBJECTS)
+cpp11_can_prefer_member_require_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_applicable_free_prefer_SOURCES_DIST = \
+ cpp11/can_prefer_not_applicable_free_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_applicable_free_prefer_OBJECTS = cpp11/can_prefer_not_applicable_free_prefer.$(OBJEXT)
+cpp11_can_prefer_not_applicable_free_prefer_OBJECTS = \
+ $(am_cpp11_can_prefer_not_applicable_free_prefer_OBJECTS)
+cpp11_can_prefer_not_applicable_free_prefer_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_applicable_free_require_SOURCES_DIST = \
+ cpp11/can_prefer_not_applicable_free_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_applicable_free_require_OBJECTS = cpp11/can_prefer_not_applicable_free_require.$(OBJEXT)
+cpp11_can_prefer_not_applicable_free_require_OBJECTS = \
+ $(am_cpp11_can_prefer_not_applicable_free_require_OBJECTS)
+cpp11_can_prefer_not_applicable_free_require_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_applicable_member_prefer_SOURCES_DIST = \
+ cpp11/can_prefer_not_applicable_member_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_applicable_member_prefer_OBJECTS = cpp11/can_prefer_not_applicable_member_prefer.$(OBJEXT)
+cpp11_can_prefer_not_applicable_member_prefer_OBJECTS = \
+ $(am_cpp11_can_prefer_not_applicable_member_prefer_OBJECTS)
+cpp11_can_prefer_not_applicable_member_prefer_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_applicable_member_require_SOURCES_DIST = \
+ cpp11/can_prefer_not_applicable_member_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_applicable_member_require_OBJECTS = cpp11/can_prefer_not_applicable_member_require.$(OBJEXT)
+cpp11_can_prefer_not_applicable_member_require_OBJECTS = \
+ $(am_cpp11_can_prefer_not_applicable_member_require_OBJECTS)
+cpp11_can_prefer_not_applicable_member_require_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_applicable_static_SOURCES_DIST = \
+ cpp11/can_prefer_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_applicable_static_OBJECTS = cpp11/can_prefer_not_applicable_static.$(OBJEXT)
+cpp11_can_prefer_not_applicable_static_OBJECTS = \
+ $(am_cpp11_can_prefer_not_applicable_static_OBJECTS)
+cpp11_can_prefer_not_applicable_static_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_applicable_unsupported_SOURCES_DIST = \
+ cpp11/can_prefer_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_applicable_unsupported_OBJECTS = cpp11/can_prefer_not_applicable_unsupported.$(OBJEXT)
+cpp11_can_prefer_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp11_can_prefer_not_applicable_unsupported_OBJECTS)
+cpp11_can_prefer_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_preferable_free_prefer_SOURCES_DIST = \
+ cpp11/can_prefer_not_preferable_free_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_preferable_free_prefer_OBJECTS = cpp11/can_prefer_not_preferable_free_prefer.$(OBJEXT)
+cpp11_can_prefer_not_preferable_free_prefer_OBJECTS = \
+ $(am_cpp11_can_prefer_not_preferable_free_prefer_OBJECTS)
+cpp11_can_prefer_not_preferable_free_prefer_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_preferable_free_require_SOURCES_DIST = \
+ cpp11/can_prefer_not_preferable_free_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_preferable_free_require_OBJECTS = cpp11/can_prefer_not_preferable_free_require.$(OBJEXT)
+cpp11_can_prefer_not_preferable_free_require_OBJECTS = \
+ $(am_cpp11_can_prefer_not_preferable_free_require_OBJECTS)
+cpp11_can_prefer_not_preferable_free_require_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_preferable_member_prefer_SOURCES_DIST = \
+ cpp11/can_prefer_not_preferable_member_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_preferable_member_prefer_OBJECTS = cpp11/can_prefer_not_preferable_member_prefer.$(OBJEXT)
+cpp11_can_prefer_not_preferable_member_prefer_OBJECTS = \
+ $(am_cpp11_can_prefer_not_preferable_member_prefer_OBJECTS)
+cpp11_can_prefer_not_preferable_member_prefer_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_preferable_member_require_SOURCES_DIST = \
+ cpp11/can_prefer_not_preferable_member_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_preferable_member_require_OBJECTS = cpp11/can_prefer_not_preferable_member_require.$(OBJEXT)
+cpp11_can_prefer_not_preferable_member_require_OBJECTS = \
+ $(am_cpp11_can_prefer_not_preferable_member_require_OBJECTS)
+cpp11_can_prefer_not_preferable_member_require_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_preferable_static_SOURCES_DIST = \
+ cpp11/can_prefer_not_preferable_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_preferable_static_OBJECTS = cpp11/can_prefer_not_preferable_static.$(OBJEXT)
+cpp11_can_prefer_not_preferable_static_OBJECTS = \
+ $(am_cpp11_can_prefer_not_preferable_static_OBJECTS)
+cpp11_can_prefer_not_preferable_static_LDADD = $(LDADD)
+am__cpp11_can_prefer_not_preferable_unsupported_SOURCES_DIST = \
+ cpp11/can_prefer_not_preferable_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_not_preferable_unsupported_OBJECTS = cpp11/can_prefer_not_preferable_unsupported.$(OBJEXT)
+cpp11_can_prefer_not_preferable_unsupported_OBJECTS = \
+ $(am_cpp11_can_prefer_not_preferable_unsupported_OBJECTS)
+cpp11_can_prefer_not_preferable_unsupported_LDADD = $(LDADD)
+am__cpp11_can_prefer_static_SOURCES_DIST = \
+ cpp11/can_prefer_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_static.$(OBJEXT)
+cpp11_can_prefer_static_OBJECTS = \
+ $(am_cpp11_can_prefer_static_OBJECTS)
+cpp11_can_prefer_static_LDADD = $(LDADD)
+am__cpp11_can_prefer_unsupported_SOURCES_DIST = \
+ cpp11/can_prefer_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_prefer_unsupported_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_prefer_unsupported.$(OBJEXT)
+cpp11_can_prefer_unsupported_OBJECTS = \
+ $(am_cpp11_can_prefer_unsupported_OBJECTS)
+cpp11_can_prefer_unsupported_LDADD = $(LDADD)
+am__cpp11_can_query_free_SOURCES_DIST = cpp11/can_query_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_free_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_query_free.$(OBJEXT)
+cpp11_can_query_free_OBJECTS = $(am_cpp11_can_query_free_OBJECTS)
+cpp11_can_query_free_LDADD = $(LDADD)
+am__cpp11_can_query_member_SOURCES_DIST = cpp11/can_query_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_member_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_query_member.$(OBJEXT)
+cpp11_can_query_member_OBJECTS = $(am_cpp11_can_query_member_OBJECTS)
+cpp11_can_query_member_LDADD = $(LDADD)
+am__cpp11_can_query_not_applicable_free_SOURCES_DIST = \
+ cpp11/can_query_not_applicable_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_not_applicable_free_OBJECTS = cpp11/can_query_not_applicable_free.$(OBJEXT)
+cpp11_can_query_not_applicable_free_OBJECTS = \
+ $(am_cpp11_can_query_not_applicable_free_OBJECTS)
+cpp11_can_query_not_applicable_free_LDADD = $(LDADD)
+am__cpp11_can_query_not_applicable_member_SOURCES_DIST = \
+ cpp11/can_query_not_applicable_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_not_applicable_member_OBJECTS = cpp11/can_query_not_applicable_member.$(OBJEXT)
+cpp11_can_query_not_applicable_member_OBJECTS = \
+ $(am_cpp11_can_query_not_applicable_member_OBJECTS)
+cpp11_can_query_not_applicable_member_LDADD = $(LDADD)
+am__cpp11_can_query_not_applicable_static_SOURCES_DIST = \
+ cpp11/can_query_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_not_applicable_static_OBJECTS = cpp11/can_query_not_applicable_static.$(OBJEXT)
+cpp11_can_query_not_applicable_static_OBJECTS = \
+ $(am_cpp11_can_query_not_applicable_static_OBJECTS)
+cpp11_can_query_not_applicable_static_LDADD = $(LDADD)
+am__cpp11_can_query_not_applicable_unsupported_SOURCES_DIST = \
+ cpp11/can_query_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_not_applicable_unsupported_OBJECTS = cpp11/can_query_not_applicable_unsupported.$(OBJEXT)
+cpp11_can_query_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp11_can_query_not_applicable_unsupported_OBJECTS)
+cpp11_can_query_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp11_can_query_static_SOURCES_DIST = cpp11/can_query_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_query_static.$(OBJEXT)
+cpp11_can_query_static_OBJECTS = $(am_cpp11_can_query_static_OBJECTS)
+cpp11_can_query_static_LDADD = $(LDADD)
+am__cpp11_can_query_unsupported_SOURCES_DIST = \
+ cpp11/can_query_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_query_unsupported_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_query_unsupported.$(OBJEXT)
+cpp11_can_query_unsupported_OBJECTS = \
+ $(am_cpp11_can_query_unsupported_OBJECTS)
+cpp11_can_query_unsupported_LDADD = $(LDADD)
+am__cpp11_can_require_concept_free_SOURCES_DIST = \
+ cpp11/can_require_concept_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_free_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_free.$(OBJEXT)
+cpp11_can_require_concept_free_OBJECTS = \
+ $(am_cpp11_can_require_concept_free_OBJECTS)
+cpp11_can_require_concept_free_LDADD = $(LDADD)
+am__cpp11_can_require_concept_member_SOURCES_DIST = \
+ cpp11/can_require_concept_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_member_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_member.$(OBJEXT)
+cpp11_can_require_concept_member_OBJECTS = \
+ $(am_cpp11_can_require_concept_member_OBJECTS)
+cpp11_can_require_concept_member_LDADD = $(LDADD)
+am__cpp11_can_require_concept_not_applicable_free_SOURCES_DIST = \
+ cpp11/can_require_concept_not_applicable_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_not_applicable_free_OBJECTS = cpp11/can_require_concept_not_applicable_free.$(OBJEXT)
+cpp11_can_require_concept_not_applicable_free_OBJECTS = \
+ $(am_cpp11_can_require_concept_not_applicable_free_OBJECTS)
+cpp11_can_require_concept_not_applicable_free_LDADD = $(LDADD)
+am__cpp11_can_require_concept_not_applicable_member_SOURCES_DIST = \
+ cpp11/can_require_concept_not_applicable_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_not_applicable_member_OBJECTS = cpp11/can_require_concept_not_applicable_member.$(OBJEXT)
+cpp11_can_require_concept_not_applicable_member_OBJECTS = \
+ $(am_cpp11_can_require_concept_not_applicable_member_OBJECTS)
+cpp11_can_require_concept_not_applicable_member_LDADD = $(LDADD)
+am__cpp11_can_require_concept_not_applicable_static_SOURCES_DIST = \
+ cpp11/can_require_concept_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_not_applicable_static_OBJECTS = cpp11/can_require_concept_not_applicable_static.$(OBJEXT)
+cpp11_can_require_concept_not_applicable_static_OBJECTS = \
+ $(am_cpp11_can_require_concept_not_applicable_static_OBJECTS)
+cpp11_can_require_concept_not_applicable_static_LDADD = $(LDADD)
+am__cpp11_can_require_concept_not_applicable_unsupported_SOURCES_DIST = \
+ cpp11/can_require_concept_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_not_applicable_unsupported_OBJECTS = cpp11/can_require_concept_not_applicable_unsupported.$(OBJEXT)
+cpp11_can_require_concept_not_applicable_unsupported_OBJECTS = $(am_cpp11_can_require_concept_not_applicable_unsupported_OBJECTS)
+cpp11_can_require_concept_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp11_can_require_concept_static_SOURCES_DIST = \
+ cpp11/can_require_concept_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_concept_static.$(OBJEXT)
+cpp11_can_require_concept_static_OBJECTS = \
+ $(am_cpp11_can_require_concept_static_OBJECTS)
+cpp11_can_require_concept_static_LDADD = $(LDADD)
+am__cpp11_can_require_concept_unsupported_SOURCES_DIST = \
+ cpp11/can_require_concept_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_concept_unsupported_OBJECTS = cpp11/can_require_concept_unsupported.$(OBJEXT)
+cpp11_can_require_concept_unsupported_OBJECTS = \
+ $(am_cpp11_can_require_concept_unsupported_OBJECTS)
+cpp11_can_require_concept_unsupported_LDADD = $(LDADD)
+am__cpp11_can_require_free_SOURCES_DIST = cpp11/can_require_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_free_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_free.$(OBJEXT)
+cpp11_can_require_free_OBJECTS = $(am_cpp11_can_require_free_OBJECTS)
+cpp11_can_require_free_LDADD = $(LDADD)
+am__cpp11_can_require_member_SOURCES_DIST = \
+ cpp11/can_require_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_member_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_member.$(OBJEXT)
+cpp11_can_require_member_OBJECTS = \
+ $(am_cpp11_can_require_member_OBJECTS)
+cpp11_can_require_member_LDADD = $(LDADD)
+am__cpp11_can_require_not_applicable_free_SOURCES_DIST = \
+ cpp11/can_require_not_applicable_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_not_applicable_free_OBJECTS = cpp11/can_require_not_applicable_free.$(OBJEXT)
+cpp11_can_require_not_applicable_free_OBJECTS = \
+ $(am_cpp11_can_require_not_applicable_free_OBJECTS)
+cpp11_can_require_not_applicable_free_LDADD = $(LDADD)
+am__cpp11_can_require_not_applicable_member_SOURCES_DIST = \
+ cpp11/can_require_not_applicable_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_not_applicable_member_OBJECTS = cpp11/can_require_not_applicable_member.$(OBJEXT)
+cpp11_can_require_not_applicable_member_OBJECTS = \
+ $(am_cpp11_can_require_not_applicable_member_OBJECTS)
+cpp11_can_require_not_applicable_member_LDADD = $(LDADD)
+am__cpp11_can_require_not_applicable_static_SOURCES_DIST = \
+ cpp11/can_require_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_not_applicable_static_OBJECTS = cpp11/can_require_not_applicable_static.$(OBJEXT)
+cpp11_can_require_not_applicable_static_OBJECTS = \
+ $(am_cpp11_can_require_not_applicable_static_OBJECTS)
+cpp11_can_require_not_applicable_static_LDADD = $(LDADD)
+am__cpp11_can_require_not_applicable_unsupported_SOURCES_DIST = \
+ cpp11/can_require_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_not_applicable_unsupported_OBJECTS = cpp11/can_require_not_applicable_unsupported.$(OBJEXT)
+cpp11_can_require_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp11_can_require_not_applicable_unsupported_OBJECTS)
+cpp11_can_require_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp11_can_require_static_SOURCES_DIST = \
+ cpp11/can_require_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_static.$(OBJEXT)
+cpp11_can_require_static_OBJECTS = \
+ $(am_cpp11_can_require_static_OBJECTS)
+cpp11_can_require_static_LDADD = $(LDADD)
+am__cpp11_can_require_unsupported_SOURCES_DIST = \
+ cpp11/can_require_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_can_require_unsupported_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/can_require_unsupported.$(OBJEXT)
+cpp11_can_require_unsupported_OBJECTS = \
+ $(am_cpp11_can_require_unsupported_OBJECTS)
+cpp11_can_require_unsupported_LDADD = $(LDADD)
+am__cpp11_prefer_free_prefer_SOURCES_DIST = \
+ cpp11/prefer_free_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_prefer_free_prefer_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/prefer_free_prefer.$(OBJEXT)
+cpp11_prefer_free_prefer_OBJECTS = \
+ $(am_cpp11_prefer_free_prefer_OBJECTS)
+cpp11_prefer_free_prefer_LDADD = $(LDADD)
+am__cpp11_prefer_free_require_SOURCES_DIST = \
+ cpp11/prefer_free_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_prefer_free_require_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/prefer_free_require.$(OBJEXT)
+cpp11_prefer_free_require_OBJECTS = \
+ $(am_cpp11_prefer_free_require_OBJECTS)
+cpp11_prefer_free_require_LDADD = $(LDADD)
+am__cpp11_prefer_member_prefer_SOURCES_DIST = \
+ cpp11/prefer_member_prefer.cpp
+@HAVE_CXX11_TRUE@am_cpp11_prefer_member_prefer_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/prefer_member_prefer.$(OBJEXT)
+cpp11_prefer_member_prefer_OBJECTS = \
+ $(am_cpp11_prefer_member_prefer_OBJECTS)
+cpp11_prefer_member_prefer_LDADD = $(LDADD)
+am__cpp11_prefer_member_require_SOURCES_DIST = \
+ cpp11/prefer_member_require.cpp
+@HAVE_CXX11_TRUE@am_cpp11_prefer_member_require_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/prefer_member_require.$(OBJEXT)
+cpp11_prefer_member_require_OBJECTS = \
+ $(am_cpp11_prefer_member_require_OBJECTS)
+cpp11_prefer_member_require_LDADD = $(LDADD)
+am__cpp11_prefer_static_SOURCES_DIST = cpp11/prefer_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_prefer_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/prefer_static.$(OBJEXT)
+cpp11_prefer_static_OBJECTS = $(am_cpp11_prefer_static_OBJECTS)
+cpp11_prefer_static_LDADD = $(LDADD)
+am__cpp11_prefer_unsupported_SOURCES_DIST = \
+ cpp11/prefer_unsupported.cpp
+@HAVE_CXX11_TRUE@am_cpp11_prefer_unsupported_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/prefer_unsupported.$(OBJEXT)
+cpp11_prefer_unsupported_OBJECTS = \
+ $(am_cpp11_prefer_unsupported_OBJECTS)
+cpp11_prefer_unsupported_LDADD = $(LDADD)
+am__cpp11_query_free_SOURCES_DIST = cpp11/query_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_query_free_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/query_free.$(OBJEXT)
+cpp11_query_free_OBJECTS = $(am_cpp11_query_free_OBJECTS)
+cpp11_query_free_LDADD = $(LDADD)
+am__cpp11_query_member_SOURCES_DIST = cpp11/query_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_query_member_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/query_member.$(OBJEXT)
+cpp11_query_member_OBJECTS = $(am_cpp11_query_member_OBJECTS)
+cpp11_query_member_LDADD = $(LDADD)
+am__cpp11_query_static_SOURCES_DIST = cpp11/query_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_query_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/query_static.$(OBJEXT)
+cpp11_query_static_OBJECTS = $(am_cpp11_query_static_OBJECTS)
+cpp11_query_static_LDADD = $(LDADD)
+am__cpp11_require_concept_free_SOURCES_DIST = \
+ cpp11/require_concept_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_require_concept_free_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_free.$(OBJEXT)
+cpp11_require_concept_free_OBJECTS = \
+ $(am_cpp11_require_concept_free_OBJECTS)
+cpp11_require_concept_free_LDADD = $(LDADD)
+am__cpp11_require_concept_member_SOURCES_DIST = \
+ cpp11/require_concept_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_require_concept_member_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_member.$(OBJEXT)
+cpp11_require_concept_member_OBJECTS = \
+ $(am_cpp11_require_concept_member_OBJECTS)
+cpp11_require_concept_member_LDADD = $(LDADD)
+am__cpp11_require_concept_static_SOURCES_DIST = \
+ cpp11/require_concept_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_require_concept_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/require_concept_static.$(OBJEXT)
+cpp11_require_concept_static_OBJECTS = \
+ $(am_cpp11_require_concept_static_OBJECTS)
+cpp11_require_concept_static_LDADD = $(LDADD)
+am__cpp11_require_free_SOURCES_DIST = cpp11/require_free.cpp
+@HAVE_CXX11_TRUE@am_cpp11_require_free_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/require_free.$(OBJEXT)
+cpp11_require_free_OBJECTS = $(am_cpp11_require_free_OBJECTS)
+cpp11_require_free_LDADD = $(LDADD)
+am__cpp11_require_member_SOURCES_DIST = cpp11/require_member.cpp
+@HAVE_CXX11_TRUE@am_cpp11_require_member_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/require_member.$(OBJEXT)
+cpp11_require_member_OBJECTS = $(am_cpp11_require_member_OBJECTS)
+cpp11_require_member_LDADD = $(LDADD)
+am__cpp11_require_static_SOURCES_DIST = cpp11/require_static.cpp
+@HAVE_CXX11_TRUE@am_cpp11_require_static_OBJECTS = \
+@HAVE_CXX11_TRUE@ cpp11/require_static.$(OBJEXT)
+cpp11_require_static_OBJECTS = $(am_cpp11_require_static_OBJECTS)
+cpp11_require_static_LDADD = $(LDADD)
+am__cpp14_can_prefer_free_prefer_SOURCES_DIST = \
+ cpp14/can_prefer_free_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_free_prefer_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_free_prefer.$(OBJEXT)
+cpp14_can_prefer_free_prefer_OBJECTS = \
+ $(am_cpp14_can_prefer_free_prefer_OBJECTS)
+cpp14_can_prefer_free_prefer_LDADD = $(LDADD)
+am__cpp14_can_prefer_free_require_SOURCES_DIST = \
+ cpp14/can_prefer_free_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_free_require_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_free_require.$(OBJEXT)
+cpp14_can_prefer_free_require_OBJECTS = \
+ $(am_cpp14_can_prefer_free_require_OBJECTS)
+cpp14_can_prefer_free_require_LDADD = $(LDADD)
+am__cpp14_can_prefer_member_prefer_SOURCES_DIST = \
+ cpp14/can_prefer_member_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_member_prefer_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_member_prefer.$(OBJEXT)
+cpp14_can_prefer_member_prefer_OBJECTS = \
+ $(am_cpp14_can_prefer_member_prefer_OBJECTS)
+cpp14_can_prefer_member_prefer_LDADD = $(LDADD)
+am__cpp14_can_prefer_member_require_SOURCES_DIST = \
+ cpp14/can_prefer_member_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_member_require_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_member_require.$(OBJEXT)
+cpp14_can_prefer_member_require_OBJECTS = \
+ $(am_cpp14_can_prefer_member_require_OBJECTS)
+cpp14_can_prefer_member_require_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_applicable_free_prefer_SOURCES_DIST = \
+ cpp14/can_prefer_not_applicable_free_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_applicable_free_prefer_OBJECTS = cpp14/can_prefer_not_applicable_free_prefer.$(OBJEXT)
+cpp14_can_prefer_not_applicable_free_prefer_OBJECTS = \
+ $(am_cpp14_can_prefer_not_applicable_free_prefer_OBJECTS)
+cpp14_can_prefer_not_applicable_free_prefer_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_applicable_free_require_SOURCES_DIST = \
+ cpp14/can_prefer_not_applicable_free_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_applicable_free_require_OBJECTS = cpp14/can_prefer_not_applicable_free_require.$(OBJEXT)
+cpp14_can_prefer_not_applicable_free_require_OBJECTS = \
+ $(am_cpp14_can_prefer_not_applicable_free_require_OBJECTS)
+cpp14_can_prefer_not_applicable_free_require_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_applicable_member_prefer_SOURCES_DIST = \
+ cpp14/can_prefer_not_applicable_member_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_applicable_member_prefer_OBJECTS = cpp14/can_prefer_not_applicable_member_prefer.$(OBJEXT)
+cpp14_can_prefer_not_applicable_member_prefer_OBJECTS = \
+ $(am_cpp14_can_prefer_not_applicable_member_prefer_OBJECTS)
+cpp14_can_prefer_not_applicable_member_prefer_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_applicable_member_require_SOURCES_DIST = \
+ cpp14/can_prefer_not_applicable_member_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_applicable_member_require_OBJECTS = cpp14/can_prefer_not_applicable_member_require.$(OBJEXT)
+cpp14_can_prefer_not_applicable_member_require_OBJECTS = \
+ $(am_cpp14_can_prefer_not_applicable_member_require_OBJECTS)
+cpp14_can_prefer_not_applicable_member_require_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_applicable_static_SOURCES_DIST = \
+ cpp14/can_prefer_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_applicable_static_OBJECTS = cpp14/can_prefer_not_applicable_static.$(OBJEXT)
+cpp14_can_prefer_not_applicable_static_OBJECTS = \
+ $(am_cpp14_can_prefer_not_applicable_static_OBJECTS)
+cpp14_can_prefer_not_applicable_static_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_applicable_unsupported_SOURCES_DIST = \
+ cpp14/can_prefer_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_applicable_unsupported_OBJECTS = cpp14/can_prefer_not_applicable_unsupported.$(OBJEXT)
+cpp14_can_prefer_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp14_can_prefer_not_applicable_unsupported_OBJECTS)
+cpp14_can_prefer_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_preferable_free_prefer_SOURCES_DIST = \
+ cpp14/can_prefer_not_preferable_free_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_preferable_free_prefer_OBJECTS = cpp14/can_prefer_not_preferable_free_prefer.$(OBJEXT)
+cpp14_can_prefer_not_preferable_free_prefer_OBJECTS = \
+ $(am_cpp14_can_prefer_not_preferable_free_prefer_OBJECTS)
+cpp14_can_prefer_not_preferable_free_prefer_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_preferable_free_require_SOURCES_DIST = \
+ cpp14/can_prefer_not_preferable_free_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_preferable_free_require_OBJECTS = cpp14/can_prefer_not_preferable_free_require.$(OBJEXT)
+cpp14_can_prefer_not_preferable_free_require_OBJECTS = \
+ $(am_cpp14_can_prefer_not_preferable_free_require_OBJECTS)
+cpp14_can_prefer_not_preferable_free_require_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_preferable_member_prefer_SOURCES_DIST = \
+ cpp14/can_prefer_not_preferable_member_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_preferable_member_prefer_OBJECTS = cpp14/can_prefer_not_preferable_member_prefer.$(OBJEXT)
+cpp14_can_prefer_not_preferable_member_prefer_OBJECTS = \
+ $(am_cpp14_can_prefer_not_preferable_member_prefer_OBJECTS)
+cpp14_can_prefer_not_preferable_member_prefer_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_preferable_member_require_SOURCES_DIST = \
+ cpp14/can_prefer_not_preferable_member_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_preferable_member_require_OBJECTS = cpp14/can_prefer_not_preferable_member_require.$(OBJEXT)
+cpp14_can_prefer_not_preferable_member_require_OBJECTS = \
+ $(am_cpp14_can_prefer_not_preferable_member_require_OBJECTS)
+cpp14_can_prefer_not_preferable_member_require_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_preferable_static_SOURCES_DIST = \
+ cpp14/can_prefer_not_preferable_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_preferable_static_OBJECTS = cpp14/can_prefer_not_preferable_static.$(OBJEXT)
+cpp14_can_prefer_not_preferable_static_OBJECTS = \
+ $(am_cpp14_can_prefer_not_preferable_static_OBJECTS)
+cpp14_can_prefer_not_preferable_static_LDADD = $(LDADD)
+am__cpp14_can_prefer_not_preferable_unsupported_SOURCES_DIST = \
+ cpp14/can_prefer_not_preferable_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_not_preferable_unsupported_OBJECTS = cpp14/can_prefer_not_preferable_unsupported.$(OBJEXT)
+cpp14_can_prefer_not_preferable_unsupported_OBJECTS = \
+ $(am_cpp14_can_prefer_not_preferable_unsupported_OBJECTS)
+cpp14_can_prefer_not_preferable_unsupported_LDADD = $(LDADD)
+am__cpp14_can_prefer_static_SOURCES_DIST = \
+ cpp14/can_prefer_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_static.$(OBJEXT)
+cpp14_can_prefer_static_OBJECTS = \
+ $(am_cpp14_can_prefer_static_OBJECTS)
+cpp14_can_prefer_static_LDADD = $(LDADD)
+am__cpp14_can_prefer_unsupported_SOURCES_DIST = \
+ cpp14/can_prefer_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_prefer_unsupported_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_prefer_unsupported.$(OBJEXT)
+cpp14_can_prefer_unsupported_OBJECTS = \
+ $(am_cpp14_can_prefer_unsupported_OBJECTS)
+cpp14_can_prefer_unsupported_LDADD = $(LDADD)
+am__cpp14_can_query_free_SOURCES_DIST = cpp14/can_query_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_free_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_query_free.$(OBJEXT)
+cpp14_can_query_free_OBJECTS = $(am_cpp14_can_query_free_OBJECTS)
+cpp14_can_query_free_LDADD = $(LDADD)
+am__cpp14_can_query_member_SOURCES_DIST = cpp14/can_query_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_member_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_query_member.$(OBJEXT)
+cpp14_can_query_member_OBJECTS = $(am_cpp14_can_query_member_OBJECTS)
+cpp14_can_query_member_LDADD = $(LDADD)
+am__cpp14_can_query_not_applicable_free_SOURCES_DIST = \
+ cpp14/can_query_not_applicable_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_not_applicable_free_OBJECTS = cpp14/can_query_not_applicable_free.$(OBJEXT)
+cpp14_can_query_not_applicable_free_OBJECTS = \
+ $(am_cpp14_can_query_not_applicable_free_OBJECTS)
+cpp14_can_query_not_applicable_free_LDADD = $(LDADD)
+am__cpp14_can_query_not_applicable_member_SOURCES_DIST = \
+ cpp14/can_query_not_applicable_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_not_applicable_member_OBJECTS = cpp14/can_query_not_applicable_member.$(OBJEXT)
+cpp14_can_query_not_applicable_member_OBJECTS = \
+ $(am_cpp14_can_query_not_applicable_member_OBJECTS)
+cpp14_can_query_not_applicable_member_LDADD = $(LDADD)
+am__cpp14_can_query_not_applicable_static_SOURCES_DIST = \
+ cpp14/can_query_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_not_applicable_static_OBJECTS = cpp14/can_query_not_applicable_static.$(OBJEXT)
+cpp14_can_query_not_applicable_static_OBJECTS = \
+ $(am_cpp14_can_query_not_applicable_static_OBJECTS)
+cpp14_can_query_not_applicable_static_LDADD = $(LDADD)
+am__cpp14_can_query_not_applicable_unsupported_SOURCES_DIST = \
+ cpp14/can_query_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_not_applicable_unsupported_OBJECTS = cpp14/can_query_not_applicable_unsupported.$(OBJEXT)
+cpp14_can_query_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp14_can_query_not_applicable_unsupported_OBJECTS)
+cpp14_can_query_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp14_can_query_static_SOURCES_DIST = cpp14/can_query_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_query_static.$(OBJEXT)
+cpp14_can_query_static_OBJECTS = $(am_cpp14_can_query_static_OBJECTS)
+cpp14_can_query_static_LDADD = $(LDADD)
+am__cpp14_can_query_unsupported_SOURCES_DIST = \
+ cpp14/can_query_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_query_unsupported_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_query_unsupported.$(OBJEXT)
+cpp14_can_query_unsupported_OBJECTS = \
+ $(am_cpp14_can_query_unsupported_OBJECTS)
+cpp14_can_query_unsupported_LDADD = $(LDADD)
+am__cpp14_can_require_concept_free_SOURCES_DIST = \
+ cpp14/can_require_concept_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_free_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_free.$(OBJEXT)
+cpp14_can_require_concept_free_OBJECTS = \
+ $(am_cpp14_can_require_concept_free_OBJECTS)
+cpp14_can_require_concept_free_LDADD = $(LDADD)
+am__cpp14_can_require_concept_member_SOURCES_DIST = \
+ cpp14/can_require_concept_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_member_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_member.$(OBJEXT)
+cpp14_can_require_concept_member_OBJECTS = \
+ $(am_cpp14_can_require_concept_member_OBJECTS)
+cpp14_can_require_concept_member_LDADD = $(LDADD)
+am__cpp14_can_require_concept_not_applicable_free_SOURCES_DIST = \
+ cpp14/can_require_concept_not_applicable_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_not_applicable_free_OBJECTS = cpp14/can_require_concept_not_applicable_free.$(OBJEXT)
+cpp14_can_require_concept_not_applicable_free_OBJECTS = \
+ $(am_cpp14_can_require_concept_not_applicable_free_OBJECTS)
+cpp14_can_require_concept_not_applicable_free_LDADD = $(LDADD)
+am__cpp14_can_require_concept_not_applicable_member_SOURCES_DIST = \
+ cpp14/can_require_concept_not_applicable_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_not_applicable_member_OBJECTS = cpp14/can_require_concept_not_applicable_member.$(OBJEXT)
+cpp14_can_require_concept_not_applicable_member_OBJECTS = \
+ $(am_cpp14_can_require_concept_not_applicable_member_OBJECTS)
+cpp14_can_require_concept_not_applicable_member_LDADD = $(LDADD)
+am__cpp14_can_require_concept_not_applicable_static_SOURCES_DIST = \
+ cpp14/can_require_concept_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_not_applicable_static_OBJECTS = cpp14/can_require_concept_not_applicable_static.$(OBJEXT)
+cpp14_can_require_concept_not_applicable_static_OBJECTS = \
+ $(am_cpp14_can_require_concept_not_applicable_static_OBJECTS)
+cpp14_can_require_concept_not_applicable_static_LDADD = $(LDADD)
+am__cpp14_can_require_concept_not_applicable_unsupported_SOURCES_DIST = \
+ cpp14/can_require_concept_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_not_applicable_unsupported_OBJECTS = cpp14/can_require_concept_not_applicable_unsupported.$(OBJEXT)
+cpp14_can_require_concept_not_applicable_unsupported_OBJECTS = $(am_cpp14_can_require_concept_not_applicable_unsupported_OBJECTS)
+cpp14_can_require_concept_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp14_can_require_concept_static_SOURCES_DIST = \
+ cpp14/can_require_concept_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_concept_static.$(OBJEXT)
+cpp14_can_require_concept_static_OBJECTS = \
+ $(am_cpp14_can_require_concept_static_OBJECTS)
+cpp14_can_require_concept_static_LDADD = $(LDADD)
+am__cpp14_can_require_concept_unsupported_SOURCES_DIST = \
+ cpp14/can_require_concept_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_concept_unsupported_OBJECTS = cpp14/can_require_concept_unsupported.$(OBJEXT)
+cpp14_can_require_concept_unsupported_OBJECTS = \
+ $(am_cpp14_can_require_concept_unsupported_OBJECTS)
+cpp14_can_require_concept_unsupported_LDADD = $(LDADD)
+am__cpp14_can_require_free_SOURCES_DIST = cpp14/can_require_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_free_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_free.$(OBJEXT)
+cpp14_can_require_free_OBJECTS = $(am_cpp14_can_require_free_OBJECTS)
+cpp14_can_require_free_LDADD = $(LDADD)
+am__cpp14_can_require_member_SOURCES_DIST = \
+ cpp14/can_require_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_member_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_member.$(OBJEXT)
+cpp14_can_require_member_OBJECTS = \
+ $(am_cpp14_can_require_member_OBJECTS)
+cpp14_can_require_member_LDADD = $(LDADD)
+am__cpp14_can_require_not_applicable_free_SOURCES_DIST = \
+ cpp14/can_require_not_applicable_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_not_applicable_free_OBJECTS = cpp14/can_require_not_applicable_free.$(OBJEXT)
+cpp14_can_require_not_applicable_free_OBJECTS = \
+ $(am_cpp14_can_require_not_applicable_free_OBJECTS)
+cpp14_can_require_not_applicable_free_LDADD = $(LDADD)
+am__cpp14_can_require_not_applicable_member_SOURCES_DIST = \
+ cpp14/can_require_not_applicable_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_not_applicable_member_OBJECTS = cpp14/can_require_not_applicable_member.$(OBJEXT)
+cpp14_can_require_not_applicable_member_OBJECTS = \
+ $(am_cpp14_can_require_not_applicable_member_OBJECTS)
+cpp14_can_require_not_applicable_member_LDADD = $(LDADD)
+am__cpp14_can_require_not_applicable_static_SOURCES_DIST = \
+ cpp14/can_require_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_not_applicable_static_OBJECTS = cpp14/can_require_not_applicable_static.$(OBJEXT)
+cpp14_can_require_not_applicable_static_OBJECTS = \
+ $(am_cpp14_can_require_not_applicable_static_OBJECTS)
+cpp14_can_require_not_applicable_static_LDADD = $(LDADD)
+am__cpp14_can_require_not_applicable_unsupported_SOURCES_DIST = \
+ cpp14/can_require_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_not_applicable_unsupported_OBJECTS = cpp14/can_require_not_applicable_unsupported.$(OBJEXT)
+cpp14_can_require_not_applicable_unsupported_OBJECTS = \
+ $(am_cpp14_can_require_not_applicable_unsupported_OBJECTS)
+cpp14_can_require_not_applicable_unsupported_LDADD = $(LDADD)
+am__cpp14_can_require_static_SOURCES_DIST = \
+ cpp14/can_require_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_static.$(OBJEXT)
+cpp14_can_require_static_OBJECTS = \
+ $(am_cpp14_can_require_static_OBJECTS)
+cpp14_can_require_static_LDADD = $(LDADD)
+am__cpp14_can_require_unsupported_SOURCES_DIST = \
+ cpp14/can_require_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_can_require_unsupported_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/can_require_unsupported.$(OBJEXT)
+cpp14_can_require_unsupported_OBJECTS = \
+ $(am_cpp14_can_require_unsupported_OBJECTS)
+cpp14_can_require_unsupported_LDADD = $(LDADD)
+am__cpp14_prefer_free_prefer_SOURCES_DIST = \
+ cpp14/prefer_free_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_prefer_free_prefer_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/prefer_free_prefer.$(OBJEXT)
+cpp14_prefer_free_prefer_OBJECTS = \
+ $(am_cpp14_prefer_free_prefer_OBJECTS)
+cpp14_prefer_free_prefer_LDADD = $(LDADD)
+am__cpp14_prefer_free_require_SOURCES_DIST = \
+ cpp14/prefer_free_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_prefer_free_require_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/prefer_free_require.$(OBJEXT)
+cpp14_prefer_free_require_OBJECTS = \
+ $(am_cpp14_prefer_free_require_OBJECTS)
+cpp14_prefer_free_require_LDADD = $(LDADD)
+am__cpp14_prefer_member_prefer_SOURCES_DIST = \
+ cpp14/prefer_member_prefer.cpp
+@HAVE_CXX14_TRUE@am_cpp14_prefer_member_prefer_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/prefer_member_prefer.$(OBJEXT)
+cpp14_prefer_member_prefer_OBJECTS = \
+ $(am_cpp14_prefer_member_prefer_OBJECTS)
+cpp14_prefer_member_prefer_LDADD = $(LDADD)
+am__cpp14_prefer_member_require_SOURCES_DIST = \
+ cpp14/prefer_member_require.cpp
+@HAVE_CXX14_TRUE@am_cpp14_prefer_member_require_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/prefer_member_require.$(OBJEXT)
+cpp14_prefer_member_require_OBJECTS = \
+ $(am_cpp14_prefer_member_require_OBJECTS)
+cpp14_prefer_member_require_LDADD = $(LDADD)
+am__cpp14_prefer_static_SOURCES_DIST = cpp14/prefer_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_prefer_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/prefer_static.$(OBJEXT)
+cpp14_prefer_static_OBJECTS = $(am_cpp14_prefer_static_OBJECTS)
+cpp14_prefer_static_LDADD = $(LDADD)
+am__cpp14_prefer_unsupported_SOURCES_DIST = \
+ cpp14/prefer_unsupported.cpp
+@HAVE_CXX14_TRUE@am_cpp14_prefer_unsupported_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/prefer_unsupported.$(OBJEXT)
+cpp14_prefer_unsupported_OBJECTS = \
+ $(am_cpp14_prefer_unsupported_OBJECTS)
+cpp14_prefer_unsupported_LDADD = $(LDADD)
+am__cpp14_query_free_SOURCES_DIST = cpp14/query_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_query_free_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/query_free.$(OBJEXT)
+cpp14_query_free_OBJECTS = $(am_cpp14_query_free_OBJECTS)
+cpp14_query_free_LDADD = $(LDADD)
+am__cpp14_query_member_SOURCES_DIST = cpp14/query_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_query_member_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/query_member.$(OBJEXT)
+cpp14_query_member_OBJECTS = $(am_cpp14_query_member_OBJECTS)
+cpp14_query_member_LDADD = $(LDADD)
+am__cpp14_query_static_SOURCES_DIST = cpp14/query_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_query_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/query_static.$(OBJEXT)
+cpp14_query_static_OBJECTS = $(am_cpp14_query_static_OBJECTS)
+cpp14_query_static_LDADD = $(LDADD)
+am__cpp14_require_concept_free_SOURCES_DIST = \
+ cpp14/require_concept_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_require_concept_free_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_free.$(OBJEXT)
+cpp14_require_concept_free_OBJECTS = \
+ $(am_cpp14_require_concept_free_OBJECTS)
+cpp14_require_concept_free_LDADD = $(LDADD)
+am__cpp14_require_concept_member_SOURCES_DIST = \
+ cpp14/require_concept_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_require_concept_member_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_member.$(OBJEXT)
+cpp14_require_concept_member_OBJECTS = \
+ $(am_cpp14_require_concept_member_OBJECTS)
+cpp14_require_concept_member_LDADD = $(LDADD)
+am__cpp14_require_concept_static_SOURCES_DIST = \
+ cpp14/require_concept_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_require_concept_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/require_concept_static.$(OBJEXT)
+cpp14_require_concept_static_OBJECTS = \
+ $(am_cpp14_require_concept_static_OBJECTS)
+cpp14_require_concept_static_LDADD = $(LDADD)
+am__cpp14_require_free_SOURCES_DIST = cpp14/require_free.cpp
+@HAVE_CXX14_TRUE@am_cpp14_require_free_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/require_free.$(OBJEXT)
+cpp14_require_free_OBJECTS = $(am_cpp14_require_free_OBJECTS)
+cpp14_require_free_LDADD = $(LDADD)
+am__cpp14_require_member_SOURCES_DIST = cpp14/require_member.cpp
+@HAVE_CXX14_TRUE@am_cpp14_require_member_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/require_member.$(OBJEXT)
+cpp14_require_member_OBJECTS = $(am_cpp14_require_member_OBJECTS)
+cpp14_require_member_LDADD = $(LDADD)
+am__cpp14_require_static_SOURCES_DIST = cpp14/require_static.cpp
+@HAVE_CXX14_TRUE@am_cpp14_require_static_OBJECTS = \
+@HAVE_CXX14_TRUE@ cpp14/require_static.$(OBJEXT)
+cpp14_require_static_OBJECTS = $(am_cpp14_require_static_OBJECTS)
+cpp14_require_static_LDADD = $(LDADD)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = cpp03/$(DEPDIR)/can_prefer_free_prefer.Po \
+ cpp03/$(DEPDIR)/can_prefer_free_require.Po \
+ cpp03/$(DEPDIR)/can_prefer_member_prefer.Po \
+ cpp03/$(DEPDIR)/can_prefer_member_require.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_applicable_free_require.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_applicable_member_require.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_applicable_static.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_preferable_free_require.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_preferable_member_require.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_preferable_static.Po \
+ cpp03/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po \
+ cpp03/$(DEPDIR)/can_prefer_static.Po \
+ cpp03/$(DEPDIR)/can_prefer_unsupported.Po \
+ cpp03/$(DEPDIR)/can_query_free.Po \
+ cpp03/$(DEPDIR)/can_query_member.Po \
+ cpp03/$(DEPDIR)/can_query_not_applicable_free.Po \
+ cpp03/$(DEPDIR)/can_query_not_applicable_member.Po \
+ cpp03/$(DEPDIR)/can_query_not_applicable_static.Po \
+ cpp03/$(DEPDIR)/can_query_not_applicable_unsupported.Po \
+ cpp03/$(DEPDIR)/can_query_static.Po \
+ cpp03/$(DEPDIR)/can_query_unsupported.Po \
+ cpp03/$(DEPDIR)/can_require_concept_free.Po \
+ cpp03/$(DEPDIR)/can_require_concept_member.Po \
+ cpp03/$(DEPDIR)/can_require_concept_not_applicable_free.Po \
+ cpp03/$(DEPDIR)/can_require_concept_not_applicable_member.Po \
+ cpp03/$(DEPDIR)/can_require_concept_not_applicable_static.Po \
+ cpp03/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po \
+ cpp03/$(DEPDIR)/can_require_concept_static.Po \
+ cpp03/$(DEPDIR)/can_require_concept_unsupported.Po \
+ cpp03/$(DEPDIR)/can_require_free.Po \
+ cpp03/$(DEPDIR)/can_require_member.Po \
+ cpp03/$(DEPDIR)/can_require_not_applicable_free.Po \
+ cpp03/$(DEPDIR)/can_require_not_applicable_member.Po \
+ cpp03/$(DEPDIR)/can_require_not_applicable_static.Po \
+ cpp03/$(DEPDIR)/can_require_not_applicable_unsupported.Po \
+ cpp03/$(DEPDIR)/can_require_static.Po \
+ cpp03/$(DEPDIR)/can_require_unsupported.Po \
+ cpp03/$(DEPDIR)/prefer_free_prefer.Po \
+ cpp03/$(DEPDIR)/prefer_free_require.Po \
+ cpp03/$(DEPDIR)/prefer_member_prefer.Po \
+ cpp03/$(DEPDIR)/prefer_member_require.Po \
+ cpp03/$(DEPDIR)/prefer_static.Po \
+ cpp03/$(DEPDIR)/prefer_unsupported.Po \
+ cpp03/$(DEPDIR)/query_free.Po cpp03/$(DEPDIR)/query_member.Po \
+ cpp03/$(DEPDIR)/query_static.Po \
+ cpp03/$(DEPDIR)/require_concept_free.Po \
+ cpp03/$(DEPDIR)/require_concept_member.Po \
+ cpp03/$(DEPDIR)/require_concept_static.Po \
+ cpp03/$(DEPDIR)/require_free.Po \
+ cpp03/$(DEPDIR)/require_member.Po \
+ cpp03/$(DEPDIR)/require_static.Po \
+ cpp11/$(DEPDIR)/can_prefer_free_prefer.Po \
+ cpp11/$(DEPDIR)/can_prefer_free_require.Po \
+ cpp11/$(DEPDIR)/can_prefer_member_prefer.Po \
+ cpp11/$(DEPDIR)/can_prefer_member_require.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_applicable_free_require.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_applicable_member_require.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_applicable_static.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_preferable_free_require.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_preferable_member_require.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_preferable_static.Po \
+ cpp11/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po \
+ cpp11/$(DEPDIR)/can_prefer_static.Po \
+ cpp11/$(DEPDIR)/can_prefer_unsupported.Po \
+ cpp11/$(DEPDIR)/can_query_free.Po \
+ cpp11/$(DEPDIR)/can_query_member.Po \
+ cpp11/$(DEPDIR)/can_query_not_applicable_free.Po \
+ cpp11/$(DEPDIR)/can_query_not_applicable_member.Po \
+ cpp11/$(DEPDIR)/can_query_not_applicable_static.Po \
+ cpp11/$(DEPDIR)/can_query_not_applicable_unsupported.Po \
+ cpp11/$(DEPDIR)/can_query_static.Po \
+ cpp11/$(DEPDIR)/can_query_unsupported.Po \
+ cpp11/$(DEPDIR)/can_require_concept_free.Po \
+ cpp11/$(DEPDIR)/can_require_concept_member.Po \
+ cpp11/$(DEPDIR)/can_require_concept_not_applicable_free.Po \
+ cpp11/$(DEPDIR)/can_require_concept_not_applicable_member.Po \
+ cpp11/$(DEPDIR)/can_require_concept_not_applicable_static.Po \
+ cpp11/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po \
+ cpp11/$(DEPDIR)/can_require_concept_static.Po \
+ cpp11/$(DEPDIR)/can_require_concept_unsupported.Po \
+ cpp11/$(DEPDIR)/can_require_free.Po \
+ cpp11/$(DEPDIR)/can_require_member.Po \
+ cpp11/$(DEPDIR)/can_require_not_applicable_free.Po \
+ cpp11/$(DEPDIR)/can_require_not_applicable_member.Po \
+ cpp11/$(DEPDIR)/can_require_not_applicable_static.Po \
+ cpp11/$(DEPDIR)/can_require_not_applicable_unsupported.Po \
+ cpp11/$(DEPDIR)/can_require_static.Po \
+ cpp11/$(DEPDIR)/can_require_unsupported.Po \
+ cpp11/$(DEPDIR)/prefer_free_prefer.Po \
+ cpp11/$(DEPDIR)/prefer_free_require.Po \
+ cpp11/$(DEPDIR)/prefer_member_prefer.Po \
+ cpp11/$(DEPDIR)/prefer_member_require.Po \
+ cpp11/$(DEPDIR)/prefer_static.Po \
+ cpp11/$(DEPDIR)/prefer_unsupported.Po \
+ cpp11/$(DEPDIR)/query_free.Po cpp11/$(DEPDIR)/query_member.Po \
+ cpp11/$(DEPDIR)/query_static.Po \
+ cpp11/$(DEPDIR)/require_concept_free.Po \
+ cpp11/$(DEPDIR)/require_concept_member.Po \
+ cpp11/$(DEPDIR)/require_concept_static.Po \
+ cpp11/$(DEPDIR)/require_free.Po \
+ cpp11/$(DEPDIR)/require_member.Po \
+ cpp11/$(DEPDIR)/require_static.Po \
+ cpp14/$(DEPDIR)/can_prefer_free_prefer.Po \
+ cpp14/$(DEPDIR)/can_prefer_free_require.Po \
+ cpp14/$(DEPDIR)/can_prefer_member_prefer.Po \
+ cpp14/$(DEPDIR)/can_prefer_member_require.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_applicable_free_require.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_applicable_member_require.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_applicable_static.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_preferable_free_require.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_preferable_member_require.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_preferable_static.Po \
+ cpp14/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po \
+ cpp14/$(DEPDIR)/can_prefer_static.Po \
+ cpp14/$(DEPDIR)/can_prefer_unsupported.Po \
+ cpp14/$(DEPDIR)/can_query_free.Po \
+ cpp14/$(DEPDIR)/can_query_member.Po \
+ cpp14/$(DEPDIR)/can_query_not_applicable_free.Po \
+ cpp14/$(DEPDIR)/can_query_not_applicable_member.Po \
+ cpp14/$(DEPDIR)/can_query_not_applicable_static.Po \
+ cpp14/$(DEPDIR)/can_query_not_applicable_unsupported.Po \
+ cpp14/$(DEPDIR)/can_query_static.Po \
+ cpp14/$(DEPDIR)/can_query_unsupported.Po \
+ cpp14/$(DEPDIR)/can_require_concept_free.Po \
+ cpp14/$(DEPDIR)/can_require_concept_member.Po \
+ cpp14/$(DEPDIR)/can_require_concept_not_applicable_free.Po \
+ cpp14/$(DEPDIR)/can_require_concept_not_applicable_member.Po \
+ cpp14/$(DEPDIR)/can_require_concept_not_applicable_static.Po \
+ cpp14/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po \
+ cpp14/$(DEPDIR)/can_require_concept_static.Po \
+ cpp14/$(DEPDIR)/can_require_concept_unsupported.Po \
+ cpp14/$(DEPDIR)/can_require_free.Po \
+ cpp14/$(DEPDIR)/can_require_member.Po \
+ cpp14/$(DEPDIR)/can_require_not_applicable_free.Po \
+ cpp14/$(DEPDIR)/can_require_not_applicable_member.Po \
+ cpp14/$(DEPDIR)/can_require_not_applicable_static.Po \
+ cpp14/$(DEPDIR)/can_require_not_applicable_unsupported.Po \
+ cpp14/$(DEPDIR)/can_require_static.Po \
+ cpp14/$(DEPDIR)/can_require_unsupported.Po \
+ cpp14/$(DEPDIR)/prefer_free_prefer.Po \
+ cpp14/$(DEPDIR)/prefer_free_require.Po \
+ cpp14/$(DEPDIR)/prefer_member_prefer.Po \
+ cpp14/$(DEPDIR)/prefer_member_require.Po \
+ cpp14/$(DEPDIR)/prefer_static.Po \
+ cpp14/$(DEPDIR)/prefer_unsupported.Po \
+ cpp14/$(DEPDIR)/query_free.Po cpp14/$(DEPDIR)/query_member.Po \
+ cpp14/$(DEPDIR)/query_static.Po \
+ cpp14/$(DEPDIR)/require_concept_free.Po \
+ cpp14/$(DEPDIR)/require_concept_member.Po \
+ cpp14/$(DEPDIR)/require_concept_static.Po \
+ cpp14/$(DEPDIR)/require_free.Po \
+ cpp14/$(DEPDIR)/require_member.Po \
+ cpp14/$(DEPDIR)/require_static.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(cpp03_can_prefer_free_prefer_SOURCES) \
+ $(cpp03_can_prefer_free_require_SOURCES) \
+ $(cpp03_can_prefer_member_prefer_SOURCES) \
+ $(cpp03_can_prefer_member_require_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_free_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_free_require_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_member_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_member_require_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_static_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_free_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_free_require_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_member_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_member_require_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_static_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_unsupported_SOURCES) \
+ $(cpp03_can_prefer_static_SOURCES) \
+ $(cpp03_can_prefer_unsupported_SOURCES) \
+ $(cpp03_can_query_free_SOURCES) \
+ $(cpp03_can_query_member_SOURCES) \
+ $(cpp03_can_query_not_applicable_free_SOURCES) \
+ $(cpp03_can_query_not_applicable_member_SOURCES) \
+ $(cpp03_can_query_not_applicable_static_SOURCES) \
+ $(cpp03_can_query_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_query_static_SOURCES) \
+ $(cpp03_can_query_unsupported_SOURCES) \
+ $(cpp03_can_require_concept_free_SOURCES) \
+ $(cpp03_can_require_concept_member_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_free_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_member_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_static_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_require_concept_static_SOURCES) \
+ $(cpp03_can_require_concept_unsupported_SOURCES) \
+ $(cpp03_can_require_free_SOURCES) \
+ $(cpp03_can_require_member_SOURCES) \
+ $(cpp03_can_require_not_applicable_free_SOURCES) \
+ $(cpp03_can_require_not_applicable_member_SOURCES) \
+ $(cpp03_can_require_not_applicable_static_SOURCES) \
+ $(cpp03_can_require_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_require_static_SOURCES) \
+ $(cpp03_can_require_unsupported_SOURCES) \
+ $(cpp03_prefer_free_prefer_SOURCES) \
+ $(cpp03_prefer_free_require_SOURCES) \
+ $(cpp03_prefer_member_prefer_SOURCES) \
+ $(cpp03_prefer_member_require_SOURCES) \
+ $(cpp03_prefer_static_SOURCES) \
+ $(cpp03_prefer_unsupported_SOURCES) \
+ $(cpp03_query_free_SOURCES) $(cpp03_query_member_SOURCES) \
+ $(cpp03_query_static_SOURCES) \
+ $(cpp03_require_concept_free_SOURCES) \
+ $(cpp03_require_concept_member_SOURCES) \
+ $(cpp03_require_concept_static_SOURCES) \
+ $(cpp03_require_free_SOURCES) $(cpp03_require_member_SOURCES) \
+ $(cpp03_require_static_SOURCES) \
+ $(cpp11_can_prefer_free_prefer_SOURCES) \
+ $(cpp11_can_prefer_free_require_SOURCES) \
+ $(cpp11_can_prefer_member_prefer_SOURCES) \
+ $(cpp11_can_prefer_member_require_SOURCES) \
+ $(cpp11_can_prefer_not_applicable_free_prefer_SOURCES) \
+ $(cpp11_can_prefer_not_applicable_free_require_SOURCES) \
+ $(cpp11_can_prefer_not_applicable_member_prefer_SOURCES) \
+ $(cpp11_can_prefer_not_applicable_member_require_SOURCES) \
+ $(cpp11_can_prefer_not_applicable_static_SOURCES) \
+ $(cpp11_can_prefer_not_applicable_unsupported_SOURCES) \
+ $(cpp11_can_prefer_not_preferable_free_prefer_SOURCES) \
+ $(cpp11_can_prefer_not_preferable_free_require_SOURCES) \
+ $(cpp11_can_prefer_not_preferable_member_prefer_SOURCES) \
+ $(cpp11_can_prefer_not_preferable_member_require_SOURCES) \
+ $(cpp11_can_prefer_not_preferable_static_SOURCES) \
+ $(cpp11_can_prefer_not_preferable_unsupported_SOURCES) \
+ $(cpp11_can_prefer_static_SOURCES) \
+ $(cpp11_can_prefer_unsupported_SOURCES) \
+ $(cpp11_can_query_free_SOURCES) \
+ $(cpp11_can_query_member_SOURCES) \
+ $(cpp11_can_query_not_applicable_free_SOURCES) \
+ $(cpp11_can_query_not_applicable_member_SOURCES) \
+ $(cpp11_can_query_not_applicable_static_SOURCES) \
+ $(cpp11_can_query_not_applicable_unsupported_SOURCES) \
+ $(cpp11_can_query_static_SOURCES) \
+ $(cpp11_can_query_unsupported_SOURCES) \
+ $(cpp11_can_require_concept_free_SOURCES) \
+ $(cpp11_can_require_concept_member_SOURCES) \
+ $(cpp11_can_require_concept_not_applicable_free_SOURCES) \
+ $(cpp11_can_require_concept_not_applicable_member_SOURCES) \
+ $(cpp11_can_require_concept_not_applicable_static_SOURCES) \
+ $(cpp11_can_require_concept_not_applicable_unsupported_SOURCES) \
+ $(cpp11_can_require_concept_static_SOURCES) \
+ $(cpp11_can_require_concept_unsupported_SOURCES) \
+ $(cpp11_can_require_free_SOURCES) \
+ $(cpp11_can_require_member_SOURCES) \
+ $(cpp11_can_require_not_applicable_free_SOURCES) \
+ $(cpp11_can_require_not_applicable_member_SOURCES) \
+ $(cpp11_can_require_not_applicable_static_SOURCES) \
+ $(cpp11_can_require_not_applicable_unsupported_SOURCES) \
+ $(cpp11_can_require_static_SOURCES) \
+ $(cpp11_can_require_unsupported_SOURCES) \
+ $(cpp11_prefer_free_prefer_SOURCES) \
+ $(cpp11_prefer_free_require_SOURCES) \
+ $(cpp11_prefer_member_prefer_SOURCES) \
+ $(cpp11_prefer_member_require_SOURCES) \
+ $(cpp11_prefer_static_SOURCES) \
+ $(cpp11_prefer_unsupported_SOURCES) \
+ $(cpp11_query_free_SOURCES) $(cpp11_query_member_SOURCES) \
+ $(cpp11_query_static_SOURCES) \
+ $(cpp11_require_concept_free_SOURCES) \
+ $(cpp11_require_concept_member_SOURCES) \
+ $(cpp11_require_concept_static_SOURCES) \
+ $(cpp11_require_free_SOURCES) $(cpp11_require_member_SOURCES) \
+ $(cpp11_require_static_SOURCES) \
+ $(cpp14_can_prefer_free_prefer_SOURCES) \
+ $(cpp14_can_prefer_free_require_SOURCES) \
+ $(cpp14_can_prefer_member_prefer_SOURCES) \
+ $(cpp14_can_prefer_member_require_SOURCES) \
+ $(cpp14_can_prefer_not_applicable_free_prefer_SOURCES) \
+ $(cpp14_can_prefer_not_applicable_free_require_SOURCES) \
+ $(cpp14_can_prefer_not_applicable_member_prefer_SOURCES) \
+ $(cpp14_can_prefer_not_applicable_member_require_SOURCES) \
+ $(cpp14_can_prefer_not_applicable_static_SOURCES) \
+ $(cpp14_can_prefer_not_applicable_unsupported_SOURCES) \
+ $(cpp14_can_prefer_not_preferable_free_prefer_SOURCES) \
+ $(cpp14_can_prefer_not_preferable_free_require_SOURCES) \
+ $(cpp14_can_prefer_not_preferable_member_prefer_SOURCES) \
+ $(cpp14_can_prefer_not_preferable_member_require_SOURCES) \
+ $(cpp14_can_prefer_not_preferable_static_SOURCES) \
+ $(cpp14_can_prefer_not_preferable_unsupported_SOURCES) \
+ $(cpp14_can_prefer_static_SOURCES) \
+ $(cpp14_can_prefer_unsupported_SOURCES) \
+ $(cpp14_can_query_free_SOURCES) \
+ $(cpp14_can_query_member_SOURCES) \
+ $(cpp14_can_query_not_applicable_free_SOURCES) \
+ $(cpp14_can_query_not_applicable_member_SOURCES) \
+ $(cpp14_can_query_not_applicable_static_SOURCES) \
+ $(cpp14_can_query_not_applicable_unsupported_SOURCES) \
+ $(cpp14_can_query_static_SOURCES) \
+ $(cpp14_can_query_unsupported_SOURCES) \
+ $(cpp14_can_require_concept_free_SOURCES) \
+ $(cpp14_can_require_concept_member_SOURCES) \
+ $(cpp14_can_require_concept_not_applicable_free_SOURCES) \
+ $(cpp14_can_require_concept_not_applicable_member_SOURCES) \
+ $(cpp14_can_require_concept_not_applicable_static_SOURCES) \
+ $(cpp14_can_require_concept_not_applicable_unsupported_SOURCES) \
+ $(cpp14_can_require_concept_static_SOURCES) \
+ $(cpp14_can_require_concept_unsupported_SOURCES) \
+ $(cpp14_can_require_free_SOURCES) \
+ $(cpp14_can_require_member_SOURCES) \
+ $(cpp14_can_require_not_applicable_free_SOURCES) \
+ $(cpp14_can_require_not_applicable_member_SOURCES) \
+ $(cpp14_can_require_not_applicable_static_SOURCES) \
+ $(cpp14_can_require_not_applicable_unsupported_SOURCES) \
+ $(cpp14_can_require_static_SOURCES) \
+ $(cpp14_can_require_unsupported_SOURCES) \
+ $(cpp14_prefer_free_prefer_SOURCES) \
+ $(cpp14_prefer_free_require_SOURCES) \
+ $(cpp14_prefer_member_prefer_SOURCES) \
+ $(cpp14_prefer_member_require_SOURCES) \
+ $(cpp14_prefer_static_SOURCES) \
+ $(cpp14_prefer_unsupported_SOURCES) \
+ $(cpp14_query_free_SOURCES) $(cpp14_query_member_SOURCES) \
+ $(cpp14_query_static_SOURCES) \
+ $(cpp14_require_concept_free_SOURCES) \
+ $(cpp14_require_concept_member_SOURCES) \
+ $(cpp14_require_concept_static_SOURCES) \
+ $(cpp14_require_free_SOURCES) $(cpp14_require_member_SOURCES) \
+ $(cpp14_require_static_SOURCES)
+DIST_SOURCES = $(cpp03_can_prefer_free_prefer_SOURCES) \
+ $(cpp03_can_prefer_free_require_SOURCES) \
+ $(cpp03_can_prefer_member_prefer_SOURCES) \
+ $(cpp03_can_prefer_member_require_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_free_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_free_require_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_member_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_member_require_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_static_SOURCES) \
+ $(cpp03_can_prefer_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_free_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_free_require_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_member_prefer_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_member_require_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_static_SOURCES) \
+ $(cpp03_can_prefer_not_preferable_unsupported_SOURCES) \
+ $(cpp03_can_prefer_static_SOURCES) \
+ $(cpp03_can_prefer_unsupported_SOURCES) \
+ $(cpp03_can_query_free_SOURCES) \
+ $(cpp03_can_query_member_SOURCES) \
+ $(cpp03_can_query_not_applicable_free_SOURCES) \
+ $(cpp03_can_query_not_applicable_member_SOURCES) \
+ $(cpp03_can_query_not_applicable_static_SOURCES) \
+ $(cpp03_can_query_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_query_static_SOURCES) \
+ $(cpp03_can_query_unsupported_SOURCES) \
+ $(cpp03_can_require_concept_free_SOURCES) \
+ $(cpp03_can_require_concept_member_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_free_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_member_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_static_SOURCES) \
+ $(cpp03_can_require_concept_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_require_concept_static_SOURCES) \
+ $(cpp03_can_require_concept_unsupported_SOURCES) \
+ $(cpp03_can_require_free_SOURCES) \
+ $(cpp03_can_require_member_SOURCES) \
+ $(cpp03_can_require_not_applicable_free_SOURCES) \
+ $(cpp03_can_require_not_applicable_member_SOURCES) \
+ $(cpp03_can_require_not_applicable_static_SOURCES) \
+ $(cpp03_can_require_not_applicable_unsupported_SOURCES) \
+ $(cpp03_can_require_static_SOURCES) \
+ $(cpp03_can_require_unsupported_SOURCES) \
+ $(cpp03_prefer_free_prefer_SOURCES) \
+ $(cpp03_prefer_free_require_SOURCES) \
+ $(cpp03_prefer_member_prefer_SOURCES) \
+ $(cpp03_prefer_member_require_SOURCES) \
+ $(cpp03_prefer_static_SOURCES) \
+ $(cpp03_prefer_unsupported_SOURCES) \
+ $(cpp03_query_free_SOURCES) $(cpp03_query_member_SOURCES) \
+ $(cpp03_query_static_SOURCES) \
+ $(cpp03_require_concept_free_SOURCES) \
+ $(cpp03_require_concept_member_SOURCES) \
+ $(cpp03_require_concept_static_SOURCES) \
+ $(cpp03_require_free_SOURCES) $(cpp03_require_member_SOURCES) \
+ $(cpp03_require_static_SOURCES) \
+ $(am__cpp11_can_prefer_free_prefer_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_free_require_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_member_prefer_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_member_require_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_applicable_free_prefer_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_applicable_free_require_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_applicable_member_prefer_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_applicable_member_require_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_preferable_free_prefer_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_preferable_free_require_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_preferable_member_prefer_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_preferable_member_require_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_preferable_static_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_not_preferable_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_static_SOURCES_DIST) \
+ $(am__cpp11_can_prefer_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_query_free_SOURCES_DIST) \
+ $(am__cpp11_can_query_member_SOURCES_DIST) \
+ $(am__cpp11_can_query_not_applicable_free_SOURCES_DIST) \
+ $(am__cpp11_can_query_not_applicable_member_SOURCES_DIST) \
+ $(am__cpp11_can_query_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp11_can_query_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_query_static_SOURCES_DIST) \
+ $(am__cpp11_can_query_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_free_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_member_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_not_applicable_free_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_not_applicable_member_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_static_SOURCES_DIST) \
+ $(am__cpp11_can_require_concept_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_require_free_SOURCES_DIST) \
+ $(am__cpp11_can_require_member_SOURCES_DIST) \
+ $(am__cpp11_can_require_not_applicable_free_SOURCES_DIST) \
+ $(am__cpp11_can_require_not_applicable_member_SOURCES_DIST) \
+ $(am__cpp11_can_require_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp11_can_require_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp11_can_require_static_SOURCES_DIST) \
+ $(am__cpp11_can_require_unsupported_SOURCES_DIST) \
+ $(am__cpp11_prefer_free_prefer_SOURCES_DIST) \
+ $(am__cpp11_prefer_free_require_SOURCES_DIST) \
+ $(am__cpp11_prefer_member_prefer_SOURCES_DIST) \
+ $(am__cpp11_prefer_member_require_SOURCES_DIST) \
+ $(am__cpp11_prefer_static_SOURCES_DIST) \
+ $(am__cpp11_prefer_unsupported_SOURCES_DIST) \
+ $(am__cpp11_query_free_SOURCES_DIST) \
+ $(am__cpp11_query_member_SOURCES_DIST) \
+ $(am__cpp11_query_static_SOURCES_DIST) \
+ $(am__cpp11_require_concept_free_SOURCES_DIST) \
+ $(am__cpp11_require_concept_member_SOURCES_DIST) \
+ $(am__cpp11_require_concept_static_SOURCES_DIST) \
+ $(am__cpp11_require_free_SOURCES_DIST) \
+ $(am__cpp11_require_member_SOURCES_DIST) \
+ $(am__cpp11_require_static_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_free_prefer_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_free_require_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_member_prefer_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_member_require_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_applicable_free_prefer_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_applicable_free_require_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_applicable_member_prefer_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_applicable_member_require_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_preferable_free_prefer_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_preferable_free_require_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_preferable_member_prefer_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_preferable_member_require_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_preferable_static_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_not_preferable_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_static_SOURCES_DIST) \
+ $(am__cpp14_can_prefer_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_query_free_SOURCES_DIST) \
+ $(am__cpp14_can_query_member_SOURCES_DIST) \
+ $(am__cpp14_can_query_not_applicable_free_SOURCES_DIST) \
+ $(am__cpp14_can_query_not_applicable_member_SOURCES_DIST) \
+ $(am__cpp14_can_query_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp14_can_query_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_query_static_SOURCES_DIST) \
+ $(am__cpp14_can_query_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_free_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_member_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_not_applicable_free_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_not_applicable_member_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_static_SOURCES_DIST) \
+ $(am__cpp14_can_require_concept_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_require_free_SOURCES_DIST) \
+ $(am__cpp14_can_require_member_SOURCES_DIST) \
+ $(am__cpp14_can_require_not_applicable_free_SOURCES_DIST) \
+ $(am__cpp14_can_require_not_applicable_member_SOURCES_DIST) \
+ $(am__cpp14_can_require_not_applicable_static_SOURCES_DIST) \
+ $(am__cpp14_can_require_not_applicable_unsupported_SOURCES_DIST) \
+ $(am__cpp14_can_require_static_SOURCES_DIST) \
+ $(am__cpp14_can_require_unsupported_SOURCES_DIST) \
+ $(am__cpp14_prefer_free_prefer_SOURCES_DIST) \
+ $(am__cpp14_prefer_free_require_SOURCES_DIST) \
+ $(am__cpp14_prefer_member_prefer_SOURCES_DIST) \
+ $(am__cpp14_prefer_member_require_SOURCES_DIST) \
+ $(am__cpp14_prefer_static_SOURCES_DIST) \
+ $(am__cpp14_prefer_unsupported_SOURCES_DIST) \
+ $(am__cpp14_query_free_SOURCES_DIST) \
+ $(am__cpp14_query_member_SOURCES_DIST) \
+ $(am__cpp14_query_static_SOURCES_DIST) \
+ $(am__cpp14_require_concept_free_SOURCES_DIST) \
+ $(am__cpp14_require_concept_member_SOURCES_DIST) \
+ $(am__cpp14_require_concept_static_SOURCES_DIST) \
+ $(am__cpp14_require_free_SOURCES_DIST) \
+ $(am__cpp14_require_member_SOURCES_DIST) \
+ $(am__cpp14_require_static_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+cpp03_query_free_SOURCES = cpp03/query_free.cpp
+cpp03_query_member_SOURCES = cpp03/query_member.cpp
+cpp03_query_static_SOURCES = cpp03/query_static.cpp
+cpp03_can_query_free_SOURCES = cpp03/can_query_free.cpp
+cpp03_can_query_member_SOURCES = cpp03/can_query_member.cpp
+cpp03_can_query_static_SOURCES = cpp03/can_query_static.cpp
+cpp03_can_query_unsupported_SOURCES = cpp03/can_query_unsupported.cpp
+cpp03_can_query_not_applicable_free_SOURCES = cpp03/can_query_not_applicable_free.cpp
+cpp03_can_query_not_applicable_member_SOURCES = cpp03/can_query_not_applicable_member.cpp
+cpp03_can_query_not_applicable_static_SOURCES = cpp03/can_query_not_applicable_static.cpp
+cpp03_can_query_not_applicable_unsupported_SOURCES = cpp03/can_query_not_applicable_unsupported.cpp
+cpp03_require_concept_free_SOURCES = cpp03/require_concept_free.cpp
+cpp03_require_concept_member_SOURCES = cpp03/require_concept_member.cpp
+cpp03_require_concept_static_SOURCES = cpp03/require_concept_static.cpp
+cpp03_can_require_concept_free_SOURCES = cpp03/can_require_concept_free.cpp
+cpp03_can_require_concept_member_SOURCES = cpp03/can_require_concept_member.cpp
+cpp03_can_require_concept_static_SOURCES = cpp03/can_require_concept_static.cpp
+cpp03_can_require_concept_unsupported_SOURCES = cpp03/can_require_concept_unsupported.cpp
+cpp03_can_require_concept_not_applicable_free_SOURCES = cpp03/can_require_concept_not_applicable_free.cpp
+cpp03_can_require_concept_not_applicable_member_SOURCES = cpp03/can_require_concept_not_applicable_member.cpp
+cpp03_can_require_concept_not_applicable_static_SOURCES = cpp03/can_require_concept_not_applicable_static.cpp
+cpp03_can_require_concept_not_applicable_unsupported_SOURCES = cpp03/can_require_concept_not_applicable_unsupported.cpp
+cpp03_require_free_SOURCES = cpp03/require_free.cpp
+cpp03_require_member_SOURCES = cpp03/require_member.cpp
+cpp03_require_static_SOURCES = cpp03/require_static.cpp
+cpp03_can_require_free_SOURCES = cpp03/can_require_free.cpp
+cpp03_can_require_member_SOURCES = cpp03/can_require_member.cpp
+cpp03_can_require_static_SOURCES = cpp03/can_require_static.cpp
+cpp03_can_require_unsupported_SOURCES = cpp03/can_require_unsupported.cpp
+cpp03_can_require_not_applicable_free_SOURCES = cpp03/can_require_not_applicable_free.cpp
+cpp03_can_require_not_applicable_member_SOURCES = cpp03/can_require_not_applicable_member.cpp
+cpp03_can_require_not_applicable_static_SOURCES = cpp03/can_require_not_applicable_static.cpp
+cpp03_can_require_not_applicable_unsupported_SOURCES = cpp03/can_require_not_applicable_unsupported.cpp
+cpp03_prefer_free_prefer_SOURCES = cpp03/prefer_free_prefer.cpp
+cpp03_prefer_free_require_SOURCES = cpp03/prefer_free_require.cpp
+cpp03_prefer_member_prefer_SOURCES = cpp03/prefer_member_prefer.cpp
+cpp03_prefer_member_require_SOURCES = cpp03/prefer_member_require.cpp
+cpp03_prefer_static_SOURCES = cpp03/prefer_static.cpp
+cpp03_prefer_unsupported_SOURCES = cpp03/prefer_unsupported.cpp
+cpp03_can_prefer_free_prefer_SOURCES = cpp03/can_prefer_free_prefer.cpp
+cpp03_can_prefer_free_require_SOURCES = cpp03/can_prefer_free_require.cpp
+cpp03_can_prefer_member_prefer_SOURCES = cpp03/can_prefer_member_prefer.cpp
+cpp03_can_prefer_member_require_SOURCES = cpp03/can_prefer_member_require.cpp
+cpp03_can_prefer_static_SOURCES = cpp03/can_prefer_static.cpp
+cpp03_can_prefer_unsupported_SOURCES = cpp03/can_prefer_unsupported.cpp
+cpp03_can_prefer_not_applicable_free_prefer_SOURCES = cpp03/can_prefer_not_applicable_free_prefer.cpp
+cpp03_can_prefer_not_applicable_free_require_SOURCES = cpp03/can_prefer_not_applicable_free_require.cpp
+cpp03_can_prefer_not_applicable_member_prefer_SOURCES = cpp03/can_prefer_not_applicable_member_prefer.cpp
+cpp03_can_prefer_not_applicable_member_require_SOURCES = cpp03/can_prefer_not_applicable_member_require.cpp
+cpp03_can_prefer_not_applicable_static_SOURCES = cpp03/can_prefer_not_applicable_static.cpp
+cpp03_can_prefer_not_applicable_unsupported_SOURCES = cpp03/can_prefer_not_applicable_unsupported.cpp
+cpp03_can_prefer_not_preferable_free_prefer_SOURCES = cpp03/can_prefer_not_preferable_free_prefer.cpp
+cpp03_can_prefer_not_preferable_free_require_SOURCES = cpp03/can_prefer_not_preferable_free_require.cpp
+cpp03_can_prefer_not_preferable_member_prefer_SOURCES = cpp03/can_prefer_not_preferable_member_prefer.cpp
+cpp03_can_prefer_not_preferable_member_require_SOURCES = cpp03/can_prefer_not_preferable_member_require.cpp
+cpp03_can_prefer_not_preferable_static_SOURCES = cpp03/can_prefer_not_preferable_static.cpp
+cpp03_can_prefer_not_preferable_unsupported_SOURCES = cpp03/can_prefer_not_preferable_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_query_free_SOURCES = cpp11/query_free.cpp
+@HAVE_CXX11_TRUE@cpp11_query_member_SOURCES = cpp11/query_member.cpp
+@HAVE_CXX11_TRUE@cpp11_query_static_SOURCES = cpp11/query_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_free_SOURCES = cpp11/can_query_free.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_member_SOURCES = cpp11/can_query_member.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_static_SOURCES = cpp11/can_query_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_unsupported_SOURCES = cpp11/can_query_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_not_applicable_free_SOURCES = cpp11/can_query_not_applicable_free.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_not_applicable_member_SOURCES = cpp11/can_query_not_applicable_member.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_not_applicable_static_SOURCES = cpp11/can_query_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_query_not_applicable_unsupported_SOURCES = cpp11/can_query_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_require_concept_free_SOURCES = cpp11/require_concept_free.cpp
+@HAVE_CXX11_TRUE@cpp11_require_concept_member_SOURCES = cpp11/require_concept_member.cpp
+@HAVE_CXX11_TRUE@cpp11_require_concept_static_SOURCES = cpp11/require_concept_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_free_SOURCES = cpp11/can_require_concept_free.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_member_SOURCES = cpp11/can_require_concept_member.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_static_SOURCES = cpp11/can_require_concept_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_unsupported_SOURCES = cpp11/can_require_concept_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_not_applicable_free_SOURCES = cpp11/can_require_concept_not_applicable_free.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_not_applicable_member_SOURCES = cpp11/can_require_concept_not_applicable_member.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_not_applicable_static_SOURCES = cpp11/can_require_concept_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_concept_not_applicable_unsupported_SOURCES = cpp11/can_require_concept_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_require_free_SOURCES = cpp11/require_free.cpp
+@HAVE_CXX11_TRUE@cpp11_require_member_SOURCES = cpp11/require_member.cpp
+@HAVE_CXX11_TRUE@cpp11_require_static_SOURCES = cpp11/require_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_free_SOURCES = cpp11/can_require_free.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_member_SOURCES = cpp11/can_require_member.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_static_SOURCES = cpp11/can_require_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_unsupported_SOURCES = cpp11/can_require_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_not_applicable_free_SOURCES = cpp11/can_require_not_applicable_free.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_not_applicable_member_SOURCES = cpp11/can_require_not_applicable_member.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_not_applicable_static_SOURCES = cpp11/can_require_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_require_not_applicable_unsupported_SOURCES = cpp11/can_require_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_prefer_free_prefer_SOURCES = cpp11/prefer_free_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_prefer_free_require_SOURCES = cpp11/prefer_free_require.cpp
+@HAVE_CXX11_TRUE@cpp11_prefer_member_prefer_SOURCES = cpp11/prefer_member_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_prefer_member_require_SOURCES = cpp11/prefer_member_require.cpp
+@HAVE_CXX11_TRUE@cpp11_prefer_static_SOURCES = cpp11/prefer_static.cpp
+@HAVE_CXX11_TRUE@cpp11_prefer_unsupported_SOURCES = cpp11/prefer_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_free_prefer_SOURCES = cpp11/can_prefer_free_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_free_require_SOURCES = cpp11/can_prefer_free_require.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_member_prefer_SOURCES = cpp11/can_prefer_member_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_member_require_SOURCES = cpp11/can_prefer_member_require.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_static_SOURCES = cpp11/can_prefer_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_unsupported_SOURCES = cpp11/can_prefer_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_applicable_free_prefer_SOURCES = cpp11/can_prefer_not_applicable_free_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_applicable_free_require_SOURCES = cpp11/can_prefer_not_applicable_free_require.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_applicable_member_prefer_SOURCES = cpp11/can_prefer_not_applicable_member_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_applicable_member_require_SOURCES = cpp11/can_prefer_not_applicable_member_require.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_applicable_static_SOURCES = cpp11/can_prefer_not_applicable_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_applicable_unsupported_SOURCES = cpp11/can_prefer_not_applicable_unsupported.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_preferable_free_prefer_SOURCES = cpp11/can_prefer_not_preferable_free_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_preferable_free_require_SOURCES = cpp11/can_prefer_not_preferable_free_require.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_preferable_member_prefer_SOURCES = cpp11/can_prefer_not_preferable_member_prefer.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_preferable_member_require_SOURCES = cpp11/can_prefer_not_preferable_member_require.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_preferable_static_SOURCES = cpp11/can_prefer_not_preferable_static.cpp
+@HAVE_CXX11_TRUE@cpp11_can_prefer_not_preferable_unsupported_SOURCES = cpp11/can_prefer_not_preferable_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_query_free_SOURCES = cpp14/query_free.cpp
+@HAVE_CXX14_TRUE@cpp14_query_member_SOURCES = cpp14/query_member.cpp
+@HAVE_CXX14_TRUE@cpp14_query_static_SOURCES = cpp14/query_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_free_SOURCES = cpp14/can_query_free.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_member_SOURCES = cpp14/can_query_member.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_static_SOURCES = cpp14/can_query_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_unsupported_SOURCES = cpp14/can_query_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_not_applicable_free_SOURCES = cpp14/can_query_not_applicable_free.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_not_applicable_member_SOURCES = cpp14/can_query_not_applicable_member.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_not_applicable_static_SOURCES = cpp14/can_query_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_query_not_applicable_unsupported_SOURCES = cpp14/can_query_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_require_concept_free_SOURCES = cpp14/require_concept_free.cpp
+@HAVE_CXX14_TRUE@cpp14_require_concept_member_SOURCES = cpp14/require_concept_member.cpp
+@HAVE_CXX14_TRUE@cpp14_require_concept_static_SOURCES = cpp14/require_concept_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_free_SOURCES = cpp14/can_require_concept_free.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_member_SOURCES = cpp14/can_require_concept_member.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_static_SOURCES = cpp14/can_require_concept_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_unsupported_SOURCES = cpp14/can_require_concept_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_not_applicable_free_SOURCES = cpp14/can_require_concept_not_applicable_free.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_not_applicable_member_SOURCES = cpp14/can_require_concept_not_applicable_member.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_not_applicable_static_SOURCES = cpp14/can_require_concept_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_concept_not_applicable_unsupported_SOURCES = cpp14/can_require_concept_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_require_free_SOURCES = cpp14/require_free.cpp
+@HAVE_CXX14_TRUE@cpp14_require_member_SOURCES = cpp14/require_member.cpp
+@HAVE_CXX14_TRUE@cpp14_require_static_SOURCES = cpp14/require_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_free_SOURCES = cpp14/can_require_free.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_member_SOURCES = cpp14/can_require_member.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_static_SOURCES = cpp14/can_require_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_unsupported_SOURCES = cpp14/can_require_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_not_applicable_free_SOURCES = cpp14/can_require_not_applicable_free.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_not_applicable_member_SOURCES = cpp14/can_require_not_applicable_member.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_not_applicable_static_SOURCES = cpp14/can_require_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_require_not_applicable_unsupported_SOURCES = cpp14/can_require_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_prefer_free_prefer_SOURCES = cpp14/prefer_free_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_prefer_free_require_SOURCES = cpp14/prefer_free_require.cpp
+@HAVE_CXX14_TRUE@cpp14_prefer_member_prefer_SOURCES = cpp14/prefer_member_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_prefer_member_require_SOURCES = cpp14/prefer_member_require.cpp
+@HAVE_CXX14_TRUE@cpp14_prefer_static_SOURCES = cpp14/prefer_static.cpp
+@HAVE_CXX14_TRUE@cpp14_prefer_unsupported_SOURCES = cpp14/prefer_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_free_prefer_SOURCES = cpp14/can_prefer_free_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_free_require_SOURCES = cpp14/can_prefer_free_require.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_member_prefer_SOURCES = cpp14/can_prefer_member_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_member_require_SOURCES = cpp14/can_prefer_member_require.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_static_SOURCES = cpp14/can_prefer_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_unsupported_SOURCES = cpp14/can_prefer_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_applicable_free_prefer_SOURCES = cpp14/can_prefer_not_applicable_free_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_applicable_free_require_SOURCES = cpp14/can_prefer_not_applicable_free_require.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_applicable_member_prefer_SOURCES = cpp14/can_prefer_not_applicable_member_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_applicable_member_require_SOURCES = cpp14/can_prefer_not_applicable_member_require.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_applicable_static_SOURCES = cpp14/can_prefer_not_applicable_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_applicable_unsupported_SOURCES = cpp14/can_prefer_not_applicable_unsupported.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_preferable_free_prefer_SOURCES = cpp14/can_prefer_not_preferable_free_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_preferable_free_require_SOURCES = cpp14/can_prefer_not_preferable_free_require.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_preferable_member_prefer_SOURCES = cpp14/can_prefer_not_preferable_member_prefer.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_preferable_member_require_SOURCES = cpp14/can_prefer_not_preferable_member_require.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_preferable_static_SOURCES = cpp14/can_prefer_not_preferable_static.cpp
+@HAVE_CXX14_TRUE@cpp14_can_prefer_not_preferable_unsupported_SOURCES = cpp14/can_prefer_not_preferable_unsupported.cpp
+TESTS = $(check_PROGRAMS)
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/properties/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/tests/properties/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+cpp03/$(am__dirstamp):
+ @$(MKDIR_P) cpp03
+ @: > cpp03/$(am__dirstamp)
+cpp03/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) cpp03/$(DEPDIR)
+ @: > cpp03/$(DEPDIR)/$(am__dirstamp)
+cpp03/can_prefer_free_prefer.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_free_prefer$(EXEEXT): $(cpp03_can_prefer_free_prefer_OBJECTS) $(cpp03_can_prefer_free_prefer_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_free_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_free_prefer_OBJECTS) $(cpp03_can_prefer_free_prefer_LDADD) $(LIBS)
+cpp03/can_prefer_free_require.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_free_require$(EXEEXT): $(cpp03_can_prefer_free_require_OBJECTS) $(cpp03_can_prefer_free_require_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_free_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_free_require_OBJECTS) $(cpp03_can_prefer_free_require_LDADD) $(LIBS)
+cpp03/can_prefer_member_prefer.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_member_prefer$(EXEEXT): $(cpp03_can_prefer_member_prefer_OBJECTS) $(cpp03_can_prefer_member_prefer_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_member_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_member_prefer_OBJECTS) $(cpp03_can_prefer_member_prefer_LDADD) $(LIBS)
+cpp03/can_prefer_member_require.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_member_require$(EXEEXT): $(cpp03_can_prefer_member_require_OBJECTS) $(cpp03_can_prefer_member_require_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_member_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_member_require_OBJECTS) $(cpp03_can_prefer_member_require_LDADD) $(LIBS)
+cpp03/can_prefer_not_applicable_free_prefer.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_applicable_free_prefer$(EXEEXT): $(cpp03_can_prefer_not_applicable_free_prefer_OBJECTS) $(cpp03_can_prefer_not_applicable_free_prefer_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_applicable_free_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_applicable_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_applicable_free_prefer_OBJECTS) $(cpp03_can_prefer_not_applicable_free_prefer_LDADD) $(LIBS)
+cpp03/can_prefer_not_applicable_free_require.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_applicable_free_require$(EXEEXT): $(cpp03_can_prefer_not_applicable_free_require_OBJECTS) $(cpp03_can_prefer_not_applicable_free_require_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_applicable_free_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_applicable_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_applicable_free_require_OBJECTS) $(cpp03_can_prefer_not_applicable_free_require_LDADD) $(LIBS)
+cpp03/can_prefer_not_applicable_member_prefer.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_applicable_member_prefer$(EXEEXT): $(cpp03_can_prefer_not_applicable_member_prefer_OBJECTS) $(cpp03_can_prefer_not_applicable_member_prefer_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_applicable_member_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_applicable_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_applicable_member_prefer_OBJECTS) $(cpp03_can_prefer_not_applicable_member_prefer_LDADD) $(LIBS)
+cpp03/can_prefer_not_applicable_member_require.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_applicable_member_require$(EXEEXT): $(cpp03_can_prefer_not_applicable_member_require_OBJECTS) $(cpp03_can_prefer_not_applicable_member_require_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_applicable_member_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_applicable_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_applicable_member_require_OBJECTS) $(cpp03_can_prefer_not_applicable_member_require_LDADD) $(LIBS)
+cpp03/can_prefer_not_applicable_static.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_applicable_static$(EXEEXT): $(cpp03_can_prefer_not_applicable_static_OBJECTS) $(cpp03_can_prefer_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_applicable_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_applicable_static_OBJECTS) $(cpp03_can_prefer_not_applicable_static_LDADD) $(LIBS)
+cpp03/can_prefer_not_applicable_unsupported.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_applicable_unsupported$(EXEEXT): $(cpp03_can_prefer_not_applicable_unsupported_OBJECTS) $(cpp03_can_prefer_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_applicable_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_applicable_unsupported_OBJECTS) $(cpp03_can_prefer_not_applicable_unsupported_LDADD) $(LIBS)
+cpp03/can_prefer_not_preferable_free_prefer.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_preferable_free_prefer$(EXEEXT): $(cpp03_can_prefer_not_preferable_free_prefer_OBJECTS) $(cpp03_can_prefer_not_preferable_free_prefer_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_preferable_free_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_preferable_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_preferable_free_prefer_OBJECTS) $(cpp03_can_prefer_not_preferable_free_prefer_LDADD) $(LIBS)
+cpp03/can_prefer_not_preferable_free_require.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_preferable_free_require$(EXEEXT): $(cpp03_can_prefer_not_preferable_free_require_OBJECTS) $(cpp03_can_prefer_not_preferable_free_require_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_preferable_free_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_preferable_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_preferable_free_require_OBJECTS) $(cpp03_can_prefer_not_preferable_free_require_LDADD) $(LIBS)
+cpp03/can_prefer_not_preferable_member_prefer.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_preferable_member_prefer$(EXEEXT): $(cpp03_can_prefer_not_preferable_member_prefer_OBJECTS) $(cpp03_can_prefer_not_preferable_member_prefer_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_preferable_member_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_preferable_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_preferable_member_prefer_OBJECTS) $(cpp03_can_prefer_not_preferable_member_prefer_LDADD) $(LIBS)
+cpp03/can_prefer_not_preferable_member_require.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_preferable_member_require$(EXEEXT): $(cpp03_can_prefer_not_preferable_member_require_OBJECTS) $(cpp03_can_prefer_not_preferable_member_require_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_preferable_member_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_preferable_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_preferable_member_require_OBJECTS) $(cpp03_can_prefer_not_preferable_member_require_LDADD) $(LIBS)
+cpp03/can_prefer_not_preferable_static.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_preferable_static$(EXEEXT): $(cpp03_can_prefer_not_preferable_static_OBJECTS) $(cpp03_can_prefer_not_preferable_static_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_preferable_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_preferable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_preferable_static_OBJECTS) $(cpp03_can_prefer_not_preferable_static_LDADD) $(LIBS)
+cpp03/can_prefer_not_preferable_unsupported.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_not_preferable_unsupported$(EXEEXT): $(cpp03_can_prefer_not_preferable_unsupported_OBJECTS) $(cpp03_can_prefer_not_preferable_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_not_preferable_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_not_preferable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_not_preferable_unsupported_OBJECTS) $(cpp03_can_prefer_not_preferable_unsupported_LDADD) $(LIBS)
+cpp03/can_prefer_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_static$(EXEEXT): $(cpp03_can_prefer_static_OBJECTS) $(cpp03_can_prefer_static_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_static_OBJECTS) $(cpp03_can_prefer_static_LDADD) $(LIBS)
+cpp03/can_prefer_unsupported.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_prefer_unsupported$(EXEEXT): $(cpp03_can_prefer_unsupported_OBJECTS) $(cpp03_can_prefer_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_prefer_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_prefer_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_prefer_unsupported_OBJECTS) $(cpp03_can_prefer_unsupported_LDADD) $(LIBS)
+cpp03/can_query_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_free$(EXEEXT): $(cpp03_can_query_free_OBJECTS) $(cpp03_can_query_free_DEPENDENCIES) $(EXTRA_cpp03_can_query_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_free_OBJECTS) $(cpp03_can_query_free_LDADD) $(LIBS)
+cpp03/can_query_member.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_member$(EXEEXT): $(cpp03_can_query_member_OBJECTS) $(cpp03_can_query_member_DEPENDENCIES) $(EXTRA_cpp03_can_query_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_member_OBJECTS) $(cpp03_can_query_member_LDADD) $(LIBS)
+cpp03/can_query_not_applicable_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_not_applicable_free$(EXEEXT): $(cpp03_can_query_not_applicable_free_OBJECTS) $(cpp03_can_query_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp03_can_query_not_applicable_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_not_applicable_free_OBJECTS) $(cpp03_can_query_not_applicable_free_LDADD) $(LIBS)
+cpp03/can_query_not_applicable_member.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_not_applicable_member$(EXEEXT): $(cpp03_can_query_not_applicable_member_OBJECTS) $(cpp03_can_query_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp03_can_query_not_applicable_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_not_applicable_member_OBJECTS) $(cpp03_can_query_not_applicable_member_LDADD) $(LIBS)
+cpp03/can_query_not_applicable_static.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_not_applicable_static$(EXEEXT): $(cpp03_can_query_not_applicable_static_OBJECTS) $(cpp03_can_query_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp03_can_query_not_applicable_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_not_applicable_static_OBJECTS) $(cpp03_can_query_not_applicable_static_LDADD) $(LIBS)
+cpp03/can_query_not_applicable_unsupported.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_not_applicable_unsupported$(EXEEXT): $(cpp03_can_query_not_applicable_unsupported_OBJECTS) $(cpp03_can_query_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_query_not_applicable_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_not_applicable_unsupported_OBJECTS) $(cpp03_can_query_not_applicable_unsupported_LDADD) $(LIBS)
+cpp03/can_query_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_static$(EXEEXT): $(cpp03_can_query_static_OBJECTS) $(cpp03_can_query_static_DEPENDENCIES) $(EXTRA_cpp03_can_query_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_static_OBJECTS) $(cpp03_can_query_static_LDADD) $(LIBS)
+cpp03/can_query_unsupported.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_query_unsupported$(EXEEXT): $(cpp03_can_query_unsupported_OBJECTS) $(cpp03_can_query_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_query_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_query_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_query_unsupported_OBJECTS) $(cpp03_can_query_unsupported_LDADD) $(LIBS)
+cpp03/can_require_concept_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_free$(EXEEXT): $(cpp03_can_require_concept_free_OBJECTS) $(cpp03_can_require_concept_free_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_free_OBJECTS) $(cpp03_can_require_concept_free_LDADD) $(LIBS)
+cpp03/can_require_concept_member.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_member$(EXEEXT): $(cpp03_can_require_concept_member_OBJECTS) $(cpp03_can_require_concept_member_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_member_OBJECTS) $(cpp03_can_require_concept_member_LDADD) $(LIBS)
+cpp03/can_require_concept_not_applicable_free.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_not_applicable_free$(EXEEXT): $(cpp03_can_require_concept_not_applicable_free_OBJECTS) $(cpp03_can_require_concept_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_not_applicable_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_not_applicable_free_OBJECTS) $(cpp03_can_require_concept_not_applicable_free_LDADD) $(LIBS)
+cpp03/can_require_concept_not_applicable_member.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_not_applicable_member$(EXEEXT): $(cpp03_can_require_concept_not_applicable_member_OBJECTS) $(cpp03_can_require_concept_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_not_applicable_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_not_applicable_member_OBJECTS) $(cpp03_can_require_concept_not_applicable_member_LDADD) $(LIBS)
+cpp03/can_require_concept_not_applicable_static.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_not_applicable_static$(EXEEXT): $(cpp03_can_require_concept_not_applicable_static_OBJECTS) $(cpp03_can_require_concept_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_not_applicable_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_not_applicable_static_OBJECTS) $(cpp03_can_require_concept_not_applicable_static_LDADD) $(LIBS)
+cpp03/can_require_concept_not_applicable_unsupported.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_not_applicable_unsupported$(EXEEXT): $(cpp03_can_require_concept_not_applicable_unsupported_OBJECTS) $(cpp03_can_require_concept_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_not_applicable_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_not_applicable_unsupported_OBJECTS) $(cpp03_can_require_concept_not_applicable_unsupported_LDADD) $(LIBS)
+cpp03/can_require_concept_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_static$(EXEEXT): $(cpp03_can_require_concept_static_OBJECTS) $(cpp03_can_require_concept_static_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_static_OBJECTS) $(cpp03_can_require_concept_static_LDADD) $(LIBS)
+cpp03/can_require_concept_unsupported.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_concept_unsupported$(EXEEXT): $(cpp03_can_require_concept_unsupported_OBJECTS) $(cpp03_can_require_concept_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_require_concept_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_concept_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_concept_unsupported_OBJECTS) $(cpp03_can_require_concept_unsupported_LDADD) $(LIBS)
+cpp03/can_require_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_free$(EXEEXT): $(cpp03_can_require_free_OBJECTS) $(cpp03_can_require_free_DEPENDENCIES) $(EXTRA_cpp03_can_require_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_free_OBJECTS) $(cpp03_can_require_free_LDADD) $(LIBS)
+cpp03/can_require_member.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_member$(EXEEXT): $(cpp03_can_require_member_OBJECTS) $(cpp03_can_require_member_DEPENDENCIES) $(EXTRA_cpp03_can_require_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_member_OBJECTS) $(cpp03_can_require_member_LDADD) $(LIBS)
+cpp03/can_require_not_applicable_free.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_not_applicable_free$(EXEEXT): $(cpp03_can_require_not_applicable_free_OBJECTS) $(cpp03_can_require_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp03_can_require_not_applicable_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_not_applicable_free_OBJECTS) $(cpp03_can_require_not_applicable_free_LDADD) $(LIBS)
+cpp03/can_require_not_applicable_member.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_not_applicable_member$(EXEEXT): $(cpp03_can_require_not_applicable_member_OBJECTS) $(cpp03_can_require_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp03_can_require_not_applicable_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_not_applicable_member_OBJECTS) $(cpp03_can_require_not_applicable_member_LDADD) $(LIBS)
+cpp03/can_require_not_applicable_static.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_not_applicable_static$(EXEEXT): $(cpp03_can_require_not_applicable_static_OBJECTS) $(cpp03_can_require_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp03_can_require_not_applicable_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_not_applicable_static_OBJECTS) $(cpp03_can_require_not_applicable_static_LDADD) $(LIBS)
+cpp03/can_require_not_applicable_unsupported.$(OBJEXT): \
+ cpp03/$(am__dirstamp) cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_not_applicable_unsupported$(EXEEXT): $(cpp03_can_require_not_applicable_unsupported_OBJECTS) $(cpp03_can_require_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_require_not_applicable_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_not_applicable_unsupported_OBJECTS) $(cpp03_can_require_not_applicable_unsupported_LDADD) $(LIBS)
+cpp03/can_require_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_static$(EXEEXT): $(cpp03_can_require_static_OBJECTS) $(cpp03_can_require_static_DEPENDENCIES) $(EXTRA_cpp03_can_require_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_static_OBJECTS) $(cpp03_can_require_static_LDADD) $(LIBS)
+cpp03/can_require_unsupported.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/can_require_unsupported$(EXEEXT): $(cpp03_can_require_unsupported_OBJECTS) $(cpp03_can_require_unsupported_DEPENDENCIES) $(EXTRA_cpp03_can_require_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/can_require_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_can_require_unsupported_OBJECTS) $(cpp03_can_require_unsupported_LDADD) $(LIBS)
+cpp03/prefer_free_prefer.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/prefer_free_prefer$(EXEEXT): $(cpp03_prefer_free_prefer_OBJECTS) $(cpp03_prefer_free_prefer_DEPENDENCIES) $(EXTRA_cpp03_prefer_free_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/prefer_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_prefer_free_prefer_OBJECTS) $(cpp03_prefer_free_prefer_LDADD) $(LIBS)
+cpp03/prefer_free_require.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/prefer_free_require$(EXEEXT): $(cpp03_prefer_free_require_OBJECTS) $(cpp03_prefer_free_require_DEPENDENCIES) $(EXTRA_cpp03_prefer_free_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/prefer_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_prefer_free_require_OBJECTS) $(cpp03_prefer_free_require_LDADD) $(LIBS)
+cpp03/prefer_member_prefer.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/prefer_member_prefer$(EXEEXT): $(cpp03_prefer_member_prefer_OBJECTS) $(cpp03_prefer_member_prefer_DEPENDENCIES) $(EXTRA_cpp03_prefer_member_prefer_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/prefer_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_prefer_member_prefer_OBJECTS) $(cpp03_prefer_member_prefer_LDADD) $(LIBS)
+cpp03/prefer_member_require.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/prefer_member_require$(EXEEXT): $(cpp03_prefer_member_require_OBJECTS) $(cpp03_prefer_member_require_DEPENDENCIES) $(EXTRA_cpp03_prefer_member_require_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/prefer_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_prefer_member_require_OBJECTS) $(cpp03_prefer_member_require_LDADD) $(LIBS)
+cpp03/prefer_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/prefer_static$(EXEEXT): $(cpp03_prefer_static_OBJECTS) $(cpp03_prefer_static_DEPENDENCIES) $(EXTRA_cpp03_prefer_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/prefer_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_prefer_static_OBJECTS) $(cpp03_prefer_static_LDADD) $(LIBS)
+cpp03/prefer_unsupported.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/prefer_unsupported$(EXEEXT): $(cpp03_prefer_unsupported_OBJECTS) $(cpp03_prefer_unsupported_DEPENDENCIES) $(EXTRA_cpp03_prefer_unsupported_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/prefer_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_prefer_unsupported_OBJECTS) $(cpp03_prefer_unsupported_LDADD) $(LIBS)
+cpp03/query_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/query_free$(EXEEXT): $(cpp03_query_free_OBJECTS) $(cpp03_query_free_DEPENDENCIES) $(EXTRA_cpp03_query_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/query_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_query_free_OBJECTS) $(cpp03_query_free_LDADD) $(LIBS)
+cpp03/query_member.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/query_member$(EXEEXT): $(cpp03_query_member_OBJECTS) $(cpp03_query_member_DEPENDENCIES) $(EXTRA_cpp03_query_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/query_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_query_member_OBJECTS) $(cpp03_query_member_LDADD) $(LIBS)
+cpp03/query_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/query_static$(EXEEXT): $(cpp03_query_static_OBJECTS) $(cpp03_query_static_DEPENDENCIES) $(EXTRA_cpp03_query_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/query_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_query_static_OBJECTS) $(cpp03_query_static_LDADD) $(LIBS)
+cpp03/require_concept_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/require_concept_free$(EXEEXT): $(cpp03_require_concept_free_OBJECTS) $(cpp03_require_concept_free_DEPENDENCIES) $(EXTRA_cpp03_require_concept_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/require_concept_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_require_concept_free_OBJECTS) $(cpp03_require_concept_free_LDADD) $(LIBS)
+cpp03/require_concept_member.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/require_concept_member$(EXEEXT): $(cpp03_require_concept_member_OBJECTS) $(cpp03_require_concept_member_DEPENDENCIES) $(EXTRA_cpp03_require_concept_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/require_concept_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_require_concept_member_OBJECTS) $(cpp03_require_concept_member_LDADD) $(LIBS)
+cpp03/require_concept_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/require_concept_static$(EXEEXT): $(cpp03_require_concept_static_OBJECTS) $(cpp03_require_concept_static_DEPENDENCIES) $(EXTRA_cpp03_require_concept_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/require_concept_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_require_concept_static_OBJECTS) $(cpp03_require_concept_static_LDADD) $(LIBS)
+cpp03/require_free.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/require_free$(EXEEXT): $(cpp03_require_free_OBJECTS) $(cpp03_require_free_DEPENDENCIES) $(EXTRA_cpp03_require_free_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/require_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_require_free_OBJECTS) $(cpp03_require_free_LDADD) $(LIBS)
+cpp03/require_member.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/require_member$(EXEEXT): $(cpp03_require_member_OBJECTS) $(cpp03_require_member_DEPENDENCIES) $(EXTRA_cpp03_require_member_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/require_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_require_member_OBJECTS) $(cpp03_require_member_LDADD) $(LIBS)
+cpp03/require_static.$(OBJEXT): cpp03/$(am__dirstamp) \
+ cpp03/$(DEPDIR)/$(am__dirstamp)
+
+cpp03/require_static$(EXEEXT): $(cpp03_require_static_OBJECTS) $(cpp03_require_static_DEPENDENCIES) $(EXTRA_cpp03_require_static_DEPENDENCIES) cpp03/$(am__dirstamp)
+ @rm -f cpp03/require_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp03_require_static_OBJECTS) $(cpp03_require_static_LDADD) $(LIBS)
+cpp11/$(am__dirstamp):
+ @$(MKDIR_P) cpp11
+ @: > cpp11/$(am__dirstamp)
+cpp11/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) cpp11/$(DEPDIR)
+ @: > cpp11/$(DEPDIR)/$(am__dirstamp)
+cpp11/can_prefer_free_prefer.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_free_prefer$(EXEEXT): $(cpp11_can_prefer_free_prefer_OBJECTS) $(cpp11_can_prefer_free_prefer_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_free_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_free_prefer_OBJECTS) $(cpp11_can_prefer_free_prefer_LDADD) $(LIBS)
+cpp11/can_prefer_free_require.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_free_require$(EXEEXT): $(cpp11_can_prefer_free_require_OBJECTS) $(cpp11_can_prefer_free_require_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_free_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_free_require_OBJECTS) $(cpp11_can_prefer_free_require_LDADD) $(LIBS)
+cpp11/can_prefer_member_prefer.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_member_prefer$(EXEEXT): $(cpp11_can_prefer_member_prefer_OBJECTS) $(cpp11_can_prefer_member_prefer_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_member_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_member_prefer_OBJECTS) $(cpp11_can_prefer_member_prefer_LDADD) $(LIBS)
+cpp11/can_prefer_member_require.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_member_require$(EXEEXT): $(cpp11_can_prefer_member_require_OBJECTS) $(cpp11_can_prefer_member_require_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_member_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_member_require_OBJECTS) $(cpp11_can_prefer_member_require_LDADD) $(LIBS)
+cpp11/can_prefer_not_applicable_free_prefer.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_applicable_free_prefer$(EXEEXT): $(cpp11_can_prefer_not_applicable_free_prefer_OBJECTS) $(cpp11_can_prefer_not_applicable_free_prefer_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_applicable_free_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_applicable_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_applicable_free_prefer_OBJECTS) $(cpp11_can_prefer_not_applicable_free_prefer_LDADD) $(LIBS)
+cpp11/can_prefer_not_applicable_free_require.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_applicable_free_require$(EXEEXT): $(cpp11_can_prefer_not_applicable_free_require_OBJECTS) $(cpp11_can_prefer_not_applicable_free_require_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_applicable_free_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_applicable_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_applicable_free_require_OBJECTS) $(cpp11_can_prefer_not_applicable_free_require_LDADD) $(LIBS)
+cpp11/can_prefer_not_applicable_member_prefer.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_applicable_member_prefer$(EXEEXT): $(cpp11_can_prefer_not_applicable_member_prefer_OBJECTS) $(cpp11_can_prefer_not_applicable_member_prefer_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_applicable_member_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_applicable_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_applicable_member_prefer_OBJECTS) $(cpp11_can_prefer_not_applicable_member_prefer_LDADD) $(LIBS)
+cpp11/can_prefer_not_applicable_member_require.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_applicable_member_require$(EXEEXT): $(cpp11_can_prefer_not_applicable_member_require_OBJECTS) $(cpp11_can_prefer_not_applicable_member_require_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_applicable_member_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_applicable_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_applicable_member_require_OBJECTS) $(cpp11_can_prefer_not_applicable_member_require_LDADD) $(LIBS)
+cpp11/can_prefer_not_applicable_static.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_applicable_static$(EXEEXT): $(cpp11_can_prefer_not_applicable_static_OBJECTS) $(cpp11_can_prefer_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_applicable_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_applicable_static_OBJECTS) $(cpp11_can_prefer_not_applicable_static_LDADD) $(LIBS)
+cpp11/can_prefer_not_applicable_unsupported.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_applicable_unsupported$(EXEEXT): $(cpp11_can_prefer_not_applicable_unsupported_OBJECTS) $(cpp11_can_prefer_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_applicable_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_applicable_unsupported_OBJECTS) $(cpp11_can_prefer_not_applicable_unsupported_LDADD) $(LIBS)
+cpp11/can_prefer_not_preferable_free_prefer.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_preferable_free_prefer$(EXEEXT): $(cpp11_can_prefer_not_preferable_free_prefer_OBJECTS) $(cpp11_can_prefer_not_preferable_free_prefer_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_preferable_free_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_preferable_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_preferable_free_prefer_OBJECTS) $(cpp11_can_prefer_not_preferable_free_prefer_LDADD) $(LIBS)
+cpp11/can_prefer_not_preferable_free_require.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_preferable_free_require$(EXEEXT): $(cpp11_can_prefer_not_preferable_free_require_OBJECTS) $(cpp11_can_prefer_not_preferable_free_require_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_preferable_free_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_preferable_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_preferable_free_require_OBJECTS) $(cpp11_can_prefer_not_preferable_free_require_LDADD) $(LIBS)
+cpp11/can_prefer_not_preferable_member_prefer.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_preferable_member_prefer$(EXEEXT): $(cpp11_can_prefer_not_preferable_member_prefer_OBJECTS) $(cpp11_can_prefer_not_preferable_member_prefer_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_preferable_member_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_preferable_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_preferable_member_prefer_OBJECTS) $(cpp11_can_prefer_not_preferable_member_prefer_LDADD) $(LIBS)
+cpp11/can_prefer_not_preferable_member_require.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_preferable_member_require$(EXEEXT): $(cpp11_can_prefer_not_preferable_member_require_OBJECTS) $(cpp11_can_prefer_not_preferable_member_require_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_preferable_member_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_preferable_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_preferable_member_require_OBJECTS) $(cpp11_can_prefer_not_preferable_member_require_LDADD) $(LIBS)
+cpp11/can_prefer_not_preferable_static.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_preferable_static$(EXEEXT): $(cpp11_can_prefer_not_preferable_static_OBJECTS) $(cpp11_can_prefer_not_preferable_static_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_preferable_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_preferable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_preferable_static_OBJECTS) $(cpp11_can_prefer_not_preferable_static_LDADD) $(LIBS)
+cpp11/can_prefer_not_preferable_unsupported.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_not_preferable_unsupported$(EXEEXT): $(cpp11_can_prefer_not_preferable_unsupported_OBJECTS) $(cpp11_can_prefer_not_preferable_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_not_preferable_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_not_preferable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_not_preferable_unsupported_OBJECTS) $(cpp11_can_prefer_not_preferable_unsupported_LDADD) $(LIBS)
+cpp11/can_prefer_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_static$(EXEEXT): $(cpp11_can_prefer_static_OBJECTS) $(cpp11_can_prefer_static_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_static_OBJECTS) $(cpp11_can_prefer_static_LDADD) $(LIBS)
+cpp11/can_prefer_unsupported.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_prefer_unsupported$(EXEEXT): $(cpp11_can_prefer_unsupported_OBJECTS) $(cpp11_can_prefer_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_prefer_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_prefer_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_prefer_unsupported_OBJECTS) $(cpp11_can_prefer_unsupported_LDADD) $(LIBS)
+cpp11/can_query_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_free$(EXEEXT): $(cpp11_can_query_free_OBJECTS) $(cpp11_can_query_free_DEPENDENCIES) $(EXTRA_cpp11_can_query_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_free_OBJECTS) $(cpp11_can_query_free_LDADD) $(LIBS)
+cpp11/can_query_member.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_member$(EXEEXT): $(cpp11_can_query_member_OBJECTS) $(cpp11_can_query_member_DEPENDENCIES) $(EXTRA_cpp11_can_query_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_member_OBJECTS) $(cpp11_can_query_member_LDADD) $(LIBS)
+cpp11/can_query_not_applicable_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_not_applicable_free$(EXEEXT): $(cpp11_can_query_not_applicable_free_OBJECTS) $(cpp11_can_query_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp11_can_query_not_applicable_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_not_applicable_free_OBJECTS) $(cpp11_can_query_not_applicable_free_LDADD) $(LIBS)
+cpp11/can_query_not_applicable_member.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_not_applicable_member$(EXEEXT): $(cpp11_can_query_not_applicable_member_OBJECTS) $(cpp11_can_query_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp11_can_query_not_applicable_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_not_applicable_member_OBJECTS) $(cpp11_can_query_not_applicable_member_LDADD) $(LIBS)
+cpp11/can_query_not_applicable_static.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_not_applicable_static$(EXEEXT): $(cpp11_can_query_not_applicable_static_OBJECTS) $(cpp11_can_query_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp11_can_query_not_applicable_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_not_applicable_static_OBJECTS) $(cpp11_can_query_not_applicable_static_LDADD) $(LIBS)
+cpp11/can_query_not_applicable_unsupported.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_not_applicable_unsupported$(EXEEXT): $(cpp11_can_query_not_applicable_unsupported_OBJECTS) $(cpp11_can_query_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_query_not_applicable_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_not_applicable_unsupported_OBJECTS) $(cpp11_can_query_not_applicable_unsupported_LDADD) $(LIBS)
+cpp11/can_query_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_static$(EXEEXT): $(cpp11_can_query_static_OBJECTS) $(cpp11_can_query_static_DEPENDENCIES) $(EXTRA_cpp11_can_query_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_static_OBJECTS) $(cpp11_can_query_static_LDADD) $(LIBS)
+cpp11/can_query_unsupported.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_query_unsupported$(EXEEXT): $(cpp11_can_query_unsupported_OBJECTS) $(cpp11_can_query_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_query_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_query_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_query_unsupported_OBJECTS) $(cpp11_can_query_unsupported_LDADD) $(LIBS)
+cpp11/can_require_concept_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_free$(EXEEXT): $(cpp11_can_require_concept_free_OBJECTS) $(cpp11_can_require_concept_free_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_free_OBJECTS) $(cpp11_can_require_concept_free_LDADD) $(LIBS)
+cpp11/can_require_concept_member.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_member$(EXEEXT): $(cpp11_can_require_concept_member_OBJECTS) $(cpp11_can_require_concept_member_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_member_OBJECTS) $(cpp11_can_require_concept_member_LDADD) $(LIBS)
+cpp11/can_require_concept_not_applicable_free.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_not_applicable_free$(EXEEXT): $(cpp11_can_require_concept_not_applicable_free_OBJECTS) $(cpp11_can_require_concept_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_not_applicable_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_not_applicable_free_OBJECTS) $(cpp11_can_require_concept_not_applicable_free_LDADD) $(LIBS)
+cpp11/can_require_concept_not_applicable_member.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_not_applicable_member$(EXEEXT): $(cpp11_can_require_concept_not_applicable_member_OBJECTS) $(cpp11_can_require_concept_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_not_applicable_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_not_applicable_member_OBJECTS) $(cpp11_can_require_concept_not_applicable_member_LDADD) $(LIBS)
+cpp11/can_require_concept_not_applicable_static.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_not_applicable_static$(EXEEXT): $(cpp11_can_require_concept_not_applicable_static_OBJECTS) $(cpp11_can_require_concept_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_not_applicable_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_not_applicable_static_OBJECTS) $(cpp11_can_require_concept_not_applicable_static_LDADD) $(LIBS)
+cpp11/can_require_concept_not_applicable_unsupported.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_not_applicable_unsupported$(EXEEXT): $(cpp11_can_require_concept_not_applicable_unsupported_OBJECTS) $(cpp11_can_require_concept_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_not_applicable_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_not_applicable_unsupported_OBJECTS) $(cpp11_can_require_concept_not_applicable_unsupported_LDADD) $(LIBS)
+cpp11/can_require_concept_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_static$(EXEEXT): $(cpp11_can_require_concept_static_OBJECTS) $(cpp11_can_require_concept_static_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_static_OBJECTS) $(cpp11_can_require_concept_static_LDADD) $(LIBS)
+cpp11/can_require_concept_unsupported.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_concept_unsupported$(EXEEXT): $(cpp11_can_require_concept_unsupported_OBJECTS) $(cpp11_can_require_concept_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_require_concept_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_concept_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_concept_unsupported_OBJECTS) $(cpp11_can_require_concept_unsupported_LDADD) $(LIBS)
+cpp11/can_require_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_free$(EXEEXT): $(cpp11_can_require_free_OBJECTS) $(cpp11_can_require_free_DEPENDENCIES) $(EXTRA_cpp11_can_require_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_free_OBJECTS) $(cpp11_can_require_free_LDADD) $(LIBS)
+cpp11/can_require_member.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_member$(EXEEXT): $(cpp11_can_require_member_OBJECTS) $(cpp11_can_require_member_DEPENDENCIES) $(EXTRA_cpp11_can_require_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_member_OBJECTS) $(cpp11_can_require_member_LDADD) $(LIBS)
+cpp11/can_require_not_applicable_free.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_not_applicable_free$(EXEEXT): $(cpp11_can_require_not_applicable_free_OBJECTS) $(cpp11_can_require_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp11_can_require_not_applicable_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_not_applicable_free_OBJECTS) $(cpp11_can_require_not_applicable_free_LDADD) $(LIBS)
+cpp11/can_require_not_applicable_member.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_not_applicable_member$(EXEEXT): $(cpp11_can_require_not_applicable_member_OBJECTS) $(cpp11_can_require_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp11_can_require_not_applicable_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_not_applicable_member_OBJECTS) $(cpp11_can_require_not_applicable_member_LDADD) $(LIBS)
+cpp11/can_require_not_applicable_static.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_not_applicable_static$(EXEEXT): $(cpp11_can_require_not_applicable_static_OBJECTS) $(cpp11_can_require_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp11_can_require_not_applicable_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_not_applicable_static_OBJECTS) $(cpp11_can_require_not_applicable_static_LDADD) $(LIBS)
+cpp11/can_require_not_applicable_unsupported.$(OBJEXT): \
+ cpp11/$(am__dirstamp) cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_not_applicable_unsupported$(EXEEXT): $(cpp11_can_require_not_applicable_unsupported_OBJECTS) $(cpp11_can_require_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_require_not_applicable_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_not_applicable_unsupported_OBJECTS) $(cpp11_can_require_not_applicable_unsupported_LDADD) $(LIBS)
+cpp11/can_require_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_static$(EXEEXT): $(cpp11_can_require_static_OBJECTS) $(cpp11_can_require_static_DEPENDENCIES) $(EXTRA_cpp11_can_require_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_static_OBJECTS) $(cpp11_can_require_static_LDADD) $(LIBS)
+cpp11/can_require_unsupported.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/can_require_unsupported$(EXEEXT): $(cpp11_can_require_unsupported_OBJECTS) $(cpp11_can_require_unsupported_DEPENDENCIES) $(EXTRA_cpp11_can_require_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/can_require_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_can_require_unsupported_OBJECTS) $(cpp11_can_require_unsupported_LDADD) $(LIBS)
+cpp11/prefer_free_prefer.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/prefer_free_prefer$(EXEEXT): $(cpp11_prefer_free_prefer_OBJECTS) $(cpp11_prefer_free_prefer_DEPENDENCIES) $(EXTRA_cpp11_prefer_free_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/prefer_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_prefer_free_prefer_OBJECTS) $(cpp11_prefer_free_prefer_LDADD) $(LIBS)
+cpp11/prefer_free_require.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/prefer_free_require$(EXEEXT): $(cpp11_prefer_free_require_OBJECTS) $(cpp11_prefer_free_require_DEPENDENCIES) $(EXTRA_cpp11_prefer_free_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/prefer_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_prefer_free_require_OBJECTS) $(cpp11_prefer_free_require_LDADD) $(LIBS)
+cpp11/prefer_member_prefer.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/prefer_member_prefer$(EXEEXT): $(cpp11_prefer_member_prefer_OBJECTS) $(cpp11_prefer_member_prefer_DEPENDENCIES) $(EXTRA_cpp11_prefer_member_prefer_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/prefer_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_prefer_member_prefer_OBJECTS) $(cpp11_prefer_member_prefer_LDADD) $(LIBS)
+cpp11/prefer_member_require.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/prefer_member_require$(EXEEXT): $(cpp11_prefer_member_require_OBJECTS) $(cpp11_prefer_member_require_DEPENDENCIES) $(EXTRA_cpp11_prefer_member_require_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/prefer_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_prefer_member_require_OBJECTS) $(cpp11_prefer_member_require_LDADD) $(LIBS)
+cpp11/prefer_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/prefer_static$(EXEEXT): $(cpp11_prefer_static_OBJECTS) $(cpp11_prefer_static_DEPENDENCIES) $(EXTRA_cpp11_prefer_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/prefer_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_prefer_static_OBJECTS) $(cpp11_prefer_static_LDADD) $(LIBS)
+cpp11/prefer_unsupported.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/prefer_unsupported$(EXEEXT): $(cpp11_prefer_unsupported_OBJECTS) $(cpp11_prefer_unsupported_DEPENDENCIES) $(EXTRA_cpp11_prefer_unsupported_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/prefer_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_prefer_unsupported_OBJECTS) $(cpp11_prefer_unsupported_LDADD) $(LIBS)
+cpp11/query_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/query_free$(EXEEXT): $(cpp11_query_free_OBJECTS) $(cpp11_query_free_DEPENDENCIES) $(EXTRA_cpp11_query_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/query_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_query_free_OBJECTS) $(cpp11_query_free_LDADD) $(LIBS)
+cpp11/query_member.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/query_member$(EXEEXT): $(cpp11_query_member_OBJECTS) $(cpp11_query_member_DEPENDENCIES) $(EXTRA_cpp11_query_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/query_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_query_member_OBJECTS) $(cpp11_query_member_LDADD) $(LIBS)
+cpp11/query_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/query_static$(EXEEXT): $(cpp11_query_static_OBJECTS) $(cpp11_query_static_DEPENDENCIES) $(EXTRA_cpp11_query_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/query_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_query_static_OBJECTS) $(cpp11_query_static_LDADD) $(LIBS)
+cpp11/require_concept_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/require_concept_free$(EXEEXT): $(cpp11_require_concept_free_OBJECTS) $(cpp11_require_concept_free_DEPENDENCIES) $(EXTRA_cpp11_require_concept_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/require_concept_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_require_concept_free_OBJECTS) $(cpp11_require_concept_free_LDADD) $(LIBS)
+cpp11/require_concept_member.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/require_concept_member$(EXEEXT): $(cpp11_require_concept_member_OBJECTS) $(cpp11_require_concept_member_DEPENDENCIES) $(EXTRA_cpp11_require_concept_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/require_concept_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_require_concept_member_OBJECTS) $(cpp11_require_concept_member_LDADD) $(LIBS)
+cpp11/require_concept_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/require_concept_static$(EXEEXT): $(cpp11_require_concept_static_OBJECTS) $(cpp11_require_concept_static_DEPENDENCIES) $(EXTRA_cpp11_require_concept_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/require_concept_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_require_concept_static_OBJECTS) $(cpp11_require_concept_static_LDADD) $(LIBS)
+cpp11/require_free.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/require_free$(EXEEXT): $(cpp11_require_free_OBJECTS) $(cpp11_require_free_DEPENDENCIES) $(EXTRA_cpp11_require_free_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/require_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_require_free_OBJECTS) $(cpp11_require_free_LDADD) $(LIBS)
+cpp11/require_member.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/require_member$(EXEEXT): $(cpp11_require_member_OBJECTS) $(cpp11_require_member_DEPENDENCIES) $(EXTRA_cpp11_require_member_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/require_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_require_member_OBJECTS) $(cpp11_require_member_LDADD) $(LIBS)
+cpp11/require_static.$(OBJEXT): cpp11/$(am__dirstamp) \
+ cpp11/$(DEPDIR)/$(am__dirstamp)
+
+cpp11/require_static$(EXEEXT): $(cpp11_require_static_OBJECTS) $(cpp11_require_static_DEPENDENCIES) $(EXTRA_cpp11_require_static_DEPENDENCIES) cpp11/$(am__dirstamp)
+ @rm -f cpp11/require_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp11_require_static_OBJECTS) $(cpp11_require_static_LDADD) $(LIBS)
+cpp14/$(am__dirstamp):
+ @$(MKDIR_P) cpp14
+ @: > cpp14/$(am__dirstamp)
+cpp14/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) cpp14/$(DEPDIR)
+ @: > cpp14/$(DEPDIR)/$(am__dirstamp)
+cpp14/can_prefer_free_prefer.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_free_prefer$(EXEEXT): $(cpp14_can_prefer_free_prefer_OBJECTS) $(cpp14_can_prefer_free_prefer_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_free_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_free_prefer_OBJECTS) $(cpp14_can_prefer_free_prefer_LDADD) $(LIBS)
+cpp14/can_prefer_free_require.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_free_require$(EXEEXT): $(cpp14_can_prefer_free_require_OBJECTS) $(cpp14_can_prefer_free_require_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_free_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_free_require_OBJECTS) $(cpp14_can_prefer_free_require_LDADD) $(LIBS)
+cpp14/can_prefer_member_prefer.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_member_prefer$(EXEEXT): $(cpp14_can_prefer_member_prefer_OBJECTS) $(cpp14_can_prefer_member_prefer_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_member_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_member_prefer_OBJECTS) $(cpp14_can_prefer_member_prefer_LDADD) $(LIBS)
+cpp14/can_prefer_member_require.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_member_require$(EXEEXT): $(cpp14_can_prefer_member_require_OBJECTS) $(cpp14_can_prefer_member_require_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_member_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_member_require_OBJECTS) $(cpp14_can_prefer_member_require_LDADD) $(LIBS)
+cpp14/can_prefer_not_applicable_free_prefer.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_applicable_free_prefer$(EXEEXT): $(cpp14_can_prefer_not_applicable_free_prefer_OBJECTS) $(cpp14_can_prefer_not_applicable_free_prefer_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_applicable_free_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_applicable_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_applicable_free_prefer_OBJECTS) $(cpp14_can_prefer_not_applicable_free_prefer_LDADD) $(LIBS)
+cpp14/can_prefer_not_applicable_free_require.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_applicable_free_require$(EXEEXT): $(cpp14_can_prefer_not_applicable_free_require_OBJECTS) $(cpp14_can_prefer_not_applicable_free_require_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_applicable_free_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_applicable_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_applicable_free_require_OBJECTS) $(cpp14_can_prefer_not_applicable_free_require_LDADD) $(LIBS)
+cpp14/can_prefer_not_applicable_member_prefer.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_applicable_member_prefer$(EXEEXT): $(cpp14_can_prefer_not_applicable_member_prefer_OBJECTS) $(cpp14_can_prefer_not_applicable_member_prefer_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_applicable_member_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_applicable_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_applicable_member_prefer_OBJECTS) $(cpp14_can_prefer_not_applicable_member_prefer_LDADD) $(LIBS)
+cpp14/can_prefer_not_applicable_member_require.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_applicable_member_require$(EXEEXT): $(cpp14_can_prefer_not_applicable_member_require_OBJECTS) $(cpp14_can_prefer_not_applicable_member_require_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_applicable_member_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_applicable_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_applicable_member_require_OBJECTS) $(cpp14_can_prefer_not_applicable_member_require_LDADD) $(LIBS)
+cpp14/can_prefer_not_applicable_static.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_applicable_static$(EXEEXT): $(cpp14_can_prefer_not_applicable_static_OBJECTS) $(cpp14_can_prefer_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_applicable_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_applicable_static_OBJECTS) $(cpp14_can_prefer_not_applicable_static_LDADD) $(LIBS)
+cpp14/can_prefer_not_applicable_unsupported.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_applicable_unsupported$(EXEEXT): $(cpp14_can_prefer_not_applicable_unsupported_OBJECTS) $(cpp14_can_prefer_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_applicable_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_applicable_unsupported_OBJECTS) $(cpp14_can_prefer_not_applicable_unsupported_LDADD) $(LIBS)
+cpp14/can_prefer_not_preferable_free_prefer.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_preferable_free_prefer$(EXEEXT): $(cpp14_can_prefer_not_preferable_free_prefer_OBJECTS) $(cpp14_can_prefer_not_preferable_free_prefer_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_preferable_free_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_preferable_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_preferable_free_prefer_OBJECTS) $(cpp14_can_prefer_not_preferable_free_prefer_LDADD) $(LIBS)
+cpp14/can_prefer_not_preferable_free_require.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_preferable_free_require$(EXEEXT): $(cpp14_can_prefer_not_preferable_free_require_OBJECTS) $(cpp14_can_prefer_not_preferable_free_require_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_preferable_free_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_preferable_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_preferable_free_require_OBJECTS) $(cpp14_can_prefer_not_preferable_free_require_LDADD) $(LIBS)
+cpp14/can_prefer_not_preferable_member_prefer.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_preferable_member_prefer$(EXEEXT): $(cpp14_can_prefer_not_preferable_member_prefer_OBJECTS) $(cpp14_can_prefer_not_preferable_member_prefer_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_preferable_member_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_preferable_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_preferable_member_prefer_OBJECTS) $(cpp14_can_prefer_not_preferable_member_prefer_LDADD) $(LIBS)
+cpp14/can_prefer_not_preferable_member_require.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_preferable_member_require$(EXEEXT): $(cpp14_can_prefer_not_preferable_member_require_OBJECTS) $(cpp14_can_prefer_not_preferable_member_require_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_preferable_member_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_preferable_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_preferable_member_require_OBJECTS) $(cpp14_can_prefer_not_preferable_member_require_LDADD) $(LIBS)
+cpp14/can_prefer_not_preferable_static.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_preferable_static$(EXEEXT): $(cpp14_can_prefer_not_preferable_static_OBJECTS) $(cpp14_can_prefer_not_preferable_static_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_preferable_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_preferable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_preferable_static_OBJECTS) $(cpp14_can_prefer_not_preferable_static_LDADD) $(LIBS)
+cpp14/can_prefer_not_preferable_unsupported.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_not_preferable_unsupported$(EXEEXT): $(cpp14_can_prefer_not_preferable_unsupported_OBJECTS) $(cpp14_can_prefer_not_preferable_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_not_preferable_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_not_preferable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_not_preferable_unsupported_OBJECTS) $(cpp14_can_prefer_not_preferable_unsupported_LDADD) $(LIBS)
+cpp14/can_prefer_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_static$(EXEEXT): $(cpp14_can_prefer_static_OBJECTS) $(cpp14_can_prefer_static_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_static_OBJECTS) $(cpp14_can_prefer_static_LDADD) $(LIBS)
+cpp14/can_prefer_unsupported.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_prefer_unsupported$(EXEEXT): $(cpp14_can_prefer_unsupported_OBJECTS) $(cpp14_can_prefer_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_prefer_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_prefer_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_prefer_unsupported_OBJECTS) $(cpp14_can_prefer_unsupported_LDADD) $(LIBS)
+cpp14/can_query_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_free$(EXEEXT): $(cpp14_can_query_free_OBJECTS) $(cpp14_can_query_free_DEPENDENCIES) $(EXTRA_cpp14_can_query_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_free_OBJECTS) $(cpp14_can_query_free_LDADD) $(LIBS)
+cpp14/can_query_member.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_member$(EXEEXT): $(cpp14_can_query_member_OBJECTS) $(cpp14_can_query_member_DEPENDENCIES) $(EXTRA_cpp14_can_query_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_member_OBJECTS) $(cpp14_can_query_member_LDADD) $(LIBS)
+cpp14/can_query_not_applicable_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_not_applicable_free$(EXEEXT): $(cpp14_can_query_not_applicable_free_OBJECTS) $(cpp14_can_query_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp14_can_query_not_applicable_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_not_applicable_free_OBJECTS) $(cpp14_can_query_not_applicable_free_LDADD) $(LIBS)
+cpp14/can_query_not_applicable_member.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_not_applicable_member$(EXEEXT): $(cpp14_can_query_not_applicable_member_OBJECTS) $(cpp14_can_query_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp14_can_query_not_applicable_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_not_applicable_member_OBJECTS) $(cpp14_can_query_not_applicable_member_LDADD) $(LIBS)
+cpp14/can_query_not_applicable_static.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_not_applicable_static$(EXEEXT): $(cpp14_can_query_not_applicable_static_OBJECTS) $(cpp14_can_query_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp14_can_query_not_applicable_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_not_applicable_static_OBJECTS) $(cpp14_can_query_not_applicable_static_LDADD) $(LIBS)
+cpp14/can_query_not_applicable_unsupported.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_not_applicable_unsupported$(EXEEXT): $(cpp14_can_query_not_applicable_unsupported_OBJECTS) $(cpp14_can_query_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_query_not_applicable_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_not_applicable_unsupported_OBJECTS) $(cpp14_can_query_not_applicable_unsupported_LDADD) $(LIBS)
+cpp14/can_query_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_static$(EXEEXT): $(cpp14_can_query_static_OBJECTS) $(cpp14_can_query_static_DEPENDENCIES) $(EXTRA_cpp14_can_query_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_static_OBJECTS) $(cpp14_can_query_static_LDADD) $(LIBS)
+cpp14/can_query_unsupported.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_query_unsupported$(EXEEXT): $(cpp14_can_query_unsupported_OBJECTS) $(cpp14_can_query_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_query_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_query_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_query_unsupported_OBJECTS) $(cpp14_can_query_unsupported_LDADD) $(LIBS)
+cpp14/can_require_concept_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_free$(EXEEXT): $(cpp14_can_require_concept_free_OBJECTS) $(cpp14_can_require_concept_free_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_free_OBJECTS) $(cpp14_can_require_concept_free_LDADD) $(LIBS)
+cpp14/can_require_concept_member.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_member$(EXEEXT): $(cpp14_can_require_concept_member_OBJECTS) $(cpp14_can_require_concept_member_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_member_OBJECTS) $(cpp14_can_require_concept_member_LDADD) $(LIBS)
+cpp14/can_require_concept_not_applicable_free.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_not_applicable_free$(EXEEXT): $(cpp14_can_require_concept_not_applicable_free_OBJECTS) $(cpp14_can_require_concept_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_not_applicable_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_not_applicable_free_OBJECTS) $(cpp14_can_require_concept_not_applicable_free_LDADD) $(LIBS)
+cpp14/can_require_concept_not_applicable_member.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_not_applicable_member$(EXEEXT): $(cpp14_can_require_concept_not_applicable_member_OBJECTS) $(cpp14_can_require_concept_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_not_applicable_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_not_applicable_member_OBJECTS) $(cpp14_can_require_concept_not_applicable_member_LDADD) $(LIBS)
+cpp14/can_require_concept_not_applicable_static.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_not_applicable_static$(EXEEXT): $(cpp14_can_require_concept_not_applicable_static_OBJECTS) $(cpp14_can_require_concept_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_not_applicable_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_not_applicable_static_OBJECTS) $(cpp14_can_require_concept_not_applicable_static_LDADD) $(LIBS)
+cpp14/can_require_concept_not_applicable_unsupported.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_not_applicable_unsupported$(EXEEXT): $(cpp14_can_require_concept_not_applicable_unsupported_OBJECTS) $(cpp14_can_require_concept_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_not_applicable_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_not_applicable_unsupported_OBJECTS) $(cpp14_can_require_concept_not_applicable_unsupported_LDADD) $(LIBS)
+cpp14/can_require_concept_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_static$(EXEEXT): $(cpp14_can_require_concept_static_OBJECTS) $(cpp14_can_require_concept_static_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_static_OBJECTS) $(cpp14_can_require_concept_static_LDADD) $(LIBS)
+cpp14/can_require_concept_unsupported.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_concept_unsupported$(EXEEXT): $(cpp14_can_require_concept_unsupported_OBJECTS) $(cpp14_can_require_concept_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_require_concept_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_concept_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_concept_unsupported_OBJECTS) $(cpp14_can_require_concept_unsupported_LDADD) $(LIBS)
+cpp14/can_require_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_free$(EXEEXT): $(cpp14_can_require_free_OBJECTS) $(cpp14_can_require_free_DEPENDENCIES) $(EXTRA_cpp14_can_require_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_free_OBJECTS) $(cpp14_can_require_free_LDADD) $(LIBS)
+cpp14/can_require_member.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_member$(EXEEXT): $(cpp14_can_require_member_OBJECTS) $(cpp14_can_require_member_DEPENDENCIES) $(EXTRA_cpp14_can_require_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_member_OBJECTS) $(cpp14_can_require_member_LDADD) $(LIBS)
+cpp14/can_require_not_applicable_free.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_not_applicable_free$(EXEEXT): $(cpp14_can_require_not_applicable_free_OBJECTS) $(cpp14_can_require_not_applicable_free_DEPENDENCIES) $(EXTRA_cpp14_can_require_not_applicable_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_not_applicable_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_not_applicable_free_OBJECTS) $(cpp14_can_require_not_applicable_free_LDADD) $(LIBS)
+cpp14/can_require_not_applicable_member.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_not_applicable_member$(EXEEXT): $(cpp14_can_require_not_applicable_member_OBJECTS) $(cpp14_can_require_not_applicable_member_DEPENDENCIES) $(EXTRA_cpp14_can_require_not_applicable_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_not_applicable_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_not_applicable_member_OBJECTS) $(cpp14_can_require_not_applicable_member_LDADD) $(LIBS)
+cpp14/can_require_not_applicable_static.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_not_applicable_static$(EXEEXT): $(cpp14_can_require_not_applicable_static_OBJECTS) $(cpp14_can_require_not_applicable_static_DEPENDENCIES) $(EXTRA_cpp14_can_require_not_applicable_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_not_applicable_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_not_applicable_static_OBJECTS) $(cpp14_can_require_not_applicable_static_LDADD) $(LIBS)
+cpp14/can_require_not_applicable_unsupported.$(OBJEXT): \
+ cpp14/$(am__dirstamp) cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_not_applicable_unsupported$(EXEEXT): $(cpp14_can_require_not_applicable_unsupported_OBJECTS) $(cpp14_can_require_not_applicable_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_require_not_applicable_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_not_applicable_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_not_applicable_unsupported_OBJECTS) $(cpp14_can_require_not_applicable_unsupported_LDADD) $(LIBS)
+cpp14/can_require_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_static$(EXEEXT): $(cpp14_can_require_static_OBJECTS) $(cpp14_can_require_static_DEPENDENCIES) $(EXTRA_cpp14_can_require_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_static_OBJECTS) $(cpp14_can_require_static_LDADD) $(LIBS)
+cpp14/can_require_unsupported.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/can_require_unsupported$(EXEEXT): $(cpp14_can_require_unsupported_OBJECTS) $(cpp14_can_require_unsupported_DEPENDENCIES) $(EXTRA_cpp14_can_require_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/can_require_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_can_require_unsupported_OBJECTS) $(cpp14_can_require_unsupported_LDADD) $(LIBS)
+cpp14/prefer_free_prefer.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/prefer_free_prefer$(EXEEXT): $(cpp14_prefer_free_prefer_OBJECTS) $(cpp14_prefer_free_prefer_DEPENDENCIES) $(EXTRA_cpp14_prefer_free_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/prefer_free_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_prefer_free_prefer_OBJECTS) $(cpp14_prefer_free_prefer_LDADD) $(LIBS)
+cpp14/prefer_free_require.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/prefer_free_require$(EXEEXT): $(cpp14_prefer_free_require_OBJECTS) $(cpp14_prefer_free_require_DEPENDENCIES) $(EXTRA_cpp14_prefer_free_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/prefer_free_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_prefer_free_require_OBJECTS) $(cpp14_prefer_free_require_LDADD) $(LIBS)
+cpp14/prefer_member_prefer.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/prefer_member_prefer$(EXEEXT): $(cpp14_prefer_member_prefer_OBJECTS) $(cpp14_prefer_member_prefer_DEPENDENCIES) $(EXTRA_cpp14_prefer_member_prefer_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/prefer_member_prefer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_prefer_member_prefer_OBJECTS) $(cpp14_prefer_member_prefer_LDADD) $(LIBS)
+cpp14/prefer_member_require.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/prefer_member_require$(EXEEXT): $(cpp14_prefer_member_require_OBJECTS) $(cpp14_prefer_member_require_DEPENDENCIES) $(EXTRA_cpp14_prefer_member_require_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/prefer_member_require$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_prefer_member_require_OBJECTS) $(cpp14_prefer_member_require_LDADD) $(LIBS)
+cpp14/prefer_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/prefer_static$(EXEEXT): $(cpp14_prefer_static_OBJECTS) $(cpp14_prefer_static_DEPENDENCIES) $(EXTRA_cpp14_prefer_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/prefer_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_prefer_static_OBJECTS) $(cpp14_prefer_static_LDADD) $(LIBS)
+cpp14/prefer_unsupported.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/prefer_unsupported$(EXEEXT): $(cpp14_prefer_unsupported_OBJECTS) $(cpp14_prefer_unsupported_DEPENDENCIES) $(EXTRA_cpp14_prefer_unsupported_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/prefer_unsupported$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_prefer_unsupported_OBJECTS) $(cpp14_prefer_unsupported_LDADD) $(LIBS)
+cpp14/query_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/query_free$(EXEEXT): $(cpp14_query_free_OBJECTS) $(cpp14_query_free_DEPENDENCIES) $(EXTRA_cpp14_query_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/query_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_query_free_OBJECTS) $(cpp14_query_free_LDADD) $(LIBS)
+cpp14/query_member.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/query_member$(EXEEXT): $(cpp14_query_member_OBJECTS) $(cpp14_query_member_DEPENDENCIES) $(EXTRA_cpp14_query_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/query_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_query_member_OBJECTS) $(cpp14_query_member_LDADD) $(LIBS)
+cpp14/query_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/query_static$(EXEEXT): $(cpp14_query_static_OBJECTS) $(cpp14_query_static_DEPENDENCIES) $(EXTRA_cpp14_query_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/query_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_query_static_OBJECTS) $(cpp14_query_static_LDADD) $(LIBS)
+cpp14/require_concept_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/require_concept_free$(EXEEXT): $(cpp14_require_concept_free_OBJECTS) $(cpp14_require_concept_free_DEPENDENCIES) $(EXTRA_cpp14_require_concept_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/require_concept_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_require_concept_free_OBJECTS) $(cpp14_require_concept_free_LDADD) $(LIBS)
+cpp14/require_concept_member.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/require_concept_member$(EXEEXT): $(cpp14_require_concept_member_OBJECTS) $(cpp14_require_concept_member_DEPENDENCIES) $(EXTRA_cpp14_require_concept_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/require_concept_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_require_concept_member_OBJECTS) $(cpp14_require_concept_member_LDADD) $(LIBS)
+cpp14/require_concept_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/require_concept_static$(EXEEXT): $(cpp14_require_concept_static_OBJECTS) $(cpp14_require_concept_static_DEPENDENCIES) $(EXTRA_cpp14_require_concept_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/require_concept_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_require_concept_static_OBJECTS) $(cpp14_require_concept_static_LDADD) $(LIBS)
+cpp14/require_free.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/require_free$(EXEEXT): $(cpp14_require_free_OBJECTS) $(cpp14_require_free_DEPENDENCIES) $(EXTRA_cpp14_require_free_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/require_free$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_require_free_OBJECTS) $(cpp14_require_free_LDADD) $(LIBS)
+cpp14/require_member.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/require_member$(EXEEXT): $(cpp14_require_member_OBJECTS) $(cpp14_require_member_DEPENDENCIES) $(EXTRA_cpp14_require_member_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/require_member$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_require_member_OBJECTS) $(cpp14_require_member_LDADD) $(LIBS)
+cpp14/require_static.$(OBJEXT): cpp14/$(am__dirstamp) \
+ cpp14/$(DEPDIR)/$(am__dirstamp)
+
+cpp14/require_static$(EXEEXT): $(cpp14_require_static_OBJECTS) $(cpp14_require_static_DEPENDENCIES) $(EXTRA_cpp14_require_static_DEPENDENCIES) cpp14/$(am__dirstamp)
+ @rm -f cpp14/require_static$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(cpp14_require_static_OBJECTS) $(cpp14_require_static_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f cpp03/*.$(OBJEXT)
+ -rm -f cpp11/*.$(OBJEXT)
+ -rm -f cpp14/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_applicable_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_applicable_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_preferable_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_preferable_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_preferable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_prefer_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_query_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_concept_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/can_require_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/prefer_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/prefer_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/prefer_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/prefer_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/prefer_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/prefer_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/query_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/query_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/query_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/require_concept_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/require_concept_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/require_concept_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/require_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/require_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp03/$(DEPDIR)/require_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_applicable_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_applicable_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_preferable_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_preferable_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_preferable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_prefer_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_query_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_concept_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/can_require_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/prefer_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/prefer_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/prefer_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/prefer_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/prefer_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/prefer_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/query_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/query_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/query_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/require_concept_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/require_concept_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/require_concept_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/require_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/require_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp11/$(DEPDIR)/require_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_applicable_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_applicable_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_preferable_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_preferable_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_preferable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_prefer_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_query_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_concept_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_not_applicable_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_not_applicable_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_not_applicable_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_not_applicable_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/can_require_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/prefer_free_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/prefer_free_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/prefer_member_prefer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/prefer_member_require.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/prefer_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/prefer_unsupported.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/query_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/query_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/query_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/require_concept_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/require_concept_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/require_concept_static.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/require_free.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/require_member.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cpp14/$(DEPDIR)/require_static.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS: $(check_PROGRAMS)
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+cpp03/query_free.log: cpp03/query_free$(EXEEXT)
+ @p='cpp03/query_free$(EXEEXT)'; \
+ b='cpp03/query_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/query_member.log: cpp03/query_member$(EXEEXT)
+ @p='cpp03/query_member$(EXEEXT)'; \
+ b='cpp03/query_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/query_static.log: cpp03/query_static$(EXEEXT)
+ @p='cpp03/query_static$(EXEEXT)'; \
+ b='cpp03/query_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_free.log: cpp03/can_query_free$(EXEEXT)
+ @p='cpp03/can_query_free$(EXEEXT)'; \
+ b='cpp03/can_query_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_member.log: cpp03/can_query_member$(EXEEXT)
+ @p='cpp03/can_query_member$(EXEEXT)'; \
+ b='cpp03/can_query_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_static.log: cpp03/can_query_static$(EXEEXT)
+ @p='cpp03/can_query_static$(EXEEXT)'; \
+ b='cpp03/can_query_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_unsupported.log: cpp03/can_query_unsupported$(EXEEXT)
+ @p='cpp03/can_query_unsupported$(EXEEXT)'; \
+ b='cpp03/can_query_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_not_applicable_free.log: cpp03/can_query_not_applicable_free$(EXEEXT)
+ @p='cpp03/can_query_not_applicable_free$(EXEEXT)'; \
+ b='cpp03/can_query_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_not_applicable_member.log: cpp03/can_query_not_applicable_member$(EXEEXT)
+ @p='cpp03/can_query_not_applicable_member$(EXEEXT)'; \
+ b='cpp03/can_query_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_not_applicable_static.log: cpp03/can_query_not_applicable_static$(EXEEXT)
+ @p='cpp03/can_query_not_applicable_static$(EXEEXT)'; \
+ b='cpp03/can_query_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_query_not_applicable_unsupported.log: cpp03/can_query_not_applicable_unsupported$(EXEEXT)
+ @p='cpp03/can_query_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp03/can_query_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/require_concept_free.log: cpp03/require_concept_free$(EXEEXT)
+ @p='cpp03/require_concept_free$(EXEEXT)'; \
+ b='cpp03/require_concept_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/require_concept_member.log: cpp03/require_concept_member$(EXEEXT)
+ @p='cpp03/require_concept_member$(EXEEXT)'; \
+ b='cpp03/require_concept_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/require_concept_static.log: cpp03/require_concept_static$(EXEEXT)
+ @p='cpp03/require_concept_static$(EXEEXT)'; \
+ b='cpp03/require_concept_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_free.log: cpp03/can_require_concept_free$(EXEEXT)
+ @p='cpp03/can_require_concept_free$(EXEEXT)'; \
+ b='cpp03/can_require_concept_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_member.log: cpp03/can_require_concept_member$(EXEEXT)
+ @p='cpp03/can_require_concept_member$(EXEEXT)'; \
+ b='cpp03/can_require_concept_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_static.log: cpp03/can_require_concept_static$(EXEEXT)
+ @p='cpp03/can_require_concept_static$(EXEEXT)'; \
+ b='cpp03/can_require_concept_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_unsupported.log: cpp03/can_require_concept_unsupported$(EXEEXT)
+ @p='cpp03/can_require_concept_unsupported$(EXEEXT)'; \
+ b='cpp03/can_require_concept_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_not_applicable_free.log: cpp03/can_require_concept_not_applicable_free$(EXEEXT)
+ @p='cpp03/can_require_concept_not_applicable_free$(EXEEXT)'; \
+ b='cpp03/can_require_concept_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_not_applicable_member.log: cpp03/can_require_concept_not_applicable_member$(EXEEXT)
+ @p='cpp03/can_require_concept_not_applicable_member$(EXEEXT)'; \
+ b='cpp03/can_require_concept_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_not_applicable_static.log: cpp03/can_require_concept_not_applicable_static$(EXEEXT)
+ @p='cpp03/can_require_concept_not_applicable_static$(EXEEXT)'; \
+ b='cpp03/can_require_concept_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_concept_not_applicable_unsupported.log: cpp03/can_require_concept_not_applicable_unsupported$(EXEEXT)
+ @p='cpp03/can_require_concept_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp03/can_require_concept_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/require_free.log: cpp03/require_free$(EXEEXT)
+ @p='cpp03/require_free$(EXEEXT)'; \
+ b='cpp03/require_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/require_member.log: cpp03/require_member$(EXEEXT)
+ @p='cpp03/require_member$(EXEEXT)'; \
+ b='cpp03/require_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/require_static.log: cpp03/require_static$(EXEEXT)
+ @p='cpp03/require_static$(EXEEXT)'; \
+ b='cpp03/require_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_free.log: cpp03/can_require_free$(EXEEXT)
+ @p='cpp03/can_require_free$(EXEEXT)'; \
+ b='cpp03/can_require_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_member.log: cpp03/can_require_member$(EXEEXT)
+ @p='cpp03/can_require_member$(EXEEXT)'; \
+ b='cpp03/can_require_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_static.log: cpp03/can_require_static$(EXEEXT)
+ @p='cpp03/can_require_static$(EXEEXT)'; \
+ b='cpp03/can_require_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_unsupported.log: cpp03/can_require_unsupported$(EXEEXT)
+ @p='cpp03/can_require_unsupported$(EXEEXT)'; \
+ b='cpp03/can_require_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_not_applicable_free.log: cpp03/can_require_not_applicable_free$(EXEEXT)
+ @p='cpp03/can_require_not_applicable_free$(EXEEXT)'; \
+ b='cpp03/can_require_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_not_applicable_member.log: cpp03/can_require_not_applicable_member$(EXEEXT)
+ @p='cpp03/can_require_not_applicable_member$(EXEEXT)'; \
+ b='cpp03/can_require_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_not_applicable_static.log: cpp03/can_require_not_applicable_static$(EXEEXT)
+ @p='cpp03/can_require_not_applicable_static$(EXEEXT)'; \
+ b='cpp03/can_require_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_require_not_applicable_unsupported.log: cpp03/can_require_not_applicable_unsupported$(EXEEXT)
+ @p='cpp03/can_require_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp03/can_require_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/prefer_free_prefer.log: cpp03/prefer_free_prefer$(EXEEXT)
+ @p='cpp03/prefer_free_prefer$(EXEEXT)'; \
+ b='cpp03/prefer_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/prefer_member_prefer.log: cpp03/prefer_member_prefer$(EXEEXT)
+ @p='cpp03/prefer_member_prefer$(EXEEXT)'; \
+ b='cpp03/prefer_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/prefer_free_require.log: cpp03/prefer_free_require$(EXEEXT)
+ @p='cpp03/prefer_free_require$(EXEEXT)'; \
+ b='cpp03/prefer_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/prefer_member_require.log: cpp03/prefer_member_require$(EXEEXT)
+ @p='cpp03/prefer_member_require$(EXEEXT)'; \
+ b='cpp03/prefer_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/prefer_static.log: cpp03/prefer_static$(EXEEXT)
+ @p='cpp03/prefer_static$(EXEEXT)'; \
+ b='cpp03/prefer_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/prefer_unsupported.log: cpp03/prefer_unsupported$(EXEEXT)
+ @p='cpp03/prefer_unsupported$(EXEEXT)'; \
+ b='cpp03/prefer_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_free_prefer.log: cpp03/can_prefer_free_prefer$(EXEEXT)
+ @p='cpp03/can_prefer_free_prefer$(EXEEXT)'; \
+ b='cpp03/can_prefer_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_free_require.log: cpp03/can_prefer_free_require$(EXEEXT)
+ @p='cpp03/can_prefer_free_require$(EXEEXT)'; \
+ b='cpp03/can_prefer_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_member_prefer.log: cpp03/can_prefer_member_prefer$(EXEEXT)
+ @p='cpp03/can_prefer_member_prefer$(EXEEXT)'; \
+ b='cpp03/can_prefer_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_member_require.log: cpp03/can_prefer_member_require$(EXEEXT)
+ @p='cpp03/can_prefer_member_require$(EXEEXT)'; \
+ b='cpp03/can_prefer_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_static.log: cpp03/can_prefer_static$(EXEEXT)
+ @p='cpp03/can_prefer_static$(EXEEXT)'; \
+ b='cpp03/can_prefer_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_unsupported.log: cpp03/can_prefer_unsupported$(EXEEXT)
+ @p='cpp03/can_prefer_unsupported$(EXEEXT)'; \
+ b='cpp03/can_prefer_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_applicable_free_prefer.log: cpp03/can_prefer_not_applicable_free_prefer$(EXEEXT)
+ @p='cpp03/can_prefer_not_applicable_free_prefer$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_applicable_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_applicable_free_require.log: cpp03/can_prefer_not_applicable_free_require$(EXEEXT)
+ @p='cpp03/can_prefer_not_applicable_free_require$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_applicable_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_applicable_member_prefer.log: cpp03/can_prefer_not_applicable_member_prefer$(EXEEXT)
+ @p='cpp03/can_prefer_not_applicable_member_prefer$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_applicable_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_applicable_member_require.log: cpp03/can_prefer_not_applicable_member_require$(EXEEXT)
+ @p='cpp03/can_prefer_not_applicable_member_require$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_applicable_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_applicable_static.log: cpp03/can_prefer_not_applicable_static$(EXEEXT)
+ @p='cpp03/can_prefer_not_applicable_static$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_applicable_unsupported.log: cpp03/can_prefer_not_applicable_unsupported$(EXEEXT)
+ @p='cpp03/can_prefer_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_preferable_free_prefer.log: cpp03/can_prefer_not_preferable_free_prefer$(EXEEXT)
+ @p='cpp03/can_prefer_not_preferable_free_prefer$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_preferable_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_preferable_free_require.log: cpp03/can_prefer_not_preferable_free_require$(EXEEXT)
+ @p='cpp03/can_prefer_not_preferable_free_require$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_preferable_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_preferable_member_prefer.log: cpp03/can_prefer_not_preferable_member_prefer$(EXEEXT)
+ @p='cpp03/can_prefer_not_preferable_member_prefer$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_preferable_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_preferable_member_require.log: cpp03/can_prefer_not_preferable_member_require$(EXEEXT)
+ @p='cpp03/can_prefer_not_preferable_member_require$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_preferable_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_preferable_static.log: cpp03/can_prefer_not_preferable_static$(EXEEXT)
+ @p='cpp03/can_prefer_not_preferable_static$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_preferable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp03/can_prefer_not_preferable_unsupported.log: cpp03/can_prefer_not_preferable_unsupported$(EXEEXT)
+ @p='cpp03/can_prefer_not_preferable_unsupported$(EXEEXT)'; \
+ b='cpp03/can_prefer_not_preferable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/query_free.log: cpp11/query_free$(EXEEXT)
+ @p='cpp11/query_free$(EXEEXT)'; \
+ b='cpp11/query_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/query_member.log: cpp11/query_member$(EXEEXT)
+ @p='cpp11/query_member$(EXEEXT)'; \
+ b='cpp11/query_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/query_static.log: cpp11/query_static$(EXEEXT)
+ @p='cpp11/query_static$(EXEEXT)'; \
+ b='cpp11/query_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_free.log: cpp11/can_query_free$(EXEEXT)
+ @p='cpp11/can_query_free$(EXEEXT)'; \
+ b='cpp11/can_query_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_member.log: cpp11/can_query_member$(EXEEXT)
+ @p='cpp11/can_query_member$(EXEEXT)'; \
+ b='cpp11/can_query_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_static.log: cpp11/can_query_static$(EXEEXT)
+ @p='cpp11/can_query_static$(EXEEXT)'; \
+ b='cpp11/can_query_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_unsupported.log: cpp11/can_query_unsupported$(EXEEXT)
+ @p='cpp11/can_query_unsupported$(EXEEXT)'; \
+ b='cpp11/can_query_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_not_applicable_free.log: cpp11/can_query_not_applicable_free$(EXEEXT)
+ @p='cpp11/can_query_not_applicable_free$(EXEEXT)'; \
+ b='cpp11/can_query_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_not_applicable_member.log: cpp11/can_query_not_applicable_member$(EXEEXT)
+ @p='cpp11/can_query_not_applicable_member$(EXEEXT)'; \
+ b='cpp11/can_query_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_not_applicable_static.log: cpp11/can_query_not_applicable_static$(EXEEXT)
+ @p='cpp11/can_query_not_applicable_static$(EXEEXT)'; \
+ b='cpp11/can_query_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_query_not_applicable_unsupported.log: cpp11/can_query_not_applicable_unsupported$(EXEEXT)
+ @p='cpp11/can_query_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp11/can_query_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/require_concept_free.log: cpp11/require_concept_free$(EXEEXT)
+ @p='cpp11/require_concept_free$(EXEEXT)'; \
+ b='cpp11/require_concept_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/require_concept_member.log: cpp11/require_concept_member$(EXEEXT)
+ @p='cpp11/require_concept_member$(EXEEXT)'; \
+ b='cpp11/require_concept_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/require_concept_static.log: cpp11/require_concept_static$(EXEEXT)
+ @p='cpp11/require_concept_static$(EXEEXT)'; \
+ b='cpp11/require_concept_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_free.log: cpp11/can_require_concept_free$(EXEEXT)
+ @p='cpp11/can_require_concept_free$(EXEEXT)'; \
+ b='cpp11/can_require_concept_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_member.log: cpp11/can_require_concept_member$(EXEEXT)
+ @p='cpp11/can_require_concept_member$(EXEEXT)'; \
+ b='cpp11/can_require_concept_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_static.log: cpp11/can_require_concept_static$(EXEEXT)
+ @p='cpp11/can_require_concept_static$(EXEEXT)'; \
+ b='cpp11/can_require_concept_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_unsupported.log: cpp11/can_require_concept_unsupported$(EXEEXT)
+ @p='cpp11/can_require_concept_unsupported$(EXEEXT)'; \
+ b='cpp11/can_require_concept_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_not_applicable_free.log: cpp11/can_require_concept_not_applicable_free$(EXEEXT)
+ @p='cpp11/can_require_concept_not_applicable_free$(EXEEXT)'; \
+ b='cpp11/can_require_concept_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_not_applicable_member.log: cpp11/can_require_concept_not_applicable_member$(EXEEXT)
+ @p='cpp11/can_require_concept_not_applicable_member$(EXEEXT)'; \
+ b='cpp11/can_require_concept_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_not_applicable_static.log: cpp11/can_require_concept_not_applicable_static$(EXEEXT)
+ @p='cpp11/can_require_concept_not_applicable_static$(EXEEXT)'; \
+ b='cpp11/can_require_concept_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_concept_not_applicable_unsupported.log: cpp11/can_require_concept_not_applicable_unsupported$(EXEEXT)
+ @p='cpp11/can_require_concept_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp11/can_require_concept_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/require_free.log: cpp11/require_free$(EXEEXT)
+ @p='cpp11/require_free$(EXEEXT)'; \
+ b='cpp11/require_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/require_member.log: cpp11/require_member$(EXEEXT)
+ @p='cpp11/require_member$(EXEEXT)'; \
+ b='cpp11/require_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/require_static.log: cpp11/require_static$(EXEEXT)
+ @p='cpp11/require_static$(EXEEXT)'; \
+ b='cpp11/require_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_free.log: cpp11/can_require_free$(EXEEXT)
+ @p='cpp11/can_require_free$(EXEEXT)'; \
+ b='cpp11/can_require_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_member.log: cpp11/can_require_member$(EXEEXT)
+ @p='cpp11/can_require_member$(EXEEXT)'; \
+ b='cpp11/can_require_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_static.log: cpp11/can_require_static$(EXEEXT)
+ @p='cpp11/can_require_static$(EXEEXT)'; \
+ b='cpp11/can_require_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_unsupported.log: cpp11/can_require_unsupported$(EXEEXT)
+ @p='cpp11/can_require_unsupported$(EXEEXT)'; \
+ b='cpp11/can_require_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_not_applicable_free.log: cpp11/can_require_not_applicable_free$(EXEEXT)
+ @p='cpp11/can_require_not_applicable_free$(EXEEXT)'; \
+ b='cpp11/can_require_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_not_applicable_member.log: cpp11/can_require_not_applicable_member$(EXEEXT)
+ @p='cpp11/can_require_not_applicable_member$(EXEEXT)'; \
+ b='cpp11/can_require_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_not_applicable_static.log: cpp11/can_require_not_applicable_static$(EXEEXT)
+ @p='cpp11/can_require_not_applicable_static$(EXEEXT)'; \
+ b='cpp11/can_require_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_require_not_applicable_unsupported.log: cpp11/can_require_not_applicable_unsupported$(EXEEXT)
+ @p='cpp11/can_require_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp11/can_require_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/prefer_free_prefer.log: cpp11/prefer_free_prefer$(EXEEXT)
+ @p='cpp11/prefer_free_prefer$(EXEEXT)'; \
+ b='cpp11/prefer_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/prefer_member_prefer.log: cpp11/prefer_member_prefer$(EXEEXT)
+ @p='cpp11/prefer_member_prefer$(EXEEXT)'; \
+ b='cpp11/prefer_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/prefer_free_require.log: cpp11/prefer_free_require$(EXEEXT)
+ @p='cpp11/prefer_free_require$(EXEEXT)'; \
+ b='cpp11/prefer_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/prefer_member_require.log: cpp11/prefer_member_require$(EXEEXT)
+ @p='cpp11/prefer_member_require$(EXEEXT)'; \
+ b='cpp11/prefer_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/prefer_static.log: cpp11/prefer_static$(EXEEXT)
+ @p='cpp11/prefer_static$(EXEEXT)'; \
+ b='cpp11/prefer_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/prefer_unsupported.log: cpp11/prefer_unsupported$(EXEEXT)
+ @p='cpp11/prefer_unsupported$(EXEEXT)'; \
+ b='cpp11/prefer_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_free_prefer.log: cpp11/can_prefer_free_prefer$(EXEEXT)
+ @p='cpp11/can_prefer_free_prefer$(EXEEXT)'; \
+ b='cpp11/can_prefer_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_free_require.log: cpp11/can_prefer_free_require$(EXEEXT)
+ @p='cpp11/can_prefer_free_require$(EXEEXT)'; \
+ b='cpp11/can_prefer_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_member_prefer.log: cpp11/can_prefer_member_prefer$(EXEEXT)
+ @p='cpp11/can_prefer_member_prefer$(EXEEXT)'; \
+ b='cpp11/can_prefer_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_member_require.log: cpp11/can_prefer_member_require$(EXEEXT)
+ @p='cpp11/can_prefer_member_require$(EXEEXT)'; \
+ b='cpp11/can_prefer_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_static.log: cpp11/can_prefer_static$(EXEEXT)
+ @p='cpp11/can_prefer_static$(EXEEXT)'; \
+ b='cpp11/can_prefer_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_unsupported.log: cpp11/can_prefer_unsupported$(EXEEXT)
+ @p='cpp11/can_prefer_unsupported$(EXEEXT)'; \
+ b='cpp11/can_prefer_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_applicable_free_prefer.log: cpp11/can_prefer_not_applicable_free_prefer$(EXEEXT)
+ @p='cpp11/can_prefer_not_applicable_free_prefer$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_applicable_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_applicable_free_require.log: cpp11/can_prefer_not_applicable_free_require$(EXEEXT)
+ @p='cpp11/can_prefer_not_applicable_free_require$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_applicable_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_applicable_member_prefer.log: cpp11/can_prefer_not_applicable_member_prefer$(EXEEXT)
+ @p='cpp11/can_prefer_not_applicable_member_prefer$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_applicable_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_applicable_member_require.log: cpp11/can_prefer_not_applicable_member_require$(EXEEXT)
+ @p='cpp11/can_prefer_not_applicable_member_require$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_applicable_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_applicable_static.log: cpp11/can_prefer_not_applicable_static$(EXEEXT)
+ @p='cpp11/can_prefer_not_applicable_static$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_applicable_unsupported.log: cpp11/can_prefer_not_applicable_unsupported$(EXEEXT)
+ @p='cpp11/can_prefer_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_preferable_free_prefer.log: cpp11/can_prefer_not_preferable_free_prefer$(EXEEXT)
+ @p='cpp11/can_prefer_not_preferable_free_prefer$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_preferable_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_preferable_free_require.log: cpp11/can_prefer_not_preferable_free_require$(EXEEXT)
+ @p='cpp11/can_prefer_not_preferable_free_require$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_preferable_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_preferable_member_prefer.log: cpp11/can_prefer_not_preferable_member_prefer$(EXEEXT)
+ @p='cpp11/can_prefer_not_preferable_member_prefer$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_preferable_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_preferable_member_require.log: cpp11/can_prefer_not_preferable_member_require$(EXEEXT)
+ @p='cpp11/can_prefer_not_preferable_member_require$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_preferable_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_preferable_static.log: cpp11/can_prefer_not_preferable_static$(EXEEXT)
+ @p='cpp11/can_prefer_not_preferable_static$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_preferable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp11/can_prefer_not_preferable_unsupported.log: cpp11/can_prefer_not_preferable_unsupported$(EXEEXT)
+ @p='cpp11/can_prefer_not_preferable_unsupported$(EXEEXT)'; \
+ b='cpp11/can_prefer_not_preferable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/query_free.log: cpp14/query_free$(EXEEXT)
+ @p='cpp14/query_free$(EXEEXT)'; \
+ b='cpp14/query_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/query_member.log: cpp14/query_member$(EXEEXT)
+ @p='cpp14/query_member$(EXEEXT)'; \
+ b='cpp14/query_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/query_static.log: cpp14/query_static$(EXEEXT)
+ @p='cpp14/query_static$(EXEEXT)'; \
+ b='cpp14/query_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_free.log: cpp14/can_query_free$(EXEEXT)
+ @p='cpp14/can_query_free$(EXEEXT)'; \
+ b='cpp14/can_query_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_member.log: cpp14/can_query_member$(EXEEXT)
+ @p='cpp14/can_query_member$(EXEEXT)'; \
+ b='cpp14/can_query_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_static.log: cpp14/can_query_static$(EXEEXT)
+ @p='cpp14/can_query_static$(EXEEXT)'; \
+ b='cpp14/can_query_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_unsupported.log: cpp14/can_query_unsupported$(EXEEXT)
+ @p='cpp14/can_query_unsupported$(EXEEXT)'; \
+ b='cpp14/can_query_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_not_applicable_free.log: cpp14/can_query_not_applicable_free$(EXEEXT)
+ @p='cpp14/can_query_not_applicable_free$(EXEEXT)'; \
+ b='cpp14/can_query_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_not_applicable_member.log: cpp14/can_query_not_applicable_member$(EXEEXT)
+ @p='cpp14/can_query_not_applicable_member$(EXEEXT)'; \
+ b='cpp14/can_query_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_not_applicable_static.log: cpp14/can_query_not_applicable_static$(EXEEXT)
+ @p='cpp14/can_query_not_applicable_static$(EXEEXT)'; \
+ b='cpp14/can_query_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_query_not_applicable_unsupported.log: cpp14/can_query_not_applicable_unsupported$(EXEEXT)
+ @p='cpp14/can_query_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp14/can_query_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/require_concept_free.log: cpp14/require_concept_free$(EXEEXT)
+ @p='cpp14/require_concept_free$(EXEEXT)'; \
+ b='cpp14/require_concept_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/require_concept_member.log: cpp14/require_concept_member$(EXEEXT)
+ @p='cpp14/require_concept_member$(EXEEXT)'; \
+ b='cpp14/require_concept_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/require_concept_static.log: cpp14/require_concept_static$(EXEEXT)
+ @p='cpp14/require_concept_static$(EXEEXT)'; \
+ b='cpp14/require_concept_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_free.log: cpp14/can_require_concept_free$(EXEEXT)
+ @p='cpp14/can_require_concept_free$(EXEEXT)'; \
+ b='cpp14/can_require_concept_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_member.log: cpp14/can_require_concept_member$(EXEEXT)
+ @p='cpp14/can_require_concept_member$(EXEEXT)'; \
+ b='cpp14/can_require_concept_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_static.log: cpp14/can_require_concept_static$(EXEEXT)
+ @p='cpp14/can_require_concept_static$(EXEEXT)'; \
+ b='cpp14/can_require_concept_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_unsupported.log: cpp14/can_require_concept_unsupported$(EXEEXT)
+ @p='cpp14/can_require_concept_unsupported$(EXEEXT)'; \
+ b='cpp14/can_require_concept_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_not_applicable_free.log: cpp14/can_require_concept_not_applicable_free$(EXEEXT)
+ @p='cpp14/can_require_concept_not_applicable_free$(EXEEXT)'; \
+ b='cpp14/can_require_concept_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_not_applicable_member.log: cpp14/can_require_concept_not_applicable_member$(EXEEXT)
+ @p='cpp14/can_require_concept_not_applicable_member$(EXEEXT)'; \
+ b='cpp14/can_require_concept_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_not_applicable_static.log: cpp14/can_require_concept_not_applicable_static$(EXEEXT)
+ @p='cpp14/can_require_concept_not_applicable_static$(EXEEXT)'; \
+ b='cpp14/can_require_concept_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_concept_not_applicable_unsupported.log: cpp14/can_require_concept_not_applicable_unsupported$(EXEEXT)
+ @p='cpp14/can_require_concept_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp14/can_require_concept_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/require_free.log: cpp14/require_free$(EXEEXT)
+ @p='cpp14/require_free$(EXEEXT)'; \
+ b='cpp14/require_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/require_member.log: cpp14/require_member$(EXEEXT)
+ @p='cpp14/require_member$(EXEEXT)'; \
+ b='cpp14/require_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/require_static.log: cpp14/require_static$(EXEEXT)
+ @p='cpp14/require_static$(EXEEXT)'; \
+ b='cpp14/require_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_free.log: cpp14/can_require_free$(EXEEXT)
+ @p='cpp14/can_require_free$(EXEEXT)'; \
+ b='cpp14/can_require_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_member.log: cpp14/can_require_member$(EXEEXT)
+ @p='cpp14/can_require_member$(EXEEXT)'; \
+ b='cpp14/can_require_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_static.log: cpp14/can_require_static$(EXEEXT)
+ @p='cpp14/can_require_static$(EXEEXT)'; \
+ b='cpp14/can_require_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_unsupported.log: cpp14/can_require_unsupported$(EXEEXT)
+ @p='cpp14/can_require_unsupported$(EXEEXT)'; \
+ b='cpp14/can_require_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_not_applicable_free.log: cpp14/can_require_not_applicable_free$(EXEEXT)
+ @p='cpp14/can_require_not_applicable_free$(EXEEXT)'; \
+ b='cpp14/can_require_not_applicable_free'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_not_applicable_member.log: cpp14/can_require_not_applicable_member$(EXEEXT)
+ @p='cpp14/can_require_not_applicable_member$(EXEEXT)'; \
+ b='cpp14/can_require_not_applicable_member'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_not_applicable_static.log: cpp14/can_require_not_applicable_static$(EXEEXT)
+ @p='cpp14/can_require_not_applicable_static$(EXEEXT)'; \
+ b='cpp14/can_require_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_require_not_applicable_unsupported.log: cpp14/can_require_not_applicable_unsupported$(EXEEXT)
+ @p='cpp14/can_require_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp14/can_require_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/prefer_free_prefer.log: cpp14/prefer_free_prefer$(EXEEXT)
+ @p='cpp14/prefer_free_prefer$(EXEEXT)'; \
+ b='cpp14/prefer_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/prefer_member_prefer.log: cpp14/prefer_member_prefer$(EXEEXT)
+ @p='cpp14/prefer_member_prefer$(EXEEXT)'; \
+ b='cpp14/prefer_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/prefer_free_require.log: cpp14/prefer_free_require$(EXEEXT)
+ @p='cpp14/prefer_free_require$(EXEEXT)'; \
+ b='cpp14/prefer_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/prefer_member_require.log: cpp14/prefer_member_require$(EXEEXT)
+ @p='cpp14/prefer_member_require$(EXEEXT)'; \
+ b='cpp14/prefer_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/prefer_static.log: cpp14/prefer_static$(EXEEXT)
+ @p='cpp14/prefer_static$(EXEEXT)'; \
+ b='cpp14/prefer_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/prefer_unsupported.log: cpp14/prefer_unsupported$(EXEEXT)
+ @p='cpp14/prefer_unsupported$(EXEEXT)'; \
+ b='cpp14/prefer_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_free_prefer.log: cpp14/can_prefer_free_prefer$(EXEEXT)
+ @p='cpp14/can_prefer_free_prefer$(EXEEXT)'; \
+ b='cpp14/can_prefer_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_free_require.log: cpp14/can_prefer_free_require$(EXEEXT)
+ @p='cpp14/can_prefer_free_require$(EXEEXT)'; \
+ b='cpp14/can_prefer_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_member_prefer.log: cpp14/can_prefer_member_prefer$(EXEEXT)
+ @p='cpp14/can_prefer_member_prefer$(EXEEXT)'; \
+ b='cpp14/can_prefer_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_member_require.log: cpp14/can_prefer_member_require$(EXEEXT)
+ @p='cpp14/can_prefer_member_require$(EXEEXT)'; \
+ b='cpp14/can_prefer_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_static.log: cpp14/can_prefer_static$(EXEEXT)
+ @p='cpp14/can_prefer_static$(EXEEXT)'; \
+ b='cpp14/can_prefer_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_unsupported.log: cpp14/can_prefer_unsupported$(EXEEXT)
+ @p='cpp14/can_prefer_unsupported$(EXEEXT)'; \
+ b='cpp14/can_prefer_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_applicable_free_prefer.log: cpp14/can_prefer_not_applicable_free_prefer$(EXEEXT)
+ @p='cpp14/can_prefer_not_applicable_free_prefer$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_applicable_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_applicable_free_require.log: cpp14/can_prefer_not_applicable_free_require$(EXEEXT)
+ @p='cpp14/can_prefer_not_applicable_free_require$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_applicable_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_applicable_member_prefer.log: cpp14/can_prefer_not_applicable_member_prefer$(EXEEXT)
+ @p='cpp14/can_prefer_not_applicable_member_prefer$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_applicable_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_applicable_member_require.log: cpp14/can_prefer_not_applicable_member_require$(EXEEXT)
+ @p='cpp14/can_prefer_not_applicable_member_require$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_applicable_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_applicable_static.log: cpp14/can_prefer_not_applicable_static$(EXEEXT)
+ @p='cpp14/can_prefer_not_applicable_static$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_applicable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_applicable_unsupported.log: cpp14/can_prefer_not_applicable_unsupported$(EXEEXT)
+ @p='cpp14/can_prefer_not_applicable_unsupported$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_applicable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_preferable_free_prefer.log: cpp14/can_prefer_not_preferable_free_prefer$(EXEEXT)
+ @p='cpp14/can_prefer_not_preferable_free_prefer$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_preferable_free_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_preferable_free_require.log: cpp14/can_prefer_not_preferable_free_require$(EXEEXT)
+ @p='cpp14/can_prefer_not_preferable_free_require$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_preferable_free_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_preferable_member_prefer.log: cpp14/can_prefer_not_preferable_member_prefer$(EXEEXT)
+ @p='cpp14/can_prefer_not_preferable_member_prefer$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_preferable_member_prefer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_preferable_member_require.log: cpp14/can_prefer_not_preferable_member_require$(EXEEXT)
+ @p='cpp14/can_prefer_not_preferable_member_require$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_preferable_member_require'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_preferable_static.log: cpp14/can_prefer_not_preferable_static$(EXEEXT)
+ @p='cpp14/can_prefer_not_preferable_static$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_preferable_static'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+cpp14/can_prefer_not_preferable_unsupported.log: cpp14/can_prefer_not_preferable_unsupported$(EXEEXT)
+ @p='cpp14/can_prefer_not_preferable_unsupported$(EXEEXT)'; \
+ b='cpp14/can_prefer_not_preferable_unsupported'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f cpp03/$(DEPDIR)/$(am__dirstamp)
+ -rm -f cpp03/$(am__dirstamp)
+ -rm -f cpp11/$(DEPDIR)/$(am__dirstamp)
+ -rm -f cpp11/$(am__dirstamp)
+ -rm -f cpp14/$(DEPDIR)/$(am__dirstamp)
+ -rm -f cpp14/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f cpp03/$(DEPDIR)/can_prefer_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_static.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/query_free.Po
+ -rm -f cpp03/$(DEPDIR)/query_member.Po
+ -rm -f cpp03/$(DEPDIR)/query_static.Po
+ -rm -f cpp03/$(DEPDIR)/require_concept_free.Po
+ -rm -f cpp03/$(DEPDIR)/require_concept_member.Po
+ -rm -f cpp03/$(DEPDIR)/require_concept_static.Po
+ -rm -f cpp03/$(DEPDIR)/require_free.Po
+ -rm -f cpp03/$(DEPDIR)/require_member.Po
+ -rm -f cpp03/$(DEPDIR)/require_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_static.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/query_free.Po
+ -rm -f cpp11/$(DEPDIR)/query_member.Po
+ -rm -f cpp11/$(DEPDIR)/query_static.Po
+ -rm -f cpp11/$(DEPDIR)/require_concept_free.Po
+ -rm -f cpp11/$(DEPDIR)/require_concept_member.Po
+ -rm -f cpp11/$(DEPDIR)/require_concept_static.Po
+ -rm -f cpp11/$(DEPDIR)/require_free.Po
+ -rm -f cpp11/$(DEPDIR)/require_member.Po
+ -rm -f cpp11/$(DEPDIR)/require_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_static.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/query_free.Po
+ -rm -f cpp14/$(DEPDIR)/query_member.Po
+ -rm -f cpp14/$(DEPDIR)/query_static.Po
+ -rm -f cpp14/$(DEPDIR)/require_concept_free.Po
+ -rm -f cpp14/$(DEPDIR)/require_concept_member.Po
+ -rm -f cpp14/$(DEPDIR)/require_concept_static.Po
+ -rm -f cpp14/$(DEPDIR)/require_free.Po
+ -rm -f cpp14/$(DEPDIR)/require_member.Po
+ -rm -f cpp14/$(DEPDIR)/require_static.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f cpp03/$(DEPDIR)/can_prefer_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_prefer_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_query_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_concept_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_free.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_member.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_not_applicable_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_static.Po
+ -rm -f cpp03/$(DEPDIR)/can_require_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_free_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_free_require.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_member_prefer.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_member_require.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_static.Po
+ -rm -f cpp03/$(DEPDIR)/prefer_unsupported.Po
+ -rm -f cpp03/$(DEPDIR)/query_free.Po
+ -rm -f cpp03/$(DEPDIR)/query_member.Po
+ -rm -f cpp03/$(DEPDIR)/query_static.Po
+ -rm -f cpp03/$(DEPDIR)/require_concept_free.Po
+ -rm -f cpp03/$(DEPDIR)/require_concept_member.Po
+ -rm -f cpp03/$(DEPDIR)/require_concept_static.Po
+ -rm -f cpp03/$(DEPDIR)/require_free.Po
+ -rm -f cpp03/$(DEPDIR)/require_member.Po
+ -rm -f cpp03/$(DEPDIR)/require_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_prefer_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_query_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_concept_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_free.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_member.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_not_applicable_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_static.Po
+ -rm -f cpp11/$(DEPDIR)/can_require_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_free_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_free_require.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_member_prefer.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_member_require.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_static.Po
+ -rm -f cpp11/$(DEPDIR)/prefer_unsupported.Po
+ -rm -f cpp11/$(DEPDIR)/query_free.Po
+ -rm -f cpp11/$(DEPDIR)/query_member.Po
+ -rm -f cpp11/$(DEPDIR)/query_static.Po
+ -rm -f cpp11/$(DEPDIR)/require_concept_free.Po
+ -rm -f cpp11/$(DEPDIR)/require_concept_member.Po
+ -rm -f cpp11/$(DEPDIR)/require_concept_static.Po
+ -rm -f cpp11/$(DEPDIR)/require_free.Po
+ -rm -f cpp11/$(DEPDIR)/require_member.Po
+ -rm -f cpp11/$(DEPDIR)/require_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_not_preferable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_prefer_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_query_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_concept_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_free.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_member.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_not_applicable_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_static.Po
+ -rm -f cpp14/$(DEPDIR)/can_require_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_free_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_free_require.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_member_prefer.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_member_require.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_static.Po
+ -rm -f cpp14/$(DEPDIR)/prefer_unsupported.Po
+ -rm -f cpp14/$(DEPDIR)/query_free.Po
+ -rm -f cpp14/$(DEPDIR)/query_member.Po
+ -rm -f cpp14/$(DEPDIR)/query_static.Po
+ -rm -f cpp14/$(DEPDIR)/require_concept_free.Po
+ -rm -f cpp14/$(DEPDIR)/require_concept_member.Po
+ -rm -f cpp14/$(DEPDIR)/require_concept_static.Po
+ -rm -f cpp14/$(DEPDIR)/require_free.Po
+ -rm -f cpp14/$(DEPDIR)/require_member.Po
+ -rm -f cpp14/$(DEPDIR)/require_static.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+ check-am clean clean-checkPROGRAMS clean-generic cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp
new file mode 100644
index 00000000000..e9784f60661
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct prefer_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_prefer<object<1>, prop<2> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp
new file mode 100644
index 00000000000..693a46150d1
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_prefer<object<1>, prop<2> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp
new file mode 100644
index 00000000000..011a34764dc
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct prefer_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_prefer<object<1>, prop<2> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp
new file mode 100644
index 00000000000..9364391c935
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_prefer<object<1>, prop<2> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp
new file mode 100644
index 00000000000..8fd11c6f659
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_prefer_not_applicable_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct prefer_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp
new file mode 100644
index 00000000000..5c205ada2e7
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_prefer_not_applicable_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp
new file mode 100644
index 00000000000..15e93fd3a51
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_prefer_not_applicable_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct prefer_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp
new file mode 100644
index 00000000000..0a0f1f6ecf0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_prefer_not_applicable_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp
new file mode 100644
index 00000000000..f564d2fae01
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp
@@ -0,0 +1,45 @@
+//
+// cpp03/can_prefer_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<1> >::value));
+ assert((!asio::can_prefer<object<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_prefer<object<1>, prop<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<1> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<1>, prop<1>, prop<1> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..0711d7c4a4d
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp
@@ -0,0 +1,33 @@
+//
+// cpp03/can_prefer_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp
new file mode 100644
index 00000000000..3a522e5bed4
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_not_preferable_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct prefer_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp
new file mode 100644
index 00000000000..39ea91fefcb
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_not_preferable_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp
new file mode 100644
index 00000000000..e61f89872d0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_not_preferable_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct prefer_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp
new file mode 100644
index 00000000000..0052cc3ee50
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_prefer_not_preferable_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp
new file mode 100644
index 00000000000..f3428066587
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_prefer_not_preferable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<1> >::value));
+ assert((!asio::can_prefer<object<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_prefer<object<1>, prop<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<1> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<1>, prop<1>, prop<1> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp
new file mode 100644
index 00000000000..14695938c99
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp
@@ -0,0 +1,43 @@
+//
+// cpp03/can_prefer_not_preferable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_prefer<object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp
new file mode 100644
index 00000000000..ac1f5c186aa
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_prefer_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_prefer<object<1>, prop<1> >::value));
+ assert((asio::can_prefer<object<1>, prop<1>, prop<1> >::value));
+ assert((asio::can_prefer<object<1>, prop<1>, prop<1>, prop<1> >::value));
+ assert((asio::can_prefer<const object<1>, prop<1> >::value));
+ assert((asio::can_prefer<const object<1>, prop<1>, prop<1> >::value));
+ assert((asio::can_prefer<const object<1>, prop<1>, prop<1>, prop<1> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp
new file mode 100644
index 00000000000..e59e5d098f8
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp
@@ -0,0 +1,43 @@
+//
+// cpp03/can_prefer_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_prefer<object<1>, prop<2> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp
new file mode 100644
index 00000000000..d0d42fe7bdd
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp
@@ -0,0 +1,48 @@
+//
+// cpp03/can_query_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend int query(const object&, prop) { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct query_free<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_query<object, prop>::value));
+ assert((asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp
new file mode 100644
index 00000000000..9ead9be9751
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp
@@ -0,0 +1,48 @@
+//
+// cpp03/can_query_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ int query(prop) const { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct query_member<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_query<object, prop>::value));
+ assert((asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp
new file mode 100644
index 00000000000..b360327c132
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp
@@ -0,0 +1,41 @@
+//
+// cpp03/can_query_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend int query(const object&, prop) { return 123; }
+};
+
+namespace asio {
+namespace traits {
+
+template<>
+struct query_free<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_query<object, prop>::value));
+ assert((!asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp
new file mode 100644
index 00000000000..be339d05522
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp
@@ -0,0 +1,41 @@
+//
+// cpp03/can_query_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ int query(prop) const { return 123; }
+};
+
+namespace asio {
+namespace traits {
+
+template<>
+struct query_member<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_query<object, prop>::value));
+ assert((!asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp
new file mode 100644
index 00000000000..127e2ace42e
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp
@@ -0,0 +1,41 @@
+//
+// cpp03/can_query_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<>
+struct static_query<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+ static int value() { return 123; }
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_query<object, prop>::value));
+ assert((!asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..ec1c07affc1
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp
@@ -0,0 +1,26 @@
+//
+// cpp03/can_query_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+int main()
+{
+ assert((!asio::can_query<object, prop>::value));
+ assert((!asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp
new file mode 100644
index 00000000000..9a305712f1d
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp
@@ -0,0 +1,48 @@
+//
+// cpp03/can_query_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct static_query<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+ static int value() { return 123; }
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_query<object, prop>::value));
+ assert((asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp
new file mode 100644
index 00000000000..8eefbe9bd14
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp
@@ -0,0 +1,36 @@
+//
+// cpp03/can_query_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+
+template <>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_query<object, prop>::value));
+ assert((!asio::can_query<const object, prop>::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp
new file mode 100644
index 00000000000..810dfc240a2
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp
@@ -0,0 +1,55 @@
+//
+// cpp03/can_require_concept_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_concept_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp
new file mode 100644
index 00000000000..615e8a09cd7
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp
@@ -0,0 +1,55 @@
+//
+// cpp03/can_require_concept_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_concept_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp
new file mode 100644
index 00000000000..c076dd416cd
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp
@@ -0,0 +1,48 @@
+//
+// cpp03/can_require_concept_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct require_concept_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((!asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp
new file mode 100644
index 00000000000..e6e258e8424
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp
@@ -0,0 +1,48 @@
+//
+// cpp03/can_require_concept_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct require_concept_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((!asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp
new file mode 100644
index 00000000000..c42a1b3fca4
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp
@@ -0,0 +1,41 @@
+//
+// cpp03/can_require_concept_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<int N>
+struct static_require_concept<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((!asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..261c4be3728
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp
@@ -0,0 +1,28 @@
+//
+// cpp03/can_require_concept_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ assert((!asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((!asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp
new file mode 100644
index 00000000000..3c7d7bf4508
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp
@@ -0,0 +1,48 @@
+//
+// cpp03/can_require_concept_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require_concept<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_require_concept<object<1>, prop<1> >::value));
+ assert((asio::can_require_concept<const object<1>, prop<1> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp
new file mode 100644
index 00000000000..0fbcbd36525
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp
@@ -0,0 +1,38 @@
+//
+// cpp03/can_require_concept_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require_concept<object<1>, prop<2> >::value));
+ assert((!asio::can_require_concept<const object<1>, prop<2> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp
new file mode 100644
index 00000000000..fdd9241efa0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_require_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_require<object<1>, prop<2> >::value));
+ assert((asio::can_require<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_require<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_require<const object<1>, prop<2> >::value));
+ assert((asio::can_require<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_require<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp
new file mode 100644
index 00000000000..3f9a427333a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp
@@ -0,0 +1,59 @@
+//
+// cpp03/can_require_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_require<object<1>, prop<2> >::value));
+ assert((asio::can_require<object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_require<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((asio::can_require<const object<1>, prop<2> >::value));
+ assert((asio::can_require<const object<1>, prop<2>, prop<3> >::value));
+ assert((asio::can_require<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp
new file mode 100644
index 00000000000..4bf8ca32a2c
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_require_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require<object<1>, prop<2> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_require<const object<1>, prop<2> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp
new file mode 100644
index 00000000000..842c8d4bee9
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_require_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require<object<1>, prop<2> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_require<const object<1>, prop<2> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp
new file mode 100644
index 00000000000..e8d9ac63aa2
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp
@@ -0,0 +1,45 @@
+//
+// cpp03/can_require_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require<object<1>, prop<1> >::value));
+ assert((!asio::can_require<object<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_require<object<1>, prop<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_require<const object<1>, prop<1> >::value));
+ assert((!asio::can_require<const object<1>, prop<1>, prop<1> >::value));
+ assert((!asio::can_require<const object<1>, prop<1>, prop<1>, prop<1> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..6fe234731dc
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp
@@ -0,0 +1,32 @@
+//
+// cpp03/can_require_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ assert((!asio::can_require<object<1>, prop<2> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_require<const object<1>, prop<2> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp
new file mode 100644
index 00000000000..5d4a65749b2
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp03/can_require_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ assert((asio::can_require<object<1>, prop<1> >::value));
+ assert((asio::can_require<object<1>, prop<1>, prop<1> >::value));
+ assert((asio::can_require<object<1>, prop<1>, prop<1>, prop<1> >::value));
+ assert((asio::can_require<const object<1>, prop<1> >::value));
+ assert((asio::can_require<const object<1>, prop<1>, prop<1> >::value));
+ assert((asio::can_require<const object<1>, prop<1>, prop<1>, prop<1> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp
new file mode 100644
index 00000000000..f3bf74b0499
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp
@@ -0,0 +1,42 @@
+//
+// cpp03/can_require_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ assert((!asio::can_require<object<1>, prop<2> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<object<1>, prop<2>, prop<3>, prop<4> >::value));
+ assert((!asio::can_require<const object<1>, prop<2> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3> >::value));
+ assert((!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4> >::value));
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp
new file mode 100644
index 00000000000..dcf89c7f4af
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp
@@ -0,0 +1,68 @@
+//
+// cpp03/prefer_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct prefer_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp
new file mode 100644
index 00000000000..223d3a60921
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp
@@ -0,0 +1,68 @@
+//
+// cpp03/prefer_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp
new file mode 100644
index 00000000000..538f7b2662a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp
@@ -0,0 +1,68 @@
+//
+// cpp03/prefer_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct prefer_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp
new file mode 100644
index 00000000000..f659b6fc2bd
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp
@@ -0,0 +1,68 @@
+//
+// cpp03/prefer_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp
new file mode 100644
index 00000000000..f5fcb7f89a0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp
@@ -0,0 +1,61 @@
+//
+// cpp03/prefer_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::prefer(o1, prop<1>());
+ object<1> o3 = asio::prefer(o1, prop<1>(), prop<1>());
+ object<1> o4 = asio::prefer(o1, prop<1>(), prop<1>(), prop<1>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::prefer(o5, prop<1>());
+ object<1> o7 = asio::prefer(o5, prop<1>(), prop<1>());
+ object<1> o8 = asio::prefer(o5, prop<1>(), prop<1>(), prop<1>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp
new file mode 100644
index 00000000000..25e0f308a4a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp
@@ -0,0 +1,46 @@
+//
+// cpp03/prefer_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ const object<1>& o2 = asio::prefer(o1, prop<1>());
+ assert(&o1 == &o2);
+ (void)o2;
+
+ const object<1> o3 = {};
+ const object<1>& o4 = asio::prefer(o3, prop<1>());
+ assert(&o3 == &o4);
+ (void)o4;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp
new file mode 100644
index 00000000000..a9aae563293
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp
@@ -0,0 +1,55 @@
+//
+// cpp03/query_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend int query(const object&, prop) { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct query_free<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp
new file mode 100644
index 00000000000..a1ab83e0200
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp
@@ -0,0 +1,55 @@
+//
+// cpp03/query_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ int query(prop) const { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct query_member<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp
new file mode 100644
index 00000000000..b0e0b4040e4
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp
@@ -0,0 +1,55 @@
+//
+// cpp03/query_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct static_query<object, prop>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef int result_type;
+ static int value() { return 123; }
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp
new file mode 100644
index 00000000000..6cccdd2774e
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp
@@ -0,0 +1,60 @@
+//
+// cpp03/require_concept_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_concept_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require_concept(o1, prop<2>());
+ (void)o2;
+
+ const object<1> o3 = {};
+ object<2> o4 = asio::require_concept(o3, prop<2>());
+ (void)o4;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp
new file mode 100644
index 00000000000..673493292be
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp
@@ -0,0 +1,60 @@
+//
+// cpp03/require_concept_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_concept_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require_concept(o1, prop<2>());
+ (void)o2;
+
+ const object<1> o3 = {};
+ object<2> o4 = asio::require_concept(o3, prop<2>());
+ (void)o4;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp
new file mode 100644
index 00000000000..e92ffa1ef61
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp
@@ -0,0 +1,55 @@
+//
+// cpp03/require_concept_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require_concept<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ const object<1>& o2 = asio::require_concept(o1, prop<1>());
+ assert(&o1 == &o2);
+ (void)o2;
+
+ const object<1> o3 = {};
+ const object<1>& o4 = asio::require_concept(o3, prop<1>());
+ assert(&o3 == &o4);
+ (void)o4;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp
new file mode 100644
index 00000000000..04734ac3192
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp
@@ -0,0 +1,68 @@
+//
+// cpp03/require_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_free<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require(o1, prop<2>());
+ object<3> o3 = asio::require(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::require(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::require(o5, prop<2>());
+ object<3> o7 = asio::require(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::require(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp
new file mode 100644
index 00000000000..fc6bdc2c9c9
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp
@@ -0,0 +1,68 @@
+//
+// cpp03/require_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N, int M>
+struct require_member<object<N>, prop<M> >
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+ typedef object<M> result_type;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require(o1, prop<2>());
+ object<3> o3 = asio::require(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::require(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::require(o5, prop<2>());
+ object<3> o7 = asio::require(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::require(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp
new file mode 100644
index 00000000000..33512b32924
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp
@@ -0,0 +1,61 @@
+//
+// cpp03/require_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static const bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static const bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static const bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::require(o1, prop<1>());
+ object<1> o3 = asio::require(o1, prop<1>(), prop<1>());
+ object<1> o4 = asio::require(o1, prop<1>(), prop<1>(), prop<1>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::require(o5, prop<1>());
+ object<1> o7 = asio::require(o5, prop<1>(), prop<1>());
+ object<1> o8 = asio::require(o5, prop<1>(), prop<1>(), prop<1>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp
new file mode 100644
index 00000000000..860fa6fad5b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp
new file mode 100644
index 00000000000..b842e9aa4e9
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp
new file mode 100644
index 00000000000..9f00cbcaf38
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp
new file mode 100644
index 00000000000..a81bae1ae1c
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp
new file mode 100644
index 00000000000..9079c1fc832
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_prefer_not_applicable_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp
new file mode 100644
index 00000000000..52fc618ac97
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_prefer_not_applicable_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp
new file mode 100644
index 00000000000..93f0c85c934
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_prefer_not_applicable_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp
new file mode 100644
index 00000000000..e17ec93f80a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_prefer_not_applicable_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp
new file mode 100644
index 00000000000..9087ed42332
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp
@@ -0,0 +1,45 @@
+//
+// cpp11/can_prefer_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..b09d15708a1
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp
@@ -0,0 +1,33 @@
+//
+// cpp11/can_prefer_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp
new file mode 100644
index 00000000000..28a1d151b2d
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_not_preferable_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp
new file mode 100644
index 00000000000..cbb105416a4
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_not_preferable_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp
new file mode 100644
index 00000000000..2d460503b79
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_not_preferable_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp
new file mode 100644
index 00000000000..4e03c02d895
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_prefer_not_preferable_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp
new file mode 100644
index 00000000000..0791d8a02f5
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp
@@ -0,0 +1,43 @@
+//
+// cpp11/can_prefer_not_preferable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp
new file mode 100644
index 00000000000..059944ece37
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp
@@ -0,0 +1,43 @@
+//
+// cpp11/can_prefer_not_preferable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp
new file mode 100644
index 00000000000..c928f7ffd63
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp11/can_prefer_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_prefer<object<1>, prop<1>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<1>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp
new file mode 100644
index 00000000000..32d6ac5c0d3
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp
@@ -0,0 +1,43 @@
+//
+// cpp11/can_prefer_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_prefer<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_prefer<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp
new file mode 100644
index 00000000000..330493ba328
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp
@@ -0,0 +1,37 @@
+//
+// cpp11/can_query_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend constexpr int query(const object&, prop) { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_query<object, prop>::value, "");
+ static_assert(asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp
new file mode 100644
index 00000000000..e1442d9f296
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp
@@ -0,0 +1,37 @@
+//
+// cpp11/can_query_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ constexpr int query(prop) const { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_query<object, prop>::value, "");
+ static_assert(asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp
new file mode 100644
index 00000000000..2be49af0c64
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp
@@ -0,0 +1,27 @@
+//
+// cpp11/can_query_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend constexpr int query(const object&, prop) { return 123; }
+};
+
+int main()
+{
+ static_assert(!asio::can_query<object, prop>::value, "");
+ static_assert(!asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp
new file mode 100644
index 00000000000..788148df4a9
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp
@@ -0,0 +1,27 @@
+//
+// cpp11/can_query_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ constexpr int query(prop) const { return 123; }
+};
+
+int main()
+{
+ static_assert(!asio::can_query<object, prop>::value, "");
+ static_assert(!asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp
new file mode 100644
index 00000000000..c57848c7a9f
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp
@@ -0,0 +1,41 @@
+//
+// cpp11/can_query_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<>
+struct static_query<object, prop>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef int result_type;
+ static constexpr int value() { return 123; }
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_query<object, prop>::value, "");
+ static_assert(!asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..79bff6231ab
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp
@@ -0,0 +1,26 @@
+//
+// cpp11/can_query_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_query<object, prop>::value, "");
+ static_assert(!asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp
new file mode 100644
index 00000000000..6dc25819a43
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_query_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct static_query<object, prop>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef int result_type;
+ static constexpr int value() { return 123; }
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_query<object, prop>::value, "");
+ static_assert(asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp
new file mode 100644
index 00000000000..369955e474a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp
@@ -0,0 +1,36 @@
+//
+// cpp11/can_query_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_query<object, prop>::value, "");
+ static_assert(!asio::can_query<const object, prop>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp
new file mode 100644
index 00000000000..3dd617097a2
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp
@@ -0,0 +1,44 @@
+//
+// cpp11/can_require_concept_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp
new file mode 100644
index 00000000000..55ac468247b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp
@@ -0,0 +1,44 @@
+//
+// cpp11/can_require_concept_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp
new file mode 100644
index 00000000000..af40b48bdec
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp
@@ -0,0 +1,34 @@
+//
+// cpp11/can_require_concept_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp
new file mode 100644
index 00000000000..baf6b9f482f
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp
@@ -0,0 +1,34 @@
+//
+// cpp11/can_require_concept_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp
new file mode 100644
index 00000000000..7d7f13876d8
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp
@@ -0,0 +1,41 @@
+//
+// cpp11/can_require_concept_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<int N>
+struct static_require_concept<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..13e05b231b5
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp
@@ -0,0 +1,28 @@
+//
+// cpp11/can_require_concept_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp
new file mode 100644
index 00000000000..07973a5bd14
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_require_concept_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require_concept<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_require_concept<object<1>, prop<1>>::value, "");
+ static_assert(asio::can_require_concept<const object<1>, prop<1>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp
new file mode 100644
index 00000000000..4a4fee1f705
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_require_concept_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp
new file mode 100644
index 00000000000..b66965e60e1
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_require_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_require<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_require<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_require<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp
new file mode 100644
index 00000000000..cac464174f1
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp
@@ -0,0 +1,48 @@
+//
+// cpp11/can_require_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_require<object<1>, prop<2>>::value, "");
+ static_assert(asio::can_require<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_require<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<2>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp
new file mode 100644
index 00000000000..9705b87b244
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_require_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp
new file mode 100644
index 00000000000..cd7f75fef34
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp
@@ -0,0 +1,38 @@
+//
+// cpp11/can_require_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp
new file mode 100644
index 00000000000..f852e451513
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp
@@ -0,0 +1,45 @@
+//
+// cpp11/can_require_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_require<object<1>, prop<1>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<1>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..e6286aba02c
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp
@@ -0,0 +1,32 @@
+//
+// cpp11/can_require_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_require<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp
new file mode 100644
index 00000000000..4c1b38fc2c0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp11/can_require_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ static_assert(asio::can_require<object<1>, prop<1>>::value, "");
+ static_assert(asio::can_require<object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(asio::can_require<object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<1>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<1>, prop<1>>::value, "");
+ static_assert(asio::can_require<const object<1>, prop<1>, prop<1>, prop<1>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp
new file mode 100644
index 00000000000..bc9c4ed2072
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp
@@ -0,0 +1,42 @@
+//
+// cpp11/can_require_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_require<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>>::value, "");
+ static_assert(!asio::can_require<const object<1>, prop<2>, prop<3>, prop<4>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp
new file mode 100644
index 00000000000..3faf0019399
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp
@@ -0,0 +1,64 @@
+//
+// cpp11/prefer_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp
new file mode 100644
index 00000000000..f30d0fbb06f
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp
@@ -0,0 +1,64 @@
+//
+// cpp11/prefer_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp
new file mode 100644
index 00000000000..9803d5e5e95
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp
@@ -0,0 +1,64 @@
+//
+// cpp11/prefer_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp
new file mode 100644
index 00000000000..701fb2dec81
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp
@@ -0,0 +1,64 @@
+//
+// cpp11/prefer_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp
new file mode 100644
index 00000000000..18cd713d9d0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp
@@ -0,0 +1,68 @@
+//
+// cpp11/prefer_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::prefer(o1, prop<1>());
+ object<1> o3 = asio::prefer(o1, prop<1>(), prop<1>());
+ object<1> o4 = asio::prefer(o1, prop<1>(), prop<1>(), prop<1>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::prefer(o5, prop<1>());
+ object<1> o7 = asio::prefer(o5, prop<1>(), prop<1>());
+ object<1> o8 = asio::prefer(o5, prop<1>(), prop<1>(), prop<1>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<1> o9 = asio::prefer(object<1>(), prop<1>());
+ constexpr object<1> o10 = asio::prefer(object<1>(), prop<1>(), prop<1>());
+ constexpr object<1> o11 = asio::prefer(object<1>(), prop<1>(), prop<1>(), prop<1>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp
new file mode 100644
index 00000000000..8eb542301ec
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp
@@ -0,0 +1,59 @@
+//
+// cpp11/prefer_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::prefer(o1, prop<2>());
+ object<1> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<1> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::prefer(o5, prop<2>());
+ object<1> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<1> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<1> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<1> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<1> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp
new file mode 100644
index 00000000000..17a14dc3f5a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp
@@ -0,0 +1,49 @@
+//
+// cpp11/query_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend constexpr int query(const object&, prop) { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+
+ constexpr object o3 = {};
+ constexpr int result3 = asio::query(o3, prop());
+ assert(result3 == 123);
+ (void)result3;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp
new file mode 100644
index 00000000000..18ea24171ab
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp
@@ -0,0 +1,49 @@
+//
+// cpp11/query_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ constexpr int query(prop) const { return 123; }
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+
+ constexpr object o3 = {};
+ constexpr int result3 = asio::query(o3, prop());
+ assert(result3 == 123);
+ (void)result3;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp
new file mode 100644
index 00000000000..3290ab0971f
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp
@@ -0,0 +1,60 @@
+//
+// cpp11/query_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+namespace asio {
+
+template<>
+struct is_applicable_property<object, prop>
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<>
+struct static_query<object, prop>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef int result_type;
+ static constexpr int value() { return 123; }
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+
+ constexpr object o3 = {};
+ constexpr int result3 = asio::query(o3, prop());
+ assert(result3 == 123);
+ (void)result3;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp
new file mode 100644
index 00000000000..3f422988d2a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp
@@ -0,0 +1,52 @@
+//
+// cpp11/require_concept_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require_concept(o1, prop<2>());
+ (void)o2;
+
+ const object<1> o3 = {};
+ object<2> o4 = asio::require_concept(o3, prop<2>());
+ (void)o4;
+
+ constexpr object<2> o5 = asio::require_concept(object<1>(), prop<2>());
+ (void)o5;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp
new file mode 100644
index 00000000000..1f8bbf65b42
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp
@@ -0,0 +1,52 @@
+//
+// cpp11/require_concept_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require_concept(o1, prop<2>());
+ (void)o2;
+
+ const object<1> o3 = {};
+ object<2> o4 = asio::require_concept(o3, prop<2>());
+ (void)o4;
+
+ constexpr object<2> o5 = asio::require_concept(object<1>(), prop<2>());
+ (void)o5;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp
new file mode 100644
index 00000000000..b2a6f9dde39
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp
@@ -0,0 +1,58 @@
+//
+// cpp11/require_concept_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require_concept<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ const object<1>& o2 = asio::require_concept(o1, prop<1>());
+ assert(&o1 == &o2);
+ (void)o2;
+
+ const object<1> o3 = {};
+ const object<1>& o4 = asio::require_concept(o3, prop<1>());
+ assert(&o3 == &o4);
+ (void)o4;
+
+ constexpr object<1> o5 = asio::require_concept(object<1>(), prop<1>());
+ (void)o5;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp
new file mode 100644
index 00000000000..1acd5bc78ce
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp
@@ -0,0 +1,64 @@
+//
+// cpp11/require_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require(o1, prop<2>());
+ object<3> o3 = asio::require(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::require(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::require(o5, prop<2>());
+ object<3> o7 = asio::require(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::require(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::require(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::require(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::require(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp
new file mode 100644
index 00000000000..e9192830811
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp
@@ -0,0 +1,64 @@
+//
+// cpp11/require_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require(o1, prop<2>());
+ object<3> o3 = asio::require(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::require(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::require(o5, prop<2>());
+ object<3> o7 = asio::require(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::require(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::require(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::require(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::require(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp
new file mode 100644
index 00000000000..e752dac10a4
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp
@@ -0,0 +1,68 @@
+//
+// cpp11/require_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+namespace traits {
+
+template<int N>
+struct static_require<object<N>, prop<N> >
+{
+ static constexpr bool is_valid = true;
+};
+
+} // namespace traits
+} // namespace asio
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::require(o1, prop<1>());
+ object<1> o3 = asio::require(o1, prop<1>(), prop<1>());
+ object<1> o4 = asio::require(o1, prop<1>(), prop<1>(), prop<1>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::require(o5, prop<1>());
+ object<1> o7 = asio::require(o5, prop<1>(), prop<1>());
+ object<1> o8 = asio::require(o5, prop<1>(), prop<1>(), prop<1>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<1> o9 = asio::require(object<1>(), prop<1>());
+ constexpr object<1> o10 = asio::require(object<1>(), prop<1>(), prop<1>());
+ constexpr object<1> o11 = asio::require(object<1>(), prop<1>(), prop<1>(), prop<1>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp
new file mode 100644
index 00000000000..f7f2854233c
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp
new file mode 100644
index 00000000000..a2a01e4d739
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp
new file mode 100644
index 00000000000..b0d9622bd5b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp
new file mode 100644
index 00000000000..9d1146ad323
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp
new file mode 100644
index 00000000000..1a305fc3ae6
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_prefer_not_applicable_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp
new file mode 100644
index 00000000000..c5d732441d7
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_prefer_not_applicable_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp
new file mode 100644
index 00000000000..66af105ead3
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_prefer_not_applicable_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp
new file mode 100644
index 00000000000..a2bf20b6e89
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_prefer_not_applicable_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp
new file mode 100644
index 00000000000..123fd863f48
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp
@@ -0,0 +1,35 @@
+//
+// cpp14/can_prefer_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_preferable = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<1>, prop<1>, prop<1>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..ed67b39d6a2
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp
@@ -0,0 +1,32 @@
+//
+// cpp14/can_prefer_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp
new file mode 100644
index 00000000000..99cb8074746
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_not_preferable_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp
new file mode 100644
index 00000000000..0e3329de423
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_not_preferable_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp
new file mode 100644
index 00000000000..12213cd57e9
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_not_preferable_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp
new file mode 100644
index 00000000000..d801a808b4d
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_prefer_not_preferable_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp
new file mode 100644
index 00000000000..cbaf4eecc46
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp
@@ -0,0 +1,34 @@
+//
+// cpp14/can_prefer_not_preferable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<1>, prop<1>, prop<1>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp
new file mode 100644
index 00000000000..aa37aedd3c6
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp
@@ -0,0 +1,34 @@
+//
+// cpp14/can_prefer_not_preferable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = false;
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp
new file mode 100644
index 00000000000..3933a78839b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp
@@ -0,0 +1,36 @@
+//
+// cpp14/can_prefer_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(asio::can_prefer_v<object<1>, prop<1>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<1>, prop<1>>, "");
+ static_assert(asio::can_prefer_v<object<1>, prop<1>, prop<1>, prop<1>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<1>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<1>, prop<1>>, "");
+ static_assert(asio::can_prefer_v<const object<1>, prop<1>, prop<1>, prop<1>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp
new file mode 100644
index 00000000000..09ce8e02f18
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp
@@ -0,0 +1,42 @@
+//
+// cpp14/can_prefer_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_prefer_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp
new file mode 100644
index 00000000000..7654a78a06a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp
@@ -0,0 +1,28 @@
+//
+// cpp14/can_query_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+};
+
+struct object
+{
+ friend constexpr int query(const object&, prop) { return 123; }
+};
+
+int main()
+{
+ static_assert(asio::can_query_v<object, prop>, "");
+ static_assert(asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp
new file mode 100644
index 00000000000..6bd6c02c98b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp
@@ -0,0 +1,28 @@
+//
+// cpp14/can_query_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+};
+
+struct object
+{
+ constexpr int query(prop) const { return 123; }
+};
+
+int main()
+{
+ static_assert(asio::can_query_v<object, prop>, "");
+ static_assert(asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp
new file mode 100644
index 00000000000..bda1770699b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp
@@ -0,0 +1,27 @@
+//
+// cpp14/can_query_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ friend constexpr int query(const object&, prop) { return 123; }
+};
+
+int main()
+{
+ static_assert(!asio::can_query_v<object, prop>, "");
+ static_assert(!asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp
new file mode 100644
index 00000000000..25b6ab9c793
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp
@@ -0,0 +1,27 @@
+//
+// cpp14/can_query_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+ constexpr int query(prop) const { return 123; }
+};
+
+int main()
+{
+ static_assert(!asio::can_query_v<object, prop>, "");
+ static_assert(!asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp
new file mode 100644
index 00000000000..299a5e1f2a5
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp
@@ -0,0 +1,27 @@
+//
+// cpp14/can_query_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr int static_query_v = 123;
+};
+
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_query_v<object, prop>, "");
+ static_assert(!asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..cec0aea9167
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp
@@ -0,0 +1,26 @@
+//
+// cpp14/can_query_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+};
+
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_query_v<object, prop>, "");
+ static_assert(!asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp
new file mode 100644
index 00000000000..67b19ac74ed
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp
@@ -0,0 +1,28 @@
+//
+// cpp14/can_query_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ template <typename> static constexpr int static_query_v = 123;
+};
+
+struct object
+{
+};
+
+int main()
+{
+ static_assert(asio::can_query_v<object, prop>, "");
+ static_assert(asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp
new file mode 100644
index 00000000000..7e8f63f1405
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp
@@ -0,0 +1,27 @@
+//
+// cpp14/can_query_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+};
+
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_query_v<object, prop>, "");
+ static_assert(!asio::can_query_v<const object, prop>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp
new file mode 100644
index 00000000000..e0dea96edf0
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp
@@ -0,0 +1,35 @@
+//
+// cpp14/can_require_concept_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_require_concept_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_require_concept_v<const object<1>, prop<2>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp
new file mode 100644
index 00000000000..7da0a580a6f
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp
@@ -0,0 +1,35 @@
+//
+// cpp14/can_require_concept_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_require_concept_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_require_concept_v<const object<1>, prop<2>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp
new file mode 100644
index 00000000000..f6d48165356
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp
@@ -0,0 +1,34 @@
+//
+// cpp14/can_require_concept_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_concept_v<const object<1>, prop<2>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp
new file mode 100644
index 00000000000..5252cb77447
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp
@@ -0,0 +1,34 @@
+//
+// cpp14/can_require_concept_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_concept_v<const object<1>, prop<2>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp
new file mode 100644
index 00000000000..7da83a988fb
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp
@@ -0,0 +1,31 @@
+//
+// cpp14/can_require_concept_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable_concept = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_concept_v<const object<1>, prop<2>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..939b450be73
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp
@@ -0,0 +1,28 @@
+//
+// cpp14/can_require_concept_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_require_concept_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_concept_v<const object<1>, prop<2>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp
new file mode 100644
index 00000000000..577363a0eea
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp
@@ -0,0 +1,32 @@
+//
+// cpp14/can_require_concept_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable_concept = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(asio::can_require_concept_v<object<1>, prop<1>>, "");
+ static_assert(asio::can_require_concept_v<const object<1>, prop<1>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp
new file mode 100644
index 00000000000..2bcdc6c7606
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_require_concept_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_require_concept<object<1>, prop<2>>::value, "");
+ static_assert(!asio::can_require_concept<const object<1>, prop<2>>::value, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp
new file mode 100644
index 00000000000..f0bda074d5a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_require_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_require_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_require_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_require_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<2>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp
new file mode 100644
index 00000000000..0eeb0aa45c5
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp
@@ -0,0 +1,39 @@
+//
+// cpp14/can_require_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(asio::can_require_v<object<1>, prop<2>>, "");
+ static_assert(asio::can_require_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_require_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<2>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp
new file mode 100644
index 00000000000..f68576e2f1c
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_require_not_applicable_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp
new file mode 100644
index 00000000000..1c7aa953aeb
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp
@@ -0,0 +1,38 @@
+//
+// cpp14/can_require_not_applicable_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ static_assert(!asio::can_require_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp
new file mode 100644
index 00000000000..ba7b5a80ccc
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp
@@ -0,0 +1,35 @@
+//
+// cpp14/can_require_not_applicable_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ static constexpr bool is_requirable = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_require_v<object<1>, prop<1>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<1>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<1>, prop<1>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<1>, prop<1>, prop<1>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp
new file mode 100644
index 00000000000..25d71e35d48
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp
@@ -0,0 +1,32 @@
+//
+// cpp14/can_require_not_applicable_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(!asio::can_require_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp
new file mode 100644
index 00000000000..f92c0b56c8a
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp
@@ -0,0 +1,36 @@
+//
+// cpp14/can_require_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ static_assert(asio::can_require_v<object<1>, prop<1>>, "");
+ static_assert(asio::can_require_v<object<1>, prop<1>, prop<1>>, "");
+ static_assert(asio::can_require_v<object<1>, prop<1>, prop<1>, prop<1>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<1>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<1>, prop<1>>, "");
+ static_assert(asio::can_require_v<const object<1>, prop<1>, prop<1>, prop<1>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp
new file mode 100644
index 00000000000..4cf2756d40b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp
@@ -0,0 +1,42 @@
+//
+// cpp14/can_require_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+};
+
+template <int>
+struct object
+{
+};
+
+namespace asio {
+
+template<int N, int M>
+struct is_applicable_property<object<N>, prop<M> >
+{
+ static constexpr bool value = true;
+};
+
+} // namespace asio
+
+int main()
+{
+ static_assert(!asio::can_require_v<object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<object<1>, prop<2>, prop<3>, prop<4>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>>, "");
+ static_assert(!asio::can_require_v<const object<1>, prop<2>, prop<3>, prop<4>>, "");
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp
new file mode 100644
index 00000000000..fce83ed6b9f
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp
@@ -0,0 +1,55 @@
+//
+// cpp14/prefer_free_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> prefer(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp
new file mode 100644
index 00000000000..349aebeb515
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp
@@ -0,0 +1,55 @@
+//
+// cpp14/prefer_free_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp
new file mode 100644
index 00000000000..56d29efd34c
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp
@@ -0,0 +1,55 @@
+//
+// cpp14/prefer_member_prefer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> prefer(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp
new file mode 100644
index 00000000000..7b88df406e8
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp
@@ -0,0 +1,55 @@
+//
+// cpp14/prefer_member_require.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::prefer(o1, prop<2>());
+ object<3> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::prefer(o5, prop<2>());
+ object<3> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp
new file mode 100644
index 00000000000..8fd537ae74b
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp14/prefer_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::prefer(o1, prop<1>());
+ object<1> o3 = asio::prefer(o1, prop<1>(), prop<1>());
+ object<1> o4 = asio::prefer(o1, prop<1>(), prop<1>(), prop<1>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::prefer(o5, prop<1>());
+ object<1> o7 = asio::prefer(o5, prop<1>(), prop<1>());
+ object<1> o8 = asio::prefer(o5, prop<1>(), prop<1>(), prop<1>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<1> o9 = asio::prefer(object<1>(), prop<1>());
+ constexpr object<1> o10 = asio::prefer(object<1>(), prop<1>(), prop<1>());
+ constexpr object<1> o11 = asio::prefer(object<1>(), prop<1>(), prop<1>(), prop<1>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp
new file mode 100644
index 00000000000..50b8da0f9d3
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp
@@ -0,0 +1,50 @@
+//
+// cpp14/prefer_unsupported.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/prefer.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_preferable = true;
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::prefer(o1, prop<2>());
+ object<1> o3 = asio::prefer(o1, prop<2>(), prop<3>());
+ object<1> o4 = asio::prefer(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::prefer(o5, prop<2>());
+ object<1> o7 = asio::prefer(o5, prop<2>(), prop<3>());
+ object<1> o8 = asio::prefer(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<1> o9 = asio::prefer(object<1>(), prop<2>());
+ constexpr object<1> o10 = asio::prefer(object<1>(), prop<2>(), prop<3>());
+ constexpr object<1> o11 = asio::prefer(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp
new file mode 100644
index 00000000000..24be8dbe945
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp
@@ -0,0 +1,40 @@
+//
+// cpp14/query_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+};
+
+struct object
+{
+ friend constexpr int query(const object&, prop) { return 123; }
+};
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+
+ constexpr object o3 = {};
+ constexpr int result3 = asio::query(o3, prop());
+ assert(result3 == 123);
+ (void)result3;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp
new file mode 100644
index 00000000000..fab0bed9d03
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp
@@ -0,0 +1,40 @@
+//
+// cpp14/query_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+};
+
+struct object
+{
+ constexpr int query(prop) const { return 123; }
+};
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+
+ constexpr object o3 = {};
+ constexpr int result3 = asio::query(o3, prop());
+ assert(result3 == 123);
+ (void)result3;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp
new file mode 100644
index 00000000000..d13ad85c3c6
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp
@@ -0,0 +1,40 @@
+//
+// cpp14/query_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/query.hpp"
+#include <cassert>
+
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ template <typename> static constexpr int static_query_v = 123;
+};
+
+struct object
+{
+};
+
+int main()
+{
+ object o1 = {};
+ int result1 = asio::query(o1, prop());
+ assert(result1 == 123);
+ (void)result1;
+
+ const object o2 = {};
+ int result2 = asio::query(o2, prop());
+ assert(result2 == 123);
+ (void)result2;
+
+ constexpr object o3 = {};
+ constexpr int result3 = asio::query(o3, prop());
+ assert(result3 == 123);
+ (void)result3;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp
new file mode 100644
index 00000000000..d7323db95ba
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp
@@ -0,0 +1,43 @@
+//
+// cpp14/require_concept_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require_concept(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require_concept(o1, prop<2>());
+ (void)o2;
+
+ const object<1> o3 = {};
+ object<2> o4 = asio::require_concept(o3, prop<2>());
+ (void)o4;
+
+ constexpr object<2> o5 = asio::require_concept(object<1>(), prop<2>());
+ (void)o5;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp
new file mode 100644
index 00000000000..e21dda3f6e4
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp
@@ -0,0 +1,43 @@
+//
+// cpp14/require_concept_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable_concept = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require_concept(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require_concept(o1, prop<2>());
+ (void)o2;
+
+ const object<1> o3 = {};
+ object<2> o4 = asio::require_concept(o3, prop<2>());
+ (void)o4;
+
+ constexpr object<2> o5 = asio::require_concept(object<1>(), prop<2>());
+ (void)o5;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp
new file mode 100644
index 00000000000..523ed758061
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp
@@ -0,0 +1,42 @@
+//
+// cpp14/require_concept_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require_concept.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable_concept = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ object<1> o1 = {};
+ const object<1>& o2 = asio::require_concept(o1, prop<1>());
+ assert(&o1 == &o2);
+ (void)o2;
+
+ const object<1> o3 = {};
+ const object<1>& o4 = asio::require_concept(o3, prop<1>());
+ assert(&o3 == &o4);
+ (void)o4;
+
+ constexpr object<1> o5 = asio::require_concept(object<1>(), prop<1>());
+ (void)o5;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp
new file mode 100644
index 00000000000..32893ff26ee
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp
@@ -0,0 +1,55 @@
+//
+// cpp14/require_free.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ friend constexpr object<N> require(const object&, prop<N>)
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require(o1, prop<2>());
+ object<3> o3 = asio::require(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::require(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::require(o5, prop<2>());
+ object<3> o7 = asio::require(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::require(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::require(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::require(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::require(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp
new file mode 100644
index 00000000000..f2e58aa2f76
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp
@@ -0,0 +1,55 @@
+//
+// cpp14/require_member.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable = true;
+};
+
+template <int>
+struct object
+{
+ template <int N>
+ constexpr object<N> require(prop<N>) const
+ {
+ return object<N>();
+ }
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<2> o2 = asio::require(o1, prop<2>());
+ object<3> o3 = asio::require(o1, prop<2>(), prop<3>());
+ object<4> o4 = asio::require(o1, prop<2>(), prop<3>(), prop<4>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<2> o6 = asio::require(o5, prop<2>());
+ object<3> o7 = asio::require(o5, prop<2>(), prop<3>());
+ object<4> o8 = asio::require(o5, prop<2>(), prop<3>(), prop<4>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<2> o9 = asio::require(object<1>(), prop<2>());
+ constexpr object<3> o10 = asio::require(object<1>(), prop<2>(), prop<3>());
+ constexpr object<4> o11 = asio::require(object<1>(), prop<2>(), prop<3>(), prop<4>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp
new file mode 100644
index 00000000000..acdd7fbf499
--- /dev/null
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp
@@ -0,0 +1,52 @@
+//
+// cpp14/require_static.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+#include "asio/require.hpp"
+#include <cassert>
+
+template <int>
+struct prop
+{
+ template <typename> static constexpr bool is_applicable_property_v = true;
+ static constexpr bool is_requirable = true;
+ template <typename> static constexpr bool static_query_v = true;
+ static constexpr bool value() { return true; }
+};
+
+template <int>
+struct object
+{
+};
+
+int main()
+{
+ object<1> o1 = {};
+ object<1> o2 = asio::require(o1, prop<1>());
+ object<1> o3 = asio::require(o1, prop<1>(), prop<1>());
+ object<1> o4 = asio::require(o1, prop<1>(), prop<1>(), prop<1>());
+ (void)o2;
+ (void)o3;
+ (void)o4;
+
+ const object<1> o5 = {};
+ object<1> o6 = asio::require(o5, prop<1>());
+ object<1> o7 = asio::require(o5, prop<1>(), prop<1>());
+ object<1> o8 = asio::require(o5, prop<1>(), prop<1>(), prop<1>());
+ (void)o6;
+ (void)o7;
+ (void)o8;
+
+ constexpr object<1> o9 = asio::require(object<1>(), prop<1>());
+ constexpr object<1> o10 = asio::require(object<1>(), prop<1>(), prop<1>());
+ constexpr object<1> o11 = asio::require(object<1>(), prop<1>(), prop<1>(), prop<1>());
+ (void)o9;
+ (void)o10;
+ (void)o11;
+}
diff --git a/3rdparty/asio/src/tests/unit/.gitignore b/3rdparty/asio/src/tests/unit/.gitignore
deleted file mode 100644
index e11b5d56f36..00000000000
--- a/3rdparty/asio/src/tests/unit/.gitignore
+++ /dev/null
@@ -1,74 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-associated_allocator
-associated_executor
-async_result
-basic_datagram_socket
-basic_deadline_timer
-basic_raw_socket
-basic_seq_packet_socket
-basic_serial_port
-basic_signal_set
-basic_socket_acceptor
-basic_stream_socket
-basic_streambuf
-basic_waitable_timer
-bind_executor
-buffer
-buffered_read_stream
-buffered_stream
-buffered_write_stream
-buffers_iterator
-completion_condition
-connect
-coroutine
-datagram_socket_service
-deadline_timer
-deadline_timer_service
-defer
-dispatch
-error
-error_handler
-execution_context
-executor
-executor_work_guard
-high_resolution_timer
-io_context
-io_service
-is_read_buffered
-is_write_buffered
-packaged_task
-placeholders
-post
-raw_socket_service
-read
-read_at
-read_until
-seq_packet_socket_service
-serial_port
-serial_port_base
-serial_port_service
-signal_set
-signal_set_service
-socket_acceptor_service
-socket_base
-steady_timer
-strand
-stream_socket_service
-streambuf
-system_timer
-thread
-time_traits
-use_future
-uses_executor
-wait_traits
-waitable_timer_service
-write
-write_at
diff --git a/3rdparty/asio/src/tests/unit/any_completion_executor.cpp b/3rdparty/asio/src/tests/unit/any_completion_executor.cpp
new file mode 100644
index 00000000000..5d1d5b1e271
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/any_completion_executor.cpp
@@ -0,0 +1,463 @@
+//
+// any_completion_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/any_completion_executor.hpp"
+
+#include <cstring>
+#include <functional>
+#include "asio/system_executor.hpp"
+#include "asio/thread_pool.hpp"
+#include "unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+static bool next_nothrow_new_fails = false;
+
+void* operator new(std::size_t n,
+ const std::nothrow_t&) noexcept
+{
+ if (next_nothrow_new_fails)
+ {
+ next_nothrow_new_fails = false;
+ return 0;
+ }
+ return ::operator new(n);
+}
+
+struct fat_executor
+{
+ fat_executor(int id)
+ : id_(id)
+ {
+ std::memset(data_, 0, sizeof(data_));
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ == b.id_;
+ }
+
+ friend bool operator!=(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ != b.id_;
+ }
+
+ int id_;
+ unsigned char data_[1024];
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<fat_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<fat_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_completion_executor_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_completion_executor ex3(pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_completion_executor ex4(ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_completion_executor ex5(ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_completion_executor ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_completion_executor ex7 = fat_executor(1);
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_completion_executor ex8 = fat_executor(2);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_completion_executor ex9(ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_completion_executor ex10(std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex11(std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_completion_executor ex12(std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+}
+
+void any_completion_executor_nothrow_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_completion_executor ex3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_completion_executor ex4(std::nothrow, ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_completion_executor ex5(std::nothrow, ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_completion_executor ex6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_completion_executor ex7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_completion_executor ex8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_completion_executor ex9(std::nothrow, ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_completion_executor ex10(std::nothrow, std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex11(std::nothrow, std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_completion_executor ex12(std::nothrow, std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+
+ next_nothrow_new_fails = true;
+ asio::any_completion_executor ex13(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex13.target<void>() == 0);
+ ASIO_CHECK(ex13 == null_ptr);
+ ASIO_CHECK(ex13 == ex1);
+}
+
+void any_completion_executor_assignment_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_executor ex1;
+
+ asio::any_completion_executor ex2;
+ ex2 = null_ptr;
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+
+ asio::any_completion_executor ex3;
+ ex3 = pool.executor();
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+
+ asio::any_completion_executor ex4;
+ ex4 = ex1;
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == ex1);
+
+ ex4 = ex3;
+
+ ASIO_CHECK(ex4.target<void>() != 0);
+ ASIO_CHECK(ex4 == ex3);
+
+ asio::any_completion_executor ex5;
+ ex5 = fat_executor(1);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 != ex1);
+
+ asio::any_completion_executor ex6;
+ ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 == ex5);
+
+ ex6 = fat_executor(2);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 != ex5);
+
+ asio::any_completion_executor ex7;
+ ex7 = ex5;
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex5);
+ ASIO_CHECK(ex7 != ex6);
+
+ asio::any_completion_executor ex8;
+ ex8 = std::move(ex1);
+
+ ASIO_CHECK(ex8.target<void>() == 0);
+ ASIO_CHECK(ex1.target<void>() == 0);
+
+ ex8 = std::move(ex3);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex4);
+
+ ex8 = std::move(ex5);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex5.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex7);
+}
+
+void any_completion_executor_swap_test()
+{
+ thread_pool pool1(1);
+ thread_pool pool2(1);
+
+ asio::any_completion_executor ex1(pool1.executor());
+ asio::any_completion_executor ex2(pool2.executor());
+
+ asio::any_completion_executor ex3(ex1);
+ asio::any_completion_executor ex4(ex2);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+
+ ex3.swap(ex4);
+
+ ASIO_CHECK(ex3 == ex2);
+ ASIO_CHECK(ex4 == ex1);
+
+ execution::swap(ex3, ex4);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+}
+
+void any_completion_executor_query_test()
+{
+ thread_pool pool(1);
+ asio::any_completion_executor ex(pool.executor());
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+}
+
+void any_completion_executor_execute_test()
+{
+ int count = 0;
+ thread_pool pool(1);
+ asio::any_completion_executor ex(pool.executor());
+
+ ex.execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex, asio::execution::blocking.possibly).execute(
+ bindns::bind(increment, &count));
+
+ asio::prefer(ex,
+ asio::execution::blocking.possibly,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex,
+ asio::execution::blocking.possibly,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex,
+ asio::execution::blocking.possibly,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ pool.wait();
+
+ ASIO_CHECK(count == 5);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_completion_executor",
+ ASIO_TEST_CASE(any_completion_executor_construction_test)
+ ASIO_TEST_CASE(any_completion_executor_nothrow_construction_test)
+ ASIO_TEST_CASE(any_completion_executor_assignment_test)
+ ASIO_TEST_CASE(any_completion_executor_swap_test)
+ ASIO_TEST_CASE(any_completion_executor_query_test)
+ ASIO_TEST_CASE(any_completion_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/any_completion_handler.cpp b/3rdparty/asio/src/tests/unit/any_completion_handler.cpp
new file mode 100644
index 00000000000..887402de8d3
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/any_completion_handler.cpp
@@ -0,0 +1,260 @@
+//
+// any_completion_handler.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/any_completion_handler.hpp"
+
+#include "unit_test.hpp"
+
+#include <functional>
+#include "asio/bind_allocator.hpp"
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/bind_executor.hpp"
+#include "asio/bind_immediate_executor.hpp"
+#include "asio/error.hpp"
+#include "asio/thread_pool.hpp"
+
+namespace bindns = std;
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_completion_handler_construction_test()
+{
+ int count = 0;
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_handler<void()> h1;
+
+ ASIO_CHECK(!h1);
+ ASIO_CHECK(h1 == null_ptr);
+
+ asio::any_completion_handler<void()> h2(null_ptr);
+
+ ASIO_CHECK(!h2);
+ ASIO_CHECK(h2 == null_ptr);
+
+ asio::any_completion_handler<void()> h3(
+ bindns::bind(&increment, &count));
+
+ ASIO_CHECK(!!h3);
+ ASIO_CHECK(h3 != null_ptr);
+
+ asio::any_completion_handler<void()> h4(std::move(h1));
+
+ ASIO_CHECK(!h4);
+ ASIO_CHECK(h4 == null_ptr);
+ ASIO_CHECK(!h1);
+ ASIO_CHECK(h1 == null_ptr);
+
+ asio::any_completion_handler<void()> h5(std::move(h3));
+
+ ASIO_CHECK(!!h5);
+ ASIO_CHECK(h5 != null_ptr);
+ ASIO_CHECK(!h3);
+ ASIO_CHECK(h3 == null_ptr);
+
+ asio::any_completion_handler<void()> h6(std::move(h5));
+
+ ASIO_CHECK(!!h6);
+ ASIO_CHECK(h6 != null_ptr);
+ ASIO_CHECK(!h5);
+ ASIO_CHECK(h5 == null_ptr);
+}
+
+void any_completion_handler_assignment_test()
+{
+ int count = 0;
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_handler<void()> h1;
+
+ asio::any_completion_handler<void()> h2;
+ h2 = null_ptr;
+
+ ASIO_CHECK(!h2);
+
+ asio::any_completion_handler<void()> h3;
+ h3 = bindns::bind(&increment, &count);
+
+ ASIO_CHECK(!!h3);
+
+ asio::any_completion_handler<void()> h4;
+ h4 = std::move(h1);
+
+ ASIO_CHECK(!h4);
+ ASIO_CHECK(!h1);
+
+ h4 = std::move(h3);
+
+ ASIO_CHECK(!!h4);
+ ASIO_CHECK(!h3);
+}
+
+template <typename T>
+class handler_allocator
+{
+public:
+ using value_type = T;
+
+ explicit handler_allocator(int* count)
+ : count_(count)
+ {
+ }
+
+ template <typename U>
+ handler_allocator(const handler_allocator<U>& other) noexcept
+ : count_(other.count_)
+ {
+ }
+
+ bool operator==(const handler_allocator& other) const noexcept
+ {
+ return &count_ == &other.count_;
+ }
+
+ bool operator!=(const handler_allocator& other) const noexcept
+ {
+ return &count_ != &other.count_;
+ }
+
+ T* allocate(std::size_t n) const
+ {
+ ++(*count_);
+ return static_cast<T*>(::operator new(sizeof(T) * n));
+ }
+
+ void deallocate(T* p, std::size_t /*n*/) const
+ {
+ ::operator delete(p);
+ }
+
+private:
+ template <typename> friend class handler_allocator;
+
+ int* count_;
+};
+
+class cancel_handler
+{
+public:
+ explicit cancel_handler(int* count)
+ : count_(count)
+ {
+ }
+
+ void operator()(asio::cancellation_type_t)
+ {
+ ++(*count_);
+ }
+
+private:
+ int* count_;
+};
+
+void any_completion_handler_associator_test()
+{
+ typedef asio::any_completion_handler<void()> handler_type;
+
+ int count = 0;
+ int alloc_count = 0;
+ int cancel_count = 0;
+ asio::thread_pool pool(1);
+ asio::cancellation_signal sig;
+
+ asio::any_completion_handler<void()> h1(
+ asio::bind_allocator(handler_allocator<char>(&alloc_count),
+ asio::bind_cancellation_slot(sig.slot(),
+ asio::bind_executor(pool.get_executor(),
+ asio::bind_immediate_executor(asio::system_executor(),
+ bindns::bind(&increment, &count))))));
+
+ ASIO_CHECK(alloc_count == 1);
+
+ ASIO_REBIND_ALLOC(asio::associated_allocator<handler_type>::type,
+ char) alloc1(asio::get_associated_allocator(h1));
+ alloc1.deallocate(alloc1.allocate(1), 1);
+
+ ASIO_CHECK(alloc_count == 2);
+
+ asio::associated_cancellation_slot<handler_type>::type slot1
+ = asio::get_associated_cancellation_slot(h1);
+
+ ASIO_CHECK(slot1.is_connected());
+
+ slot1.emplace<cancel_handler>(&cancel_count);
+
+ ASIO_CHECK(cancel_count == 0);
+
+ sig.emit(asio::cancellation_type::terminal);
+
+ ASIO_CHECK(cancel_count == 1);
+
+ asio::associated_executor<handler_type>::type ex1
+ = asio::get_associated_executor(h1);
+
+ ASIO_CHECK(ex1 == pool.get_executor());
+
+ asio::associated_immediate_executor<
+ handler_type, asio::thread_pool::executor_type>::type ex2
+ = asio::get_associated_immediate_executor(h1, pool.get_executor());
+
+ ASIO_CHECK(ex2 == asio::system_executor());
+}
+
+void increment_with_error(asio::error_code ec,
+ asio::error_code* out_ec, int* count)
+{
+ *out_ec = ec;
+ ++(*count);
+}
+
+void any_completion_handler_invocation_test()
+{
+ int count = 0;
+ asio::error_code ec;
+
+ asio::any_completion_handler<void()> h1(
+ bindns::bind(&increment, &count));
+
+ ASIO_CHECK(count == 0);
+
+ std::move(h1)();
+
+ ASIO_CHECK(count == 1);
+
+ asio::any_completion_handler<void(asio::error_code)> h2(
+ bindns::bind(&increment_with_error,
+ bindns::placeholders::_1, &ec, &count));
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(count == 1);
+
+ std::move(h2)(asio::error::eof);
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 2);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_completion_handler",
+ ASIO_TEST_CASE(any_completion_handler_construction_test)
+ ASIO_TEST_CASE(any_completion_handler_assignment_test)
+ ASIO_TEST_CASE(any_completion_handler_associator_test)
+ ASIO_TEST_CASE(any_completion_handler_invocation_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/any_io_executor.cpp b/3rdparty/asio/src/tests/unit/any_io_executor.cpp
new file mode 100644
index 00000000000..e0a32ba3838
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/any_io_executor.cpp
@@ -0,0 +1,515 @@
+//
+// any_io_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/any_io_executor.hpp"
+
+#include <cstring>
+#include <functional>
+#include "asio/system_executor.hpp"
+#include "asio/thread_pool.hpp"
+#include "unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+static bool next_nothrow_new_fails = false;
+
+void* operator new(std::size_t n,
+ const std::nothrow_t&) noexcept
+{
+ if (next_nothrow_new_fails)
+ {
+ next_nothrow_new_fails = false;
+ return 0;
+ }
+ return ::operator new(n);
+}
+
+struct fat_executor
+{
+ fat_executor(int id)
+ : id_(id)
+ {
+ std::memset(data_, 0, sizeof(data_));
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ execution_context& query(execution::context_t) const noexcept
+ {
+ return asio::query(system_executor(), execution::context);
+ }
+
+ constexpr static execution::blocking_t::never_t query(
+ execution::blocking_t) noexcept
+ {
+ return execution::blocking.never;
+ }
+
+ friend bool operator==(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ == b.id_;
+ }
+
+ friend bool operator!=(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ != b.id_;
+ }
+
+ int id_;
+ unsigned char data_[1024];
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<fat_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <>
+struct query_member<fat_executor, execution::context_t>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution_context& result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Property>
+struct query_static_constexpr_member<fat_executor, Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::blocking_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_t::never_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<fat_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_io_executor_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_io_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_io_executor ex3(pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_io_executor ex4(ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_io_executor ex5(ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_io_executor ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_io_executor ex7 = fat_executor(1);
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_io_executor ex8 = fat_executor(2);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_io_executor ex9(ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_io_executor ex10(std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex11(std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_io_executor ex12(std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+}
+
+void any_io_executor_nothrow_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_io_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_io_executor ex3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_io_executor ex4(std::nothrow, ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_io_executor ex5(std::nothrow, ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_io_executor ex6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_io_executor ex7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_io_executor ex8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_io_executor ex9(std::nothrow, ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_io_executor ex10(std::nothrow, std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex11(std::nothrow, std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_io_executor ex12(std::nothrow, std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+
+ next_nothrow_new_fails = true;
+ asio::any_io_executor ex13(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex13.target<void>() == 0);
+ ASIO_CHECK(ex13 == null_ptr);
+ ASIO_CHECK(ex13 == ex1);
+}
+
+void any_io_executor_assignment_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_io_executor ex1;
+
+ asio::any_io_executor ex2;
+ ex2 = null_ptr;
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+
+ asio::any_io_executor ex3;
+ ex3 = pool.executor();
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+
+ asio::any_io_executor ex4;
+ ex4 = ex1;
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == ex1);
+
+ ex4 = ex3;
+
+ ASIO_CHECK(ex4.target<void>() != 0);
+ ASIO_CHECK(ex4 == ex3);
+
+ asio::any_io_executor ex5;
+ ex5 = fat_executor(1);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 != ex1);
+
+ asio::any_io_executor ex6;
+ ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 == ex5);
+
+ ex6 = fat_executor(2);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 != ex5);
+
+ asio::any_io_executor ex7;
+ ex7 = ex5;
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex5);
+ ASIO_CHECK(ex7 != ex6);
+
+ asio::any_io_executor ex8;
+ ex8 = std::move(ex1);
+
+ ASIO_CHECK(ex8.target<void>() == 0);
+ ASIO_CHECK(ex1.target<void>() == 0);
+
+ ex8 = std::move(ex3);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex4);
+
+ ex8 = std::move(ex5);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex5.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex7);
+}
+
+void any_io_executor_swap_test()
+{
+ thread_pool pool1(1);
+ thread_pool pool2(1);
+
+ asio::any_io_executor ex1(pool1.executor());
+ asio::any_io_executor ex2(pool2.executor());
+
+ asio::any_io_executor ex3(ex1);
+ asio::any_io_executor ex4(ex2);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+
+ ex3.swap(ex4);
+
+ ASIO_CHECK(ex3 == ex2);
+ ASIO_CHECK(ex4 == ex1);
+
+ execution::swap(ex3, ex4);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+}
+
+void any_io_executor_query_test()
+{
+ thread_pool pool(1);
+ asio::any_io_executor ex(pool.executor());
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+}
+
+void any_io_executor_execute_test()
+{
+ int count = 0;
+ thread_pool pool(1);
+ asio::any_io_executor ex(pool.executor());
+
+ ex.execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex, asio::execution::blocking.possibly).execute(
+ bindns::bind(increment, &count));
+
+ asio::require(ex, asio::execution::blocking.never).execute(
+ bindns::bind(increment, &count));
+
+ asio::require(
+ asio::prefer(ex, asio::execution::outstanding_work.tracked),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(
+ asio::prefer(ex,
+ asio::execution::outstanding_work.untracked),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(
+ asio::prefer(ex,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ pool.wait();
+
+ ASIO_CHECK(count == 6);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_io_executor",
+ ASIO_TEST_CASE(any_io_executor_construction_test)
+ ASIO_TEST_CASE(any_io_executor_nothrow_construction_test)
+ ASIO_TEST_CASE(any_io_executor_assignment_test)
+ ASIO_TEST_CASE(any_io_executor_swap_test)
+ ASIO_TEST_CASE(any_io_executor_query_test)
+ ASIO_TEST_CASE(any_io_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/append.cpp b/3rdparty/asio/src/tests/unit/append.cpp
new file mode 100644
index 00000000000..9aa00e3bfa4
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/append.cpp
@@ -0,0 +1,58 @@
+//
+// append.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/append.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+void append_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::append(
+ asio::bind_executor(io2.get_executor(),
+ [&count](asio::error_code, int a, int b)
+ {
+ ++count;
+ ASIO_CHECK(a == 123);
+ ASIO_CHECK(b == 321);
+ }), 123, 321));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "append",
+ ASIO_TEST_CASE(append_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp b/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp
index 331d8ac32ef..3c2b1308bd8 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp
@@ -1,8 +1,8 @@
//
-// async_ops.hpp
-// ~~~~~~~~~~~~~
+// archetypes/async_ops.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -11,30 +11,22 @@
#ifndef ARCHETYPES_ASYNC_OPS_HPP
#define ARCHETYPES_ASYNC_OPS_HPP
-#include <asio/associated_allocator.hpp>
-#include <asio/associated_executor.hpp>
-#include <asio/async_result.hpp>
-#include <asio/error.hpp>
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
+#include <functional>
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/error.hpp"
namespace archetypes {
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void())
-async_op_0(ASIO_MOVE_ARG(CompletionToken) token)
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void()>::return_type
+async_op_0(CompletionToken&& token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void()>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -46,16 +38,17 @@ async_op_0(ASIO_MOVE_ARG(CompletionToken) token)
typename asio::associated_executor<handler_type>::type ex
= asio::get_associated_executor(completion.completion_handler);
- ex.post(ASIO_MOVE_CAST(handler_type)(completion.completion_handler), a);
+ ex.post(static_cast<handler_type&&>(completion.completion_handler), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(asio::error_code))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code)>::return_type
async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -71,14 +64,14 @@ async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code()), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted)), a);
}
@@ -86,10 +79,11 @@ async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(std::exception_ptr))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr)>::return_type
async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -105,14 +99,14 @@ async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr()), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah"))), a);
}
@@ -120,10 +114,11 @@ async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(int)>::return_type
async_op_1(ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(int)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -137,18 +132,18 @@ async_op_1(ASIO_MOVE_ARG(CompletionToken) token)
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
42), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(asio::error_code, int))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code, int)>::return_type
async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code, int)>::completion_handler_type
handler_type;
@@ -165,14 +160,14 @@ async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(), 42), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted),
0), a);
}
@@ -181,10 +176,11 @@ async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(std::exception_ptr, int))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr, int)>::return_type
async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr, int)>::completion_handler_type
handler_type;
@@ -201,14 +197,14 @@ async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr(), 42), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah")), 0), a);
}
@@ -216,10 +212,11 @@ async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int, double))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(int, double)>::return_type
async_op_2(ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(int, double)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -233,18 +230,18 @@ async_op_2(ASIO_MOVE_ARG(CompletionToken) token)
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
42, 2.0), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(asio::error_code, int, double))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code, int, double)>::return_type
async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code, int, double)>::completion_handler_type
handler_type;
@@ -261,14 +258,14 @@ async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(), 42, 2.0), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted),
0, 0.0), a);
}
@@ -277,11 +274,11 @@ async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(std::exception_ptr, int, double))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr, int, double)>::return_type
async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr, int, double)>::completion_handler_type
handler_type;
@@ -298,14 +295,14 @@ async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr(), 42, 2.0), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah")), 0, 0.0), a);
}
@@ -313,10 +310,11 @@ async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int, double, char))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(int, double, char)>::return_type
async_op_3(ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(int, double, char)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -330,18 +328,18 @@ async_op_3(ASIO_MOVE_ARG(CompletionToken) token)
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
42, 2.0, 'a'), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(asio::error_code, int, double, char))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code, int, double, char)>::return_type
async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code, int, double, char)>::completion_handler_type
handler_type;
@@ -358,14 +356,14 @@ async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(), 42, 2.0, 'a'), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted),
0, 0.0, 'z'), a);
}
@@ -374,11 +372,11 @@ async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(std::exception_ptr, int, double, char))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr, int, double, char)>::return_type
async_op_ex_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr, int, double, char)>::completion_handler_type
handler_type;
@@ -395,14 +393,14 @@ async_op_ex_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr(), 42, 2.0, 'a'), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah")),
0, 0.0, 'z'), a);
}
diff --git a/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp b/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp
index afd9e56f191..bfd9cf1aac2 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp
@@ -2,7 +2,7 @@
// async_result.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -12,34 +12,79 @@
#define ARCHETYPES_ASYNC_RESULT_HPP
#include <asio/async_result.hpp>
+#include <asio/system_executor.hpp>
namespace archetypes {
+struct immediate_handler
+{
+};
+
struct lazy_handler
{
};
-struct concrete_handler
+template <typename Signature>
+struct concrete_handler;
+
+template <typename R, typename Arg1>
+struct concrete_handler<R(Arg1)>
{
- concrete_handler(lazy_handler)
+ concrete_handler()
{
}
- template <typename Arg1>
- void operator()(Arg1)
+ void operator()(typename asio::decay<Arg1>::type)
{
}
- template <typename Arg1, typename Arg2>
- void operator()(Arg1, Arg2)
+ concrete_handler(concrete_handler&&) {}
+private:
+ concrete_handler(const concrete_handler&);
+};
+
+template <typename R, typename Arg1, typename Arg2>
+struct concrete_handler<R(Arg1, Arg2)>
+{
+ concrete_handler()
{
}
-#if defined(ASIO_HAS_MOVE)
- concrete_handler(concrete_handler&&) {}
+ void operator()(typename asio::decay<Arg1>::type,
+ typename asio::decay<Arg2>::type)
+ {
+ }
+};
+
+template <typename Signature>
+struct immediate_concrete_handler : concrete_handler<Signature>
+{
+ typedef asio::system_executor immediate_executor_type;
+
+ immediate_concrete_handler(immediate_handler)
+ {
+ }
+
+ immediate_executor_type get_immediate_executor() const noexcept
+ {
+ return immediate_executor_type();
+ }
+
+ immediate_concrete_handler(immediate_concrete_handler&&) {}
private:
- concrete_handler(const concrete_handler&);
-#endif // defined(ASIO_HAS_MOVE)
+ immediate_concrete_handler(const immediate_concrete_handler&);
+};
+
+template <typename Signature>
+struct lazy_concrete_handler : concrete_handler<Signature>
+{
+ lazy_concrete_handler(lazy_handler)
+ {
+ }
+
+ lazy_concrete_handler(lazy_concrete_handler&&) {}
+private:
+ lazy_concrete_handler(const lazy_concrete_handler&);
};
} // namespace archetypes
@@ -47,11 +92,38 @@ private:
namespace asio {
template <typename Signature>
+class async_result<archetypes::immediate_handler, Signature>
+{
+public:
+ // The concrete completion handler type.
+ typedef archetypes::immediate_concrete_handler<Signature>
+ completion_handler_type;
+
+ // The return type of the initiating function.
+ typedef void return_type;
+
+ // Construct an async_result from a given handler.
+ explicit async_result(completion_handler_type&)
+ {
+ }
+
+ // Obtain the value to be returned from the initiating function.
+ void get()
+ {
+ }
+
+private:
+ // Disallow copying and assignment.
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+};
+
+template <typename Signature>
class async_result<archetypes::lazy_handler, Signature>
{
public:
// The concrete completion handler type.
- typedef archetypes::concrete_handler completion_handler_type;
+ typedef archetypes::lazy_concrete_handler<Signature> completion_handler_type;
// The return type of the initiating function.
typedef int return_type;
@@ -69,8 +141,8 @@ public:
private:
// Disallow copying and assignment.
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
} // namespace asio
diff --git a/3rdparty/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp b/3rdparty/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp
deleted file mode 100644
index ee1cab939cd..00000000000
--- a/3rdparty/asio/src/tests/unit/archetypes/deprecated_async_ops.hpp
+++ /dev/null
@@ -1,345 +0,0 @@
-//
-// deprecated_async_ops.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ARCHETYPES_DEPRECATED_ASYNC_OPS_HPP
-#define ARCHETYPES_DEPRECATED_ASYNC_OPS_HPP
-
-#include <asio/async_result.hpp>
-
-#if !defined(ASIO_NO_DEPRECATED)
-
-#include <asio/handler_type.hpp>
-#include <asio/error.hpp>
-#include <asio/io_context.hpp>
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
-namespace archetypes {
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void()>::type>::type
-deprecated_async_op_0(asio::io_context& ctx,
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void()>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler)));
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(asio::error_code)>::type>::type
-deprecated_async_op_ec_0(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(asio::error_code)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code()));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(asio::error::operation_aborted)));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(std::exception_ptr)>::type>::type
-deprecated_async_op_ex_0(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(std::exception_ptr)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::exception_ptr()));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::make_exception_ptr(std::runtime_error("blah"))));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(int)>::type>::type
-deprecated_async_op_1(asio::io_context& ctx,
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(int)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler), 42));
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(asio::error_code, int)>::type>::type
-deprecated_async_op_ec_1(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(asio::error_code, int)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(), 42));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(asio::error::operation_aborted), 0));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(std::exception_ptr, int)>::type>::type
-deprecated_async_op_ex_1(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(std::exception_ptr, int)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::exception_ptr(), 42));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::make_exception_ptr(std::runtime_error("blah")), 0));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(int, double)>::type>::type
-deprecated_async_op_2(asio::io_context& ctx,
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(int, double)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- 42, 2.0));
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(asio::error_code, int, double)>::type>::type
-deprecated_async_op_ec_2(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(asio::error_code, int, double)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(), 42, 2.0));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(asio::error::operation_aborted),
- 0, 0.0));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(std::exception_ptr, int, double)>::type>::type
-deprecated_async_op_ex_2(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(std::exception_ptr, int, double)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::exception_ptr(), 42, 2.0));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::make_exception_ptr(std::runtime_error("blah")), 0, 0.0));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(int, double, char)>::type>::type
-deprecated_async_op_3(asio::io_context& ctx,
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(int, double, char)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- 42, 2.0, 'a'));
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(asio::error_code, int, double, char)>::type>::type
-deprecated_async_op_ec_3(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(asio::error_code, int, double, char)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(), 42, 2.0, 'a'));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- asio::error_code(asio::error::operation_aborted),
- 0, 0.0, 'z'));
- }
-
- return result.get();
-}
-
-template <typename CompletionToken>
-typename asio::async_result<
- typename asio::handler_type<CompletionToken,
- void(std::exception_ptr, int, double, char)>::type>::type
-deprecated_async_op_ex_3(asio::io_context& ctx,
- bool ok, ASIO_MOVE_ARG(CompletionToken) token)
-{
- typedef typename asio::handler_type<CompletionToken,
- void(std::exception_ptr, int, double, char)>::type handler_type;
-
- handler_type handler(ASIO_MOVE_CAST(CompletionToken)(token));
-
- asio::async_result<handler_type> result(handler);
-
- if (ok)
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::exception_ptr(), 42, 2.0, 'a'));
- }
- else
- {
- ctx.post(bindns::bind(ASIO_MOVE_CAST(handler_type)(handler),
- std::make_exception_ptr(std::runtime_error("blah")),
- 0, 0.0, 'z'));
- }
-
- return result.get();
-}
-
-} // namespace archetypes
-
-#endif // !defined(ASIO_NO_DEPRECATED)
-
-#endif // ARCHETYPES_DEPRECATED_ASYNC_OPS_HPP
diff --git a/3rdparty/asio/src/tests/unit/archetypes/deprecated_async_result.hpp b/3rdparty/asio/src/tests/unit/archetypes/deprecated_async_result.hpp
deleted file mode 100644
index c395b37144a..00000000000
--- a/3rdparty/asio/src/tests/unit/archetypes/deprecated_async_result.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// async_result.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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 ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
-#define ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
-
-#include <asio/async_result.hpp>
-
-#if !defined(ASIO_NO_DEPRECATED)
-
-#include <asio/handler_type.hpp>
-
-namespace archetypes {
-
-struct deprecated_lazy_handler
-{
-};
-
-struct deprecated_concrete_handler
-{
- deprecated_concrete_handler(deprecated_lazy_handler)
- {
- }
-
- template <typename Arg1>
- void operator()(Arg1)
- {
- }
-
- template <typename Arg1, typename Arg2>
- void operator()(Arg1, Arg2)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- deprecated_concrete_handler(deprecated_concrete_handler&&) {}
-private:
- deprecated_concrete_handler(const deprecated_concrete_handler&);
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-} // namespace archetypes
-
-namespace asio {
-
-template <typename Signature>
-struct handler_type<archetypes::deprecated_lazy_handler, Signature>
-{
- typedef archetypes::deprecated_concrete_handler type;
-};
-
-template <>
-class async_result<archetypes::deprecated_concrete_handler>
-{
-public:
- // The return type of the initiating function.
- typedef double type;
-
- // Construct an async_result from a given handler.
- explicit async_result(archetypes::deprecated_concrete_handler&)
- {
- }
-
- // Obtain the value to be returned from the initiating function.
- type get()
- {
- return 42;
- }
-};
-
-} // namespace asio
-
-#endif // !defined(ASIO_NO_DEPRECATED)
-
-#endif // ARCHETYPES_DEPRECATED_ASYNC_RESULT_HPP
diff --git a/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp b/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
index 24544b0497a..e1c2d3f0d4e 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
@@ -2,7 +2,7 @@
// gettable_socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp b/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp
index 011eb07d8bd..45ed07cf481 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp
@@ -2,7 +2,7 @@
// io_control_command.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp b/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp
index 99b4dac899e..7a5867ba800 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp
@@ -2,7 +2,7 @@
// settable_socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/as_tuple.cpp b/3rdparty/asio/src/tests/unit/as_tuple.cpp
new file mode 100644
index 00000000000..a176d95bb2e
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/as_tuple.cpp
@@ -0,0 +1,122 @@
+//
+// as_tuple.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/as_tuple.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/deferred.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "asio/use_future.hpp"
+#include "unit_test.hpp"
+
+void as_tuple_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::as_tuple(
+ asio::bind_executor(io2.get_executor(),
+ [&count](std::tuple<asio::error_code>)
+ {
+ ++count;
+ })));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+
+ timer1.async_wait(
+ asio::as_tuple(
+ asio::bind_executor(io2.get_executor(),
+ asio::deferred)))(
+ [&count](std::tuple<asio::error_code>)
+ {
+ ++count;
+ });
+
+ ASIO_CHECK(count == 1);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(count == 1);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(count == 2);
+
+# if defined(ASIO_HAS_STD_FUTURE_CLASS)
+ std::future<std::tuple<asio::error_code> > f = timer1.async_wait(
+ asio::as_tuple(
+ asio::bind_executor(io2.get_executor(),
+ asio::use_future)));
+
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::ready);
+# endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
+}
+
+void as_tuple_constness_test()
+{
+# if defined(ASIO_HAS_STD_FUTURE_CLASS)
+ asio::io_context io1;
+ asio::system_timer timer1(io1);
+
+ auto tok1 = asio::as_tuple(asio::use_future);
+ (void)timer1.async_wait(tok1);
+ (void)timer1.async_wait(std::move(tok1));
+
+ const auto tok2 = asio::as_tuple(asio::use_future);
+ (void)timer1.async_wait(tok2);
+ (void)timer1.async_wait(std::move(tok2));
+
+ constexpr auto tok3 = asio::as_tuple(asio::use_future);
+ (void)timer1.async_wait(tok3);
+ (void)timer1.async_wait(std::move(tok3));
+# endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
+}
+
+ASIO_TEST_SUITE
+(
+ "as_tuple",
+ ASIO_TEST_CASE(as_tuple_test)
+ ASIO_COMPILE_TEST_CASE(as_tuple_constness_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/associated_allocator.cpp b/3rdparty/asio/src/tests/unit/associated_allocator.cpp
index 7fe80ab3276..69a8afb0d41 100644
--- a/3rdparty/asio/src/tests/unit/associated_allocator.cpp
+++ b/3rdparty/asio/src/tests/unit/associated_allocator.cpp
@@ -2,7 +2,7 @@
// associated_allocator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/seq_packet_socket_service.cpp b/3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp
index fc2d73c7ae9..96d488458cb 100644
--- a/3rdparty/asio/src/tests/unit/seq_packet_socket_service.cpp
+++ b/3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp
@@ -1,8 +1,8 @@
//
-// seq_packet_socket_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// associated_cancellation_slot.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/seq_packet_socket_service.hpp"
+#include "asio/associated_cancellation_slot.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
- "seq_packet_socket_service",
+ "associated_cancellation_slot",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/associated_executor.cpp b/3rdparty/asio/src/tests/unit/associated_executor.cpp
index a91fbb6336b..60b1f00657f 100644
--- a/3rdparty/asio/src/tests/unit/associated_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/associated_executor.cpp
@@ -2,7 +2,7 @@
// associated_executor.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp b/3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp
new file mode 100644
index 00000000000..f085a2cfcee
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp
@@ -0,0 +1,25 @@
+//
+// associated_immediate_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2022 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/associated_immediate_executor.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "associated_immediate_executor",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/raw_socket_service.cpp b/3rdparty/asio/src/tests/unit/associator.cpp
index c7b736f852e..a35d95c66e0 100644
--- a/3rdparty/asio/src/tests/unit/raw_socket_service.cpp
+++ b/3rdparty/asio/src/tests/unit/associator.cpp
@@ -1,8 +1,8 @@
//
-// raw_socket_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~
+// associator.cpp
+// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/raw_socket_service.hpp"
+#include "asio/associator.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
- "raw_socket_service",
+ "associator",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/async_result.cpp b/3rdparty/asio/src/tests/unit/async_result.cpp
index 479aeb56e7d..75a4e91b71e 100644
--- a/3rdparty/asio/src/tests/unit/async_result.cpp
+++ b/3rdparty/asio/src/tests/unit/async_result.cpp
@@ -2,7 +2,7 @@
// async_result.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/stream_socket_service.cpp b/3rdparty/asio/src/tests/unit/awaitable.cpp
index 03bbbf2f475..39ca8ddfdbe 100644
--- a/3rdparty/asio/src/tests/unit/stream_socket_service.cpp
+++ b/3rdparty/asio/src/tests/unit/awaitable.cpp
@@ -1,8 +1,8 @@
//
-// stream_socket_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// awaitable.cpp
+// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/stream_socket_service.hpp"
+#include "asio/awaitable.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
- "stream_socket_service",
+ "awaitable",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp b/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp
index 8b17b5e9503..44fa2561646 100644
--- a/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp
@@ -2,7 +2,7 @@
// basic_datagram_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp b/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp
index 65244031a59..ec6a6e37d18 100644
--- a/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp
@@ -2,7 +2,7 @@
// basic_deadline_timer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/deadline_timer_service.cpp b/3rdparty/asio/src/tests/unit/basic_file.cpp
index 87c7aa6ad27..5308d1268b0 100644
--- a/3rdparty/asio/src/tests/unit/deadline_timer_service.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_file.cpp
@@ -1,8 +1,8 @@
//
-// deadline_timer_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+// basic_file.cpp
+// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/deadline_timer_service.hpp"
+#include "asio/basic_file.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
- "deadline_timer_service",
+ "basic_file",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/basic_random_access_file.cpp b/3rdparty/asio/src/tests/unit/basic_random_access_file.cpp
new file mode 100644
index 00000000000..fffaee3e8a2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_random_access_file.cpp
@@ -0,0 +1,25 @@
+//
+// basic_random_access_file.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_random_access_file.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_random_access_file",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp b/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp
index 0b983e378f5..127df060b0c 100644
--- a/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp
@@ -2,7 +2,7 @@
// basic_raw_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp b/3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp
new file mode 100644
index 00000000000..f390acf4f98
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp
@@ -0,0 +1,25 @@
+//
+// basic_readable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_readable_pipe.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_readable_pipe",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp b/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp
index c9f325d5908..c8b9bfa67bc 100644
--- a/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp
@@ -2,7 +2,7 @@
// basic_seq_packet_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_serial_port.cpp b/3rdparty/asio/src/tests/unit/basic_serial_port.cpp
index a6c4e67d54a..1a64348a989 100644
--- a/3rdparty/asio/src/tests/unit/basic_serial_port.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_serial_port.cpp
@@ -2,7 +2,7 @@
// basic_serial_port.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/src/tests/unit/basic_signal_set.cpp b/3rdparty/asio/src/tests/unit/basic_signal_set.cpp
index f3f87c5185a..01340178e69 100644
--- a/3rdparty/asio/src/tests/unit/basic_signal_set.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_signal_set.cpp
@@ -2,7 +2,7 @@
// basic_signal_set.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_socket.cpp b/3rdparty/asio/src/tests/unit/basic_socket.cpp
new file mode 100644
index 00000000000..c2814e6b96d
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_socket.cpp
@@ -0,0 +1,25 @@
+//
+// basic_socket.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_socket.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_socket",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp b/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp
index 4e6629f2b69..021a81628ae 100644
--- a/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp
@@ -2,7 +2,7 @@
// basic_socket_acceptor.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_stream_file.cpp b/3rdparty/asio/src/tests/unit/basic_stream_file.cpp
new file mode 100644
index 00000000000..9902122c9cb
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_stream_file.cpp
@@ -0,0 +1,25 @@
+//
+// basic_stream_file.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_stream_file.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_stream_file",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp b/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp
index b04a4dc82bd..1edbe5a530c 100644
--- a/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp
@@ -2,7 +2,7 @@
// basic_stream_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_streambuf.cpp b/3rdparty/asio/src/tests/unit/basic_streambuf.cpp
index ff9166205c9..9529dd801fe 100644
--- a/3rdparty/asio/src/tests/unit/basic_streambuf.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_streambuf.cpp
@@ -2,7 +2,7 @@
// basic_streambuf.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp b/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp
index 6aa90cb2387..9d6be41b754 100644
--- a/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp
@@ -2,7 +2,7 @@
// basic_waitable_timer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp b/3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp
new file mode 100644
index 00000000000..fc0d0fdd955
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp
@@ -0,0 +1,25 @@
+//
+// basic_writable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_writable_pipe.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_writable_pipe",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/bind_allocator.cpp b/3rdparty/asio/src/tests/unit/bind_allocator.cpp
new file mode 100644
index 00000000000..b7c11ffb53c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/bind_allocator.cpp
@@ -0,0 +1,237 @@
+//
+// bind_allocator.cpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/bind_allocator.hpp"
+
+#include <functional>
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+namespace bindns = std;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef deadline_timer timer;
+namespace chronons = boost::posix_time;
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef steady_timer timer;
+namespace chronons = asio::chrono;
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+template <typename T>
+class test_allocator
+{
+public:
+ typedef T value_type;
+
+ explicit test_allocator(int* allocations)
+ : allocations_(allocations)
+ {
+ }
+
+ template <typename U>
+ test_allocator(const test_allocator<U>& other)
+ : allocations_(other.allocations_)
+ {
+ }
+
+ template <typename U>
+ struct rebind
+ {
+ typedef test_allocator<U> other;
+ };
+
+ bool operator==(const test_allocator&) const
+ {
+ return true;
+ }
+
+ bool operator!=(const test_allocator&) const
+ {
+ return false;
+ }
+
+ T* allocate(std::size_t n) const
+ {
+ ++(*allocations_);
+ return static_cast<T*>(::operator new(sizeof(T) * n));
+ }
+
+ void deallocate(T* p, std::size_t /*n*/) const
+ {
+ --(*allocations_);
+ ::operator delete(p);
+ }
+
+//private:
+ int* allocations_;
+};
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void bind_allocator_to_function_object_test()
+{
+ io_context ioc;
+
+ int count = 0;
+ int allocations = 0;
+
+ timer t(ioc, chronons::seconds(1));
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ bindns::bind(&increment, &count)));
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 0);
+
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ bind_allocator(
+ std::allocator<void>(),
+ bindns::bind(&increment, &count))));
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.restart();
+ ioc.run();
+
+ ASIO_CHECK(count == 2);
+ ASIO_CHECK(allocations == 0);
+}
+
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+ void operator()(asio::error_code){ increment(count); }
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v1, void(asio::error_code)>
+{
+public:
+ typedef incrementer_handler_v1 completion_handler_type;
+ typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_allocator_to_completion_token_v1_test()
+{
+ io_context ioc;
+
+ int count = 0;
+ int allocations = 0;
+
+ timer t(ioc, chronons::seconds(1));
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ incrementer_token_v1(&count)));
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 0);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void(asio::error_code)>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+ template <typename Initiation, typename... Args>
+ static void initiate(Initiation initiation,
+ incrementer_token_v2 token, Args&&... args)
+ {
+ initiation(bindns::bind(&increment, token.count),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+} // namespace asio
+
+void bind_allocator_to_completion_token_v2_test()
+{
+ io_context ioc;
+
+ int count = 0;
+ int allocations = 0;
+
+ timer t(ioc, chronons::seconds(1));
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ incrementer_token_v2(&count)));
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 0);
+}
+
+ASIO_TEST_SUITE
+(
+ "bind_allocator",
+ ASIO_TEST_CASE(bind_allocator_to_function_object_test)
+ ASIO_TEST_CASE(bind_allocator_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_allocator_to_completion_token_v2_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp b/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp
new file mode 100644
index 00000000000..25b0ff1c995
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp
@@ -0,0 +1,202 @@
+//
+// bind_cancellation_slot.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/bind_cancellation_slot.hpp"
+
+#include <functional>
+#include "asio/cancellation_signal.hpp"
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+namespace bindns = std;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef deadline_timer timer;
+namespace chronons = boost::posix_time;
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef steady_timer timer;
+namespace chronons = asio::chrono;
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+void increment_on_cancel(int* count, const asio::error_code& error)
+{
+ if (error == asio::error::operation_aborted)
+ ++(*count);
+}
+
+void bind_cancellation_slot_to_function_object_test()
+{
+ io_context ioc;
+ cancellation_signal sig;
+
+ int count = 0;
+
+ timer t(ioc, chronons::seconds(5));
+ t.async_wait(
+ bind_cancellation_slot(sig.slot(),
+ bindns::bind(&increment_on_cancel,
+ &count, bindns::placeholders::_1)));
+
+ ioc.poll();
+
+ ASIO_CHECK(count == 0);
+
+ sig.emit(asio::cancellation_type::all);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+
+ t.async_wait(
+ bind_cancellation_slot(sig.slot(),
+ bind_cancellation_slot(sig.slot(),
+ bindns::bind(&increment_on_cancel,
+ &count, bindns::placeholders::_1))));
+
+ ioc.restart();
+ ioc.poll();
+
+ ASIO_CHECK(count == 1);
+
+ sig.emit(asio::cancellation_type::all);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 2);
+}
+
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+
+ void operator()(asio::error_code error)
+ {
+ increment_on_cancel(count, error);
+ }
+
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v1, void(asio::error_code)>
+{
+public:
+ typedef incrementer_handler_v1 completion_handler_type;
+ typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_cancellation_slot_to_completion_token_v1_test()
+{
+ io_context ioc;
+ cancellation_signal sig;
+
+ int count = 0;
+
+ timer t(ioc, chronons::seconds(5));
+ t.async_wait(
+ bind_cancellation_slot(sig.slot(),
+ incrementer_token_v1(&count)));
+
+ ioc.poll();
+
+ ASIO_CHECK(count == 0);
+
+ sig.emit(asio::cancellation_type::all);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void(asio::error_code)>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+ template <typename Initiation, typename... Args>
+ static void initiate(Initiation initiation,
+ incrementer_token_v2 token, Args&&... args)
+ {
+ initiation(
+ bindns::bind(&increment_on_cancel,
+ token.count, bindns::placeholders::_1),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+} // namespace asio
+
+void bind_cancellation_slot_to_completion_token_v2_test()
+{
+ io_context ioc;
+ cancellation_signal sig;
+
+ int count = 0;
+
+ timer t(ioc, chronons::seconds(5));
+ t.async_wait(
+ bind_cancellation_slot(sig.slot(),
+ incrementer_token_v2(&count)));
+
+ ioc.poll();
+
+ ASIO_CHECK(count == 0);
+
+ sig.emit(asio::cancellation_type::all);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "bind_cancellation_slot",
+ ASIO_TEST_CASE(bind_cancellation_slot_to_function_object_test)
+ ASIO_TEST_CASE(bind_cancellation_slot_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_cancellation_slot_to_completion_token_v2_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/bind_executor.cpp b/3rdparty/asio/src/tests/unit/bind_executor.cpp
index 74f24638a62..59be1cd14f3 100644
--- a/3rdparty/asio/src/tests/unit/bind_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/bind_executor.cpp
@@ -2,7 +2,7 @@
// bind_executor.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,10 +16,174 @@
// Test that header file is self-contained.
#include "asio/bind_executor.hpp"
+#include <functional>
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
#include "unit_test.hpp"
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+namespace bindns = std;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef deadline_timer timer;
+namespace chronons = boost::posix_time;
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef steady_timer timer;
+namespace chronons = asio::chrono;
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void bind_executor_to_function_object_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ timer t(ioc1, chronons::seconds(1));
+ t.async_wait(
+ bind_executor(
+ ioc2.get_executor(),
+ bindns::bind(&increment, &count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+
+ t.async_wait(
+ bind_executor(
+ ioc2.get_executor(),
+ bind_executor(
+ asio::system_executor(),
+ bindns::bind(&increment, &count))));
+
+ ioc1.restart();
+ ioc1.run();
+
+ ASIO_CHECK(count == 1);
+
+ ioc2.restart();
+ ioc2.run();
+
+ ASIO_CHECK(count == 2);
+}
+
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+ void operator()(asio::error_code){ increment(count); }
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v1, void(asio::error_code)>
+{
+public:
+ typedef incrementer_handler_v1 completion_handler_type;
+ typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_executor_to_completion_token_v1_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ timer t(ioc1, chronons::seconds(1));
+ t.async_wait(
+ bind_executor(
+ ioc2.get_executor(),
+ incrementer_token_v1(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void(asio::error_code)>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+ template <typename Initiation, typename... Args>
+ static void initiate(Initiation initiation,
+ incrementer_token_v2 token, Args&&... args)
+ {
+ initiation(bindns::bind(&increment, token.count),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+} // namespace asio
+
+void bind_executor_to_completion_token_v2_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ timer t(ioc1, chronons::seconds(1));
+ t.async_wait(
+ bind_executor(
+ ioc2.get_executor(),
+ incrementer_token_v2(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
ASIO_TEST_SUITE
(
"bind_executor",
- ASIO_TEST_CASE(null_test)
+ ASIO_TEST_CASE(bind_executor_to_function_object_test)
+ ASIO_TEST_CASE(bind_executor_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_executor_to_completion_token_v2_test)
)
diff --git a/3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp b/3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp
new file mode 100644
index 00000000000..ecf82de7470
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp
@@ -0,0 +1,199 @@
+//
+// bind_immediate_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/bind_immediate_executor.hpp"
+
+#include <functional>
+#include "asio/dispatch.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+namespace bindns = std;
+
+struct initiate_immediate
+{
+ template <typename Handler>
+ void operator()(Handler&& handler, io_context* ctx) const
+ {
+ typename associated_immediate_executor<
+ Handler, io_context::executor_type>::type ex =
+ get_associated_immediate_executor(handler, ctx->get_executor());
+ dispatch(ex, static_cast<Handler&&>(handler));
+ }
+};
+
+template <ASIO_COMPLETION_TOKEN_FOR(void()) Token>
+ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(Token, void())
+async_immediate(io_context& ctx, Token&& token)
+ ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX((
+ async_initiate<Token, void()>(declval<initiate_immediate>(), token)))
+{
+ return async_initiate<Token, void()>(initiate_immediate(), token, &ctx);
+}
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void bind_immediate_executor_to_function_object_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ bindns::bind(&increment, &count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ bind_immediate_executor(
+ asio::system_executor(),
+ bindns::bind(&increment, &count))));
+
+ ioc1.restart();
+ ioc1.run();
+
+ ASIO_CHECK(count == 1);
+
+ ioc2.restart();
+ ioc2.run();
+
+ ASIO_CHECK(count == 2);
+}
+
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+ void operator()(){ increment(count); }
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v1, void()>
+{
+public:
+ typedef incrementer_handler_v1 completion_handler_type;
+ typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_immediate_executor_to_completion_token_v1_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ incrementer_token_v1(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void()>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+ template <typename Initiation, typename... Args>
+ static void initiate(Initiation initiation,
+ incrementer_token_v2 token, Args&&... args)
+ {
+ initiation(bindns::bind(&increment, token.count),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+} // namespace asio
+
+void bind_immediate_executor_to_completion_token_v2_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ incrementer_token_v2(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "bind_immediate_executor",
+ ASIO_TEST_CASE(bind_immediate_executor_to_function_object_test)
+ ASIO_TEST_CASE(bind_immediate_executor_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_immediate_executor_to_completion_token_v2_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/buffer.cpp b/3rdparty/asio/src/tests/unit/buffer.cpp
index b28533059ca..9fa1db6e67f 100644
--- a/3rdparty/asio/src/tests/unit/buffer.cpp
+++ b/3rdparty/asio/src/tests/unit/buffer.cpp
@@ -2,7 +2,7 @@
// buffer.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,16 +16,14 @@
// Test that header file is self-contained.
#include "asio/buffer.hpp"
+#include <array>
+#include <cstring>
#include "unit_test.hpp"
#if defined(ASIO_HAS_BOOST_ARRAY)
# include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
//------------------------------------------------------------------------------
// buffer_compile test
@@ -37,6 +35,42 @@ namespace buffer_compile {
using namespace asio;
+template <typename T>
+class mutable_contiguous_container
+{
+public:
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+
+ mutable_contiguous_container() {}
+ std::size_t size() const { return 0; }
+ iterator begin() { return 0; }
+ const_iterator begin() const { return 0; }
+ iterator end() { return 0; }
+ const_iterator end() const { return 0; }
+};
+
+template <typename T>
+class const_contiguous_container
+{
+public:
+ typedef const T value_type;
+ typedef const T* iterator;
+ typedef const T* const_iterator;
+ typedef const T& reference;
+ typedef const T& const_reference;
+
+ const_contiguous_container() {}
+ std::size_t size() const { return 0; }
+ iterator begin() { return 0; }
+ const_iterator begin() const { return 0; }
+ iterator end() { return 0; }
+ const_iterator end() const { return 0; }
+};
+
void test()
{
try
@@ -50,11 +84,9 @@ void test()
const boost::array<char, 1024>& const_array_data_1 = array_data;
boost::array<const char, 1024> const_array_data_2 = { { 0 } };
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
std::array<char, 1024> std_array_data;
const std::array<char, 1024>& const_std_array_data_1 = std_array_data;
std::array<const char, 1024> const_std_array_data_2 = { { 0 } };
-#endif // defined(ASIO_HAS_STD_ARRAY)
std::vector<char> vector_data(1024);
const std::vector<char>& const_vector_data = vector_data;
std::string string_data(1024, ' ');
@@ -62,18 +94,21 @@ void test()
std::vector<mutable_buffer> mutable_buffer_sequence;
std::vector<const_buffer> const_buffer_sequence;
#if defined(ASIO_HAS_STD_STRING_VIEW)
-# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
- std::experimental::string_view string_view_data(string_data);
-# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
std::string_view string_view_data(string_data);
-# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ std::experimental::string_view string_view_data(string_data);
+#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ mutable_contiguous_container<char> mutable_contiguous_data;
+ const mutable_contiguous_container<char> const_mutable_contiguous_data;
+ const_contiguous_container<char> const_contiguous_data;
+ const const_contiguous_container<char> const_const_contiguous_data;
// mutable_buffer constructors.
mutable_buffer mb1;
mutable_buffer mb2(void_ptr_data, 1024);
mutable_buffer mb3(mb1);
+ (void)mb3;
// mutable_buffer functions.
@@ -110,7 +145,9 @@ void test()
const_buffer cb1;
const_buffer cb2(const_void_ptr_data, 1024);
const_buffer cb3(cb1);
+ (void)cb3;
const_buffer cb4(mb1);
+ (void)cb4;
// const_buffer functions.
@@ -188,14 +225,12 @@ void test()
cb1 = buffer(const_array_data_2);
cb1 = buffer(const_array_data_2, 1024);
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
mb1 = buffer(std_array_data);
mb1 = buffer(std_array_data, 1024);
cb1 = buffer(const_std_array_data_1);
cb1 = buffer(const_std_array_data_1, 1024);
cb1 = buffer(const_std_array_data_2);
cb1 = buffer(const_std_array_data_2, 1024);
-#endif // defined(ASIO_HAS_STD_ARRAY)
mb1 = buffer(vector_data);
mb1 = buffer(vector_data, 1024);
cb1 = buffer(const_vector_data);
@@ -204,10 +239,18 @@ void test()
mb1 = buffer(string_data, 1024);
cb1 = buffer(const_string_data);
cb1 = buffer(const_string_data, 1024);
-#if defined(ASIO_HAS_STD_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
cb1 = buffer(string_view_data);
cb1 = buffer(string_view_data, 1024);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
+ mb1 = buffer(mutable_contiguous_data);
+ mb1 = buffer(mutable_contiguous_data, 1024);
+ cb1 = buffer(const_mutable_contiguous_data);
+ cb1 = buffer(const_mutable_contiguous_data, 1024);
+ cb1 = buffer(const_contiguous_data);
+ cb1 = buffer(const_contiguous_data, 1024);
+ cb1 = buffer(const_const_contiguous_data);
+ cb1 = buffer(const_const_contiguous_data, 1024);
// buffer_copy function overloads.
@@ -321,6 +364,7 @@ void test()
std::size_t size40 = db3.max_size();
(void)size40;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
dynamic_string_buffer<char, std::string::traits_type,
std::string::allocator_type>::const_buffers_type
cb5 = db1.data();
@@ -339,9 +383,35 @@ void test()
db1.commit(1024);
db3.commit(1024);
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
- db1.consume(1024);
- db3.consume(1024);
+ dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type>::mutable_buffers_type
+ mb7 = db1.data(0, 1);
+ (void)mb7;
+ dynamic_vector_buffer<char, std::allocator<char> >::mutable_buffers_type
+ mb8 = db3.data(0, 1);
+ (void)mb8;
+
+ dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type>::const_buffers_type
+ cb7 = static_cast<const dynamic_string_buffer<char,
+ std::string::traits_type,
+ std::string::allocator_type>&>(db1).data(0, 1);
+ (void)cb7;
+ dynamic_vector_buffer<char, std::allocator<char> >::const_buffers_type
+ cb8 = static_cast<const dynamic_vector_buffer<char,
+ std::allocator<char> >&>(db3).data(0, 1);
+ (void)cb8;
+
+ db1.grow(1024);
+ db3.grow(1024);
+
+ db1.shrink(1024);
+ db3.shrink(1024);
+
+ db1.consume(0);
+ db3.consume(0);
}
catch (std::exception&)
{
@@ -559,9 +629,285 @@ void test()
//------------------------------------------------------------------------------
+namespace buffer_sequence {
+
+using namespace asio;
+using namespace std;
+
+struct valid_const_a
+{
+ typedef const_buffer* const_iterator;
+ typedef const_buffer value_type;
+ const_buffer* begin() const { return 0; }
+ const_buffer* end() const { return 0; }
+};
+
+struct valid_const_b
+{
+ const_buffer* begin() const { return 0; }
+ const_buffer* end() const { return 0; }
+};
+
+struct valid_mutable_a
+{
+ typedef mutable_buffer* const_iterator;
+ typedef mutable_buffer value_type;
+ mutable_buffer* begin() const { return 0; }
+ mutable_buffer* end() const { return 0; }
+};
+
+struct valid_mutable_b
+{
+ mutable_buffer* begin() const { return 0; }
+ mutable_buffer* end() const { return 0; }
+};
+
+struct invalid_const_a
+{
+ typedef int value_type;
+ int* begin() const { return 0; }
+ const_buffer* end() const { return 0; }
+};
+
+struct invalid_const_b
+{
+ typedef const_buffer value_type;
+ const_buffer* begin() const { return 0; }
+};
+
+struct invalid_const_c
+{
+ typedef const_buffer value_type;
+ const_buffer* end() const { return 0; }
+};
+
+struct invalid_const_d
+{
+ int* begin() const { return 0; }
+ const_buffer* end() const { return 0; }
+};
+
+struct invalid_const_e
+{
+ const_buffer* begin() const { return 0; }
+};
+
+struct invalid_const_f
+{
+ const_buffer* end() const { return 0; }
+};
+
+struct invalid_mutable_a
+{
+ typedef int value_type;
+ int* begin() const { return 0; }
+ mutable_buffer* end() const { return 0; }
+};
+
+struct invalid_mutable_b
+{
+ typedef mutable_buffer value_type;
+ mutable_buffer* begin() const { return 0; }
+};
+
+struct invalid_mutable_c
+{
+ typedef mutable_buffer value_type;
+ mutable_buffer* end() const { return 0; }
+};
+
+struct invalid_mutable_d
+{
+ int* begin() const { return 0; }
+ mutable_buffer* end() const { return 0; }
+};
+
+struct invalid_mutable_e
+{
+ mutable_buffer* begin() const { return 0; }
+};
+
+struct invalid_mutable_f
+{
+ mutable_buffer* end() const { return 0; }
+};
+
+void test()
+{
+ ASIO_CHECK(is_const_buffer_sequence<const_buffer>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<const_buffer>::value);
+
+ const_buffer b1;
+ ASIO_CHECK(buffer_sequence_begin(b1) == &b1);
+ ASIO_CHECK(buffer_sequence_end(b1) == &b1 + 1);
+
+ ASIO_CHECK(is_const_buffer_sequence<mutable_buffer>::value);
+ ASIO_CHECK(is_mutable_buffer_sequence<mutable_buffer>::value);
+
+ mutable_buffer b2;
+ ASIO_CHECK(buffer_sequence_begin(b2) == &b2);
+ ASIO_CHECK(buffer_sequence_end(b2) == &b2 + 1);
+
+#if !defined(ASIO_NO_DEPRECATED)
+ ASIO_CHECK(is_const_buffer_sequence<const_buffers_1>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<const_buffers_1>::value);
+
+ const_buffers_1 b3(0, 0);
+ ASIO_CHECK(buffer_sequence_begin(b3) == &b3);
+ ASIO_CHECK(buffer_sequence_end(b3) == &b3 + 1);
+
+ ASIO_CHECK(is_const_buffer_sequence<mutable_buffers_1>::value);
+ ASIO_CHECK(is_mutable_buffer_sequence<mutable_buffers_1>::value);
+
+ mutable_buffers_1 b4(0, 0);
+ ASIO_CHECK(buffer_sequence_begin(b4) == &b4);
+ ASIO_CHECK(buffer_sequence_end(b4) == &b4 + 1);
+#endif // !defined(ASIO_NO_DEPRECATED)
+
+ ASIO_CHECK(is_const_buffer_sequence<vector<const_buffer> >::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<vector<const_buffer> >::value);
+
+ vector<const_buffer> b5;
+ ASIO_CHECK(buffer_sequence_begin(b5) == b5.begin());
+ ASIO_CHECK(buffer_sequence_end(b5) == b5.end());
+
+ ASIO_CHECK(is_const_buffer_sequence<vector<mutable_buffer> >::value);
+ ASIO_CHECK(is_mutable_buffer_sequence<vector<mutable_buffer> >::value);
+
+ vector<mutable_buffer> b6;
+ ASIO_CHECK(buffer_sequence_begin(b6) == b6.begin());
+ ASIO_CHECK(buffer_sequence_end(b6) == b6.end());
+
+ ASIO_CHECK(is_const_buffer_sequence<valid_const_a>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<valid_const_a>::value);
+
+ valid_const_a b7;
+ ASIO_CHECK(buffer_sequence_begin(b7) == b7.begin());
+ ASIO_CHECK(buffer_sequence_end(b7) == b7.end());
+
+ ASIO_CHECK(is_const_buffer_sequence<valid_const_b>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<valid_const_b>::value);
+
+ valid_const_b b8;
+ ASIO_CHECK(buffer_sequence_begin(b8) == b8.begin());
+ ASIO_CHECK(buffer_sequence_end(b8) == b8.end());
+
+ ASIO_CHECK(is_const_buffer_sequence<valid_mutable_a>::value);
+ ASIO_CHECK(is_mutable_buffer_sequence<valid_mutable_a>::value);
+
+ valid_mutable_a b9;
+ ASIO_CHECK(buffer_sequence_begin(b9) == b9.begin());
+ ASIO_CHECK(buffer_sequence_end(b9) == b9.end());
+
+ ASIO_CHECK(is_const_buffer_sequence<valid_mutable_b>::value);
+ ASIO_CHECK(is_mutable_buffer_sequence<valid_mutable_b>::value);
+
+ valid_mutable_b b10;
+ ASIO_CHECK(buffer_sequence_begin(b10) == b10.begin());
+ ASIO_CHECK(buffer_sequence_end(b10) == b10.end());
+
+ ASIO_CHECK(!is_const_buffer_sequence<invalid_const_a>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_a>::value);
+
+ ASIO_CHECK(!is_const_buffer_sequence<invalid_const_b>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_b>::value);
+
+ ASIO_CHECK(!is_const_buffer_sequence<invalid_const_c>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_c>::value);
+
+ ASIO_CHECK(!is_const_buffer_sequence<invalid_const_d>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_d>::value);
+
+ ASIO_CHECK(!is_const_buffer_sequence<invalid_const_e>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_e>::value);
+
+ ASIO_CHECK(!is_const_buffer_sequence<invalid_const_f>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_f>::value);
+
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_a>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_a>::value);
+
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_b>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_b>::value);
+
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_c>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_c>::value);
+
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_d>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_d>::value);
+
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_e>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_e>::value);
+
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_f>::value);
+ ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_f>::value);
+}
+
+} // namespace buffer_sequence
+
+namespace buffer_literals {
+
+void test()
+{
+#if defined(ASIO_HAS_USER_DEFINED_LITERALS)
+ using namespace asio::buffer_literals;
+ using namespace std; // For memcmp.
+
+ asio::const_buffer b1 = ""_buf;
+ ASIO_CHECK(b1.size() == 0);
+
+ asio::const_buffer b2 = "hello"_buf;
+ ASIO_CHECK(b2.size() == 5);
+ ASIO_CHECK(memcmp(b2.data(), "hello", 5) == 0);
+
+ asio::const_buffer b3 = 0x00_buf;
+ ASIO_CHECK(b3.size() == 1);
+ ASIO_CHECK(memcmp(b3.data(), "\x00", 1) == 0);
+
+ asio::const_buffer b4 = 0X01_buf;
+ ASIO_CHECK(b4.size() == 1);
+ ASIO_CHECK(memcmp(b4.data(), "\x01", 1) == 0);
+
+ asio::const_buffer b5 = 0xaB_buf;
+ ASIO_CHECK(b5.size() == 1);
+ ASIO_CHECK(memcmp(b5.data(), "\xab", 1) == 0);
+
+ asio::const_buffer b6 = 0xABcd_buf;
+ ASIO_CHECK(b6.size() == 2);
+ ASIO_CHECK(memcmp(b6.data(), "\xab\xcd", 2) == 0);
+
+ asio::const_buffer b7 = 0x01ab01cd01ef01ba01dc01fe_buf;
+ ASIO_CHECK(b7.size() == 12);
+ ASIO_CHECK(memcmp(b7.data(),
+ "\x01\xab\x01\xcd\x01\xef\x01\xba\x01\xdc\x01\xfe", 12) == 0);
+
+ asio::const_buffer b8 = 0b00000000_buf;
+ ASIO_CHECK(b8.size() == 1);
+ ASIO_CHECK(memcmp(b8.data(), "\x00", 1) == 0);
+
+ asio::const_buffer b9 = 0B00000001_buf;
+ ASIO_CHECK(b9.size() == 1);
+ ASIO_CHECK(memcmp(b9.data(), "\x01", 1) == 0);
+
+ asio::const_buffer b10 = 0B11111111_buf;
+ ASIO_CHECK(b10.size() == 1);
+ ASIO_CHECK(memcmp(b10.data(), "\xFF", 1) == 0);
+
+ asio::const_buffer b11 = 0b1111000000001111_buf;
+ ASIO_CHECK(b11.size() == 2);
+ ASIO_CHECK(memcmp(b11.data(), "\xF0\x0F", 2) == 0);
+#endif // (defined(ASIO_HAS_USER_DEFINED_LITERALS)
+}
+
+} // namespace buffer_literals
+
+//------------------------------------------------------------------------------
+
ASIO_TEST_SUITE
(
"buffer",
ASIO_COMPILE_TEST_CASE(buffer_compile::test)
ASIO_TEST_CASE(buffer_copy_runtime::test)
+ ASIO_TEST_CASE(buffer_sequence::test)
+ ASIO_TEST_CASE(buffer_literals::test)
)
diff --git a/3rdparty/asio/src/tests/unit/buffer_registration.cpp b/3rdparty/asio/src/tests/unit/buffer_registration.cpp
new file mode 100644
index 00000000000..72826a394cc
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/buffer_registration.cpp
@@ -0,0 +1,25 @@
+//
+// buffer_registration.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/buffer_registration.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "buffer_registration",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp b/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp
index 28a0db1eb93..21b4abc0bbb 100644
--- a/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp
+++ b/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp
@@ -2,7 +2,7 @@
// buffered_read_stream.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,7 @@
#include "asio/buffered_read_stream.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
@@ -30,12 +31,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
typedef asio::buffered_read_stream<
asio::ip::tcp::socket> stream_type;
@@ -81,14 +76,6 @@ void test_compile()
stream_type::executor_type ex = stream1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = stream1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = stream1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
stream_type::lowest_layer_type& lowest_layer = stream1.lowest_layer();
(void)lowest_layer;
@@ -255,13 +242,9 @@ void test_async_operations()
{
using namespace std; // For memcmp.
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context io_context;
@@ -340,7 +323,7 @@ void test_async_operations()
ASIO_TEST_SUITE
(
"buffered_read_stream",
- ASIO_TEST_CASE(test_compile)
+ ASIO_COMPILE_TEST_CASE(test_compile)
ASIO_TEST_CASE(test_sync_operations)
ASIO_TEST_CASE(test_async_operations)
)
diff --git a/3rdparty/asio/src/tests/unit/buffered_stream.cpp b/3rdparty/asio/src/tests/unit/buffered_stream.cpp
index 7e077d0ca71..4830ec277de 100644
--- a/3rdparty/asio/src/tests/unit/buffered_stream.cpp
+++ b/3rdparty/asio/src/tests/unit/buffered_stream.cpp
@@ -2,7 +2,7 @@
// buffered_stream.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,7 @@
#include "asio/buffered_stream.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
@@ -30,12 +31,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
typedef asio::buffered_stream<
asio::ip::tcp::socket> stream_type;
@@ -85,14 +80,6 @@ void test_compile()
stream_type::executor_type ex = stream1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = stream1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = stream1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
stream_type::lowest_layer_type& lowest_layer = stream1.lowest_layer();
(void)lowest_layer;
@@ -273,13 +260,9 @@ void test_async_operations()
{
using namespace std; // For memcmp.
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context io_context;
@@ -366,7 +349,7 @@ void test_async_operations()
ASIO_TEST_SUITE
(
"buffered_stream",
- ASIO_TEST_CASE(test_compile)
+ ASIO_COMPILE_TEST_CASE(test_compile)
ASIO_TEST_CASE(test_sync_operations)
ASIO_TEST_CASE(test_async_operations)
)
diff --git a/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp b/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp
index dd520505d33..635ff984b8d 100644
--- a/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp
+++ b/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp
@@ -2,7 +2,7 @@
// buffered_write_stream.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,6 +17,7 @@
#include "asio/buffered_write_stream.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
@@ -30,12 +31,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
typedef asio::buffered_write_stream<
asio::ip::tcp::socket> stream_type;
@@ -81,14 +76,6 @@ void test_compile()
stream_type::executor_type ex = stream1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = stream1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = stream1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
stream_type::lowest_layer_type& lowest_layer = stream1.lowest_layer();
(void)lowest_layer;
@@ -262,13 +249,9 @@ void test_async_operations()
{
using namespace std; // For memcmp.
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context io_context;
@@ -355,7 +338,7 @@ void test_async_operations()
ASIO_TEST_SUITE
(
"buffered_write_stream",
- ASIO_TEST_CASE(test_compile)
+ ASIO_COMPILE_TEST_CASE(test_compile)
ASIO_TEST_CASE(test_sync_operations)
ASIO_TEST_CASE(test_async_operations)
)
diff --git a/3rdparty/asio/src/tests/unit/buffers_iterator.cpp b/3rdparty/asio/src/tests/unit/buffers_iterator.cpp
index bd8c27522b2..071dc1bb8b3 100644
--- a/3rdparty/asio/src/tests/unit/buffers_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/buffers_iterator.cpp
@@ -2,7 +2,7 @@
// buffers_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,17 +16,10 @@
// Test that header file is self-contained.
#include "asio/buffers_iterator.hpp"
+#include <array>
#include "asio/buffer.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_ARRAY)
-# include <boost/array.hpp>
-#endif // defined(ASIO_HAS_BOOST_ARRAY)
-
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
//------------------------------------------------------------------------------
// buffers_iterator_compile test
@@ -36,11 +29,7 @@
namespace buffers_iterator_compile {
-#if defined(ASIO_HAS_BOOST_ARRAY)
-using boost::array;
-#elif defined(ASIO_HAS_STD_ARRAY)
using std::array;
-#endif // defined(ASIO_HAS_BOOST_ARRAY)
using std::vector;
using namespace asio;
@@ -288,5 +277,5 @@ void test()
ASIO_TEST_SUITE
(
"buffers_iterator",
- ASIO_TEST_CASE(buffers_iterator_compile::test)
+ ASIO_COMPILE_TEST_CASE(buffers_iterator_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/cancellation_signal.cpp b/3rdparty/asio/src/tests/unit/cancellation_signal.cpp
new file mode 100644
index 00000000000..0b0f72fcbcb
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/cancellation_signal.cpp
@@ -0,0 +1,25 @@
+//
+// cancellation_signal.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/cancellation_signal.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "cancellation_signal",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/signal_set_service.cpp b/3rdparty/asio/src/tests/unit/cancellation_state.cpp
index 1dd2a2c651f..74bc6566916 100644
--- a/3rdparty/asio/src/tests/unit/signal_set_service.cpp
+++ b/3rdparty/asio/src/tests/unit/cancellation_state.cpp
@@ -1,8 +1,8 @@
//
-// signal_set_service.cpp
+// cancellation_state.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/signal_set_service.hpp"
+#include "asio/cancellation_state.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
- "signal_set_service",
+ "cancellation_state",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/cancellation_type.cpp b/3rdparty/asio/src/tests/unit/cancellation_type.cpp
new file mode 100644
index 00000000000..fd6accb0a05
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/cancellation_type.cpp
@@ -0,0 +1,25 @@
+//
+// cancellation_type.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/cancellation_type.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "cancellation_type",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/co_spawn.cpp b/3rdparty/asio/src/tests/unit/co_spawn.cpp
new file mode 100644
index 00000000000..c5d1fbf776d
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/co_spawn.cpp
@@ -0,0 +1,133 @@
+//
+// co_spawn.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/co_spawn.hpp"
+
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_CO_AWAIT)
+
+#include <stdexcept>
+#include "asio/any_completion_handler.hpp"
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/io_context.hpp"
+
+asio::awaitable<void> void_returning_coroutine()
+{
+ co_return;
+}
+
+asio::awaitable<int> int_returning_coroutine()
+{
+ co_return 42;
+}
+
+void test_co_spawn_with_any_completion_handler()
+{
+ asio::io_context ctx;
+
+ bool called = false;
+ asio::co_spawn(ctx, void_returning_coroutine(),
+ asio::any_completion_handler<void(std::exception_ptr)>(
+ [&](std::exception_ptr)
+ {
+ called = true;
+ }));
+
+ ASIO_CHECK(!called);
+
+ ctx.run();
+
+ ASIO_CHECK(called);
+
+ int result = 0;
+ asio::co_spawn(ctx, int_returning_coroutine(),
+ asio::any_completion_handler<void(std::exception_ptr, int)>(
+ [&](std::exception_ptr, int i)
+ {
+ result = i;
+ }));
+
+ ASIO_CHECK(result == 0);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(result == 42);
+}
+
+void test_co_spawn_immediate_cancel()
+{
+ asio::cancellation_signal sig;
+ asio::io_context ctx;
+
+ std::exception_ptr result = nullptr;
+ bool called = false;
+ asio::co_spawn(ctx, void_returning_coroutine(),
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](std::exception_ptr e)
+ {
+ result = e;
+ called = true;
+ }));
+
+ ASIO_CHECK(!called);
+ ASIO_CHECK(result == nullptr);
+
+ sig.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(called);
+ ASIO_CHECK(result != nullptr);
+
+ result = nullptr;
+ called = false;
+ asio::co_spawn(ctx, int_returning_coroutine(),
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](std::exception_ptr e, int i)
+ {
+ ASIO_CHECK(i != 42);
+ result = e;
+ called = true;
+ }));
+
+ ASIO_CHECK(!called);
+ ASIO_CHECK(result == nullptr);
+
+ sig.emit(asio::cancellation_type::all);
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(called);
+ ASIO_CHECK(result != nullptr);
+}
+
+ASIO_TEST_SUITE
+(
+ "co_spawn",
+ ASIO_TEST_CASE(test_co_spawn_with_any_completion_handler)
+ ASIO_TEST_CASE(test_co_spawn_immediate_cancel)
+)
+
+#else // defined(ASIO_HAS_CO_AWAIT)
+
+ASIO_TEST_SUITE
+(
+ "co_spawn",
+ ASIO_TEST_CASE(null_test)
+)
+
+#endif // defined(ASIO_HAS_CO_AWAIT)
diff --git a/3rdparty/asio/src/tests/unit/completion_condition.cpp b/3rdparty/asio/src/tests/unit/completion_condition.cpp
index 43e64544728..106789e5e3c 100644
--- a/3rdparty/asio/src/tests/unit/completion_condition.cpp
+++ b/3rdparty/asio/src/tests/unit/completion_condition.cpp
@@ -2,7 +2,7 @@
// completion_condition.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/compose.cpp b/3rdparty/asio/src/tests/unit/compose.cpp
new file mode 100644
index 00000000000..c9820af2fd3
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/compose.cpp
@@ -0,0 +1,528 @@
+//
+// compose.cpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/compose.hpp"
+
+#include <functional>
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+//------------------------------------------------------------------------------
+
+class impl_0_completion_args
+{
+public:
+ explicit impl_0_completion_args(asio::io_context& ioc)
+ : ioc_(ioc),
+ state_(starting)
+ {
+ }
+
+ template <typename Self>
+ void operator()(Self& self)
+ {
+ switch (state_)
+ {
+ case starting:
+ state_ = posting;
+ asio::post(ioc_, static_cast<Self&&>(self));
+ break;
+ case posting:
+ self.complete();
+ break;
+ default:
+ break;
+ }
+ }
+
+private:
+ asio::io_context& ioc_;
+ enum { starting, posting } state_;
+};
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void())
+async_0_completion_args(asio::io_context& ioc,
+ CompletionToken&& token)
+{
+ return asio::async_compose<CompletionToken, void()>(
+ impl_0_completion_args(ioc), token);
+}
+
+void compose_0_args_handler(int* count)
+{
+ ++(*count);
+}
+
+struct compose_0_args_lvalue_handler
+{
+ int* count_;
+
+ void operator()()
+ {
+ ++(*count_);
+ }
+};
+
+void compose_0_completion_args_test()
+{
+ namespace bindns = std;
+
+ asio::io_context ioc;
+ int count = 0;
+
+ async_0_completion_args(ioc, bindns::bind(&compose_0_args_handler, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ ioc.restart();
+ count = 0;
+
+ compose_0_args_lvalue_handler lvalue_handler = { &count };
+ async_0_completion_args(ioc, lvalue_handler);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+}
+
+//------------------------------------------------------------------------------
+
+class impl_1_completion_arg
+{
+public:
+ explicit impl_1_completion_arg(asio::io_context& ioc)
+ : ioc_(ioc),
+ state_(starting)
+ {
+ }
+
+ template <typename Self>
+ void operator()(Self& self)
+ {
+ switch (state_)
+ {
+ case starting:
+ state_ = posting;
+ asio::post(ioc_, static_cast<Self&&>(self));
+ break;
+ case posting:
+ self.complete(42);
+ break;
+ default:
+ break;
+ }
+ }
+
+private:
+ asio::io_context& ioc_;
+ enum { starting, posting } state_;
+};
+
+template <typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int))
+async_1_completion_arg(asio::io_context& ioc,
+ CompletionToken&& token)
+{
+ return asio::async_compose<CompletionToken, void(int)>(
+ impl_1_completion_arg(ioc), token);
+}
+
+void compose_1_arg_handler(int* count, int* result_out, int result)
+{
+ ++(*count);
+ *result_out = result;
+}
+
+struct compose_1_arg_lvalue_handler
+{
+ int* count_;
+ int* result_out_;
+
+ void operator()(int result)
+ {
+ ++(*count_);
+ *result_out_ = result;
+ }
+};
+
+void compose_1_completion_arg_test()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+
+ asio::io_context ioc;
+ int count = 0;
+ int result = 0;
+
+ async_1_completion_arg(ioc,
+ bindns::bind(&compose_1_arg_handler, &count, &result, _1));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(result == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == 42);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ compose_1_arg_lvalue_handler lvalue_handler = { &count, &result };
+ async_1_completion_arg(ioc, lvalue_handler);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(result == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == 42);
+}
+
+//------------------------------------------------------------------------------
+
+typedef asio::enable_terminal_cancellation default_filter;
+
+template <typename CancellationFilter>
+class impl_cancellable
+{
+public:
+ explicit impl_cancellable(CancellationFilter cancellation_filter,
+ asio::system_timer& timer)
+ : cancellation_filter_(cancellation_filter),
+ timer_(timer),
+ state_(starting)
+ {
+ }
+
+ template <typename Self>
+ void operator()(Self& self,
+ const asio::error_code& ec = asio::error_code())
+ {
+ switch (state_)
+ {
+ case starting:
+ if (!asio::is_same<CancellationFilter, default_filter>::value)
+ self.reset_cancellation_state(cancellation_filter_);
+ state_ = waiting;
+ timer_.expires_after(asio::chrono::milliseconds(100));
+ timer_.async_wait(static_cast<Self&&>(self));
+ break;
+ case waiting:
+ self.complete(!ec);
+ break;
+ default:
+ break;
+ }
+ }
+
+private:
+ CancellationFilter cancellation_filter_;
+ asio::system_timer& timer_;
+ enum { starting, waiting } state_;
+};
+
+template <typename CancellationFilter, typename CompletionToken>
+ASIO_INITFN_RESULT_TYPE(CompletionToken, void(bool))
+async_cancellable(CancellationFilter cancellation_filter,
+ asio::system_timer& timer,
+ CompletionToken&& token)
+{
+ return asio::async_compose<CompletionToken, void(bool)>(
+ impl_cancellable<CancellationFilter>(cancellation_filter, timer), token);
+}
+
+void compose_partial_cancellation_handler(
+ int* count, bool* result_out, bool result)
+{
+ ++(*count);
+ *result_out = result;
+}
+
+void compose_default_cancellation_test()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+
+ asio::io_context ioc;
+ asio::system_timer timer(ioc);
+ asio::cancellation_signal signal;
+ int count = 0;
+ bool result = false;
+
+ async_cancellable(default_filter(), timer,
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1));
+
+ ioc.run();
+
+ // No cancellation, operation completes successfully.
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == true);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(default_filter(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Total cancellation unsupported. Operation completes successfully.
+ signal.emit(asio::cancellation_type::total);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == true);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(default_filter(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Partial cancellation unsupported. Operation completes successfully.
+ signal.emit(asio::cancellation_type::partial);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == true);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(default_filter(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Terminal cancellation works. Operation completes with failure.
+ signal.emit(asio::cancellation_type::terminal);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == false);
+}
+
+void compose_partial_cancellation_test()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+
+ asio::io_context ioc;
+ asio::system_timer timer(ioc);
+ asio::cancellation_signal signal;
+ int count = 0;
+ bool result = false;
+
+ async_cancellable(asio::enable_partial_cancellation(), timer,
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1));
+
+ ioc.run();
+
+ // No cancellation, operation completes successfully.
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == true);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(asio::enable_partial_cancellation(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Total cancellation unsupported. Operation completes successfully.
+ signal.emit(asio::cancellation_type::total);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == true);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(asio::enable_partial_cancellation(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Partial cancellation works. Operation completes with failure.
+ signal.emit(asio::cancellation_type::partial);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == false);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(asio::enable_partial_cancellation(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Terminal cancellation works. Operation completes with failure.
+ signal.emit(asio::cancellation_type::terminal);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == false);
+}
+
+void compose_total_cancellation_test()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+
+ asio::io_context ioc;
+ asio::system_timer timer(ioc);
+ asio::cancellation_signal signal;
+ int count = 0;
+ bool result = false;
+
+ async_cancellable(asio::enable_total_cancellation(), timer,
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1));
+
+ ioc.run();
+
+ // No cancellation, operation completes successfully.
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == true);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(asio::enable_total_cancellation(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Total cancellation works. Operation completes with failure.
+ signal.emit(asio::cancellation_type::total);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == false);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(asio::enable_total_cancellation(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Partial cancellation works. Operation completes with failure.
+ signal.emit(asio::cancellation_type::partial);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == false);
+
+ ioc.restart();
+ count = 0;
+ result = 0;
+
+ async_cancellable(asio::enable_total_cancellation(), timer,
+ asio::bind_cancellation_slot(signal.slot(),
+ bindns::bind(&compose_partial_cancellation_handler,
+ &count, &result, _1)));
+
+ // Terminal cancellation works. Operation completes with failure.
+ signal.emit(asio::cancellation_type::terminal);
+
+ ioc.run();
+
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(result == false);
+}
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "compose",
+ ASIO_TEST_CASE(compose_0_completion_args_test)
+ ASIO_TEST_CASE(compose_1_completion_arg_test)
+ ASIO_TEST_CASE(compose_default_cancellation_test)
+ ASIO_TEST_CASE(compose_partial_cancellation_test)
+ ASIO_TEST_CASE(compose_total_cancellation_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/connect.cpp b/3rdparty/asio/src/tests/unit/connect.cpp
index 3b0a43248f3..16c0331b4a3 100644
--- a/3rdparty/asio/src/tests/unit/connect.cpp
+++ b/3rdparty/asio/src/tests/unit/connect.cpp
@@ -2,7 +2,7 @@
// connect.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,10 +16,1165 @@
// Test that header file is self-contained.
#include "asio/connect.hpp"
+#include <functional>
+#include <vector>
+#include "asio/detail/thread.hpp"
+#include "asio/ip/tcp.hpp"
#include "unit_test.hpp"
+namespace bindns = std;
+using bindns::placeholders::_1;
+using bindns::placeholders::_2;
+
+class connection_sink
+{
+public:
+ connection_sink()
+ : acceptor_(io_context_,
+ asio::ip::tcp::endpoint(
+ asio::ip::address_v4::loopback(), 0)),
+ target_endpoint_(acceptor_.local_endpoint()),
+ socket_(io_context_),
+ thread_(bindns::bind(&connection_sink::run, this))
+ {
+ }
+
+ ~connection_sink()
+ {
+ io_context_.stop();
+ thread_.join();
+ }
+
+ asio::ip::tcp::endpoint target_endpoint()
+ {
+ return target_endpoint_;
+ }
+
+private:
+ void run()
+ {
+ io_context_.run();
+ }
+
+ void handle_accept()
+ {
+ socket_.close();
+ acceptor_.async_accept(socket_,
+ bindns::bind(&connection_sink::handle_accept, this));
+ }
+
+ asio::io_context io_context_;
+ asio::ip::tcp::acceptor acceptor_;
+ asio::ip::tcp::endpoint target_endpoint_;
+ asio::ip::tcp::socket socket_;
+ asio::detail::thread thread_;
+};
+
+bool true_cond_1(const asio::error_code& /*ec*/,
+ const asio::ip::tcp::endpoint& /*endpoint*/)
+{
+ return true;
+}
+
+struct true_cond_2
+{
+ template <typename Endpoint>
+ bool operator()(const asio::error_code& /*ec*/,
+ const Endpoint& /*endpoint*/)
+ {
+ return true;
+ }
+};
+
+std::vector<asio::ip::tcp::endpoint>::const_iterator legacy_true_cond_1(
+ const asio::error_code& /*ec*/,
+ std::vector<asio::ip::tcp::endpoint>::const_iterator next)
+{
+ return next;
+}
+
+struct legacy_true_cond_2
+{
+ template <typename Iterator>
+ Iterator operator()(const asio::error_code& /*ec*/, Iterator next)
+ {
+ return next;
+ }
+};
+
+bool false_cond(const asio::error_code& /*ec*/,
+ const asio::ip::tcp::endpoint& /*endpoint*/)
+{
+ return false;
+}
+
+void range_handler(const asio::error_code& ec,
+ const asio::ip::tcp::endpoint& endpoint,
+ asio::error_code* out_ec,
+ asio::ip::tcp::endpoint* out_endpoint)
+{
+ *out_ec = ec;
+ *out_endpoint = endpoint;
+}
+
+void iter_handler(const asio::error_code& ec,
+ std::vector<asio::ip::tcp::endpoint>::const_iterator iter,
+ asio::error_code* out_ec,
+ std::vector<asio::ip::tcp::endpoint>::const_iterator* out_iter)
+{
+ *out_ec = ec;
+ *out_iter = iter;
+}
+
+void test_connect_range()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ asio::ip::tcp::endpoint result;
+
+ try
+ {
+ result = asio::connect(socket, endpoints);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints);
+ ASIO_CHECK(result == endpoints[0]);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints);
+ ASIO_CHECK(result == endpoints[0]);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, endpoints);
+ ASIO_CHECK(result == endpoints[1]);
+}
+
+void test_connect_range_ec()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ asio::ip::tcp::endpoint result;
+ asio::error_code ec;
+
+ result = asio::connect(socket, endpoints, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints, ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints, ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, endpoints, ec);
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+}
+
+void test_connect_range_cond()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ asio::ip::tcp::endpoint result;
+
+ try
+ {
+ result = asio::connect(socket, endpoints, true_cond_1);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, endpoints, true_cond_2());
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, endpoints, legacy_true_cond_1);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, endpoints, legacy_true_cond_2());
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, endpoints, false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints, true_cond_1);
+ ASIO_CHECK(result == endpoints[0]);
+
+ result = asio::connect(socket, endpoints, true_cond_2());
+ ASIO_CHECK(result == endpoints[0]);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1);
+ ASIO_CHECK(result == endpoints[0]);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2());
+ ASIO_CHECK(result == endpoints[0]);
+
+ try
+ {
+ result = asio::connect(socket, endpoints, false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints, true_cond_1);
+ ASIO_CHECK(result == endpoints[0]);
+
+ result = asio::connect(socket, endpoints, true_cond_2());
+ ASIO_CHECK(result == endpoints[0]);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1);
+ ASIO_CHECK(result == endpoints[0]);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2());
+ ASIO_CHECK(result == endpoints[0]);
+
+ try
+ {
+ result = asio::connect(socket, endpoints, false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, endpoints, true_cond_1);
+ ASIO_CHECK(result == endpoints[1]);
+
+ result = asio::connect(socket, endpoints, true_cond_2());
+ ASIO_CHECK(result == endpoints[1]);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1);
+ ASIO_CHECK(result == endpoints[1]);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2());
+ ASIO_CHECK(result == endpoints[1]);
+
+ try
+ {
+ result = asio::connect(socket, endpoints, false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+}
+
+void test_connect_range_cond_ec()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ asio::ip::tcp::endpoint result;
+ asio::error_code ec;
+
+ result = asio::connect(socket, endpoints, true_cond_1, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, endpoints, true_cond_2(), ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, endpoints, false_cond, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints, true_cond_1, ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, true_cond_2(), ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1, ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, false_cond, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, endpoints, true_cond_1, ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, true_cond_2(), ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1, ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, false_cond, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, endpoints, true_cond_1, ec);
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, true_cond_2(), ec);
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_1, ec);
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, endpoints, false_cond, ec);
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+}
+
+void test_connect_iter()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ const std::vector<asio::ip::tcp::endpoint>& cendpoints = endpoints;
+ std::vector<asio::ip::tcp::endpoint>::const_iterator result;
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(), cendpoints.end());
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(), cendpoints.end());
+ ASIO_CHECK(result == cendpoints.begin());
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(), cendpoints.end());
+ ASIO_CHECK(result == cendpoints.begin());
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(), cendpoints.end());
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+}
+
+void test_connect_iter_ec()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ const std::vector<asio::ip::tcp::endpoint>& cendpoints = endpoints;
+ std::vector<asio::ip::tcp::endpoint>::const_iterator result;
+ asio::error_code ec;
+
+ result = asio::connect(socket,
+ cendpoints.begin(), cendpoints.end(), ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket,
+ cendpoints.begin(), cendpoints.end(), ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket,
+ cendpoints.begin(), cendpoints.end(), ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket,
+ cendpoints.begin(), cendpoints.end(), ec);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+}
+
+void test_connect_iter_cond()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ const std::vector<asio::ip::tcp::endpoint>& cendpoints = endpoints;
+ std::vector<asio::ip::tcp::endpoint>::const_iterator result;
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2());
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2());
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1);
+ ASIO_CHECK(result == cendpoints.begin());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2());
+ ASIO_CHECK(result == cendpoints.begin());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1);
+ ASIO_CHECK(result == cendpoints.begin());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2());
+ ASIO_CHECK(result == cendpoints.begin());
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1);
+ ASIO_CHECK(result == cendpoints.begin());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2());
+ ASIO_CHECK(result == cendpoints.begin());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1);
+ ASIO_CHECK(result == cendpoints.begin());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2());
+ ASIO_CHECK(result == cendpoints.begin());
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2());
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2());
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+
+ try
+ {
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond);
+ ASIO_CHECK(false);
+ }
+ catch (asio::system_error& e)
+ {
+ ASIO_CHECK(e.code() == asio::error::not_found);
+ }
+}
+
+void test_connect_iter_cond_ec()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ const std::vector<asio::ip::tcp::endpoint>& cendpoints = endpoints;
+ std::vector<asio::ip::tcp::endpoint>::const_iterator result;
+ asio::error_code ec;
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond, ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond, ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond, ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_1, ec);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), legacy_true_cond_2(), ec);
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ result = asio::connect(socket, cendpoints.begin(),
+ cendpoints.end(), false_cond, ec);
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+}
+
+void test_async_connect_range()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ asio::ip::tcp::endpoint result;
+ asio::error_code ec;
+
+ asio::async_connect(socket, endpoints,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, endpoints,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, endpoints,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ asio::async_connect(socket, endpoints,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+}
+
+void test_async_connect_range_cond()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ asio::ip::tcp::endpoint result;
+ asio::error_code ec;
+
+ asio::async_connect(socket, endpoints, true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, endpoints, true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, endpoints, false_cond,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, endpoints, true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, false_cond,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, endpoints, true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[0]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, false_cond,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ asio::async_connect(socket, endpoints, true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_1,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, legacy_true_cond_2(),
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == endpoints[1]);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, endpoints, false_cond,
+ bindns::bind(range_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == asio::ip::tcp::endpoint());
+ ASIO_CHECK(ec == asio::error::not_found);
+}
+
+void test_async_connect_iter()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ const std::vector<asio::ip::tcp::endpoint>& cendpoints = endpoints;
+ std::vector<asio::ip::tcp::endpoint>::const_iterator result;
+ asio::error_code ec;
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+}
+
+void test_async_connect_iter_cond()
+{
+ connection_sink sink;
+ asio::io_context io_context;
+ asio::ip::tcp::socket socket(io_context);
+ std::vector<asio::ip::tcp::endpoint> endpoints;
+ const std::vector<asio::ip::tcp::endpoint>& cendpoints = endpoints;
+ std::vector<asio::ip::tcp::endpoint>::const_iterator result;
+ asio::error_code ec;
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ false_cond, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ false_cond, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.push_back(sink.target_endpoint());
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin());
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ false_cond, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+
+ endpoints.insert(endpoints.begin(), asio::ip::tcp::endpoint());
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_1, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ legacy_true_cond_2(), bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.begin() + 1);
+ ASIO_CHECK(!ec);
+
+ asio::async_connect(socket, cendpoints.begin(), cendpoints.end(),
+ false_cond, bindns::bind(iter_handler, _1, _2, &ec, &result));
+ io_context.restart();
+ io_context.run();
+ ASIO_CHECK(result == cendpoints.end());
+ ASIO_CHECK(ec == asio::error::not_found);
+}
+
ASIO_TEST_SUITE
(
"connect",
- ASIO_TEST_CASE(null_test)
+ ASIO_TEST_CASE(test_connect_range)
+ ASIO_TEST_CASE(test_connect_range_ec)
+ ASIO_TEST_CASE(test_connect_range_cond)
+ ASIO_TEST_CASE(test_connect_range_cond_ec)
+ ASIO_TEST_CASE(test_connect_iter)
+ ASIO_TEST_CASE(test_connect_iter_ec)
+ ASIO_TEST_CASE(test_connect_iter_cond)
+ ASIO_TEST_CASE(test_connect_iter_cond_ec)
+ ASIO_TEST_CASE(test_async_connect_range)
+ ASIO_TEST_CASE(test_async_connect_range_cond)
+ ASIO_TEST_CASE(test_async_connect_iter)
+ ASIO_TEST_CASE(test_async_connect_iter_cond)
)
diff --git a/3rdparty/asio/src/tests/unit/connect_pipe.cpp b/3rdparty/asio/src/tests/unit/connect_pipe.cpp
new file mode 100644
index 00000000000..8c71a5d093c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/connect_pipe.cpp
@@ -0,0 +1,154 @@
+//
+// connect_pipe.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/connect_pipe.hpp"
+
+#include <functional>
+#include <string>
+#include "asio/io_context.hpp"
+#include "asio/read.hpp"
+#include "asio/readable_pipe.hpp"
+#include "asio/writable_pipe.hpp"
+#include "asio/write.hpp"
+#include "unit_test.hpp"
+
+//------------------------------------------------------------------------------
+
+// connect_pipe_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all connect_pipe functions compile and link
+// correctly. Runtime failures are ignored.
+
+namespace connect_pipe_compile {
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace asio;
+
+ try
+ {
+ asio::io_context io_context;
+ asio::error_code ec1;
+
+ readable_pipe p1(io_context);
+ writable_pipe p2(io_context);
+ connect_pipe(p1, p2);
+
+ readable_pipe p3(io_context);
+ writable_pipe p4(io_context);
+ connect_pipe(p3, p4, ec1);
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace connect_pipe_compile
+
+//------------------------------------------------------------------------------
+
+// connect_pipe_runtime test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that connect_pipe operates correctly at runtime.
+
+namespace connect_pipe_runtime {
+
+static const char write_data[]
+ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+void handle_read(const asio::error_code& err,
+ size_t bytes_transferred, bool* called)
+{
+ *called = true;
+ ASIO_CHECK(!err);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+}
+
+void handle_write(const asio::error_code& err,
+ size_t bytes_transferred, bool* called)
+{
+ *called = true;
+ ASIO_CHECK(!err);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+}
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace std; // For memcmp.
+ using namespace asio;
+
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ try
+ {
+ asio::io_context io_context;
+ asio::error_code ec1;
+ asio::error_code ec2;
+
+ readable_pipe p1(io_context);
+ writable_pipe p2(io_context);
+ connect_pipe(p1, p2);
+
+ std::string data1 = write_data;
+ asio::write(p2, asio::buffer(data1));
+
+ std::string data2;
+ data2.resize(data1.size());
+ asio::read(p1, asio::buffer(data2));
+
+ ASIO_CHECK(data1 == data2);
+
+ char read_buffer[sizeof(write_data)];
+ bool read_completed = false;
+ asio::async_read(p1,
+ asio::buffer(read_buffer),
+ bindns::bind(handle_read,
+ _1, _2, &read_completed));
+
+ bool write_completed = false;
+ asio::async_write(p2,
+ asio::buffer(write_data),
+ bindns::bind(handle_write,
+ _1, _2, &write_completed));
+
+ io_context.run();
+
+ ASIO_CHECK(read_completed);
+ ASIO_CHECK(write_completed);
+ ASIO_CHECK(memcmp(read_buffer, write_data, sizeof(write_data)) == 0);
+ }
+ catch (std::exception&)
+ {
+ ASIO_CHECK(false);
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace connect_pipe_compile
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "connect_pipe",
+ ASIO_COMPILE_TEST_CASE(connect_pipe_compile::test)
+ ASIO_TEST_CASE(connect_pipe_runtime::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/consign.cpp b/3rdparty/asio/src/tests/unit/consign.cpp
new file mode 100644
index 00000000000..b24f5281c75
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/consign.cpp
@@ -0,0 +1,56 @@
+//
+// consign.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/consign.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+void consign_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::consign(
+ asio::bind_executor(io2.get_executor(),
+ [&count](asio::error_code)
+ {
+ ++count;
+ }), 123, 321));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "consign",
+ ASIO_TEST_CASE(consign_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/coroutine.cpp b/3rdparty/asio/src/tests/unit/coroutine.cpp
index 162cacdbb6d..72e6953a31a 100644
--- a/3rdparty/asio/src/tests/unit/coroutine.cpp
+++ b/3rdparty/asio/src/tests/unit/coroutine.cpp
@@ -2,7 +2,7 @@
// coroutine.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/deadline_timer.cpp b/3rdparty/asio/src/tests/unit/deadline_timer.cpp
index 9c48b62c69a..9bc7f16fcd2 100644
--- a/3rdparty/asio/src/tests/unit/deadline_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/deadline_timer.cpp
@@ -2,7 +2,7 @@
// deadline_timer.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,7 +20,7 @@
#if defined(ASIO_HAS_BOOST_DATE_TIME)
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include "archetypes/async_result.hpp"
#include "asio/executor_work_guard.hpp"
#include "asio/io_context.hpp"
@@ -250,21 +250,77 @@ struct custom_allocation_timer_handler
custom_allocation_timer_handler(int* count) : count_(count) {}
void operator()(const asio::error_code&) {}
int* count_;
-};
-void* asio_handler_allocate(std::size_t size,
- custom_allocation_timer_handler* handler)
-{
- ++(*handler->count_);
- return ::operator new(size);
-}
-
-void asio_handler_deallocate(void* pointer, std::size_t,
- custom_allocation_timer_handler* handler)
-{
- --(*handler->count_);
- ::operator delete(pointer);
-}
+ template <typename T>
+ struct allocator
+ {
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef T value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef allocator<U> other;
+ };
+
+ explicit allocator(int* count) noexcept
+ : count_(count)
+ {
+ }
+
+ allocator(const allocator& other) noexcept
+ : count_(other.count_)
+ {
+ }
+
+ template <typename U>
+ allocator(const allocator<U>& other) noexcept
+ : count_(other.count_)
+ {
+ }
+
+ pointer allocate(size_type n, const void* = 0)
+ {
+ ++(*count_);
+ return static_cast<T*>(::operator new(sizeof(T) * n));
+ }
+
+ void deallocate(pointer p, size_type)
+ {
+ --(*count_);
+ ::operator delete(p);
+ }
+
+ size_type max_size() const
+ {
+ return ~size_type(0);
+ }
+
+ void construct(pointer p, const T& v)
+ {
+ new (p) T(v);
+ }
+
+ void destroy(pointer p)
+ {
+ p->~T();
+ }
+
+ int* count_;
+ };
+
+ typedef allocator<int> allocator_type;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_type(count_);
+ }
+};
void deadline_timer_custom_allocation_test()
{
@@ -340,7 +396,6 @@ void deadline_timer_async_result_test()
ioc.run();
}
-#if defined(ASIO_HAS_MOVE)
asio::deadline_timer make_timer(asio::io_context& ioc, int* count)
{
asio::deadline_timer t(ioc);
@@ -348,11 +403,9 @@ asio::deadline_timer make_timer(asio::io_context& ioc, int* count)
t.async_wait(boost::bind(increment, count));
return t;
}
-#endif // defined(ASIO_HAS_MOVE)
void deadline_timer_move_test()
{
-#if defined(ASIO_HAS_MOVE)
asio::io_context io_context1;
asio::io_context io_context2;
int count = 0;
@@ -370,7 +423,6 @@ void deadline_timer_move_test()
io_context1.run();
ASIO_CHECK(count == 2);
-#endif // defined(ASIO_HAS_MOVE)
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/defer.cpp b/3rdparty/asio/src/tests/unit/defer.cpp
index 90163f636a5..f41c1b9f025 100644
--- a/3rdparty/asio/src/tests/unit/defer.cpp
+++ b/3rdparty/asio/src/tests/unit/defer.cpp
@@ -2,7 +2,7 @@
// defer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/deferred.cpp b/3rdparty/asio/src/tests/unit/deferred.cpp
new file mode 100644
index 00000000000..b2db70d4b3d
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/deferred.cpp
@@ -0,0 +1,25 @@
+//
+// deferred.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/deferred.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/deferred",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/detached.cpp b/3rdparty/asio/src/tests/unit/detached.cpp
new file mode 100644
index 00000000000..506c13d8773
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/detached.cpp
@@ -0,0 +1,25 @@
+//
+// detached.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/detached.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "detached",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/dispatch.cpp b/3rdparty/asio/src/tests/unit/dispatch.cpp
index 64c20354bb9..f6fb84d4f91 100644
--- a/3rdparty/asio/src/tests/unit/dispatch.cpp
+++ b/3rdparty/asio/src/tests/unit/dispatch.cpp
@@ -2,7 +2,7 @@
// dispatch.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/error.cpp b/3rdparty/asio/src/tests/unit/error.cpp
index d4c9b32106b..3f8aa75efbe 100644
--- a/3rdparty/asio/src/tests/unit/error.cpp
+++ b/3rdparty/asio/src/tests/unit/error.cpp
@@ -2,7 +2,7 @@
// error.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/execution/any_executor.cpp b/3rdparty/asio/src/tests/unit/execution/any_executor.cpp
new file mode 100644
index 00000000000..3e2dabdc5a5
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/any_executor.cpp
@@ -0,0 +1,1202 @@
+//
+// any_executor.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/any_executor.hpp"
+
+#include <cstring>
+#include <functional>
+#include "asio/thread_pool.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+static bool next_nothrow_new_fails = false;
+
+void* operator new(std::size_t n,
+ const std::nothrow_t&) noexcept
+{
+ if (next_nothrow_new_fails)
+ {
+ next_nothrow_new_fails = false;
+ return 0;
+ }
+ return ::operator new(n);
+}
+
+struct fat_executor
+{
+ fat_executor(int id)
+ : id_(id)
+ {
+ std::memset(data_, 0, sizeof(data_));
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ std::size_t query(execution::occupancy_t) const
+ {
+ return 1;
+ }
+
+ friend bool operator==(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ == b.id_;
+ }
+
+ friend bool operator!=(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ != b.id_;
+ }
+
+ int id_;
+ unsigned char data_[1024];
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<fat_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <>
+struct query_member<fat_executor, execution::occupancy_t>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef std::size_t result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<fat_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_executor_construction_test()
+{
+ typedef execution::any_executor<> ex_no_props_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t
+ > ex_one_prop_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::occupancy_t
+ > ex_two_props_t;
+
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ ex_two_props_t ex_two_props_1;
+
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1 == null_ptr);
+
+ ex_two_props_t ex_two_props_2(null_ptr);
+
+ ASIO_CHECK(ex_two_props_2.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_2 == null_ptr);
+ ASIO_CHECK(ex_two_props_2 == ex_two_props_1);
+
+ ex_two_props_t ex_two_props_3(pool.executor());
+
+ ASIO_CHECK(ex_two_props_3.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_3 != null_ptr);
+ ASIO_CHECK(ex_two_props_3 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_4(ex_two_props_1);
+
+ ASIO_CHECK(ex_two_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_4 == null_ptr);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_1);
+
+ ex_two_props_t ex_two_props_5(ex_two_props_3);
+
+ ASIO_CHECK(ex_two_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_5 != null_ptr);
+ ASIO_CHECK(ex_two_props_5 == ex_two_props_3);
+
+ ex_two_props_t ex_two_props_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_two_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_6 != null_ptr);
+ ASIO_CHECK(ex_two_props_6 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_7 = fat_executor(1);
+
+ ASIO_CHECK(ex_two_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_7 != null_ptr);
+ ASIO_CHECK(ex_two_props_7 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_7 == ex_two_props_6);
+
+ ex_two_props_t ex_two_props_8 = fat_executor(2);
+
+ ASIO_CHECK(ex_two_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_8 != null_ptr);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_6);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_7);
+
+ ex_two_props_t ex_two_props_9(ex_two_props_6);
+
+ ASIO_CHECK(ex_two_props_9.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_9 != null_ptr);
+ ASIO_CHECK(ex_two_props_9 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_9 == ex_two_props_6);
+ ASIO_CHECK(ex_two_props_9 == ex_two_props_7);
+ ASIO_CHECK(ex_two_props_9 != ex_two_props_8);
+
+ ex_two_props_t ex_two_props_10(std::move(ex_two_props_1));
+
+ ASIO_CHECK(ex_two_props_10.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_10 == null_ptr);
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1 == null_ptr);
+
+ ex_two_props_t ex_two_props_11(std::move(ex_two_props_3));
+
+ ASIO_CHECK(ex_two_props_11.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_11 != null_ptr);
+ ASIO_CHECK(ex_two_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_3 == null_ptr);
+ ASIO_CHECK(ex_two_props_11 == ex_two_props_5);
+
+ ex_two_props_t ex_two_props_12(std::move(ex_two_props_7));
+
+ ASIO_CHECK(ex_two_props_12.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_12 != null_ptr);
+ ASIO_CHECK(ex_two_props_7.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_7 == null_ptr);
+ ASIO_CHECK(ex_two_props_12 == ex_two_props_6);
+ ASIO_CHECK(ex_two_props_12 != ex_two_props_8);
+
+ ex_one_prop_t ex_one_prop_1;
+
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_2(null_ptr);
+
+ ASIO_CHECK(ex_one_prop_2.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_2 == null_ptr);
+ ASIO_CHECK(ex_one_prop_2 == ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_3(pool.executor());
+
+ ASIO_CHECK(ex_one_prop_3.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_3 != null_ptr);
+ ASIO_CHECK(ex_one_prop_3 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_4(ex_one_prop_1);
+
+ ASIO_CHECK(ex_one_prop_4.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_4 == null_ptr);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_5(ex_one_prop_3);
+
+ ASIO_CHECK(ex_one_prop_5.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_5 != null_ptr);
+ ASIO_CHECK(ex_one_prop_5 == ex_one_prop_3);
+
+ ex_one_prop_t ex_one_prop_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_one_prop_6.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_6 != null_ptr);
+ ASIO_CHECK(ex_one_prop_6 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_7 = fat_executor(1);
+
+ ASIO_CHECK(ex_one_prop_7.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_7 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_7 == ex_one_prop_6);
+
+ ex_one_prop_t ex_one_prop_8 = fat_executor(2);
+
+ ASIO_CHECK(ex_one_prop_8.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_8 != null_ptr);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_7);
+
+ ex_one_prop_t ex_one_prop_9(ex_one_prop_6);
+
+ ASIO_CHECK(ex_one_prop_9.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_9 != null_ptr);
+ ASIO_CHECK(ex_one_prop_9 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_9 == ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_9 == ex_one_prop_7);
+ ASIO_CHECK(ex_one_prop_9 != ex_one_prop_8);
+
+ ex_one_prop_t ex_one_prop_10(std::move(ex_one_prop_1));
+
+ ASIO_CHECK(ex_one_prop_10.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_10 == null_ptr);
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_11(std::move(ex_one_prop_3));
+
+ ASIO_CHECK(ex_one_prop_11.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_11 != null_ptr);
+ ASIO_CHECK(ex_one_prop_3.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_3 == null_ptr);
+ ASIO_CHECK(ex_one_prop_11 == ex_one_prop_5);
+
+ ex_one_prop_t ex_one_prop_12(std::move(ex_one_prop_7));
+
+ ASIO_CHECK(ex_one_prop_12.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_12 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_7 == null_ptr);
+ ASIO_CHECK(ex_one_prop_12 == ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_12 != ex_one_prop_8);
+
+ ex_one_prop_t ex_one_prop_13(ex_two_props_1);
+
+ ASIO_CHECK(ex_one_prop_13.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_13 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_14(ex_two_props_5);
+
+ ASIO_CHECK(ex_one_prop_14.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_14 != null_ptr);
+
+ ex_one_prop_t ex_one_prop_15(ex_two_props_9);
+
+ ASIO_CHECK(ex_one_prop_15.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_15 != null_ptr);
+
+ ex_no_props_t ex_no_props_1;
+
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1 == null_ptr);
+
+ ex_no_props_t ex_no_props_2(null_ptr);
+
+ ASIO_CHECK(ex_no_props_2.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_2 == null_ptr);
+ ASIO_CHECK(ex_no_props_2 == ex_no_props_1);
+
+ ex_no_props_t ex_no_props_3(pool.executor());
+
+ ASIO_CHECK(ex_no_props_3.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_3 != null_ptr);
+ ASIO_CHECK(ex_no_props_3 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_4(ex_no_props_1);
+
+ ASIO_CHECK(ex_no_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_4 == null_ptr);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_1);
+
+ ex_no_props_t ex_no_props_5(ex_no_props_3);
+
+ ASIO_CHECK(ex_no_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_5 != null_ptr);
+ ASIO_CHECK(ex_no_props_5 == ex_no_props_3);
+
+ ex_no_props_t ex_no_props_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_no_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_6 != null_ptr);
+ ASIO_CHECK(ex_no_props_6 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_7 = fat_executor(1);
+
+ ASIO_CHECK(ex_no_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_7 != null_ptr);
+ ASIO_CHECK(ex_no_props_7 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_7 == ex_no_props_6);
+
+ ex_no_props_t ex_no_props_8 = fat_executor(2);
+
+ ASIO_CHECK(ex_no_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_8 != null_ptr);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_6);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_7);
+
+ ex_no_props_t ex_no_props_9(ex_no_props_6);
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_9 != null_ptr);
+ ASIO_CHECK(ex_no_props_9 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_9 == ex_no_props_6);
+ ASIO_CHECK(ex_no_props_9 == ex_no_props_7);
+ ASIO_CHECK(ex_no_props_9 != ex_no_props_8);
+
+ ex_no_props_t ex_no_props_10(std::move(ex_no_props_1));
+
+ ASIO_CHECK(ex_no_props_10.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_10 == null_ptr);
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1 == null_ptr);
+
+ ex_no_props_t ex_no_props_11(std::move(ex_no_props_3));
+
+ ASIO_CHECK(ex_no_props_11.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_11 != null_ptr);
+ ASIO_CHECK(ex_no_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_3 == null_ptr);
+ ASIO_CHECK(ex_no_props_11 == ex_no_props_5);
+
+ ex_no_props_t ex_no_props_12(std::move(ex_no_props_7));
+
+ ASIO_CHECK(ex_no_props_12.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_12 != null_ptr);
+ ASIO_CHECK(ex_no_props_7.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_7 == null_ptr);
+ ASIO_CHECK(ex_no_props_12 == ex_no_props_6);
+ ASIO_CHECK(ex_no_props_12 != ex_no_props_8);
+
+ ex_no_props_t ex_no_props_13(ex_two_props_1);
+
+ ASIO_CHECK(ex_no_props_13.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_13 == null_ptr);
+
+ ex_no_props_t ex_no_props_14(ex_two_props_5);
+
+ ASIO_CHECK(ex_no_props_14.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_14 != null_ptr);
+
+ ex_no_props_t ex_no_props_15(ex_two_props_9);
+
+ ASIO_CHECK(ex_no_props_15.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_15 != null_ptr);
+
+ ex_no_props_t ex_no_props_16(ex_one_prop_1);
+
+ ASIO_CHECK(ex_no_props_16.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_16 == null_ptr);
+
+ ex_no_props_t ex_no_props_17(ex_one_prop_5);
+
+ ASIO_CHECK(ex_no_props_17.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_17 != null_ptr);
+
+ ex_no_props_t ex_no_props_18(ex_one_prop_9);
+
+ ASIO_CHECK(ex_no_props_18.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_18 != null_ptr);
+}
+
+void any_executor_nothrow_construction_test()
+{
+ typedef execution::any_executor<> ex_no_props_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t
+ > ex_one_prop_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::occupancy_t
+ > ex_two_props_t;
+
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ ex_two_props_t ex_two_props_1;
+
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1 == null_ptr);
+
+ ex_two_props_t ex_two_props_2(null_ptr);
+
+ ASIO_CHECK(ex_two_props_2.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_2 == null_ptr);
+ ASIO_CHECK(ex_two_props_2 == ex_two_props_1);
+
+ ex_two_props_t ex_two_props_3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex_two_props_3.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_3 != null_ptr);
+ ASIO_CHECK(ex_two_props_3 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_4(std::nothrow, ex_two_props_1);
+
+ ASIO_CHECK(ex_two_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_4 == null_ptr);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_1);
+
+ ex_two_props_t ex_two_props_5(std::nothrow, ex_two_props_3);
+
+ ASIO_CHECK(ex_two_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_5 != null_ptr);
+ ASIO_CHECK(ex_two_props_5 == ex_two_props_3);
+
+ ex_two_props_t ex_two_props_6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_two_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_6 != null_ptr);
+ ASIO_CHECK(ex_two_props_6 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_two_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_7 != null_ptr);
+ ASIO_CHECK(ex_two_props_7 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_7 == ex_two_props_6);
+
+ ex_two_props_t ex_two_props_8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex_two_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_8 != null_ptr);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_6);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_7);
+
+ ex_two_props_t ex_two_props_9(std::nothrow, ex_two_props_6);
+
+ ASIO_CHECK(ex_two_props_9.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_9 != null_ptr);
+ ASIO_CHECK(ex_two_props_9 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_9 == ex_two_props_6);
+ ASIO_CHECK(ex_two_props_9 == ex_two_props_7);
+ ASIO_CHECK(ex_two_props_9 != ex_two_props_8);
+
+ ex_two_props_t ex_two_props_10(std::nothrow, std::move(ex_two_props_1));
+
+ ASIO_CHECK(ex_two_props_10.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_10 == null_ptr);
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1 == null_ptr);
+
+ ex_two_props_t ex_two_props_11(std::nothrow, std::move(ex_two_props_3));
+
+ ASIO_CHECK(ex_two_props_11.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_11 != null_ptr);
+ ASIO_CHECK(ex_two_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_3 == null_ptr);
+ ASIO_CHECK(ex_two_props_11 == ex_two_props_5);
+
+ ex_two_props_t ex_two_props_12(std::nothrow, std::move(ex_two_props_7));
+
+ ASIO_CHECK(ex_two_props_12.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_12 != null_ptr);
+ ASIO_CHECK(ex_two_props_7.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_7 == null_ptr);
+ ASIO_CHECK(ex_two_props_12 == ex_two_props_6);
+ ASIO_CHECK(ex_two_props_12 != ex_two_props_8);
+
+ next_nothrow_new_fails = true;
+ ex_two_props_t ex_two_props_13(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex_two_props_13.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_13 == null_ptr);
+ ASIO_CHECK(ex_two_props_13 == ex_two_props_1);
+
+ ex_one_prop_t ex_one_prop_1;
+
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_2(null_ptr);
+
+ ASIO_CHECK(ex_one_prop_2.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_2 == null_ptr);
+ ASIO_CHECK(ex_one_prop_2 == ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex_one_prop_3.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_3 != null_ptr);
+ ASIO_CHECK(ex_one_prop_3 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_4(std::nothrow, ex_one_prop_1);
+
+ ASIO_CHECK(ex_one_prop_4.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_4 == null_ptr);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_5(std::nothrow, ex_one_prop_3);
+
+ ASIO_CHECK(ex_one_prop_5.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_5 != null_ptr);
+ ASIO_CHECK(ex_one_prop_5 == ex_one_prop_3);
+
+ ex_one_prop_t ex_one_prop_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_one_prop_6.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_6 != null_ptr);
+ ASIO_CHECK(ex_one_prop_6 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_one_prop_7.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_7 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_7 == ex_one_prop_6);
+
+ ex_one_prop_t ex_one_prop_8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex_one_prop_8.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_8 != null_ptr);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_7);
+
+ ex_one_prop_t ex_one_prop_9(std::nothrow, ex_one_prop_6);
+
+ ASIO_CHECK(ex_one_prop_9.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_9 != null_ptr);
+ ASIO_CHECK(ex_one_prop_9 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_9 == ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_9 == ex_one_prop_7);
+ ASIO_CHECK(ex_one_prop_9 != ex_one_prop_8);
+
+ ex_one_prop_t ex_one_prop_10(std::nothrow, std::move(ex_one_prop_1));
+
+ ASIO_CHECK(ex_one_prop_10.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_10 == null_ptr);
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_11(std::nothrow, std::move(ex_one_prop_3));
+
+ ASIO_CHECK(ex_one_prop_11.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_11 != null_ptr);
+ ASIO_CHECK(ex_one_prop_3.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_3 == null_ptr);
+ ASIO_CHECK(ex_one_prop_11 == ex_one_prop_5);
+
+ ex_one_prop_t ex_one_prop_12(std::nothrow, std::move(ex_one_prop_7));
+
+ ASIO_CHECK(ex_one_prop_12.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_12 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_7 == null_ptr);
+ ASIO_CHECK(ex_one_prop_12 == ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_12 != ex_one_prop_8);
+
+ ex_one_prop_t ex_one_prop_13(std::nothrow, ex_two_props_1);
+
+ ASIO_CHECK(ex_one_prop_13.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_13 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_14(std::nothrow, ex_two_props_5);
+
+ ASIO_CHECK(ex_one_prop_14.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_14 != null_ptr);
+
+ ex_one_prop_t ex_one_prop_15(std::nothrow, ex_two_props_9);
+
+ ASIO_CHECK(ex_one_prop_15.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_15 != null_ptr);
+
+ next_nothrow_new_fails = true;
+ ex_one_prop_t ex_one_prop_16(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex_one_prop_16.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_16 == null_ptr);
+ ASIO_CHECK(ex_one_prop_16 == ex_one_prop_1);
+
+ ex_no_props_t ex_no_props_1;
+
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1 == null_ptr);
+
+ ex_no_props_t ex_no_props_2(null_ptr);
+
+ ASIO_CHECK(ex_no_props_2.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_2 == null_ptr);
+ ASIO_CHECK(ex_no_props_2 == ex_no_props_1);
+
+ ex_no_props_t ex_no_props_3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex_no_props_3.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_3 != null_ptr);
+ ASIO_CHECK(ex_no_props_3 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_4(std::nothrow, ex_no_props_1);
+
+ ASIO_CHECK(ex_no_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_4 == null_ptr);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_1);
+
+ ex_no_props_t ex_no_props_5(std::nothrow, ex_no_props_3);
+
+ ASIO_CHECK(ex_no_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_5 != null_ptr);
+ ASIO_CHECK(ex_no_props_5 == ex_no_props_3);
+
+ ex_no_props_t ex_no_props_6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_no_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_6 != null_ptr);
+ ASIO_CHECK(ex_no_props_6 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_no_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_7 != null_ptr);
+ ASIO_CHECK(ex_no_props_7 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_7 == ex_no_props_6);
+
+ ex_no_props_t ex_no_props_8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex_no_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_8 != null_ptr);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_6);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_7);
+
+ ex_no_props_t ex_no_props_9(std::nothrow, ex_no_props_6);
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_9 != null_ptr);
+ ASIO_CHECK(ex_no_props_9 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_9 == ex_no_props_6);
+ ASIO_CHECK(ex_no_props_9 == ex_no_props_7);
+ ASIO_CHECK(ex_no_props_9 != ex_no_props_8);
+
+ ex_no_props_t ex_no_props_10(std::nothrow, std::move(ex_no_props_1));
+
+ ASIO_CHECK(ex_no_props_10.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_10 == null_ptr);
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1 == null_ptr);
+
+ ex_no_props_t ex_no_props_11(std::nothrow, std::move(ex_no_props_3));
+
+ ASIO_CHECK(ex_no_props_11.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_11 != null_ptr);
+ ASIO_CHECK(ex_no_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_3 == null_ptr);
+ ASIO_CHECK(ex_no_props_11 == ex_no_props_5);
+
+ ex_no_props_t ex_no_props_12(std::nothrow, std::move(ex_no_props_7));
+
+ ASIO_CHECK(ex_no_props_12.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_12 != null_ptr);
+ ASIO_CHECK(ex_no_props_7.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_7 == null_ptr);
+ ASIO_CHECK(ex_no_props_12 == ex_no_props_6);
+ ASIO_CHECK(ex_no_props_12 != ex_no_props_8);
+
+ ex_no_props_t ex_no_props_13(std::nothrow, ex_two_props_1);
+
+ ASIO_CHECK(ex_no_props_13.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_13 == null_ptr);
+
+ ex_no_props_t ex_no_props_14(std::nothrow, ex_two_props_5);
+
+ ASIO_CHECK(ex_no_props_14.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_14 != null_ptr);
+
+ ex_no_props_t ex_no_props_15(std::nothrow, ex_two_props_9);
+
+ ASIO_CHECK(ex_no_props_15.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_15 != null_ptr);
+
+ ex_no_props_t ex_no_props_16(std::nothrow, ex_one_prop_1);
+
+ ASIO_CHECK(ex_no_props_16.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_16 == null_ptr);
+
+ ex_no_props_t ex_no_props_17(std::nothrow, ex_one_prop_5);
+
+ ASIO_CHECK(ex_no_props_17.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_17 != null_ptr);
+
+ ex_no_props_t ex_no_props_18(std::nothrow, ex_one_prop_9);
+
+ ASIO_CHECK(ex_no_props_18.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_18 != null_ptr);
+
+ next_nothrow_new_fails = true;
+ ex_no_props_t ex_no_props_19(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex_no_props_19.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_19 == null_ptr);
+ ASIO_CHECK(ex_no_props_19 == ex_no_props_1);
+}
+
+void any_executor_assignment_test()
+{
+ typedef execution::any_executor<> ex_no_props_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t
+ > ex_one_prop_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::occupancy_t
+ > ex_two_props_t;
+
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ ex_two_props_t ex_two_props_1;
+
+ ex_two_props_t ex_two_props_2;
+ ex_two_props_2 = null_ptr;
+
+ ASIO_CHECK(ex_two_props_2.target<void>() == 0);
+
+ ex_two_props_t ex_two_props_3;
+ ex_two_props_3 = pool.executor();
+
+ ASIO_CHECK(ex_two_props_3.target<void>() != 0);
+
+ ex_two_props_t ex_two_props_4;
+ ex_two_props_4 = ex_two_props_1;
+
+ ASIO_CHECK(ex_two_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_1);
+
+ ex_two_props_4 = ex_two_props_3;
+
+ ASIO_CHECK(ex_two_props_4.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_3);
+
+ ex_two_props_t ex_two_props_5;
+ ex_two_props_5 = fat_executor(1);
+
+ ASIO_CHECK(ex_two_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_5 != null_ptr);
+ ASIO_CHECK(ex_two_props_5 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_6;
+ ex_two_props_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_two_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_6 != null_ptr);
+ ASIO_CHECK(ex_two_props_6 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_6 == ex_two_props_5);
+
+ ex_two_props_6 = fat_executor(2);
+
+ ASIO_CHECK(ex_two_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_6 != null_ptr);
+ ASIO_CHECK(ex_two_props_6 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_6 != ex_two_props_5);
+
+ ex_two_props_t ex_two_props_7;
+ ex_two_props_7 = ex_two_props_5;
+
+ ASIO_CHECK(ex_two_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_7 != null_ptr);
+ ASIO_CHECK(ex_two_props_7 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_7 == ex_two_props_5);
+ ASIO_CHECK(ex_two_props_7 != ex_two_props_6);
+
+ ex_two_props_t ex_two_props_8;
+ ex_two_props_8 = std::move(ex_two_props_1);
+
+ ASIO_CHECK(ex_two_props_8.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+
+ ex_two_props_8 = std::move(ex_two_props_3);
+
+ ASIO_CHECK(ex_two_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_8 == ex_two_props_4);
+
+ ex_two_props_8 = std::move(ex_two_props_5);
+
+ ASIO_CHECK(ex_two_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_5.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_8 == ex_two_props_7);
+
+ ex_one_prop_t ex_one_prop_1;
+
+ ex_one_prop_t ex_one_prop_2;
+ ex_one_prop_2 = null_ptr;
+
+ ASIO_CHECK(ex_one_prop_2.target<void>() == 0);
+
+ ex_one_prop_t ex_one_prop_3;
+ ex_one_prop_3 = pool.executor();
+
+ ASIO_CHECK(ex_one_prop_3.target<void>() != 0);
+
+ ex_one_prop_t ex_one_prop_4;
+ ex_one_prop_4 = ex_one_prop_1;
+
+ ASIO_CHECK(ex_one_prop_4.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_1);
+
+ ex_one_prop_4 = ex_one_prop_3;
+
+ ASIO_CHECK(ex_one_prop_4.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_3);
+
+ ex_one_prop_t ex_one_prop_5;
+ ex_one_prop_5 = fat_executor(1);
+
+ ASIO_CHECK(ex_one_prop_5.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_5 != null_ptr);
+ ASIO_CHECK(ex_one_prop_5 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_6;
+ ex_one_prop_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_one_prop_6.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_6 != null_ptr);
+ ASIO_CHECK(ex_one_prop_6 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_6 == ex_one_prop_5);
+
+ ex_one_prop_6 = fat_executor(2);
+
+ ASIO_CHECK(ex_one_prop_6.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_6 != null_ptr);
+ ASIO_CHECK(ex_one_prop_6 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_6 != ex_one_prop_5);
+
+ ex_one_prop_t ex_one_prop_7;
+ ex_one_prop_7 = ex_one_prop_5;
+
+ ASIO_CHECK(ex_one_prop_7.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_7 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_7 == ex_one_prop_5);
+ ASIO_CHECK(ex_one_prop_7 != ex_one_prop_6);
+
+ ex_one_prop_t ex_one_prop_8;
+ ex_one_prop_8 = std::move(ex_one_prop_1);
+
+ ASIO_CHECK(ex_one_prop_8.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+
+ ex_one_prop_8 = std::move(ex_one_prop_3);
+
+ ASIO_CHECK(ex_one_prop_8.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_3.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_8 == ex_one_prop_4);
+
+ ex_one_prop_8 = std::move(ex_one_prop_5);
+
+ ASIO_CHECK(ex_one_prop_8.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_5.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_8 == ex_one_prop_7);
+
+ ex_one_prop_t ex_one_prop_9;
+ ex_one_prop_9 = ex_two_props_1;
+
+ ASIO_CHECK(ex_one_prop_9.target<void>() == 0);
+
+ ex_one_prop_9 = ex_two_props_4;
+
+ ASIO_CHECK(ex_one_prop_9.target<void>() != 0);
+
+ ex_one_prop_9 = ex_two_props_7;
+
+ ASIO_CHECK(ex_one_prop_9.target<void>() != 0);
+
+ ex_no_props_t ex_no_props_1;
+
+ ex_no_props_t ex_no_props_2;
+ ex_no_props_2 = null_ptr;
+
+ ASIO_CHECK(ex_no_props_2.target<void>() == 0);
+
+ ex_no_props_t ex_no_props_3;
+ ex_no_props_3 = pool.executor();
+
+ ASIO_CHECK(ex_no_props_3.target<void>() != 0);
+
+ ex_no_props_t ex_no_props_4;
+ ex_no_props_4 = ex_no_props_1;
+
+ ASIO_CHECK(ex_no_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_1);
+
+ ex_no_props_4 = ex_no_props_3;
+
+ ASIO_CHECK(ex_no_props_4.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_3);
+
+ ex_no_props_t ex_no_props_5;
+ ex_no_props_5 = fat_executor(1);
+
+ ASIO_CHECK(ex_no_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_5 != null_ptr);
+ ASIO_CHECK(ex_no_props_5 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_6;
+ ex_no_props_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_no_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_6 != null_ptr);
+ ASIO_CHECK(ex_no_props_6 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_6 == ex_no_props_5);
+
+ ex_no_props_6 = fat_executor(2);
+
+ ASIO_CHECK(ex_no_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_6 != null_ptr);
+ ASIO_CHECK(ex_no_props_6 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_6 != ex_no_props_5);
+
+ ex_no_props_t ex_no_props_7;
+ ex_no_props_7 = ex_no_props_5;
+
+ ASIO_CHECK(ex_no_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_7 != null_ptr);
+ ASIO_CHECK(ex_no_props_7 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_7 == ex_no_props_5);
+ ASIO_CHECK(ex_no_props_7 != ex_no_props_6);
+
+ ex_no_props_t ex_no_props_8;
+ ex_no_props_8 = std::move(ex_no_props_1);
+
+ ASIO_CHECK(ex_no_props_8.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+
+ ex_no_props_8 = std::move(ex_no_props_3);
+
+ ASIO_CHECK(ex_no_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_8 == ex_no_props_4);
+
+ ex_no_props_8 = std::move(ex_no_props_5);
+
+ ASIO_CHECK(ex_no_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_5.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_8 == ex_no_props_7);
+
+ ex_no_props_t ex_no_props_9;
+ ex_no_props_9 = ex_two_props_1;
+
+ ASIO_CHECK(ex_no_props_9.target<void>() == 0);
+
+ ex_no_props_9 = ex_two_props_4;
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+
+ ex_no_props_9 = ex_two_props_7;
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+
+ ex_no_props_9 = ex_one_prop_1;
+
+ ASIO_CHECK(ex_no_props_9.target<void>() == 0);
+
+ ex_no_props_9 = ex_one_prop_4;
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+
+ ex_no_props_9 = ex_one_prop_7;
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+}
+
+void any_executor_swap_test()
+{
+ typedef execution::any_executor<> ex_no_props_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t
+ > ex_one_prop_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::occupancy_t
+ > ex_two_props_t;
+
+ thread_pool pool1(1);
+ thread_pool pool2(1);
+
+ ex_no_props_t ex_no_props_1(pool1.executor());
+ ex_no_props_t ex_no_props_2(pool2.executor());
+
+ ex_no_props_t ex_no_props_3(ex_no_props_1);
+ ex_no_props_t ex_no_props_4(ex_no_props_2);
+
+ ASIO_CHECK(ex_no_props_3 == ex_no_props_1);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_2);
+
+ ex_no_props_3.swap(ex_no_props_4);
+
+ ASIO_CHECK(ex_no_props_3 == ex_no_props_2);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_1);
+
+ execution::swap(ex_no_props_3, ex_no_props_4);
+
+ ASIO_CHECK(ex_no_props_3 == ex_no_props_1);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_2);
+
+ ex_one_prop_t ex_one_prop_1(pool1.executor());
+ ex_one_prop_t ex_one_prop_2(pool2.executor());
+
+ ex_one_prop_t ex_one_prop_3(ex_one_prop_1);
+ ex_one_prop_t ex_one_prop_4(ex_one_prop_2);
+
+ ASIO_CHECK(ex_one_prop_3 == ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_2);
+
+ ex_one_prop_3.swap(ex_one_prop_4);
+
+ ASIO_CHECK(ex_one_prop_3 == ex_one_prop_2);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_1);
+
+ execution::swap(ex_one_prop_3, ex_one_prop_4);
+
+ ASIO_CHECK(ex_one_prop_3 == ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_2);
+
+ ex_two_props_t ex_two_props_1(pool1.executor());
+ ex_two_props_t ex_two_props_2(pool2.executor());
+
+ ex_two_props_t ex_two_props_3(ex_two_props_1);
+ ex_two_props_t ex_two_props_4(ex_two_props_2);
+
+ ASIO_CHECK(ex_two_props_3 == ex_two_props_1);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_2);
+
+ ex_two_props_3.swap(ex_two_props_4);
+
+ ASIO_CHECK(ex_two_props_3 == ex_two_props_2);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_1);
+
+ execution::swap(ex_two_props_3, ex_two_props_4);
+
+ ASIO_CHECK(ex_two_props_3 == ex_two_props_1);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_2);
+}
+
+void any_executor_query_test()
+{
+ thread_pool pool(1);
+ execution::any_executor<
+ execution::blocking_t,
+ execution::outstanding_work_t,
+ execution::relationship_t,
+ execution::mapping_t::thread_t,
+ execution::occupancy_t>
+ ex(pool.executor());
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::mapping)
+ == asio::execution::mapping.thread);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::occupancy)
+ == 1);
+}
+
+void any_executor_execute_test()
+{
+ int count = 0;
+ thread_pool pool(1);
+ execution::any_executor<
+ execution::blocking_t::possibly_t,
+ execution::blocking_t::never_t,
+ execution::outstanding_work_t::untracked_t,
+ execution::outstanding_work_t::tracked_t,
+ execution::relationship_t::continuation_t>
+ ex(pool.executor());
+
+ ex.execute(bindns::bind(increment, &count));
+
+ asio::require(ex, asio::execution::blocking.possibly).execute(
+ bindns::bind(increment, &count));
+
+ asio::require(ex, asio::execution::blocking.never).execute(
+ bindns::bind(increment, &count));
+
+ asio::require(ex,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(ex,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(ex,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ pool.wait();
+
+ ASIO_CHECK(count == 6);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_executor",
+ ASIO_TEST_CASE(any_executor_construction_test)
+ ASIO_TEST_CASE(any_executor_nothrow_construction_test)
+ ASIO_TEST_CASE(any_executor_assignment_test)
+ ASIO_TEST_CASE(any_executor_swap_test)
+ ASIO_TEST_CASE(any_executor_query_test)
+ ASIO_TEST_CASE(any_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/blocking.cpp b/3rdparty/asio/src/tests/unit/execution/blocking.cpp
new file mode 100644
index 00000000000..ce2ba2f8ea5
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/blocking.cpp
@@ -0,0 +1,1921 @@
+//
+// blocking.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/blocking.hpp"
+
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "../unit_test.hpp"
+
+namespace exec = asio::execution;
+
+typedef exec::blocking_t s;
+typedef exec::blocking_t::possibly_t n1;
+typedef exec::blocking_t::always_t n2;
+typedef exec::blocking_t::never_t n3;
+
+struct ex_nq_nr
+{
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <>
+struct is_executor<ex_nq_nr> : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_cq_nr
+{
+ static constexpr ResultType query(ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_cq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_static_constexpr_member<
+ ex_cq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef Result result_type; // Must return raw result type.
+
+ static constexpr result_type value()
+ {
+ return Result();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_mq_nr
+{
+ ResultType query(ParamType) const noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_mq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_member<
+ ex_mq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_fq_nr
+{
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_fq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_free<
+ ex_fq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_mq_mr
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ CurrentType query(OtherType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, OtherType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, OtherType>();
+ }
+
+ ex_mq_mr<OtherType, CurrentType> require(
+ OtherType) const noexcept
+ {
+ return ex_mq_mr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_mq_mr<CurrentType, CurrentType>
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, CurrentType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_mq_mr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_fq_fr
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> require(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> prefer(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_fq_fr<CurrentType, CurrentType>
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_fq_fr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_query()
+{
+ constexpr bool b1 =
+ asio::can_query<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_query<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_query<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_query<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_query()
+{
+ exec::blocking_t result1 = asio::query(Executor(), Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+
+ Executor ex1 = {};
+ exec::blocking_t result2 = asio::query(ex1, Param());
+ ASIO_CHECK(result2 == ExpectedResult());
+
+ const Executor ex2 = {};
+ exec::blocking_t result3 = asio::query(ex2, Param());
+ ASIO_CHECK(result3 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_constexpr_query()
+{
+ constexpr Executor ex1 = {};
+ constexpr exec::blocking_t result1 = asio::query(ex1, Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_require()
+{
+ constexpr bool b1 =
+ asio::can_require<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_require<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_require<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_require<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_require()
+{
+ ASIO_CHECK(
+ asio::query(
+ asio::require(Executor(), Param()),
+ Param()) == ExpectedResult());
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex1, Param()),
+ Param()) == ExpectedResult());
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex2, Param()),
+ Param()) == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_prefer()
+{
+ constexpr bool b1 =
+ asio::can_prefer<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_prefer<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_prefer<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_prefer<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_prefer()
+{
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(Executor(), Param()),
+ s())) == s(ExpectedResult()));
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex1, Param()),
+ s())) == s(ExpectedResult()));
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex2, Param()),
+ s())) == s(ExpectedResult()));
+}
+
+void test_vars()
+{
+ ASIO_CHECK(s() == exec::blocking);
+ ASIO_CHECK(s() != exec::blocking.possibly);
+ ASIO_CHECK(s() != exec::blocking.always);
+ ASIO_CHECK(s() != exec::blocking.never);
+ ASIO_CHECK(n1() == exec::blocking.possibly);
+ ASIO_CHECK(n1() != exec::blocking.always);
+ ASIO_CHECK(n1() != exec::blocking.never);
+ ASIO_CHECK(n2() == exec::blocking.always);
+ ASIO_CHECK(n2() != exec::blocking.possibly);
+ ASIO_CHECK(n2() != exec::blocking.never);
+ ASIO_CHECK(n3() == exec::blocking.never);
+ ASIO_CHECK(n3() != exec::blocking.possibly);
+ ASIO_CHECK(n3() != exec::blocking.always);
+}
+
+ASIO_TEST_SUITE
+(
+ "blocking",
+
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, s, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n2, false>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n3, false>)
+
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n2, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n3, false>)
+
+ ASIO_TEST_CASE3(test_require<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n2, false>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n3, true>)
+
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n1, n1>)
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n3, n1>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n3, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n3, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n3>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n3>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n1>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n2>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n3>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n3>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n3>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n1>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n2>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n3>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE(test_vars)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp b/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp
new file mode 100644
index 00000000000..b6e77dd31a9
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp
@@ -0,0 +1,1323 @@
+//
+// blocking_adaptation.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/blocking_adaptation.hpp"
+
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "../unit_test.hpp"
+
+namespace exec = asio::execution;
+
+typedef exec::blocking_adaptation_t s;
+typedef exec::blocking_adaptation_t::disallowed_t n1;
+typedef exec::blocking_adaptation_t::allowed_t n2;
+
+struct ex_nq_nr
+{
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<ex_nq_nr>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename Function>
+struct execute_member<ex_nq_nr, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_cq_nr
+{
+ static constexpr ResultType query(ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct equality_comparable<ex_cq_nr<ResultType, ParamType, Result> >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Function>
+struct execute_member<ex_cq_nr<ResultType, ParamType, Result>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_static_constexpr_member<
+ ex_cq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef Result result_type; // Must return raw result type.
+
+ static constexpr result_type value()
+ {
+ return Result();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_mq_nr
+{
+ ResultType query(ParamType) const noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct equality_comparable<ex_mq_nr<ResultType, ParamType, Result> >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Function>
+struct execute_member<ex_mq_nr<ResultType, ParamType, Result>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_member<
+ ex_mq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_fq_nr
+{
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct equality_comparable<ex_fq_nr<ResultType, ParamType, Result> >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Function>
+struct execute_member<ex_fq_nr<ResultType, ParamType, Result>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_free<
+ ex_fq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_mq_mr
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ CurrentType query(OtherType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, OtherType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, OtherType>();
+ }
+
+ ex_mq_mr<OtherType, CurrentType> require(
+ OtherType) const noexcept
+ {
+ return ex_mq_mr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_mq_mr<CurrentType, CurrentType>
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, CurrentType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename CurrentType, typename OtherType>
+struct equality_comparable<ex_mq_mr<CurrentType, OtherType> >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Function>
+struct execute_member<ex_mq_mr<CurrentType, OtherType>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_fq_fr
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> require(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> prefer(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_fq_fr<CurrentType, CurrentType>
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <typename CurrentType, typename OtherType>
+struct equality_comparable<ex_fq_fr<CurrentType, OtherType> >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Function>
+struct execute_member<ex_fq_fr<CurrentType, OtherType>, Function>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_query()
+{
+ constexpr bool b1 =
+ asio::can_query<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_query<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_query<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_query<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_query()
+{
+ exec::blocking_adaptation_t result1 = asio::query(Executor(), Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+
+ Executor ex1 = {};
+ exec::blocking_adaptation_t result2 = asio::query(ex1, Param());
+ ASIO_CHECK(result2 == ExpectedResult());
+
+ const Executor ex2 = {};
+ exec::blocking_adaptation_t result3 = asio::query(ex2, Param());
+ ASIO_CHECK(result3 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_constexpr_query()
+{
+ constexpr Executor ex1 = {};
+ constexpr exec::blocking_adaptation_t result1 = asio::query(ex1, Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_require()
+{
+ constexpr bool b1 =
+ asio::can_require<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_require<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_require<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_require<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+void do_nothing()
+{
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_require()
+{
+ ASIO_CHECK(
+ asio::query(
+ asio::require(Executor(), Param()),
+ Param()) == ExpectedResult());
+
+ Executor ex1 = {};
+
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex1, Param()),
+ Param()) == ExpectedResult());
+
+ ASIO_CHECK((
+ asio::execution::is_executor<
+ typename asio::decay<
+ typename asio::require_result<Executor&, Param>::type
+ >::type
+ >::value));
+
+ const Executor ex2 = {};
+
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex2, Param()),
+ Param()) == ExpectedResult());
+
+ ASIO_CHECK((
+ asio::execution::is_executor<
+ typename asio::decay<
+ typename asio::require_result<const Executor&, Param>::type
+ >::type
+ >::value));
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_prefer()
+{
+ constexpr bool b1 =
+ asio::can_prefer<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_prefer<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_prefer<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_prefer<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_prefer()
+{
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(Executor(), Param()),
+ s())) == s(ExpectedResult()));
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex1, Param()),
+ s())) == s(ExpectedResult()));
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex2, Param()),
+ s())) == s(ExpectedResult()));
+}
+
+void test_vars()
+{
+ ASIO_CHECK(s() == exec::blocking_adaptation);
+ ASIO_CHECK(s() != exec::blocking_adaptation.disallowed);
+ ASIO_CHECK(s() != exec::blocking_adaptation.allowed);
+ ASIO_CHECK(n1() == exec::blocking_adaptation.disallowed);
+ ASIO_CHECK(n1() != exec::blocking_adaptation.allowed);
+ ASIO_CHECK(n2() == exec::blocking_adaptation.allowed);
+ ASIO_CHECK(n2() != exec::blocking_adaptation.disallowed);
+}
+
+ASIO_TEST_SUITE
+(
+ "blocking_adaptation",
+
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, s, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n2, false>)
+
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n2, true>)
+
+ ASIO_TEST_CASE3(test_require<ex_nq_nr, n1, n1>)
+ ASIO_TEST_CASE3(test_require<ex_nq_nr, n2, n2>)
+
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n2, false>)
+
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n1, n2>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<s, s, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<s, n1, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<s, n2, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<n1, s, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_mq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n1, n2>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<s, s, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<s, n1, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<s, n2, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<n1, s, n1>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_fq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n1, n2>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n2, false>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n1, n2>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n2, false>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n1, n2>)
+
+ ASIO_TEST_CASE(test_vars)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/context_as.cpp b/3rdparty/asio/src/tests/unit/execution/context_as.cpp
new file mode 100644
index 00000000000..13311ba262b
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/context_as.cpp
@@ -0,0 +1,147 @@
+//
+// context_as.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/context_as.hpp"
+
+#include <functional>
+#include "asio/execution/any_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/static_thread_pool.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+void context_as_executor_query_test()
+{
+ static_thread_pool pool(1);
+
+ ASIO_CHECK(
+ &asio::query(pool.executor(),
+ execution::context_as_t<static_thread_pool&>())
+ == &pool);
+
+ execution::any_executor<
+ execution::context_as_t<static_thread_pool&>
+ > ex1 = pool.executor();
+
+ ASIO_CHECK(
+ &asio::query(ex1,
+ execution::context_as_t<static_thread_pool&>())
+ == &pool);
+
+ ASIO_CHECK(
+ &asio::query(ex1, execution::context)
+ == &pool);
+
+ ASIO_CHECK(
+ &asio::query(pool.executor(),
+ execution::context_as_t<const static_thread_pool&>())
+ == &pool);
+
+ execution::any_executor<
+ execution::context_as_t<const static_thread_pool&>
+ > ex2 = pool.executor();
+
+ ASIO_CHECK(
+ &asio::query(ex2,
+ execution::context_as_t<const static_thread_pool&>())
+ == &pool);
+
+ ASIO_CHECK(
+ &asio::query(ex2, execution::context)
+ == &pool);
+
+ io_context io_ctx;
+
+ ASIO_CHECK(
+ &asio::query(io_ctx.get_executor(),
+ execution::context_as_t<io_context&>())
+ == &io_ctx);
+
+ execution::any_executor<
+ execution::context_as_t<io_context&>
+ > ex3 = io_ctx.get_executor();
+
+ ASIO_CHECK(
+ &asio::query(ex3,
+ execution::context_as_t<io_context&>())
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(ex3, execution::context)
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(io_ctx.get_executor(),
+ execution::context_as_t<const io_context&>())
+ == &io_ctx);
+
+ execution::any_executor<
+ execution::context_as_t<const io_context&>
+ > ex4 = io_ctx.get_executor();
+
+ ASIO_CHECK(
+ &asio::query(ex4,
+ execution::context_as_t<const io_context&>())
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(ex4, execution::context)
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(io_ctx.get_executor(),
+ execution::context_as_t<execution_context&>())
+ == &io_ctx);
+
+ execution::any_executor<
+ execution::context_as_t<execution_context&>
+ > ex5 = io_ctx.get_executor();
+
+ ASIO_CHECK(
+ &asio::query(ex5,
+ execution::context_as_t<execution_context&>())
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(ex5, execution::context)
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(io_ctx.get_executor(),
+ execution::context_as_t<const execution_context&>())
+ == &io_ctx);
+
+ execution::any_executor<
+ execution::context_as_t<const execution_context&>
+ > ex6 = io_ctx.get_executor();
+
+ ASIO_CHECK(
+ &asio::query(ex6,
+ execution::context_as_t<const execution_context&>())
+ == &io_ctx);
+
+ ASIO_CHECK(
+ &asio::query(ex6, execution::context)
+ == &io_ctx);
+}
+
+ASIO_TEST_SUITE
+(
+ "context_as",
+ ASIO_TEST_CASE(context_as_executor_query_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/executor.cpp b/3rdparty/asio/src/tests/unit/execution/executor.cpp
new file mode 100644
index 00000000000..8b02622bdca
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/executor.cpp
@@ -0,0 +1,106 @@
+//
+// executor.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/executor.hpp"
+
+#include "../unit_test.hpp"
+
+struct not_an_executor
+{
+};
+
+struct executor
+{
+ executor()
+ {
+ }
+
+ executor(const executor&) noexcept
+ {
+ }
+
+ executor(executor&&) noexcept
+ {
+ }
+
+ template <typename F>
+ void execute(F&& f) const noexcept
+ {
+ (void)f;
+ }
+
+ bool operator==(const executor&) const noexcept
+ {
+ return true;
+ }
+
+ bool operator!=(const executor&) const noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void is_executor_test()
+{
+ ASIO_CHECK((
+ !asio::execution::is_executor<
+ void
+ >::value));
+
+ ASIO_CHECK((
+ !asio::execution::is_executor<
+ not_an_executor
+ >::value));
+
+ ASIO_CHECK((
+ asio::execution::is_executor<
+ executor
+ >::value));
+}
+
+ASIO_TEST_SUITE
+(
+ "executor",
+ ASIO_TEST_CASE(is_executor_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_handle.cpp b/3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp
index 572699e2cfa..5dbfb94d9f4 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp
@@ -1,8 +1,8 @@
//
-// basic_handle.cpp
-// ~~~~~~~~~~~~~~~~
+// invocable_archetype.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,13 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/windows/basic_handle.hpp"
+#include "asio/execution/invocable_archetype.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_handle",
+ "invocable_archetype",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/execution/mapping.cpp b/3rdparty/asio/src/tests/unit/execution/mapping.cpp
new file mode 100644
index 00000000000..399aae3ea90
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/mapping.cpp
@@ -0,0 +1,1985 @@
+//
+// mapping.cpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/mapping.hpp"
+
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "../unit_test.hpp"
+
+namespace exec = asio::execution;
+
+typedef exec::mapping_t s;
+typedef exec::mapping_t::thread_t n1;
+typedef exec::mapping_t::new_thread_t n2;
+typedef exec::mapping_t::other_t n3;
+
+struct ex_nq_nr
+{
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <>
+struct is_executor<ex_nq_nr> : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_cq_nr
+{
+ static constexpr ResultType query(ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_cq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_static_constexpr_member<
+ ex_cq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef Result result_type; // Must return raw result type.
+
+ static constexpr result_type value()
+ {
+ return Result();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_mq_nr
+{
+ ResultType query(ParamType) const noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_mq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_member<
+ ex_mq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_fq_nr
+{
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_fq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_free<
+ ex_fq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_mq_mr
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ CurrentType query(OtherType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, OtherType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, OtherType>();
+ }
+
+ ex_mq_mr<OtherType, CurrentType> require(
+ OtherType) const noexcept
+ {
+ return ex_mq_mr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_mq_mr<CurrentType, CurrentType>
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, CurrentType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_mq_mr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_fq_fr
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> require(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> prefer(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_fq_fr<CurrentType, CurrentType>
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_fq_fr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_query()
+{
+ constexpr bool b1 =
+ asio::can_query<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_query<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_query<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_query<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_query()
+{
+ exec::mapping_t result1 = asio::query(Executor(), Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+
+ Executor ex1 = {};
+ exec::mapping_t result2 = asio::query(ex1, Param());
+ ASIO_CHECK(result2 == ExpectedResult());
+
+ const Executor ex2 = {};
+ exec::mapping_t result3 = asio::query(ex2, Param());
+ ASIO_CHECK(result3 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_constexpr_query()
+{
+ constexpr Executor ex1 = {};
+ constexpr exec::mapping_t result1 = asio::query(ex1, Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_require()
+{
+ constexpr bool b1 =
+ asio::can_require<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_require<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_require<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_require<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_require()
+{
+ ASIO_CHECK(
+ asio::query(
+ asio::require(Executor(), Param()),
+ Param()) == ExpectedResult());
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex1, Param()),
+ Param()) == ExpectedResult());
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex2, Param()),
+ Param()) == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_prefer()
+{
+ constexpr bool b1 =
+ asio::can_prefer<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_prefer<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_prefer<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_prefer<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_prefer()
+{
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(Executor(), Param()),
+ s())) == s(ExpectedResult()));
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex1, Param()),
+ s())) == s(ExpectedResult()));
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex2, Param()),
+ s())) == s(ExpectedResult()));
+}
+
+void test_vars()
+{
+ ASIO_CHECK(s() == exec::mapping);
+ ASIO_CHECK(s() != exec::mapping.thread);
+ ASIO_CHECK(s() != exec::mapping.new_thread);
+ ASIO_CHECK(s() != exec::mapping.other);
+ ASIO_CHECK(n1() == exec::mapping.thread);
+ ASIO_CHECK(n1() != exec::mapping.new_thread);
+ ASIO_CHECK(n1() != exec::mapping.other);
+ ASIO_CHECK(n2() == exec::mapping.new_thread);
+ ASIO_CHECK(n2() != exec::mapping.thread);
+ ASIO_CHECK(n2() != exec::mapping.other);
+ ASIO_CHECK(n3() == exec::mapping.other);
+ ASIO_CHECK(n3() != exec::mapping.thread);
+ ASIO_CHECK(n3() != exec::mapping.new_thread);
+}
+
+ASIO_TEST_SUITE
+(
+ "mapping",
+
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, s, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n2, false>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n3, false>)
+
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n2, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n3, false>)
+
+ ASIO_TEST_CASE3(test_require<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n2, true>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n3, true>)
+
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n1, n1>)
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n2, n1>)
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n3, n1>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n3, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, s, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n3, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n3, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n3, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n3, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n3, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n3, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n3, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n1, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n2, n3>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n3>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n3>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n1>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n2>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n3>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n2, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n2, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n3>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n3>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n1>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n2>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n3>, s, n3>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n3, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n3, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n3, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n3, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n3, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n2, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n3, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n1, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n2, n3>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n3, n3>)
+
+ ASIO_TEST_CASE(test_vars)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp b/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp
new file mode 100644
index 00000000000..cddd0b52c23
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp
@@ -0,0 +1,1252 @@
+//
+// outstanding_work.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/outstanding_work.hpp"
+
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "../unit_test.hpp"
+
+namespace exec = asio::execution;
+
+typedef exec::outstanding_work_t s;
+typedef exec::outstanding_work_t::untracked_t n1;
+typedef exec::outstanding_work_t::tracked_t n2;
+
+struct ex_nq_nr
+{
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <>
+struct is_executor<ex_nq_nr> : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_cq_nr
+{
+ static constexpr ResultType query(ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_cq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_static_constexpr_member<
+ ex_cq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef Result result_type; // Must return raw result type.
+
+ static constexpr result_type value()
+ {
+ return Result();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_mq_nr
+{
+ ResultType query(ParamType) const noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_mq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_member<
+ ex_mq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_fq_nr
+{
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_fq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_free<
+ ex_fq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_mq_mr
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ CurrentType query(OtherType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, OtherType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, OtherType>();
+ }
+
+ ex_mq_mr<OtherType, CurrentType> require(
+ OtherType) const noexcept
+ {
+ return ex_mq_mr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_mq_mr<CurrentType, CurrentType>
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, CurrentType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_mq_mr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_fq_fr
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> require(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> prefer(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_fq_fr<CurrentType, CurrentType>
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_fq_fr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_query()
+{
+ constexpr bool b1 =
+ asio::can_query<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_query<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_query<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_query<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_query()
+{
+ exec::outstanding_work_t result1 = asio::query(Executor(), Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+
+ Executor ex1 = {};
+ exec::outstanding_work_t result2 = asio::query(ex1, Param());
+ ASIO_CHECK(result2 == ExpectedResult());
+
+ const Executor ex2 = {};
+ exec::outstanding_work_t result3 = asio::query(ex2, Param());
+ ASIO_CHECK(result3 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_constexpr_query()
+{
+ constexpr Executor ex1 = {};
+ constexpr exec::outstanding_work_t result1 = asio::query(ex1, Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_require()
+{
+ constexpr bool b1 =
+ asio::can_require<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_require<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_require<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_require<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_require()
+{
+ ASIO_CHECK(
+ asio::query(
+ asio::require(Executor(), Param()),
+ Param()) == ExpectedResult());
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex1, Param()),
+ Param()) == ExpectedResult());
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex2, Param()),
+ Param()) == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_prefer()
+{
+ constexpr bool b1 =
+ asio::can_prefer<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_prefer<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_prefer<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_prefer<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_prefer()
+{
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(Executor(), Param()),
+ s())) == s(ExpectedResult()));
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex1, Param()),
+ s())) == s(ExpectedResult()));
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex2, Param()),
+ s())) == s(ExpectedResult()));
+}
+
+void test_vars()
+{
+ ASIO_CHECK(s() == exec::outstanding_work);
+ ASIO_CHECK(s() != exec::outstanding_work.untracked);
+ ASIO_CHECK(s() != exec::outstanding_work.tracked);
+ ASIO_CHECK(n1() == exec::outstanding_work.untracked);
+ ASIO_CHECK(n1() != exec::outstanding_work.tracked);
+ ASIO_CHECK(n2() == exec::outstanding_work.tracked);
+ ASIO_CHECK(n2() != exec::outstanding_work.untracked);
+}
+
+ASIO_TEST_SUITE
+(
+ "outstanding_work",
+
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, s, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n2, false>)
+
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n2, false>)
+
+ ASIO_TEST_CASE3(test_require<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n2, true>)
+
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n1, n1>)
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n2, n1>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE(test_vars)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp b/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp
new file mode 100644
index 00000000000..60500002475
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp
@@ -0,0 +1,533 @@
+//
+// prefer_only.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/prefer_only.hpp"
+
+#include <functional>
+#include "asio/execution/any_executor.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+static int possibly_blocking_count = 0;
+static int never_blocking_count = 0;
+
+struct possibly_blocking_executor
+{
+ template <typename F>
+ void execute(const F&) const
+ {
+ ++possibly_blocking_count;
+ }
+
+ friend bool operator==(const possibly_blocking_executor&,
+ const possibly_blocking_executor&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const possibly_blocking_executor&,
+ const possibly_blocking_executor&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<possibly_blocking_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<possibly_blocking_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+struct never_blocking_executor
+{
+ static constexpr execution::blocking_t::never_t
+ query(execution::blocking_t) noexcept
+ {
+ return execution::blocking_t::never_t();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ ++never_blocking_count;
+ }
+
+ friend bool operator==(const never_blocking_executor&,
+ const never_blocking_executor&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const never_blocking_executor&,
+ const never_blocking_executor&) noexcept
+ {
+ return false;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<never_blocking_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<never_blocking_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Param>
+struct query_static_constexpr_member<
+ never_blocking_executor, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, execution::blocking_t>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::blocking_t::never_t result_type;
+
+ static constexpr result_type value()
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+struct either_blocking_executor
+{
+ execution::blocking_t blocking_;
+
+ explicit either_blocking_executor(execution::blocking_t b)
+ : blocking_(b)
+ {
+ }
+
+ execution::blocking_t query(execution::blocking_t) const noexcept
+ {
+ return blocking_;
+ }
+
+ either_blocking_executor require(execution::blocking_t::possibly_t) const
+ {
+ return either_blocking_executor(execution::blocking.possibly);
+ }
+
+ either_blocking_executor require(execution::blocking_t::never_t) const
+ {
+ return either_blocking_executor(execution::blocking.never);
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ if (blocking_ == execution::blocking.never)
+ ++never_blocking_count;
+ else
+ ++possibly_blocking_count;
+ }
+
+ friend bool operator==(const either_blocking_executor& a,
+ const either_blocking_executor& b) noexcept
+ {
+ return a.blocking_ == b.blocking_;
+ }
+
+ friend bool operator!=(const either_blocking_executor& a,
+ const either_blocking_executor& b) noexcept
+ {
+ return a.blocking_ != b.blocking_;
+ }
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<either_blocking_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<either_blocking_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Param>
+struct query_member<
+ either_blocking_executor, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, execution::blocking_t>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef execution::blocking_t result_type;
+};
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Param>
+struct require_member<
+ either_blocking_executor, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, execution::blocking_t>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+
+ typedef either_blocking_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void prefer_only_executor_query_test()
+{
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::prefer_only<execution::blocking_t::possibly_t>,
+ execution::prefer_only<execution::blocking_t::never_t>
+ > executor_type;
+
+ executor_type ex1 = possibly_blocking_executor();
+
+ ASIO_CHECK(
+ asio::query(ex1, execution::blocking)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex1, execution::blocking.possibly)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex1, execution::blocking.never)
+ == execution::blocking.possibly);
+
+ executor_type ex2 = asio::prefer(ex1, execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex2, execution::blocking)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex2, execution::blocking.possibly)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex2, execution::blocking.never)
+ == execution::blocking.possibly);
+
+ executor_type ex3 = asio::prefer(ex1, execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex3, execution::blocking)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex3, execution::blocking.possibly)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex3, execution::blocking.never)
+ == execution::blocking.possibly);
+
+ executor_type ex4 = never_blocking_executor();
+
+ ASIO_CHECK(
+ asio::query(ex4, execution::blocking)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex4, execution::blocking.possibly)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex4, execution::blocking.never)
+ == execution::blocking.never);
+
+ executor_type ex5 = asio::prefer(ex4, execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex5, execution::blocking)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex5, execution::blocking.possibly)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex5, execution::blocking.never)
+ == execution::blocking.never);
+
+ executor_type ex6 = asio::prefer(ex4, execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex6, execution::blocking)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex6, execution::blocking.possibly)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex6, execution::blocking.never)
+ == execution::blocking.never);
+
+ executor_type ex7 = either_blocking_executor(execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex7, execution::blocking)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex7, execution::blocking.possibly)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex7, execution::blocking.never)
+ == execution::blocking.possibly);
+
+ executor_type ex8 = asio::prefer(ex7, execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex8, execution::blocking)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex8, execution::blocking.possibly)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex8, execution::blocking.never)
+ == execution::blocking.possibly);
+
+ executor_type ex9 = asio::prefer(ex7, execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex9, execution::blocking)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex9, execution::blocking.possibly)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex9, execution::blocking.never)
+ == execution::blocking.never);
+
+ executor_type ex10 = either_blocking_executor(execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex10, execution::blocking)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex10, execution::blocking.possibly)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex10, execution::blocking.never)
+ == execution::blocking.never);
+
+ executor_type ex11 = asio::prefer(ex7, execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex11, execution::blocking)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex11, execution::blocking.possibly)
+ == execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex11, execution::blocking.never)
+ == execution::blocking.possibly);
+
+ executor_type ex12 = asio::prefer(ex7, execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex12, execution::blocking)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex12, execution::blocking.possibly)
+ == execution::blocking.never);
+
+ ASIO_CHECK(
+ asio::query(ex12, execution::blocking.never)
+ == execution::blocking.never);
+}
+
+void do_nothing()
+{
+}
+
+void prefer_only_executor_execute_test()
+{
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::prefer_only<execution::blocking_t::possibly_t>,
+ execution::prefer_only<execution::blocking_t::never_t>
+ > executor_type;
+
+ executor_type ex1 = possibly_blocking_executor();
+
+ ex1.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 1);
+ ASIO_CHECK(never_blocking_count == 0);
+
+ executor_type ex2 = asio::prefer(ex1, execution::blocking.possibly);
+
+ ex2.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 2);
+ ASIO_CHECK(never_blocking_count == 0);
+
+ executor_type ex3 = asio::prefer(ex1, execution::blocking.never);
+
+ ex3.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 3);
+ ASIO_CHECK(never_blocking_count == 0);
+
+ executor_type ex4 = never_blocking_executor();
+
+ ex4.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 3);
+ ASIO_CHECK(never_blocking_count == 1);
+
+ executor_type ex5 = asio::prefer(ex4, execution::blocking.possibly);
+
+ ex5.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 3);
+ ASIO_CHECK(never_blocking_count == 2);
+
+ executor_type ex6 = asio::prefer(ex4, execution::blocking.never);
+
+ ex6.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 3);
+ ASIO_CHECK(never_blocking_count == 3);
+
+ executor_type ex7 = either_blocking_executor(execution::blocking.possibly);
+
+ ex7.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 4);
+ ASIO_CHECK(never_blocking_count == 3);
+
+ executor_type ex8 = asio::prefer(ex7, execution::blocking.possibly);
+
+ ex8.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 5);
+ ASIO_CHECK(never_blocking_count == 3);
+
+ executor_type ex9 = asio::prefer(ex7, execution::blocking.never);
+
+ ex9.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 5);
+ ASIO_CHECK(never_blocking_count == 4);
+
+ executor_type ex10 = either_blocking_executor(execution::blocking.never);
+
+ ex10.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 5);
+ ASIO_CHECK(never_blocking_count == 5);
+
+ executor_type ex11 = asio::prefer(ex7, execution::blocking.possibly);
+
+ ex11.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 6);
+ ASIO_CHECK(never_blocking_count == 5);
+
+ executor_type ex12 = asio::prefer(ex7, execution::blocking.never);
+
+ ex12.execute(&do_nothing);
+ ASIO_CHECK(possibly_blocking_count == 6);
+ ASIO_CHECK(never_blocking_count == 6);
+}
+
+ASIO_TEST_SUITE
+(
+ "prefer_only",
+ ASIO_TEST_CASE(prefer_only_executor_query_test)
+ ASIO_TEST_CASE(prefer_only_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution/relationship.cpp b/3rdparty/asio/src/tests/unit/execution/relationship.cpp
new file mode 100644
index 00000000000..a91144e8125
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/execution/relationship.cpp
@@ -0,0 +1,1252 @@
+//
+// relationship.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/execution/relationship.hpp"
+
+#include "asio/prefer.hpp"
+#include "asio/query.hpp"
+#include "asio/require.hpp"
+#include "../unit_test.hpp"
+
+namespace exec = asio::execution;
+
+typedef exec::relationship_t s;
+typedef exec::relationship_t::fork_t n1;
+typedef exec::relationship_t::continuation_t n2;
+
+struct ex_nq_nr
+{
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <>
+struct is_executor<ex_nq_nr> : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_cq_nr
+{
+ static constexpr ResultType query(ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_cq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_static_constexpr_member<
+ ex_cq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef Result result_type; // Must return raw result type.
+
+ static constexpr result_type value()
+ {
+ return Result();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_mq_nr
+{
+ ResultType query(ParamType) const noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_mq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_member<
+ ex_mq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename ResultType, typename ParamType, typename Result>
+struct ex_fq_nr
+{
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
+ {
+ return Result();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename ResultType, typename ParamType, typename Result>
+struct is_executor<ex_fq_nr<ResultType, ParamType, Result> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename ResultType, typename ParamType,
+ typename Result, typename Param>
+struct query_free<
+ ex_fq_nr<ResultType, ParamType, Result>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, ParamType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ResultType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_mq_mr
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ CurrentType query(OtherType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, OtherType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, OtherType>();
+ }
+
+ ex_mq_mr<OtherType, CurrentType> require(
+ OtherType) const noexcept
+ {
+ return ex_mq_mr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_mq_mr<CurrentType, CurrentType>
+{
+ CurrentType query(CurrentType) const noexcept
+ {
+ return CurrentType();
+ }
+
+ ex_mq_mr<CurrentType, CurrentType> require(
+ CurrentType) const noexcept
+ {
+ return ex_mq_mr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_mq_mr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_member<
+ ex_mq_mr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_mq_mr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename CurrentType, typename OtherType>
+struct ex_fq_fr
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> require(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, OtherType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, OtherType>();
+ }
+
+ friend ex_fq_fr<OtherType, CurrentType> prefer(
+ const ex_fq_fr&, OtherType) noexcept
+ {
+ return ex_fq_fr<OtherType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+template <typename CurrentType>
+struct ex_fq_fr<CurrentType, CurrentType>
+{
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
+ {
+ return CurrentType();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> require(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ friend ex_fq_fr<CurrentType, CurrentType> prefer(
+ const ex_fq_fr&, CurrentType) noexcept
+ {
+ return ex_fq_fr<CurrentType, CurrentType>();
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return true;
+ }
+
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
+ {
+ return false;
+ }
+};
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace execution {
+
+template <typename CurrentType, typename OtherType>
+struct is_executor<ex_fq_fr<CurrentType, OtherType> >
+ : asio::true_type
+{
+};
+
+} // namespace execution
+} // namespace asio
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct query_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ || asio::is_convertible<Param, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef CurrentType result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct require_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, CurrentType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<CurrentType, OtherType> result_type;
+};
+
+template <typename CurrentType, typename OtherType, typename Param>
+struct prefer_free<
+ ex_fq_fr<CurrentType, OtherType>, Param,
+ typename asio::enable_if<
+ asio::is_convertible<Param, OtherType>::value
+ && !asio::is_same<CurrentType, OtherType>::value
+ >::type>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+
+ typedef ex_fq_fr<OtherType, CurrentType> result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_query()
+{
+ constexpr bool b1 =
+ asio::can_query<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_query<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_query<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_query<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_query()
+{
+ exec::relationship_t result1 = asio::query(Executor(), Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+
+ Executor ex1 = {};
+ exec::relationship_t result2 = asio::query(ex1, Param());
+ ASIO_CHECK(result2 == ExpectedResult());
+
+ const Executor ex2 = {};
+ exec::relationship_t result3 = asio::query(ex2, Param());
+ ASIO_CHECK(result3 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_constexpr_query()
+{
+ constexpr Executor ex1 = {};
+ constexpr exec::relationship_t result1 = asio::query(ex1, Param());
+ ASIO_CHECK(result1 == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_require()
+{
+ constexpr bool b1 =
+ asio::can_require<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_require<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_require<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_require<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_require()
+{
+ ASIO_CHECK(
+ asio::query(
+ asio::require(Executor(), Param()),
+ Param()) == ExpectedResult());
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex1, Param()),
+ Param()) == ExpectedResult());
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ asio::query(
+ asio::require(ex2, Param()),
+ Param()) == ExpectedResult());
+}
+
+template <typename Executor, typename Param, bool ExpectedResult>
+void test_can_prefer()
+{
+ constexpr bool b1 =
+ asio::can_prefer<Executor, Param>::value;
+ ASIO_CHECK(b1 == ExpectedResult);
+
+ constexpr bool b2 =
+ asio::can_prefer<const Executor, Param>::value;
+ ASIO_CHECK(b2 == ExpectedResult);
+
+ constexpr bool b3 =
+ asio::can_prefer<Executor&, Param>::value;
+ ASIO_CHECK(b3 == ExpectedResult);
+
+ constexpr bool b4 =
+ asio::can_prefer<const Executor&, Param>::value;
+ ASIO_CHECK(b4 == ExpectedResult);
+}
+
+template <typename Executor, typename Param, typename ExpectedResult>
+void test_prefer()
+{
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(Executor(), Param()),
+ s())) == s(ExpectedResult()));
+
+ Executor ex1 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex1, Param()),
+ s())) == s(ExpectedResult()));
+
+ const Executor ex2 = {};
+ ASIO_CHECK(
+ s(asio::query(
+ asio::prefer(ex2, Param()),
+ s())) == s(ExpectedResult()));
+}
+
+void test_vars()
+{
+ ASIO_CHECK(s() == exec::relationship);
+ ASIO_CHECK(s() != exec::relationship.fork);
+ ASIO_CHECK(s() != exec::relationship.continuation);
+ ASIO_CHECK(n1() == exec::relationship.fork);
+ ASIO_CHECK(n1() != exec::relationship.continuation);
+ ASIO_CHECK(n2() == exec::relationship.continuation);
+ ASIO_CHECK(n2() != exec::relationship.fork);
+}
+
+ASIO_TEST_SUITE
+(
+ "relationship",
+
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, s, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n2, false>)
+
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, s, n1>)
+ ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n2, false>)
+
+ ASIO_TEST_CASE3(test_require<ex_nq_nr, n1, n1>)
+
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, s, false>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n1, true>)
+ ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n2, true>)
+
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n1, n1>)
+ ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n2, n1>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_require<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, s, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, s, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, s, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n2, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n1, false>)
+ ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n2, false>)
+
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n2, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, s, false>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n1, true>)
+ ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n2, true>)
+
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n2, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n1, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n2, n1>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n1, n2>)
+ ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, s, true>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, s, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, s, n2>)
+ ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n2, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n1, false>)
+ ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n2, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, s, false>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n1, true>)
+ ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n2, true>)
+
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n2, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n1, n1>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n2, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n1, n2>)
+ ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n2, n2>)
+
+ ASIO_TEST_CASE(test_vars)
+)
diff --git a/3rdparty/asio/src/tests/unit/execution_context.cpp b/3rdparty/asio/src/tests/unit/execution_context.cpp
index 802c483be41..cf5a499e256 100644
--- a/3rdparty/asio/src/tests/unit/execution_context.cpp
+++ b/3rdparty/asio/src/tests/unit/execution_context.cpp
@@ -2,7 +2,7 @@
// execution_context.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/executor.cpp b/3rdparty/asio/src/tests/unit/executor.cpp
index 493e363c1b3..7ea75055aa4 100644
--- a/3rdparty/asio/src/tests/unit/executor.cpp
+++ b/3rdparty/asio/src/tests/unit/executor.cpp
@@ -2,7 +2,7 @@
// executor.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/executor_work_guard.cpp b/3rdparty/asio/src/tests/unit/executor_work_guard.cpp
index ac62bc5427d..5d7aecd5c7c 100644
--- a/3rdparty/asio/src/tests/unit/executor_work_guard.cpp
+++ b/3rdparty/asio/src/tests/unit/executor_work_guard.cpp
@@ -2,7 +2,7 @@
// executor_work_guard.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp b/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp
new file mode 100644
index 00000000000..e79eeae3eea
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp
@@ -0,0 +1,297 @@
+//
+// experimental/awaitable_operators.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/experimental/awaitable_operators.hpp"
+
+#include "asio/co_spawn.hpp"
+#include "asio/detached.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "../unit_test.hpp"
+
+using asio::awaitable;
+using namespace asio::experimental::awaitable_operators;
+
+struct move_only
+{
+ move_only(int i) : value(i) {}
+ move_only(const move_only&) = delete;
+ move_only(move_only&&) {}
+ move_only& operator=(const move_only&) = delete;
+ move_only& operator=(move_only&&) { return *this; }
+ int value;
+};
+
+awaitable<void> void_ok()
+{
+ co_return;
+}
+
+awaitable<void> void_ex()
+{
+ throw std::runtime_error("exception");
+ co_return;
+}
+
+awaitable<void> void_post_loop()
+{
+ for (;;)
+ co_await asio::post(asio::use_awaitable);
+}
+
+awaitable<int> int_0()
+{
+ co_return 0;
+}
+
+awaitable<int> int_1()
+{
+ co_return 1;
+}
+
+awaitable<int> int_2()
+{
+ co_return 2;
+}
+
+awaitable<int> int_ex()
+{
+ throw std::runtime_error("exception");
+ co_return -1;
+}
+
+awaitable<move_only> move_only_0()
+{
+ co_return move_only(0);
+}
+
+awaitable<move_only> move_only_1()
+{
+ co_return move_only(1);
+}
+
+awaitable<move_only> move_only_2()
+{
+ co_return move_only(2);
+}
+
+awaitable<move_only> move_only_ex()
+{
+ throw std::runtime_error("exception");
+ co_return move_only(-1);
+}
+
+awaitable<void> do_test_and_awaitable_operator()
+{
+ int i;
+ std::tuple<int, int> ii;
+ std::tuple<int, int, int> iii;
+
+ co_await (void_ok() && void_ok());
+ co_await (void_ok() && void_ok() && void_ok());
+ try { co_await (void_ex() && void_ok()); } catch (...) {}
+ try { co_await (void_ex() && void_ok() && void_ok()); } catch (...) {}
+ try { co_await (void_ex() && void_post_loop()); } catch (...) {}
+ try { co_await (void_ex() && void_ok() && void_post_loop()); } catch (...) {}
+
+ i = co_await (void_ok() && int_0());
+ ASIO_CHECK(i == 0);
+
+ i = co_await (void_ok() && int_1());
+ ASIO_CHECK(i == 1);
+
+ i = co_await (int_0() && void_ok());
+ ASIO_CHECK(i == 0);
+
+ ii = co_await (int_0() && int_1());
+ ASIO_CHECK(std::get<0>(ii) == 0);
+ ASIO_CHECK(std::get<1>(ii) == 1);
+
+ i = co_await (void_ok() && void_ok() && int_0());
+ ASIO_CHECK(i == 0);
+
+ i = co_await (void_ok() && int_0() && void_ok());
+ ASIO_CHECK(i == 0);
+
+ ii = co_await (void_ok() && int_0() && int_1());
+ ASIO_CHECK(std::get<0>(ii) == 0);
+ ASIO_CHECK(std::get<1>(ii) == 1);
+
+ ii = co_await (int_0() && void_ok() && int_1());
+ ASIO_CHECK(std::get<0>(ii) == 0);
+ ASIO_CHECK(std::get<1>(ii) == 1);
+
+ iii = co_await (int_0() && int_1() && int_2());
+ ASIO_CHECK(std::get<0>(iii) == 0);
+ ASIO_CHECK(std::get<1>(iii) == 1);
+ ASIO_CHECK(std::get<2>(iii) == 2);
+}
+
+void test_and_awaitable_operator()
+{
+ asio::io_context ctx;
+ co_spawn(ctx, do_test_and_awaitable_operator(), asio::detached);
+ ctx.run();
+}
+
+awaitable<void> do_test_or_awaitable_operator()
+{
+ std::variant<int, int> ii;
+ std::variant<int, std::monostate> iv;
+ std::variant<std::monostate, int> vi;
+ std::variant<std::monostate, std::monostate> vv;
+ std::variant<int, int, int> iii;
+ std::variant<int, int, std::monostate> iiv;
+ std::variant<int, std::monostate, int> ivi;
+ std::variant<int, std::monostate, std::monostate> ivv;
+ std::variant<std::monostate, int, int> vii;
+ std::variant<std::monostate, int, std::monostate> viv;
+ std::variant<std::monostate, std::monostate, int> vvi;
+ std::variant<std::monostate, std::monostate, std::monostate> vvv;
+
+ vv = co_await (void_ok() || void_ok());
+ ASIO_CHECK(vv.index() == 0);
+
+ vv = co_await (void_ex() || void_ok());
+ ASIO_CHECK(vv.index() == 1);
+
+ vi = co_await (void_ok() || int_0());
+ ASIO_CHECK(vi.index() == 0);
+
+ vi = co_await (void_ex() || int_0());
+ ASIO_CHECK(vi.index() == 1);
+
+ iv = co_await (int_0() || void_ex());
+ ASIO_CHECK(iv.index() == 0);
+ ASIO_CHECK(std::get<0>(iv) == 0);
+
+ ii = co_await (int_0() || int_1());
+ ASIO_CHECK(ii.index() == 0);
+ ASIO_CHECK(std::get<0>(ii) == 0);
+
+ ii = co_await (int_ex() || int_1());
+ ASIO_CHECK(ii.index() == 1);
+ ASIO_CHECK(std::get<1>(ii) == 1);
+
+ vvv = co_await (void_ok() || void_ok() || void_ok());
+ ASIO_CHECK(vvv.index() == 0);
+
+ vvv = co_await (void_ex() || void_ok() || void_ok());
+ ASIO_CHECK(vvv.index() == 1);
+
+ vvv = co_await (void_ex() || void_ex() || void_ok());
+ ASIO_CHECK(vvv.index() == 2);
+
+ vvi = co_await (void_ok() || void_ok() || int_0());
+ ASIO_CHECK(vvi.index() == 0);
+
+ viv = co_await (void_ok() || int_0() || void_ok());
+ ASIO_CHECK(viv.index() == 0);
+
+ viv = co_await (void_ex() || int_0() || void_ok());
+ ASIO_CHECK(viv.index() == 1);
+ ASIO_CHECK(std::get<1>(viv) == 0);
+
+ vii = co_await (void_ex() || int_0() || int_1());
+ ASIO_CHECK(vii.index() == 1);
+ ASIO_CHECK(std::get<1>(vii) == 0);
+
+ ivv = co_await (int_0() || void_ok() || void_ok());
+ ASIO_CHECK(ivv.index() == 0);
+ ASIO_CHECK(std::get<0>(ivv) == 0);
+
+ ivv = co_await (int_ex() || void_ok() || void_ok());
+ ASIO_CHECK(ivv.index() == 1);
+
+ ivi = co_await (int_0() || void_ok() || int_1());
+ ASIO_CHECK(ivi.index() == 0);
+ ASIO_CHECK(std::get<0>(ivi) == 0);
+
+ ivi = co_await (int_ex() || void_ok() || int_1());
+ ASIO_CHECK(ivi.index() == 1);
+
+ iiv = co_await (int_0() || int_1() || void_ok());
+ ASIO_CHECK(iiv.index() == 0);
+ ASIO_CHECK(std::get<0>(iiv) == 0);
+
+ iiv = co_await (int_ex() || int_1() || void_ok());
+ ASIO_CHECK(iiv.index() == 1);
+ ASIO_CHECK(std::get<0>(iiv) == 1);
+
+ iiv = co_await (int_ex() || int_ex() || void_ok());
+ ASIO_CHECK(iiv.index() == 2);
+
+ iii = co_await (int_0() || int_1() || int_2());
+ ASIO_CHECK(iii.index() == 0);
+ ASIO_CHECK(std::get<0>(iii) == 0);
+
+ iii = co_await (int_ex() || int_1() || int_2());
+ ASIO_CHECK(iii.index() == 1);
+ ASIO_CHECK(std::get<1>(iii) == 1);
+
+ iii = co_await (int_ex() || int_ex() || int_2());
+ ASIO_CHECK(iii.index() == 2);
+ ASIO_CHECK(std::get<2>(iii) == 2);
+
+ std::variant<move_only, int> mi = co_await (move_only_0() || int_1());
+ ASIO_CHECK(mi.index() == 0);
+ ASIO_CHECK(std::get<0>(mi).value == 0);
+
+ mi = co_await (move_only_ex() || int_1());
+ ASIO_CHECK(mi.index() == 1);
+ ASIO_CHECK(std::get<1>(mi) == 1);
+
+ std::variant<move_only, move_only> mm =
+ co_await (move_only_0() || move_only_1());
+ ASIO_CHECK(mm.index() == 0);
+ ASIO_CHECK(std::get<0>(mm).value == 0);
+
+ mm = co_await (move_only_ex() || move_only_1());
+ ASIO_CHECK(mm.index() == 1);
+ ASIO_CHECK(std::get<1>(mm).value == 1);
+
+ std::variant<move_only, move_only, move_only> mmm =
+ co_await (move_only_0() || move_only_1() || move_only_2());
+ ASIO_CHECK(mmm.index() == 0);
+ ASIO_CHECK(std::get<0>(mmm).value == 0);
+
+ mmm = co_await (move_only_ex() || move_only_1() || move_only_2());
+ ASIO_CHECK(mmm.index() == 1);
+ ASIO_CHECK(std::get<1>(mmm).value == 1);
+
+ mmm = co_await (move_only_ex() || move_only_ex() || move_only_2());
+ ASIO_CHECK(mmm.index() == 2);
+ ASIO_CHECK(std::get<2>(mmm).value == 2);
+}
+
+void test_or_awaitable_operator()
+{
+ asio::io_context ctx;
+ co_spawn(ctx, do_test_or_awaitable_operator(), asio::detached);
+ ctx.run();
+}
+
+ASIO_TEST_SUITE
+(
+ "experimental/awaitable_operators",
+ ASIO_TEST_CASE(test_and_awaitable_operator)
+ ASIO_TEST_CASE(test_or_awaitable_operator)
+)
diff --git a/3rdparty/asio/src/tests/unit/posix/stream_descriptor_service.cpp b/3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp
index be2e60e7ca3..a277efeb27c 100644
--- a/3rdparty/asio/src/tests/unit/posix/stream_descriptor_service.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp
@@ -1,8 +1,8 @@
//
-// stream_descriptor_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// experimental/basic_channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/posix/stream_descriptor_service.hpp"
+#include "asio/experimental/basic_channel.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "posix/stream_descriptor_service",
+ "experimental/basic_channel",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp b/3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp
new file mode 100644
index 00000000000..413d1870bd9
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp
@@ -0,0 +1,25 @@
+//
+// experimental/basic_concurrent_channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/basic_concurrent_channel.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/basic_concurrent_channel",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/channel.cpp b/3rdparty/asio/src/tests/unit/experimental/channel.cpp
new file mode 100644
index 00000000000..6c5b67fe570
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/channel.cpp
@@ -0,0 +1,888 @@
+//
+// experimental/channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/channel.hpp"
+
+#include <utility>
+#include "asio/any_completion_handler.hpp"
+#include "asio/bind_executor.hpp"
+#include "asio/bind_immediate_executor.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "asio/system_executor.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+using namespace asio::experimental;
+
+void unbuffered_channel_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(!b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ bool b3 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(b3);
+ ASIO_CHECK(s1.empty());
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "abcdefghijklmnopqrstuvwxyz");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+}
+
+void buffered_channel_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "hello");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+
+ bool b6 = ch1.try_send(asio::error_code(), "goodbye");
+
+ ASIO_CHECK(b6);
+
+ ch1.close();
+
+ asio::error_code ec4;
+ std::string s5;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec4 = ec;
+ s5 = std::move(s);
+ });
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec4);
+ ASIO_CHECK(s5 == "goodbye");
+
+ asio::error_code ec5;
+ std::string s6;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec5 = ec;
+ s6 = std::move(s);
+ });
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec5 == asio::experimental::channel_errc::channel_closed);
+ ASIO_CHECK(s6.empty());
+}
+
+void buffered_error_channel_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code)> ch1(ctx, 1);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof);
+
+ ASIO_CHECK(b1);
+
+ bool b2 = ch1.try_send(asio::error::eof);
+
+ ASIO_CHECK(!b2);
+
+ asio::error_code ec1;
+ ch1.async_receive(
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+
+ bool b4 = ch1.try_receive([](asio::error_code){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ ch1.async_send(asio::error::eof,
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec)
+ {
+ ec3 = ec;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+}
+
+void unbuffered_non_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ });
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void unbuffered_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+}
+
+void unbuffered_executor_receive()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_executor(ctx2,
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void unbuffered_non_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(!ec2);
+}
+
+void unbuffered_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(!ec2);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+}
+
+void unbuffered_executor_send()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ bind_executor(ctx2,
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(!ec2);
+}
+
+void buffered_non_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ });
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void buffered_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+
+ ctx.restart();
+ ctx.run();
+}
+
+void buffered_executor_receive()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_executor(ctx2,
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void buffered_non_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+}
+
+void buffered_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ }));
+
+ ASIO_CHECK(!ec1);
+
+ ctx.run();
+}
+
+void buffered_executor_send()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ bind_executor(ctx2,
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(!ec1);
+}
+
+void try_send_via_dispatch()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ bind_executor(asio::system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.poll();
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ std::string s2 = "0123456789";
+ ch1.try_send_via_dispatch(asio::error::eof, std::move(s2));
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(s2.empty());
+}
+
+void try_send_n_via_dispatch()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ bind_executor(asio::system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_executor(asio::system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.poll();
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ std::string s3 = "0123456789";
+ ch1.try_send_n_via_dispatch(2, asio::error::eof, std::move(s3));
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+ ASIO_CHECK(s3.empty());
+}
+
+struct multi_signature_handler
+{
+ std::string* s_;
+ asio::error_code* ec_;
+
+ void operator()(std::string s)
+ {
+ *s_ = s;
+ }
+
+ void operator()(asio::error_code ec)
+ {
+ *ec_ = ec;
+ }
+};
+
+void implicit_error_signature_channel_test()
+{
+ io_context ctx;
+
+ channel<void(std::string)> ch1(ctx);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send("hello");
+
+ ASIO_CHECK(!b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ std::string s2;
+ asio::error_code ec1 = asio::error::would_block;
+ multi_signature_handler h1 = {&s2, &ec1};
+ ch1.async_receive(h1);
+
+ bool b3 = ch1.try_send(std::move(s1));
+
+ ASIO_CHECK(b3);
+ ASIO_CHECK(s1.empty());
+
+ ctx.run();
+
+ ASIO_CHECK(s2 == "abcdefghijklmnopqrstuvwxyz");
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ std::string s3;
+ asio::error_code ec2;
+ multi_signature_handler h2 = {&s3, &ec2};
+ bool b4 = ch1.try_receive(h2);
+
+ ASIO_CHECK(!b4);
+
+ std::string s4 = "zyxwvutsrqponmlkjihgfedcba";
+ asio::error_code ec3;
+ ch1.async_send(std::move(s4),
+ [&](asio::error_code ec)
+ {
+ ec3 = ec;
+ });
+
+ std::string s5;
+ asio::error_code ec4 = asio::error::would_block;
+ multi_signature_handler h3 = {&s5, &ec4};
+ bool b5 = ch1.try_receive(h3);
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec4 == asio::error::would_block);
+ ASIO_CHECK(s5 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec3);
+
+ std::string s6;
+ asio::error_code ec5 = asio::error::would_block;
+ multi_signature_handler h4 = {&s6, &ec5};
+ ch1.async_receive(h4);
+
+ ch1.close();
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(s6.empty());
+ ASIO_CHECK(ec5 == asio::experimental::channel_errc::channel_closed);
+}
+
+void channel_with_any_completion_handler_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ asio::any_completion_handler<
+ void(asio::error_code, std::string)>(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ }));
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ asio::any_completion_handler<void(asio::error_code)>(
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "zyxwvutsrqponmlkjihgfedcba");
+ ASIO_CHECK(!ec2);
+}
+
+ASIO_TEST_SUITE
+(
+ "experimental/channel",
+ ASIO_TEST_CASE(unbuffered_channel_test)
+ ASIO_TEST_CASE(buffered_channel_test)
+ ASIO_TEST_CASE(buffered_error_channel_test)
+ ASIO_TEST_CASE(unbuffered_non_immediate_receive)
+ ASIO_TEST_CASE(unbuffered_immediate_receive)
+ ASIO_TEST_CASE(unbuffered_executor_receive)
+ ASIO_TEST_CASE(unbuffered_non_immediate_send)
+ ASIO_TEST_CASE(unbuffered_immediate_send)
+ ASIO_TEST_CASE(unbuffered_executor_send)
+ ASIO_TEST_CASE(buffered_non_immediate_receive)
+ ASIO_TEST_CASE(buffered_immediate_receive)
+ ASIO_TEST_CASE(buffered_executor_receive)
+ ASIO_TEST_CASE(buffered_non_immediate_send)
+ ASIO_TEST_CASE(buffered_immediate_send)
+ ASIO_TEST_CASE(buffered_executor_send)
+ ASIO_TEST_CASE(try_send_via_dispatch)
+ ASIO_TEST_CASE(try_send_n_via_dispatch)
+ ASIO_TEST_CASE(implicit_error_signature_channel_test)
+ ASIO_TEST_CASE(channel_with_any_completion_handler_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp b/3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp
index 56ff1c3bde9..b1c326f874d 100644
--- a/3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp
@@ -1,8 +1,8 @@
//
-// object_handle_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// experimental/channel_traits.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,13 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/windows/object_handle_service.hpp"
+#include "asio/experimental/channel_traits.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/object_handle_service",
+ "experimental/channel_traits",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/experimental/co_composed.cpp b/3rdparty/asio/src/tests/unit/experimental/co_composed.cpp
new file mode 100644
index 00000000000..755cd46d788
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/co_composed.cpp
@@ -0,0 +1,518 @@
+//
+// experimental/co_composed.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/experimental/co_composed.hpp"
+
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/deferred.hpp"
+#include "asio/detached.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "../unit_test.hpp"
+
+template <typename CompletionToken>
+auto async_throw(CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ [](auto) { throw 42; }, token);
+}
+
+template <typename CompletionToken>
+auto throw_first(CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state) -> void
+ {
+ throw 42;
+ co_yield state.complete();
+ }), token);
+}
+
+void test_throw_first()
+{
+ try
+ {
+ throw_first(asio::detached);
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto throw_after_await(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ co_await asio::post(ctx, asio::deferred);
+ throw 42;
+ co_yield state.complete();
+ }), token, std::ref(ctx));
+}
+
+void test_throw_after_await()
+{
+ try
+ {
+ asio::io_context ctx(1);
+ throw_after_await(ctx, asio::detached);
+ ctx.run();
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto throw_in_first_suspend(CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state) -> void
+ {
+ co_await async_throw(asio::deferred);
+ co_yield state.complete();
+ }), token);
+}
+
+void test_throw_in_first_suspend()
+{
+ try
+ {
+ throw_in_first_suspend(asio::detached);
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto throw_in_suspend_after_await(
+ asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ co_await asio::post(ctx, asio::deferred);
+ co_await async_throw(asio::deferred);
+ co_yield state.complete();
+ }), token, std::ref(ctx));
+}
+
+void test_throw_in_suspend_after_await()
+{
+ try
+ {
+ asio::io_context ctx(1);
+ throw_in_suspend_after_await(ctx, asio::detached);
+ ctx.run();
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto post_loop(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int)>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_yield state.complete(i);
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ post_loop(ctx, [&](int i){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto nested_post(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ co_await asio::post(ctx, asio::deferred);
+ co_yield state.complete();
+ }, ctx), token, std::ref(ctx));
+}
+
+template <typename CompletionToken>
+auto nested_post_loop(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int)>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await nested_post(ctx, asio::deferred);
+ co_yield state.complete(i);
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_nested_post_loop()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ nested_post_loop(ctx, [&](int i){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto post_loop_return_1_0(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed<void()>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_1_0()
+{
+ asio::io_context ctx(1);
+ bool done = false;
+ post_loop_return_1_0(ctx, [&]{ done = true; });
+ ctx.run();
+ ASIO_CHECK(done);
+}
+
+template <typename CompletionToken>
+auto post_loop_return_1_1(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int)>(
+ asio::experimental::co_composed<void(int)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_1_1()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ post_loop_return_1_1(ctx, [&](int i){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto post_loop_return_1_2(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int, char)>(
+ asio::experimental::co_composed<void(int, char)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {i, 'A'};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_1_2()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ char ch = 0;
+ post_loop_return_1_2(ctx, [&](int i, char c){ count = i, ch = c; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+ ASIO_CHECK(ch == 'A');
+}
+
+template <typename CompletionToken>
+auto post_loop_return_2(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(), void(int)>(
+ asio::experimental::co_composed<void(), void(int)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_2()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ post_loop_return_2(ctx, [&](int i = 0){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto complete_on_cancel(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<
+ CompletionToken, void(asio::error_code, int)>(
+ asio::experimental::co_composed<
+ void(asio::error_code, int)>(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ state.on_cancellation_complete_with(
+ asio::error::invalid_argument, 42);
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {asio::error::eof, i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_complete_on_cancel()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ asio::error_code ec;
+ asio::cancellation_signal cancel;
+
+ complete_on_cancel(ctx,
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+
+ complete_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run_one();
+ cancel.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::invalid_argument);
+ ASIO_CHECK(count == 42);
+
+ complete_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto complete_with_default_on_cancel(
+ asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<
+ CompletionToken, void(asio::error_code, int)>(
+ asio::experimental::co_composed<
+ void(asio::error_code, int)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {asio::error::eof, i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_complete_with_default_on_cancel()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ asio::error_code ec;
+ asio::cancellation_signal cancel;
+
+ complete_with_default_on_cancel(ctx,
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+
+ complete_with_default_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run_one();
+ cancel.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::operation_aborted);
+ ASIO_CHECK(count == 0);
+
+ complete_with_default_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto throw_on_cancel(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<
+ CompletionToken, void(asio::error_code, int)>(
+ asio::experimental::co_composed<
+ void(asio::error_code, int)>(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ try
+ {
+ state.throw_if_cancelled(true);
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {asio::error::eof, i};
+ }
+ catch (...)
+ {
+ co_return {asio::error::invalid_argument, 42};
+ }
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_throw_on_cancel()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ asio::error_code ec;
+ asio::cancellation_signal cancel;
+
+ throw_on_cancel(ctx,
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+
+ throw_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run_one();
+ cancel.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::invalid_argument);
+ ASIO_CHECK(count == 42);
+
+ throw_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+}
+
+ASIO_TEST_SUITE
+(
+ "experimental/co_composed",
+ ASIO_TEST_CASE(test_throw_first)
+ ASIO_TEST_CASE(test_throw_after_await)
+ ASIO_TEST_CASE(test_throw_in_first_suspend)
+ ASIO_TEST_CASE(test_throw_in_suspend_after_await)
+ ASIO_TEST_CASE(test_post_loop)
+ ASIO_TEST_CASE(test_nested_post_loop)
+ ASIO_TEST_CASE(test_post_loop_return_1_0)
+ ASIO_TEST_CASE(test_post_loop_return_1_1)
+ ASIO_TEST_CASE(test_post_loop_return_1_2)
+ ASIO_TEST_CASE(test_post_loop_return_2)
+ ASIO_TEST_CASE(test_complete_on_cancel)
+ ASIO_TEST_CASE(test_complete_with_default_on_cancel)
+ ASIO_TEST_CASE(test_throw_on_cancel)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp b/3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp
new file mode 100644
index 00000000000..e64e9051638
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp
@@ -0,0 +1,165 @@
+//
+// experimental/concurrent_channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/concurrent_channel.hpp"
+
+#include <utility>
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+using namespace asio::experimental;
+
+void unbuffered_concurrent_channel_test()
+{
+ io_context ctx;
+
+ concurrent_channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(!b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ bool b3 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(b3);
+ ASIO_CHECK(s1.empty());
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "abcdefghijklmnopqrstuvwxyz");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+};
+
+void buffered_concurrent_channel_test()
+{
+ io_context ctx;
+
+ concurrent_channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "hello");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+};
+
+ASIO_TEST_SUITE
+(
+ "experimental/concurrent_channel",
+ ASIO_TEST_CASE(unbuffered_concurrent_channel_test)
+ ASIO_TEST_CASE(buffered_concurrent_channel_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp
new file mode 100644
index 00000000000..845906df853
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp
@@ -0,0 +1,113 @@
+//
+// experimental/coro/partial.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include <vector>
+#include "asio/io_context.hpp"
+#include "../../unit_test.hpp"
+
+namespace exp = asio::experimental;
+
+namespace coro {
+
+template<typename Value = void>
+struct tracked_allocator
+{
+ using value_type = Value;
+ std::vector<std::pair<void*, std::size_t>> & allocs, &deallocs;
+
+ tracked_allocator(std::vector<std::pair<void*, std::size_t>> & allocs,
+ std::vector<std::pair<void*, std::size_t>> & deallocs) : allocs(allocs), deallocs(deallocs) {}
+
+
+ template<typename T>
+ tracked_allocator(const tracked_allocator<T> & a) : allocs(a.allocs), deallocs(a.deallocs) {}
+
+ value_type* allocate(std::size_t n)
+ {
+ auto p = new char[n * sizeof(Value)];
+ allocs.emplace_back(p, n);
+ return reinterpret_cast<value_type*>(p);
+ }
+
+ void deallocate(void* p, std::size_t n)
+ {
+ deallocs.emplace_back(p, n);
+ delete[] static_cast<char*>(p);
+// ASIO_CHECK(allocs.back() == deallocs.back());
+ }
+
+ bool operator==(const tracked_allocator & rhs) const
+ {
+ return &allocs == &rhs.allocs
+ && &deallocs == &rhs.deallocs;
+ }
+};
+
+exp::coro<void, void, asio::any_io_executor, tracked_allocator<void>>
+ alloc_test_impl(asio::io_context & ctx, int, std::allocator_arg_t, tracked_allocator<void> ta, double)
+{
+ co_return ;
+}
+
+void alloc_test()
+{
+ std::vector<std::pair<void*, std::size_t>> allocs, deallocs;
+ asio::io_context ctx;
+ bool ran = false;
+
+ {
+ auto pp = alloc_test_impl(ctx, 42, std::allocator_arg, {allocs, deallocs}, 42.);
+
+ ASIO_CHECK(allocs.size() == 1u);
+ ASIO_CHECK(deallocs.empty());
+
+ pp.async_resume([&](auto e){ran = true; ASIO_CHECK(!e);});
+ ctx.run();
+ ASIO_CHECK(deallocs.size() == 0u);
+ }
+ ctx.restart();
+ ctx.run();
+ ASIO_CHECK(deallocs.size() == 1u);
+ ASIO_CHECK(allocs == deallocs);
+
+ ASIO_CHECK(ran);
+
+ ran = false;
+
+ auto p = asio::experimental::detail::post_coroutine(
+ ctx,
+ asio::bind_allocator(tracked_allocator{allocs, deallocs}, [&]{ran = true;})).handle;
+ ASIO_CHECK(allocs.size() == 2u);
+ ASIO_CHECK(deallocs.size() == 1u);
+ p.resume();
+ ASIO_CHECK(allocs.size() == 3u);
+ ASIO_CHECK(deallocs.size() == 2u);
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(allocs == deallocs);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/allocate",
+ ASIO_TEST_CASE(::coro::alloc_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp
new file mode 100644
index 00000000000..38cf1067908
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp
@@ -0,0 +1,179 @@
+//
+// experimental/coro/cancel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+#include <iostream>
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
+#include "asio/this_coro.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+namespace this_coro = asio::this_coro;
+
+namespace coro {
+
+
+auto coro_simple_cancel_impl(asio::io_context& ) noexcept
+ -> asio::experimental::coro<void() noexcept, asio::error_code>
+{
+ ASIO_CHECK(
+ !(co_await this_coro::cancellation_state).cancelled());
+
+ asio::steady_timer timer{
+ co_await this_coro::executor,
+ std::chrono::seconds(1)};
+
+ ASIO_CHECK(
+ !(co_await this_coro::cancellation_state).cancelled());
+
+ auto ec = co_await timer;
+
+ ASIO_CHECK(
+ (co_await this_coro::cancellation_state).cancelled());
+
+ co_return ec;
+}
+
+void coro_simple_cancel()
+{
+ asio::io_context ctx;
+ asio::cancellation_signal sig;
+
+ auto k = coro_simple_cancel_impl(ctx);
+
+ asio::error_code res_ec;
+ k.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](asio::error_code ec) {res_ec = ec;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
+
+ ASIO_CHECK(!res_ec);
+
+ ctx.run();
+
+ ASIO_CHECK(res_ec == asio::error::operation_aborted);
+}
+
+auto coro_throw_cancel_impl(asio::io_context& )
+ -> asio::experimental::coro<void() , void>
+{
+ asio::steady_timer timer{
+ co_await this_coro::executor,
+ std::chrono::seconds(1)};
+ co_await timer;
+}
+
+void coro_throw_cancel()
+{
+ asio::io_context ctx;
+ asio::cancellation_signal sig;
+
+ auto k = coro_throw_cancel_impl(ctx);
+
+ std::exception_ptr res_ex;
+ k.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](std::exception_ptr ex) {res_ex = ex;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
+
+ ASIO_CHECK(!res_ex);
+
+ ctx.run();
+
+ ASIO_CHECK(res_ex);
+ try
+ {
+ if (res_ex)
+ std::rethrow_exception(res_ex);
+ }
+ catch (asio::system_error& se)
+ {
+ ASIO_CHECK(se.code() == asio::error::operation_aborted);
+ }
+}
+
+auto coro_simple_cancel_nested_k(asio::io_context&, int& cnt) noexcept
+ -> asio::experimental::coro<
+ void() noexcept,
+ asio::error_code>
+{
+ asio::steady_timer timer{
+ co_await this_coro::executor,
+ std::chrono::milliseconds(100)};
+
+ ASIO_CHECK(!(co_await this_coro::cancellation_state).cancelled());
+ auto ec = co_await timer;
+ cnt++;
+ ASIO_CHECK((co_await this_coro::cancellation_state).cancelled());
+
+ co_return ec;
+}
+
+auto coro_simple_cancel_nested_kouter(
+ asio::io_context& ctx, int& cnt) noexcept
+ -> asio::experimental::coro<
+ asio::error_code() noexcept,
+ asio::error_code>
+{
+ ASIO_CHECK(cnt == 0);
+ co_yield co_await coro_simple_cancel_nested_k(ctx, cnt);
+ ASIO_CHECK(cnt == 1);
+ auto ec = co_await coro_simple_cancel_nested_k(ctx, cnt);
+ ASIO_CHECK(cnt == 2);
+ co_return ec;
+}
+
+void coro_simple_cancel_nested()
+{
+ asio::io_context ctx;
+ asio::cancellation_signal sig;
+
+ int cnt = 0;
+ auto kouter = coro_simple_cancel_nested_kouter(ctx, cnt);
+
+ asio::error_code res_ec;
+ kouter.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](asio::error_code ec) {res_ec = ec;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
+ ASIO_CHECK(!res_ec);
+ ctx.run();
+ ASIO_CHECK(res_ec == asio::error::operation_aborted);
+
+ ctx.restart();
+ res_ec = {};
+ kouter.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](asio::error_code ec) {res_ec = ec;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
+ ASIO_CHECK(!res_ec);
+ ctx.run();
+ ASIO_CHECK(res_ec == asio::error::operation_aborted);
+ ASIO_CHECK(cnt == 2);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/cancel",
+ ASIO_TEST_CASE(::coro::coro_simple_cancel)
+ ASIO_TEST_CASE(::coro::coro_throw_cancel)
+ ASIO_TEST_CASE(::coro::coro_simple_cancel_nested)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp
new file mode 100644
index 00000000000..8e6586252f2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp
@@ -0,0 +1,67 @@
+//
+// experimental/coro/co_spawn.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/co_spawn.hpp"
+
+#include <iostream>
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
+#include "asio/this_coro.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+namespace this_coro = asio::this_coro;
+
+namespace coro {
+
+auto coro_simple_co_spawn_impl(asio::io_context& , bool &done) noexcept
+ -> asio::experimental::coro<void() noexcept, int>
+{
+ asio::steady_timer timer(
+ co_await this_coro::executor,
+ std::chrono::milliseconds(10));
+
+ done = true;
+
+ co_return 42;
+}
+
+void coro_co_spawn()
+{
+ asio::io_context ctx;
+
+ bool done1 = false;
+ bool done2 = false;
+ int res = 0;
+
+ co_spawn(coro_simple_co_spawn_impl(ctx, done1),
+ [&](int r){done2= true; res = r;});
+
+ ctx.run();
+
+ ASIO_CHECK(done1);
+ ASIO_CHECK(done2);
+ ASIO_CHECK(res == 42);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/co_spawn",
+ ASIO_TEST_CASE(::coro::coro_co_spawn)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp
new file mode 100644
index 00000000000..f4d782e9903
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp
@@ -0,0 +1,172 @@
+//
+// experimental/coro/exception.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include "asio/co_spawn.hpp"
+#include "asio/detached.hpp"
+#include "asio/io_context.hpp"
+#include "asio/use_awaitable.hpp"
+#include "asio/awaitable.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace coro {
+
+template <typename Func>
+struct on_scope_exit
+{
+ Func func;
+
+ static_assert(noexcept(func()));
+
+ on_scope_exit(const Func &f)
+ : func(static_cast< Func && >(f))
+ {
+ }
+
+ on_scope_exit(Func &&f)
+ : func(f)
+ {
+ }
+
+ on_scope_exit(const on_scope_exit &) = delete;
+
+ ~on_scope_exit()
+ {
+ func();
+ }
+};
+
+asio::experimental::coro<int> throwing_generator(
+ asio::any_io_executor, int &last, bool &destroyed)
+{
+ on_scope_exit x = [&]() noexcept { destroyed = true; };
+ (void)x;
+
+ int i = 0;
+ while (i < 3)
+ co_yield last = ++i;
+
+ throw std::runtime_error("throwing-generator");
+}
+
+asio::awaitable<void> throwing_generator_test()
+{
+ int val = 0;
+ bool destr = false;
+ {
+ auto gi = throwing_generator(
+ co_await asio::this_coro::executor,
+ val, destr);
+ bool caught = false;
+ try
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ ASIO_CHECK(val == i);
+ const auto next = co_await gi.async_resume(asio::use_awaitable);
+ ASIO_CHECK(next);
+ ASIO_CHECK(val == *next);
+ ASIO_CHECK(val == i + 1);
+ }
+ }
+ catch (std::runtime_error &err)
+ {
+ caught = true;
+ using std::operator ""sv;
+ ASIO_CHECK(err.what() == "throwing-generator"sv);
+ }
+ ASIO_CHECK(val == 3);
+ ASIO_CHECK(caught);
+ }
+ ASIO_CHECK(destr);
+};
+
+void run_throwing_generator_test()
+{
+ asio::io_context ctx;
+ asio::co_spawn(ctx, throwing_generator_test(), asio::detached);
+ ctx.run();
+}
+
+asio::experimental::coro<int(int)> throwing_stacked(
+ asio::any_io_executor exec, int &val,
+ bool &destroyed_inner, bool &destroyed)
+{
+ ASIO_CHECK((co_await asio::this_coro::throw_if_cancelled()));
+
+ on_scope_exit x = [&]() noexcept { destroyed = true; };
+ (void)x;
+
+ auto gen = throwing_generator(exec, val, destroyed_inner);
+ while (auto next = co_await gen) // 1, 2, 4, 8, ...
+ ASIO_CHECK(42 ==(co_yield *next)); // offset is delayed by one cycle
+}
+
+asio::awaitable<void> throwing_generator_stacked_test()
+{
+ int val = 0;
+ bool destr = false, destr_inner = false;
+ {
+ auto gi = throwing_stacked(
+ co_await asio::this_coro::executor,
+ val, destr, destr_inner);
+ bool caught = false;
+ try
+ {
+ for (int i = 0; i < 10; i++)
+ {
+ ASIO_CHECK(val == i);
+ const auto next =
+ co_await gi.async_resume(42, asio::use_awaitable);
+ ASIO_CHECK(next);
+ ASIO_CHECK(val == *next);
+ ASIO_CHECK(val == i + 1);
+ }
+ }
+ catch (std::runtime_error &err)
+ {
+ caught = true;
+ using std::operator ""sv;
+ ASIO_CHECK(err.what() == "throwing-generator"sv);
+ }
+ ASIO_CHECK(val == 3);
+ ASIO_CHECK(caught);
+ }
+ ASIO_CHECK(destr);
+ ASIO_CHECK(destr_inner);
+};
+
+void run_throwing_generator_stacked_test()
+{
+ asio::io_context ctx;
+ asio::co_spawn(ctx,
+ throwing_generator_stacked_test,
+ asio::detached);
+ ctx.run();
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/exception",
+ ASIO_TEST_CASE(::coro::run_throwing_generator_stacked_test)
+ ASIO_TEST_CASE(::coro::run_throwing_generator_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp
new file mode 100644
index 00000000000..e0893da2e50
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp
@@ -0,0 +1,116 @@
+//
+// experimental/coro/executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include "asio/thread_pool.hpp"
+#include "asio/io_context.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace coro {
+
+#define ASIO_CHECKPOINT() \
+ ASIO_TEST_IOSTREAM << __FILE__ << "(" << __LINE__ << "): " \
+ << asio::detail::test_name() << ": " \
+ << "Checkpoint" << std::endl;
+
+template <typename T>
+void different_execs()
+{
+ asio::thread_pool th_ctx{1u};
+ asio::io_context ctx;
+
+ auto o = std::make_optional(
+ asio::prefer(th_ctx.get_executor(),
+ asio::execution::outstanding_work.tracked));
+
+ static bool ran_inner = false, ran_outer = false;
+
+ struct c_inner_t
+ {
+ auto operator()(asio::any_io_executor e) -> asio::experimental::coro<T>
+ {
+ auto p = e.target<asio::thread_pool::executor_type>();
+ ASIO_CHECKPOINT();
+ ASIO_CHECK(p);
+ ASIO_CHECK(p->running_in_this_thread());
+ ran_inner = true;
+ co_return;
+ };
+
+ };
+
+ c_inner_t c_inner;
+
+ struct c_outer_t
+ {
+
+ auto operator()(asio::any_io_executor e, int,
+ asio::experimental::coro<T> tp)
+ -> asio::experimental::coro<void>
+ {
+ auto p = e.target<asio::io_context::executor_type>();
+
+ ASIO_CHECK(p);
+ ASIO_CHECK(p->running_in_this_thread());
+ ASIO_CHECKPOINT();
+
+ co_await tp;
+
+ ASIO_CHECKPOINT();
+ ASIO_CHECK(p->running_in_this_thread());
+
+ ran_outer = true;
+ };
+ };
+
+ c_outer_t c_outer;
+
+ bool ran = false;
+ std::exception_ptr ex;
+
+ auto c = c_outer(ctx.get_executor(), 10, c_inner(th_ctx.get_executor()));
+ c.async_resume(
+ [&](std::exception_ptr e)
+ {
+ ASIO_CHECK(!e);
+ ASIO_CHECKPOINT();
+ ran = true;
+ });
+
+ ASIO_CHECK(!ran);
+ ctx.run();
+ o.reset();
+ ASIO_CHECK(ran);
+ ASIO_CHECK(ran_inner);
+ ASIO_CHECK(ran_outer);
+ ASIO_CHECK(!ex);
+
+ th_ctx.stop();
+ th_ctx.join();
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/partial",
+ ASIO_TEST_CASE(::coro::different_execs<void>)
+ ASIO_TEST_CASE(::coro::different_execs<int()>)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp
new file mode 100644
index 00000000000..651b8292204
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp
@@ -0,0 +1,45 @@
+//
+// experimental/coro/partial.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include "asio/io_context.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace coro {
+
+void partial()
+{
+ asio::io_context ctx;
+ bool ran = false;
+ auto p = detail::post_coroutine(ctx, [&]{ran = true;}).handle;
+ ASIO_CHECK(!ran);
+ p.resume();
+ ASIO_CHECK(!ran);
+ ctx.run();
+ ASIO_CHECK(ran);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/partial",
+ ASIO_TEST_CASE(::coro::partial)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp
new file mode 100644
index 00000000000..5eac0688548
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp
@@ -0,0 +1,264 @@
+//
+// experimental/coro/simple_test.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include "asio/co_spawn.hpp"
+#include "asio/detached.hpp"
+#include "asio/io_context.hpp"
+#include "asio/use_awaitable.hpp"
+#include <iostream>
+#include <vector>
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace asio {
+namespace experimental {
+
+template struct coro<void(), void, any_io_executor>;
+template struct coro<int(), void, any_io_executor>;
+template struct coro<void(), int, any_io_executor>;
+template struct coro<int(int), void, any_io_executor>;
+template struct coro<int(), int, any_io_executor>;
+template struct coro<int(int), int, any_io_executor>;
+
+template struct coro<void() noexcept, void, any_io_executor>;
+template struct coro<int() noexcept, void, any_io_executor>;
+template struct coro<void() noexcept, int, any_io_executor>;
+template struct coro<int(int) noexcept, void, any_io_executor>;
+template struct coro<int() noexcept, int, any_io_executor>;
+template struct coro<int(int) noexcept, int, any_io_executor>;
+
+} // namespace experimental
+} // namespace asio
+
+namespace coro {
+
+template <typename Func>
+struct on_scope_exit
+{
+ Func func;
+
+ static_assert(noexcept(func()));
+
+ on_scope_exit(const Func &f)
+ : func(static_cast< Func && >(f))
+ {
+ }
+
+ on_scope_exit(Func &&f)
+ : func(f)
+ {
+ }
+
+ on_scope_exit(const on_scope_exit &) = delete;
+
+ ~on_scope_exit()
+ {
+ func();
+ }
+};
+
+asio::experimental::coro<int> generator_impl(
+ asio::any_io_executor, int& last, bool& destroyed)
+{
+ on_scope_exit x = [&]() noexcept { destroyed = true; };
+ (void)x;
+
+ int i = 0;
+ while (true)
+ co_yield last = ++i;
+}
+
+asio::awaitable<void> generator_test()
+{
+ int val = 0;
+ bool destr = false;
+ {
+ auto gi = generator_impl(
+ co_await asio::this_coro::executor, val, destr);
+
+ for (int i = 0; i < 10; i++)
+ {
+ ASIO_CHECK(val == i);
+ const auto next = co_await gi.async_resume(asio::use_awaitable);
+ ASIO_CHECK(next);
+ ASIO_CHECK(val == *next);
+ ASIO_CHECK(val == i + 1);
+ }
+
+ ASIO_CHECK(!destr);
+ }
+ ASIO_CHECK(destr);
+};
+
+void run_generator_test()
+{
+ asio::io_context ctx;
+ asio::co_spawn(ctx, generator_test, asio::detached);
+ ctx.run();
+}
+
+asio::experimental::coro<void, int> task_test(asio::io_context&)
+{
+ co_return 42;
+}
+
+asio::experimental::coro<void, int> task_throw(asio::io_context&)
+{
+ throw std::logic_error(__func__);
+ co_return 42;
+}
+
+void run_task_test()
+{
+ asio::io_context ctx;
+
+ bool tt1 = false;
+ bool tt2 = false;
+ bool tt3 = false;
+ bool tt4 = false;
+ auto tt = task_test(ctx);
+ tt.async_resume(
+ [&](std::exception_ptr pt, int i)
+ {
+ tt1 = true;
+ ASIO_CHECK(!pt);
+ ASIO_CHECK(i == 42);
+ tt.async_resume(
+ [&](std::exception_ptr pt, int)
+ {
+ tt2 = true;
+ ASIO_CHECK(pt);
+ });
+ });
+
+ auto tt_2 = task_throw(ctx);
+
+ tt_2.async_resume(
+ [&](std::exception_ptr pt, int)
+ {
+ tt3 = true;
+ ASIO_CHECK(pt);
+ tt.async_resume(
+ [&](std::exception_ptr pt, int)
+ {
+ tt4 = true;
+ ASIO_CHECK(pt);
+ });
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(tt1);
+ ASIO_CHECK(tt2);
+ ASIO_CHECK(tt3);
+ ASIO_CHECK(tt4);
+}
+
+asio::experimental::coro<char> completion_generator_test_impl(
+ asio::any_io_executor, int limit)
+{
+ for (int i = 0; i < limit; i++)
+ co_yield i;
+}
+
+asio::awaitable<void> completion_generator_test()
+{
+ std::vector<int> res;
+ auto g = completion_generator_test_impl(
+ co_await asio::this_coro::executor, 10);
+
+ ASIO_CHECK(g.is_open());
+ while (auto val = co_await g.async_resume(asio::use_awaitable))
+ res.push_back(*val);
+
+ ASIO_CHECK(!g.is_open());
+ ASIO_CHECK((res == std::vector{0,1,2,3,4,5,6,7,8,9}));
+};
+
+
+void run_completion_generator_test()
+{
+ asio::io_context ctx;
+ asio::co_spawn(ctx, completion_generator_test, asio::detached);
+ ctx.run();
+}
+
+asio::experimental::coro<int(int)>
+symmetrical_test_impl(asio::any_io_executor)
+{
+ int i = 0;
+ while (true)
+ i = (co_yield i) + i;
+}
+
+asio::awaitable<void> symmetrical_test()
+{
+ auto g = symmetrical_test_impl(co_await asio::this_coro::executor);
+
+ ASIO_CHECK(g.is_open());
+
+ ASIO_CHECK(0 == (co_await g.async_resume(0,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(1 == (co_await g.async_resume(1,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(3 == (co_await g.async_resume(2,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(6 == (co_await g.async_resume(3,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(10 == (co_await g.async_resume(4,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(15 == (co_await g.async_resume(5,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(21 == (co_await g.async_resume(6,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(28 == (co_await g.async_resume(7,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(36 == (co_await g.async_resume(8,
+ asio::use_awaitable)).value_or(-1));
+
+ ASIO_CHECK(45 == (co_await g.async_resume(9,
+ asio::use_awaitable)).value_or(-1));
+};
+
+void run_symmetrical_test()
+{
+ asio::io_context ctx;
+ asio::co_spawn(ctx, symmetrical_test, asio::detached);
+ ctx.run();
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/simple_test",
+ ASIO_TEST_CASE(::coro::run_generator_test)
+ ASIO_TEST_CASE(::coro::run_task_test)
+ ASIO_TEST_CASE(::coro::run_symmetrical_test)
+ ASIO_TEST_CASE(::coro::run_completion_generator_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp
new file mode 100644
index 00000000000..9177161afcf
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp
@@ -0,0 +1,83 @@
+//
+// experimental/coro/stack_test.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include "asio/detached.hpp"
+#include "asio/io_context.hpp"
+#include <iostream>
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace coro {
+
+asio::experimental::coro<int()>
+ stack_generator(asio::any_io_executor, int i = 1)
+{
+ for (;;)
+ {
+ co_yield i;
+ i *= 2;
+ }
+}
+
+asio::experimental::coro<int(int)>
+stack_accumulate(asio::any_io_executor exec)
+{
+ auto gen = stack_generator(exec);
+ int offset = 0;
+ while (auto next = co_await gen) // 1, 2, 4, 8, ...
+ offset = co_yield *next + offset; // offset is delayed by one cycle
+}
+
+asio::experimental::coro<int>
+main_stack_coro(asio::io_context&, bool & done)
+{
+ auto g = stack_accumulate(co_await asio::this_coro::executor);
+
+ ASIO_CHECK(g.is_open());
+ ASIO_CHECK(1 == (co_await g(1000)).value_or(-1));
+ ASIO_CHECK(2002 == (co_await g(2000)).value_or(-1));
+ ASIO_CHECK(3004 == (co_await g(3000)).value_or(-1));
+ ASIO_CHECK(4008 == (co_await g(4000)).value_or(-1));
+ ASIO_CHECK(5016 == (co_await g(5000)).value_or(-1));
+ ASIO_CHECK(6032 == (co_await g(6000)).value_or(-1));
+ ASIO_CHECK(7064 == (co_await g(7000)).value_or(-1));
+ ASIO_CHECK(8128 == (co_await g(8000)).value_or(-1));
+ ASIO_CHECK(9256 == (co_await g(9000)).value_or(-1));
+ ASIO_CHECK(511 == (co_await g(-1)).value_or(-1));
+ done = true;
+}
+
+void stack_test()
+{
+ bool done = false;
+ asio::io_context ctx;
+ auto k = main_stack_coro(ctx, done);
+ k.async_resume(asio::detached);
+ ctx.run();
+ ASIO_CHECK(done);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/stack_test",
+ ASIO_TEST_CASE(::coro::stack_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp
new file mode 100644
index 00000000000..f2cb7adfcdd
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp
@@ -0,0 +1,77 @@
+//
+// experimental/coro/use_coro.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/use_coro.hpp"
+
+#include "asio/steady_timer.hpp"
+#include <iostream>
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace coro {
+
+asio::experimental::coro<void(), int>
+awaiter(asio::any_io_executor exec)
+{
+ asio::steady_timer timer{exec};
+ co_await timer.async_wait(use_coro);
+ co_return 42;
+}
+
+asio::experimental::coro<void() noexcept, int>
+awaiter_noexcept(asio::any_io_executor exec)
+{
+ asio::steady_timer timer{exec};
+ auto ec = co_await timer.async_wait(asio::deferred);
+ ASIO_CHECK(ec == asio::error_code{});
+ co_return 42;
+}
+
+void stack_test2()
+{
+ bool done = false;
+ asio::io_context ctx;
+
+ auto k = awaiter(ctx.get_executor());
+ auto k2 = awaiter_noexcept(ctx.get_executor());
+
+ k.async_resume(
+ [&](std::exception_ptr ex, int res)
+ {
+ ASIO_CHECK(!ex);
+ ASIO_CHECK(res == 42);
+ done = true;
+ });
+
+ k2.async_resume([&](int res)
+ {
+ ASIO_CHECK(res == 42);
+ done = true;
+ });
+
+ ctx.run();
+ ASIO_CHECK(done);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/use_coro",
+ ASIO_TEST_CASE(::coro::stack_test2)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp b/3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp
new file mode 100644
index 00000000000..c91c95f157d
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp
@@ -0,0 +1,25 @@
+//
+// experimental/parallel_group.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/parallel_group.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/parallel_group",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/promise.cpp b/3rdparty/asio/src/tests/unit/experimental/promise.cpp
new file mode 100644
index 00000000000..67923a4c726
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/promise.cpp
@@ -0,0 +1,226 @@
+//
+// promise.cpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/promise.hpp"
+
+#include "asio/append.hpp"
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/compose.hpp"
+#include "asio/deferred.hpp"
+#include "asio/experimental/use_promise.hpp"
+#include "asio/steady_timer.hpp"
+#include "../unit_test.hpp"
+
+namespace promise {
+
+void promise_tester()
+{
+ using namespace asio;
+ using namespace std::chrono;
+
+ io_context ctx;
+
+ steady_timer timer1{ctx}, timer2{ctx};
+
+ const auto started_when = steady_clock::now();
+ timer1.expires_at(started_when + milliseconds(5000));
+ timer2.expires_at(started_when + milliseconds(1000));
+ auto p1 = timer1.async_wait(experimental::use_promise);
+
+ steady_clock::time_point completed_when;
+ asio::error_code ec;
+ bool called = false;
+
+ p1([&](asio::error_code ec_)
+ {
+ ec = ec_;
+ called = true;
+ completed_when = steady_clock::now();
+ });
+
+ steady_clock::time_point timer2_done;
+ timer2.async_wait(
+ [&](asio::error_code)
+ {
+ timer2_done = steady_clock::now();
+ p1.cancel();
+ });
+
+ ctx.run();
+
+ static_assert(
+ asio::is_async_operation<decltype(p1)>::value,
+ "promise is async_op");
+
+ ASIO_CHECK(timer2_done + milliseconds(1) > started_when);
+ ASIO_CHECK(completed_when > timer2_done);
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == error::operation_aborted);
+
+ timer1.expires_after(milliseconds(0));
+ auto p2 = timer1.async_wait(
+ asio::append(experimental::use_promise, 123));
+
+ ec = asio::error::would_block;
+ called = false;
+
+ p2([&](asio::error_code ec_, int i)
+ {
+ ASIO_CHECK(i == 123);
+ ec = ec_;
+ called = true;
+ });
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(!called);
+
+ ctx.restart();
+ ctx.run();
+
+ static_assert(
+ asio::is_async_operation<decltype(p2)>::value,
+ "promise is async_op");
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(called);
+}
+
+void promise_slot_tester()
+{
+ using namespace asio;
+ using namespace std::chrono;
+
+ io_context ctx;
+
+ steady_timer timer1{ctx}, timer2{ctx};
+
+ const auto started_when = steady_clock::now();
+ timer1.expires_at(started_when + milliseconds(2500));
+ timer2.expires_at(started_when + milliseconds(1000));
+ auto p = timer1.async_wait(experimental::use_promise);
+
+ steady_clock::time_point completed_when;
+ asio::error_code ec;
+ bool called = false;
+
+ asio::cancellation_signal sig;
+
+ p(asio::bind_cancellation_slot(
+ sig.slot(),
+ [&](asio::error_code ec_)
+ {
+ ec = ec_;
+ called = true;
+ completed_when = steady_clock::now();
+ }));
+
+ steady_clock::time_point timer2_done;
+ timer2.async_wait(
+ [&](asio::error_code)
+ {
+ timer2_done = steady_clock::now();
+ sig.emit(asio::cancellation_type::all);
+ });
+
+ ctx.run();
+
+ static_assert(
+ asio::is_async_operation<decltype(p)>::value,
+ "promise is async_op");
+
+ ASIO_CHECK(timer2_done + milliseconds(1) > started_when);
+ ASIO_CHECK(completed_when > timer2_done);
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == error::operation_aborted);
+}
+
+void early_completion()
+{
+ using namespace asio;
+ using namespace std::chrono;
+
+ io_context ctx;
+ auto p = asio::post(ctx, asio::experimental::use_promise);
+ ctx.run();
+
+ ASIO_CHECK(p.completed());
+
+ bool completed = false;
+ p([&]{completed = true;});
+ ASIO_CHECK(!completed);
+ ctx.restart();
+ ctx.run();
+ ASIO_CHECK(completed);
+}
+
+struct test_cancel_impl_op
+{
+ asio::steady_timer & tim;
+ asio::error_code &ec;
+ template<typename Self>
+ void operator()(Self& self)
+ {
+ tim.async_wait(std::forward<Self>(self));
+ }
+
+ template<typename Self>
+ void operator()(Self& self, asio::error_code ec_)
+ {
+ ec = ec_;
+ self.complete(ec_);
+ }
+};
+
+template <typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(asio::error_code))
+test_cancel_impl(asio::steady_timer & tim,
+ asio::error_code &ec,
+ CompletionToken&& token)
+{
+ return asio::async_compose<CompletionToken, void(asio::error_code)>(
+ test_cancel_impl_op{tim, ec}, token, tim);
+}
+
+void test_cancel()
+{
+ asio::io_context ctx;
+ asio::steady_timer tim{ctx, std::chrono::seconds(10)};
+ asio::error_code ec;
+
+ {
+ auto p = test_cancel_impl(
+ tim, ec, asio::experimental::use_promise);
+ }
+
+ ctx.run();
+
+ ASIO_CHECK_MESSAGE(
+ ec == asio::error::operation_aborted,
+ ec.message());
+}
+
+} // namespace promise
+
+ASIO_TEST_SUITE
+(
+ "promise",
+ ASIO_TEST_CASE(promise::promise_tester)
+ ASIO_TEST_CASE(promise::promise_slot_tester)
+ ASIO_TEST_CASE(promise::early_completion)
+ ASIO_TEST_CASE(promise::test_cancel)
+)
diff --git a/3rdparty/asio/src/tests/unit/file_base.cpp b/3rdparty/asio/src/tests/unit/file_base.cpp
new file mode 100644
index 00000000000..9f517fd8e37
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/file_base.cpp
@@ -0,0 +1,25 @@
+//
+// file_base.cpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/post.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "file_base",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/generic/.gitignore b/3rdparty/asio/src/tests/unit/generic/.gitignore
deleted file mode 100644
index c0571443308..00000000000
--- a/3rdparty/asio/src/tests/unit/generic/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-basic_endpoint
-datagram_protocol
-raw_protocol
-seq_packet_protocol
-stream_protocol
diff --git a/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp b/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp
index ef6d2b1b82f..c02f32b8c73 100644
--- a/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp
@@ -2,7 +2,7 @@
// generic/basic_endpoint.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp
index 32f636ba0c7..23957a7a15d 100644
--- a/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp
@@ -2,7 +2,7 @@
// generic/datagram_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,6 +20,7 @@
#include "asio/io_context.hpp"
#include "asio/ip/udp.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -65,6 +66,7 @@ void test()
socket_base::message_flags in_flags = 0;
socket_base::send_buffer_size socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_datagram_socket constructors.
@@ -78,33 +80,21 @@ void test()
dp::socket socket4(ioc, dp(af_inet, ipproto_udp), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
dp::socket socket5(std::move(socket4));
asio::ip::udp::socket udp_socket(ioc);
dp::socket socket6(std::move(udp_socket));
-#endif // defined(ASIO_HAS_MOVE)
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = dp::socket(ioc);
socket1 = std::move(socket2);
socket1 = asio::ip::udp::socket(ioc);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
dp::socket::executor_type ex = socket1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = socket1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// basic_socket functions.
dp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
@@ -151,6 +141,7 @@ void test()
socket1.connect(dp::endpoint(), ec);
socket1.async_connect(dp::endpoint(), connect_handler);
+ socket1.async_connect(dp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -162,10 +153,14 @@ void test()
socket1.io_control(io_control_command, ec);
dp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
dp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
dp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
dp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -188,6 +183,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.send_to(buffer(mutable_char_buffer),
dp::endpoint());
@@ -220,6 +221,18 @@ void test()
dp::endpoint(), in_flags, send_handler);
socket1.async_send_to(null_buffers(),
dp::endpoint(), in_flags, send_handler);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ dp::endpoint(), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ dp::endpoint(), immediate);
+ socket1.async_send_to(null_buffers(),
+ dp::endpoint(), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ dp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ dp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ dp::endpoint(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -233,6 +246,10 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
dp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -250,6 +267,14 @@ void test()
endpoint, in_flags, receive_handler);
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
}
catch (std::exception&)
{
@@ -263,5 +288,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/datagram_protocol",
- ASIO_TEST_CASE(generic_datagram_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_datagram_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp
index 92c0efa899f..d20ef5ba870 100644
--- a/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp
@@ -2,7 +2,7 @@
// generic/raw_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,6 +20,7 @@
#include "asio/io_context.hpp"
#include "asio/ip/icmp.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -65,6 +66,7 @@ void test()
socket_base::message_flags in_flags = 0;
socket_base::send_buffer_size socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_raw_socket constructors.
@@ -78,33 +80,21 @@ void test()
rp::socket socket4(ioc, rp(af_inet, ipproto_icmp), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
rp::socket socket5(std::move(socket4));
asio::ip::icmp::socket icmp_socket(ioc);
rp::socket socket6(std::move(icmp_socket));
-#endif // defined(ASIO_HAS_MOVE)
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = rp::socket(ioc);
socket1 = std::move(socket2);
socket1 = asio::ip::icmp::socket(ioc);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
rp::socket::executor_type ex = socket1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = socket1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// basic_socket functions.
rp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
@@ -151,6 +141,7 @@ void test()
socket1.connect(rp::endpoint(), ec);
socket1.async_connect(rp::endpoint(), connect_handler);
+ socket1.async_connect(rp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -162,10 +153,14 @@ void test()
socket1.io_control(io_control_command, ec);
rp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
rp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
rp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
rp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -188,6 +183,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.send_to(buffer(mutable_char_buffer),
rp::endpoint());
@@ -220,6 +221,18 @@ void test()
rp::endpoint(), in_flags, send_handler);
socket1.async_send_to(null_buffers(),
rp::endpoint(), in_flags, send_handler);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ rp::endpoint(), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ rp::endpoint(), immediate);
+ socket1.async_send_to(null_buffers(),
+ rp::endpoint(), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ rp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ rp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ rp::endpoint(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -233,6 +246,11 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
rp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -250,6 +268,14 @@ void test()
endpoint, in_flags, receive_handler);
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
}
catch (std::exception&)
{
@@ -263,5 +289,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/raw_protocol",
- ASIO_TEST_CASE(generic_raw_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_raw_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp
index e66012649b4..587445b1f05 100644
--- a/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp
@@ -2,7 +2,7 @@
// generic/seq_packet_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,6 +19,7 @@
#include <cstring>
#include "asio/io_context.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -64,6 +65,7 @@ void test()
socket_base::message_flags out_flags = 0;
socket_base::send_buffer_size socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_seq_packet_socket constructors.
@@ -77,30 +79,18 @@ void test()
spp::socket socket4(ioc, spp(af_inet, 0), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
spp::socket socket5(std::move(socket4));
-#endif // defined(ASIO_HAS_MOVE)
// basic_seq_packet_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = spp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
spp::socket::executor_type ex = socket1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = socket1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// basic_socket functions.
spp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
@@ -147,6 +137,7 @@ void test()
socket1.connect(spp::endpoint(), ec);
socket1.async_connect(spp::endpoint(), connect_handler);
+ socket1.async_connect(spp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -158,10 +149,14 @@ void test()
socket1.io_control(io_control_command, ec);
spp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
spp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
spp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
spp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -178,6 +173,9 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer), out_flags);
socket1.receive(null_buffers(), out_flags);
@@ -192,6 +190,11 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
out_flags, receive_handler);
socket1.async_receive(null_buffers(), in_flags, out_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), out_flags, immediate);
+ socket1.async_receive(null_buffers(), out_flags, immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ out_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, out_flags, immediate);
}
catch (std::exception&)
{
@@ -205,5 +208,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/seq_packet_protocol",
- ASIO_TEST_CASE(generic_seq_packet_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_seq_packet_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp
index 796206917c6..dedf6d76cee 100644
--- a/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp
@@ -2,7 +2,7 @@
// generic/stream_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,6 +20,7 @@
#include "asio/io_context.hpp"
#include "asio/ip/tcp.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -73,6 +74,7 @@ void test()
socket_base::message_flags in_flags = 0;
socket_base::keep_alive socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_stream_socket constructors.
@@ -88,33 +90,21 @@ void test()
#endif // defined(ASIO_WINDOWS_RUNTIME)
sp::socket socket4(ioc, sp(af_inet, ipproto_tcp), native_socket1);
-#if defined(ASIO_HAS_MOVE)
sp::socket socket5(std::move(socket4));
asio::ip::tcp::socket tcp_socket(ioc);
sp::socket socket6(std::move(tcp_socket));
-#endif // defined(ASIO_HAS_MOVE)
// basic_stream_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = sp::socket(ioc);
socket1 = std::move(socket2);
socket1 = asio::ip::tcp::socket(ioc);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
sp::socket::executor_type ex = socket1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = socket1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// basic_socket functions.
sp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
@@ -167,6 +157,7 @@ void test()
socket1.connect(sp::endpoint(), ec);
socket1.async_connect(sp::endpoint(), connect_handler);
+ socket1.async_connect(sp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -178,10 +169,14 @@ void test()
socket1.io_control(io_control_command, ec);
sp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
sp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
sp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
sp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -204,6 +199,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -217,6 +218,11 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
socket1.write_some(buffer(mutable_char_buffer));
socket1.write_some(buffer(const_char_buffer));
@@ -228,6 +234,9 @@ void test()
socket1.async_write_some(buffer(mutable_char_buffer), write_some_handler);
socket1.async_write_some(buffer(const_char_buffer), write_some_handler);
socket1.async_write_some(null_buffers(), write_some_handler);
+ socket1.async_write_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_write_some(buffer(const_char_buffer), immediate);
+ socket1.async_write_some(null_buffers(), immediate);
socket1.read_some(buffer(mutable_char_buffer));
socket1.read_some(buffer(mutable_char_buffer), ec);
@@ -235,6 +244,8 @@ void test()
socket1.async_read_some(buffer(mutable_char_buffer), read_some_handler);
socket1.async_read_some(null_buffers(), read_some_handler);
+ socket1.async_read_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_read_some(null_buffers(), immediate);
}
catch (std::exception&)
{
@@ -248,5 +259,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/stream_protocol",
- ASIO_TEST_CASE(generic_stream_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_stream_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp b/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp
index 894bd746474..b8dd448c321 100644
--- a/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp
@@ -2,7 +2,7 @@
// high_resolution_timer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/io_context.cpp b/3rdparty/asio/src/tests/unit/io_context.cpp
index 530d1390e02..4341fb62e1e 100644
--- a/3rdparty/asio/src/tests/unit/io_context.cpp
+++ b/3rdparty/asio/src/tests/unit/io_context.cpp
@@ -2,7 +2,7 @@
// io_context.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,7 @@
// Test that header file is self-contained.
#include "asio/io_context.hpp"
+#include <functional>
#include <sstream>
#include "asio/bind_executor.hpp"
#include "asio/dispatch.hpp"
@@ -29,24 +30,13 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
@@ -354,9 +344,223 @@ void io_context_service_test()
ASIO_CHECK(!asio::has_service<test_service>(ioc3));
}
+void io_context_executor_query_test()
+{
+ io_context ioc;
+
+ ASIO_CHECK(
+ &asio::query(ioc.get_executor(),
+ asio::execution::context)
+ == &ioc);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::mapping)
+ == asio::execution::mapping.thread);
+
+ ASIO_CHECK(
+ asio::query(ioc.get_executor(),
+ asio::execution::allocator)
+ == std::allocator<void>());
+}
+
+void io_context_executor_execute_test()
+{
+ io_context ioc;
+ int count = 0;
+
+ ioc.get_executor().execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.possibly
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ ASIO_CHECK(!ioc.stopped());
+
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::prefer(
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::prefer(
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+}
+
ASIO_TEST_SUITE
(
"io_context",
ASIO_TEST_CASE(io_context_test)
ASIO_TEST_CASE(io_context_service_test)
+ ASIO_TEST_CASE(io_context_executor_query_test)
+ ASIO_TEST_CASE(io_context_executor_execute_test)
)
diff --git a/3rdparty/asio/src/tests/unit/io_context_strand.cpp b/3rdparty/asio/src/tests/unit/io_context_strand.cpp
new file mode 100644
index 00000000000..be03eb40dd2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/io_context_strand.cpp
@@ -0,0 +1,316 @@
+//
+// io_context_strand.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/io_context_strand.hpp"
+
+#include <functional>
+#include <sstream>
+#include "asio/io_context.hpp"
+#include "asio/dispatch.hpp"
+#include "asio/post.hpp"
+#include "asio/thread.hpp"
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+
+namespace bindns = std;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef deadline_timer timer;
+namespace chronons = boost::posix_time;
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef steady_timer timer;
+namespace chronons = asio::chrono;
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void increment_without_lock(io_context::strand* s, int* count)
+{
+ ASIO_CHECK(!s->running_in_this_thread());
+
+ int original_count = *count;
+
+ dispatch(*s, bindns::bind(increment, count));
+
+ // No other functions are currently executing through the locking dispatcher,
+ // so the previous call to dispatch should have successfully nested.
+ ASIO_CHECK(*count == original_count + 1);
+}
+
+void increment_with_lock(io_context::strand* s, int* count)
+{
+ ASIO_CHECK(s->running_in_this_thread());
+
+ int original_count = *count;
+
+ dispatch(*s, bindns::bind(increment, count));
+
+ // The current function already holds the strand's lock, so the
+ // previous call to dispatch should have successfully nested.
+ ASIO_CHECK(*count == original_count + 1);
+}
+
+void sleep_increment(io_context* ioc, int* count)
+{
+ timer t(*ioc, chronons::seconds(2));
+ t.wait();
+
+ ++(*count);
+}
+
+void increment_by_a(int* count, int a)
+{
+ (*count) += a;
+}
+
+void increment_by_a_b(int* count, int a, int b)
+{
+ (*count) += a + b;
+}
+
+void increment_by_a_b_c(int* count, int a, int b, int c)
+{
+ (*count) += a + b + c;
+}
+
+void increment_by_a_b_c_d(int* count, int a, int b, int c, int d)
+{
+ (*count) += a + b + c + d;
+}
+
+void start_sleep_increments(io_context* ioc, io_context::strand* s, int* count)
+{
+ // Give all threads a chance to start.
+ timer t(*ioc, chronons::seconds(2));
+ t.wait();
+
+ // Start three increments.
+ post(*s, bindns::bind(sleep_increment, ioc, count));
+ post(*s, bindns::bind(sleep_increment, ioc, count));
+ post(*s, bindns::bind(sleep_increment, ioc, count));
+}
+
+void throw_exception()
+{
+ throw 1;
+}
+
+void io_context_run(io_context* ioc)
+{
+ ioc->run();
+}
+
+void strand_test()
+{
+ io_context ioc;
+ io_context::strand s(ioc);
+ int count = 0;
+
+ post(ioc, bindns::bind(increment_without_lock, &s, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ post(s, bindns::bind(increment_with_lock, &s, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ post(ioc, bindns::bind(start_sleep_increments, &ioc, &s, &count));
+ thread thread1(bindns::bind(io_context_run, &ioc));
+ thread thread2(bindns::bind(io_context_run, &ioc));
+
+ // Check all events run one after another even though there are two threads.
+ timer timer1(ioc, chronons::seconds(3));
+ timer1.wait();
+ ASIO_CHECK(count == 0);
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+ timer1.expires_at(timer1.expires_at() + chronons::seconds(2));
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ timer1.expires_at(timer1.expiry() + chronons::seconds(2));
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ timer1.wait();
+ ASIO_CHECK(count == 1);
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+ timer1.expires_at(timer1.expires_at() + chronons::seconds(2));
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+ timer1.expires_at(timer1.expiry() + chronons::seconds(2));
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+ timer1.wait();
+ ASIO_CHECK(count == 2);
+
+ thread1.join();
+ thread2.join();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 3);
+
+ count = 0;
+ int exception_count = 0;
+ ioc.restart();
+ post(s, throw_exception);
+ post(s, bindns::bind(increment, &count));
+ post(s, bindns::bind(increment, &count));
+ post(s, throw_exception);
+ post(s, bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(exception_count == 0);
+
+ for (;;)
+ {
+ try
+ {
+ ioc.run();
+ break;
+ }
+ catch (int)
+ {
+ ++exception_count;
+ }
+ }
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 3);
+ ASIO_CHECK(exception_count == 2);
+
+ count = 0;
+ ioc.restart();
+
+ // Check for clean shutdown when handlers posted through an orphaned strand
+ // are abandoned.
+ {
+ io_context::strand s2(ioc);
+ post(s2, bindns::bind(increment, &count));
+ post(s2, bindns::bind(increment, &count));
+ post(s2, bindns::bind(increment, &count));
+ }
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+}
+
+void strand_wrap_test()
+{
+#if !defined(ASIO_NO_DEPRECATED)
+ io_context ioc;
+ io_context::strand s(ioc);
+ int count = 0;
+
+ s.wrap(bindns::bind(increment, &count))();
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.restart();
+ ioc.run();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ s.wrap(increment)(&count);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.restart();
+ ioc.run();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ s.wrap(increment_by_a)(&count, 1);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.restart();
+ ioc.run();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ s.wrap(increment_by_a_b)(&count, 1, 2);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.restart();
+ ioc.run();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 3);
+
+ count = 0;
+ s.wrap(increment_by_a_b_c)(&count, 1, 2, 3);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.restart();
+ ioc.run();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 6);
+
+ count = 0;
+ s.wrap(increment_by_a_b_c_d)(&count, 1, 2, 3, 4);
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(count == 0);
+
+ ioc.restart();
+ ioc.run();
+
+ // The run() calls will not return until all work has finished.
+ ASIO_CHECK(count == 10);
+#endif // !defined(ASIO_NO_DEPRECATED)
+}
+
+ASIO_TEST_SUITE
+(
+ "strand",
+ ASIO_TEST_CASE(strand_test)
+ ASIO_TEST_CASE(strand_wrap_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ip/.gitignore b/3rdparty/asio/src/tests/unit/ip/.gitignore
deleted file mode 100644
index 087ad80f192..00000000000
--- a/3rdparty/asio/src/tests/unit/ip/.gitignore
+++ /dev/null
@@ -1,28 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-address
-address_v4*
-address_v6*
-basic_endpoint
-basic_resolver
-basic_resolver_entry
-basic_resolver_iterator
-basic_resolver_query
-host_name
-icmp
-multicast
-network_v4
-network_v6
-resolver_query_base
-resolver_service
-tcp
-udp
-unicast
-v6_only
diff --git a/3rdparty/asio/src/tests/unit/ip/address.cpp b/3rdparty/asio/src/tests/unit/ip/address.cpp
index e0b61d92b8d..a13a343c8e9 100644
--- a/3rdparty/asio/src/tests/unit/ip/address.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address.cpp
@@ -2,7 +2,7 @@
// address.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -108,15 +108,15 @@ void test()
addr1 = ip::make_address("127.0.0.1", ec);
addr1 = ip::make_address(string_value);
addr1 = ip::make_address(string_value, ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW)
-# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
- std::experimental::string_view string_view_value("127.0.0.1");
-# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
+# if defined(ASIO_HAS_STD_STRING_VIEW)
std::string_view string_view_value("127.0.0.1");
+# elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ std::experimental::string_view string_view_value("127.0.0.1");
# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
addr1 = ip::make_address(string_view_value);
addr1 = ip::make_address(string_view_value, ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// address I/O.
@@ -127,6 +127,9 @@ void test()
std::wostringstream wos;
wos << addr1;
#endif // !defined(BOOST_NO_STD_WSTREAMBUF)
+
+ std::size_t hash1 = std::hash<ip::address>()(addr1);
+ (void)hash1;
}
catch (std::exception&)
{
@@ -140,5 +143,5 @@ void test()
ASIO_TEST_SUITE
(
"ip/address",
- ASIO_TEST_CASE(ip_address_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_address_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v4.cpp b/3rdparty/asio/src/tests/unit/ip/address_v4.cpp
index e65f12b06a1..6fb361b9544 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v4.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v4.cpp
@@ -2,7 +2,7 @@
// address_v4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -132,15 +132,15 @@ void test()
addr1 = ip::make_address_v4("127.0.0.1", ec);
addr1 = ip::make_address_v4(string_value);
addr1 = ip::make_address_v4(string_value, ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW)
-# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
- std::experimental::string_view string_view_value("127.0.0.1");
-# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
+# if defined(ASIO_HAS_STD_STRING_VIEW)
std::string_view string_view_value("127.0.0.1");
+# elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ std::experimental::string_view string_view_value("127.0.0.1");
# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
addr1 = ip::make_address_v4(string_view_value);
addr1 = ip::make_address_v4(string_view_value, ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// address_v4 I/O.
@@ -151,6 +151,11 @@ void test()
std::wostringstream wos;
wos << addr1;
#endif // !defined(BOOST_NO_STD_WSTREAMBUF)
+
+#if defined(ASIO_HAS_STD_HASH)
+ std::size_t hash1 = std::hash<ip::address_v4>()(addr1);
+ (void)hash1;
+#endif // defined(ASIO_HAS_STD_HASH)
}
catch (std::exception&)
{
@@ -319,6 +324,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/address_v4",
- ASIO_TEST_CASE(ip_address_v4_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_address_v4_compile::test)
ASIO_TEST_CASE(ip_address_v4_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp b/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp
index f8917220d12..8b651b52582 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp
@@ -2,7 +2,7 @@
// address_v4_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp b/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp
index 0eb652d0699..1b36744cb53 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp
@@ -2,7 +2,7 @@
// address_v4_range.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v6.cpp b/3rdparty/asio/src/tests/unit/ip/address_v6.cpp
index b73f65c1b2e..026c5fa4f9a 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v6.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v6.cpp
@@ -2,7 +2,7 @@
// address_v6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -144,15 +144,15 @@ void test()
addr1 = ip::make_address_v6("0::0", ec);
addr1 = ip::make_address_v6(string_value);
addr1 = ip::make_address_v6(string_value, ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW)
-# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
- std::experimental::string_view string_view_value("0::0");
-# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
+# if defined(ASIO_HAS_STD_STRING_VIEW)
std::string_view string_view_value("0::0");
+# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ std::experimental::string_view string_view_value("0::0");
# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
addr1 = ip::make_address_v6(string_view_value);
addr1 = ip::make_address_v6(string_view_value, ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// address_v6 IPv4-mapped conversion.
#if defined(ASIO_NO_DEPRECATED)
@@ -170,6 +170,11 @@ void test()
std::wostringstream wos;
wos << addr1;
#endif // !defined(BOOST_NO_STD_WSTREAMBUF)
+
+#if defined(ASIO_HAS_STD_HASH)
+ std::size_t hash1 = std::hash<ip::address_v6>()(addr1);
+ (void)hash1;
+#endif // defined(ASIO_HAS_STD_HASH)
}
catch (std::exception&)
{
@@ -404,6 +409,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/address_v6",
- ASIO_TEST_CASE(ip_address_v6_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_address_v6_compile::test)
ASIO_TEST_CASE(ip_address_v6_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp b/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp
index 16b040c7142..ef62dc645c2 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp
@@ -2,7 +2,7 @@
// address_v6_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp b/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp
index 76169234620..b0477214d7e 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp
@@ -2,7 +2,7 @@
// address_v6_range.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp b/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp
index e363ef55661..d4aadb6febc 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp
@@ -2,7 +2,7 @@
// basic_endpoint.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp
index afe06f5e178..698a2bad25f 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp
@@ -2,7 +2,7 @@
// basic_resolver.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp
index 2bebc825610..7de5b6fc2c0 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp
@@ -2,7 +2,7 @@
// basic_resolver_entry.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
index 9745e9eae00..df7a54a79af 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
@@ -2,7 +2,7 @@
// basic_resolver_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp
index 5fc5be4b150..6d10e449482 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp
@@ -2,7 +2,7 @@
// basic_resolver_query.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/host_name.cpp b/3rdparty/asio/src/tests/unit/ip/host_name.cpp
index 64dad204cdf..6972cbf6f4a 100644
--- a/3rdparty/asio/src/tests/unit/ip/host_name.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/host_name.cpp
@@ -2,7 +2,7 @@
// host_name.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -51,5 +51,5 @@ void test()
ASIO_TEST_SUITE
(
"ip/host_name",
- ASIO_TEST_CASE(ip_host_name_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_host_name_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/icmp.cpp b/3rdparty/asio/src/tests/unit/ip/icmp.cpp
index 4a4f5e843f3..ec60267b30f 100644
--- a/3rdparty/asio/src/tests/unit/ip/icmp.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/icmp.cpp
@@ -2,7 +2,7 @@
// icmp.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,7 +21,6 @@
#include "asio/placeholders.hpp"
#include "../unit_test.hpp"
#include "../archetypes/async_result.hpp"
-#include "../archetypes/deprecated_async_result.hpp"
#include "../archetypes/gettable_socket_option.hpp"
#include "../archetypes/io_control_command.hpp"
#include "../archetypes/settable_socket_option.hpp"
@@ -39,33 +38,27 @@ struct connect_handler
{
connect_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
connect_handler(connect_handler&&) {}
private:
connect_handler(const connect_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct send_handler
{
send_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
send_handler(send_handler&&) {}
private:
send_handler(const send_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct receive_handler
{
receive_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
receive_handler(receive_handler&&) {}
private:
receive_handler(const receive_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -76,6 +69,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
socket_base::message_flags in_flags = 0;
@@ -86,10 +80,8 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
// basic_datagram_socket constructors.
@@ -105,24 +97,26 @@ void test()
ip::icmp::socket socket6(ioc, ip::icmp::v4(), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
- ip::icmp::socket socket7(std::move(socket6));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::icmp::socket socket7(ioc_ex);
+ ip::icmp::socket socket8(ioc_ex, ip::icmp::v4());
+ ip::icmp::socket socket9(ioc_ex, ip::icmp::v6());
+ ip::icmp::socket socket10(ioc_ex, ip::icmp::endpoint(ip::icmp::v4(), 0));
+ ip::icmp::socket socket11(ioc_ex, ip::icmp::endpoint(ip::icmp::v6(), 0));
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ ip::icmp::socket::native_handle_type native_socket2
+ = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ ip::icmp::socket socket12(ioc_ex, ip::icmp::v4(), native_socket2);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ ip::icmp::socket socket13(std::move(socket6));
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = ip::icmp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::icmp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -131,9 +125,9 @@ void test()
ip::icmp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
(void)lowest_layer;
- const ip::icmp::socket& socket8 = socket1;
+ const ip::icmp::socket& socket14 = socket1;
const ip::icmp::socket::lowest_layer_type& lowest_layer2
- = socket8.lowest_layer();
+ = socket14.lowest_layer();
(void)lowest_layer2;
socket1.open(ip::icmp::v4());
@@ -142,12 +136,12 @@ void test()
socket1.open(ip::icmp::v6(), ec);
#if !defined(ASIO_WINDOWS_RUNTIME)
- ip::icmp::socket::native_handle_type native_socket2
- = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- socket1.assign(ip::icmp::v4(), native_socket2);
ip::icmp::socket::native_handle_type native_socket3
= ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- socket1.assign(ip::icmp::v4(), native_socket3, ec);
+ socket1.assign(ip::icmp::v4(), native_socket3);
+ ip::icmp::socket::native_handle_type native_socket4
+ = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ socket1.assign(ip::icmp::v4(), native_socket4, ec);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
bool is_open = socket1.is_open();
@@ -156,9 +150,12 @@ void test()
socket1.close();
socket1.close(ec);
- ip::icmp::socket::native_handle_type native_socket4
+ socket1.release();
+ socket1.release(ec);
+
+ ip::icmp::socket::native_handle_type native_socket5
= socket1.native_handle();
- (void)native_socket4;
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -187,18 +184,12 @@ void test()
connect_handler());
socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0),
connect_handler());
+ socket1.async_connect(ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
int i1 = socket1.async_connect(ip::icmp::endpoint(ip::icmp::v4(), 0), lazy);
(void)i1;
int i2 = socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0), lazy);
(void)i2;
-#if !defined(ASIO_NO_DEPRECATED)
- double d1 = socket1.async_connect(
- ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
- (void)d1;
- double d2 = socket1.async_connect(
- ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
- (void)d2;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.set_option(settable_socket_option1);
socket1.set_option(settable_socket_option1, ec);
@@ -228,10 +219,14 @@ void test()
socket1.native_non_blocking(false, ec);
ip::icmp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
ip::icmp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
ip::icmp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
ip::icmp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -254,6 +249,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler());
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler());
socket1.async_send(null_buffers(), in_flags, send_handler());
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
int i3 = socket1.async_send(buffer(mutable_char_buffer), lazy);
(void)i3;
int i4 = socket1.async_send(buffer(const_char_buffer), lazy);
@@ -266,21 +267,6 @@ void test()
(void)i7;
int i8 = socket1.async_send(null_buffers(), in_flags, lazy);
(void)i8;
-#if !defined(ASIO_NO_DEPRECATED)
- double d3 = socket1.async_send(buffer(mutable_char_buffer), dlazy);
- (void)d3;
- double d4 = socket1.async_send(buffer(const_char_buffer), dlazy);
- (void)d4;
- double d5 = socket1.async_send(null_buffers(), dlazy);
- (void)d5;
- double d6 = socket1.async_send(
- buffer(mutable_char_buffer), in_flags, dlazy);
- (void)d6;
- double d7 = socket1.async_send(buffer(const_char_buffer), in_flags, dlazy);
- (void)d7;
- double d8 = socket1.async_send(null_buffers(), in_flags, dlazy);
- (void)d8;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.send_to(buffer(mutable_char_buffer),
ip::icmp::endpoint(ip::icmp::v4(), 0));
@@ -343,6 +329,30 @@ void test()
ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, send_handler());
socket1.async_send_to(null_buffers(),
ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, send_handler());
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, immediate);
int i9 = socket1.async_send_to(buffer(mutable_char_buffer),
ip::icmp::endpoint(ip::icmp::v4(), 0), lazy);
(void)i9;
@@ -379,44 +389,6 @@ void test()
int i20 = socket1.async_send_to(null_buffers(),
ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, lazy);
(void)i20;
-#if !defined(ASIO_NO_DEPRECATED)
- double d9 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
- (void)d9;
- double d10 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
- (void)d10;
- double d11 = socket1.async_send_to(buffer(const_char_buffer),
- ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
- (void)d11;
- double d12 = socket1.async_send_to(buffer(const_char_buffer),
- ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
- (void)d12;
- double d13 = socket1.async_send_to(null_buffers(),
- ip::icmp::endpoint(ip::icmp::v4(), 0), dlazy);
- (void)d13;
- double d14 = socket1.async_send_to(null_buffers(),
- ip::icmp::endpoint(ip::icmp::v6(), 0), dlazy);
- (void)d14;
- double d15 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, dlazy);
- (void)d15;
- double d16 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, dlazy);
- (void)d16;
- double d17 = socket1.async_send_to(buffer(const_char_buffer),
- ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, dlazy);
- (void)d17;
- double d18 = socket1.async_send_to(buffer(const_char_buffer),
- ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, dlazy);
- (void)d18;
- double d19 = socket1.async_send_to(null_buffers(),
- ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, dlazy);
- (void)d19;
- double d20 = socket1.async_send_to(null_buffers(),
- ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, dlazy);
- (void)d20;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -430,6 +402,10 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler());
socket1.async_receive(null_buffers(), in_flags, receive_handler());
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
int i21 = socket1.async_receive(buffer(mutable_char_buffer), lazy);
(void)i21;
int i22 = socket1.async_receive(null_buffers(), lazy);
@@ -439,17 +415,6 @@ void test()
(void)i23;
int i24 = socket1.async_receive(null_buffers(), in_flags, lazy);
(void)i24;
-#if !defined(ASIO_NO_DEPRECATED)
- double d21 = socket1.async_receive(buffer(mutable_char_buffer), dlazy);
- (void)d21;
- double d22 = socket1.async_receive(null_buffers(), dlazy);
- (void)d22;
- double d23 = socket1.async_receive(buffer(mutable_char_buffer),
- in_flags, dlazy);
- (void)d23;
- double d24 = socket1.async_receive(null_buffers(), in_flags, dlazy);
- (void)d24;
-#endif // !defined(ASIO_NO_DEPRECATED)
ip::icmp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -467,6 +432,14 @@ void test()
endpoint, in_flags, receive_handler());
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler());
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
int i25 = socket1.async_receive_from(buffer(mutable_char_buffer),
endpoint, lazy);
(void)i25;
@@ -479,20 +452,6 @@ void test()
int i28 = socket1.async_receive_from(null_buffers(),
endpoint, in_flags, lazy);
(void)i28;
-#if !defined(ASIO_NO_DEPRECATED)
- double d25 = socket1.async_receive_from(buffer(mutable_char_buffer),
- endpoint, dlazy);
- (void)d25;
- double d26 = socket1.async_receive_from(null_buffers(),
- endpoint, dlazy);
- (void)d26;
- double d27 = socket1.async_receive_from(buffer(mutable_char_buffer),
- endpoint, in_flags, dlazy);
- (void)d27;
- double d28 = socket1.async_receive_from(null_buffers(),
- endpoint, in_flags, dlazy);
- (void)d28;
-#endif // !defined(ASIO_NO_DEPRECATED)
}
catch (std::exception&)
{
@@ -515,11 +474,9 @@ struct resolve_handler
resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::icmp::resolver::results_type) {}
-#if defined(ASIO_HAS_MOVE)
resolve_handler(resolve_handler&&) {}
private:
resolve_handler(const resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -530,10 +487,8 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
#if !defined(ASIO_NO_DEPRECATED)
ip::icmp::resolver::query q(ip::icmp::v4(), "localhost", "0");
@@ -543,25 +498,17 @@ void test()
// basic_resolver constructors.
ip::icmp::resolver resolver(ioc);
+ ip::icmp::resolver resolver2(ioc_ex);
-#if defined(ASIO_HAS_MOVE)
- ip::icmp::resolver resolver2(std::move(resolver));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::icmp::resolver resolver3(std::move(resolver));
// basic_resolver operators.
-#if defined(ASIO_HAS_MOVE)
resolver = ip::icmp::resolver(ioc);
- resolver = std::move(resolver2);
-#endif // defined(ASIO_HAS_MOVE)
+ resolver = std::move(resolver3);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = resolver.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::icmp::resolver::executor_type ex = resolver.get_executor();
(void)ex;
@@ -617,55 +564,30 @@ void test()
resolver.async_resolve(q, resolve_handler());
int i1 = resolver.async_resolve(q, lazy);
(void)i1;
- double d1 = resolver.async_resolve(q, dlazy);
- (void)d1;
#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve("", "", resolve_handler());
int i2 = resolver.async_resolve("", "", lazy);
(void)i2;
-#if !defined(ASIO_NO_DEPRECATED)
- double d2 = resolver.async_resolve("", "", dlazy);
- (void)d2;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve("", "",
ip::icmp::resolver::flags(), resolve_handler());
int i3 = resolver.async_resolve("", "",
ip::icmp::resolver::flags(), lazy);
(void)i3;
-#if !defined(ASIO_NO_DEPRECATED)
- double d3 = resolver.async_resolve("", "",
- ip::icmp::resolver::flags(), dlazy);
- (void)d3;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
resolver.async_resolve(ip::icmp::v4(), "", "", resolve_handler());
int i4 = resolver.async_resolve(ip::icmp::v4(), "", "", lazy);
(void)i4;
-#if !defined(ASIO_NO_DEPRECATED)
- double d4 = resolver.async_resolve(ip::icmp::v4(), "", "", dlazy);
- (void)d4;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(ip::icmp::v4(),
"", "", ip::icmp::resolver::flags(), resolve_handler());
int i5 = resolver.async_resolve(ip::icmp::v4(),
"", "", ip::icmp::resolver::flags(), lazy);
(void)i5;
-#if !defined(ASIO_NO_DEPRECATED)
- double d5 = resolver.async_resolve(ip::icmp::v4(),
- "", "", ip::icmp::resolver::flags(), dlazy);
- (void)d5;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(e, resolve_handler());
int i6 = resolver.async_resolve(e, lazy);
(void)i6;
-#if !defined(ASIO_NO_DEPRECATED)
- double d6 = resolver.async_resolve(e, dlazy);
- (void)d6;
-#endif // !defined(ASIO_NO_DEPRECATED)
}
catch (std::exception&)
{
@@ -679,6 +601,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/icmp",
- ASIO_TEST_CASE(ip_icmp_socket_compile::test)
- ASIO_TEST_CASE(ip_icmp_resolver_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_icmp_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_icmp_resolver_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/multicast.cpp b/3rdparty/asio/src/tests/unit/ip/multicast.cpp
index a3cff0b778b..4f0b3f45e14 100644
--- a/3rdparty/asio/src/tests/unit/ip/multicast.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/multicast.cpp
@@ -2,7 +2,7 @@
// multicast.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -358,6 +358,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/multicast",
- ASIO_TEST_CASE(ip_multicast_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_multicast_compile::test)
ASIO_TEST_CASE(ip_multicast_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/network_v4.cpp b/3rdparty/asio/src/tests/unit/ip/network_v4.cpp
index 7d07ffd6928..0b7a7a9c783 100644
--- a/3rdparty/asio/src/tests/unit/ip/network_v4.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/network_v4.cpp
@@ -2,7 +2,7 @@
// network_v4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -95,15 +95,15 @@ void test()
net1 = ip::make_network_v4("10.0.0.0/8", ec);
net1 = ip::make_network_v4(s1);
net1 = ip::make_network_v4(s1, ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW)
-# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
- std::experimental::string_view string_view_value("10.0.0.0/8");
-# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
+# if defined(ASIO_HAS_STD_STRING_VIEW)
std::string_view string_view_value("10.0.0.0/8");
+# elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ std::experimental::string_view string_view_value("10.0.0.0/8");
# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
net1 = ip::make_network_v4(string_view_value);
net1 = ip::make_network_v4(string_view_value, ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_HAS_STRING_VIEW)
// network_v4 I/O.
@@ -220,6 +220,19 @@ void test()
ASIO_CHECK(make_network_v4("192.168.77.100/24").network() == make_address_v4("192.168.77.0"));
ASIO_CHECK(make_network_v4("192.168.77.128/25").network() == make_address_v4("192.168.77.128"));
+ // construct network from invalid string
+ asio::error_code ec;
+ make_network_v4("10.0.0.256/24", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v4("10.0.0.0/33", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v4("10.0.0.0/-1", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v4("10.0.0.0/", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v4("10.0.0.0", ec);
+ ASIO_CHECK(!!ec);
+
// prefix length
ASIO_CHECK(make_network_v4("193.99.144.80/24").prefix_length() == 24);
ASIO_CHECK(network_v4(make_address_v4("193.99.144.80"), 24).prefix_length() == 24);
@@ -296,6 +309,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/network_v4",
- ASIO_TEST_CASE(ip_network_v4_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_network_v4_compile::test)
ASIO_TEST_CASE(ip_network_v4_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/network_v6.cpp b/3rdparty/asio/src/tests/unit/ip/network_v6.cpp
index c7e458f08f1..d80b1d447b6 100644
--- a/3rdparty/asio/src/tests/unit/ip/network_v6.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/network_v6.cpp
@@ -2,7 +2,7 @@
// network_v6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -87,15 +87,15 @@ void test()
net1 = ip::make_network_v6("10.0.0.0/8", ec);
net1 = ip::make_network_v6(s1);
net1 = ip::make_network_v6(s1, ec);
-#if defined(ASIO_HAS_STD_STRING_VIEW)
-# if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
- std::experimental::string_view string_view_value("0::0/8");
-# else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+#if defined(ASIO_HAS_STRING_VIEW)
+# if defined(ASIO_HAS_STD_STRING_VIEW)
std::string_view string_view_value("0::0/8");
+# elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ std::experimental::string_view string_view_value("0::0/8");
# endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
net1 = ip::make_network_v6(string_view_value);
net1 = ip::make_network_v6(string_view_value, ec);
-#endif // defined(ASIO_HAS_STD_STRING_VIEW)
+#endif // defined(ASIO_STD_STRING_VIEW)
// network_v6 I/O.
@@ -153,6 +153,19 @@ void test()
ASIO_CHECK(make_network_v6("2001:370::10:7344/64").network() == make_address_v6("2001:370::"));
ASIO_CHECK(make_network_v6("2001:370::10:7344/27").network() == make_address_v6("2001:360::"));
+ // construct network from invalid string
+ asio::error_code ec;
+ make_network_v6("a:b/24", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v6("2001:370::10:7344/129", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v6("2001:370::10:7344/-1", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v6("2001:370::10:7344/", ec);
+ ASIO_CHECK(!!ec);
+ make_network_v6("2001:370::10:7344", ec);
+ ASIO_CHECK(!!ec);
+
// prefix length
ASIO_CHECK(make_network_v6("2001:370::10:7344/128").prefix_length() == 128);
ASIO_CHECK(network_v6(make_address_v6("2001:370::10:7344"), 27).prefix_length() == 27);
@@ -220,6 +233,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/network_v6",
- ASIO_TEST_CASE(ip_network_v6_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_network_v6_compile::test)
ASIO_TEST_CASE(ip_network_v6_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp b/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp
index d9bbd325583..b38f5091b53 100644
--- a/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp
@@ -2,7 +2,7 @@
// resolver_query_base.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/tcp.cpp b/3rdparty/asio/src/tests/unit/ip/tcp.cpp
index 22cee2aa042..2bbdc3a1071 100644
--- a/3rdparty/asio/src/tests/unit/ip/tcp.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/tcp.cpp
@@ -2,7 +2,7 @@
// tcp.cpp
// ~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -20,12 +20,12 @@
#include "asio/ip/tcp.hpp"
#include <cstring>
+#include <functional>
#include "asio/io_context.hpp"
#include "asio/read.hpp"
#include "asio/write.hpp"
#include "../unit_test.hpp"
#include "../archetypes/async_result.hpp"
-#include "../archetypes/deprecated_async_result.hpp"
#include "../archetypes/gettable_socket_option.hpp"
#include "../archetypes/io_control_command.hpp"
#include "../archetypes/settable_socket_option.hpp"
@@ -36,12 +36,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
//------------------------------------------------------------------------------
// ip_tcp_compile test
@@ -71,6 +65,9 @@ void test()
(void)static_cast<bool>(no_delay1);
(void)static_cast<bool>(!no_delay1);
(void)static_cast<bool>(no_delay1.value());
+
+ ip::tcp::endpoint ep;
+ (void)static_cast<std::size_t>(std::hash<ip::tcp::endpoint>()(ep));
}
catch (std::exception&)
{
@@ -142,66 +139,54 @@ struct connect_handler
{
connect_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
connect_handler(connect_handler&&) {}
private:
connect_handler(const connect_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct wait_handler
{
wait_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
wait_handler(wait_handler&&) {}
private:
wait_handler(const wait_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct send_handler
{
send_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
send_handler(send_handler&&) {}
private:
send_handler(const send_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct receive_handler
{
receive_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
receive_handler(receive_handler&&) {}
private:
receive_handler(const receive_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct write_some_handler
{
write_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
write_some_handler(write_some_handler&&) {}
private:
write_some_handler(const write_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct read_some_handler
{
read_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
read_some_handler(read_some_handler&&) {}
private:
read_some_handler(const read_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -218,6 +203,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
array<asio::mutable_buffer, 2> mutable_buffers = {{
@@ -234,10 +220,8 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
// basic_stream_socket constructors.
@@ -253,24 +237,26 @@ void test()
ip::tcp::socket socket6(ioc, ip::tcp::v4(), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
- ip::tcp::socket socket7(std::move(socket5));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::tcp::socket socket7(ioc_ex);
+ ip::tcp::socket socket8(ioc_ex, ip::tcp::v4());
+ ip::tcp::socket socket9(ioc_ex, ip::tcp::v6());
+ ip::tcp::socket socket10(ioc_ex, ip::tcp::endpoint(ip::tcp::v4(), 0));
+ ip::tcp::socket socket11(ioc_ex, ip::tcp::endpoint(ip::tcp::v6(), 0));
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ ip::tcp::socket::native_handle_type native_socket2
+ = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ ip::tcp::socket socket12(ioc_ex, ip::tcp::v4(), native_socket2);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ ip::tcp::socket socket13(std::move(socket5));
// basic_stream_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = ip::tcp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::tcp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -279,9 +265,9 @@ void test()
ip::tcp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
(void)lowest_layer;
- const ip::tcp::socket& socket8 = socket1;
+ const ip::tcp::socket& socket14 = socket1;
const ip::tcp::socket::lowest_layer_type& lowest_layer2
- = socket8.lowest_layer();
+ = socket14.lowest_layer();
(void)lowest_layer2;
socket1.open(ip::tcp::v4());
@@ -290,12 +276,12 @@ void test()
socket1.open(ip::tcp::v6(), ec);
#if !defined(ASIO_WINDOWS_RUNTIME)
- ip::tcp::socket::native_handle_type native_socket2
- = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- socket1.assign(ip::tcp::v4(), native_socket2);
ip::tcp::socket::native_handle_type native_socket3
= ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- socket1.assign(ip::tcp::v4(), native_socket3, ec);
+ socket1.assign(ip::tcp::v4(), native_socket3);
+ ip::tcp::socket::native_handle_type native_socket4
+ = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ socket1.assign(ip::tcp::v4(), native_socket4, ec);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
bool is_open = socket1.is_open();
@@ -304,9 +290,12 @@ void test()
socket1.close();
socket1.close(ec);
- ip::tcp::socket::native_handle_type native_socket4
+ socket1.release();
+ socket1.release(ec);
+
+ ip::tcp::socket::native_handle_type native_socket5
= socket1.native_handle();
- (void)native_socket4;
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -335,18 +324,12 @@ void test()
connect_handler());
socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0),
connect_handler());
+ socket1.async_connect(ip::tcp::endpoint(ip::tcp::v4(), 0), immediate);
+ socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0), immediate);
int i1 = socket1.async_connect(ip::tcp::endpoint(ip::tcp::v4(), 0), lazy);
(void)i1;
int i2 = socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0), lazy);
(void)i2;
-#if !defined(ASIO_NO_DEPRECATED)
- double d1 = socket1.async_connect(
- ip::tcp::endpoint(ip::tcp::v4(), 0), dlazy);
- (void)d1;
- double d2 = socket1.async_connect(
- ip::tcp::endpoint(ip::tcp::v6(), 0), dlazy);
- (void)d2;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.set_option(settable_socket_option1);
socket1.set_option(settable_socket_option1, ec);
@@ -376,10 +359,14 @@ void test()
socket1.native_non_blocking(false, ec);
ip::tcp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
ip::tcp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
ip::tcp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
ip::tcp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -388,12 +375,9 @@ void test()
socket1.wait(socket_base::wait_write, ec);
socket1.async_wait(socket_base::wait_read, wait_handler());
+ socket1.async_wait(socket_base::wait_read, immediate);
int i3 = socket1.async_wait(socket_base::wait_write, lazy);
(void)i3;
-#if !defined(ASIO_NO_DEPRECATED)
- double d3 = socket1.async_wait(socket_base::wait_write, dlazy);
- (void)d3;
-#endif // !defined(ASIO_NO_DEPRECATED)
// basic_stream_socket functions.
@@ -423,6 +407,16 @@ void test()
socket1.async_send(mutable_buffers, in_flags, send_handler());
socket1.async_send(const_buffers, in_flags, send_handler());
socket1.async_send(null_buffers(), in_flags, send_handler());
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(mutable_buffers, immediate);
+ socket1.async_send(const_buffers, immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(mutable_buffers, in_flags, immediate);
+ socket1.async_send(const_buffers, in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
int i4 = socket1.async_send(buffer(mutable_char_buffer), lazy);
(void)i4;
int i5 = socket1.async_send(buffer(const_char_buffer), lazy);
@@ -443,29 +437,6 @@ void test()
(void)i12;
int i13 = socket1.async_send(null_buffers(), in_flags, lazy);
(void)i13;
-#if !defined(ASIO_NO_DEPRECATED)
- double d4 = socket1.async_send(buffer(mutable_char_buffer), dlazy);
- (void)d4;
- double d5 = socket1.async_send(buffer(const_char_buffer), dlazy);
- (void)d5;
- double d6 = socket1.async_send(mutable_buffers, dlazy);
- (void)d6;
- double d7 = socket1.async_send(const_buffers, dlazy);
- (void)d7;
- double d8 = socket1.async_send(null_buffers(), dlazy);
- (void)d8;
- double d9 = socket1.async_send(
- buffer(mutable_char_buffer), in_flags, dlazy);
- (void)d9;
- double d10 = socket1.async_send(buffer(const_char_buffer), in_flags, dlazy);
- (void)d10;
- double d11 = socket1.async_send(mutable_buffers, in_flags, dlazy);
- (void)d11;
- double d12 = socket1.async_send(const_buffers, in_flags, dlazy);
- (void)d12;
- double d13 = socket1.async_send(null_buffers(), in_flags, dlazy);
- (void)d13;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(mutable_buffers);
@@ -484,6 +455,12 @@ void test()
receive_handler());
socket1.async_receive(mutable_buffers, in_flags, receive_handler());
socket1.async_receive(null_buffers(), in_flags, receive_handler());
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(mutable_buffers, immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(mutable_buffers, in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
int i14 = socket1.async_receive(buffer(mutable_char_buffer), lazy);
(void)i14;
int i15 = socket1.async_receive(mutable_buffers, lazy);
@@ -497,21 +474,6 @@ void test()
(void)i18;
int i19 = socket1.async_receive(null_buffers(), in_flags, lazy);
(void)i19;
-#if !defined(ASIO_NO_DEPRECATED)
- double d14 = socket1.async_receive(buffer(mutable_char_buffer), dlazy);
- (void)d14;
- double d15 = socket1.async_receive(mutable_buffers, dlazy);
- (void)d15;
- double d16 = socket1.async_receive(null_buffers(), dlazy);
- (void)d16;
- double d17 = socket1.async_receive(buffer(mutable_char_buffer), in_flags,
- dlazy);
- (void)d17;
- double d18 = socket1.async_receive(mutable_buffers, in_flags, dlazy);
- (void)d18;
- double d19 = socket1.async_receive(null_buffers(), in_flags, dlazy);
- (void)d19;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.write_some(buffer(mutable_char_buffer));
socket1.write_some(buffer(const_char_buffer));
@@ -529,6 +491,11 @@ void test()
socket1.async_write_some(mutable_buffers, write_some_handler());
socket1.async_write_some(const_buffers, write_some_handler());
socket1.async_write_some(null_buffers(), write_some_handler());
+ socket1.async_write_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_write_some(buffer(const_char_buffer), immediate);
+ socket1.async_write_some(mutable_buffers, immediate);
+ socket1.async_write_some(const_buffers, immediate);
+ socket1.async_write_some(null_buffers(), immediate);
int i20 = socket1.async_write_some(buffer(mutable_char_buffer), lazy);
(void)i20;
int i21 = socket1.async_write_some(buffer(const_char_buffer), lazy);
@@ -539,18 +506,6 @@ void test()
(void)i23;
int i24 = socket1.async_write_some(null_buffers(), lazy);
(void)i24;
-#if !defined(ASIO_NO_DEPRECATED)
- double d20 = socket1.async_write_some(buffer(mutable_char_buffer), dlazy);
- (void)d20;
- double d21 = socket1.async_write_some(buffer(const_char_buffer), dlazy);
- (void)d21;
- double d22 = socket1.async_write_some(mutable_buffers, dlazy);
- (void)d22;
- double d23 = socket1.async_write_some(const_buffers, dlazy);
- (void)d23;
- double d24 = socket1.async_write_some(null_buffers(), dlazy);
- (void)d24;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.read_some(buffer(mutable_char_buffer));
socket1.read_some(mutable_buffers);
@@ -562,20 +517,15 @@ void test()
socket1.async_read_some(buffer(mutable_char_buffer), read_some_handler());
socket1.async_read_some(mutable_buffers, read_some_handler());
socket1.async_read_some(null_buffers(), read_some_handler());
+ socket1.async_read_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_read_some(mutable_buffers, immediate);
+ socket1.async_read_some(null_buffers(), immediate);
int i25 = socket1.async_read_some(buffer(mutable_char_buffer), lazy);
(void)i25;
int i26 = socket1.async_read_some(mutable_buffers, lazy);
(void)i26;
int i27 = socket1.async_read_some(null_buffers(), lazy);
(void)i27;
-#if !defined(ASIO_NO_DEPRECATED)
- double d25 = socket1.async_read_some(buffer(mutable_char_buffer), dlazy);
- (void)d25;
- double d26 = socket1.async_read_some(mutable_buffers, dlazy);
- (void)d26;
- double d27 = socket1.async_read_some(null_buffers(), dlazy);
- (void)d27;
-#endif // !defined(ASIO_NO_DEPRECATED)
}
catch (std::exception&)
{
@@ -649,13 +599,9 @@ void test()
using namespace asio;
namespace ip = asio::ip;
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
io_context ioc;
@@ -761,25 +707,20 @@ struct wait_handler
{
wait_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
wait_handler(wait_handler&&) {}
private:
wait_handler(const wait_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct accept_handler
{
accept_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
accept_handler(accept_handler&&) {}
private:
accept_handler(const accept_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
-#if defined(ASIO_HAS_MOVE)
struct move_accept_handler
{
move_accept_handler() {}
@@ -789,7 +730,17 @@ struct move_accept_handler
private:
move_accept_handler(const move_accept_handler&) {}
};
-#endif // defined(ASIO_HAS_MOVE)
+
+struct move_accept_ioc_handler
+{
+ move_accept_ioc_handler() {}
+ void operator()(const asio::error_code&,
+ asio::basic_stream_socket<asio::ip::tcp,
+ asio::io_context::executor_type>) {}
+ move_accept_ioc_handler(move_accept_handler&&) {}
+private:
+ move_accept_ioc_handler(const move_accept_handler&) {}
+};
void test()
{
@@ -799,7 +750,10 @@ void test()
try
{
io_context ioc;
- ip::tcp::socket peer_socket(ioc);
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ ip::tcp::socket peer_socket1(ioc);
+ asio::basic_stream_socket<ip::tcp,
+ io_context::executor_type> peer_socket2(ioc);
ip::tcp::endpoint peer_endpoint;
archetypes::settable_socket_option<void> settable_socket_option1;
archetypes::settable_socket_option<int> settable_socket_option2;
@@ -808,10 +762,8 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
// basic_socket_acceptor constructors.
@@ -827,24 +779,26 @@ void test()
ip::tcp::acceptor acceptor6(ioc, ip::tcp::v4(), native_acceptor1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
- ip::tcp::acceptor acceptor7(std::move(acceptor5));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::tcp::acceptor acceptor7(ioc_ex);
+ ip::tcp::acceptor acceptor8(ioc_ex, ip::tcp::v4());
+ ip::tcp::acceptor acceptor9(ioc_ex, ip::tcp::v6());
+ ip::tcp::acceptor acceptor10(ioc_ex, ip::tcp::endpoint(ip::tcp::v4(), 0));
+ ip::tcp::acceptor acceptor11(ioc_ex, ip::tcp::endpoint(ip::tcp::v6(), 0));
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ ip::tcp::acceptor::native_handle_type native_acceptor2
+ = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ ip::tcp::acceptor acceptor12(ioc_ex, ip::tcp::v4(), native_acceptor2);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ ip::tcp::acceptor acceptor13(std::move(acceptor5));
// basic_socket_acceptor operators.
-#if defined(ASIO_HAS_MOVE)
acceptor1 = ip::tcp::acceptor(ioc);
acceptor1 = std::move(acceptor2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = acceptor1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::tcp::acceptor::executor_type ex = acceptor1.get_executor();
(void)ex;
@@ -856,12 +810,12 @@ void test()
acceptor1.open(ip::tcp::v6(), ec);
#if !defined(ASIO_WINDOWS_RUNTIME)
- ip::tcp::acceptor::native_handle_type native_acceptor2
- = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- acceptor1.assign(ip::tcp::v4(), native_acceptor2);
ip::tcp::acceptor::native_handle_type native_acceptor3
= ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- acceptor1.assign(ip::tcp::v4(), native_acceptor3, ec);
+ acceptor1.assign(ip::tcp::v4(), native_acceptor3);
+ ip::tcp::acceptor::native_handle_type native_acceptor4
+ = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ acceptor1.assign(ip::tcp::v4(), native_acceptor4, ec);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
bool is_open = acceptor1.is_open();
@@ -870,9 +824,12 @@ void test()
acceptor1.close();
acceptor1.close(ec);
- ip::tcp::acceptor::native_handle_type native_acceptor4
+ acceptor1.release();
+ acceptor1.release(ec);
+
+ ip::tcp::acceptor::native_handle_type native_acceptor5
= acceptor1.native_handle();
- (void)native_acceptor4;
+ (void)native_acceptor5;
acceptor1.cancel();
acceptor1.cancel(ec);
@@ -910,51 +867,74 @@ void test()
acceptor1.native_non_blocking(false, ec);
ip::tcp::endpoint endpoint1 = acceptor1.local_endpoint();
+ (void)endpoint1;
ip::tcp::endpoint endpoint2 = acceptor1.local_endpoint(ec);
+ (void)endpoint2;
acceptor1.wait(socket_base::wait_read);
acceptor1.wait(socket_base::wait_write, ec);
acceptor1.async_wait(socket_base::wait_read, wait_handler());
+ acceptor1.async_wait(socket_base::wait_read, immediate);
int i1 = acceptor1.async_wait(socket_base::wait_write, lazy);
(void)i1;
-#if !defined(ASIO_NO_DEPRECATED)
- double d1 = acceptor1.async_wait(socket_base::wait_write, dlazy);
- (void)d1;
-#endif // !defined(ASIO_NO_DEPRECATED)
- acceptor1.accept(peer_socket);
- acceptor1.accept(peer_socket, ec);
- acceptor1.accept(peer_socket, peer_endpoint);
- acceptor1.accept(peer_socket, peer_endpoint, ec);
-
-#if defined(ASIO_HAS_MOVE)
- peer_socket = acceptor1.accept();
- peer_socket = acceptor1.accept(ioc);
- peer_socket = acceptor1.accept(peer_endpoint);
- peer_socket = acceptor1.accept(ioc, peer_endpoint);
- (void)peer_socket;
-#endif // defined(ASIO_HAS_MOVE)
-
- acceptor1.async_accept(peer_socket, accept_handler());
- acceptor1.async_accept(peer_socket, peer_endpoint, accept_handler());
- int i2 = acceptor1.async_accept(peer_socket, lazy);
+ acceptor1.accept(peer_socket1);
+ acceptor1.accept(peer_socket1, ec);
+ acceptor1.accept(peer_socket1, peer_endpoint);
+ acceptor1.accept(peer_socket1, peer_endpoint, ec);
+
+ acceptor1.accept(peer_socket2);
+ acceptor1.accept(peer_socket2, ec);
+ acceptor1.accept(peer_socket2, peer_endpoint);
+ acceptor1.accept(peer_socket2, peer_endpoint, ec);
+
+ peer_socket1 = acceptor1.accept();
+ peer_socket1 = acceptor1.accept(ioc);
+ peer_socket1 = acceptor1.accept(ioc_ex);
+ peer_socket1 = acceptor1.accept(peer_endpoint);
+ peer_socket1 = acceptor1.accept(ioc, peer_endpoint);
+ peer_socket1 = acceptor1.accept(ioc_ex, peer_endpoint);
+ (void)peer_socket1;
+
+ peer_socket2 = acceptor1.accept(ioc);
+ peer_socket2 = acceptor1.accept(ioc_ex);
+ peer_socket2 = acceptor1.accept(ioc, peer_endpoint);
+ peer_socket2 = acceptor1.accept(ioc_ex, peer_endpoint);
+ (void)peer_socket2;
+
+ acceptor1.async_accept(peer_socket1, accept_handler());
+ acceptor1.async_accept(peer_socket1, peer_endpoint, accept_handler());
+ acceptor1.async_accept(peer_socket1, immediate);
+ acceptor1.async_accept(peer_socket1, peer_endpoint, immediate);
+ int i2 = acceptor1.async_accept(peer_socket1, lazy);
(void)i2;
- int i3 = acceptor1.async_accept(peer_socket, peer_endpoint, lazy);
+ int i3 = acceptor1.async_accept(peer_socket1, peer_endpoint, lazy);
(void)i3;
-#if !defined(ASIO_NO_DEPRECATED)
- double d2 = acceptor1.async_accept(peer_socket, dlazy);
- (void)d2;
- double d3 = acceptor1.async_accept(peer_socket, peer_endpoint, dlazy);
- (void)d3;
-#endif // !defined(ASIO_NO_DEPRECATED)
-#if defined(ASIO_HAS_MOVE)
+ acceptor1.async_accept(peer_socket2, accept_handler());
+ acceptor1.async_accept(peer_socket2, peer_endpoint, accept_handler());
+ acceptor1.async_accept(peer_socket2, immediate);
+ acceptor1.async_accept(peer_socket2, peer_endpoint, immediate);
+ int i4 = acceptor1.async_accept(peer_socket2, lazy);
+ (void)i4;
+ int i5 = acceptor1.async_accept(peer_socket2, peer_endpoint, lazy);
+ (void)i5;
+
acceptor1.async_accept(move_accept_handler());
acceptor1.async_accept(ioc, move_accept_handler());
+ acceptor1.async_accept(ioc_ex, move_accept_handler());
+ acceptor1.async_accept(ioc_ex, move_accept_ioc_handler());
acceptor1.async_accept(peer_endpoint, move_accept_handler());
acceptor1.async_accept(ioc, peer_endpoint, move_accept_handler());
-#endif // defined(ASIO_HAS_MOVE)
+ acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_handler());
+ acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_ioc_handler());
+ acceptor1.async_accept(immediate);
+ acceptor1.async_accept(ioc, immediate);
+ acceptor1.async_accept(ioc_ex, immediate);
+ acceptor1.async_accept(peer_endpoint, immediate);
+ acceptor1.async_accept(ioc, peer_endpoint, immediate);
+ acceptor1.async_accept(ioc_ex, peer_endpoint, immediate);
}
catch (std::exception&)
{
@@ -1056,13 +1036,23 @@ struct resolve_handler
resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::tcp::resolver::results_type) {}
-#if defined(ASIO_HAS_MOVE)
resolve_handler(resolve_handler&&) {}
private:
resolve_handler(const resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
+#if !defined(ASIO_NO_DEPRECATED)
+struct legacy_resolve_handler
+{
+ legacy_resolve_handler() {}
+ void operator()(const asio::error_code&,
+ asio::ip::tcp::resolver::iterator) {}
+ legacy_resolve_handler(legacy_resolve_handler&&) {}
+private:
+ legacy_resolve_handler(const legacy_resolve_handler&);
+};
+#endif // !defined(ASIO_NO_DEPRECATED)
+
void test()
{
using namespace asio;
@@ -1071,10 +1061,8 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
#if !defined(ASIO_NO_DEPRECATED)
ip::tcp::resolver::query q(ip::tcp::v4(), "localhost", "0");
@@ -1084,25 +1072,17 @@ void test()
// basic_resolver constructors.
ip::tcp::resolver resolver(ioc);
+ ip::tcp::resolver resolver2(ioc_ex);
-#if defined(ASIO_HAS_MOVE)
- ip::tcp::resolver resolver2(std::move(resolver));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::tcp::resolver resolver3(std::move(resolver));
// basic_resolver operators.
-#if defined(ASIO_HAS_MOVE)
resolver = ip::tcp::resolver(ioc);
- resolver = std::move(resolver2);
-#endif // defined(ASIO_HAS_MOVE)
+ resolver = std::move(resolver3);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = resolver.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::tcp::resolver::executor_type ex = resolver.get_executor();
(void)ex;
@@ -1156,57 +1136,51 @@ void test()
#if !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(q, resolve_handler());
+ resolver.async_resolve(q, legacy_resolve_handler());
int i1 = resolver.async_resolve(q, lazy);
(void)i1;
- double d1 = resolver.async_resolve(q, dlazy);
- (void)d1;
#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve("", "", resolve_handler());
- int i2 = resolver.async_resolve("", "", lazy);
- (void)i2;
#if !defined(ASIO_NO_DEPRECATED)
- double d2 = resolver.async_resolve("", "", dlazy);
- (void)d2;
+ resolver.async_resolve("", "", legacy_resolve_handler());
#endif // !defined(ASIO_NO_DEPRECATED)
+ int i2 = resolver.async_resolve("", "", lazy);
+ (void)i2;
resolver.async_resolve("", "",
ip::tcp::resolver::flags(), resolve_handler());
+#if !defined(ASIO_NO_DEPRECATED)
+ resolver.async_resolve("", "",
+ ip::tcp::resolver::flags(), legacy_resolve_handler());
+#endif // !defined(ASIO_NO_DEPRECATED)
int i3 = resolver.async_resolve("", "",
ip::tcp::resolver::flags(), lazy);
(void)i3;
-#if !defined(ASIO_NO_DEPRECATED)
- double d3 = resolver.async_resolve("", "",
- ip::tcp::resolver::flags(), dlazy);
- (void)d3;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(ip::tcp::v4(), "", "", resolve_handler());
- int i4 = resolver.async_resolve(ip::tcp::v4(), "", "", lazy);
- (void)i4;
#if !defined(ASIO_NO_DEPRECATED)
- double d4 = resolver.async_resolve(ip::tcp::v4(), "", "", dlazy);
- (void)d4;
+ resolver.async_resolve(ip::tcp::v4(), "", "", legacy_resolve_handler());
#endif // !defined(ASIO_NO_DEPRECATED)
+ int i4 = resolver.async_resolve(ip::tcp::v4(), "", "", lazy);
+ (void)i4;
resolver.async_resolve(ip::tcp::v4(),
"", "", ip::tcp::resolver::flags(), resolve_handler());
+#if !defined(ASIO_NO_DEPRECATED)
+ resolver.async_resolve(ip::tcp::v4(),
+ "", "", ip::tcp::resolver::flags(), legacy_resolve_handler());
+#endif // !defined(ASIO_NO_DEPRECATED)
int i5 = resolver.async_resolve(ip::tcp::v4(),
"", "", ip::tcp::resolver::flags(), lazy);
(void)i5;
-#if !defined(ASIO_NO_DEPRECATED)
- double d5 = resolver.async_resolve(ip::tcp::v4(),
- "", "", ip::tcp::resolver::flags(), dlazy);
- (void)d5;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(e, resolve_handler());
- int i6 = resolver.async_resolve(e, lazy);
- (void)i6;
#if !defined(ASIO_NO_DEPRECATED)
- double d6 = resolver.async_resolve(e, dlazy);
- (void)d6;
+ resolver.async_resolve(e, legacy_resolve_handler());
#endif // !defined(ASIO_NO_DEPRECATED)
+ int i6 = resolver.async_resolve(e, lazy);
+ (void)i6;
}
catch (std::exception&)
{
@@ -1241,9 +1215,7 @@ void test()
const ip::basic_resolver_entry<ip::tcp> entry1;
ip::basic_resolver_entry<ip::tcp> entry2(endpoint, host_name, service_name);
ip::basic_resolver_entry<ip::tcp> entry3(entry1);
-#if defined(ASIO_HAS_MOVE)
ip::basic_resolver_entry<ip::tcp> entry4(std::move(entry2));
-#endif // defined(ASIO_HAS_MOVE)
// basic_resolver_entry functions.
@@ -1304,19 +1276,15 @@ void test()
ip::tcp::iostream ios1;
-#if defined(ASIO_HAS_MOVE)
ip::tcp::iostream ios2(std::move(sock));
-#endif // defined(ASIO_HAS_MOVE)
ip::tcp::iostream ios3("hostname", "service");
// basic_socket_iostream operators.
-#if defined(ASIO_HAS_MOVE)
ios1 = ip::tcp::iostream();
ios2 = std::move(ios1);
-#endif // defined(ASIO_HAS_MOVE)
// basic_socket_iostream members.
@@ -1326,14 +1294,10 @@ void test()
(void)static_cast<std::streambuf*>(ios1.rdbuf());
-#if defined(ASIO_ENABLE_OLD_SERVICES)
- basic_socket<ip::tcp, stream_socket_service<ip::tcp> >& sref = ios1.socket();
-#else // defined(ASIO_ENABLE_OLD_SERVICES)
basic_socket<ip::tcp>& sref = ios1.socket();
-#endif // defined(ASIO_ENABLE_OLD_SERVICES)
(void)sref;
- error_code ec = ios1.error();
+ asio::error_code ec = ios1.error();
(void)ec;
ip::tcp::iostream::time_point tp = ios1.expiry();
@@ -1341,7 +1305,7 @@ void test()
ios1.expires_at(tp);
- ip::tcp::iostream::duration d;
+ ip::tcp::iostream::duration d = ip::tcp::iostream::duration();
ios1.expires_after(d);
// iostream operators.
@@ -1359,14 +1323,14 @@ void test()
ASIO_TEST_SUITE
(
"ip/tcp",
- ASIO_TEST_CASE(ip_tcp_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_compile::test)
ASIO_TEST_CASE(ip_tcp_runtime::test)
- ASIO_TEST_CASE(ip_tcp_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_socket_compile::test)
ASIO_TEST_CASE(ip_tcp_socket_runtime::test)
- ASIO_TEST_CASE(ip_tcp_acceptor_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_acceptor_compile::test)
ASIO_TEST_CASE(ip_tcp_acceptor_runtime::test)
- ASIO_TEST_CASE(ip_tcp_resolver_compile::test)
- ASIO_TEST_CASE(ip_tcp_resolver_entry_compile::test)
- ASIO_TEST_CASE(ip_tcp_resolver_entry_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_resolver_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_resolver_entry_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_resolver_entry_compile::test)
ASIO_COMPILE_TEST_CASE(ip_tcp_iostream_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/udp.cpp b/3rdparty/asio/src/tests/unit/ip/udp.cpp
index 48f9276ce4b..ae67f9c9c73 100644
--- a/3rdparty/asio/src/tests/unit/ip/udp.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/udp.cpp
@@ -2,7 +2,7 @@
// udp.cpp
// ~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,20 +17,14 @@
#include "asio/ip/udp.hpp"
#include <cstring>
+#include <functional>
#include "asio/io_context.hpp"
#include "../unit_test.hpp"
#include "../archetypes/async_result.hpp"
-#include "../archetypes/deprecated_async_result.hpp"
#include "../archetypes/gettable_socket_option.hpp"
#include "../archetypes/io_control_command.hpp"
#include "../archetypes/settable_socket_option.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
//------------------------------------------------------------------------------
// ip_udp_socket_compile test
@@ -44,44 +38,36 @@ struct connect_handler
{
connect_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
connect_handler(connect_handler&&) {}
private:
connect_handler(const connect_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct wait_handler
{
wait_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
wait_handler(wait_handler&&) {}
private:
wait_handler(const wait_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct send_handler
{
send_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
send_handler(send_handler&&) {}
private:
send_handler(const send_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct receive_handler
{
receive_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
receive_handler(receive_handler&&) {}
private:
receive_handler(const receive_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -92,6 +78,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
socket_base::message_flags in_flags = 0;
@@ -102,10 +89,8 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
// basic_datagram_socket constructors.
@@ -121,24 +106,26 @@ void test()
ip::udp::socket socket6(ioc, ip::udp::v4(), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
- ip::udp::socket socket7(std::move(socket6));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::udp::socket socket7(ioc_ex);
+ ip::udp::socket socket8(ioc_ex, ip::udp::v4());
+ ip::udp::socket socket9(ioc_ex, ip::udp::v6());
+ ip::udp::socket socket10(ioc_ex, ip::udp::endpoint(ip::udp::v4(), 0));
+ ip::udp::socket socket11(ioc_ex, ip::udp::endpoint(ip::udp::v6(), 0));
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ ip::udp::socket::native_handle_type native_socket2
+ = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ ip::udp::socket socket12(ioc_ex, ip::udp::v4(), native_socket2);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ ip::udp::socket socket13(std::move(socket6));
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = ip::udp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::udp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -147,9 +134,9 @@ void test()
ip::udp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
(void)lowest_layer;
- const ip::udp::socket& socket8 = socket1;
+ const ip::udp::socket& socket14 = socket1;
const ip::udp::socket::lowest_layer_type& lowest_layer2
- = socket8.lowest_layer();
+ = socket14.lowest_layer();
(void)lowest_layer2;
socket1.open(ip::udp::v4());
@@ -158,12 +145,12 @@ void test()
socket1.open(ip::udp::v6(), ec);
#if !defined(ASIO_WINDOWS_RUNTIME)
- ip::udp::socket::native_handle_type native_socket2
- = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- socket1.assign(ip::udp::v4(), native_socket2);
ip::udp::socket::native_handle_type native_socket3
= ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- socket1.assign(ip::udp::v4(), native_socket3, ec);
+ socket1.assign(ip::udp::v4(), native_socket3);
+ ip::udp::socket::native_handle_type native_socket4
+ = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ socket1.assign(ip::udp::v4(), native_socket4, ec);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
bool is_open = socket1.is_open();
@@ -172,9 +159,12 @@ void test()
socket1.close();
socket1.close(ec);
- ip::udp::socket::native_handle_type native_socket4
+ socket1.release();
+ socket1.release(ec);
+
+ ip::udp::socket::native_handle_type native_socket5
= socket1.native_handle();
- (void)native_socket4;
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -203,18 +193,12 @@ void test()
connect_handler());
socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0),
connect_handler());
+ socket1.async_connect(ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0), immediate);
int i1 = socket1.async_connect(ip::udp::endpoint(ip::udp::v4(), 0), lazy);
(void)i1;
int i2 = socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0), lazy);
(void)i2;
-#if !defined(ASIO_NO_DEPRECATED)
- double d1 = socket1.async_connect(
- ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
- (void)d1;
- double d2 = socket1.async_connect(
- ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
- (void)d2;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.set_option(settable_socket_option1);
socket1.set_option(settable_socket_option1, ec);
@@ -244,10 +228,14 @@ void test()
socket1.native_non_blocking(false, ec);
ip::udp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
ip::udp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
ip::udp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
ip::udp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -256,12 +244,9 @@ void test()
socket1.wait(socket_base::wait_write, ec);
socket1.async_wait(socket_base::wait_read, wait_handler());
+ socket1.async_wait(socket_base::wait_read, immediate);
int i3 = socket1.async_wait(socket_base::wait_write, lazy);
(void)i3;
-#if !defined(ASIO_NO_DEPRECATED)
- double d3 = socket1.async_wait(socket_base::wait_write, dlazy);
- (void)d3;
-#endif // !defined(ASIO_NO_DEPRECATED)
// basic_datagram_socket functions.
@@ -281,6 +266,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler());
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler());
socket1.async_send(null_buffers(), in_flags, send_handler());
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
int i4 = socket1.async_send(buffer(mutable_char_buffer), lazy);
(void)i4;
int i5 = socket1.async_send(buffer(const_char_buffer), lazy);
@@ -293,21 +284,6 @@ void test()
(void)i8;
int i9 = socket1.async_send(null_buffers(), in_flags, lazy);
(void)i9;
-#if !defined(ASIO_NO_DEPRECATED)
- double d4 = socket1.async_send(buffer(mutable_char_buffer), dlazy);
- (void)d4;
- double d5 = socket1.async_send(buffer(const_char_buffer), dlazy);
- (void)d5;
- double d6 = socket1.async_send(null_buffers(), dlazy);
- (void)d6;
- double d7 = socket1.async_send(
- buffer(mutable_char_buffer), in_flags, dlazy);
- (void)d7;
- double d8 = socket1.async_send(buffer(const_char_buffer), in_flags, dlazy);
- (void)d8;
- double d9 = socket1.async_send(null_buffers(), in_flags, dlazy);
- (void)d9;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0));
@@ -370,6 +346,30 @@ void test()
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler());
socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler());
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, immediate);
int i10 = socket1.async_send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), lazy);
(void)i10;
@@ -406,44 +406,6 @@ void test()
int i21 = socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, lazy);
(void)i21;
-#if !defined(ASIO_NO_DEPRECATED)
- double d10 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
- (void)d10;
- double d11 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
- (void)d11;
- double d12 = socket1.async_send_to(buffer(const_char_buffer),
- ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
- (void)d12;
- double d13 = socket1.async_send_to(buffer(const_char_buffer),
- ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
- (void)d13;
- double d14 = socket1.async_send_to(null_buffers(),
- ip::udp::endpoint(ip::udp::v4(), 0), dlazy);
- (void)d14;
- double d15 = socket1.async_send_to(null_buffers(),
- ip::udp::endpoint(ip::udp::v6(), 0), dlazy);
- (void)d15;
- double d16 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::udp::endpoint(ip::udp::v4(), 0), in_flags, dlazy);
- (void)d16;
- double d17 = socket1.async_send_to(buffer(mutable_char_buffer),
- ip::udp::endpoint(ip::udp::v6(), 0), in_flags, dlazy);
- (void)d17;
- double d18 = socket1.async_send_to(buffer(const_char_buffer),
- ip::udp::endpoint(ip::udp::v4(), 0), in_flags, dlazy);
- (void)d18;
- double d19 = socket1.async_send_to(buffer(const_char_buffer),
- ip::udp::endpoint(ip::udp::v6(), 0), in_flags, dlazy);
- (void)d19;
- double d20 = socket1.async_send_to(null_buffers(),
- ip::udp::endpoint(ip::udp::v4(), 0), in_flags, dlazy);
- (void)d20;
- double d21 = socket1.async_send_to(null_buffers(),
- ip::udp::endpoint(ip::udp::v6(), 0), in_flags, dlazy);
- (void)d21;
-#endif // !defined(ASIO_NO_DEPRECATED)
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -457,6 +419,10 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler());
socket1.async_receive(null_buffers(), in_flags, receive_handler());
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
int i22 = socket1.async_receive(buffer(mutable_char_buffer), lazy);
(void)i22;
int i23 = socket1.async_receive(null_buffers(), lazy);
@@ -466,17 +432,6 @@ void test()
(void)i24;
int i25 = socket1.async_receive(null_buffers(), in_flags, lazy);
(void)i25;
-#if !defined(ASIO_NO_DEPRECATED)
- double d22 = socket1.async_receive(buffer(mutable_char_buffer), dlazy);
- (void)d22;
- double d23 = socket1.async_receive(null_buffers(), dlazy);
- (void)d23;
- double d24 = socket1.async_receive(buffer(mutable_char_buffer),
- in_flags, dlazy);
- (void)d24;
- double d25 = socket1.async_receive(null_buffers(), in_flags, dlazy);
- (void)d25;
-#endif // !defined(ASIO_NO_DEPRECATED)
ip::udp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -494,6 +449,14 @@ void test()
endpoint, in_flags, receive_handler());
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler());
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
int i26 = socket1.async_receive_from(buffer(mutable_char_buffer),
endpoint, lazy);
(void)i26;
@@ -506,20 +469,6 @@ void test()
int i29 = socket1.async_receive_from(null_buffers(),
endpoint, in_flags, lazy);
(void)i29;
-#if !defined(ASIO_NO_DEPRECATED)
- double d26 = socket1.async_receive_from(buffer(mutable_char_buffer),
- endpoint, dlazy);
- (void)d26;
- double d27 = socket1.async_receive_from(null_buffers(),
- endpoint, dlazy);
- (void)d27;
- double d28 = socket1.async_receive_from(buffer(mutable_char_buffer),
- endpoint, in_flags, dlazy);
- (void)d28;
- double d29 = socket1.async_receive_from(null_buffers(),
- endpoint, in_flags, dlazy);
- (void)d29;
-#endif // !defined(ASIO_NO_DEPRECATED)
}
catch (std::exception&)
{
@@ -556,13 +505,9 @@ void test()
using namespace asio;
namespace ip = asio::ip;
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
io_context ioc;
@@ -613,11 +558,9 @@ struct resolve_handler
resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::udp::resolver::results_type) {}
-#if defined(ASIO_HAS_MOVE)
resolve_handler(resolve_handler&&) {}
private:
resolve_handler(const resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -628,10 +571,8 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
archetypes::lazy_handler lazy;
-#if !defined(ASIO_NO_DEPRECATED)
- archetypes::deprecated_lazy_handler dlazy;
-#endif // !defined(ASIO_NO_DEPRECATED)
asio::error_code ec;
#if !defined(ASIO_NO_DEPRECATED)
ip::udp::resolver::query q(ip::udp::v4(), "localhost", "0");
@@ -641,25 +582,17 @@ void test()
// basic_resolver constructors.
ip::udp::resolver resolver(ioc);
+ ip::udp::resolver resolver2(ioc_ex);
-#if defined(ASIO_HAS_MOVE)
- ip::udp::resolver resolver2(std::move(resolver));
-#endif // defined(ASIO_HAS_MOVE)
+ ip::udp::resolver resolver3(std::move(resolver));
// basic_resolver operators.
-#if defined(ASIO_HAS_MOVE)
resolver = ip::udp::resolver(ioc);
- resolver = std::move(resolver2);
-#endif // defined(ASIO_HAS_MOVE)
+ resolver = std::move(resolver3);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = resolver.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
ip::udp::resolver::executor_type ex = resolver.get_executor();
(void)ex;
@@ -715,55 +648,31 @@ void test()
resolver.async_resolve(q, resolve_handler());
int i1 = resolver.async_resolve(q, lazy);
(void)i1;
- double d1 = resolver.async_resolve(q, dlazy);
- (void)d1;
#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve("", "", resolve_handler());
int i2 = resolver.async_resolve("", "", lazy);
(void)i2;
-#if !defined(ASIO_NO_DEPRECATED)
- double d2 = resolver.async_resolve("", "", dlazy);
- (void)d2;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve("", "",
ip::udp::resolver::flags(), resolve_handler());
int i3 = resolver.async_resolve("", "",
ip::udp::resolver::flags(), lazy);
(void)i3;
-#if !defined(ASIO_NO_DEPRECATED)
- double d3 = resolver.async_resolve("", "",
- ip::udp::resolver::flags(), dlazy);
- (void)d3;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(ip::udp::v4(), "", "", resolve_handler());
int i4 = resolver.async_resolve(ip::udp::v4(), "", "", lazy);
(void)i4;
-#if !defined(ASIO_NO_DEPRECATED)
- double d4 = resolver.async_resolve(ip::udp::v4(), "", "", dlazy);
- (void)d4;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(ip::udp::v4(),
"", "", ip::udp::resolver::flags(), resolve_handler());
int i5 = resolver.async_resolve(ip::udp::v4(),
"", "", ip::udp::resolver::flags(), lazy);
(void)i5;
-#if !defined(ASIO_NO_DEPRECATED)
- double d5 = resolver.async_resolve(ip::udp::v4(),
- "", "", ip::udp::resolver::flags(), dlazy);
- (void)d5;
-#endif // !defined(ASIO_NO_DEPRECATED)
resolver.async_resolve(e, resolve_handler());
int i6 = resolver.async_resolve(e, lazy);
(void)i6;
-#if !defined(ASIO_NO_DEPRECATED)
- double d6 = resolver.async_resolve(e, dlazy);
- (void)d6;
-#endif // !defined(ASIO_NO_DEPRECATED)
}
catch (std::exception&)
{
@@ -777,7 +686,7 @@ void test()
ASIO_TEST_SUITE
(
"ip/udp",
- ASIO_TEST_CASE(ip_udp_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_udp_socket_compile::test)
ASIO_TEST_CASE(ip_udp_socket_runtime::test)
- ASIO_TEST_CASE(ip_udp_resolver_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_udp_resolver_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/unicast.cpp b/3rdparty/asio/src/tests/unit/ip/unicast.cpp
index 669e2727ceb..db3497f6e1c 100644
--- a/3rdparty/asio/src/tests/unit/ip/unicast.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/unicast.cpp
@@ -2,7 +2,7 @@
// unicast.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -166,6 +166,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/unicast",
- ASIO_TEST_CASE(ip_unicast_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_unicast_compile::test)
ASIO_TEST_CASE(ip_unicast_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/v6_only.cpp b/3rdparty/asio/src/tests/unit/ip/v6_only.cpp
index 951540f889b..ba37fdb3954 100644
--- a/3rdparty/asio/src/tests/unit/ip/v6_only.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/v6_only.cpp
@@ -2,7 +2,7 @@
// v6_only.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -130,6 +130,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/v6_only",
- ASIO_TEST_CASE(ip_v6_only_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_v6_only_compile::test)
ASIO_TEST_CASE(ip_v6_only_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/is_read_buffered.cpp b/3rdparty/asio/src/tests/unit/is_read_buffered.cpp
index 151e483a020..031cd0fb34d 100644
--- a/3rdparty/asio/src/tests/unit/is_read_buffered.cpp
+++ b/3rdparty/asio/src/tests/unit/is_read_buffered.cpp
@@ -2,7 +2,7 @@
// is_read_buffered.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/is_write_buffered.cpp b/3rdparty/asio/src/tests/unit/is_write_buffered.cpp
index 165f6e74080..df7a9c86d79 100644
--- a/3rdparty/asio/src/tests/unit/is_write_buffered.cpp
+++ b/3rdparty/asio/src/tests/unit/is_write_buffered.cpp
@@ -2,7 +2,7 @@
// is_write_buffered.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/local/.gitignore b/3rdparty/asio/src/tests/unit/local/.gitignore
deleted file mode 100644
index f2d0faff70d..00000000000
--- a/3rdparty/asio/src/tests/unit/local/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-basic_endpoint
-connect_pair
-datagram_protocol
-stream_protocol
diff --git a/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp b/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp
index aa76637ab1e..855888e52c9 100644
--- a/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp
+++ b/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp
@@ -2,7 +2,7 @@
// basic_endpoint.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/local/connect_pair.cpp b/3rdparty/asio/src/tests/unit/local/connect_pair.cpp
index 31a34af67f6..095a0d89696 100644
--- a/3rdparty/asio/src/tests/unit/local/connect_pair.cpp
+++ b/3rdparty/asio/src/tests/unit/local/connect_pair.cpp
@@ -2,7 +2,7 @@
// connect_pair.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -72,5 +72,5 @@ void test()
ASIO_TEST_SUITE
(
"local/connect_pair",
- ASIO_TEST_CASE(local_connect_pair_compile::test)
+ ASIO_COMPILE_TEST_CASE(local_connect_pair_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp b/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
index f685a8220a4..23f677d6723 100644
--- a/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
@@ -2,7 +2,7 @@
// datagram_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -52,6 +52,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
socket_base::message_flags in_flags = 0;
@@ -67,12 +68,13 @@ void test()
int native_socket1 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
dp::socket socket4(ioc, dp(), native_socket1);
- // basic_io_object functions.
+ dp::socket socket5(ioc_ex);
+ dp::socket socket6(ioc_ex, dp());
+ dp::socket socket7(ioc_ex, dp::endpoint(""));
+ int native_socket2 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
+ dp::socket socket8(ioc_ex, dp(), native_socket2);
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
+ // basic_io_object functions.
dp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -85,10 +87,10 @@ void test()
socket1.open(dp());
socket1.open(dp(), ec);
- int native_socket2 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
- socket1.assign(dp(), native_socket2);
int native_socket3 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
- socket1.assign(dp(), native_socket3, ec);
+ socket1.assign(dp(), native_socket3);
+ int native_socket4 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
+ socket1.assign(dp(), native_socket4, ec);
bool is_open = socket1.is_open();
(void)is_open;
@@ -96,8 +98,8 @@ void test()
socket1.close();
socket1.close(ec);
- dp::socket::native_handle_type native_socket4 = socket1.native_handle();
- (void)native_socket4;
+ dp::socket::native_handle_type native_socket5 = socket1.native_handle();
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -130,10 +132,14 @@ void test()
socket1.io_control(io_control_command, ec);
dp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
dp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
dp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
dp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -232,5 +238,5 @@ void test()
ASIO_TEST_SUITE
(
"local/datagram_protocol",
- ASIO_TEST_CASE(local_datagram_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(local_datagram_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp b/3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp
new file mode 100644
index 00000000000..00934827aa6
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp
@@ -0,0 +1,209 @@
+//
+// local/seq_packet_protocol.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/local/seq_packet_protocol.hpp"
+
+#include <cstring>
+#include "asio/io_context.hpp"
+#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
+
+#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
+# define local cpp_local
+#endif
+
+//------------------------------------------------------------------------------
+
+// local_seq_packet_protocol_socket_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// local::seq_packet_socket::socket compile and link correctly. Runtime
+// failures are ignored.
+
+namespace local_seq_packet_protocol_socket_compile {
+
+void connect_handler(const asio::error_code&)
+{
+}
+
+void send_handler(const asio::error_code&, std::size_t)
+{
+}
+
+void receive_handler(const asio::error_code&, std::size_t)
+{
+}
+
+void test()
+{
+ using namespace asio;
+ namespace local = asio::local;
+ typedef local::seq_packet_protocol spp;
+
+ try
+ {
+ io_context ioc;
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ const socket_base::message_flags in_flags = 0;
+ socket_base::message_flags out_flags = 0;
+ socket_base::send_buffer_size socket_option;
+ socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
+ asio::error_code ec;
+
+ // basic_seq_packet_socket constructors.
+
+ spp::socket socket1(ioc);
+ spp::socket socket2(ioc, spp());
+ spp::socket socket3(ioc, spp::endpoint());
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ spp::socket::native_handle_type native_socket1
+ = ::socket(AF_UNIX, SOCK_SEQPACKET, 0);
+ spp::socket socket4(ioc, spp(), native_socket1);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ spp::socket socket5(std::move(socket4));
+
+ // basic_seq_packet_socket operators.
+
+ socket1 = spp::socket(ioc);
+ socket1 = std::move(socket2);
+
+ // basic_io_object functions.
+
+ spp::socket::executor_type ex = socket1.get_executor();
+ (void)ex;
+
+ // basic_socket functions.
+
+ spp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
+ (void)lowest_layer;
+
+ socket1.open(spp());
+ socket1.open(spp(), ec);
+
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ spp::socket::native_handle_type native_socket2
+ = ::socket(AF_UNIX, SOCK_SEQPACKET, 0);
+ socket1.assign(spp(), native_socket2);
+ spp::socket::native_handle_type native_socket3
+ = ::socket(AF_UNIX, SOCK_SEQPACKET, 0);
+ socket1.assign(spp(), native_socket3, ec);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ bool is_open = socket1.is_open();
+ (void)is_open;
+
+ socket1.close();
+ socket1.close(ec);
+
+ spp::socket::native_handle_type native_socket4 = socket1.native_handle();
+ (void)native_socket4;
+
+ socket1.cancel();
+ socket1.cancel(ec);
+
+ bool at_mark1 = socket1.at_mark();
+ (void)at_mark1;
+ bool at_mark2 = socket1.at_mark(ec);
+ (void)at_mark2;
+
+ std::size_t available1 = socket1.available();
+ (void)available1;
+ std::size_t available2 = socket1.available(ec);
+ (void)available2;
+
+ socket1.bind(spp::endpoint());
+ socket1.bind(spp::endpoint(), ec);
+
+ socket1.connect(spp::endpoint());
+ socket1.connect(spp::endpoint(), ec);
+
+ socket1.async_connect(spp::endpoint(), connect_handler);
+ socket1.async_connect(spp::endpoint(), immediate);
+
+ socket1.set_option(socket_option);
+ socket1.set_option(socket_option, ec);
+
+ socket1.get_option(socket_option);
+ socket1.get_option(socket_option, ec);
+
+ socket1.io_control(io_control_command);
+ socket1.io_control(io_control_command, ec);
+
+ spp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
+ spp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
+
+ spp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
+ spp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
+
+ socket1.shutdown(socket_base::shutdown_both);
+ socket1.shutdown(socket_base::shutdown_both, ec);
+
+ // basic_seq_packet_socket functions.
+
+ socket1.send(buffer(mutable_char_buffer), in_flags);
+ socket1.send(buffer(const_char_buffer), in_flags);
+ socket1.send(null_buffers(), in_flags);
+ socket1.send(buffer(mutable_char_buffer), in_flags, ec);
+ socket1.send(buffer(const_char_buffer), in_flags, ec);
+ socket1.send(null_buffers(), in_flags, ec);
+
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
+ socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
+ socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
+
+ socket1.receive(buffer(mutable_char_buffer), out_flags);
+ socket1.receive(null_buffers(), out_flags);
+ socket1.receive(buffer(mutable_char_buffer), in_flags, out_flags);
+ socket1.receive(null_buffers(), in_flags, out_flags);
+ socket1.receive(buffer(mutable_char_buffer), in_flags, out_flags, ec);
+ socket1.receive(null_buffers(), in_flags, out_flags, ec);
+
+ socket1.async_receive(buffer(mutable_char_buffer), out_flags,
+ receive_handler);
+ socket1.async_receive(null_buffers(), out_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ out_flags, receive_handler);
+ socket1.async_receive(null_buffers(), in_flags, out_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), out_flags, immediate);
+ socket1.async_receive(null_buffers(), out_flags, immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ out_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, out_flags, immediate);
+ }
+ catch (std::exception&)
+ {
+ }
+}
+
+} // namespace local_seq_packet_protocol_socket_compile
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "local/seq_packet_protocol",
+ ASIO_COMPILE_TEST_CASE(local_seq_packet_protocol_socket_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp b/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
index c22ba410cdb..985d143e412 100644
--- a/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
@@ -2,7 +2,7 @@
// stream_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -60,6 +60,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
socket_base::message_flags in_flags = 0;
@@ -75,12 +76,13 @@ void test()
int native_socket1 = ::socket(AF_UNIX, SOCK_STREAM, 0);
sp::socket socket4(ioc, sp(), native_socket1);
- // basic_io_object functions.
+ sp::socket socket5(ioc_ex);
+ sp::socket socket6(ioc_ex, sp());
+ sp::socket socket7(ioc_ex, sp::endpoint(""));
+ int native_socket2 = ::socket(AF_UNIX, SOCK_STREAM, 0);
+ sp::socket socket8(ioc_ex, sp(), native_socket2);
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
+ // basic_io_object functions.
sp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -93,10 +95,10 @@ void test()
socket1.open(sp());
socket1.open(sp(), ec);
- int native_socket2 = ::socket(AF_UNIX, SOCK_STREAM, 0);
- socket1.assign(sp(), native_socket2);
int native_socket3 = ::socket(AF_UNIX, SOCK_STREAM, 0);
- socket1.assign(sp(), native_socket3, ec);
+ socket1.assign(sp(), native_socket3);
+ int native_socket4 = ::socket(AF_UNIX, SOCK_STREAM, 0);
+ socket1.assign(sp(), native_socket4, ec);
bool is_open = socket1.is_open();
(void)is_open;
@@ -104,8 +106,8 @@ void test()
socket1.close();
socket1.close(ec);
- sp::socket::native_handle_type native_socket4 = socket1.native_handle();
- (void)native_socket4;
+ sp::socket::native_handle_type native_socket5 = socket1.native_handle();
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -138,10 +140,14 @@ void test()
socket1.io_control(io_control_command, ec);
sp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
sp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
sp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
sp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);
@@ -209,5 +215,5 @@ void test()
ASIO_TEST_SUITE
(
"local/stream_protocol",
- ASIO_TEST_CASE(local_stream_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(local_stream_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/packaged_task.cpp b/3rdparty/asio/src/tests/unit/packaged_task.cpp
index bb44c77ce37..90b36d9f335 100644
--- a/3rdparty/asio/src/tests/unit/packaged_task.cpp
+++ b/3rdparty/asio/src/tests/unit/packaged_task.cpp
@@ -2,7 +2,7 @@
// packaged_task.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/placeholders.cpp b/3rdparty/asio/src/tests/unit/placeholders.cpp
index 54cf62ffb41..4f27d319b73 100644
--- a/3rdparty/asio/src/tests/unit/placeholders.cpp
+++ b/3rdparty/asio/src/tests/unit/placeholders.cpp
@@ -2,7 +2,7 @@
// placeholders.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/.gitignore b/3rdparty/asio/src/tests/unit/posix/.gitignore
deleted file mode 100644
index 2de575abb5a..00000000000
--- a/3rdparty/asio/src/tests/unit/posix/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-basic_descriptor
-basic_stream_descriptor
-descriptor
-descriptor_base
-stream_descriptor
-stream_descriptor_service
diff --git a/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp
index c193c0f4b0b..f05ed3153cc 100644
--- a/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp
@@ -2,7 +2,7 @@
// basic_descriptor.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
index dd2f31db977..8ea66857eae 100644
--- a/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
@@ -2,7 +2,7 @@
// basic_stream_descriptor.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/descriptor.cpp
index 6a52e019da6..c08ef8f4963 100644
--- a/3rdparty/asio/src/tests/unit/posix/descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/descriptor.cpp
@@ -2,7 +2,7 @@
// descriptor.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp b/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp
index 6dc61f88d5d..0437c9f852c 100644
--- a/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp
@@ -2,7 +2,7 @@
// descriptor_base.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp
index 165db89596f..a8fdc4b2c19 100644
--- a/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp
@@ -2,7 +2,7 @@
// stream_descriptor.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -51,36 +51,35 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
posix::descriptor_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
asio::error_code ec;
// basic_stream_descriptor constructors.
posix::stream_descriptor descriptor1(ioc);
+ posix::stream_descriptor descriptor2(ioc_ex);
int native_descriptor1 = -1;
- posix::stream_descriptor descriptor2(ioc, native_descriptor1);
+ posix::stream_descriptor descriptor3(ioc, native_descriptor1);
+ posix::stream_descriptor descriptor4(ioc_ex, native_descriptor1);
-#if defined(ASIO_HAS_MOVE)
- posix::stream_descriptor descriptor3(std::move(descriptor2));
-#endif // defined(ASIO_HAS_MOVE)
+ posix::stream_descriptor descriptor5(std::move(descriptor2));
+
+ posix::basic_stream_descriptor<io_context::executor_type> descriptor6(ioc);
+ posix::stream_descriptor descriptor7(std::move(descriptor6));
// basic_stream_descriptor operators.
-#if defined(ASIO_HAS_MOVE)
descriptor1 = posix::stream_descriptor(ioc);
descriptor1 = std::move(descriptor2);
-#endif // defined(ASIO_HAS_MOVE)
+ descriptor1 = std::move(descriptor6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = descriptor1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
posix::stream_descriptor::executor_type ex = descriptor1.get_executor();
(void)ex;
@@ -90,9 +89,9 @@ void test()
= descriptor1.lowest_layer();
(void)lowest_layer;
- const posix::stream_descriptor& descriptor4 = descriptor1;
+ const posix::stream_descriptor& descriptor8 = descriptor1;
const posix::stream_descriptor::lowest_layer_type& lowest_layer2
- = descriptor4.lowest_layer();
+ = descriptor8.lowest_layer();
(void)lowest_layer2;
int native_descriptor2 = -1;
@@ -132,6 +131,7 @@ void test()
descriptor1.wait(posix::descriptor_base::wait_write, ec);
descriptor1.async_wait(posix::descriptor_base::wait_read, &wait_handler);
+ descriptor1.async_wait(posix::descriptor_base::wait_read, immediate);
int i1 = descriptor1.async_wait(posix::descriptor_base::wait_write, lazy);
(void)i1;
@@ -150,6 +150,9 @@ void test()
write_some_handler);
descriptor1.async_write_some(null_buffers(),
write_some_handler);
+ descriptor1.async_write_some(buffer(mutable_char_buffer), immediate);
+ descriptor1.async_write_some(buffer(const_char_buffer), immediate);
+ descriptor1.async_write_some(null_buffers(), immediate);
int i2 = descriptor1.async_write_some(buffer(mutable_char_buffer), lazy);
(void)i2;
int i3 = descriptor1.async_write_some(buffer(const_char_buffer), lazy);
@@ -163,6 +166,8 @@ void test()
descriptor1.async_read_some(buffer(mutable_char_buffer), read_some_handler);
descriptor1.async_read_some(null_buffers(), read_some_handler);
+ descriptor1.async_read_some(buffer(mutable_char_buffer), immediate);
+ descriptor1.async_read_some(null_buffers(), immediate);
int i5 = descriptor1.async_read_some(buffer(mutable_char_buffer), lazy);
(void)i5;
int i6 = descriptor1.async_read_some(null_buffers(), lazy);
@@ -181,5 +186,5 @@ void test()
ASIO_TEST_SUITE
(
"posix/stream_descriptor",
- ASIO_TEST_CASE(posix_stream_descriptor_compile::test)
+ ASIO_COMPILE_TEST_CASE(posix_stream_descriptor_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/post.cpp b/3rdparty/asio/src/tests/unit/post.cpp
index caf8ad53f3a..d2ef2352299 100644
--- a/3rdparty/asio/src/tests/unit/post.cpp
+++ b/3rdparty/asio/src/tests/unit/post.cpp
@@ -2,7 +2,7 @@
// post.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/prepend.cpp b/3rdparty/asio/src/tests/unit/prepend.cpp
new file mode 100644
index 00000000000..cc26bf9835c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/prepend.cpp
@@ -0,0 +1,58 @@
+//
+// prepend.cpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/prepend.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+void prepend_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::prepend(
+ asio::bind_executor(io2.get_executor(),
+ [&count](int a, int b, asio::error_code)
+ {
+ ++count;
+ ASIO_CHECK(a == 123);
+ ASIO_CHECK(b == 321);
+ }), 123, 321));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "prepend",
+ ASIO_TEST_CASE(prepend_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/random_access_file.cpp b/3rdparty/asio/src/tests/unit/random_access_file.cpp
new file mode 100644
index 00000000000..be703cd395e
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/random_access_file.cpp
@@ -0,0 +1,171 @@
+//
+// random_access_file.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/random_access_file.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// random_access_file_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// random_access_file compile and link correctly. Runtime failures are ignored.
+
+namespace random_access_file_compile {
+
+struct write_some_at_handler
+{
+ write_some_at_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_at_handler(write_some_at_handler&&) {}
+private:
+ write_some_at_handler(const write_some_at_handler&);
+};
+
+struct read_some_at_handler
+{
+ read_some_at_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_at_handler(read_some_at_handler&&) {}
+private:
+ read_some_at_handler(const read_some_at_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_FILE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+ const std::string path;
+
+ // basic_random_access_file constructors.
+
+ random_access_file file1(ioc);
+ random_access_file file2(ioc, "", random_access_file::read_only);
+ random_access_file file3(ioc, path, random_access_file::read_only);
+ random_access_file::native_handle_type native_file1 = file1.native_handle();
+ random_access_file file4(ioc, native_file1);
+
+ random_access_file file5(ioc_ex);
+ random_access_file file6(ioc_ex, "", random_access_file::read_only);
+ random_access_file file7(ioc_ex, path, random_access_file::read_only);
+ random_access_file::native_handle_type native_file2 = file1.native_handle();
+ random_access_file file8(ioc_ex, native_file2);
+
+ random_access_file file9(std::move(file8));
+
+ basic_random_access_file<io_context::executor_type> file10(ioc);
+ random_access_file file11(std::move(file10));
+
+ // basic_random_access_file operators.
+
+ file1 = random_access_file(ioc);
+ file1 = std::move(file2);
+ file1 = std::move(file10);
+
+ // basic_io_object functions.
+
+ random_access_file::executor_type ex = file1.get_executor();
+ (void)ex;
+
+ // basic_random_access_file functions.
+
+ file1.open("", random_access_file::read_only);
+ file1.open("", random_access_file::read_only, ec);
+
+ file1.open(path, random_access_file::read_only);
+ file1.open(path, random_access_file::read_only, ec);
+
+ random_access_file::native_handle_type native_file3 = file1.native_handle();
+ file1.assign(native_file3);
+ random_access_file::native_handle_type native_file4 = file1.native_handle();
+ file1.assign(native_file4, ec);
+
+ bool is_open = file1.is_open();
+ (void)is_open;
+
+ file1.close();
+ file1.close(ec);
+
+ random_access_file::native_handle_type native_file5 = file1.native_handle();
+ (void)native_file5;
+
+ random_access_file::native_handle_type native_file6 = file1.release();
+ (void)native_file6;
+ random_access_file::native_handle_type native_file7 = file1.release(ec);
+ (void)native_file7;
+
+ file1.cancel();
+ file1.cancel(ec);
+
+ asio::uint64_t s1 = file1.size();
+ (void)s1;
+ asio::uint64_t s2 = file1.size(ec);
+ (void)s2;
+
+ file1.resize(asio::uint64_t(0));
+ file1.resize(asio::uint64_t(0), ec);
+
+ file1.sync_all();
+ file1.sync_all(ec);
+
+ file1.sync_data();
+ file1.sync_data(ec);
+
+ file1.write_some_at(0, buffer(mutable_char_buffer));
+ file1.write_some_at(0, buffer(const_char_buffer));
+ file1.write_some_at(0, buffer(mutable_char_buffer), ec);
+ file1.write_some_at(0, buffer(const_char_buffer), ec);
+
+ file1.async_write_some_at(0, buffer(mutable_char_buffer),
+ write_some_at_handler());
+ file1.async_write_some_at(0, buffer(const_char_buffer),
+ write_some_at_handler());
+ int i1 = file1.async_write_some_at(0, buffer(mutable_char_buffer), lazy);
+ (void)i1;
+ int i2 = file1.async_write_some_at(0, buffer(const_char_buffer), lazy);
+ (void)i2;
+
+ file1.read_some_at(0, buffer(mutable_char_buffer));
+ file1.read_some_at(0, buffer(mutable_char_buffer), ec);
+
+ file1.async_read_some_at(0, buffer(mutable_char_buffer),
+ read_some_at_handler());
+ int i3 = file1.async_read_some_at(0, buffer(mutable_char_buffer), lazy);
+ (void)i3;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_FILE)
+}
+
+} // namespace random_access_file_compile
+
+ASIO_TEST_SUITE
+(
+ "random_access_file",
+ ASIO_COMPILE_TEST_CASE(random_access_file_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/read.cpp b/3rdparty/asio/src/tests/unit/read.cpp
index 077c9223667..a268c041d9b 100644
--- a/3rdparty/asio/src/tests/unit/read.cpp
+++ b/3rdparty/asio/src/tests/unit/read.cpp
@@ -2,7 +2,7 @@
// read.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,7 +16,9 @@
// Test that header file is self-contained.
#include "asio/read.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include <vector>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
@@ -24,20 +26,10 @@
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_stream
@@ -53,7 +45,7 @@ public:
{
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -120,12 +112,13 @@ public:
}
template <typename Mutable_Buffers, typename Handler>
- void async_read_some(const Mutable_Buffers& buffers, Handler handler)
+ void async_read_some(const Mutable_Buffers& buffers,
+ Handler&& handler)
{
size_t bytes_transferred = read_some(buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -187,7 +180,8 @@ void test_2_arg_vector_buffers_read()
char read_buf[sizeof(read_data)];
std::vector<asio::mutable_buffer> buffers;
buffers.push_back(asio::buffer(read_buf, 32));
- buffers.push_back(asio::buffer(read_buf) + 32);
+ buffers.push_back(asio::buffer(read_buf, 39) + 32);
+ buffers.push_back(asio::buffer(read_buf) + 39);
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
@@ -210,8 +204,42 @@ void test_2_arg_vector_buffers_read()
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
}
+void test_2_arg_dynamic_string_read()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(read_data));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ size_t bytes_transferred = asio::read(s, sb);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+}
+
void test_2_arg_streambuf_read()
{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
asio::io_context ioc;
test_stream s(ioc);
asio::streambuf sb(sizeof(read_data));
@@ -238,6 +266,7 @@ void test_2_arg_streambuf_read()
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
void test_3_arg_nothrow_zero_buffers_read()
@@ -292,7 +321,8 @@ void test_3_arg_nothrow_vector_buffers_read()
char read_buf[sizeof(read_data)];
std::vector<asio::mutable_buffer> buffers;
buffers.push_back(asio::buffer(read_buf, 32));
- buffers.push_back(asio::buffer(read_buf) + 32);
+ buffers.push_back(asio::buffer(read_buf, 39) + 32);
+ buffers.push_back(asio::buffer(read_buf) + 39);
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
@@ -319,8 +349,46 @@ void test_3_arg_nothrow_vector_buffers_read()
ASIO_CHECK(!error);
}
+void test_3_arg_nothrow_dynamic_string_read()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(read_data));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ asio::error_code error;
+ size_t bytes_transferred = asio::read(s, sb, error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+}
+
void test_3_arg_nothrow_streambuf_read()
{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
asio::io_context ioc;
test_stream s(ioc);
asio::streambuf sb(sizeof(read_data));
@@ -351,6 +419,7 @@ void test_3_arg_nothrow_streambuf_read()
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
ASIO_CHECK(!error);
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
bool old_style_transfer_all(const asio::error_code& ec,
@@ -359,11 +428,16 @@ bool old_style_transfer_all(const asio::error_code& ec,
return !!ec;
}
-size_t short_transfer(const asio::error_code& ec,
- size_t /*bytes_transferred*/)
+struct short_transfer
{
- return !!ec ? 0 : 3;
-}
+ short_transfer() {}
+ short_transfer(short_transfer&&) {}
+ size_t operator()(const asio::error_code& ec,
+ size_t /*bytes_transferred*/)
+ {
+ return !!ec ? 0 : 3;
+ }
+};
void test_3_arg_mutable_buffer_read()
{
@@ -556,21 +630,21 @@ void test_3_arg_mutable_buffer_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer);
+ bytes_transferred = asio::read(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer);
+ bytes_transferred = asio::read(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer);
+ bytes_transferred = asio::read(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
}
@@ -582,7 +656,8 @@ void test_3_arg_vector_buffers_read()
char read_buf[sizeof(read_data)];
std::vector<asio::mutable_buffer> buffers;
buffers.push_back(asio::buffer(read_buf, 32));
- buffers.push_back(asio::buffer(read_buf) + 32);
+ buffers.push_back(asio::buffer(read_buf, 39) + 32);
+ buffers.push_back(asio::buffer(read_buf) + 39);
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
@@ -767,27 +842,266 @@ void test_3_arg_vector_buffers_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer);
+ bytes_transferred = asio::read(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer);
+ bytes_transferred = asio::read(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer);
+ bytes_transferred = asio::read(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
}
+void test_3_arg_dynamic_string_read()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(read_data));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ size_t bytes_transferred = asio::read(s, sb,
+ asio::transfer_all());
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_all());
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_all());
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(1));
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(1));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(10));
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(42));
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(42));
+ ASIO_CHECK(bytes_transferred == 50);
+ ASIO_CHECK(sb.size() == 50);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 50));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, old_style_transfer_all);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, old_style_transfer_all);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, old_style_transfer_all);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, short_transfer());
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, short_transfer());
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, short_transfer());
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+}
+
void test_3_arg_streambuf_read()
{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
asio::io_context ioc;
test_stream s(ioc);
asio::streambuf sb(sizeof(read_data));
@@ -999,7 +1313,7 @@ void test_3_arg_streambuf_read()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
- bytes_transferred = asio::read(s, sb, short_transfer);
+ bytes_transferred = asio::read(s, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
@@ -1007,7 +1321,7 @@ void test_3_arg_streambuf_read()
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
sb.consume(sb.size());
- bytes_transferred = asio::read(s, sb, short_transfer);
+ bytes_transferred = asio::read(s, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
@@ -1015,10 +1329,11 @@ void test_3_arg_streambuf_read()
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
sb.consume(sb.size());
- bytes_transferred = asio::read(s, sb, short_transfer);
+ bytes_transferred = asio::read(s, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
void test_4_arg_mutable_buffer_read()
@@ -1262,7 +1577,7 @@ void test_4_arg_mutable_buffer_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer, error);
+ bytes_transferred = asio::read(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -1271,7 +1586,7 @@ void test_4_arg_mutable_buffer_read()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
- bytes_transferred = asio::read(s, buffers, short_transfer, error);
+ bytes_transferred = asio::read(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -1280,7 +1595,7 @@ void test_4_arg_mutable_buffer_read()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
- bytes_transferred = asio::read(s, buffers, short_transfer, error);
+ bytes_transferred = asio::read(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -1293,7 +1608,8 @@ void test_4_arg_vector_buffers_read()
char read_buf[sizeof(read_data)];
std::vector<asio::mutable_buffer> buffers;
buffers.push_back(asio::buffer(read_buf, 32));
- buffers.push_back(asio::buffer(read_buf) + 32);
+ buffers.push_back(asio::buffer(read_buf, 39) + 32);
+ buffers.push_back(asio::buffer(read_buf) + 39);
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
@@ -1528,7 +1844,7 @@ void test_4_arg_vector_buffers_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read(s, buffers, short_transfer, error);
+ bytes_transferred = asio::read(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -1537,7 +1853,7 @@ void test_4_arg_vector_buffers_read()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
- bytes_transferred = asio::read(s, buffers, short_transfer, error);
+ bytes_transferred = asio::read(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -1546,14 +1862,308 @@ void test_4_arg_vector_buffers_read()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
- bytes_transferred = asio::read(s, buffers, short_transfer, error);
+ bytes_transferred = asio::read(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
ASIO_CHECK(!error);
}
+void test_4_arg_dynamic_string_read()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(read_data));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ asio::error_code error;
+ size_t bytes_transferred = asio::read(s, sb,
+ asio::transfer_all(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_all(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_all(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(1), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(1), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(10), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(42), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_at_least(42), error);
+ ASIO_CHECK(bytes_transferred == 50);
+ ASIO_CHECK(sb.size() == 50);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 50));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ asio::transfer_exactly(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb,
+ old_style_transfer_all, error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ old_style_transfer_all, error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb,
+ old_style_transfer_all, error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bytes_transferred = asio::read(s, sb, short_transfer(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb, short_transfer(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ error = asio::error_code();
+ bytes_transferred = asio::read(s, sb, short_transfer(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(read_data));
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+ ASIO_CHECK(!error);
+}
+
void test_4_arg_streambuf_read()
{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
asio::io_context ioc;
test_stream s(ioc);
asio::streambuf sb(sizeof(read_data));
@@ -1815,7 +2425,7 @@ void test_4_arg_streambuf_read()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
- bytes_transferred = asio::read(s, sb, short_transfer, error);
+ bytes_transferred = asio::read(s, sb, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
@@ -1825,7 +2435,7 @@ void test_4_arg_streambuf_read()
s.next_read_length(1);
sb.consume(sb.size());
error = asio::error_code();
- bytes_transferred = asio::read(s, sb, short_transfer, error);
+ bytes_transferred = asio::read(s, sb, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
@@ -1835,11 +2445,12 @@ void test_4_arg_streambuf_read()
s.next_read_length(10);
sb.consume(sb.size());
error = asio::error_code();
- bytes_transferred = asio::read(s, sb, short_transfer, error);
+ bytes_transferred = asio::read(s, sb, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
ASIO_CHECK(!error);
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
void async_read_handler(const asio::error_code& e,
@@ -1852,13 +2463,9 @@ void async_read_handler(const asio::error_code& e,
void test_3_arg_mutable_buffer_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -1912,13 +2519,9 @@ void test_3_arg_mutable_buffer_async_read()
void test_3_arg_boost_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -1975,15 +2578,10 @@ void test_3_arg_boost_array_buffers_async_read()
void test_3_arg_std_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
char read_buf[sizeof(read_data)];
@@ -2033,25 +2631,21 @@ void test_3_arg_std_array_buffers_async_read()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_3_arg_vector_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
char read_buf[sizeof(read_data)];
std::vector<asio::mutable_buffer> buffers;
buffers.push_back(asio::buffer(read_buf, 32));
- buffers.push_back(asio::buffer(read_buf) + 32);
+ buffers.push_back(asio::buffer(read_buf, 39) + 32);
+ buffers.push_back(asio::buffer(read_buf) + 39);
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
@@ -2097,15 +2691,73 @@ void test_3_arg_vector_buffers_async_read()
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
}
+void test_3_arg_dynamic_string_async_read()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(read_data));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bool called = false;
+ asio::async_read(s, sb,
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb,
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb,
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ int i = asio::async_read(s, sb, archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+}
+
void test_3_arg_streambuf_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -2157,17 +2809,14 @@ void test_3_arg_streambuf_async_read()
ioc.run();
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
void test_4_arg_mutable_buffer_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -2458,7 +3107,7 @@ void test_4_arg_mutable_buffer_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -2470,7 +3119,7 @@ void test_4_arg_mutable_buffer_async_read()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -2482,7 +3131,7 @@ void test_4_arg_mutable_buffer_async_read()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -2493,7 +3142,7 @@ void test_4_arg_mutable_buffer_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read(s, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
@@ -2502,13 +3151,9 @@ void test_4_arg_mutable_buffer_async_read()
void test_4_arg_boost_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -2801,7 +3446,7 @@ void test_4_arg_boost_array_buffers_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -2813,7 +3458,7 @@ void test_4_arg_boost_array_buffers_async_read()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -2825,7 +3470,7 @@ void test_4_arg_boost_array_buffers_async_read()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -2836,7 +3481,7 @@ void test_4_arg_boost_array_buffers_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read(s, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
@@ -2846,15 +3491,10 @@ void test_4_arg_boost_array_buffers_async_read()
void test_4_arg_std_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
char read_buf[sizeof(read_data)];
@@ -3145,7 +3785,7 @@ void test_4_arg_std_array_buffers_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3157,7 +3797,7 @@ void test_4_arg_std_array_buffers_async_read()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3169,7 +3809,7 @@ void test_4_arg_std_array_buffers_async_read()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3180,30 +3820,26 @@ void test_4_arg_std_array_buffers_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read(s, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
char read_buf[sizeof(read_data)];
std::vector<asio::mutable_buffer> buffers;
buffers.push_back(asio::buffer(read_buf, 32));
- buffers.push_back(asio::buffer(read_buf) + 32);
+ buffers.push_back(asio::buffer(read_buf, 39) + 32);
+ buffers.push_back(asio::buffer(read_buf) + 39);
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
@@ -3488,7 +4124,7 @@ void test_4_arg_vector_buffers_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3500,7 +4136,7 @@ void test_4_arg_vector_buffers_async_read()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3512,7 +4148,7 @@ void test_4_arg_vector_buffers_async_read()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read(s, buffers, short_transfer,
+ asio::async_read(s, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3523,22 +4159,385 @@ void test_4_arg_vector_buffers_async_read()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read(s, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
}
+void test_4_arg_dynamic_string_async_read()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(read_data));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ bool called = false;
+ asio::async_read(s, sb, asio::transfer_all(),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_all(),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_all(),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(1),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(1),
+ bindns::bind(async_read_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(1),
+ bindns::bind(async_read_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(10),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(10),
+ bindns::bind(async_read_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(10),
+ bindns::bind(async_read_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(42),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(42),
+ bindns::bind(async_read_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_at_least(42),
+ bindns::bind(async_read_handler,
+ _1, _2, 50, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 50);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 50));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(1),
+ bindns::bind(async_read_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(1),
+ bindns::bind(async_read_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(1),
+ bindns::bind(async_read_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 1);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 1));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(10),
+ bindns::bind(async_read_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(10),
+ bindns::bind(async_read_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(10),
+ bindns::bind(async_read_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 10);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 10));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(42),
+ bindns::bind(async_read_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(42),
+ bindns::bind(async_read_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, asio::transfer_exactly(42),
+ bindns::bind(async_read_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == 42);
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), 42));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, old_style_transfer_all,
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, old_style_transfer_all,
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, old_style_transfer_all,
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, short_transfer(),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, short_transfer(),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb.consume(sb.size());
+ called = false;
+ asio::async_read(s, sb, short_transfer(),
+ bindns::bind(async_read_handler,
+ _1, _2, sizeof(read_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+
+ s.reset(read_data, sizeof(read_data));
+ sb.consume(sb.size());
+ int i = asio::async_read(s, sb,
+ short_transfer(), archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(sb.size() == sizeof(read_data));
+ ASIO_CHECK(s.check_buffers(sb.data(0, sb.size()), sizeof(read_data)));
+}
+
void test_4_arg_streambuf_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -3851,7 +4850,7 @@ void test_4_arg_streambuf_async_read()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
called = false;
- asio::async_read(s, sb, short_transfer,
+ asio::async_read(s, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3864,7 +4863,7 @@ void test_4_arg_streambuf_async_read()
s.next_read_length(1);
sb.consume(sb.size());
called = false;
- asio::async_read(s, sb, short_transfer,
+ asio::async_read(s, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3877,7 +4876,7 @@ void test_4_arg_streambuf_async_read()
s.next_read_length(10);
sb.consume(sb.size());
called = false;
- asio::async_read(s, sb, short_transfer,
+ asio::async_read(s, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -3889,12 +4888,13 @@ void test_4_arg_streambuf_async_read()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
int i = asio::async_read(s, sb,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(sb.data(), sizeof(read_data)));
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
ASIO_TEST_SUITE
@@ -3903,25 +4903,31 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(test_2_arg_zero_buffers_read)
ASIO_TEST_CASE(test_2_arg_mutable_buffer_read)
ASIO_TEST_CASE(test_2_arg_vector_buffers_read)
+ ASIO_TEST_CASE(test_2_arg_dynamic_string_read)
ASIO_TEST_CASE(test_2_arg_streambuf_read)
ASIO_TEST_CASE(test_3_arg_nothrow_zero_buffers_read)
ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffer_read)
ASIO_TEST_CASE(test_3_arg_nothrow_vector_buffers_read)
+ ASIO_TEST_CASE(test_3_arg_nothrow_dynamic_string_read)
ASIO_TEST_CASE(test_3_arg_nothrow_streambuf_read)
ASIO_TEST_CASE(test_3_arg_mutable_buffer_read)
ASIO_TEST_CASE(test_3_arg_vector_buffers_read)
+ ASIO_TEST_CASE(test_3_arg_dynamic_string_read)
ASIO_TEST_CASE(test_3_arg_streambuf_read)
ASIO_TEST_CASE(test_4_arg_mutable_buffer_read)
ASIO_TEST_CASE(test_4_arg_vector_buffers_read)
+ ASIO_TEST_CASE(test_4_arg_dynamic_string_read)
ASIO_TEST_CASE(test_4_arg_streambuf_read)
ASIO_TEST_CASE(test_3_arg_mutable_buffer_async_read)
ASIO_TEST_CASE(test_3_arg_boost_array_buffers_async_read)
ASIO_TEST_CASE(test_3_arg_std_array_buffers_async_read)
ASIO_TEST_CASE(test_3_arg_vector_buffers_async_read)
+ ASIO_TEST_CASE(test_3_arg_dynamic_string_async_read)
ASIO_TEST_CASE(test_3_arg_streambuf_async_read)
ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_read)
ASIO_TEST_CASE(test_4_arg_vector_buffers_async_read)
ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_read)
ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_read)
+ ASIO_TEST_CASE(test_4_arg_dynamic_string_async_read)
ASIO_TEST_CASE(test_4_arg_streambuf_async_read)
)
diff --git a/3rdparty/asio/src/tests/unit/read_at.cpp b/3rdparty/asio/src/tests/unit/read_at.cpp
index 5b2f5ebace3..72d21bc3236 100644
--- a/3rdparty/asio/src/tests/unit/read_at.cpp
+++ b/3rdparty/asio/src/tests/unit/read_at.cpp
@@ -2,7 +2,7 @@
// read_at.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,27 +16,19 @@
// Test that header file is self-contained.
#include "asio/read_at.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_random_access_device
@@ -51,7 +43,7 @@ public:
{
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -125,12 +117,12 @@ public:
template <typename Mutable_Buffers, typename Handler>
void async_read_some_at(asio::uint64_t offset,
- const Mutable_Buffers& buffers, Handler handler)
+ const Mutable_Buffers& buffers, Handler&& handler)
{
size_t bytes_transferred = read_some_at(offset, buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -476,11 +468,16 @@ bool old_style_transfer_all(const asio::error_code& ec,
return !!ec;
}
-size_t short_transfer(const asio::error_code& ec,
- size_t /*bytes_transferred*/)
+struct short_transfer
{
- return !!ec ? 0 : 3;
-}
+ short_transfer() {}
+ short_transfer(short_transfer&&) {}
+ size_t operator()(const asio::error_code& ec,
+ size_t /*bytes_transferred*/)
+ {
+ return !!ec ? 0 : 3;
+ }
+};
void test_4_arg_mutable_buffer_read_at()
{
@@ -860,41 +857,41 @@ void test_4_arg_mutable_buffer_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
}
@@ -1278,41 +1275,41 @@ void test_4_arg_vector_buffers_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
- bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
}
@@ -1741,14 +1738,14 @@ void test_4_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
- bytes_transferred = asio::read_at(s, 0, sb, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, sb.data(), sizeof(read_data)));
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
- bytes_transferred = asio::read_at(s, 1234, sb, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
@@ -1756,7 +1753,7 @@ void test_4_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
sb.consume(sb.size());
- bytes_transferred = asio::read_at(s, 0, sb, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, sb.data(), sizeof(read_data)));
@@ -1764,7 +1761,7 @@ void test_4_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
s.next_read_length(1);
sb.consume(sb.size());
- bytes_transferred = asio::read_at(s, 1234, sb, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
@@ -1772,7 +1769,7 @@ void test_4_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
sb.consume(sb.size());
- bytes_transferred = asio::read_at(s, 0, sb, short_transfer);
+ bytes_transferred = asio::read_at(s, 0, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, sb.data(), sizeof(read_data)));
@@ -1780,7 +1777,7 @@ void test_4_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
s.next_read_length(10);
sb.consume(sb.size());
- bytes_transferred = asio::read_at(s, 1234, sb, short_transfer);
+ bytes_transferred = asio::read_at(s, 1234, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
@@ -2258,7 +2255,7 @@ void test_5_arg_mutable_buffer_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
bytes_transferred = asio::read_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2266,7 +2263,7 @@ void test_5_arg_mutable_buffer_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
bytes_transferred = asio::read_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2276,7 +2273,7 @@ void test_5_arg_mutable_buffer_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2286,7 +2283,7 @@ void test_5_arg_mutable_buffer_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2296,7 +2293,7 @@ void test_5_arg_mutable_buffer_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2306,7 +2303,7 @@ void test_5_arg_mutable_buffer_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2785,7 +2782,7 @@ void test_5_arg_vector_buffers_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
bytes_transferred = asio::read_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2793,7 +2790,7 @@ void test_5_arg_vector_buffers_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
bytes_transferred = asio::read_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2803,7 +2800,7 @@ void test_5_arg_vector_buffers_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2813,7 +2810,7 @@ void test_5_arg_vector_buffers_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2823,7 +2820,7 @@ void test_5_arg_vector_buffers_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -2833,7 +2830,7 @@ void test_5_arg_vector_buffers_read_at()
memset(read_buf, 0, sizeof(read_buf));
error = asio::error_code();
bytes_transferred = asio::read_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
ASIO_CHECK(!error);
@@ -3357,7 +3354,7 @@ void test_5_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
bytes_transferred = asio::read_at(s, 0, sb,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, sb.data(), sizeof(read_data)));
@@ -3366,7 +3363,7 @@ void test_5_arg_streambuf_read_at()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
bytes_transferred = asio::read_at(s, 1234, sb,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
@@ -3377,7 +3374,7 @@ void test_5_arg_streambuf_read_at()
sb.consume(sb.size());
error = asio::error_code();
bytes_transferred = asio::read_at(s, 0, sb,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, sb.data(), sizeof(read_data)));
@@ -3388,7 +3385,7 @@ void test_5_arg_streambuf_read_at()
sb.consume(sb.size());
error = asio::error_code();
bytes_transferred = asio::read_at(s, 1234, sb,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
@@ -3399,7 +3396,7 @@ void test_5_arg_streambuf_read_at()
sb.consume(sb.size());
error = asio::error_code();
bytes_transferred = asio::read_at(s, 0, sb,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(0, sb.data(), sizeof(read_data)));
@@ -3410,7 +3407,7 @@ void test_5_arg_streambuf_read_at()
sb.consume(sb.size());
error = asio::error_code();
bytes_transferred = asio::read_at(s, 1234, sb,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(read_data));
ASIO_CHECK(sb.size() == sizeof(read_data));
ASIO_CHECK(s.check_buffers(1234, sb.data(), sizeof(read_data)));
@@ -3427,13 +3424,9 @@ void async_read_handler(const asio::error_code& e,
void test_4_arg_mutable_buffer_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3523,13 +3516,9 @@ void test_4_arg_mutable_buffer_async_read_at()
void test_4_arg_boost_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -3622,15 +3611,10 @@ void test_4_arg_boost_array_buffers_async_read_at()
void test_4_arg_std_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
char read_buf[sizeof(read_data)];
@@ -3716,18 +3700,13 @@ void test_4_arg_std_array_buffers_async_read_at()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3818,13 +3797,9 @@ void test_4_arg_vector_buffers_async_read_at()
void test_4_arg_streambuf_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3918,13 +3893,9 @@ void test_4_arg_streambuf_async_read_at()
void test_5_arg_mutable_buffer_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -4537,7 +4508,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -4548,7 +4519,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -4560,7 +4531,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -4572,7 +4543,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -4584,7 +4555,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -4596,7 +4567,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -4607,7 +4578,7 @@ void test_5_arg_mutable_buffer_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read_at(s, 1234, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
@@ -4616,13 +4587,9 @@ void test_5_arg_mutable_buffer_async_read_at()
void test_5_arg_boost_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -5237,7 +5204,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5248,7 +5215,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5260,7 +5227,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5272,7 +5239,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5284,7 +5251,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5296,7 +5263,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5307,7 +5274,7 @@ void test_5_arg_boost_array_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read_at(s, 1234, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
@@ -5317,15 +5284,10 @@ void test_5_arg_boost_array_buffers_async_read_at()
void test_5_arg_std_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
char read_buf[sizeof(read_data)];
@@ -5938,7 +5900,7 @@ void test_5_arg_std_array_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5949,7 +5911,7 @@ void test_5_arg_std_array_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5961,7 +5923,7 @@ void test_5_arg_std_array_buffers_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5973,7 +5935,7 @@ void test_5_arg_std_array_buffers_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5985,7 +5947,7 @@ void test_5_arg_std_array_buffers_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -5997,7 +5959,7 @@ void test_5_arg_std_array_buffers_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6008,23 +5970,18 @@ void test_5_arg_std_array_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read_at(s, 1234, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_5_arg_vector_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -6638,7 +6595,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6649,7 +6606,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6661,7 +6618,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6673,7 +6630,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.next_read_length(1);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6685,7 +6642,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 0, buffers, short_transfer,
+ asio::async_read_at(s, 0, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6697,7 +6654,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.next_read_length(10);
memset(read_buf, 0, sizeof(read_buf));
called = false;
- asio::async_read_at(s, 1234, buffers, short_transfer,
+ asio::async_read_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -6708,7 +6665,7 @@ void test_5_arg_vector_buffers_async_read_at()
s.reset(read_data, sizeof(read_data));
memset(read_buf, 0, sizeof(read_buf));
int i = asio::async_read_at(s, 1234, buffers,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
@@ -6717,13 +6674,9 @@ void test_5_arg_vector_buffers_async_read_at()
void test_5_arg_streambuf_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -7382,7 +7335,7 @@ void test_5_arg_streambuf_async_read_at()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
called = false;
- asio::async_read_at(s, 0, sb, short_transfer,
+ asio::async_read_at(s, 0, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -7394,7 +7347,7 @@ void test_5_arg_streambuf_async_read_at()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
called = false;
- asio::async_read_at(s, 1234, sb, short_transfer,
+ asio::async_read_at(s, 1234, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -7407,7 +7360,7 @@ void test_5_arg_streambuf_async_read_at()
s.next_read_length(1);
sb.consume(sb.size());
called = false;
- asio::async_read_at(s, 0, sb, short_transfer,
+ asio::async_read_at(s, 0, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -7420,7 +7373,7 @@ void test_5_arg_streambuf_async_read_at()
s.next_read_length(1);
sb.consume(sb.size());
called = false;
- asio::async_read_at(s, 1234, sb, short_transfer,
+ asio::async_read_at(s, 1234, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -7433,7 +7386,7 @@ void test_5_arg_streambuf_async_read_at()
s.next_read_length(10);
sb.consume(sb.size());
called = false;
- asio::async_read_at(s, 0, sb, short_transfer,
+ asio::async_read_at(s, 0, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -7446,7 +7399,7 @@ void test_5_arg_streambuf_async_read_at()
s.next_read_length(10);
sb.consume(sb.size());
called = false;
- asio::async_read_at(s, 1234, sb, short_transfer,
+ asio::async_read_at(s, 1234, sb, short_transfer(),
bindns::bind(async_read_handler,
_1, _2, sizeof(read_data), &called));
ioc.restart();
@@ -7458,7 +7411,7 @@ void test_5_arg_streambuf_async_read_at()
s.reset(read_data, sizeof(read_data));
sb.consume(sb.size());
int i = asio::async_read_at(s, 1234, sb,
- short_transfer, archetypes::lazy_handler());
+ short_transfer(), archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
diff --git a/3rdparty/asio/src/tests/unit/read_until.cpp b/3rdparty/asio/src/tests/unit/read_until.cpp
index 782ac2f4b6b..139fcf6f0a9 100644
--- a/3rdparty/asio/src/tests/unit/read_until.cpp
+++ b/3rdparty/asio/src/tests/unit/read_until.cpp
@@ -2,7 +2,7 @@
// read_until.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -17,18 +17,13 @@
#include "asio/read_until.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
class test_stream
{
public:
@@ -42,7 +37,7 @@ public:
{
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -88,7 +83,7 @@ public:
size_t bytes_transferred = read_some(buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -104,8 +99,98 @@ private:
static const char read_data[]
= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-void test_char_read_until()
+void test_dynamic_string_read_until_char()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data1, data2;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb1 = asio::dynamic_buffer(data1);
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb2 = asio::dynamic_buffer(data2, 25);
+ asio::error_code ec;
+
+ s.reset(read_data, sizeof(read_data));
+ sb1.consume(sb1.size());
+ std::size_t length = asio::read_until(s, sb1, 'Z');
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, 'Z');
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, 'Z');
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, 'Z', ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, 'Z', ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, 'Z', ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, 'Z', ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, 'Z', ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, 'Z', ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, 'Y', ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, 'Y', ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, 'Y', ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+}
+
+void test_streambuf_read_until_char()
{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
asio::io_context ioc;
test_stream s(ioc);
asio::streambuf sb1;
@@ -188,12 +273,103 @@ void test_char_read_until()
length = asio::read_until(s, sb2, 'Y', ec);
ASIO_CHECK(!ec);
ASIO_CHECK(length == 25);
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
-void test_string_read_until()
+void test_dynamic_string_read_until_string()
{
asio::io_context ioc;
test_stream s(ioc);
+ std::string data1, data2;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb1 = asio::dynamic_buffer(data1);
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb2 = asio::dynamic_buffer(data2, 25);
+ asio::error_code ec;
+
+ s.reset(read_data, sizeof(read_data));
+ sb1.consume(sb1.size());
+ std::size_t length = asio::read_until(s, sb1, "XYZ");
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, "XYZ");
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, "XYZ");
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, "XYZ", ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, "XYZ", ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, "XYZ", ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, "XYZ", ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, "XYZ", ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, "XYZ", ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, "WXY", ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, "WXY", ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, "WXY", ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+}
+
+void test_streambuf_read_until_string()
+{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+ asio::io_context ioc;
+ test_stream s(ioc);
asio::streambuf sb1;
asio::streambuf sb2(25);
asio::error_code ec;
@@ -274,6 +450,7 @@ void test_string_read_until()
length = asio::read_until(s, sb2, "WXY", ec);
ASIO_CHECK(!ec);
ASIO_CHECK(length == 25);
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
class match_char
@@ -303,8 +480,98 @@ namespace asio {
};
} // namespace asio
-void test_match_condition_read_until()
+void test_dynamic_string_read_until_match_condition()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data1, data2;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb1 = asio::dynamic_buffer(data1);
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb2 = asio::dynamic_buffer(data2, 25);
+ asio::error_code ec;
+
+ s.reset(read_data, sizeof(read_data));
+ sb1.consume(sb1.size());
+ std::size_t length = asio::read_until(s, sb1, match_char('Z'));
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, match_char('Z'));
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, match_char('Z'));
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, match_char('Z'), ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, match_char('Z'), ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb1.consume(sb1.size());
+ length = asio::read_until(s, sb1, match_char('Z'), ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, match_char('Z'), ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, match_char('Z'), ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, match_char('Z'), ec);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, match_char('Y'), ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, match_char('Y'), ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ sb2.consume(sb2.size());
+ length = asio::read_until(s, sb2, match_char('Y'), ec);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+}
+
+void test_streambuf_read_until_match_condition()
{
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
asio::io_context ioc;
test_stream s(ioc);
asio::streambuf sb1;
@@ -387,6 +654,7 @@ void test_match_condition_read_until()
length = asio::read_until(s, sb2, match_char('Y'), ec);
ASIO_CHECK(!ec);
ASIO_CHECK(length == 25);
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
void async_read_handler(
@@ -398,15 +666,170 @@ void async_read_handler(
*called = true;
}
-void test_char_async_read_until()
+void test_dynamic_string_async_read_until_char()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data1, data2;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb1 = asio::dynamic_buffer(data1);
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb2 = asio::dynamic_buffer(data2, 25);
+ asio::error_code ec;
+ std::size_t length;
+ bool called;
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, 'Z',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, 'Z',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, 'Z',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, 'Z',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, 'Z',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, 'Z',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, 'Y',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, 'Y',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, 'Y',
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ int i = asio::async_read_until(s, sb2, 'Y',
+ archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
+}
+
+void test_streambuf_async_read_until_char()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -555,17 +978,173 @@ void test_char_async_read_until()
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+}
+
+void test_dynamic_string_async_read_until_string()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data1, data2;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb1 = asio::dynamic_buffer(data1);
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb2 = asio::dynamic_buffer(data2, 25);
+ asio::error_code ec;
+ std::size_t length;
+ bool called;
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, "XYZ",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, "XYZ",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, "XYZ",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, "XYZ",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, "XYZ",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, "XYZ",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, "WXY",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, "WXY",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, "WXY",
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ int i = asio::async_read_until(s, sb2, "WXY",
+ archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
}
-void test_string_async_read_until()
+void test_streambuf_async_read_until_string()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -714,17 +1293,173 @@ void test_string_async_read_until()
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+}
+
+void test_dynamic_string_async_read_until_match_condition()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data1, data2;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb1 = asio::dynamic_buffer(data1);
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb2 = asio::dynamic_buffer(data2, 25);
+ asio::error_code ec;
+ std::size_t length;
+ bool called;
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, match_char('Z'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, match_char('Z'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb1.consume(sb1.size());
+ asio::async_read_until(s, sb1, match_char('Z'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 26);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, match_char('Z'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, match_char('Z'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, match_char('Z'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == asio::error::not_found);
+ ASIO_CHECK(length == 0);
+
+ s.reset(read_data, sizeof(read_data));
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, match_char('Y'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(1);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, match_char('Y'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ s.next_read_length(10);
+ ec = asio::error_code();
+ length = 0;
+ called = false;
+ sb2.consume(sb2.size());
+ asio::async_read_until(s, sb2, match_char('Y'),
+ bindns::bind(async_read_handler, _1, &ec,
+ _2, &length, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(length == 25);
+
+ s.reset(read_data, sizeof(read_data));
+ sb2.consume(sb2.size());
+ int i = asio::async_read_until(s, sb2, match_char('Y'),
+ archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
}
-void test_match_condition_async_read_until()
+void test_streambuf_async_read_until_match_condition()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -873,15 +1608,22 @@ void test_match_condition_async_read_until()
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
ASIO_TEST_SUITE
(
"read_until",
- ASIO_TEST_CASE(test_char_read_until)
- ASIO_TEST_CASE(test_string_read_until)
- ASIO_TEST_CASE(test_match_condition_read_until)
- ASIO_TEST_CASE(test_char_async_read_until)
- ASIO_TEST_CASE(test_string_async_read_until)
- ASIO_TEST_CASE(test_match_condition_async_read_until)
+ ASIO_TEST_CASE(test_dynamic_string_read_until_char)
+ ASIO_TEST_CASE(test_streambuf_read_until_char)
+ ASIO_TEST_CASE(test_dynamic_string_read_until_string)
+ ASIO_TEST_CASE(test_streambuf_read_until_string)
+ ASIO_TEST_CASE(test_dynamic_string_read_until_match_condition)
+ ASIO_TEST_CASE(test_streambuf_read_until_match_condition)
+ ASIO_TEST_CASE(test_dynamic_string_async_read_until_char)
+ ASIO_TEST_CASE(test_streambuf_async_read_until_char)
+ ASIO_TEST_CASE(test_dynamic_string_async_read_until_string)
+ ASIO_TEST_CASE(test_streambuf_async_read_until_string)
+ ASIO_TEST_CASE(test_dynamic_string_async_read_until_match_condition)
+ ASIO_TEST_CASE(test_streambuf_async_read_until_match_condition)
)
diff --git a/3rdparty/asio/src/tests/unit/readable_pipe.cpp b/3rdparty/asio/src/tests/unit/readable_pipe.cpp
new file mode 100644
index 00000000000..6f29710e3da
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/readable_pipe.cpp
@@ -0,0 +1,131 @@
+//
+// readable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header pipe is self-contained.
+#include "asio/readable_pipe.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// readable_pipe_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// readable_pipe compile and link correctly. Runtime failures are ignored.
+
+namespace readable_pipe_compile {
+
+struct write_some_handler
+{
+ write_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_handler(write_some_handler&&) {}
+private:
+ write_some_handler(const write_some_handler&);
+};
+
+struct read_some_handler
+{
+ read_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_handler(read_some_handler&&) {}
+private:
+ read_some_handler(const read_some_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+ const std::string path;
+
+ // basic_readable_pipe constructors.
+
+ readable_pipe pipe1(ioc);
+ readable_pipe::native_handle_type native_pipe1 = pipe1.native_handle();
+ readable_pipe pipe2(ioc, native_pipe1);
+
+ readable_pipe pipe3(ioc_ex);
+ readable_pipe::native_handle_type native_pipe2 = pipe1.native_handle();
+ readable_pipe pipe4(ioc_ex, native_pipe2);
+
+ readable_pipe pipe5(std::move(pipe4));
+
+ basic_readable_pipe<io_context::executor_type> pipe6(ioc);
+ readable_pipe pipe7(std::move(pipe6));
+
+ // basic_readable_pipe operators.
+
+ pipe1 = readable_pipe(ioc);
+ pipe1 = std::move(pipe2);
+ pipe1 = std::move(pipe6);
+
+ // basic_io_object functions.
+
+ readable_pipe::executor_type ex = pipe1.get_executor();
+ (void)ex;
+
+ // basic_readable_pipe functions.
+
+ readable_pipe::native_handle_type native_pipe3 = pipe1.native_handle();
+ pipe1.assign(native_pipe3);
+ readable_pipe::native_handle_type native_pipe4 = pipe1.native_handle();
+ pipe1.assign(native_pipe4, ec);
+
+ bool is_open = pipe1.is_open();
+ (void)is_open;
+
+ pipe1.close();
+ pipe1.close(ec);
+
+ readable_pipe::native_handle_type native_pipe5 = pipe1.release();
+ (void)native_pipe5;
+ readable_pipe::native_handle_type native_pipe6 = pipe1.release(ec);
+ (void)native_pipe6;
+
+ readable_pipe::native_handle_type native_pipe7 = pipe1.native_handle();
+ (void)native_pipe7;
+
+ pipe1.cancel();
+ pipe1.cancel(ec);
+
+ pipe1.read_some(buffer(mutable_char_buffer));
+ pipe1.read_some(buffer(mutable_char_buffer), ec);
+
+ pipe1.async_read_some(buffer(mutable_char_buffer), read_some_handler());
+ int i3 = pipe1.async_read_some(buffer(mutable_char_buffer), lazy);
+ (void)i3;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace readable_pipe_compile
+
+ASIO_TEST_SUITE
+(
+ "readable_pipe",
+ ASIO_COMPILE_TEST_CASE(readable_pipe_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/recycling_allocator.cpp b/3rdparty/asio/src/tests/unit/recycling_allocator.cpp
new file mode 100644
index 00000000000..cc4654fc9f0
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/recycling_allocator.cpp
@@ -0,0 +1,80 @@
+//
+// recycling_allocator.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/recycling_allocator.hpp"
+
+#include "unit_test.hpp"
+#include <vector>
+#include "asio/detail/type_traits.hpp"
+
+void recycling_allocator_test()
+{
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<int>::value_type,
+ int
+ >::value));
+
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<void>::value_type,
+ void
+ >::value));
+
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<int>::rebind<char>::other,
+ asio::recycling_allocator<char>
+ >::value));
+
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<void>::rebind<char>::other,
+ asio::recycling_allocator<char>
+ >::value));
+
+ asio::recycling_allocator<int> a1;
+ asio::recycling_allocator<int> a2(a1);
+
+ ASIO_CHECK(a1 == a2);
+ ASIO_CHECK(!(a1 != a2));
+
+ asio::recycling_allocator<void> a3;
+ asio::recycling_allocator<void> a4(a3);
+
+ ASIO_CHECK(a3 == a4);
+ ASIO_CHECK(!(a3 != a4));
+
+ asio::recycling_allocator<int> a5(a4);
+ (void)a5;
+
+ asio::recycling_allocator<void> a6(a5);
+ (void)a6;
+
+ int* p = a1.allocate(42);
+ ASIO_CHECK(p != 0);
+
+ a1.deallocate(p, 42);
+
+ std::vector<int, asio::recycling_allocator<int> > v(42);
+ ASIO_CHECK(v.size() == 42);
+}
+
+ASIO_TEST_SUITE
+(
+ "recycling_allocator",
+ ASIO_TEST_CASE(recycling_allocator_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/redirect_error.cpp b/3rdparty/asio/src/tests/unit/redirect_error.cpp
new file mode 100644
index 00000000000..7a581495566
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/redirect_error.cpp
@@ -0,0 +1,121 @@
+//
+// redirect_error.cpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/redirect_error.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/deferred.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "asio/use_future.hpp"
+#include "unit_test.hpp"
+
+struct redirect_error_handler
+{
+ int* count_;
+
+ explicit redirect_error_handler(int* c)
+ : count_(c)
+ {
+ }
+
+ void operator()()
+ {
+ ++(*count_);
+ }
+};
+
+void redirect_error_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ asio::error_code ec = asio::error::would_block;
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::redirect_error(
+ asio::bind_executor(io2.get_executor(),
+ redirect_error_handler(&count)), ec));
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(count == 1);
+
+ ec = asio::error::would_block;
+ timer1.async_wait(
+ asio::redirect_error(
+ asio::bind_executor(io2.get_executor(),
+ asio::deferred), ec))(redirect_error_handler(&count));
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 1);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 1);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(count == 2);
+
+#if defined(ASIO_HAS_STD_FUTURE_CLASS)
+ ec = asio::error::would_block;
+ std::future<void> f = timer1.async_wait(
+ asio::redirect_error(
+ asio::bind_executor(io2.get_executor(),
+ asio::use_future), ec));
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::ready);
+#endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
+}
+
+ASIO_TEST_SUITE
+(
+ "redirect_error",
+ ASIO_TEST_CASE(redirect_error_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/registered_buffer.cpp b/3rdparty/asio/src/tests/unit/registered_buffer.cpp
new file mode 100644
index 00000000000..09c33415a14
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/registered_buffer.cpp
@@ -0,0 +1,111 @@
+//
+// registered_buffer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/registered_buffer.hpp"
+
+#include "unit_test.hpp"
+
+//------------------------------------------------------------------------------
+
+// registered_buffer_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all the mutable_registered_buffer and
+// const_registered_buffer classes compile and link correctly. Runtime
+// failures are ignored.
+
+namespace registered_buffer_compile {
+
+using namespace asio;
+
+void test()
+{
+ try
+ {
+ // mutable_registered_buffer constructors.
+
+ mutable_registered_buffer mb1;
+ mutable_registered_buffer mb2(mb1);
+ (void)mb2;
+
+ // mutable_registered_buffer functions.
+
+ mutable_buffer b1 = mb1.buffer();
+ (void)b1;
+
+ void* ptr1 = mb1.data();
+ (void)ptr1;
+
+ std::size_t n1 = mb1.size();
+ (void)n1;
+
+ registered_buffer_id id1 = mb1.id();
+ (void)id1;
+
+ // mutable_registered_buffer operators.
+
+ mb1 += 128;
+ mb1 = mb2 + 128;
+ mb1 = 128 + mb2;
+
+ // const_registered_buffer constructors.
+
+ const_registered_buffer cb1;
+ const_registered_buffer cb2(cb1);
+ (void)cb2;
+ const_registered_buffer cb3(mb1);
+ (void)cb3;
+
+ // const_registered_buffer functions.
+
+ const_buffer b2 = cb1.buffer();
+ (void)b2;
+
+ const void* ptr2 = cb1.data();
+ (void)ptr2;
+
+ std::size_t n2 = cb1.size();
+ (void)n2;
+
+ registered_buffer_id id2 = cb1.id();
+ (void)id2;
+
+ // const_registered_buffer operators.
+
+ cb1 += 128;
+ cb1 = cb2 + 128;
+ cb1 = 128 + cb2;
+
+ // buffer function overloads.
+
+ mb1 = buffer(mb2);
+ mb1 = buffer(mb2, 128);
+ cb1 = buffer(cb2);
+ cb1 = buffer(cb2, 128);
+ }
+ catch (std::exception&)
+ {
+ }
+}
+
+} // namespace buffer_compile
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "registered_buffer",
+ ASIO_COMPILE_TEST_CASE(registered_buffer_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/serial_port.cpp b/3rdparty/asio/src/tests/unit/serial_port.cpp
index ff6e2dc261a..9bbafd34d9b 100644
--- a/3rdparty/asio/src/tests/unit/serial_port.cpp
+++ b/3rdparty/asio/src/tests/unit/serial_port.cpp
@@ -2,7 +2,7 @@
// serial_port.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -34,22 +34,18 @@ struct write_some_handler
{
write_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
write_some_handler(write_some_handler&&) {}
private:
write_some_handler(const write_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct read_some_handler
{
read_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
read_some_handler(read_some_handler&&) {}
private:
read_some_handler(const read_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -60,6 +56,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
serial_port::baud_rate serial_port_option;
@@ -71,48 +68,49 @@ void test()
serial_port port1(ioc);
serial_port port2(ioc, "null");
serial_port::native_handle_type native_port1 = port1.native_handle();
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
serial_port port3(ioc, native_port1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- serial_port port4(std::move(port3));
-#endif // defined(ASIO_HAS_MOVE)
+ serial_port port4(ioc_ex);
+ serial_port port5(ioc_ex, "null");
+ serial_port::native_handle_type native_port2 = port1.native_handle();
+ serial_port port6(ioc_ex, native_port2);
+
+ serial_port port7(std::move(port6));
+
+ basic_serial_port<io_context::executor_type> port8(ioc);
+ serial_port port9(std::move(port8));
// basic_serial_port operators.
-#if defined(ASIO_HAS_MOVE)
port1 = serial_port(ioc);
port1 = std::move(port2);
-#endif // defined(ASIO_HAS_MOVE)
+ port1 = std::move(port8);
// basic_io_object functions.
serial_port::executor_type ex = port1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = port1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = port1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// basic_serial_port functions.
serial_port::lowest_layer_type& lowest_layer = port1.lowest_layer();
(void)lowest_layer;
- const serial_port& port5 = port1;
- const serial_port::lowest_layer_type& lowest_layer2 = port5.lowest_layer();
+ const serial_port& port10 = port1;
+ const serial_port::lowest_layer_type& lowest_layer2 = port10.lowest_layer();
(void)lowest_layer2;
port1.open("null");
port1.open("null", ec);
- serial_port::native_handle_type native_port2 = port1.native_handle();
- port1.assign(native_port2);
serial_port::native_handle_type native_port3 = port1.native_handle();
- port1.assign(native_port3, ec);
+ port1.assign(native_port3);
+ serial_port::native_handle_type native_port4 = port1.native_handle();
+ port1.assign(native_port4, ec);
bool is_open = port1.is_open();
(void)is_open;
@@ -120,8 +118,8 @@ void test()
port1.close();
port1.close(ec);
- serial_port::native_handle_type native_port4 = port1.native_handle();
- (void)native_port4;
+ serial_port::native_handle_type native_port5 = port1.native_handle();
+ (void)native_port5;
port1.cancel();
port1.cancel(ec);
@@ -167,5 +165,5 @@ void test()
ASIO_TEST_SUITE
(
"serial_port",
- ASIO_TEST_CASE(serial_port_compile::test)
+ ASIO_COMPILE_TEST_CASE(serial_port_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/serial_port_base.cpp b/3rdparty/asio/src/tests/unit/serial_port_base.cpp
index d05e7bbaafe..1c888ef661c 100644
--- a/3rdparty/asio/src/tests/unit/serial_port_base.cpp
+++ b/3rdparty/asio/src/tests/unit/serial_port_base.cpp
@@ -2,7 +2,7 @@
// serial_port_base.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -95,5 +95,5 @@ void test()
ASIO_TEST_SUITE
(
"serial_port_base",
- ASIO_TEST_CASE(serial_port_base_compile::test)
+ ASIO_COMPILE_TEST_CASE(serial_port_base_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/serial_port_service.cpp b/3rdparty/asio/src/tests/unit/serial_port_service.cpp
deleted file mode 100644
index c0c596194e7..00000000000
--- a/3rdparty/asio/src/tests/unit/serial_port_service.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// serial_port_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/serial_port_service.hpp"
-
-#include "unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "serial_port_service",
- ASIO_TEST_CASE(null_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/signal_set.cpp b/3rdparty/asio/src/tests/unit/signal_set.cpp
index 7118bb96ac0..962be8ba92e 100644
--- a/3rdparty/asio/src/tests/unit/signal_set.cpp
+++ b/3rdparty/asio/src/tests/unit/signal_set.cpp
@@ -2,7 +2,7 @@
// signal_set.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -40,6 +40,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -50,24 +51,24 @@ void test()
signal_set set3(ioc, 1, 2);
signal_set set4(ioc, 1, 2, 3);
+ signal_set set5(ioc_ex);
+ signal_set set6(ioc_ex, 1);
+ signal_set set7(ioc_ex, 1, 2);
+ signal_set set8(ioc_ex, 1, 2, 3);
+
// basic_io_object functions.
signal_set::executor_type ex = set1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = set1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = set1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// basic_signal_set functions.
set1.add(1);
set1.add(1, ec);
+ set1.add(1, signal_set::flags::dont_care);
+ set1.add(1, signal_set::flags::dont_care, ec);
+
set1.remove(1);
set1.remove(1, ec);
@@ -93,5 +94,5 @@ void test()
ASIO_TEST_SUITE
(
"signal_set",
- ASIO_TEST_CASE(signal_set_compile::test)
+ ASIO_COMPILE_TEST_CASE(signal_set_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/signal_set_base.cpp b/3rdparty/asio/src/tests/unit/signal_set_base.cpp
new file mode 100644
index 00000000000..7f27e8ccc2e
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/signal_set_base.cpp
@@ -0,0 +1,30 @@
+//
+// signal_set_base.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/signal_set_base.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "signal_set_base",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/socket_acceptor_service.cpp b/3rdparty/asio/src/tests/unit/socket_acceptor_service.cpp
deleted file mode 100644
index 772218631a6..00000000000
--- a/3rdparty/asio/src/tests/unit/socket_acceptor_service.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// socket_acceptor_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/socket_acceptor_service.hpp"
-
-#include "unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "socket_acceptor_service",
- ASIO_TEST_CASE(null_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/socket_base.cpp b/3rdparty/asio/src/tests/unit/socket_base.cpp
index f7170ace0e9..21f63ab433c 100644
--- a/3rdparty/asio/src/tests/unit/socket_base.cpp
+++ b/3rdparty/asio/src/tests/unit/socket_base.cpp
@@ -2,7 +2,7 @@
// socket_base.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -155,6 +155,17 @@ void test()
linger1.timeout(1);
(void)static_cast<int>(linger1.timeout());
+ // out_of_band_inline class.
+
+ socket_base::out_of_band_inline out_of_band_inline1(true);
+ sock.set_option(out_of_band_inline1);
+ socket_base::out_of_band_inline out_of_band_inline2;
+ sock.get_option(out_of_band_inline2);
+ out_of_band_inline1 = true;
+ (void)static_cast<bool>(out_of_band_inline1);
+ (void)static_cast<bool>(!out_of_band_inline1);
+ (void)static_cast<bool>(out_of_band_inline1.value());
+
// enable_connection_aborted class.
socket_base::enable_connection_aborted enable_connection_aborted1(true);
@@ -634,6 +645,6 @@ void test()
ASIO_TEST_SUITE
(
"socket_base",
- ASIO_TEST_CASE(socket_base_compile::test)
+ ASIO_COMPILE_TEST_CASE(socket_base_compile::test)
ASIO_TEST_CASE(socket_base_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ssl/.gitignore b/3rdparty/asio/src/tests/unit/ssl/.gitignore
deleted file mode 100644
index 5c2ad3eba55..00000000000
--- a/3rdparty/asio/src/tests/unit/ssl/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-context
-context_base
-rfc2818_verification
-stream
-stream_base
diff --git a/3rdparty/asio/src/tests/unit/ssl/context.cpp b/3rdparty/asio/src/tests/unit/ssl/context.cpp
index 27d63d5a9bc..621bf11c4a0 100644
--- a/3rdparty/asio/src/tests/unit/ssl/context.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/context.cpp
@@ -2,7 +2,7 @@
// context.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/context_base.cpp b/3rdparty/asio/src/tests/unit/ssl/context_base.cpp
index 19ef5740d2f..9ddddad3a8e 100644
--- a/3rdparty/asio/src/tests/unit/ssl/context_base.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/context_base.cpp
@@ -2,7 +2,7 @@
// context_base.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/resolver_service.cpp b/3rdparty/asio/src/tests/unit/ssl/error.cpp
index 7b0ac2a9ac3..633d7b61e8f 100644
--- a/3rdparty/asio/src/tests/unit/ip/resolver_service.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/error.cpp
@@ -1,8 +1,8 @@
//
-// resolver_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~
+// error.cpp
+// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/ip/resolver_service.hpp"
+#include "asio/ssl/error.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "ip/resolver_service",
+ "ssl/error",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/waitable_timer_service.cpp b/3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp
index 3aa530aab75..7126e4b083a 100644
--- a/3rdparty/asio/src/tests/unit/waitable_timer_service.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp
@@ -1,8 +1,8 @@
//
-// waitable_timer_service.cpp
+// host_name_verification.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/waitable_timer_service.hpp"
+#include "asio/ssl/host_name_verification.hpp"
-#include "unit_test.hpp"
+#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "waitable_timer_service",
+ "ssl/host_name_verification",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp b/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp
index 15e0b5e35c3..adcfa95ded8 100644
--- a/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp
@@ -2,7 +2,7 @@
// rfc2818_verification.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/stream.cpp b/3rdparty/asio/src/tests/unit/ssl/stream.cpp
index 542949eb60c..467115169b9 100644
--- a/3rdparty/asio/src/tests/unit/ssl/stream.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/stream.cpp
@@ -2,7 +2,7 @@
// stream.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -75,19 +75,19 @@ void test()
ip::tcp::socket socket1(ioc, ip::tcp::v4());
ssl::stream<ip::tcp::socket&> stream2(socket1, context);
+ ssl::stream<ip::tcp::socket> stream3
+ = ssl::stream<ip::tcp::socket>(ioc, context);
+ ssl::stream<ip::tcp::socket> stream4(std::move(stream3));
+
+ // ssl::stream assignment.
+
+ stream3 = std::move(stream4);
+
// basic_io_object functions.
ssl::stream<ip::tcp::socket>::executor_type ex = stream1.get_executor();
(void)ex;
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = stream1.get_io_context();
- (void)ioc_ref;
-
- io_context& ioc_ref2 = stream1.get_io_service();
- (void)ioc_ref2;
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// ssl::stream functions.
SSL* ssl1 = stream1.native_handle();
@@ -97,9 +97,9 @@ void test()
= stream1.lowest_layer();
(void)lowest_layer;
- const ssl::stream<ip::tcp::socket>& stream3 = stream1;
+ const ssl::stream<ip::tcp::socket>& stream5 = stream1;
const ssl::stream<ip::tcp::socket>::lowest_layer_type& lowest_layer2
- = stream3.lowest_layer();
+ = stream5.lowest_layer();
(void)lowest_layer2;
stream1.set_verify_mode(ssl::verify_none);
@@ -195,5 +195,5 @@ void test()
ASIO_TEST_SUITE
(
"ssl/stream",
- ASIO_TEST_CASE(ssl_stream_compile::test)
+ ASIO_COMPILE_TEST_CASE(ssl_stream_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp b/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp
index 4dbc9e3b232..7e6a1e62ef0 100644
--- a/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp
@@ -2,7 +2,7 @@
// stream_base.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/static_thread_pool.cpp b/3rdparty/asio/src/tests/unit/static_thread_pool.cpp
new file mode 100644
index 00000000000..b9b050bf7ee
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/static_thread_pool.cpp
@@ -0,0 +1,30 @@
+//
+// static_thread_pool.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/static_thread_pool.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "static_thread_pool",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/steady_timer.cpp b/3rdparty/asio/src/tests/unit/steady_timer.cpp
index 18d4a8152fe..fe2c041db4e 100644
--- a/3rdparty/asio/src/tests/unit/steady_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/steady_timer.cpp
@@ -2,7 +2,7 @@
// steady_timer.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/strand.cpp b/3rdparty/asio/src/tests/unit/strand.cpp
index 02a0f7d58fa..90ae2bc22a8 100644
--- a/3rdparty/asio/src/tests/unit/strand.cpp
+++ b/3rdparty/asio/src/tests/unit/strand.cpp
@@ -2,7 +2,7 @@
// strand.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,7 +16,9 @@
// Test that header file is self-contained.
#include "asio/strand.hpp"
+#include <functional>
#include <sstream>
+#include "asio/executor.hpp"
#include "asio/io_context.hpp"
#include "asio/dispatch.hpp"
#include "asio/post.hpp"
@@ -29,24 +31,13 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
@@ -56,7 +47,7 @@ void increment(int* count)
++(*count);
}
-void increment_without_lock(io_context::strand* s, int* count)
+void increment_without_lock(strand<io_context::executor_type>* s, int* count)
{
ASIO_CHECK(!s->running_in_this_thread());
@@ -69,7 +60,7 @@ void increment_without_lock(io_context::strand* s, int* count)
ASIO_CHECK(*count == original_count + 1);
}
-void increment_with_lock(io_context::strand* s, int* count)
+void increment_with_lock(strand<io_context::executor_type>* s, int* count)
{
ASIO_CHECK(s->running_in_this_thread());
@@ -90,7 +81,28 @@ void sleep_increment(io_context* ioc, int* count)
++(*count);
}
-void start_sleep_increments(io_context* ioc, io_context::strand* s, int* count)
+void increment_by_a(int* count, int a)
+{
+ (*count) += a;
+}
+
+void increment_by_a_b(int* count, int a, int b)
+{
+ (*count) += a + b;
+}
+
+void increment_by_a_b_c(int* count, int a, int b, int c)
+{
+ (*count) += a + b + c;
+}
+
+void increment_by_a_b_c_d(int* count, int a, int b, int c, int d)
+{
+ (*count) += a + b + c + d;
+}
+
+void start_sleep_increments(io_context* ioc,
+ strand<io_context::executor_type>* s, int* count)
{
// Give all threads a chance to start.
timer t(*ioc, chronons::seconds(2));
@@ -115,7 +127,7 @@ void io_context_run(io_context* ioc)
void strand_test()
{
io_context ioc;
- io_context::strand s(ioc);
+ strand<io_context::executor_type> s = make_strand(ioc);
int count = 0;
post(ioc, bindns::bind(increment_without_lock, &s, &count));
@@ -207,7 +219,7 @@ void strand_test()
// Check for clean shutdown when handlers posted through an orphaned strand
// are abandoned.
{
- io_context::strand s2(ioc);
+ strand<io_context::executor_type> s2 = make_strand(ioc.get_executor());
post(s2, bindns::bind(increment, &count));
post(s2, bindns::bind(increment, &count));
post(s2, bindns::bind(increment, &count));
@@ -217,8 +229,230 @@ void strand_test()
ASIO_CHECK(count == 0);
}
+void strand_conversion_test()
+{
+ io_context ioc;
+ strand<io_context::executor_type> s1 = make_strand(ioc);
+
+ // Converting constructors.
+
+ strand<executor> s2(s1);
+ strand<executor> s3 = strand<io_context::executor_type>(s1);
+
+ // Converting assignment.
+
+ s3 = s1;
+ s3 = strand<io_context::executor_type>(s1);
+}
+
+void strand_query_test()
+{
+ io_context ioc;
+ strand<io_context::executor_type> s1 = make_strand(ioc);
+
+ ASIO_CHECK(
+ &asio::query(s1, asio::execution::context)
+ == &ioc);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::mapping)
+ == asio::execution::mapping.thread);
+
+ ASIO_CHECK(
+ asio::query(s1, asio::execution::allocator)
+ == std::allocator<void>());
+}
+
+void strand_execute_test()
+{
+ io_context ioc;
+ strand<io_context::executor_type> s1 = make_strand(ioc);
+ int count = 0;
+
+ s1.execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(s1, asio::execution::blocking.possibly).execute(
+ bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(s1, asio::execution::blocking.never).execute(
+ bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ ASIO_CHECK(!ioc.stopped());
+
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::prefer(
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+
+ count = 0;
+ ioc.restart();
+ asio::prefer(
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
+
+ // No handlers can be called until run() is called.
+ ASIO_CHECK(!ioc.stopped());
+ ASIO_CHECK(count == 0);
+
+ ioc.run();
+
+ // The run() call will not return until all work has finished.
+ ASIO_CHECK(ioc.stopped());
+ ASIO_CHECK(count == 1);
+}
+
ASIO_TEST_SUITE
(
"strand",
ASIO_TEST_CASE(strand_test)
+ ASIO_COMPILE_TEST_CASE(strand_conversion_test)
+ ASIO_TEST_CASE(strand_query_test)
+ ASIO_TEST_CASE(strand_execute_test)
)
diff --git a/3rdparty/asio/src/tests/unit/stream_file.cpp b/3rdparty/asio/src/tests/unit/stream_file.cpp
new file mode 100644
index 00000000000..a4416751cd2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/stream_file.cpp
@@ -0,0 +1,173 @@
+//
+// stream_file.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/stream_file.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// stream_file_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// stream_file compile and link correctly. Runtime failures are ignored.
+
+namespace stream_file_compile {
+
+struct write_some_handler
+{
+ write_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_handler(write_some_handler&&) {}
+private:
+ write_some_handler(const write_some_handler&);
+};
+
+struct read_some_handler
+{
+ read_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_handler(read_some_handler&&) {}
+private:
+ read_some_handler(const read_some_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_FILE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+ const std::string path;
+
+ // basic_stream_file constructors.
+
+ stream_file file1(ioc);
+ stream_file file2(ioc, "", stream_file::read_only);
+ stream_file file3(ioc, path, stream_file::read_only);
+ stream_file::native_handle_type native_file1 = file1.native_handle();
+ stream_file file4(ioc, native_file1);
+
+ stream_file file5(ioc_ex);
+ stream_file file6(ioc_ex, "", stream_file::read_only);
+ stream_file file7(ioc_ex, path, stream_file::read_only);
+ stream_file::native_handle_type native_file2 = file1.native_handle();
+ stream_file file8(ioc_ex, native_file2);
+
+ stream_file file9(std::move(file8));
+
+ basic_stream_file<io_context::executor_type> file10(ioc);
+ stream_file file11(std::move(file10));
+
+ // basic_stream_file operators.
+
+ file1 = stream_file(ioc);
+ file1 = std::move(file2);
+ file1 = std::move(file10);
+
+ // basic_io_object functions.
+
+ stream_file::executor_type ex = file1.get_executor();
+ (void)ex;
+
+ // basic_stream_file functions.
+
+ file1.open("", stream_file::read_only);
+ file1.open("", stream_file::read_only, ec);
+
+ file1.open(path, stream_file::read_only);
+ file1.open(path, stream_file::read_only, ec);
+
+ stream_file::native_handle_type native_file3 = file1.native_handle();
+ file1.assign(native_file3);
+ stream_file::native_handle_type native_file4 = file1.native_handle();
+ file1.assign(native_file4, ec);
+
+ bool is_open = file1.is_open();
+ (void)is_open;
+
+ file1.close();
+ file1.close(ec);
+
+ stream_file::native_handle_type native_file5 = file1.native_handle();
+ (void)native_file5;
+
+ stream_file::native_handle_type native_file6 = file1.release();
+ (void)native_file6;
+ stream_file::native_handle_type native_file7 = file1.release(ec);
+ (void)native_file7;
+
+ file1.cancel();
+ file1.cancel(ec);
+
+ asio::uint64_t s1 = file1.size();
+ (void)s1;
+ asio::uint64_t s2 = file1.size(ec);
+ (void)s2;
+
+ file1.resize(asio::uint64_t(0));
+ file1.resize(asio::uint64_t(0), ec);
+
+ file1.sync_all();
+ file1.sync_all(ec);
+
+ file1.sync_data();
+ file1.sync_data(ec);
+
+ asio::uint64_t s3 = file1.seek(0, stream_file::seek_set);
+ (void)s3;
+ asio::uint64_t s4 = file1.seek(0, stream_file::seek_set, ec);
+ (void)s4;
+
+ file1.write_some(buffer(mutable_char_buffer));
+ file1.write_some(buffer(const_char_buffer));
+ file1.write_some(buffer(mutable_char_buffer), ec);
+ file1.write_some(buffer(const_char_buffer), ec);
+
+ file1.async_write_some(buffer(mutable_char_buffer), write_some_handler());
+ file1.async_write_some(buffer(const_char_buffer), write_some_handler());
+ int i1 = file1.async_write_some(buffer(mutable_char_buffer), lazy);
+ (void)i1;
+ int i2 = file1.async_write_some(buffer(const_char_buffer), lazy);
+ (void)i2;
+
+ file1.read_some(buffer(mutable_char_buffer));
+ file1.read_some(buffer(mutable_char_buffer), ec);
+
+ file1.async_read_some(buffer(mutable_char_buffer), read_some_handler());
+ int i3 = file1.async_read_some(buffer(mutable_char_buffer), lazy);
+ (void)i3;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_FILE)
+}
+
+} // namespace stream_file_compile
+
+ASIO_TEST_SUITE
+(
+ "stream_file",
+ ASIO_COMPILE_TEST_CASE(stream_file_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/streambuf.cpp b/3rdparty/asio/src/tests/unit/streambuf.cpp
index 5e10e726d1c..c1c8477a242 100644
--- a/3rdparty/asio/src/tests/unit/streambuf.cpp
+++ b/3rdparty/asio/src/tests/unit/streambuf.cpp
@@ -2,7 +2,7 @@
// streambuf.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/system_context.cpp b/3rdparty/asio/src/tests/unit/system_context.cpp
new file mode 100644
index 00000000000..297ab6bd7c1
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/system_context.cpp
@@ -0,0 +1,30 @@
+//
+// system_context.cpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/system_context.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "system_context",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/system_executor.cpp b/3rdparty/asio/src/tests/unit/system_executor.cpp
new file mode 100644
index 00000000000..7b811ccac0c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/system_executor.cpp
@@ -0,0 +1,147 @@
+//
+// system_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/system_executor.hpp"
+
+#include <functional>
+#include "asio/dispatch.hpp"
+#include "asio/post.hpp"
+#include "unit_test.hpp"
+
+using namespace asio;
+
+namespace bindns = std;
+
+void increment(asio::detail::atomic_count* count)
+{
+ ++(*count);
+}
+
+void system_executor_query_test()
+{
+ ASIO_CHECK(
+ &asio::query(system_executor(),
+ asio::execution::context)
+ != static_cast<const system_context*>(0));
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::mapping)
+ == asio::execution::mapping.thread);
+
+ ASIO_CHECK(
+ asio::query(system_executor(),
+ asio::execution::allocator)
+ == std::allocator<void>());
+}
+
+void system_executor_execute_test()
+{
+ asio::detail::atomic_count count(0);
+
+ system_executor().execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.possibly
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.always
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
+
+ asio::query(system_executor(), execution::context).join();
+
+ ASIO_CHECK(count == 9);
+}
+
+ASIO_TEST_SUITE
+(
+ "system_executor",
+ ASIO_TEST_CASE(system_executor_query_test)
+ ASIO_TEST_CASE(system_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/system_timer.cpp b/3rdparty/asio/src/tests/unit/system_timer.cpp
index 3f77a2e74dc..26a5720129f 100644
--- a/3rdparty/asio/src/tests/unit/system_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/system_timer.cpp
@@ -2,7 +2,7 @@
// system_timer.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -21,25 +21,15 @@
// Test that header file is self-contained.
#include "asio/system_timer.hpp"
-#include "unit_test.hpp"
-
-#if defined(ASIO_HAS_STD_CHRONO)
-
+#include <functional>
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/cancellation_signal.hpp"
#include "asio/executor_work_guard.hpp"
#include "asio/io_context.hpp"
#include "asio/thread.hpp"
+#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
void increment(int* count)
{
@@ -90,12 +80,11 @@ void system_timer_test()
{
using asio::chrono::seconds;
using asio::chrono::microseconds;
-#if !defined(ASIO_HAS_BOOST_BIND)
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // !defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
+ const asio::io_context::executor_type ioc_ex = ioc.get_executor();
int count = 0;
asio::system_timer::time_point start = now();
@@ -110,7 +99,7 @@ void system_timer_test()
start = now();
- asio::system_timer t2(ioc, seconds(1) + microseconds(500000));
+ asio::system_timer t2(ioc_ex, seconds(1) + microseconds(500000));
t2.wait();
// The timer must block until after its expiry time.
@@ -236,11 +225,9 @@ struct timer_handler
{
timer_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
timer_handler(timer_handler&&) {}
private:
timer_handler(const timer_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void system_timer_cancel_test()
@@ -271,21 +258,77 @@ struct custom_allocation_timer_handler
custom_allocation_timer_handler(int* count) : count_(count) {}
void operator()(const asio::error_code&) {}
int* count_;
-};
-void* asio_handler_allocate(std::size_t size,
- custom_allocation_timer_handler* handler)
-{
- ++(*handler->count_);
- return ::operator new(size);
-}
+ template <typename T>
+ struct allocator
+ {
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef T value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef allocator<U> other;
+ };
-void asio_handler_deallocate(void* pointer, std::size_t,
- custom_allocation_timer_handler* handler)
-{
- --(*handler->count_);
- ::operator delete(pointer);
-}
+ explicit allocator(int* count) noexcept
+ : count_(count)
+ {
+ }
+
+ allocator(const allocator& other) noexcept
+ : count_(other.count_)
+ {
+ }
+
+ template <typename U>
+ allocator(const allocator<U>& other) noexcept
+ : count_(other.count_)
+ {
+ }
+
+ pointer allocate(size_type n, const void* = 0)
+ {
+ ++(*count_);
+ return static_cast<T*>(::operator new(sizeof(T) * n));
+ }
+
+ void deallocate(pointer p, size_type)
+ {
+ --(*count_);
+ ::operator delete(p);
+ }
+
+ size_type max_size() const
+ {
+ return ~size_type(0);
+ }
+
+ void construct(pointer p, const T& v)
+ {
+ new (p) T(v);
+ }
+
+ void destroy(pointer p)
+ {
+ p->~T();
+ }
+
+ int* count_;
+ };
+
+ typedef allocator<int> allocator_type;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_type(count_);
+ }
+};
void system_timer_custom_allocation_test()
{
@@ -349,7 +392,6 @@ void system_timer_thread_test()
ASIO_CHECK(count == 1);
}
-#if defined(ASIO_HAS_MOVE)
asio::system_timer make_timer(asio::io_context& ioc, int* count)
{
asio::system_timer t(ioc);
@@ -357,11 +399,22 @@ asio::system_timer make_timer(asio::io_context& ioc, int* count)
t.async_wait(bindns::bind(increment, count));
return t;
}
-#endif
+
+typedef asio::basic_waitable_timer<
+ asio::system_timer::clock_type,
+ asio::system_timer::traits_type,
+ asio::io_context::executor_type> io_context_system_timer;
+
+io_context_system_timer make_convertible_timer(asio::io_context& ioc, int* count)
+{
+ io_context_system_timer t(ioc);
+ t.expires_after(asio::chrono::seconds(1));
+ t.async_wait(bindns::bind(increment, count));
+ return t;
+}
void system_timer_move_test()
{
-#if defined(ASIO_HAS_MOVE)
asio::io_context io_context1;
asio::io_context io_context2;
int count = 0;
@@ -379,7 +432,60 @@ void system_timer_move_test()
io_context1.run();
ASIO_CHECK(count == 2);
-#endif // defined(ASIO_HAS_MOVE)
+
+ asio::system_timer t4 = make_convertible_timer(io_context1, &count);
+ asio::system_timer t5 = make_convertible_timer(io_context2, &count);
+ asio::system_timer t6 = std::move(t4);
+
+ t2 = std::move(t4);
+
+ io_context2.restart();
+ io_context2.run();
+
+ ASIO_CHECK(count == 3);
+
+ io_context1.restart();
+ io_context1.run();
+
+ ASIO_CHECK(count == 4);
+}
+
+void system_timer_op_cancel_test()
+{
+ asio::cancellation_signal cancel_signal;
+ asio::io_context ioc;
+ int count = 0;
+
+ asio::system_timer timer(ioc, asio::chrono::seconds(10));
+
+ timer.async_wait(bindns::bind(increment, &count));
+
+ timer.async_wait(
+ asio::bind_cancellation_slot(
+ cancel_signal.slot(),
+ bindns::bind(increment, &count)));
+
+ timer.async_wait(bindns::bind(increment, &count));
+
+ ioc.poll();
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(!ioc.stopped());
+
+ cancel_signal.emit(asio::cancellation_type::all);
+
+ ioc.run_one();
+ ioc.poll();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(!ioc.stopped());
+
+ timer.cancel();
+
+ ioc.run();
+
+ ASIO_CHECK(count == 3);
+ ASIO_CHECK(ioc.stopped());
}
ASIO_TEST_SUITE
@@ -390,11 +496,5 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(system_timer_custom_allocation_test)
ASIO_TEST_CASE(system_timer_thread_test)
ASIO_TEST_CASE(system_timer_move_test)
+ ASIO_TEST_CASE(system_timer_op_cancel_test)
)
-#else // defined(ASIO_HAS_STD_CHRONO)
-ASIO_TEST_SUITE
-(
- "system_timer",
- ASIO_TEST_CASE(null_test)
-)
-#endif // defined(ASIO_HAS_STD_CHRONO)
diff --git a/3rdparty/asio/src/tests/unit/this_coro.cpp b/3rdparty/asio/src/tests/unit/this_coro.cpp
new file mode 100644
index 00000000000..d1e0fc677c5
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/this_coro.cpp
@@ -0,0 +1,25 @@
+//
+// this_coro.cpp
+// ~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/this_coro.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "this_coro",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/thread.cpp b/3rdparty/asio/src/tests/unit/thread.cpp
index 4096c9a7959..b84db72158e 100644
--- a/3rdparty/asio/src/tests/unit/thread.cpp
+++ b/3rdparty/asio/src/tests/unit/thread.cpp
@@ -2,7 +2,7 @@
// thread.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/thread_pool.cpp b/3rdparty/asio/src/tests/unit/thread_pool.cpp
new file mode 100644
index 00000000000..f65d7963c26
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/thread_pool.cpp
@@ -0,0 +1,283 @@
+//
+// thread_pool.cpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/thread_pool.hpp"
+
+#include <functional>
+#include "asio/dispatch.hpp"
+#include "asio/post.hpp"
+#include "unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void decrement_to_zero(thread_pool* pool, int* count)
+{
+ if (*count > 0)
+ {
+ --(*count);
+
+ int before_value = *count;
+ asio::post(*pool, bindns::bind(decrement_to_zero, pool, count));
+
+ // Handler execution cannot nest, so count value should remain unchanged.
+ ASIO_CHECK(*count == before_value);
+ }
+}
+
+void nested_decrement_to_zero(thread_pool* pool, int* count)
+{
+ if (*count > 0)
+ {
+ --(*count);
+
+ asio::dispatch(*pool,
+ bindns::bind(nested_decrement_to_zero, pool, count));
+
+ // Handler execution is nested, so count value should now be zero.
+ ASIO_CHECK(*count == 0);
+ }
+}
+
+void thread_pool_test()
+{
+ thread_pool pool(1);
+
+ int count1 = 0;
+ asio::post(pool, bindns::bind(increment, &count1));
+
+ int count2 = 10;
+ asio::post(pool, bindns::bind(decrement_to_zero, &pool, &count2));
+
+ int count3 = 10;
+ asio::post(pool, bindns::bind(nested_decrement_to_zero, &pool, &count3));
+
+ pool.wait();
+
+ ASIO_CHECK(count1 == 1);
+ ASIO_CHECK(count2 == 0);
+ ASIO_CHECK(count3 == 0);
+}
+
+class test_service : public asio::execution_context::service
+{
+public:
+#if defined(ASIO_NO_TYPEID)
+ static asio::execution_context::id id;
+#endif // defined(ASIO_NO_TYPEID)
+
+ typedef test_service key_type;
+
+ test_service(asio::execution_context& ctx)
+ : asio::execution_context::service(ctx)
+ {
+ }
+
+private:
+ virtual void shutdown() {}
+};
+
+#if defined(ASIO_NO_TYPEID)
+asio::execution_context::id test_service::id;
+#endif // defined(ASIO_NO_TYPEID)
+
+void thread_pool_service_test()
+{
+ asio::thread_pool pool1(1);
+ asio::thread_pool pool2(1);
+ asio::thread_pool pool3(1);
+
+ // Implicit service registration.
+
+ asio::use_service<test_service>(pool1);
+
+ ASIO_CHECK(asio::has_service<test_service>(pool1));
+
+ test_service* svc1 = new test_service(pool1);
+ try
+ {
+ asio::add_service(pool1, svc1);
+ ASIO_ERROR("add_service did not throw");
+ }
+ catch (asio::service_already_exists&)
+ {
+ }
+ delete svc1;
+
+ // Explicit service registration.
+
+ test_service& svc2 = asio::make_service<test_service>(pool2);
+
+ ASIO_CHECK(asio::has_service<test_service>(pool2));
+ ASIO_CHECK(&asio::use_service<test_service>(pool2) == &svc2);
+
+ test_service* svc3 = new test_service(pool2);
+ try
+ {
+ asio::add_service(pool2, svc3);
+ ASIO_ERROR("add_service did not throw");
+ }
+ catch (asio::service_already_exists&)
+ {
+ }
+ delete svc3;
+
+ // Explicit registration with invalid owner.
+
+ test_service* svc4 = new test_service(pool2);
+ try
+ {
+ asio::add_service(pool3, svc4);
+ ASIO_ERROR("add_service did not throw");
+ }
+ catch (asio::invalid_service_owner&)
+ {
+ }
+ delete svc4;
+
+ ASIO_CHECK(!asio::has_service<test_service>(pool3));
+}
+
+void thread_pool_executor_query_test()
+{
+ thread_pool pool(1);
+
+ ASIO_CHECK(
+ &asio::query(pool.executor(),
+ asio::execution::context)
+ == &pool);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::mapping)
+ == asio::execution::mapping.thread);
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::allocator)
+ == std::allocator<void>());
+
+ ASIO_CHECK(
+ asio::query(pool.executor(),
+ asio::execution::occupancy)
+ == 1);
+}
+
+void thread_pool_executor_execute_test()
+{
+ int count = 0;
+ thread_pool pool(1);
+
+ pool.executor().execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.possibly
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.always
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
+
+ pool.wait();
+
+ ASIO_CHECK(count == 10);
+}
+
+ASIO_TEST_SUITE
+(
+ "thread_pool",
+ ASIO_TEST_CASE(thread_pool_test)
+ ASIO_TEST_CASE(thread_pool_service_test)
+ ASIO_TEST_CASE(thread_pool_executor_query_test)
+ ASIO_TEST_CASE(thread_pool_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/time_traits.cpp b/3rdparty/asio/src/tests/unit/time_traits.cpp
index 64a35a13a2b..2763d9ecc30 100644
--- a/3rdparty/asio/src/tests/unit/time_traits.cpp
+++ b/3rdparty/asio/src/tests/unit/time_traits.cpp
@@ -2,7 +2,7 @@
// time_traits.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/buffer.cpp b/3rdparty/asio/src/tests/unit/ts/buffer.cpp
new file mode 100644
index 00000000000..8f09c4fecc9
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/buffer.cpp
@@ -0,0 +1,30 @@
+//
+// buffer.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/buffer.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/buffer",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/executor.cpp b/3rdparty/asio/src/tests/unit/ts/executor.cpp
new file mode 100644
index 00000000000..9e318d93dbd
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/executor.cpp
@@ -0,0 +1,30 @@
+//
+// executor.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/executor.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/executor",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/internet.cpp b/3rdparty/asio/src/tests/unit/ts/internet.cpp
new file mode 100644
index 00000000000..1ee8320d9d7
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/internet.cpp
@@ -0,0 +1,30 @@
+//
+// internet.cpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/internet.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/internet",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/io_context.cpp b/3rdparty/asio/src/tests/unit/ts/io_context.cpp
new file mode 100644
index 00000000000..365e2579e8c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/io_context.cpp
@@ -0,0 +1,30 @@
+//
+// io_context.cpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/io_context.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/io_context",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/net.cpp b/3rdparty/asio/src/tests/unit/ts/net.cpp
new file mode 100644
index 00000000000..25f65030994
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/net.cpp
@@ -0,0 +1,30 @@
+//
+// net.cpp
+// ~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/net.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/net",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/netfwd.cpp b/3rdparty/asio/src/tests/unit/ts/netfwd.cpp
new file mode 100644
index 00000000000..55af93c87c3
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/netfwd.cpp
@@ -0,0 +1,33 @@
+//
+// netfwd.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/netfwd.hpp"
+
+// Test that forward declarations don't conflict with full declarations.
+#include "asio/ts/net.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/netfwd",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/socket.cpp b/3rdparty/asio/src/tests/unit/ts/socket.cpp
new file mode 100644
index 00000000000..4656fa2eb5a
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/socket.cpp
@@ -0,0 +1,30 @@
+//
+// socket.cpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/socket.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/socket",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/ts/timer.cpp b/3rdparty/asio/src/tests/unit/ts/timer.cpp
new file mode 100644
index 00000000000..e956bd463d5
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/ts/timer.cpp
@@ -0,0 +1,30 @@
+//
+// timer.cpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/ts/timer.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "ts/timer",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/unit_test.hpp b/3rdparty/asio/src/tests/unit/unit_test.hpp
index b74c3d4ec41..8efae9987e6 100644
--- a/3rdparty/asio/src/tests/unit/unit_test.hpp
+++ b/3rdparty/asio/src/tests/unit/unit_test.hpp
@@ -2,7 +2,7 @@
// unit_test.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,7 +19,7 @@
# include <stdlib.h> // Needed for lrand48.
#endif // defined(__sun)
-#if defined(__BORLANDC__)
+#if defined(__BORLANDC__) && !defined(__clang__)
// Prevent use of intrinsic for strcmp.
# include <cstring>
@@ -28,7 +28,7 @@
// Suppress error about condition always being true.
# pragma option -w-ccc
-#endif // defined(__BORLANDC__)
+#endif // defined(__BORLANDC__) && !defined(__clang__)
#if defined(ASIO_MSVC)
# pragma warning (disable:4127)
@@ -152,6 +152,21 @@ void throw_exception(const T& t)
#define ASIO_TEST_CASE(test) \
asio::detail::run_test<&test>(#test);
+#define ASIO_TEST_CASE2(test1, test2) \
+ asio::detail::run_test<&test1, test2>(#test1 "," #test2);
+
+#define ASIO_TEST_CASE3(test1, test2, test3) \
+ asio::detail::run_test<&test1, test2, test3>( \
+ #test1 "," #test2 "," #test3);
+
+#define ASIO_TEST_CASE4(test1, test2, test3, test4) \
+ asio::detail::run_test<&test1, test2, test3, test4>( \
+ #test1 "," #test2 "," #test3 "," #test4);
+
+#define ASIO_TEST_CASE5(test1, test2, test3, test4, test5) \
+ asio::detail::run_test<&test1, test2, test3, test4, test5>( \
+ #test1 "," #test2 "," #test3 "," #test4 "," #test5);
+
#define ASIO_COMPILE_TEST_CASE(test) \
asio::detail::compile_test<&test>(#test);
diff --git a/3rdparty/asio/src/tests/unit/use_awaitable.cpp b/3rdparty/asio/src/tests/unit/use_awaitable.cpp
new file mode 100644
index 00000000000..815f57ebb1c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/use_awaitable.cpp
@@ -0,0 +1,25 @@
+//
+// use_awaitable.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/use_awaitable.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "use_awaitable",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/use_future.cpp b/3rdparty/asio/src/tests/unit/use_future.cpp
index bc6e3b859b6..ac12f7caa23 100644
--- a/3rdparty/asio/src/tests/unit/use_future.cpp
+++ b/3rdparty/asio/src/tests/unit/use_future.cpp
@@ -2,7 +2,7 @@
// use_future.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -19,10 +19,9 @@
#include <string>
#include "unit_test.hpp"
-#if defined(ASIO_HAS_STD_FUTURE)
+#if defined(ASIO_HAS_STD_FUTURE_CLASS)
#include "archetypes/async_ops.hpp"
-#include "archetypes/deprecated_async_ops.hpp"
void use_future_0_test()
{
@@ -647,673 +646,6 @@ void use_future_package_3_test()
}
}
-void deprecated_use_future_0_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<void> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_0(ctx, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- f.get();
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_0(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- f.get();
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_0(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- f.get();
- ASIO_CHECK(false);
- }
- catch (asio::system_error& e)
- {
- ASIO_CHECK(e.code() == asio::error::operation_aborted);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = async_op_ex_0(true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- f.get();
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = async_op_ex_0(false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- f.get();
- ASIO_CHECK(false);
- }
- catch (std::exception& e)
- {
- ASIO_CHECK(e.what() == std::string("blah"));
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_1_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<int> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_1(ctx, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_1(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_1(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(false);
- (void)i;
- }
- catch (asio::system_error& e)
- {
- ASIO_CHECK(e.code() == asio::error::operation_aborted);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_1(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_1(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(false);
- (void)i;
- }
- catch (std::exception& e)
- {
- ASIO_CHECK(e.what() == std::string("blah"));
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_2_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<std::tuple<int, double>> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_2(ctx, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i;
- double d;
- std::tie(i, d) = f.get();
- ASIO_CHECK(i == 42);
- ASIO_CHECK(d == 2.0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_2(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i;
- double d;
- std::tie(i, d) = f.get();
- ASIO_CHECK(i == 42);
- ASIO_CHECK(d == 2.0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_2(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- std::tuple<int, double> t = f.get();
- ASIO_CHECK(false);
- (void)t;
- }
- catch (asio::system_error& e)
- {
- ASIO_CHECK(e.code() == asio::error::operation_aborted);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_2(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i;
- double d;
- std::tie(i, d) = f.get();
- ASIO_CHECK(i == 42);
- ASIO_CHECK(d == 2.0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_2(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- std::tuple<int, double> t = f.get();
- ASIO_CHECK(false);
- (void)t;
- }
- catch (std::exception& e)
- {
- ASIO_CHECK(e.what() == std::string("blah"));
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_3_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<std::tuple<int, double, char>> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_3(ctx, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i;
- double d;
- char c;
- std::tie(i, d, c) = f.get();
- ASIO_CHECK(i == 42);
- ASIO_CHECK(d == 2.0);
- ASIO_CHECK(c == 'a');
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_3(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i;
- double d;
- char c;
- std::tie(i, d, c) = f.get();
- ASIO_CHECK(i == 42);
- ASIO_CHECK(d == 2.0);
- ASIO_CHECK(c == 'a');
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_3(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- std::tuple<int, double, char> t = f.get();
- ASIO_CHECK(false);
- (void)t;
- }
- catch (asio::system_error& e)
- {
- ASIO_CHECK(e.code() == asio::error::operation_aborted);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_3(ctx, true, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- int i;
- double d;
- char c;
- std::tie(i, d, c) = f.get();
- ASIO_CHECK(i == 42);
- ASIO_CHECK(d == 2.0);
- ASIO_CHECK(c == 'a');
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_3(ctx, false, use_future);
- ctx.restart();
- ctx.run();
- try
- {
- std::tuple<int, double, char> t = f.get();
- ASIO_CHECK(false);
- (void)t;
- }
- catch (std::exception& e)
- {
- ASIO_CHECK(e.what() == std::string("blah"));
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_package_0_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<int> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_0(ctx, use_future(package_0));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_0(ctx, true, use_future(&package_ec_0));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_0(ctx, false, use_future(package_ec_0));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_0(ctx, true, use_future(package_ex_0));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_0(ctx, false, use_future(package_ex_0));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_package_1_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<int> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_1(ctx, use_future(package_1));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_1(ctx, true, use_future(package_ec_1));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_1(ctx, false, use_future(package_ec_1));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_1(ctx, true, use_future(package_ex_1));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_1(ctx, false, use_future(package_ex_1));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_package_2_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<int> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_2(ctx, use_future(package_2));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_2(ctx, true, use_future(package_ec_2));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_2(ctx, false, use_future(package_ec_2));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_2(ctx, true, use_future(package_ex_2));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_2(ctx, false, use_future(package_ex_2));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
-void deprecated_use_future_package_3_test()
-{
-#if !defined(ASIO_NO_DEPRECATED)
- using asio::use_future;
- using namespace archetypes;
-
- std::future<int> f;
- asio::io_context ctx;
-
- f = deprecated_async_op_3(ctx, use_future(package_3));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_3(ctx, true, use_future(package_ec_3));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ec_3(ctx, false, use_future(package_ec_3));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_3(ctx, true, use_future(package_ex_3));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 42);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-
- f = deprecated_async_op_ex_3(ctx, false, use_future(package_ex_3));
- ctx.restart();
- ctx.run();
- try
- {
- int i = f.get();
- ASIO_CHECK(i == 0);
- }
- catch (...)
- {
- ASIO_CHECK(false);
- }
-#endif // !defined(ASIO_NO_DEPRECATED)
-}
-
ASIO_TEST_SUITE
(
"use_future",
@@ -1325,17 +657,9 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(use_future_package_1_test)
ASIO_TEST_CASE(use_future_package_2_test)
ASIO_TEST_CASE(use_future_package_3_test)
- ASIO_TEST_CASE(deprecated_use_future_0_test)
- ASIO_TEST_CASE(deprecated_use_future_1_test)
- ASIO_TEST_CASE(deprecated_use_future_2_test)
- ASIO_TEST_CASE(deprecated_use_future_3_test)
- ASIO_TEST_CASE(deprecated_use_future_package_0_test)
- ASIO_TEST_CASE(deprecated_use_future_package_1_test)
- ASIO_TEST_CASE(deprecated_use_future_package_2_test)
- ASIO_TEST_CASE(deprecated_use_future_package_3_test)
)
-#else // defined(ASIO_HAS_STD_FUTURE)
+#else // defined(ASIO_HAS_STD_FUTURE_CLASS)
ASIO_TEST_SUITE
(
@@ -1343,4 +667,4 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(null_test)
)
-#endif // defined(ASIO_HAS_STD_FUTURE)
+#endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
diff --git a/3rdparty/asio/src/tests/unit/uses_executor.cpp b/3rdparty/asio/src/tests/unit/uses_executor.cpp
index cb1e2918b13..f3d52c1d8fc 100644
--- a/3rdparty/asio/src/tests/unit/uses_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/uses_executor.cpp
@@ -2,7 +2,7 @@
// uses_executor.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/wait_traits.cpp b/3rdparty/asio/src/tests/unit/wait_traits.cpp
index eed0161273c..4bdb498d7bf 100644
--- a/3rdparty/asio/src/tests/unit/wait_traits.cpp
+++ b/3rdparty/asio/src/tests/unit/wait_traits.cpp
@@ -2,7 +2,7 @@
// wait_traits.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/.gitignore b/3rdparty/asio/src/tests/unit/windows/.gitignore
deleted file mode 100644
index d225c81cd76..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-basic_handle
-basic_object_handle
-basic_random_access_handle
-basic_stream_handle
-object_handle
-object_handle_service
-overlapped_handle
-overlapped_ptr
-random_access_handle
-random_access_handle_service
-stream_handle
-stream_handle_service
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
index 4c27e14e488..d4d6def159a 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
@@ -2,7 +2,7 @@
// basic_object_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,11 +16,10 @@
// Test that header file is self-contained.
#include "asio/windows/basic_object_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_object_handle",
+ "basic_object_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/datagram_socket_service.cpp b/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
index 5c4fe1374a6..62b5419c69f 100644
--- a/3rdparty/asio/src/tests/unit/datagram_socket_service.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
@@ -1,8 +1,8 @@
//
-// datagram_socket_service.cpp
+// basic_overlapped_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -14,12 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/datagram_socket_service.hpp"
+#include "asio/windows/basic_overlapped_handle.hpp"
-#include "unit_test.hpp"
+#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "datagram_socket_service",
+ "basic_overlapped_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
index 720cf76b749..4a2605ea335 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
@@ -2,7 +2,7 @@
// basic_random_access_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,11 +16,10 @@
// Test that header file is self-contained.
#include "asio/windows/basic_random_access_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_random_access_handle",
+ "basic_random_access_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
index 2151dafb709..9cdf0bd5c20 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
@@ -2,7 +2,7 @@
// basic_stream_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,11 +16,10 @@
// Test that header file is self-contained.
#include "asio/windows/basic_stream_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_stream_handle",
+ "basic_stream_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/object_handle.cpp b/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
index 32a836ef208..0784ba9fdb7 100644
--- a/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
@@ -2,7 +2,7 @@
// object_handle.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -43,6 +43,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -50,27 +51,30 @@ void test()
win::object_handle handle1(ioc);
HANDLE native_handle1 = INVALID_HANDLE_VALUE;
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
win::object_handle handle2(ioc, native_handle1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- win::object_handle handle3(std::move(handle2));
-#endif // defined(ASIO_HAS_MOVE)
+ win::object_handle handle3(ioc_ex);
+ HANDLE native_handle2 = INVALID_HANDLE_VALUE;
+ win::object_handle handle4(ioc_ex, native_handle2);
+
+ win::object_handle handle5(std::move(handle4));
+
+ win::basic_object_handle<io_context::executor_type> handle6(ioc);
+ win::object_handle handle7(std::move(handle6));
// basic_object_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::object_handle(ioc);
- handle1 = std::move(handle2);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle3);
+ handle1 = std::move(handle6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = handle1.get_io_context();
- (void)ioc_ref;
-#endif !defined(ASIO_NO_DEPRECATED)
-
- io_context::executor_type ex = handle1.get_executor();
+ win::object_handle::executor_type ex = handle1.get_executor();
(void)ex;
// basic_handle functions.
@@ -79,13 +83,13 @@ void test()
= handle1.lowest_layer();
(void)lowest_layer;
- const win::object_handle& handle4 = handle1;
- const win::object_handle::lowest_layer_type& lowest_layer2
- = handle4.lowest_layer();
- (void)lowest_layer2;
+ const win::object_handle& handle8 = handle1;
+ const win::object_handle::lowest_layer_type& lowest_layer3
+ = handle8.lowest_layer();
+ (void)lowest_layer3;
- HANDLE native_handle2 = INVALID_HANDLE_VALUE;
- handle1.assign(native_handle2);
+ HANDLE native_handle4 = INVALID_HANDLE_VALUE;
+ handle1.assign(native_handle4);
bool is_open = handle1.is_open();
(void)is_open;
@@ -122,5 +126,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/object_handle",
- ASIO_TEST_CASE(windows_object_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_object_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp b/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
index fbc8fb4e88b..5cdd3da2db1 100644
--- a/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
@@ -2,7 +2,7 @@
// overlapped_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp b/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
index 261ece6f531..fda1b2cbd98 100644
--- a/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
@@ -2,7 +2,7 @@
// overlapped_ptr.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,6 +16,8 @@
// Test that header file is self-contained.
#include "asio/windows/overlapped_ptr.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/executor.hpp"
#include "asio/io_context.hpp"
#include "../unit_test.hpp"
@@ -49,6 +51,10 @@ void test()
try
{
io_context ioc;
+ asio::any_io_executor ex1(ioc.get_executor());
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ asio::executor ex2(ioc.get_executor());
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
// basic_overlapped_ptr constructors.
@@ -57,6 +63,15 @@ void test()
win::overlapped_ptr ptr2(ioc, &overlapped_handler_1);
win::overlapped_ptr ptr3(ioc, overlapped_handler_2());
+ win::overlapped_ptr ptr4(ioc.get_executor(), &overlapped_handler_1);
+ win::overlapped_ptr ptr5(ioc.get_executor(), overlapped_handler_2());
+ win::overlapped_ptr ptr6(ex1, &overlapped_handler_1);
+ win::overlapped_ptr ptr7(ex1, overlapped_handler_2());
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ win::overlapped_ptr ptr8(ex2, &overlapped_handler_1);
+ win::overlapped_ptr ptr9(ex2, overlapped_handler_2());
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
// overlapped_ptr functions.
ptr1.reset();
@@ -64,11 +79,20 @@ void test()
ptr2.reset(ioc, &overlapped_handler_1);
ptr3.reset(ioc, overlapped_handler_2());
+ ptr2.reset(ioc.get_executor(), &overlapped_handler_1);
+ ptr3.reset(ioc.get_executor(), overlapped_handler_2());
+ ptr2.reset(ex1, &overlapped_handler_1);
+ ptr3.reset(ex1, overlapped_handler_2());
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ ptr3.reset(ex2, &overlapped_handler_1);
+ ptr3.reset(ex2, overlapped_handler_2());
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
OVERLAPPED* ov1 = ptr1.get();
(void)ov1;
- const win::overlapped_ptr& ptr4(ptr1);
- const OVERLAPPED* ov2 = ptr4.get();
+ const win::overlapped_ptr& ptr10(ptr1);
+ const OVERLAPPED* ov2 = ptr10.get();
(void)ov2;
OVERLAPPED* ov3 = ptr1.release();
@@ -91,5 +115,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/overlapped_ptr",
- ASIO_TEST_CASE(windows_overlapped_ptr_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_overlapped_ptr_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp b/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
index fbd88209972..613732c5128 100644
--- a/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
@@ -2,7 +2,7 @@
// random_access_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -47,6 +47,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
asio::uint64_t offset = 0;
@@ -57,42 +58,45 @@ void test()
win::random_access_handle handle1(ioc);
HANDLE native_handle1 = INVALID_HANDLE_VALUE;
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
win::random_access_handle handle2(ioc, native_handle1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- win::random_access_handle handle3(std::move(handle2));
-#endif // defined(ASIO_HAS_MOVE)
+ win::random_access_handle handle3(ioc_ex);
+ HANDLE native_handle2 = INVALID_HANDLE_VALUE;
+ win::random_access_handle handle4(ioc_ex, native_handle2);
+
+ win::random_access_handle handle5(std::move(handle4));
+
+ win::basic_random_access_handle<io_context::executor_type> handle6(ioc);
+ win::random_access_handle handle7(std::move(handle6));
// basic_random_access_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::random_access_handle(ioc);
- handle1 = std::move(handle2);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle4);
+ handle1 = std::move(handle6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = handle1.get_io_context();
- (void)ioc_ref;
-#endif !defined(ASIO_NO_DEPRECATED)
-
- io_context::executor_type ex = handle1.get_executor();
+ windows::random_access_handle::executor_type ex = handle1.get_executor();
(void)ex;
- // basic_handle functions.
+ // basic_overlapped_handle functions.
win::random_access_handle::lowest_layer_type& lowest_layer
= handle1.lowest_layer();
(void)lowest_layer;
- const win::random_access_handle& handle4 = handle1;
+ const win::random_access_handle& handle8 = handle1;
const win::random_access_handle::lowest_layer_type& lowest_layer2
- = handle4.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer2;
- HANDLE native_handle2 = INVALID_HANDLE_VALUE;
- handle1.assign(native_handle2);
+ HANDLE native_handle3 = INVALID_HANDLE_VALUE;
+ handle1.assign(native_handle3);
bool is_open = handle1.is_open();
(void)is_open;
@@ -100,9 +104,16 @@ void test()
handle1.close();
handle1.close(ec);
- win::random_access_handle::native_handle_type native_handle3
+ win::random_access_handle::native_handle_type native_handle4
+ = handle1.release();
+ (void)native_handle4;
+ win::random_access_handle::native_handle_type native_handle5
+ = handle1.release(ec);
+ (void)native_handle5;
+
+ win::random_access_handle::native_handle_type native_handle6
= handle1.native_handle();
- (void)native_handle3;
+ (void)native_handle6;
handle1.cancel();
handle1.cancel(ec);
@@ -147,5 +158,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/random_access_handle",
- ASIO_TEST_CASE(windows_random_access_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_random_access_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp b/3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp
deleted file mode 100644
index 0895864d5b8..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// random_access_handle_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/windows/random_access_handle_service.hpp"
-
-#include "asio.hpp"
-#include "../unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "windows/random_access_handle_service",
- ASIO_TEST_CASE(null_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
index 499ed354b04..1668dcea69a 100644
--- a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
@@ -2,7 +2,7 @@
// stream_handle.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -47,6 +47,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
archetypes::lazy_handler lazy;
@@ -56,42 +57,45 @@ void test()
win::stream_handle handle1(ioc);
HANDLE native_handle1 = INVALID_HANDLE_VALUE;
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
win::stream_handle handle2(ioc, native_handle1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- win::stream_handle handle3(std::move(handle2));
-#endif // defined(ASIO_HAS_MOVE)
+ win::stream_handle handle3(ioc_ex);
+ HANDLE native_handle2 = INVALID_HANDLE_VALUE;
+ win::stream_handle handle4(ioc_ex, native_handle2);
+
+ win::stream_handle handle5(std::move(handle4));
+
+ win::basic_stream_handle<io_context::executor_type> handle6(ioc);
+ win::stream_handle handle7(std::move(handle6));
// basic_stream_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::stream_handle(ioc);
- handle1 = std::move(handle2);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle4);
+ handle1 = std::move(handle6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = handle1.get_io_context();
- (void)ioc_ref;
-#endif !defined(ASIO_NO_DEPRECATED)
-
- io_context::executor_type ex = handle1.get_executor();
+ windows::stream_handle::executor_type ex = handle1.get_executor();
(void)ex;
- // basic_handle functions.
+ // basic_overlapped_handle functions.
win::stream_handle::lowest_layer_type& lowest_layer
= handle1.lowest_layer();
(void)lowest_layer;
- const win::stream_handle& handle4 = handle1;
+ const win::stream_handle& handle8 = handle1;
const win::stream_handle::lowest_layer_type& lowest_layer2
- = handle4.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer2;
- HANDLE native_handle2 = INVALID_HANDLE_VALUE;
- handle1.assign(native_handle2);
+ HANDLE native_handle3 = INVALID_HANDLE_VALUE;
+ handle1.assign(native_handle3);
bool is_open = handle1.is_open();
(void)is_open;
@@ -99,9 +103,16 @@ void test()
handle1.close();
handle1.close(ec);
- win::stream_handle::native_handle_type native_handle3
+ win::stream_handle::native_handle_type native_handle4
+ = handle1.release();
+ (void)native_handle4;
+ win::stream_handle::native_handle_type native_handle5
+ = handle1.release(ec);
+ (void)native_handle5;
+
+ win::stream_handle::native_handle_type native_handle6
= handle1.native_handle();
- (void)native_handle3;
+ (void)native_handle6;
handle1.cancel();
handle1.cancel(ec);
@@ -140,5 +151,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/stream_handle",
- ASIO_TEST_CASE(windows_stream_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_stream_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp b/3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp
deleted file mode 100644
index 4281ee06b4f..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// stream_handle_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/windows/stream_handle_service.hpp"
-
-#include "asio.hpp"
-#include "../unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "windows/stream_handle_service",
- ASIO_TEST_CASE(null_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/writable_pipe.cpp b/3rdparty/asio/src/tests/unit/writable_pipe.cpp
new file mode 100644
index 00000000000..0cea7547aa2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/writable_pipe.cpp
@@ -0,0 +1,136 @@
+//
+// writable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header pipe is self-contained.
+#include "asio/writable_pipe.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// writable_pipe_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// writable_pipe compile and link correctly. Runtime failures are ignored.
+
+namespace writable_pipe_compile {
+
+struct write_some_handler
+{
+ write_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_handler(write_some_handler&&) {}
+private:
+ write_some_handler(const write_some_handler&);
+};
+
+struct read_some_handler
+{
+ read_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_handler(read_some_handler&&) {}
+private:
+ read_some_handler(const read_some_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+
+ // basic_writable_pipe constructors.
+
+ writable_pipe pipe1(ioc);
+ writable_pipe::native_handle_type native_pipe1 = pipe1.native_handle();
+ writable_pipe pipe2(ioc, native_pipe1);
+
+ writable_pipe pipe3(ioc_ex);
+ writable_pipe::native_handle_type native_pipe2 = pipe1.native_handle();
+ writable_pipe pipe4(ioc_ex, native_pipe2);
+
+ writable_pipe pipe5(std::move(pipe4));
+
+ basic_writable_pipe<io_context::executor_type> pipe6(ioc);
+ writable_pipe pipe7(std::move(pipe6));
+
+ // basic_writable_pipe operators.
+
+ pipe1 = writable_pipe(ioc);
+ pipe1 = std::move(pipe2);
+ pipe1 = std::move(pipe6);
+
+ // basic_io_object functions.
+
+ writable_pipe::executor_type ex = pipe1.get_executor();
+ (void)ex;
+
+ // basic_writable_pipe functions.
+
+ writable_pipe::native_handle_type native_pipe3 = pipe1.native_handle();
+ pipe1.assign(native_pipe3);
+ writable_pipe::native_handle_type native_pipe4 = pipe1.native_handle();
+ pipe1.assign(native_pipe4, ec);
+
+ bool is_open = pipe1.is_open();
+ (void)is_open;
+
+ pipe1.close();
+ pipe1.close(ec);
+
+ writable_pipe::native_handle_type native_pipe5 = pipe1.release();
+ (void)native_pipe5;
+ writable_pipe::native_handle_type native_pipe6 = pipe1.release(ec);
+ (void)native_pipe6;
+
+ writable_pipe::native_handle_type native_pipe7 = pipe1.native_handle();
+ (void)native_pipe7;
+
+ pipe1.cancel();
+ pipe1.cancel(ec);
+
+ pipe1.write_some(buffer(mutable_char_buffer));
+ pipe1.write_some(buffer(const_char_buffer));
+ pipe1.write_some(buffer(mutable_char_buffer), ec);
+ pipe1.write_some(buffer(const_char_buffer), ec);
+
+ pipe1.async_write_some(buffer(mutable_char_buffer), write_some_handler());
+ pipe1.async_write_some(buffer(const_char_buffer), write_some_handler());
+ int i1 = pipe1.async_write_some(buffer(mutable_char_buffer), lazy);
+ (void)i1;
+ int i2 = pipe1.async_write_some(buffer(const_char_buffer), lazy);
+ (void)i2;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace writable_pipe_compile
+
+ASIO_TEST_SUITE
+(
+ "writable_pipe",
+ ASIO_COMPILE_TEST_CASE(writable_pipe_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/write.cpp b/3rdparty/asio/src/tests/unit/write.cpp
index a60ee11ae45..470972217c1 100644
--- a/3rdparty/asio/src/tests/unit/write.cpp
+++ b/3rdparty/asio/src/tests/unit/write.cpp
@@ -2,7 +2,7 @@
// write.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,7 +16,9 @@
// Test that header file is self-contained.
#include "asio/write.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include <vector>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
@@ -24,20 +26,10 @@
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_stream
@@ -54,7 +46,7 @@ public:
memset(data_, 0, max_length);
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -120,12 +112,13 @@ public:
}
template <typename Const_Buffers, typename Handler>
- void async_write_some(const Const_Buffers& buffers, Handler handler)
+ void async_write_some(const Const_Buffers& buffers,
+ Handler&& handler)
{
size_t bytes_transferred = write_some(buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -209,7 +202,8 @@ void test_2_arg_vector_buffers_write()
test_stream s(ioc);
std::vector<asio::const_buffer> buffers;
buffers.push_back(asio::buffer(write_data, 32));
- buffers.push_back(asio::buffer(write_data) + 32);
+ buffers.push_back(asio::buffer(write_data, 39) + 32);
+ buffers.push_back(asio::buffer(write_data) + 39);
s.reset();
size_t bytes_transferred = asio::write(s, buffers);
@@ -229,6 +223,38 @@ void test_2_arg_vector_buffers_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
}
+void test_2_arg_dynamic_string_write()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(write_data));
+ asio::const_buffer buffers
+ = asio::buffer(write_data, sizeof(write_data));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ size_t bytes_transferred = asio::write(s, sb);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+}
+
void test_3_arg_nothrow_zero_buffers_write()
{
asio::io_context ioc;
@@ -305,7 +331,8 @@ void test_3_arg_nothrow_vector_buffers_write()
test_stream s(ioc);
std::vector<asio::const_buffer> buffers;
buffers.push_back(asio::buffer(write_data, 32));
- buffers.push_back(asio::buffer(write_data) + 32);
+ buffers.push_back(asio::buffer(write_data, 39) + 32);
+ buffers.push_back(asio::buffer(write_data) + 39);
s.reset();
asio::error_code error;
@@ -329,17 +356,58 @@ void test_3_arg_nothrow_vector_buffers_write()
ASIO_CHECK(!error);
}
+void test_3_arg_nothrow_dynamic_string_write()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(write_data));
+ asio::const_buffer buffers
+ = asio::buffer(write_data, sizeof(write_data));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ asio::error_code error;
+ size_t bytes_transferred = asio::write(s, sb, error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb, error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb, error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+}
+
bool old_style_transfer_all(const asio::error_code& ec,
size_t /*bytes_transferred*/)
{
return !!ec;
}
-size_t short_transfer(const asio::error_code& ec,
- size_t /*bytes_transferred*/)
+struct short_transfer
{
- return !!ec ? 0 : 3;
-}
+ short_transfer() {}
+ short_transfer(short_transfer&&) {}
+ size_t operator()(const asio::error_code& ec,
+ size_t /*bytes_transferred*/)
+ {
+ return !!ec ? 0 : 3;
+ }
+};
void test_3_arg_const_buffer_write()
{
@@ -506,19 +574,19 @@ void test_3_arg_const_buffer_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
}
@@ -688,19 +756,19 @@ void test_3_arg_mutable_buffer_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
s.reset();
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
}
@@ -711,7 +779,8 @@ void test_3_arg_vector_buffers_write()
test_stream s(ioc);
std::vector<asio::const_buffer> buffers;
buffers.push_back(asio::buffer(write_data, 32));
- buffers.push_back(asio::buffer(write_data) + 32);
+ buffers.push_back(asio::buffer(write_data, 39) + 32);
+ buffers.push_back(asio::buffer(write_data) + 39);
s.reset();
size_t bytes_transferred = asio::write(s, buffers,
@@ -871,19 +940,232 @@ void test_3_arg_vector_buffers_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write(s, buffers, short_transfer);
+ bytes_transferred = asio::write(s, buffers, short_transfer());
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+}
+
+void test_3_arg_dynamic_string_write()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(write_data));
+ asio::const_buffer buffers
+ = asio::buffer(write_data, sizeof(write_data));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ size_t bytes_transferred = asio::write(s, sb,
+ asio::transfer_all());
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_all());
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_all());
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(1));
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(1));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(10));
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(42));
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(42));
+ ASIO_CHECK(bytes_transferred == 50);
+ ASIO_CHECK(s.check_buffers(buffers, 50));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(1));
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(10));
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(42));
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb, old_style_transfer_all);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb, old_style_transfer_all);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb, old_style_transfer_all);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb, short_transfer());
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ bytes_transferred = asio::write(s, sb, short_transfer());
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ bytes_transferred = asio::write(s, sb, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
}
@@ -1103,7 +1385,7 @@ void test_4_arg_const_buffer_write()
ASIO_CHECK(!error);
s.reset();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1111,7 +1393,7 @@ void test_4_arg_const_buffer_write()
s.reset();
s.next_write_length(1);
error = asio::error_code();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1119,7 +1401,7 @@ void test_4_arg_const_buffer_write()
s.reset();
s.next_write_length(10);
error = asio::error_code();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1340,7 +1622,7 @@ void test_4_arg_mutable_buffer_write()
ASIO_CHECK(!error);
s.reset();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -1348,7 +1630,7 @@ void test_4_arg_mutable_buffer_write()
s.reset();
s.next_write_length(1);
error = asio::error_code();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -1356,7 +1638,7 @@ void test_4_arg_mutable_buffer_write()
s.reset();
s.next_write_length(10);
error = asio::error_code();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -1368,7 +1650,8 @@ void test_4_arg_vector_buffers_write()
test_stream s(ioc);
std::vector<asio::const_buffer> buffers;
buffers.push_back(asio::buffer(write_data, 32));
- buffers.push_back(asio::buffer(write_data) + 32);
+ buffers.push_back(asio::buffer(write_data, 39) + 32);
+ buffers.push_back(asio::buffer(write_data) + 39);
s.reset();
asio::error_code error;
@@ -1578,7 +1861,7 @@ void test_4_arg_vector_buffers_write()
ASIO_CHECK(!error);
s.reset();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1586,7 +1869,7 @@ void test_4_arg_vector_buffers_write()
s.reset();
s.next_write_length(1);
error = asio::error_code();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1594,7 +1877,275 @@ void test_4_arg_vector_buffers_write()
s.reset();
s.next_write_length(10);
error = asio::error_code();
- bytes_transferred = asio::write(s, buffers, short_transfer, error);
+ bytes_transferred = asio::write(s, buffers, short_transfer(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+}
+
+void test_4_arg_dynamic_string_write()
+{
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(write_data));
+ asio::const_buffer buffers
+ = asio::buffer(write_data, sizeof(write_data));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ asio::error_code error;
+ size_t bytes_transferred = asio::write(s, sb,
+ asio::transfer_all(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_all(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_all(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(1), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(1), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(10), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(42), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_at_least(42), error);
+ ASIO_CHECK(bytes_transferred == 50);
+ ASIO_CHECK(s.check_buffers(buffers, 50));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(1), error);
+ ASIO_CHECK(bytes_transferred == 1);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(10), error);
+ ASIO_CHECK(bytes_transferred == 10);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ asio::transfer_exactly(42), error);
+ ASIO_CHECK(bytes_transferred == 42);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb,
+ old_style_transfer_all, error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ old_style_transfer_all, error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb,
+ old_style_transfer_all, error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bytes_transferred = asio::write(s, sb, short_transfer(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb, short_transfer(), error);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+ ASIO_CHECK(!error);
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ error = asio::error_code();
+ bytes_transferred = asio::write(s, sb, short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1610,13 +2161,9 @@ void async_write_handler(const asio::error_code& e,
void test_3_arg_const_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -1665,13 +2212,9 @@ void test_3_arg_const_buffer_async_write()
void test_3_arg_mutable_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -1720,13 +2263,9 @@ void test_3_arg_mutable_buffer_async_write()
void test_3_arg_boost_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -1778,15 +2317,10 @@ void test_3_arg_boost_array_buffers_async_write()
void test_3_arg_std_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -1831,24 +2365,20 @@ void test_3_arg_std_array_buffers_async_write()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_3_arg_vector_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
std::vector<asio::const_buffer> buffers;
buffers.push_back(asio::buffer(write_data, 32));
- buffers.push_back(asio::buffer(write_data) + 32);
+ buffers.push_back(asio::buffer(write_data, 39) + 32);
+ buffers.push_back(asio::buffer(write_data) + 39);
s.reset();
bool called = false;
@@ -1890,15 +2420,71 @@ void test_3_arg_vector_buffers_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
}
+void test_3_arg_dynamic_string_async_write()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(write_data));
+ asio::const_buffer buffers
+ = asio::buffer(write_data, sizeof(write_data));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bool called = false;
+ asio::async_write(s, sb,
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb,
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb,
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ int i = asio::async_write(s, sb, archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+}
+
void test_3_arg_streambuf_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -1952,17 +2538,14 @@ void test_3_arg_streambuf_async_write()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
void test_4_arg_const_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -2227,7 +2810,7 @@ void test_4_arg_const_buffer_async_write()
s.reset();
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -2238,7 +2821,7 @@ void test_4_arg_const_buffer_async_write()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -2249,7 +2832,7 @@ void test_4_arg_const_buffer_async_write()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -2258,7 +2841,7 @@ void test_4_arg_const_buffer_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write(s, buffers, short_transfer,
+ int i = asio::async_write(s, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -2268,13 +2851,9 @@ void test_4_arg_const_buffer_async_write()
void test_4_arg_mutable_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -2539,7 +3118,7 @@ void test_4_arg_mutable_buffer_async_write()
s.reset();
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -2550,7 +3129,7 @@ void test_4_arg_mutable_buffer_async_write()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -2561,7 +3140,7 @@ void test_4_arg_mutable_buffer_async_write()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -2570,7 +3149,7 @@ void test_4_arg_mutable_buffer_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(mutable_write_data)));
s.reset();
- int i = asio::async_write(s, buffers, short_transfer,
+ int i = asio::async_write(s, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -2580,13 +3159,9 @@ void test_4_arg_mutable_buffer_async_write()
void test_4_arg_boost_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -2853,7 +3428,7 @@ void test_4_arg_boost_array_buffers_async_write()
s.reset();
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -2864,7 +3439,7 @@ void test_4_arg_boost_array_buffers_async_write()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -2875,7 +3450,7 @@ void test_4_arg_boost_array_buffers_async_write()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -2884,7 +3459,7 @@ void test_4_arg_boost_array_buffers_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write(s, buffers, short_transfer,
+ int i = asio::async_write(s, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -2895,15 +3470,10 @@ void test_4_arg_boost_array_buffers_async_write()
void test_4_arg_std_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -3168,7 +3738,7 @@ void test_4_arg_std_array_buffers_async_write()
s.reset();
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3179,7 +3749,7 @@ void test_4_arg_std_array_buffers_async_write()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3190,7 +3760,7 @@ void test_4_arg_std_array_buffers_async_write()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3199,30 +3769,26 @@ void test_4_arg_std_array_buffers_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write(s, buffers, short_transfer,
+ int i = asio::async_write(s, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
std::vector<asio::const_buffer> buffers;
buffers.push_back(asio::buffer(write_data, 32));
- buffers.push_back(asio::buffer(write_data) + 32);
+ buffers.push_back(asio::buffer(write_data, 39) + 32);
+ buffers.push_back(asio::buffer(write_data) + 39);
s.reset();
bool called = false;
@@ -3482,7 +4048,344 @@ void test_4_arg_vector_buffers_async_write()
s.reset();
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, buffers, short_transfer(),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, buffers, short_transfer(),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, buffers, short_transfer(),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ int i = asio::async_write(s, buffers, short_transfer(),
+ archetypes::lazy_handler());
+ ASIO_CHECK(i == 42);
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+}
+
+void test_4_arg_dynamic_string_async_write()
+{
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ asio::io_context ioc;
+ test_stream s(ioc);
+ std::string data;
+ asio::dynamic_string_buffer<char, std::string::traits_type,
+ std::string::allocator_type> sb
+ = asio::dynamic_buffer(data, sizeof(write_data));
+ asio::const_buffer buffers
+ = asio::buffer(write_data, sizeof(write_data));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ bool called = false;
+ asio::async_write(s, sb, asio::transfer_all(),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_all(),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_all(),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(1),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(1),
+ bindns::bind(async_write_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(1),
+ bindns::bind(async_write_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(10),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(10),
+ bindns::bind(async_write_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(10),
+ bindns::bind(async_write_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(42),
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(42),
+ bindns::bind(async_write_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_at_least(42),
+ bindns::bind(async_write_handler,
+ _1, _2, 50, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 50));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(1),
+ bindns::bind(async_write_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(1),
+ bindns::bind(async_write_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(1),
+ bindns::bind(async_write_handler,
+ _1, _2, 1, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 1));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(10),
+ bindns::bind(async_write_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(10),
+ bindns::bind(async_write_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(10),
+ bindns::bind(async_write_handler,
+ _1, _2, 10, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 10));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(42),
+ bindns::bind(async_write_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(42),
+ bindns::bind(async_write_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, asio::transfer_exactly(42),
+ bindns::bind(async_write_handler,
+ _1, _2, 42, &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, 42));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, old_style_transfer_all,
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(1);
+ called = false;
+ asio::async_write(s, sb, old_style_transfer_all,
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ s.next_write_length(10);
+ called = false;
+ asio::async_write(s, sb, old_style_transfer_all,
+ bindns::bind(async_write_handler,
+ _1, _2, sizeof(write_data), &called));
+ ioc.restart();
+ ioc.run();
+ ASIO_CHECK(called);
+ ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+
+ s.reset();
+ data.assign(write_data, sizeof(write_data));
+ called = false;
+ asio::async_write(s, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3491,9 +4394,10 @@ void test_4_arg_vector_buffers_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
+ data.assign(write_data, sizeof(write_data));
s.next_write_length(1);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3502,9 +4406,10 @@ void test_4_arg_vector_buffers_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
+ data.assign(write_data, sizeof(write_data));
s.next_write_length(10);
called = false;
- asio::async_write(s, buffers, short_transfer,
+ asio::async_write(s, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3513,7 +4418,8 @@ void test_4_arg_vector_buffers_async_write()
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write(s, buffers, short_transfer,
+ data.assign(write_data, sizeof(write_data));
+ int i = asio::async_write(s, sb, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -3523,13 +4429,10 @@ void test_4_arg_vector_buffers_async_write()
void test_4_arg_streambuf_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_stream s(ioc);
@@ -3845,7 +4748,7 @@ void test_4_arg_streambuf_async_write()
sb.consume(sb.size());
sb.sputn(write_data, sizeof(write_data));
called = false;
- asio::async_write(s, sb, short_transfer,
+ asio::async_write(s, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3858,7 +4761,7 @@ void test_4_arg_streambuf_async_write()
sb.sputn(write_data, sizeof(write_data));
s.next_write_length(1);
called = false;
- asio::async_write(s, sb, short_transfer,
+ asio::async_write(s, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3871,7 +4774,7 @@ void test_4_arg_streambuf_async_write()
sb.sputn(write_data, sizeof(write_data));
s.next_write_length(10);
called = false;
- asio::async_write(s, sb, short_transfer,
+ asio::async_write(s, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -3882,12 +4785,13 @@ void test_4_arg_streambuf_async_write()
s.reset();
sb.consume(sb.size());
sb.sputn(write_data, sizeof(write_data));
- int i = asio::async_write(s, sb, short_transfer,
+ int i = asio::async_write(s, sb, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
}
ASIO_TEST_SUITE
@@ -3897,26 +4801,32 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(test_2_arg_const_buffer_write)
ASIO_TEST_CASE(test_2_arg_mutable_buffer_write)
ASIO_TEST_CASE(test_2_arg_vector_buffers_write)
+ ASIO_TEST_CASE(test_2_arg_dynamic_string_write)
ASIO_TEST_CASE(test_3_arg_nothrow_zero_buffers_write)
ASIO_TEST_CASE(test_3_arg_nothrow_const_buffer_write)
ASIO_TEST_CASE(test_3_arg_nothrow_mutable_buffer_write)
ASIO_TEST_CASE(test_3_arg_nothrow_vector_buffers_write)
+ ASIO_TEST_CASE(test_3_arg_nothrow_dynamic_string_write)
ASIO_TEST_CASE(test_3_arg_const_buffer_write)
ASIO_TEST_CASE(test_3_arg_mutable_buffer_write)
ASIO_TEST_CASE(test_3_arg_vector_buffers_write)
+ ASIO_TEST_CASE(test_3_arg_dynamic_string_write)
ASIO_TEST_CASE(test_4_arg_const_buffer_write)
ASIO_TEST_CASE(test_4_arg_mutable_buffer_write)
ASIO_TEST_CASE(test_4_arg_vector_buffers_write)
+ ASIO_TEST_CASE(test_4_arg_dynamic_string_write)
ASIO_TEST_CASE(test_3_arg_const_buffer_async_write)
ASIO_TEST_CASE(test_3_arg_mutable_buffer_async_write)
ASIO_TEST_CASE(test_3_arg_boost_array_buffers_async_write)
ASIO_TEST_CASE(test_3_arg_std_array_buffers_async_write)
ASIO_TEST_CASE(test_3_arg_vector_buffers_async_write)
+ ASIO_TEST_CASE(test_3_arg_dynamic_string_async_write)
ASIO_TEST_CASE(test_3_arg_streambuf_async_write)
ASIO_TEST_CASE(test_4_arg_const_buffer_async_write)
ASIO_TEST_CASE(test_4_arg_mutable_buffer_async_write)
ASIO_TEST_CASE(test_4_arg_boost_array_buffers_async_write)
ASIO_TEST_CASE(test_4_arg_std_array_buffers_async_write)
ASIO_TEST_CASE(test_4_arg_vector_buffers_async_write)
+ ASIO_TEST_CASE(test_4_arg_dynamic_string_async_write)
ASIO_TEST_CASE(test_4_arg_streambuf_async_write)
)
diff --git a/3rdparty/asio/src/tests/unit/write_at.cpp b/3rdparty/asio/src/tests/unit/write_at.cpp
index a8e55e87d90..adc684d0e4f 100644
--- a/3rdparty/asio/src/tests/unit/write_at.cpp
+++ b/3rdparty/asio/src/tests/unit/write_at.cpp
@@ -2,7 +2,7 @@
// write_at.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
@@ -16,27 +16,19 @@
// Test that header file is self-contained.
#include "asio/write_at.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_random_access_device
@@ -52,7 +44,7 @@ public:
memset(data_, 0, max_length);
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -118,12 +110,12 @@ public:
template <typename Const_Buffers, typename Handler>
void async_write_some_at(asio::uint64_t offset,
- const Const_Buffers& buffers, Handler handler)
+ const Const_Buffers& buffers, Handler&& handler)
{
size_t bytes_transferred = write_some_at(offset, buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -421,11 +413,16 @@ bool old_style_transfer_all(const asio::error_code& ec,
return !!ec;
}
-size_t short_transfer(const asio::error_code& ec,
- size_t /*bytes_transferred*/)
+struct short_transfer
{
- return !!ec ? 0 : 3;
-}
+ short_transfer() {}
+ short_transfer(short_transfer&&) {}
+ size_t operator()(const asio::error_code& ec,
+ size_t /*bytes_transferred*/)
+ {
+ return !!ec ? 0 : 3;
+ }
+};
void test_4_arg_const_buffer_write_at()
{
@@ -755,36 +752,36 @@ void test_4_arg_const_buffer_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
s.reset();
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
}
@@ -1117,36 +1114,36 @@ void test_4_arg_mutable_buffer_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
s.reset();
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(mutable_write_data)));
s.reset();
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(mutable_write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(mutable_write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
}
@@ -1480,36 +1477,36 @@ void test_4_arg_vector_buffers_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
s.reset();
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(1);
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write_at(s, 0, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 0, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
s.reset();
s.next_write_length(10);
- bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer);
+ bytes_transferred = asio::write_at(s, 1234, buffers, short_transfer());
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
}
@@ -1936,14 +1933,14 @@ void test_5_arg_const_buffer_write_at()
s.reset();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
s.reset();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1952,7 +1949,7 @@ void test_5_arg_const_buffer_write_at()
s.next_write_length(1);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1961,7 +1958,7 @@ void test_5_arg_const_buffer_write_at()
s.next_write_length(1);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1970,7 +1967,7 @@ void test_5_arg_const_buffer_write_at()
s.next_write_length(10);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -1979,7 +1976,7 @@ void test_5_arg_const_buffer_write_at()
s.next_write_length(10);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -2407,14 +2404,14 @@ void test_5_arg_mutable_buffer_write_at()
s.reset();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
s.reset();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -2423,7 +2420,7 @@ void test_5_arg_mutable_buffer_write_at()
s.next_write_length(1);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -2432,7 +2429,7 @@ void test_5_arg_mutable_buffer_write_at()
s.next_write_length(1);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -2441,7 +2438,7 @@ void test_5_arg_mutable_buffer_write_at()
s.next_write_length(10);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -2450,7 +2447,7 @@ void test_5_arg_mutable_buffer_write_at()
s.next_write_length(10);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(mutable_write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
ASIO_CHECK(!error);
@@ -2879,14 +2876,14 @@ void test_5_arg_vector_buffers_write_at()
s.reset();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
s.reset();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -2895,7 +2892,7 @@ void test_5_arg_vector_buffers_write_at()
s.next_write_length(1);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -2904,7 +2901,7 @@ void test_5_arg_vector_buffers_write_at()
s.next_write_length(1);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -2913,7 +2910,7 @@ void test_5_arg_vector_buffers_write_at()
s.next_write_length(10);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 0, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -2922,7 +2919,7 @@ void test_5_arg_vector_buffers_write_at()
s.next_write_length(10);
error = asio::error_code();
bytes_transferred = asio::write_at(s, 1234, buffers,
- short_transfer, error);
+ short_transfer(), error);
ASIO_CHECK(bytes_transferred == sizeof(write_data));
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
ASIO_CHECK(!error);
@@ -2938,13 +2935,9 @@ void async_write_handler(const asio::error_code& e,
void test_4_arg_const_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3037,13 +3030,9 @@ void test_4_arg_const_buffer_async_write_at()
void test_4_arg_mutable_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3136,13 +3125,9 @@ void test_4_arg_mutable_buffer_async_write_at()
void test_4_arg_boost_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -3238,15 +3223,10 @@ void test_4_arg_boost_array_buffers_async_write_at()
void test_4_arg_std_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -3335,18 +3315,13 @@ void test_4_arg_std_array_buffers_async_write_at()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3440,13 +3415,9 @@ void test_4_arg_vector_buffers_async_write_at()
void test_4_arg_streambuf_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -3556,13 +3527,9 @@ void test_4_arg_streambuf_async_write_at()
void test_5_arg_const_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -4125,7 +4092,7 @@ void test_5_arg_const_buffer_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -4135,7 +4102,7 @@ void test_5_arg_const_buffer_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -4146,7 +4113,7 @@ void test_5_arg_const_buffer_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -4157,7 +4124,7 @@ void test_5_arg_const_buffer_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -4168,7 +4135,7 @@ void test_5_arg_const_buffer_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -4179,7 +4146,7 @@ void test_5_arg_const_buffer_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -4188,7 +4155,7 @@ void test_5_arg_const_buffer_async_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write_at(s, 0, buffers, short_transfer,
+ int i = asio::async_write_at(s, 0, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -4198,13 +4165,9 @@ void test_5_arg_const_buffer_async_write_at()
void test_5_arg_mutable_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -4767,7 +4730,7 @@ void test_5_arg_mutable_buffer_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -4777,7 +4740,7 @@ void test_5_arg_mutable_buffer_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -4788,7 +4751,7 @@ void test_5_arg_mutable_buffer_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -4799,7 +4762,7 @@ void test_5_arg_mutable_buffer_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -4810,7 +4773,7 @@ void test_5_arg_mutable_buffer_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -4821,7 +4784,7 @@ void test_5_arg_mutable_buffer_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(mutable_write_data), &called));
ioc.restart();
@@ -4830,7 +4793,7 @@ void test_5_arg_mutable_buffer_async_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(mutable_write_data)));
s.reset();
- int i = asio::async_write_at(s, 0, buffers, short_transfer,
+ int i = asio::async_write_at(s, 0, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -4840,13 +4803,9 @@ void test_5_arg_mutable_buffer_async_write_at()
void test_5_arg_boost_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
#if defined(ASIO_HAS_BOOST_ARRAY)
asio::io_context ioc;
@@ -5411,7 +5370,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -5421,7 +5380,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -5432,7 +5391,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -5443,7 +5402,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -5454,7 +5413,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -5465,7 +5424,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -5474,7 +5433,7 @@ void test_5_arg_boost_array_buffers_async_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write_at(s, 0, buffers, short_transfer,
+ int i = asio::async_write_at(s, 0, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -5485,15 +5444,10 @@ void test_5_arg_boost_array_buffers_async_write_at()
void test_5_arg_std_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -6056,7 +6010,7 @@ void test_5_arg_std_array_buffers_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6066,7 +6020,7 @@ void test_5_arg_std_array_buffers_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6077,7 +6031,7 @@ void test_5_arg_std_array_buffers_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6088,7 +6042,7 @@ void test_5_arg_std_array_buffers_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6099,7 +6053,7 @@ void test_5_arg_std_array_buffers_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6110,7 +6064,7 @@ void test_5_arg_std_array_buffers_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6119,24 +6073,19 @@ void test_5_arg_std_array_buffers_async_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write_at(s, 0, buffers, short_transfer,
+ int i = asio::async_write_at(s, 0, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_5_arg_vector_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -6700,7 +6649,7 @@ void test_5_arg_vector_buffers_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6710,7 +6659,7 @@ void test_5_arg_vector_buffers_async_write_at()
s.reset();
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6721,7 +6670,7 @@ void test_5_arg_vector_buffers_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6732,7 +6681,7 @@ void test_5_arg_vector_buffers_async_write_at()
s.reset();
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6743,7 +6692,7 @@ void test_5_arg_vector_buffers_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 0, buffers, short_transfer,
+ asio::async_write_at(s, 0, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6754,7 +6703,7 @@ void test_5_arg_vector_buffers_async_write_at()
s.reset();
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 1234, buffers, short_transfer,
+ asio::async_write_at(s, 1234, buffers, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -6763,7 +6712,7 @@ void test_5_arg_vector_buffers_async_write_at()
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(write_data)));
s.reset();
- int i = asio::async_write_at(s, 0, buffers, short_transfer,
+ int i = asio::async_write_at(s, 0, buffers, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
@@ -6773,13 +6722,9 @@ void test_5_arg_vector_buffers_async_write_at()
void test_5_arg_streambuf_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
- using std::placeholders::_1;
- using std::placeholders::_2;
-#endif // defined(ASIO_HAS_BOOST_BIND)
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
asio::io_context ioc;
test_random_access_device s(ioc);
@@ -7441,7 +7386,7 @@ void test_5_arg_streambuf_async_write_at()
sb.consume(sb.size());
sb.sputn(write_data, sizeof(write_data));
called = false;
- asio::async_write_at(s, 0, sb, short_transfer,
+ asio::async_write_at(s, 0, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -7453,7 +7398,7 @@ void test_5_arg_streambuf_async_write_at()
sb.consume(sb.size());
sb.sputn(write_data, sizeof(write_data));
called = false;
- asio::async_write_at(s, 1234, sb, short_transfer,
+ asio::async_write_at(s, 1234, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -7466,7 +7411,7 @@ void test_5_arg_streambuf_async_write_at()
sb.sputn(write_data, sizeof(write_data));
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 0, sb, short_transfer,
+ asio::async_write_at(s, 0, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -7479,7 +7424,7 @@ void test_5_arg_streambuf_async_write_at()
sb.sputn(write_data, sizeof(write_data));
s.next_write_length(1);
called = false;
- asio::async_write_at(s, 1234, sb, short_transfer,
+ asio::async_write_at(s, 1234, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -7492,7 +7437,7 @@ void test_5_arg_streambuf_async_write_at()
sb.sputn(write_data, sizeof(write_data));
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 0, sb, short_transfer,
+ asio::async_write_at(s, 0, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -7505,7 +7450,7 @@ void test_5_arg_streambuf_async_write_at()
sb.sputn(write_data, sizeof(write_data));
s.next_write_length(10);
called = false;
- asio::async_write_at(s, 1234, sb, short_transfer,
+ asio::async_write_at(s, 1234, sb, short_transfer(),
bindns::bind(async_write_handler,
_1, _2, sizeof(write_data), &called));
ioc.restart();
@@ -7516,7 +7461,7 @@ void test_5_arg_streambuf_async_write_at()
s.reset();
sb.consume(sb.size());
sb.sputn(write_data, sizeof(write_data));
- int i = asio::async_write_at(s, 0, sb, short_transfer,
+ int i = asio::async_write_at(s, 0, sb, short_transfer(),
archetypes::lazy_handler());
ASIO_CHECK(i == 42);
ioc.restart();
diff --git a/3rdparty/asio/src/tools/handlerlive.pl b/3rdparty/asio/src/tools/handlerlive.pl
new file mode 100755
index 00000000000..e24b8acafba
--- /dev/null
+++ b/3rdparty/asio/src/tools/handlerlive.pl
@@ -0,0 +1,89 @@
+#!/usr/bin/perl -w
+#
+# handlerlive.pl
+# ~~~~~~~~~~~~~~
+#
+# A tool for post-processing the debug output generated by Asio-based programs
+# to print a list of "live" handlers. These are handlers that are associated
+# with operations that have not yet completed, or running handlers that have
+# not yet finished their execution. Programs write this output to the standard
+# error stream when compiled with the define `ASIO_ENABLE_HANDLER_TRACKING'.
+#
+# Copyright (c) 2003-2024 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)
+#
+
+use strict;
+
+my %pending_handlers = ();
+my %running_handlers = ();
+
+#-------------------------------------------------------------------------------
+# Parse the debugging output and update the set of pending handlers.
+
+sub parse_debug_output()
+{
+ while (my $line = <>)
+ {
+ chomp($line);
+
+ if ($line =~ /\@asio\|([^|]*)\|([^|]*)\|(.*)$/)
+ {
+ my $action = $2;
+
+ # Handler creation.
+ if ($action =~ /^([0-9]+)\*([0-9]+)$/)
+ {
+ $pending_handlers{$2} = 1;
+ }
+
+ # Begin handler invocation.
+ elsif ($action =~ /^>([0-9]+)$/)
+ {
+ delete($pending_handlers{$1});
+ $running_handlers{$1} = 1;
+ }
+
+ # End handler invocation.
+ elsif ($action =~ /^<([0-9]+)$/)
+ {
+ delete($running_handlers{$1});
+ }
+
+ # Handler threw exception.
+ elsif ($action =~ /^!([0-9]+)$/)
+ {
+ delete($running_handlers{$1});
+ }
+
+ # Handler was destroyed without being invoked.
+ elsif ($action =~ /^~([0-9]+)$/)
+ {
+ delete($pending_handlers{$1});
+ }
+ }
+ }
+}
+
+#-------------------------------------------------------------------------------
+# Print a list of incompleted handers, on a single line delimited by spaces.
+
+sub print_handlers($)
+{
+ my $handlers = shift;
+ my $prefix = "";
+ foreach my $handler (sort { $a <=> $b } keys %{$handlers})
+ {
+ print("$prefix$handler");
+ $prefix = " ";
+ }
+ print("\n") if ($prefix ne "");
+}
+
+#-------------------------------------------------------------------------------
+
+parse_debug_output();
+print_handlers(\%running_handlers);
+print_handlers(\%pending_handlers);
diff --git a/3rdparty/asio/src/tools/handlertree.pl b/3rdparty/asio/src/tools/handlertree.pl
new file mode 100755
index 00000000000..83e95496699
--- /dev/null
+++ b/3rdparty/asio/src/tools/handlertree.pl
@@ -0,0 +1,140 @@
+#!/usr/bin/perl -w
+#
+# handlertree.pl
+# ~~~~~~~~~~~~~~
+# A tool for post-processing the debug output generated by Asio-based programs
+# to print the tree of handlers that resulted in some specified handler ids.
+# Programs write this output to the standard error stream when compiled with
+# the define `ASIO_ENABLE_HANDLER_TRACKING'.
+#
+# Copyright (c) 2003-2024 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)
+#
+
+use strict;
+
+my %target_handlers = ();
+my @cached_output = ();
+my %outstanding_handlers = ();
+my %running_handlers = ();
+
+#-------------------------------------------------------------------------------
+# Build the initial list of target handlers from the command line arguments.
+
+sub build_initial_target_handlers()
+{
+ for my $handler (@ARGV)
+ {
+ $target_handlers{$handler} = 1;
+ }
+}
+
+#-------------------------------------------------------------------------------
+# Parse the debugging output and cache the handler tracking lines.
+
+sub parse_debug_output()
+{
+ while (my $line = <STDIN>)
+ {
+ chomp($line);
+
+ if ($line =~ /\@asio\|([^|]*)\|([^|]*)\|(.*)$/)
+ {
+ push(@cached_output, $line);
+ }
+ }
+}
+
+#-------------------------------------------------------------------------------
+# Iterate over the cached output in revese and build a hash of all target
+# handlers' ancestors.
+
+sub build_target_handler_tree()
+{
+ my $i = scalar(@cached_output) - 1;
+ while ($i >= 0)
+ {
+ my $line = $cached_output[$i];
+
+ if ($line =~ /\@asio\|([^|]*)\|([^|]*)\|(.*)$/)
+ {
+ my $action = $2;
+
+ # Handler creation.
+ if ($action =~ /^([0-9]+)\*([0-9]+)$/)
+ {
+ if ($1 ne "0" and exists($target_handlers{$2}))
+ {
+ $target_handlers{$1} = 1;
+ }
+ }
+ }
+
+ --$i;
+ }
+}
+
+#-------------------------------------------------------------------------------
+# Print out all handler tracking records associated with the target handlers.
+
+sub print_target_handler_records()
+{
+ for my $line (@cached_output)
+ {
+ if ($line =~ /\@asio\|([^|]*)\|([^|]*)\|(.*)$/)
+ {
+ my $action = $2;
+
+ # Handler location.
+ if ($action =~ /^([0-9]+)\^([0-9]+)$/)
+ {
+ print("$line\n") if ($1 eq "0" or exists($target_handlers{$1})) and exists($target_handlers{$2});
+ }
+
+ # Handler creation.
+ if ($action =~ /^([0-9]+)\*([0-9]+)$/)
+ {
+ print("$1, $2, $line\n") if ($1 eq "0" or exists($target_handlers{$1})) and exists($target_handlers{$2});
+ }
+
+ # Begin handler invocation.
+ elsif ($action =~ /^>([0-9]+)$/)
+ {
+ print("$line\n") if (exists($target_handlers{$1}));
+ }
+
+ # End handler invocation.
+ elsif ($action =~ /^<([0-9]+)$/)
+ {
+ print("$line\n") if (exists($target_handlers{$1}));
+ }
+
+ # Handler threw exception.
+ elsif ($action =~ /^!([0-9]+)$/)
+ {
+ print("$line\n") if (exists($target_handlers{$1}));
+ }
+
+ # Handler was destroyed without being invoked.
+ elsif ($action =~ /^~([0-9]+)$/)
+ {
+ print("$line\n") if (exists($target_handlers{$1}));
+ }
+
+ # Operation associated with a handler.
+ elsif ($action =~ /^\.([0-9]+)$/)
+ {
+ print("$line\n") if (exists($target_handlers{$1}));
+ }
+ }
+ }
+}
+
+#-------------------------------------------------------------------------------
+
+build_initial_target_handlers();
+parse_debug_output();
+build_target_handler_tree();
+print_target_handler_records();
diff --git a/3rdparty/asio/src/tools/handlerviz.pl b/3rdparty/asio/src/tools/handlerviz.pl
index 06249a2cdea..6bef1b700bd 100644..100755
--- a/3rdparty/asio/src/tools/handlerviz.pl
+++ b/3rdparty/asio/src/tools/handlerviz.pl
@@ -16,7 +16,7 @@
#
# perl handlerviz.pl < output.txt | dot -Tpdf > output.pdf
#
-# Copyright (c) 2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# Copyright (c) 2003-2024 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)
@@ -26,9 +26,11 @@ use strict;
my %nodes = ();
my @edges = ();
+my %locations = ();
my %anon_nodes = ();
my $anon_id = 0;
my %all_nodes = ();
+my %pending_nodes = ();
#-------------------------------------------------------------------------------
# Parse the debugging output and populate the nodes and edges.
@@ -62,6 +64,21 @@ sub parse_debug_output()
my %edge = ( begin=>$begin, end=>$end, label=>$label );
push(@edges, \%edge);
+
+ $pending_nodes{$end} = 1;
+ }
+
+ # Handler location.
+ elsif ($action =~ /^([0-9]+)\^([0-9]+)$/)
+ {
+ if ($1 ne "0")
+ {
+ if (not exists($locations{($1,$2)}))
+ {
+ $locations{($1,$2)} = ();
+ }
+ push(@{$locations{($1,$2)}}, $description);
+ }
}
# Begin handler invocation.
@@ -71,6 +88,7 @@ sub parse_debug_output()
$new_node{content} = ();
$nodes{$1} = \%new_node;
$all_nodes{"$timestamp-$1"} = $1;
+ delete($pending_nodes{$1});
}
# End handler invocation.
@@ -92,6 +110,7 @@ sub parse_debug_output()
$new_node{content} = ();
$nodes{$1} = \%new_node;
$all_nodes{"$timestamp-$1"} = $1;
+ delete($pending_nodes{$1});
}
# Handler performed some operation.
@@ -129,8 +148,8 @@ sub escape($)
# Templates for dot output.
my $graph_header = <<"EOF";
-/* Generated by asioviz.pl */
-digraph G
+/* Generated by handlerviz.pl */
+digraph "handlerviz output"
{
graph [ nodesep="1" ];
node [ shape="box", fontsize="9" ];
@@ -172,9 +191,23 @@ my $anon_node = <<"EOF";
"%name%" [ label="%label%", color="gray" ];
EOF
+my $pending_nodes_header = <<"EOF";
+{
+node [ shape="record", color="red" ];
+rank = "max";
+EOF
+
+my $pending_nodes_footer = <<"EOF";
+}
+EOF
+
+my $pending_node = <<"EOF";
+"%name%";
+EOF
+
my $edges_header = <<"EOF";
{
-edge [ style="dashed", arrowhead="open", weight="100" ];
+edge [ style="dashed", arrowhead="open" ];
EOF
my $edges_footer = <<"EOF";
@@ -182,12 +215,13 @@ my $edges_footer = <<"EOF";
EOF
my $edge = <<"EOF";
-"%begin%" -> "%end%" [ label="%label%" ]
+"%begin%" -> "%end%" [ label="%label%", labeltooltip="%tooltip%" ]
EOF
my $node_order_header = <<"EOF";
{
-edge [ style="invis", weight="1" ];
+node [ style="invisible" ];
+edge [ style="invis", weight="100" ];
EOF
my $node_order_footer = <<"EOF";
@@ -195,7 +229,12 @@ my $node_order_footer = <<"EOF";
EOF
my $node_order = <<"EOF";
-"%begin%" -> "%end%"
+{
+rank="same"
+"%begin%";
+"o%begin%";
+}
+"o%begin%" -> "o%end%";
EOF
#-------------------------------------------------------------------------------
@@ -214,10 +253,13 @@ sub print_nodes()
$header =~ s/%label%/$label/g;
print($header);
- my $line = $node_content;
- my $content = $entry . " + " . sprintf("%.6f", $exit - $entry) . "s";
- $line =~ s/%content%/$content/g;
- print($line);
+ if (defined($exit) and defined($entry))
+ {
+ my $line = $node_content;
+ my $content = $entry . " + " . sprintf("%.6f", $exit - $entry) . "s";
+ $line =~ s/%content%/$content/g;
+ print($line);
+ }
foreach my $content (@{$node->{content}})
{
@@ -243,7 +285,19 @@ sub print_anon_nodes()
$line =~ s/%label%/$label/g;
print($line);
}
- print($edges_footer);
+ print($anon_nodes_footer);
+}
+
+sub print_pending_nodes()
+{
+ print($pending_nodes_header);
+ foreach my $name (sort keys %pending_nodes)
+ {
+ my $line = $pending_node;
+ $line =~ s/%name%/$name/g;
+ print($line);
+ }
+ print($pending_nodes_footer);
}
sub print_edges()
@@ -254,10 +308,19 @@ sub print_edges()
my $begin = $e->{begin};
my $end = $e->{end};
my $label = $e->{label};
+ my $tooltip = "";
+ if (exists($locations{($begin,$end)}))
+ {
+ for my $line (@{$locations{($begin,$end)}})
+ {
+ $tooltip = $tooltip . escape($line) . "\n";
+ }
+ }
my $line = $edge;
$line =~ s/%begin%/$begin/g;
$line =~ s/%end%/$end/g;
$line =~ s/%label%/$label/g;
+ $line =~ s/%tooltip%/$tooltip/g;
print($line);
}
print($edges_footer);
@@ -280,6 +343,18 @@ sub print_node_order()
}
$prev = $all_nodes{$name};
}
+ foreach my $name (sort keys %pending_nodes)
+ {
+ if ($prev ne "")
+ {
+ my $begin = $prev;
+ my $line = $node_order;
+ $line =~ s/%begin%/$begin/g;
+ $line =~ s/%end%/$name/g;
+ print($line);
+ }
+ last;
+ }
print($node_order_footer);
}
@@ -288,6 +363,7 @@ sub generate_dot()
print($graph_header);
print_nodes();
print_anon_nodes();
+ print_pending_nodes();
print_edges();
print_node_order();
print($graph_footer);
diff --git a/3rdparty/asio/test-driver b/3rdparty/asio/test-driver
new file mode 100755
index 00000000000..be73b80adf9
--- /dev/null
+++ b/3rdparty/asio/test-driver
@@ -0,0 +1,153 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name NAME --log-file PATH --trs-file PATH
+ [--expect-failure {yes|no}] [--color-tests {yes|no}]
+ [--enable-hard-errors {yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
+END
+}
+
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ *) break;;
+ esac
+ shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here. We create the file first, then append to it,
+# to ameliorate tests themselves also writing to the log file. Our tests
+# don't, but others can (automake bug#35762).
+: >"$log_file"
+"$@" >>"$log_file" 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ tweaked_estatus=1
+else
+ tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>"$log_file"
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/3rdparty/asio/tsify.pl b/3rdparty/asio/tsify.pl
deleted file mode 100644
index 3dc1038caad..00000000000
--- a/3rdparty/asio/tsify.pl
+++ /dev/null
@@ -1,551 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use File::Path;
-# use Switch;
-
-our $output_dir = "tsified";
-
-sub print_line
-{
- my ($output, $line, $from, $lineno) = @_;
-
- # Warn if the resulting line is >80 characters wide.
- if (length($line) > 80)
- {
- if ($from =~ /\.[chi]pp$/)
- {
- print("Warning: $from:$lineno: output >80 characters wide.\n");
- }
- }
-
- # Write the output.
- print($output $line . "\n");
-}
-
-sub source_contains_asio_thread_usage
-{
- my ($from) = @_;
-
- # Open the input file.
- open(my $input, "<$from") or die("Can't open $from for reading");
-
- # Check file for use of asio::thread.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /asio::thread/)
- {
- close($input);
- return 1;
- }
- elsif ($line =~ /^ *thread /)
- {
- close($input);
- return 1;
- }
- }
-
- close($input);
- return 0;
-}
-
-sub source_contains_asio_include
-{
- my ($from) = @_;
-
- # Open the input file.
- open(my $input, "<$from") or die("Can't open $from for reading");
-
- # Check file for inclusion of asio.hpp.
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /# *include [<"]asio\.hpp[>"]/)
- {
- close($input);
- return 1;
- }
- }
-
- close($input);
- return 0;
-}
-
-sub copy_source_file
-{
- my ($from, $to) = @_;
-
- # Ensure the output directory exists.
- my $dir = $to;
- $dir =~ s/[^\/]*$//;
- mkpath($dir);
-
- # First determine whether the file makes any use of asio::thread.
- my $uses_asio_thread = source_contains_asio_thread_usage($from);
-
- my $includes_asio = source_contains_asio_include($from);
-
- my $is_asio_hpp = 0;
- $is_asio_hpp = 1 if ($from =~ /asio\.hpp/);
-
- my $needs_doc_link = 0;
- $needs_doc_link = 1 if ($is_asio_hpp);
-
- my $is_config_hpp = 0;
- $is_config_hpp = 1 if ($from =~ /asio\/detail\/config\.hpp/);
-
- my $is_error_hpp = 0;
- $is_error_hpp = 1 if ($from =~ /asio\/error\.hpp/);
-
- my $is_impl_src_hpp = 0;
- $is_impl_src_hpp = 1 if ($from =~ /asio\/impl\/src\.hpp/);
-
- my $is_test = 0;
- $is_test = 1 if ($from =~ /tests\/unit/);
-
- # Open the files.
- open(my $input, "<$from") or die("Can't open $from for reading");
- open(my $output, ">$to") or die("Can't open $to for writing");
-
- # State for stripping out deprecated, extension, and old services code.
- my $deprecated_state = 0;
- my $extension_state = 0;
- my $old_services_state = 0;
-
- # Copy the content.
- my $lineno = 1;
- while (my $line = <$input>)
- {
- chomp($line);
-
- # Strip out deprecated code.
- if ($deprecated_state == 0)
- {
- if ($line =~ /#\s*if\s*defined\(ASIO_NO_DEPRECATED\)/)
- {
- $deprecated_state = 1;
- next;
- }
- elsif ($line =~ /#\s*if\s*!defined\(ASIO_NO_DEPRECATED\)/)
- {
- $deprecated_state = -1;
- next;
- }
- }
- elsif ($deprecated_state == 1)
- {
- if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
- {
- $deprecated_state = -1;
- next;
- }
- elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
- {
- $deprecated_state = 0;
- next;
- }
- else
- {
- $line =~ s/^# /#/;
- }
- }
- elsif ($deprecated_state == -1)
- {
- if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
- {
- $deprecated_state = 1;
- }
- elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_NO_DEPRECATED\)/)
- {
- $deprecated_state = -2;
- }
- next;
- }
- elsif ($deprecated_state == -2)
- {
- $deprecated_state = 0;
- next if ($line eq "");
- }
-
- # Strip out code for extensions.
- if ($extension_state == 0)
- {
- if ($line =~ /#\s*if\s*!defined\(ASIO_NO_EXTENSIONS\)\s*$/)
- {
- $extension_state = -1;
- next;
- }
- }
- elsif ($extension_state == -1)
- {
- $extension_state = -2 if ($line =~ /#\s*endif\s*\/\/\s*!defined\(ASIO_NO_EXTENSIONS\)\s*$/);
- next;
- }
- elsif ($extension_state == -2)
- {
- $extension_state = 0;
- next if ($line eq "");
- }
-
- # Strip out code for old services.
- if ($old_services_state == 0)
- {
- if ($line =~ /#\s*if\s*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
- {
- $old_services_state = -1;
- next;
- }
- elsif ($line =~ /#\s*if\s*!defined\(ASIO_ENABLE_OLD_SERVICES\)/)
- {
- $old_services_state = 1;
- next;
- }
- }
- elsif ($old_services_state == 1)
- {
- if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
- {
- $old_services_state = -1;
- next;
- }
- elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
- {
- $old_services_state = 0;
- next;
- }
- else
- {
- $line =~ s/^# /#/;
- }
- }
- elsif ($old_services_state == -1)
- {
- if ($line =~ /#\s*else\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
- {
- $old_services_state = 1;
- }
- elsif ($line =~ /#\s*endif\s*\/\/\s*!*defined\(ASIO_ENABLE_OLD_SERVICES\)/)
- {
- $old_services_state = -2;
- }
- next;
- }
- elsif ($old_services_state == -2)
- {
- $old_services_state = 0;
- next if ($line eq "");
- }
-
- # Unconditional replacements.
- $line =~ s/[\\@]ref boost_bind/std::bind()/g;
- if ($from =~ /.*\.txt$/)
- {
- $line =~ s/[\\@]ref async_read/std::experimental::net::async_read()/g;
- $line =~ s/[\\@]ref async_write/std::experimental::net::async_write()/g;
- }
- if ($line =~ /asio_detail_posix_thread_function/)
- {
- $line =~ s/asio_detail_posix_thread_function/networking_ts_detail_posix_thread_function/g;
- }
- if ($line =~ /asio_signal_handler/)
- {
- $line =~ s/asio_signal_handler/networking_ts_signal_handler/g;
- }
- if ($line =~ /ASIO_/ && !($line =~ /NET_TS_/))
- {
- $line =~ s/ASIO_/NET_TS_/g;
- }
- if ($line =~ /asio_handler_/)
- {
- $line =~ s/asio_handler_/networking_ts_handler_/g;
- }
- if ($line =~ /asio_true_handler_/)
- {
- $line =~ s/asio_true_handler_/networking_ts_true_handler_/g;
- }
-
- # Lines skipped in asio/impl/src.hpp.
- if ($is_impl_src_hpp)
- {
- next if
- (
- $line =~ /serial_port/
- or $line =~ /\/local\//
- or $line =~ /\/generic\//
- or $line =~ /signal_set/
- );
- }
-
- # Conditional replacements.
- if ($line =~ /^(.* *)namespace asio {/)
- {
- print_line($output, $1 . "namespace std {", $from, $lineno);
- print_line($output, $1 . "namespace experimental {", $from, $lineno);
- print_line($output, $1 . "namespace net {", $from, $lineno);
- print_line($output, $1 . "inline namespace v1 {", $from, $lineno);
- }
- elsif ($line =~ /^(.* *)} \/\/ namespace asio$/)
- {
- print_line($output, $1 . "} // inline namespace v1", $from, $lineno);
- print_line($output, $1 . "} // namespace net", $from, $lineno);
- print_line($output, $1 . "} // namespace experimental", $from, $lineno);
- print_line($output, $1 . "} // namespace std", $from, $lineno);
- }
- elsif ($line =~ /^(# *include )[<"](asio\.hpp)[>"]$/)
- {
- print_line($output, $1 . "<net>", $from, $lineno);
- if ($uses_asio_thread)
- {
- print_line($output, $1 . "<thread>", $from, $lineno) if (!$is_test);
- $uses_asio_thread = 0;
- }
- }
- elsif ($line =~ /^(# *include )[<"]boost\/.*[>"].*$/)
- {
- if (!$includes_asio && $uses_asio_thread)
- {
- print_line($output, $1 . "<thread>", $from, $lineno) if (!$is_test);
- $uses_asio_thread = 0;
- }
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /^(# *include )[<"]asio\/thread\.hpp[>"]/)
- {
- if ($is_test)
- {
- print_line($output, $1 . "<experimental/__net_ts/detail/thread.hpp>", $from, $lineno);
- }
- else
- {
- # Line is removed.
- }
- }
- elsif ($line =~ /(# *include )[<"]asio\/error_code\.hpp[>"]/)
- {
- if ($is_asio_hpp)
- {
- # Line is removed.
- }
- else
- {
- print_line($output, $1 . "<cerrno>", $from, $lineno) if ($is_error_hpp);
- print_line($output, $1 . "<system_error>", $from, $lineno);
- }
- }
- elsif ($line =~ /# *include [<"]asio\/impl\/error_code\.[hi]pp[>"]/)
- {
- # Line is removed.
- }
- elsif ($line =~ /(# *include )[<"]asio\/system_error\.hpp[>"]/)
- {
- if ($is_asio_hpp)
- {
- # Line is removed.
- }
- else
- {
- print_line($output, $1 . "<system_error>", $from, $lineno);
- }
- }
- elsif ($line =~ /(^.*# *include )[<"]asio\/([^>"]*)[>"](.*)$/)
- {
- print_line($output, $1 . "<experimental/__net_ts/" . $2 . ">" . $3, $from, $lineno);
- }
- elsif ($line =~ /#.*defined\(.*ASIO_HAS_STD_SYSTEM_ERROR\)$/)
- {
- # Line is removed.
- }
- elsif ($line =~ /asio::thread/)
- {
- if ($is_test)
- {
- $line =~ s/asio::thread/std::experimental::net::v1::detail::thread/g;
- }
- else
- {
- $line =~ s/asio::thread/std::thread/g;
- }
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /^( *)thread( .*)$/)
- {
- if ($is_test)
- {
- print_line($output, $1 . "std::experimental::net::v1::detail::thread" . $2, $from, $lineno);
- }
- else
- {
- print_line($output, $1 . "std::thread" . $2, $from, $lineno);
- }
- }
- elsif ($line =~ /asio::/ && !($line =~ /boost::asio::/))
- {
- $line =~ s/asio::error_code/std::error_code/g;
- $line =~ s/asio::error_category/std::error_category/g;
- $line =~ s/asio::system_category/std::system_category/g;
- $line =~ s/asio::system_error/std::system_error/g;
- $line =~ s/asio::/std::experimental::net::/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /using namespace asio/)
- {
- $line =~ s/using namespace asio/using namespace std::experimental::net/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /[\\@]ref boost_bind/)
- {
- $line =~ s/[\\@]ref boost_bind/std::bind()/g;
- print_line($output, $line, $from, $lineno);
- }
- elsif ($line =~ /define.*DETAIL_CONFIG_HPP/)
- {
- print_line($output, $line, $from, $lineno);
- print_line($output, "", $from, $lineno);
- print_line($output, "#define NET_TS_STANDALONE 1", $from, $lineno);
- }
- else
- {
- print_line($output, $line, $from, $lineno);
- }
- ++$lineno;
- }
-
- # Ok, we're done.
- close($input);
- close($output);
-}
-
-sub find_include_files
-{
- my @root_includes = (
- "asio/ts/buffer.hpp",
- "asio/ts/executor.hpp",
- "asio/ts/internet.hpp",
- "asio/ts/io_context.hpp",
- "asio/ts/net.hpp",
- "asio/ts/netfwd.hpp",
- "asio/ts/socket.hpp",
- "asio/ts/timer.hpp");
-
- my @excluded_includes = (
- "asio/basic_deadline_timer.hpp",
- "asio/basic_streambuf.hpp",
- "asio/basic_streambuf_fwd.hpp",
- "asio/datagram_socket_service.hpp",
- "asio/deadline_timer.hpp",
- "asio/deadline_timer_service.hpp",
- "asio/io_context_strand.hpp",
- "asio/detail/strand_service.hpp",
- "asio/detail/impl/strand_service.hpp",
- "asio/detail/impl/strand_service.ipp",
- "asio/socket_acceptor_service.hpp",
- "asio/seq_packet_socket_service.hpp",
- "asio/stream_socket_service.hpp",
- "asio/time_traits.hpp",
- "asio/waitable_timer_service.hpp");
-
- my @include_files = ();
- my %known_includes = ();
-
- foreach my $include (@root_includes)
- {
- $known_includes{$include} = 1;
- push(@include_files, "include/" . $include);
- }
-
- foreach my $include (@excluded_includes)
- {
- $known_includes{$include} = 1;
- }
-
- my @unprocessed_includes = sort keys %known_includes;
- while (scalar(@unprocessed_includes) > 0)
- {
- my $include = pop(@unprocessed_includes);
-
- open(my $input, "<include/$include") or die("Can't open include/$include for reading");
- while (my $line = <$input>)
- {
- chomp($line);
- if ($line =~ /^\s*#\s*include\s*"(asio\/[^"]*)"/)
- {
- if (not defined($known_includes{$1}))
- {
- $known_includes{$1} = 1;
- push(@include_files, "include/" . $1);
- push(@unprocessed_includes, $1);
- }
- }
- }
- close($input);
- }
-
- return @include_files;
-}
-
-sub copy_include_files
-{
- my @files = find_include_files();
- push(@files, "include/asio/impl/src.hpp");
-
- foreach my $file (@files)
- {
- if ($file ne "include/asio/thread.hpp"
- and $file ne "include/asio/error_code.hpp"
- and $file ne "include/asio/system_error.hpp"
- and $file ne "include/asio/impl/error_code.hpp"
- and $file ne "include/asio/impl/error_code.ipp")
- {
- my $from = $file;
- my $to = $file;
- $to =~ s/^include\/asio\//$output_dir\/include\/experimental\/__net_ts\//;
- copy_source_file($from, $to);
- }
- }
-}
-
-sub create_top_level_includes
-{
- my @includes = (
- "buffer",
- "executor",
- "internet",
- "io_context",
- "net",
- "netfwd",
- "socket",
- "timer");
-
- our $output_dir;
- mkpath("$output_dir/include/experimental");
- foreach my $include (@includes)
- {
- open(my $output, ">$output_dir/include/experimental/$include")
- or die("Can't open $output_dir/include/experimental/$include for writing");
-
- my $guard = "NET_TS_" . uc($include) . "_INCLUDED";
-
- print($output "//\n");
- print($output "// experimental/$include\n");
- print($output "// " . '~' x length("experimental/" . $include) . "\n");
- print($output "//\n");
- print($output "// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)\n");
- print($output "//\n");
- print($output "// Distributed under the Boost Software License, Version 1.0. (See accompanying\n");
- print($output "// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n");
- print($output "//\n");
- print($output "\n");
- print($output "#ifndef $guard\n");
- print($output "#define $guard\n");
- print($output "\n");
- print($output "#include <experimental/__net_ts/ts/$include.hpp>\n");
- print($output "\n");
- print($output "#endif // $guard\n");
-
- close($output);
- }
-}
-
-copy_include_files();
-create_top_level_includes();